The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
![]()
i want to count 10 minuttes from a action.
A user clicks a botton / or another event happens that triggers a timestamp to be marked. how would i go about counting 10 minuttes, and activate a trigger after those 10 minuttes ? sort of a delay, and perhaps ewen if the user hits refresh the display would just show something like 5minuttes togo. all i need is the counting, i have no clue or no idea where to begin. ![]() |
#2
|
||||
|
||||
![]()
And this is used for?
|
#3
|
|||
|
|||
![]()
I think you might need to use a javascript function to get were you want to go.
|
#4
|
||||
|
||||
![]() Quote:
Quote:
Quote:
Quote:
Say you've got a table in the database called "delay_timestamps"... It would have the fields "userid" and "timestamp". Insert or update the field with the user like so PHP Code:
PHP Code:
This, of course, isn't the exact code you'll want... Certainly you'll want to condense the code down, like the $number_of_seconds_since_stamp variable is totally worthless - you can just divide by 60 on the fly. The timestamp variable in the database should probably be of type INTEGER, be careful not to use something like SMALLINT because it's not big enough for the timestamp. However, this will require an action from your user - it's not a trigger. It will require the user to click refresh, or to view the page again in some way. You might be able to work out some AJAX thing that starts up on every single page that checks for the time remaining and then starts an auto-refresh count down... But it'd be kinda wasteful in my opinion. Plus, some browsers disable the javascript redirects/refreshes. |
#5
|
|||
|
|||
![]()
At this point, I am with DM and wondering now what the problem is that needs to be solved?
|
#6
|
||||
|
||||
![]() Quote:
But, judging from his recent posts, it looks like he's trying to set a timer on submitting scores to ibProArcade - maybe to prevent cheating... |
#7
|
|||
|
|||
![]()
Got it. Now, it makes a lot of sense to me, thanks for that update.
|
#8
|
||||
|
||||
![]()
hi guys, hehe well i have made a small textbased rpg game like the ones you know from
around the web and facebook, but running on vbulletin. but needed somekind of limit of actions ![]() and thought well turns pr 10 minuttes would be the way to go. but got stuck on another project so havent been looking into it the lasy couple of days. |
![]() |
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|