The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
Time
I want to use an if statement like this
if ($action==time) { eval (blah blah) for 6 hours; } i know theres time but ii dunno how to use it... so if i want an action to do something for a certain amount of time what do i do? |
#2
|
||||
|
||||
I'm not quite sure what you want.
Do you want to adjust the timeout setting? |
#3
|
||||
|
||||
i want to say like.... if $away=1 then bla blah....
but i want to program that if ($action=="away") { $away=1 for 6 hours } i just need to be able to have it changed for 6 hours.. then after that time its changed back |
#4
|
||||
|
||||
You want a variable to have a value for 6 hours?
Why? That won't do you any good unless you've got this one script running for that long (like a shell script, or daemon). If you want to change the configuration of a program globally, try setting a flag in a database with a timestamp for it to revert. Everytime you access the flag in the DB, check the timestamp. If time()==timestamp, then revert the flag. |
#5
|
||||
|
||||
umm i dont understand that...
but... hmm lets say i wanted a user away kind of thing so if the user clicks this "I'm away button" there account would be inaccessible for like 6 hours |
#6
|
||||
|
||||
You would have to store the time somewhere, e.g. in a database, then check it against the current time.
PHP Code:
See? |
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|