Welcome Guest, Not a member yet? Register   Sign In
  autologin by cookie, by url
Posted by: El Forum - 10-26-2007, 03:30 AM - No Replies

[eluser]matt2012[/eluser]
Has anyone adapted freakauth so someone can use an url (with unique number) to login
or cookies to stay logged in.

Or is there an idea for the next release including cookies?


  help on this anyone?
Posted by: El Forum - 10-26-2007, 02:53 AM - Replies (11)

[eluser]mistress_shiira[/eluser]

Quote:<div style="font: 12px normal Verdana;color:red;">
&lt;?php
if($this->validation->error_string){
echo $this->validation->error_string;
echo "enable_button();";
}
?&gt;
</div>

hey guys can you help me with this?
i have a simple sign up form..when the user submits the form and there is still a validation error, i want the submit button to be enabled.the submit button was disabled on load fyi.

the code above doesnt seem to work...


  OB Session Question
Posted by: El Forum - 10-26-2007, 12:01 AM - Replies (7)

[eluser]Unknown[/eluser]
Hi,

I have installed OB Session and it is working ok. Now I am trying to use database to store session data. I have created a ci_sessions table as per OB Session documentation. Now, when I try to enable database session storage by setting

Code:
$config['sess_storage']='database';
data get written into the ci_sessions table but I can no longer use any database functions in my models, although the log shows that database driver class is initiated.

What could be going wrong? I have created the ci_sessions table in the same database that I use for my application. Could it be the problem ?


  unit test / SimpleTest
Posted by: El Forum - 10-25-2007, 11:45 PM - Replies (5)

[eluser][email protected][/eluser]
Hey guys,

I have tried migrating SimpleTest with CI, and am having issues of where test files should go.

I am trying to Unit Test a CI application, and am not sure how to set the paths so everything is picked up. I am having issues of where files should reside, and how paths should be set??

Any guidance will help. Thank you.


  Question about repopulating fields in my form
Posted by: El Forum - 10-25-2007, 10:47 PM - Replies (3)

[eluser]caole261188[/eluser]
I have a registration form, in which there's a drop down list.
I included the validation library in the form controller, and then set rules for it. After that I tried to repopulate the values which the user tried to enter before getting to error. Every thing works fine for input textbox, but for dropdown list (select) or radio and checkbox, I really don't know how to do it. Can you please show me?
Here's my form view:

Code:
&lt;?php echo $this->validation->error_string;?&gt;
&lt;?php echo form_open('register'); ?&gt;
<p><label for='username'>Username: *</label><br />&lt;?php echo form_input($username); ?&gt;</p>
<p><label for='password'>Password: *</label><br />&lt;?php echo form_password($password);?&gt;</p>
<p><label for='passwordconf'>Repeat Password: *</label><br />&lt;?php echo form_password($passwordconf);?&gt;</p>
<p><label for='email'>Email: *</label><br />&lt;?php echo form_input($email);?&gt;</p>
<p><label for='college'>College:</label><br />&lt;?php echo form_dropdown('college',$college);?&gt;</p>
<p><label for='fullname'>Fullname: *</label><br />&lt;?php echo form_input($fullname);?&gt;</p>
<p><label for='phone'>Phone:</label><br />&lt;?php echo form_input($phone);?&gt;</p>
<p><label for='phonemail'>Phone email address:</label><br />&lt;?php echo form_input($phonemail);?&gt;</p>
<p><label for='notified'>Would you like to be notified by email when someone bids for your items?</label><br />&lt;?php echo form_radio($notifiedyes);?&gt; Yes<br />&lt;?php echo form_radio($notifiedno);?&gt; No</p>
<p><label for='country'>Country: *</label><br />&lt;?php echo form_dropdown('country',$country);?&gt;</p>
&lt;?php echo form_submit('submit','Register!');?&gt;
And here's the portion in the controller file, to validate and repopulate the form fields:
Code:
$this->load->helper('form');
        $rules['username'] = 'trim|required|min_length[5]|alpha_dash|xss_clean';
        $rules['password'] = 'required|matches[passwordconf]|alpha_numeric|md5';
        $rules['passwordconf'] = 'required';
        $rules['email'] = 'trim|required|valid_email';
        $rules['fullname'] = 'trim|required';
        $rules['country'] = 'required';
        $this->validation->set_rules($rules);
        $fields['username'] = 'Username';
        $fields['password'] = 'Password';
        $fields['passwordconf'] = 'Repeat Password';
        $fields['email'] = 'Email Address';
        $fields['fullname'] = 'Full name';
        $fields['country'] = 'Country';
        $this->validation->set_fields($fields);
        $this->validation->set_error_delimiters('<h3>','</h3>');
        $data['username'] = array(
                                    'name' => 'username',
                                    'id' => 'username',
                                    'maxlength' => '40',
                                    'size' => '40',
                                    'value' => $this->validation->username);
        $data['password'] = array(
                                    'name' => 'password',
                                    'id' => 'password',
                                    'maxlength' => '30',
                                    'size' => '30',
                                    'value' => $this->validation->password);
        $data['passwordconf'] = array(
                                    'name' => 'passwordconf',
                                    'id' => 'password',
                                    'maxlength' => '30',
                                    'size' => '40');
        $data['email'] = array(
                                'name' => 'email',
                                'id' => 'email',
                                'maxlength' => '40',
                                'size' => '40',
                                'value' =>$this->validation->email);
        $data['college'] = array(
                                'apm' => 'APM - Asia Pacific Management',
                                'aps' => 'APS - Asia Pacific Studies',
                                'mba' => 'MBA (Graduate School)',
                                'ips' => 'IPS/APS (Graduate School)',
                                'phd' => 'PhD (Graduate School)');
          $data['fullname'] = array(
                                'name' => 'fullname',
                                'id' => 'fullname',
                                'maxlength' => '40',
                                'size' => '40');
        $data['phone'] = array(
                                'name' => 'phone',
                                'id' => 'phone',
                                'maxlength' => '12',
                                'size' => '12');
        $data['phonemail'] = array(
                                'name' => 'phonemail',
                                'id' => 'phonemail',
                                'maxlength' => '30',
                                'size' => '30');
        $data['notifiedyes'] = array(
                                'name' => 'notified',
                                'id' => 'notified',
                                'value' => 'yes',
                                'checked' => TRUE);
        $data['notifiedno'] = array(
                                'name' => 'notified',
                                'id' => 'notified',
                                'value' => 'no',
                                'checked' => FALSE);
        blah blah etc.
It may look long, and I'm just a beginner. So I really need to learn more from you.
Thanks in advance.


  Quick guestion about multiple application
Posted by: El Forum - 10-25-2007, 09:43 PM - Replies (8)

[eluser]vbnullchar[/eluser]
I want to run multiple application in one codeigniter installation..
the question is how to call each application and how to configure..


  Getting DB Result in controller
Posted by: El Forum - 10-25-2007, 09:24 PM - Replies (7)

[eluser]Lockzi[/eluser]
Hello,

here's a problem that's been bothering me for a while now...

In the model I've always been using

Code:
return $query->result();
And it works like a charm for the views where I can loop through the results.
The problem is that I can't get any information out of that query in the controller.

Anyone has any ideas? If you don't understand I can post some code to show even further what I mean if necessary.

Cheers,
Lockzi


  Dvide article for part.
Posted by: El Forum - 10-25-2007, 04:53 PM - Replies (4)

[eluser]jedre[/eluser]
Hello,

I have a question, how can I divide long article for smaller part (pages).
Is it easy way to resolve this problem by use CI?

Sorry for ma English Smile


  need help,,, reverse foreach or reverse the query
Posted by: El Forum - 10-25-2007, 04:10 PM - Replies (13)

[eluser]H8train[/eluser]
is there a way to reverse this maybe to start from the bottom instead of the top:
&lt;?php foreach($query->result() as $row): ?&gt;

or to reverse the query:
$data['query'] = $this->db->get('entries');

basically each row has an incrementing id and I want to post the highest id number first, as in to post the newest id.

need help.

Thanks Rich


  zip large files
Posted by: El Forum - 10-25-2007, 02:38 PM - Replies (2)

[eluser]tamara6[/eluser]
I'm looking for tips on how to create and deliver a fairly large zip file on the fly.

My users can select images and they will be added to a zip file, which gives them one convenient download. But I've discovered that if they ask for too many images then the application hangs and no file is delivered. I'm using code similar to this from the user guide:

$path = '/path/to/photo.jpg';

$this->zip->read_file($path);

// Download the file to your desktop. Name it "my_backup.zip"
$this->zip->download('my_backup.zip');

I have as many read_file steps as needed to add all the images to one zip file, but otherwise my code is identical.

Any tips on how to do this?

Thanks!

Tamara


Welcome, Guest
You have to register before you can post on our site.

Username
  

Password
  





Latest Threads
Changing Session cookie -...
by codeus
6 minutes ago
Update from 4.6.0 to 4.6....
by Vespa
Yesterday, 01:17 AM
hot-reload side effects s...
by InsiteFX
05-17-2025, 10:11 PM
using app/Config/App.php ...
by sam547
05-16-2025, 03:04 PM
Setting baseURL in Regist...
by grimpirate
05-15-2025, 02:20 PM
CRUD Code Generator
by DeanE10
05-15-2025, 05:31 AM
CodeIgniter.com - Report ...
by Harry Lyre
05-14-2025, 04:26 AM
Missing closing bracket w...
by abf
05-13-2025, 07:27 PM
Sessions old files are de...
by InsiteFX
05-12-2025, 10:30 PM
Ajax post failing with Ty...
by PaulC
05-12-2025, 12:23 AM

Forum Statistics
» Members: 146,803
» Latest member: East Gray Neurocare
» Forum threads: 78,392
» Forum posts: 379,472

Full Statistics

Search Forums

(Advanced Search)


Theme © iAndrew 2016 - Forum software by © MyBB