View Full Version : Onair script ala sc_trans

10-05-2012, 03:22 PM
If you use sc_trans for autodj and for your dj connections, I have a script I put together a while back which will dynamically display the onair dj image. The script checks the sc_trans api to see who is onair and then uses that name to check for a .gif (you can change that to whatever filetype you like) of the same name to be displayed.

These checks are performed via ajax calls so there is no need to refresh the page to see the new onair dj. And, since the changes are based on who is actually onair, there is no need to worry about making changes to the script when new djs are added. All that is needed is to add an image for the new dj in the image file location you set in the config.php file. For my Joomla! sites, I just created a folder in the joomla backend media section. That made it even easier to add new dj images, change images, etc.

Have fun.

Download here: http://www.lunarcaster.com/stuff/onair_sctrans.tgz

Preview it here: http://www.lunarcaster.com/onair/
Or here: http://bluemoon-radio.de
or here: http://dev.lunarcaster.com

10-05-2012, 04:17 PM
Look quite good although i think it could do with being a bit wider and without the Marquee scrolling. I've downloaded it will have a play around and see what i can do.

10-05-2012, 04:30 PM
I've realised why it wont work for me as i don't have an Sc Trans to call back on. Couldn't get that part working from the SMI config files youi gave me ....

10-05-2012, 04:37 PM
Thanks. Well, I originally set it up to fit inside a module on our Joomla website. I've never been real good at design and layout. I'm more of a functions guy. People would tell me what they want, and I'd find a way to make it work. Might not look that great, but it would (normally) work lol.

10-05-2012, 04:40 PM
Oh....did you get any error codes? Do you still have SMI installed? If so, you could setup a temporary admin account in SMI for me to take a look. Maybe I can figure it out for you.

10-06-2012, 10:13 AM
I only tested your SMi on a local connection never did get round to switching it on our webserver. Now we are hosting a few streams i can't really do anything at present as it's working fine with the old SMI config.

10-06-2012, 11:00 AM
Ok. Sorry it didn't work out for you. Let me know if I can be of assistance should you decide to give it a go again.