Radio Station Jock/DJ Roator - ON AIR NOW Module
Moderator: General Support Moderators
Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.
-
- Joomla! Apprentice
- Posts: 14
- Joined: Wed Oct 11, 2006 6:06 pm
- Location: Dothan AL
- Contact:
Radio Station Jock/DJ Roator - ON AIR NOW Module
FOR ALL YOU RADIO STATION WEBMASTERS...
I've developed a very RAW "On Air Now" module to get your DJ's to rotate on your site according to the time they are on.
I'm using this on two sites, and will be rolling it out on 8 more.
Instructions are in the readme.txt
I've developed a very RAW "On Air Now" module to get your DJ's to rotate on your site according to the time they are on.
I'm using this on two sites, and will be rolling it out on 8 more.
Instructions are in the readme.txt
You do not have the required permissions to view the files attached to this post.
-
- Joomla! Apprentice
- Posts: 6
- Joined: Mon Jul 16, 2007 3:37 am
Re: Radio Station Jock/DJ Roator - ON AIR NOW Module
Hey Dude!! This is perfect!! Just what I was looking for, thanks!
One caveat: you have overnights listed last, with an "elseif $x <5" - I found this to be ineffective, since the first time period - morning drive, starts the loop w "if $x <9". Since any number less than 5 is ALSO less than 9, they match out first and my morning guy has to Jock all night long - the condition for overnight is never met. I solved this by simply moving overnight into the first "if" position and changing morning drive to "elseif" like the rest.
Other than that one quirk, as I say, this is JUST what I needed - Thanks again!!!
SC
One caveat: you have overnights listed last, with an "elseif $x <5" - I found this to be ineffective, since the first time period - morning drive, starts the loop w "if $x <9". Since any number less than 5 is ALSO less than 9, they match out first and my morning guy has to Jock all night long - the condition for overnight is never met. I solved this by simply moving overnight into the first "if" position and changing morning drive to "elseif" like the rest.
Other than that one quirk, as I say, this is JUST what I needed - Thanks again!!!
SC
-
- Joomla! Apprentice
- Posts: 14
- Joined: Wed Oct 11, 2006 6:06 pm
- Location: Dothan AL
- Contact:
Re: Radio Station Jock/DJ Roator - ON AIR NOW Module
SC,
I'm thrilled it worked out well for you. If don't mind, re-post your revised script!
-GREG
I'm thrilled it worked out well for you. If don't mind, re-post your revised script!
-GREG
-
- Joomla! Apprentice
- Posts: 6
- Joined: Mon Jul 16, 2007 3:37 am
Re: Radio Station Jock/DJ Roator - ON AIR NOW Module
Sure - here it is - again, all I did was move 'Overnights' to the top 'if' position, and then change 'Mornings' from 'if' to 'elseif'. Oh, I also removed the hyperlinks cause I didn't need them, but I may put them back later...
Thanks again!!
SC
There you go! Another thing I found out the hard way - be sure to check the time on your hosting server!!! In my case, our hosting provider was in another time zone, so that was messing me up, too. I threw a quick "echo $x;" at it, so it would just print the number, then once I knew how far offf I was, made my adjustments accordingly.
"; }
//-------------------------------------------------------------------------------------------
//Mornings - This is a simple php print script with a table inside. Edit the table to meet your needs.
elseif ($x
"; }
//--------------------------------------------------------------------------------------------
//Middays
elseif ($x
"; }
//-------------------------------------------------------------------------------------------
//Afternoons
elseif ($x
"; }
//-------------------------------------------------------------------------------------------
//NASCAR
elseif ($x
"; }
//-------------------------------------------------------------------------------------------
//Nights
elseif ($x
"; }
break;
//-------------------------------------------------------------------------------------------
//Weekend Script
case "6": //Saturday
case "0": //Sunday
{ print"
"; }
break;
}
?>
Thanks again!!
SC
- brianpeat
- Joomla! Apprentice
- Posts: 27
- Joined: Tue Jul 10, 2007 3:04 pm
- Location: Hendersonville, TN, USA
- Contact:
Re: Radio Station Jock/DJ Roator - ON AIR NOW Module
This is a live saver...but my only problem with it, can it do half hour spots? I'm going to test it using :30 after the hour number, but I suspect that might not work.
- brianpeat
- Joomla! Apprentice
- Posts: 27
- Joined: Tue Jul 10, 2007 3:04 pm
- Location: Hendersonville, TN, USA
- Contact:
Re: Radio Station Jock/DJ Roator - ON AIR NOW Module
Okay, I edited this line:
$x = date("G"); // This equals the 24-hour format of an hour without leading zeros
and made it
$x = date("Hi"); // This equals the 24-hour format of an hour without leading zeros
and then I used a format like 0330 to mean 3:30 am. I think it's working because I don't get any php errors (I did when I tried to use a time format with a : as the separator). I'm still trying to figure out how to get time into the weekend portion, but if it's something that your mod can do, I'm sure I'll figure it out.
thanks for a great mod, this is exactly what my site needed.
EDIT: SUCCESS! I some how missed stand alone IF statement in the first thread of each day or section. The weekend stuff works fine now.
$x = date("G"); // This equals the 24-hour format of an hour without leading zeros
and made it
$x = date("Hi"); // This equals the 24-hour format of an hour without leading zeros
and then I used a format like 0330 to mean 3:30 am. I think it's working because I don't get any php errors (I did when I tried to use a time format with a : as the separator). I'm still trying to figure out how to get time into the weekend portion, but if it's something that your mod can do, I'm sure I'll figure it out.
thanks for a great mod, this is exactly what my site needed.
EDIT: SUCCESS! I some how missed stand alone IF statement in the first thread of each day or section. The weekend stuff works fine now.
Last edited by brianpeat on Sat Sep 01, 2007 2:08 pm, edited 1 time in total.
-
- Joomla! Apprentice
- Posts: 14
- Joined: Wed Oct 11, 2006 6:06 pm
- Location: Dothan AL
- Contact:
Re: Radio Station Jock/DJ Roator - ON AIR NOW Module
Dude...glad you got it figured out. As I mentioned in my first post it was very "raw". I'm really not much of a PHP programmer, but I knew that if I posted what I had others would run with it.
The time-zone issue has bitten me too. One of my stations host is in California and they are on the east coast! Oops!
Glad it's working out well for you.
Open-Source Forever
-GREG
The time-zone issue has bitten me too. One of my stations host is in California and they are on the east coast! Oops!
Glad it's working out well for you.
Open-Source Forever
-GREG
-
- Joomla! Intern
- Posts: 80
- Joined: Mon Jun 09, 2008 6:14 pm
Re: Radio Station Jock/DJ Roator - ON AIR NOW Module
I've been looking for this forever. Do you have it compatible with j1.5?
I tried to install it and it tells me :
XML Parsing Error at 6:43. Error 4: not well-formed (invalid token)
Module Install: No module file specified
I tried to install it and it tells me :
XML Parsing Error at 6:43. Error 4: not well-formed (invalid token)
Module Install: No module file specified
-
- Joomla! Apprentice
- Posts: 14
- Joined: Wed Oct 11, 2006 6:06 pm
- Location: Dothan AL
- Contact:
Re: Radio Station Jock/DJ Roator - ON AIR NOW Module
I've got it installed on a 1.5.8 and working correctly: see: www.v935.com
You can download the latest version here: http://gregrickaby.com/jock-rotator-for-joomla.html
Please let me know if it works or not!
You can download the latest version here: http://gregrickaby.com/jock-rotator-for-joomla.html
Please let me know if it works or not!
-
- Joomla! Intern
- Posts: 80
- Joined: Mon Jun 09, 2008 6:14 pm
Re: Radio Station Jock/DJ Roator - ON AIR NOW Module
Wonderful, thats great news, thanx for your hard work, I'll try it out right away!
-
- Joomla! Fledgling
- Posts: 1
- Joined: Fri Jul 31, 2009 7:00 pm
Re: Radio Station Jock/DJ Roator - ON AIR NOW Module
Its a great module
But is it possible to make form weekdays
a monday
tuesday
etc etc
and how can we do that
But is it possible to make form weekdays
a monday
tuesday
etc etc
and how can we do that
-
- Joomla! Fledgling
- Posts: 1
- Joined: Mon Nov 09, 2009 12:39 pm
Re: Radio Station Jock/DJ Roator - ON AIR NOW Module
Hello there first of all this looks brilliant its just what i need fo my website im just a bit stuck and any help very much apreciated.
Ok so the way i will need it to work is each dj has a 2 hour spot through the days but need to beable to change every day not just weekday mornings afternoons and evening i need
e.g
monday 8 dj xxx monday 10 dj gss monday 12 djpp and every 2hours then auto into
Tuesday 8 dj ste tuesday 10 djk e.t.c
throughout the week can any 1 help please
Ok so the way i will need it to work is each dj has a 2 hour spot through the days but need to beable to change every day not just weekday mornings afternoons and evening i need
e.g
monday 8 dj xxx monday 10 dj gss monday 12 djpp and every 2hours then auto into
Tuesday 8 dj ste tuesday 10 djk e.t.c
throughout the week can any 1 help please
-
- Joomla! Fledgling
- Posts: 3
- Joined: Fri Nov 19, 2010 4:26 pm
- Contact:
Re: Radio Station Jock/DJ Roator - ON AIR NOW Module
Hi,
Where can I find a good Radio Talk Show Host template?
Where can I find a good Radio Talk Show Host template?
-
- Joomla! Intern
- Posts: 60
- Joined: Fri Oct 29, 2010 6:53 pm
Re: Radio Station Jock/DJ Roator - ON AIR NOW Module
Hello Guys,
Am trying to install this module in My Joomla 1.5 with legacy mode on, bit it shows following error.
"Module Install: No module file specified"
Please suggest
Am trying to install this module in My Joomla 1.5 with legacy mode on, bit it shows following error.
"Module Install: No module file specified"
Please suggest
-
- Joomla! Fledgling
- Posts: 1
- Joined: Wed Jul 06, 2011 1:24 pm
Re: Radio Station Jock/DJ Roator - ON AIR NOW Module
Help XML Parsing Error at 6:43. Error 4: not well-formed (invalid token)
Module Install: No module file specified with plugin legacy enabled
Module Install: No module file specified with plugin legacy enabled
-
- Joomla! Fledgling
- Posts: 1
- Joined: Fri Jan 08, 2016 11:09 pm
Re: Radio Station Jock/DJ Roator - ON AIR NOW Module
please help with my script i want my djs to do mondays tuesdays ect
so that it fits around our schedule?
<?php
/**
* File mod_jock.php
*
* This file builds the Jock Rotator. The Jock Rotator is nothing more than a PHP switch satement.
* It reads your server's time/date and asks: "Is it before 10:00am? Yes? Then display this jock."
*
* @version 3.0.2
* @author Greg Rickaby <[email protected]>
* @copyright Copyright (c) 2013
* @license http://opensource.org/licenses/gpl-2.0.php GNU Public License
* @link http://gregrickaby.com/jock-rotator-for-joomla
* @alter 2013.07.04
*
*/
defined( '_JEXEC' ) or die( 'Direct Access to this location is not allowed.' );
/**
* Force Time Zone
*
* This forces Jock Rotator to ignore the server Time Zone (which is usually GMT) and allows you to specify your own.
* To find your timezone visit: http://unicode.org/cldr/data/diff/suppl ... _m_49.html
*
* @author Greg Rickaby
* @since 1.4
* @requires PHP 5.1+
*/
date_default_timezone_set( 'America/Chicago' );
/**
* Jock Rotator Function
*
* This executes the jock rotator.You can place this function anywhere in your template and
* the Jock Rotator will appear.
*
* @author Greg Rickaby
* @since 3.1
*/
jock_rotator();
/**
* Time switching
*
* TO CUSTOMIZE: edit the HTML in each respective time-slot below.
*
* @author Greg Rickaby
* @since 1.0
*/
function jock_rotator() {
$i = date( 'w' );
$x = date( 'Hi' );
switch ( $i ) {
// Weekday Script
case "1": //Monday
case "2": //Tuesday
case "3": //Wednesday
case "4": //Thursday
case "5": //Friday
//------------------------------- Weekday Overnights 12a-6a ---------------------------
if ( $x < 600 ) { echo '
<a href="jock-page.html">Jock Name<br /><img src="/images/jock_pics/jock.jpg"></a>
'; }
//------------------------------- Weekday Mornings 6a-10a -----------------------------
elseif ( $x < 1000 ) { echo '
<a href="jock-page.html">Jock Name<br /><img src="/images/jock_pics/jock.jpg"></a>
'; }
//------------------------------ Weekday Middays 10a-3p ------------------------------
elseif ( $x < 1500 ) { echo '
<a href="jock-page.html">Jock Name<br /><img src="/images/jock_pics/jock.jpg"></a>
'; }
//------------------------------- Weekday Afternoons 3p-7p ----------------------------
elseif ( $x < 1900 ) { echo '
<a href="jock-page.html">Jock Name<br /><img src="/images/jock_pics/jock.jpg"></a>
'; }
//------------------------------- Weekday Nights 7p-11:59p ----------------------------
elseif ( $x < 2359 ) { echo '
<a href="jock-page.html">Jock Name<br /><img src="/images/jock_pics/jock.jpg"></a>
'; }
break;
####################################### Saturday ######################################
case "6":
//------------------------------ Saturday Overnights 12a-6a ---------------------------
if ( $x < 600 ) { echo '
<a href="jock-page.html">Jock Name<br /><img src="/images/jock_pics/jock.jpg"></a>
'; }
//----------------------------- Saturday Mornings 6a-10a ------------------------------
elseif ( $x < 1000 ) { echo '
<a href="jock-page.html">Jock Name<br /><img src="/images/jock_pics/jock.jpg"></a>
'; }
//------------------------------- Saturday Middays 10a-3p -----------------------------
elseif ( $x < 1500 ) { echo '
<a href="jock-page.html">Jock Name<br /><img src="/images/jock_pics/jock.jpg"></a>
'; }
//-------------------------------- Saturday Afternoons 3p-7p --------------------------
elseif ( $x < 1900 ) { echo '
<a href="jock-page.html">Jock Name<br /><img src="/images/jock_pics/jock.jpg"></a>
'; }
//-------------------------------- Saturday Nights 7p-11:59p---------------------------
elseif ( $x < 2359 ) { echo '
<a href="jock-page.html">Jock Name<br /><img src="/images/jock_pics/jock.jpg"></a>
'; }
break;
########################################## Sunday ######################################
case "0":
//------------------------- Sunday Overnights 12a-6a-------------------------------------
if ( $x < 600 ) { echo '
<a href="jock-page.html">Jock Name<br /><img src="/images/jock_pics/jock.jpg"></a>
'; }
//-------------------------- Sunday Mornings 6a-10a---------------------------------------
elseif ( $x < 1000 ) { echo '
<a href="jock-page.html">Jock Name<br /><img src="/images/jock_pics/jock.jpg"></a>
'; }
//-------------------------- Sunday Middays 10a-3p ----------------------------------------
elseif ( $x < 1500 ) { echo '
<a href="jock-page.html">Jock Name<br /><img src="/images/jock_pics/jock.jpg"></a>
'; }
//------------------------- Sunday Afternoons 3p-7p ---------------------------------------
elseif ( $x < 1900 ) { echo '
<a href="jock-page.html">Jock Name<br /><img src="/images/jock_pics/jock.jpg"></a>
'; }
//-------------------------- Sunday Nights 7p-11:59p ----------------------------------------
elseif ( $x < 2359 ) { echo '
<a href="jock-page.html">Jock Name<br /><img src="/images/jock_pics/jock.jpg"></a>
'; }
// end switch
}
// end jock_rotator()
}
?>
check our schedule for info
http://urban-radio.co.uk/schedule
so that it fits around our schedule?
<?php
/**
* File mod_jock.php
*
* This file builds the Jock Rotator. The Jock Rotator is nothing more than a PHP switch satement.
* It reads your server's time/date and asks: "Is it before 10:00am? Yes? Then display this jock."
*
* @version 3.0.2
* @author Greg Rickaby <[email protected]>
* @copyright Copyright (c) 2013
* @license http://opensource.org/licenses/gpl-2.0.php GNU Public License
* @link http://gregrickaby.com/jock-rotator-for-joomla
* @alter 2013.07.04
*
*/
defined( '_JEXEC' ) or die( 'Direct Access to this location is not allowed.' );
/**
* Force Time Zone
*
* This forces Jock Rotator to ignore the server Time Zone (which is usually GMT) and allows you to specify your own.
* To find your timezone visit: http://unicode.org/cldr/data/diff/suppl ... _m_49.html
*
* @author Greg Rickaby
* @since 1.4
* @requires PHP 5.1+
*/
date_default_timezone_set( 'America/Chicago' );
/**
* Jock Rotator Function
*
* This executes the jock rotator.You can place this function anywhere in your template and
* the Jock Rotator will appear.
*
* @author Greg Rickaby
* @since 3.1
*/
jock_rotator();
/**
* Time switching
*
* TO CUSTOMIZE: edit the HTML in each respective time-slot below.
*
* @author Greg Rickaby
* @since 1.0
*/
function jock_rotator() {
$i = date( 'w' );
$x = date( 'Hi' );
switch ( $i ) {
// Weekday Script
case "1": //Monday
case "2": //Tuesday
case "3": //Wednesday
case "4": //Thursday
case "5": //Friday
//------------------------------- Weekday Overnights 12a-6a ---------------------------
if ( $x < 600 ) { echo '
<a href="jock-page.html">Jock Name<br /><img src="/images/jock_pics/jock.jpg"></a>
'; }
//------------------------------- Weekday Mornings 6a-10a -----------------------------
elseif ( $x < 1000 ) { echo '
<a href="jock-page.html">Jock Name<br /><img src="/images/jock_pics/jock.jpg"></a>
'; }
//------------------------------ Weekday Middays 10a-3p ------------------------------
elseif ( $x < 1500 ) { echo '
<a href="jock-page.html">Jock Name<br /><img src="/images/jock_pics/jock.jpg"></a>
'; }
//------------------------------- Weekday Afternoons 3p-7p ----------------------------
elseif ( $x < 1900 ) { echo '
<a href="jock-page.html">Jock Name<br /><img src="/images/jock_pics/jock.jpg"></a>
'; }
//------------------------------- Weekday Nights 7p-11:59p ----------------------------
elseif ( $x < 2359 ) { echo '
<a href="jock-page.html">Jock Name<br /><img src="/images/jock_pics/jock.jpg"></a>
'; }
break;
####################################### Saturday ######################################
case "6":
//------------------------------ Saturday Overnights 12a-6a ---------------------------
if ( $x < 600 ) { echo '
<a href="jock-page.html">Jock Name<br /><img src="/images/jock_pics/jock.jpg"></a>
'; }
//----------------------------- Saturday Mornings 6a-10a ------------------------------
elseif ( $x < 1000 ) { echo '
<a href="jock-page.html">Jock Name<br /><img src="/images/jock_pics/jock.jpg"></a>
'; }
//------------------------------- Saturday Middays 10a-3p -----------------------------
elseif ( $x < 1500 ) { echo '
<a href="jock-page.html">Jock Name<br /><img src="/images/jock_pics/jock.jpg"></a>
'; }
//-------------------------------- Saturday Afternoons 3p-7p --------------------------
elseif ( $x < 1900 ) { echo '
<a href="jock-page.html">Jock Name<br /><img src="/images/jock_pics/jock.jpg"></a>
'; }
//-------------------------------- Saturday Nights 7p-11:59p---------------------------
elseif ( $x < 2359 ) { echo '
<a href="jock-page.html">Jock Name<br /><img src="/images/jock_pics/jock.jpg"></a>
'; }
break;
########################################## Sunday ######################################
case "0":
//------------------------- Sunday Overnights 12a-6a-------------------------------------
if ( $x < 600 ) { echo '
<a href="jock-page.html">Jock Name<br /><img src="/images/jock_pics/jock.jpg"></a>
'; }
//-------------------------- Sunday Mornings 6a-10a---------------------------------------
elseif ( $x < 1000 ) { echo '
<a href="jock-page.html">Jock Name<br /><img src="/images/jock_pics/jock.jpg"></a>
'; }
//-------------------------- Sunday Middays 10a-3p ----------------------------------------
elseif ( $x < 1500 ) { echo '
<a href="jock-page.html">Jock Name<br /><img src="/images/jock_pics/jock.jpg"></a>
'; }
//------------------------- Sunday Afternoons 3p-7p ---------------------------------------
elseif ( $x < 1900 ) { echo '
<a href="jock-page.html">Jock Name<br /><img src="/images/jock_pics/jock.jpg"></a>
'; }
//-------------------------- Sunday Nights 7p-11:59p ----------------------------------------
elseif ( $x < 2359 ) { echo '
<a href="jock-page.html">Jock Name<br /><img src="/images/jock_pics/jock.jpg"></a>
'; }
// end switch
}
// end jock_rotator()
}
?>
check our schedule for info
http://urban-radio.co.uk/schedule