Genius is nothing but great effort applied. – Awa Kenzo

Jock Rotator for Joomla

Download

Jock Rotator v2.5.0 (2.63 kB, 548 hits)

Jock Rotator v1.7.1 (2.99 kB, 1416 hits)
Jock Rotator v1.6 (1.63 kB, 1699 hits)
Jock Rotator v1.5 (1.53 kB, 6993 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.0February 21st, 2012

  • Added Joomla 2.5 native compatibly
  • Cleaned up code and comments

Version 1.7.1November 16th, 2011

  • Disabled caching
  • Added Module Suffix
  • Added ability to use minutes

Version 1.7August 30th, 2011

  • Added Joomla 1.7 native compatibly

Version 1.6March 6th, 2010

  • Added Joomla 1.6 native compatibly

Version 1.5February 8th, 2010

  • Removed CSS
  • Added Joomla 1.5 native compatibly
  • Cleaned up code

Version 1.4January 12th, 2009

  • Added “Set Default Timezone” functionality (PHP 5.1+ ONLY)

Version 1.3January 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 Rickaby runs on the Genesis Framework

Genesis Framework

The theme you're viewing is the eleven40 Child Theme, which was built on Genesis.

Genesis empowers you to quickly and easily build incredible websites with WordPress. Whether you're a novice or advanced developer, Genesis provides the secure and search-engine-optimized foundation that takes WordPress to places you never thought it could go. It's that simple - start using Genesis now!

Take advantage of the 6 default layout options, comprehensive SEO settings, rock-solid security, flexible theme options, cool custom widgets, custom design hooks, and a huge selection of child themes ("skins") that make your site look the way you want it to. With automatic theme updates and world-class support included, Genesis is the smart choice for your WordPress website or blog.

Comments

  1. 110

    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.

  2. 112
    Paul :

    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?

  3. 117
    Sam :

    For those of you wanting to use the jock rotator for sites with different shows/jocks at odd times etc. use my method below

    
    ____-------------------=-----------
      date_default_timezone_set( 'America/Chicago' );
         
        /**
         * Begin Jock Rotator
         *
         * @since 1.0
         * @author Greg Rickaby
         *
        The Jock Rotator is nothing more than a PHP Case Statement. What it does is look at the server date and time, and asks: "Is it before 10:00am? Yes? Then display this jock. etc..." Edit the HTML in each respective time-slot below to customize.
         
        $i = equals the numerical value of the day of the week
         
        Sunday = 0
        Monday = 1
        Tuesday = 2
        Wednesday = 3
        Thursday = 4
        Friday = 5
        Saturday = 6
         
        $x = equals the 24-hour format of an hour with minutes (without the leading zero). You must use 24-hour time!
         
        Examples:
        0000 = Midnight
        900 = 9:00 AM
        1200 = Noon
        1430 = 2:30 PM
        1845 = 6:45 PM
         */
        $i = date( "w" ); // day of the week
        $x = date( "Gi" ); // hour and minutes
        switch ($i) { // start the case statement
              
    case "1":  
    	if ($x < 0600 ) { echo '
         
                MORNING BLEND 6AM-12PM,  Jockname  
    		 
    		 
    		
    ';}
    
    Use 00:00 for midnight.
    
    Also the exta code for website,twitter & Facebook are not necessary if you don't use or need it.
    
    Break days like this
    
    elseif ($x < 0000 ) { echo '
    
    '; }				
    					
    break;		
     case "2":  
    	if ($x < 0600 ) { echo ' 
  4. 118

    Great module! Love freebies…however… I have been struggling now for a day on getting the image to display.

    1) I do have the image path correct;
    2) I have meddled with the module style to see if the problem is not in the module code
    3) I have the module title displaying, the DJ name and even the time – it also updates automatically when time changes

    Alas, no picture of the DJ???

    PLEASE PLEASE PLEASE help…

    As a simple example, I am using Joomla! 1.7 with template Beez_20 as a standard template and my DJ Jock module is positioned in Position-6 of the template

  5. 119
    Ricco :

    What about Daylight Savings Time. how do I work around that?

Leave a Comment

Comment Policy: Thanks for visiting my site! Comments are a permanent record of who you are and what you stand for. Your words are your own, so be nice and helpful if you can. Unhelpful, disrespectful, or spammy comments will be deleted. All comments are read and appreciated, and if you have a question, I will try to respond within a couple days.

*