Simple Machines Community Forum

Customizing SMF => SMF Coding Discussion => Aiheen aloitti: cy8erpunk - toukokuu 25, 2014, 11:48:42 AP

Otsikko: date and times? questions!
Kirjoitti: cy8erpunk - toukokuu 25, 2014, 11:48:42 AP
 :-\
well here i go i will try to explain this as best as possible.

what i am looking for is a date and time specific action(s) through coding whether it be html/php/java and so on.

example
on tuesday at 7pm i want a specific action to happen. like maybe play a broadcast of audio.
then at 8pm it will stop.

can anyone point me in a direction for this type of functionality?

thank you for being patient with me.
Otsikko: Re: date and times? questions!
Kirjoitti: Arantor - toukokuu 25, 2014, 11:51:47 AP
There's nothing in SMF for this, not a single thing that would directly be useful.

It would possibly be helpful if you explained exactly what you were trying to do, not give a vague example.
Otsikko: Re: date and times? questions!
Kirjoitti: cy8erpunk - toukokuu 25, 2014, 12:02:04 IP
ok so here is what i am trying to do

on my forums i want an online radio broadcast to start playing on a specific day and specific time and continue to every week. so lets say i am running my live radio show every tuesday at 7pm us eastern time, i want the player to actually start playing the audio from the show. then at 8pm us eastern time i want the player to stop. the broadcast always has something playing but i do not want the audio heard on my site till the show is live.
Otsikko: Re: date and times? questions!
Kirjoitti: Arantor - toukokuu 25, 2014, 12:08:31 IP
So where is the broadcast coming from?
Otsikko: Re: date and times? questions!
Kirjoitti: cy8erpunk - toukokuu 25, 2014, 12:09:28 IP
from this link here

http://boostradionetwork.com/player
Otsikko: Re: date and times? questions!
Kirjoitti: Arantor - toukokuu 25, 2014, 12:11:51 IP
So you want people to listen to that radio station only for a period while on your site, and not, say, on that site?

Additionally, it also limits people going around your site because the broadcast stops while people change pages...
Otsikko: Re: date and times? questions!
Kirjoitti: cy8erpunk - toukokuu 25, 2014, 12:14:46 IP
i do understand that but i want it to play throughout the forum not just main page. if this seems to be illogical i do understand. maybe someone can throw another idea at me.   :)

edit:

i think i see what you are saying with the page thing if they change pages it will stop and play again once the page loads. so they might miss out on something. i see what you meant now.

then would it be possible to show a LIVE ON AIR or OFF AIR in between said time frame?
Otsikko: Re: date and times? questions!
Kirjoitti: Arantor - toukokuu 25, 2014, 12:19:32 IP
It's still not especially easy to do that because you're dealing with server timezones and so on :( PHP can determine the current time but it's not relative to you specifically, and that could be complicated for other users.

Especially since 7pm for a user might not be the same time for you OR the server.
Otsikko: Re: date and times? questions!
Kirjoitti: cy8erpunk - toukokuu 25, 2014, 12:22:37 IP
i do understand the time zone specifics depend on server location and user locations. I guess i can always try like a flashplayer mod then and see if that works out.