Download
Jock Rotator v2.5.0 (2.63 kB, 12 hits)
Jock Rotator v1.7.1 (2.99 kB, 1288 hits)
Jock Rotator v1.6 (1.63 kB, 1626 hits)
Jock Rotator v1.5 (1.53 kB, 6746 hits)
Instructions
Step 1. Upload to Joomla using the Extension Manager
Step 2. Open “mod_jock.php” with any HTML editor
Step 3. Edit the HTML according to the time your jocks are on the air
Step 4. Save and Upload into /your-site/modules/mod_jock/
Change Log
Version 2.5.0 – February 21st, 2012
- Added Joomla 2.5 native compatibly
- Cleaned up code and comments
Version 1.7.1 – November 16th, 2011
- Disabled caching
- Added Module Suffix
- Added ability to use minutes
Version 1.7 – August 30th, 2011
- Added Joomla 1.7 native compatibly
Version 1.6 – March 6th, 2010
- Added Joomla 1.6 native compatibly
Version 1.5 – February 8th, 2010
- Removed CSS
- Added Joomla 1.5 native compatibly
- Cleaned up code
Version 1.4 – January 12th, 2009
- Added “Set Default Timezone” functionality (PHP 5.1+ ONLY)
Version 1.3 – January 9th, 2009
- Cleaned up code
- Added more comments for easier installation instructions
Contribute
You can now contribute to the code at Github
Example Usage
Actual Working Code from http://700thefarm.com











Greg, like your profile (Believer). Looking to use your extension in creating a new Joomla site for WJSA radio in Jersey Shore, PA. I was wondering if the extension has been tested yet under Joomla v2.5?
This is how much I use Joomla: I had no idea 2.5 was out, much less v2.5.1. :)
I will test this over the weekend and have something by Monday(ish)
Greg, any luck?
Tested, and the module has been updated to version 2.5.0.
Thanks Greg. This is one item I know we will use. Have a blessed day!
I got the module to function however, it’s not changing – even when I refresh. Any ideas?
Contact me and I’ll send you a copy of the altered script.
Nevermind! Tess’ fix worked.
Change:
$x = date(“G”); to $x = date(“Gi”);
hi greg i just installed your mod-jock on joomla 1.7 i got every thing working just fine but it dont refresh its self i have to refresh the page i have turnd all cache of in globle and in cache pluging but still doesnt refresh what do you think this could be thanks
I’ve updated the module to version 1.7.1 which disables caching.
How do we add a module suffix to the 1.7 module?
I just updated the module to version 1.7.1 which adds Module Suffix.
I must be doing something wrong because I can’t get anything to show up in the module. I’ve checked my php file many times so I must be missing something. Can someone please help.. just spent an hour or so altering the file to my stations schedule so I would like for that work to not be in vain. Please help! You can contact me through my website’s Contact Us link on the left side of the page. I will send you a copy of my code or whatever you need. Thanks so much!
To clarify – The module is enabled but blank. I’ll leave it up so you can see. It’s called Jock Rotator.
Hi Greg,
I’m having the same trouble that a few others are having. No matter what configuration I use, I can’t seem to get the module to change over on the half hour.
My code is for the first airshift of the day:
if ($x < 530 ) { echo '
With the half hour time in place, the module seems to "lock" on that shift and won't change at any time.
I'm running PHP 5.2.x and Joomla's cache is turned off. Can you offer some help or even a complete working module featuring the half hour or alternative time examples? In other words, not just the line in question, but the entire PHP file that you've tested as working which includes times such as 530 etc.
Thanks in advance.
Kerry
Hi Kerry
We’ve got it working our side!
Change:
$x = date(“G”); to $x = date(“Gi”);
So then every hour needs to be hour (without leading 0) and minutes
e.g 7:30 am becomes 730
and 3:45 pm becomes 1545
:)
Tess
Thanks Tess. Strangely, that doesn’t seem to have fixed my problem, even though the server is running a PHP version higher than the minimum.
It might just be a cached session, so I’ll try again in the morning to see if anything has changed.
Thanks again for your help.
Kerry
Hi Kerry!
So strange that it’s not working your side.. did it come right?
Yes it has come good Tess, but it took a LOT more work to get it there (partly because I needed to update the code on ten different websites). For anyone who’s interested, here’s what it took to provide ‘supreme control’ over the shift changes:
Change $x = date(“G”); to $x = date(“Hi”);
The H is for 2 digit 24 hour time, eg, 00-23
The i is for 2 digit minutes, eg, 00-59
Then you need to change ALL of your times to have 4 digits, eg, 0600 for 6am, or 2130 for 9.30pm.
The beauty of using 4 digit 24 hour time is that you can fine-grain your shift changes to any time combination you choose, and it will work. Eg, 1117 or 2342, they’ll all work properly.
But here’s the big one to remember. If you have a shift change at midnight, the time needs to be entered as 0000, NOT as 2400 as suggested by Greg’s example code, as 24 and 2400 are non-existant time intervals on a 24 hour clock.
I hope that helps someone, in particular Greg, the author of this otherwise excellent module.
Kerry – I’ve updated this module to version 1.7.1 using your code for minutes and advice regarding 0000. Thank you!
Thanks for this awesome little extension! We’ve been using it on our radio station for over a year now with not one day’s hassle. We’re upgrading to Joomla 1.7 soon. Any plans for an upgraded release of Jock Rotator anytime soon?
Done! v1.7 is ready for you to download…
WOW!!!! Thanks :)
Mod works fine… does exactly what i want – however it will not handle minutes…
elseif ($x < 330 ) { echo '
it works fine with single digits and hours….
elseif ($x < 3 ) { echo '
next change
elseif ($x < 4 ) { echo '
the above works fine….
but it will not work if I try anything longer than single digits…. what am I missing?
What is the code for saturday or sunday ” case “6″ and Case “7″ ” ?
Click on View code (mod_jock.php) example above, in the public paste section look for: “Sam-rotate jocks 24hrs”.
‘; }
break;
case “6″: //Saturday
//—————————— Saturday Overnights 6AM-12PM —————————
if ($i==”6″ && $x==”6″ ) { echo ‘
AUTO DJ MIX 6AM-12PM EST
‘; }
//—————————– Saturday Mornings 6AM-12PM ——————————
elseif ($i==”6″ && $x==”7″ ) { echo ‘
AUTO DJ MIX 6AM-12PM EST
‘; }
Saturday is 6 and Sunday is 0
Great module. Got it to display as per our schedule, different shows on some days/weekends. Except for one thing, it seems to ignore half hour e.g. (1030, 2330).
If anyone knows how to fix this please send me an email, if you want a copy of the code I used send me an email, you’ll find my email on our website contact page click on the tech support link.
Edit: It also refuses to update automatically have to refresh the page each hour to change jock. Joomla cache is turned off already. Any ideas, on this issue?
Very helpful module for me! Works like a charm on our website. Would love a backend schedule planner though! Easier to change the program if dj’s swap shows for example…
Please send me a copy of a example to edit my mod_jock.php please.
I’ve posted the example above (http://gregrickaby.com/2009/01/jock-rotator-for-joomla.html#example)
Hello Greg,
This module is awesome! I have managed to get it to display a different show for every day of the week and at unusual start and end times too. If anyone wants my copy to help them, just let me know.
Thanks Greg.
Hey bro can you email me your copy please, having trouble with the different shows on different days.
Thanks
Cesario Camacho: I hope it’s not too late but I’d love to have a copy of your verison. I did a version as well but for some reason, the noon to 5pm show displays at 11am therefore through off the whole thing + the auto refresh doesn’t seem to work the page has to be reloaded or refresh in other for the jock info to change. My Joomla cache is turned “Off”.
Hi,
Great module. Look’s brilliant on the site :)
Just got a few questions….
On the demonstation site newstalk there is links to facebook pages and stuff. How can I add that?
Also is it possible to turn the information into a full schedule page? If so any tips on how to?
Thanks again :)
I’m running WordPress, but the PHP is syntax remains the same. You can throw ANY HTML you want inbetween the echo’ and ‘;}:
http://pastebin.com/UtDD56xD
How about’s would I get Jock Rotator working on WordPress?
Greg, is it possible to have your core day time shows Mon-Fri say 7am – 7pm and then have break exceptions for the night time schedule and the weekends. I have been trying to do this without much success.
I’m trying to code it efficiently!!
Sure is: http://pastebin.com/CswYguEQ
Great Module, I have this working perfectly on our site at: http://www.stompradio.com the only problem is some listeners will have their browsers open for hours at a time and they wont see the current Jock unless they refresh, is there any way to force a refresh each time the Jock changes?
Your Joomla cache must be turned on. Try turning it off.
Hi First of all that module is great. The only problem I have is that the DJ does not display correctly. For example I have a dj that start at 10:30 but although 10:30 passes by it will not change the name.
this is the code I am using :
elseif ($x < 10.30 ) { echo '
DJ Name
elseif ($x < 1030 ) { echo ‘
Hi Greg, I’m trying out the jock rotator and it works awesome changes just like it’s setup to do .. I have one problem though that maybe you could help me with, I get this “a “tag that auto nest in all my other modules, all my links seem to point to /listenlive:
it seems to be related to the jock rotator i think, do you have any tips ?
Blessings !
Update: after I removed the links from the mod_jock.php the problem seems solved, I no longer have the /listenlive automatically getting in all my divs.
Greg have you heard of this problem before ?
Danny did you get the images to show? That is one part that is not working for me. If so, any tips?
Hi, Yes the images work for me.
I pointed the images like this in the .php file:
/images/Template001/onAir/onAir01.png
Check if you filled the region/country part well.
This Jock rotator is pretty straight forwards it almost work out of the box you just have to adjust the pictures and timezone and it should work immediately
Hey, you make mistake. You must put ”images/….” , without first ”/”….
Greg,
your modules is exactly what I was looking for. Thank you for taking the time to create it. I do have one question. According to the PHP file it is looking for dj images in a specific directory. I copied the image and edited the php to point to that directory for the specific DJ playing at that time. But only the name shows up, no image. Is there something more I have to do to make the image show? Below is the line from the PHP. I have verified directory and file name.
DJ Ferret
Thanks in advance
Orion
We need to add shows that end at 13:30 PM . We put the above string but mod jock shows wrong image…. how can we do that?
//——————————- Ya es mediodia —————————–
elseif ($x < 1330 ) { echo '
‘; }
hi, this might be a noob question, but where do you save the images for the diff presenters?
Anywhere you want. Use the Joomla media up-loader, and link the images to the directory where you uploaded the images too.
Do you have one that can be use in dreamweaver?
HI I was wondering if I could mask the url so people have to register to listen to my radio??
Hi
Great job,
I was wondering can i get a template like V935 to build a radio station site?
I just bought that from TemplatePlazza.com and made a few minor modifications. That site is actually about to get “blown up” as we move them over to WordPress.
which one did you purchase?
hi is there3 a way to do 2 hour intervals of shows for every day instead of the mormal set schedual like you have it set at mon-friday i have a dj line up that is 2 hours shifts and the djs ponly work lie 2 maybe 3 days a week please help me
Yes. Just change the times. This plug-in is nothing but a bunch of Conditional PHP (if/else) Statements.
Hey greg great plug in it works great
My question is i have a different DJ line up every day of the week how would i go about doing this? and also i have my DJs only do a 2 hour show at a time how would i change this as well?
Is there a way to do it? if so please get back to me as soon as possible!
DJ Shad
djshad@rocketmail.com
Wicked-DJ Owner
Hey Greg
Can you please send me a sample file of the module. I’m so looking forward to using the module, It’s a community radio station project.
The sample script is in the ‘Examples’ section above. Or just click here.
The time function works great but I am having trouble getting it to move through the days. It just loops on Monday (the first set if if/else statements). Any ideas? Anybody have this same problem? Thanks!
Greg G | greg@plant802.com
Great Module…. Thanx again.
can anyone post a working example using time and date for seperate shows? I am completly lost in php, but this is exactly what i have been looking for, if i can get it working
i have everything set, but i cannot get the day function to work, please advise as to what the day and time function should look like. Thank you to whoever can answer this question
Hi Greg, Thanks for a very great job doen on this module. Something baffles me though. I install the module last night and already set the timezone in the .php file. When I returened tonight to continue working on it, I just couldn’t find the module again in my module manager.. I’m just wondering what I may have doen wrong. Thank you.
I have posted an example of a working script above under “Examples”. Hope this helps.
Hi..I’m experiencing the same problem with the menu font sizechanging when the module is enabled. However the solution says “Check the .css in mod_jock.php It appears it’s interfearing with your templates .a tags”
But there’s no reference to.css in mod_jock 1.4, and
What are we checking for?
What do we do once we find it?
Cheers
Alfie, I just released v1.5. See above to download.
This module is awesome! I have managed to get it to display a different show for every day of the week and at unusual start and end times too. If anyone wants my copy to help them, just let me know. Thanks Greg, nice work.
Hi Howick,
I would love a copy if you could email me 1 thank you (cllive@gmail.com)
Howick
I too would greatly appreciate if you could send me a copy to sample from
(dougburgess@metalassaultradio.com)
Thanks in advance
Hi Howick,
can you please send me it too?
thanks,
regards
I need a copy too thanks. :) Heather@precisionedgedesign.com
Can you please send me a copy with the day of week display to (Heather@precisionedgedesign.com)
Howick I would love a copy too, that is exactly what I am about to try and do. deamon@y7mail.com
If its not to late, I’d like to have a copy of it too!
voiceofjackets@gmail.com
Thanks,
Brian
hey can i get a copy of that also please!
hey can i get a copy please treii@hotmail.com
I’ve posted the example above: (http://gregrickaby.com/2009/01/jock-rotator-for-joomla.html#example)
great job Greg!
great job Greg!
Is there anyway of showing a different show for each weeknight?
Hello
When i want only day by day how can i do that.
Ervery dj has his ons show on a day and time..
I tried everything but i cant get ik working…
How would you make it so a different show would display for each night during the weekday?
I have installed the module on Joomla 1.5.8, and all I get is a completely white blank page. I have checked I have installed the correct PHP version, any idea’s as this is a script I have been looking for for ages, and from the example is a fantastic script.
Gary – I will look into this.
many thanks :)
If needed I can send the file I have uploaded for you to look at.
I have checked as soon as I have disabled this module, the site functions properly again, weird.
The module shows as incompatible when I look in the modules section of the Extension Manager. I have Legacy support enabled so it should work.
This looks pretty awesome. Do you plan on making a version of this one for WordPress?
How can i get a template like V935 to build a radio station site, or can you help.
And how do you change it if everyday has a different lineup? How do I expand the code?
Hi,
This is a great script but I was wondering if you happened to have a version with a full back-end version so that the script can be edited within Joomla. EG, items can be selected with text boxes – so that idiots can use it basically?
Thanks
Unfortunetly I do not. I wish I had more time to devote to the script! Between all my freelancing and contract engineering work I’m swamped! If you need help lemme know and I’d be happy to answer any questions.
Easy Breezy!
if ($x < 5:30 ) { print"
Meridian's Best Variety
VPOD
Make A Request
"; }
//------------------------------- Weekday Mornings 6a-10a -----------------------------
elseif ($x < 6:45 ) { print"
Breakfast Club
Mornings 5a - 10a
Make A Request
"; }
Parse error: syntax error, unexpected ‘:’
//——————————- Weekday Mornings 6a-10a —————————–
elseif ($x < 6:45 ) { print”
Breakfast Club
Mornings 5a – 10a
Make A Request
“; }
Try removing the colon and just use 530 and 645
Hi!
How to display a program that starts the 5:30 am and goes until 6:45 am? I would like to present an example using the time in minutes. Can you help me?
Thanks
this module seems to make my menus text smaller.
what can be done?
Check the .css in mod_jock.php It appears it’s interfearing with your templates .a tags
Thanks..that did the trick
Greg! Thank you so much for your help, I hadn’t checked back in a bit, but you are a lifesaver!! thanks again :)
Does this script work with a frontpage/ dreamweaver site as I need somthing like this on my website I’m building but have not got a clue how this script works lol
@MARKY
Yes, this could be run from any .PHP page using any WSYIWYG editor (aka Dreamweaver). Simply download v1.4, extract and open mod_jock.php and edit as you see fit. After all, I did! :)
Hello again, I’m using firefox and everithing is ok, but i see now in Explorer a porblem with your mod.
If this mod is activ, the web is down.
can help me??
my msn is lacienfm@hotmail.com i’m is online every day.
tnks!!
is it possible to plug this into a standard html page? And if I wanted to add days of the week, would I just edit like this:
if ($i=1, $x < 6 ) ?
John,
The script is using a ‘case statement’ which requires .php or .asp…let me know if you are still interested.
definately, I’d love to use this either as a .php or in wordpress. I run a sight using wordpress and another with joomla.
sorry my english, i’m argentine.
I can not make it work properly.
What would be the Argenta ID? AR, [AR], another?
Adrian,
Thank you for your interest as well. The codes are located at this website: http://unicode.org/cldr/data/diff/supplemental/territory_containment_un_m_49.html
Scroll down to South America, and then you will see Argentina. When you locate Argentina find the city closest to you. For example: If Buenos Aries was closest the code would be:
date_default_timezone_set(‘America/Buenos_Aires’);
I hope this helps!!
Thank you very much for your help, but where is “date_default_timezone_set? in mod_jock.php, mod_jock.xml, my template index?
sorry for my questions but I am interested that the module works perfectly, it is very interesting for several functions.
Thank you!!!
Download v1.4 and you’ll see it in mod_jock.php
can see work properly at http://lacienfm.com “En el aire ahora”
Really thank you !!
hey greg thanks so much for this module! for some reason (maybe i messed up the php, i dunno much about it) but its 12:55 my time and it’s displaying the 5-530am program. can you help?! thanks!
Amy,
Thank you for the compliment and great question!
The script runs based on the time of your web server. Is your web server using PHP5?