Comrades in Arms Discussion Board

Full Version: Counter timer for the next coop night live on the website
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3
Hey guys,

Yakir added the timer. Here are the requirements I sent him.
What's your feedback?

I think that the 'Hours', 'Minutes' and 'Seconds' part should be separated as well so it will show "1 day 1 hour 1 minute 1 second" left.

Also, what should be the text? "Coop night starts in"?, "coop night start in"?, "coop night begin/s in"?

When the timer reaches zero it should show "coop night in progress". Maybe we want to auto-join TS if clicked?
Looks nice, but I don't like the font, it's hard to read TBH, because it looks so stretched. I'd go for something clearer.

Other than that, cool feature Smile

EDIT: I think the time is an hour off. It shows 8:53 now, but that is 21:00 my time
I'm trying to find "our" font (BankGothic) the one from our CiA symbol. Can someone help? Need the web format of it.
http://fontsgeek.com/fonts/BankGothic-Md-BT-Medium

This is TrueType, which should be compatible.
Good man. Forwarded to Yakir.
Counter temporarily removed as it was giving the wrong time unless user was in timezone CET +1.
That's a problem because he used JavaScript I presume, which runs effectively on the client side, then we get problems with timezones and wrong settings of user's system clock. I'm sure there is a solution for that in Javascript somewhere (get the time from a NTP time server), but the safest way would be using php to rely only on the server time to return the amount of seconds to the coop, and then count down from there.
Thanks rund, I'll move the topic to the public forum and notify Yakir.
(07-14-2015, 11:53 AM)rundll.exe link Wrote:but the safest way would be using php to rely only on the server time to return the amount of seconds to the coop, and then count down from there.

Should be possible to just set the timer's initial value from php, and use local time only relative.
(07-14-2015, 01:25 PM)Alwarren link Wrote:Should be possible to just set the timer's initial value from php, and use local time only relative.
What relevance does the local time have in the counter's calculation?
(07-14-2015, 03:14 PM)Variable link Wrote:What relevance does the local time have in the counter's calculation?
Well you need a timebase to count down, so using server time via php and comparing it to local time via Javascript will let you know what exactly you are counting down to.
Why is it not sufficient to count only comparing to the servers? Why is the local time needed?
(07-14-2015, 05:06 PM)Variable link Wrote:Why is it not sufficient to count only comparing to the servers? Why is the local time needed?

Well you have to have something to count on. If you just do something that waits a second and then updates the timer, that won't really work, since the javascript might not be running when the user deactivates the browser or chooses another tab. You need to have a time base.
Why not simply find customizable Wordpress plugin, it can save time. There are also solutions to do it on foot, but haven't tested any of them.
We tried that, Yakir says that the available plugins are either costly, or such that will take more effort to adapt them to our needs than to make one from scratch.
May be worth checking out, maybe use one of these plugins or reuse parts of their code.
https://www.designmaz.net/free-jquery-countdown-timer/
Pages: 1 2 3