| View previous topic :: View next topic |
| Author |
Message |
flx666
Joined: 10 Feb 2010 Posts: 5
|
Posted: Wed Feb 10, 2010 11:23 am Post subject: Advanced Poll IP time |
|
|
Hi.
I need to set the IP tabel tjeck to 10 minuts - but I can only set hours.... Is there somewhere in the code I can fix this or anything else...?
Regards,
Henrik |
|
| Back to top |
|
 |
Carbonize

Joined: 12 Jun 2003 Posts: 3962 Location: Bristol, UK
|
Posted: Wed Feb 10, 2010 3:28 pm Post subject: |
|
|
Should be possible with a little editing of the PHP. _________________ Carbonize
I am not the maker of the Advanced Guestbook
get Lazarus |
|
| Back to top |
|
 |
flx666
Joined: 10 Feb 2010 Posts: 5
|
Posted: Thu Feb 11, 2010 7:53 am Post subject: |
|
|
Hi Carbonize...
Yes, I have tried - but didnt find anything useful.
I looked in the class_plist.php - I guess this is the one handling IP?
THere was a line like:
$exp_time_arr[] = $this->db->record['exp_time'];
But cant really find anywhere I can change this....
Hope someone is better in PHP than me..  |
|
| Back to top |
|
 |
flx666
Joined: 10 Feb 2010 Posts: 5
|
Posted: Thu Feb 11, 2010 7:54 am Post subject: |
|
|
Found this, also in class_plist.php.....
$data['timestamp'] = date($this->date_format,$this->plist_data['timestamp'][$i]+$this->pollvars['time_offset']*3600);
$data['exp_time'] = date($this->date_format,$this->plist_data['exp_time'][$i]+$this->pollvars['time_offset']*3600);
Could this be the line to change? |
|
| Back to top |
|
 |
Carbonize

Joined: 12 Jun 2003 Posts: 3962 Location: Bristol, UK
|
Posted: Thu Feb 11, 2010 11:18 am Post subject: |
|
|
I just looked and the actual line you want is in include/class_poll.php
$today = time()-$this->pollvars['lock_timeout']*3600;
Which translates as the number of hours you set it to multiplied by 3600 to get the number of seconds in that period. If you want to drop it to minutes just change the 3600 to 60.
That is assuming you are using the database version.
If using textfile version just open same file and replace both instances of 3600 with 60. _________________ Carbonize
I am not the maker of the Advanced Guestbook
get Lazarus |
|
| Back to top |
|
 |
flx666
Joined: 10 Feb 2010 Posts: 5
|
Posted: Fri Feb 12, 2010 4:12 pm Post subject: |
|
|
Yes, and it works.... Thanks..  |
|
| Back to top |
|
 |
|