RoundTimer macro
Review Request #113 - Created Dec. 12, 2009 and submitted
Information | |
---|---|
Victor Rusu | |
infoarena | |
Reviewers | |
hackers | |
Creates a timer which counts down to the round start/end time and refreshes the page when it ends. If the round is an archive or the start_time and duration are missing the macro doesn't show anything
-
trunk/www/macros/macro_roundtimer.php (Diff revision 1) -
Add a parameter to limit the maximum number of units to display (for example only print "3 days" instead of "3 days, 7 hours, 3 minutes, 5 seconds).
-
trunk/www/macros/macro_roundtimer.php (Diff revision 1) -
What if we have more than one timer on a page?
-
trunk/www/macros/macro_roundtimer.php (Diff revision 1) -
You should specify a format that javascript will surely understand. Something like YYYY-MM-DD HH:MM:SS (look in php manual for actual format).
Review request changed
Change Summary:
Now you can add multiple timers, as long as they are for different rounds (hope this is ok). You can specify two more arguments, 'units' and 'show_message'. The first one is the maximum number of time units (days, hours, minutes, seconds) to display. The second one is whether or not you want to display a message after the timer to specify if it counts down to the start or end of the round.
Diff: |
Revision 2 (+199) |
---|
I like :)
-
trunk/www/macros/macro_roundtimer.php (Diff revision 2) -
round-timer-
-
trunk/www/macros/macro_roundtimer.php (Diff revision 2) -
html_escape($timer_id)
-
trunk/www/macros/macro_roundtimer.php (Diff revision 2) -
newRoundTimer
-
trunk/www/macros/macro_roundtimer.php (Diff revision 2) -
html_escape() everything here.