WordPress Plugin – Radio Station

Radio Station - WordPress Plug-in
Description

This Page is for Archival Purposes Only. Development of the Radio Station Plugin has been taken over by Tony Zeoli.

Radio Station is a plugin to run a radio station’s website. It’s functionality is based on Drupal 6’s Station plugin, reworked for use in WordPress. The plugin includes the ability to associate users with “shows” (schedulable blocks of time that contain a description, and other meta information), and generate playlists associated with those shows. The plugin contains a widget to display the currently on-air DJ with a link to the DJ’s show and current playlist. A schedule of all shows can also be generated.


Downloads

WordPress Repo: http://wordpress.org/extend/plugins/radio-station/

Direct Downloads:

Final Release: Version 2.1.3 – 12/8/2015


Contributors: kionae
Donate link: http://www.nlb-creations.com/donate
Tags: dj, music, playlist, radio, scheduling
Requires at least: 3.3.1
Tested up to: 4.3.1
Stable tag: trunk


Installation

  1. Upload plugin .zip file to the /wp-content/plugins/ directory and unzip.
  2. Activate the plugin through the ‘Plugins’ menu in WordPress
  3. Give any users who need access to the plugin the role of “DJ”. Only DJ and administrator roles have administrative access.
  4. Create shows and set up shifts.
  5. Add playlists to your shows.

Tags: , , ,

268 Comments to "WordPress Plugin – Radio Station"

  1. Chris says:

    Hi Nikki, What a great plugin, everything works great and easy to use. But i do have one query – when putting the up and coming link into my page to show the next say 4 shows that are due. It seems to list the schedules of these shows (if they are on a few times a week) in alpha order rather than date – time order. I have a show which if the breakfast show on everyday of the week but now being Monday. the one that shows for tomorrow in the right place as far as the list of shows are concerned it just pulls through Firday 06:00am till 10:am rather than Tuesdays show? Have double checked to make sure that all the show times are listed and saved but seems to be happening with a few like the through the night one as well. Please advise if possible
    Many Thanks Chris

  2. Phil says:

    Great plugin Nikki! I’m so glad to have found it for our non-profit broadcast in Northern Canada.
    I’m having some trouble with the program schedule function though. Any show that is in the AM automatically jumps to Midnight +1 day position as well as the correct show time. My time and date settings are correct in WordPress, any ideas?
    Thanks in advance, and once again I can’t wait to launch our site with your plugin.

    Phil

  3. Dave says:

    Hi,

    I Love your plugin. one thing I was wondering is how do I change the link for a show so instead of going to show/dj it goes to their artist page, which is at artists/dj

    Any help would be appreciated

    • Nikki Blight says:

      You would need to change that in the plugin itself by altering the post type registration in includes/post_types.php. I don’t recommend doing it, since any updates to the plugin would overwrite your changes.

      • Dave says:

        Hi,

        This is fine I am happy to change this at each update. Could you push my in the right direction for changing this please.

        Thanks you

  4. Kim says:

    I just want to say a massive THANK YOU Nikki, this is hands down an absolute pleasure to work with. Kudos for making this plugin.

  5. Yash1331 says:

    How To Add Player In It? Can It Play Live Stream? Any Easy (very easy) Method To Configure It?

    • Nikki Blight says:

      The plugin is not intended to play or stream content. It only shows who you have on-air, and if you use the feature, what you’re playing.

  6. paul says:

    Hi Nikki love the plugin, we’re just having one small issue with the latest udate; the ‘Current Show / DJ’ widget is showing the current show’s name 16 times in a row!! I’ve checked every other part of it and it all seems to be OK, without any doubling up anywhere else… any ideas??

    • Nikki Blight says:

      Are you certain this began after the most recent update? I’m not sure how that’s possible, since none of the current show code was altered. All of the changes had to do with the upcoming show code, which never interacts with the current show code.

      Could you possibly send me a screenshot or link to your schedule so I can take a look?

      • paul says:

        Hi Nikki

        It must have just been a coincidence that it started with the latest update, and I still don’t know what happened – but I deleted that show and added it again, and now it’s just showing a single result like it should.

        Which brings up the next issue.. I need the master schedule to start at 8am and go through to midnight. Is there an easy way to remove the midnight – 8am slots from the schedule? I looked into using CSS but the table rows don’t have individual ID’s to differentiate them, so I assume I have to mess with the master schedule php file..

        thanks again! P

        • paul says:

          Wait, I found it – if anyone else needs to do this, look at line 50 of the master_schedule.php file :

          $master_list = array();
          for($i=0; $i<24; $i++) {

          ..change the 0 to, say, 7 to show 7am – midnight only.

          Also, I've found another little issue; the genre tags only seem to work with the master schedule if they are a single word- eg, 'hiphop' will work, and highlight the right shows, but 'hip hop' won't.

          • paul says:

            update: the Genre tag will work as long as it doesn’t have any spaces or certain characters, eg the & symbol. (This applies to the Name field, not the Slug..)

  7. Thanks Nikki for such a great plugin! Nikki, I’ve finished some major changes in my schedule and now the schedule shown on TuneIn radio is no longer correct. They’ve asked me to submit a spreadsheet with my new schedule. Is it possible somehow for me to generate a spreadsheet from your plugin, or any ideas short of a manual entry?

    • Nikki Blight says:

      Unfortunately, that’s not a feature at this time.

      Honestly, unless you’re proficient enough to write a custom php script to pull it from the database, manual entry may actually be the easiest way to do it.

      Though Excel is typically pretty good with data copy/pasted from websites. You might be able to get away with copying the programming grid table and pasting it into excel.

  8. Johnnie says:

    Just trying to get this widget set-up to use the show schedule portion.

    Is it possible to not display the “DJ or Genre” section of the show pages?

  9. francesco says:

    Here I am again… I cannot find where it is possible to select 24hours format… Btw I’m trying to use this plugin for a TV Scheduling not for a radio show…. 😉

  10. francesco says:

    Hello,
    if I set a show that has a beginning and an ending time both in “AM”, it is spanned to next day. I have to set “PM” as ending hour if I don’t want to see it spanned…

    eg, 7:00am to 7:30am it is alway spanned while 7:00am to 7:30pm not.

    See this screenshot:
    http://edisk.it/docs/schedule.jpg

    Is there a way to have the 24 format ALSO in back office administration?

    Regards,
    F

    BTW, I’ve found where to set 12/24 mode. I don’t know why I’ve thought it should have been placed in backoffice instead of php file

    • Nikki Blight says:

      Thanks for the bug report. This issue should be fixed in version 2.0.12.

      • Francesco says:

        I’ve just added the following condition when the script do the check in master_schedule.php at about line #119… don’t know exactly because I’ve done some changes:

        && ($time[‘time’][‘start_min’] >= $time[‘time’][‘end_min’])))

        SO NOW THE ENTIRE LINE FOR ME IS:

        //if it ends after midnight, fix it
        if( ($time[‘time’][‘start_meridian’] == ‘pm’ && $time[‘time’][‘end_meridian’] == ‘am’) ||
        (($time[‘time’][‘start_meridian’] == ‘am’) && ($time[‘time’][‘start_hour’] >= $time[‘time’][‘end_hour’])
        && ($time[‘time’][‘start_min’] >= $time[‘time’][‘end_min’]))) {

  11. Monica says:

    Great plugin!
    But I can’t understand how to edit the template page to fit with my template. Which part I have to modify in my template?

    • Nikki Blight says:

      If you look at the radio-station/templates/single-show.php file, there are HTML comment lines that read “custom show output : This portion can be edited or inserted into your own theme files” and “/custom show output”.

      Everything between those two lines is specific to the plugin. Everything outside of those lines is specific to the theme.

      Probably the easiest way to modify it is to make a copy of your theme’s single.php and rename it single-show.php. Then take the code from between the two comment lines in the plugin’s single-show.php file and use it to replace whatever happens to be in the content area of you theme’s version of the template file.

  12. byron says:

    hello
    again like every one else great job. i searched a little for this kind of solution and it seems your are a world wide first choice.

    my issue may be something i could find somewhere else, but you know your work better.
    my question is :
    i have a page with all djs avatars and i would like to link theme to the show or shows they host.
    for now it links to there posts by this function in my template
    get_author_posts_url($q->ID);

    thanks by advance

  13. byron says:

    hello great work

    is there a way to have like this kind of function
    ID);?>
    but for displaying shows users host.

  14. byron says:

    very very sorry i was wrong i meant
    get_author_posts_url($q->ID);

    a function that would link to users shows they host
    instead of post they have published.

    thanks by advance

    • Nikki Blight says:

      At the moment, no. The closest thing available in the current version of the plugin would be the [list-shows] shortcode. It displays a list of all shows, and a link to their page, but does not display the djs assigned to those shows.

  15. Francesco says:

    Ciao Nikki and everybody here,
    I was wondering if there is a way to have a different hours distribution during day scheduling… I mean: it would be helpful to have night shows listed in their “previous” days.
    EG: If I have a show that starts at 01.00 of Tuesday, I would like to see it listed in Monday’s Schedule, after 23.59…

    Actually I would have all the show listed in the same day until a fixed (even better settable) hour or til the show flagged as “last of the day”….

    I don’t know if I have explained it well with my poor English (Sorry)

  16. Francesco says:

    Hello,
    is it possible to get the status of “encore” even in the widgets?

  17. Dee says:

    Hello Nikki I was wondering do you have a video out on this plugin? when I click on the dj show I get an error 404 and also do you have an example of what the plug in should look like or a page of someone that is using this plugin just as a example because I am kind of confused.

    • Nikki Blight says:

      I don’t have a video, no. To fix the 404 error, try resaving your site’s permalink settings. WordPress sometimes doesn’t recognize the url when a new post type is added by a plugin, for some reason.

  18. Paul says:

    Hi Nikki, Thanks again for adding the one-off event feature. I may be the only one using it for my station but thanks again! A couple of things though, I noticed when I schedule a one-off event it displays correctly in the coming-up-next widget until the event is on the air, then it is shown in the on-the-air widget, but it also is still displayed in the coming-up-next widget. Any chance to have the coming-up-next widget display the next show after the one-off event? Also, could you add a featured image option to the one-off event section? Thanks again for this wonderful plugin!

  19. Hi. I’d like to use this plugin on the revamped Website I am building for WETD 90.7 FM. I wanted to move the site from Drupal to WordPress and thought this plugin might be a good fit for the site. However, I have one technical question: how can I import playlists automatically from a site like RadioActivity.fm or even a file on a server? Our station DJs log all of the music played on their shows to RadioActivity.fm, which completes our record keeping requirements for the FCC, and I am wondering if these logs can just be imported into your plugin as playlists for the shows to which they pertain. Is this possible? I am well-versed in PHP and MySQL and don’t mind doing a bit of hacking/coding to get this to work if it is possible. Thanks!

    • Nikki Blight says:

      It would certainly be possible… playlists are just WordPress posts with a post_type of “playlist” and some metadata fields in the postmeta table. You could insert them into the database the same way you could insert any other WordPress post.

      includes/post_types.php is where all the plugin handles data entry for playlists… I would start there, and use that as a reference.

      • Hi Nikki,

        Thanks for your reply. Looking further at the playlists functionality in your Radio Station plugin, I think I’m a little confused about them. Let’s say I am running a radio station with three DJs and an automation system that plays when none of these DJs are on the air. All three DJs log their music to RadioActivity.fm, and so does the automation system (auto DJ). Now, let’s also say that on my station’s Web site I want to display a “daily master playlist” containing the currently playing song as well as the songs played in the last 24 hours. Would the playlists functionality of your plugin accomplish this, assuming I was able to pull in the song info from RadioActivity and add it to the database using your playlists format? What if one or more DJs were on the air in the last 24 hours, along with of course the automation system? Would this require separate playlists for each DJ’s show as well as a playlist for the automation system, and if so how would they be combined into one master playlist?

        I guess I’m just looking for a way to let Website visitors view a master playlist of everything played within the last 24 hours, and allow them to select a date range as well, e g. last week, last two weeks. It would be nice if each individual show could have its own playlist, but these playlists would of course only be filled with songs the DJs played on their particular show.

        Is there a way I can associate a show with a playlist rather than associating a playlist with a show? For example, right now, from what I can see from my exploration of your plugin, it seems I have to first create a show, then create a playlist and select the show to which that playlist belongs. But is there a way I can just create a show and have a playlist automatically attach itself to the show, or be a part of the show? That way I know I have the same number of playlists as I do shows, there are no rogue playlists, and everything is attached.

        Finally, I looked at includes/post_types.php and was a bit confused by it. While I’ve been learning PHP for a few years now there is still a lot I can learn. I’m OK with pulling in song title, artist, album, etc. from RadioActivity and also pulling in the ID from RadioActivity of the show this information belongs to, but how would I go about matching that ID to the ID of the corresponding “show” in your plugin, and then populating the attached playlist of the show with the information pulled from RadioActivity?

        Thank you so much for answering my questions and I’m sorry if this was a long post. I really like your plugin and hope I can extend its functionality by integrating it directly with RadioActivity.fm.

        • Nikki Blight says:

          I think, if it were me doing it, I would start by simply make the automated system it’s own “show” on the site, in order to save playlists that were used while it was on the air.

          Each DJ or show would have its own set of playlists (because that is how the plugin determines who played what)… but playlists are just metadata, so they’re fairly easy to manipulate via PHP. My plugin doesn’t use a running playlist (where shows would just keep adding songs to the first playlist they create… though I suppose there’s really nothing stopping someone from doing that). Each time a show is broadcast, it is expected that a new playlist will be created for that specific airing.

          So that in mine, any time you create a new playlist, you need to associate it with a show. I think my workflow would be something like…

          1) Check that the show exists in the database.

          2) If the show doesn’t exist, automatically create it.

          3) Get the value of the show’s ID field. This would either be available from the database match in step 1, or would be the ID that was just created in step 2.

          4) Create the new playlist. Get the value of the playlist’s ID field.

          5) Add the songs to the playlist (these live in the post_metadata table).

          6) Create the association between the show and the playlist in the post_metadata table where the post_id is the playlist’s ID field, the meta_key is “playlist_show_id” and the meta_value is the show’s ID field.

          Really, all you’re doing is writing code that creates WordPress posts (with a specific post_type) and post metadata with specific meta_keys that my plugin knows to look for.

          As for a master playlist… that’s not something I’ve coded for the front end, but in the backend, there is a playlist export function (station_admin_export() in the radio-station.php file). I think it would do pretty much what you’re asking… you’d just need to create a similar function that’s available in the front end and format the output for web display rather than file output.

          • Hi Nikki,

            So essentially you are saying that every time a show airs the DJ needs to create a new playlist for it? This makes sense, I suppose, and could easily be automated through the use of RadioActivity. Given what you said in your comments, I’m thinking the following workflow might be the best way to go:

            1. DJ creates his/her show in the plugin in WordPress. Let’s say this show airs once a week, Wednesdays at 9 AM.
            2. During the show, DJ manually logs music played to RadioActivity (or configures his broadcasting software for automatic logging).
            3. Not sure if RadioActivity supports this, but if it does, at this point I would have it alert a script on the WordPress side that the DJ’s show has begun airing.
            4. Script grabs show ID/name/etc. from RadioActivity and looks up associated “show” in WP plugin.
            5. Script creates new playlist and then polls RadioActivity every few minutes for new music logs, at which time it imports the songs into the playlist.
            6. Rinse and repeat for each “show” in the plugin that matches a detected show in RadioActivity.

            What are your thoughts on this?

            My overarching goal is that I don’t want DJs to have to log their songs twice in order to get a playlist to be visible on the Website. They already go to RadioActivity.fm, and we are already integrating RadioActivity into WordPress but I saw the “playlists” functionality in your plugin and thought this would be a great way to automatically create playlists based on RadioActivity logs. That way, the DJ starts their show, logs to RadioActivity, someone goes to the Website and sees this DJ on the air, they click link to playlist, and the playlist is right there, based on RadioActivity data but associated with the “show” from the plugin.

            What do you think?

            Can we perhaps chat off-site about this so as not to fill up this comments section? I’d really like to get this integration working if at all possible and make use of the playlists function in your plugin. My e-mail is the same as the one given when posting this comment.

            Thanks!

          • Nikki Blight says:

            I think your workflow would work. It’s vaguely similar to something I did way back for a site (long before the Radio Station plugin existed) that accepted song info via a url and inserted them into a database. If you think that code might be helpful to you, the plugin was called Playlist217.

            http://nlb-creations.com/2011/05/13/wordpress-plugin-playlist217/

            You can hit me up via email, if you like. Might be easier than going back and forth in the comments. nblight (at) nlb-creations.com

  20. Ward says:

    Hi Nikki,
    I am trying to get the plugin working on my WordPress.org site but the show pages are not showing. Because my site is set up in a special way (WordPress URL and site URL are not the same) it keeps redirecting itself back and forth between the 2 url’s thus getting in an endless loop.
    Do you have any idea on how to fix this without changing the site’s setup.

    • Nikki Blight says:

      I would start by re-saving your site’s permalink settings (just go to the settings page and click save), to make sure WordPress recognizes that shows have their own url format.

      If that doesn’t fix it, I’m not entirely sure what to do. I’ve never had a wordpress site set up in the way you’re describing.

      • Ward says:

        Thanks for the response. It’s a strange set up I know (at least that’s not my fault 😉 )
        Resaving didn’t help. The strange thing is that using the ?post_type=show&p=number does work while /show/slug doesn’t.
        Since the strange set up is the cause (i suppose) I’ll go try talk with the hosting provider and the person who installed it…

        But i also have it running on a personal WP so I do know it’s a good plugin 😉

  21. Dan says:

    Hello, on the website I use your plugin, and I have a question, how can I get rid off “Playlists” view and “Blog Posts” view?

  22. paul says:

    Hi Nikki

    I’m still working on our new radio station site – I’ll send a link once it’s up and running – but I have one more question for you.

    We would like the Master Schedule to have the DJ’s name on it, under the show title and above the time. I have found the right place in master_schedule.php to add this (around line 392) but I can’t figure out the right php code. Copying it from the widget_djonair.php file doesn’t seem to do it – but I’m a complete n00b when it comes to PHP, so I’m probably just not grabbing the right bits!!

    Any chance you could please solve this one for me..?

    Love your work!!
    Cheers
    Paul

    • Nikki Blight says:

      I’ll have to look at that when I get a chance. DJ names are stored as part of a show’s metadata, so outputting them takes a few extra lines of code.

  23. Andy says:

    Hi Nikki,
    My master schedule list has stopped working since I downloaded the latest upgrade. It defaults to the Sunday schedule but won’t switch to the other days.

    Andy

  24. Tom says:

    Hi Nikki

    Just wondering whether you would be able to help me.

    I am probably being very thick (have had a long day!) but I am trying to set up a radio station website. I am using your excellent plug-in, but am just wondering…

    For the theme I have developed, I am just trying to extract the text from the plug-in showing the current “on-air” item. SO I would just need:

    – Presenter’s name
    – Avatar
    – On air time

    Is there a page with FAQs I have missed?

    If you could help at all I would be extremely grateful.

    Best Regards

    Tom

    • Nikki Blight says:

      Probably the easiest way to accomplish something like that would be to copy the station_shortcode_dj_on_air() function from includes/shortcodes.php (lines 160 to 310) into your theme’s functions.php file, rename it, and modify it to output only the fields you need.

      • Tom says:

        Thanks Nikki. Took a while to pick up the right fields etc, but I have done it!

        Just have a few modifications to do but it is there!

        Thanks so much!

  25. Jay says:

    Hey! Love this plugin Nikki, but I am running into two bugs (or maybe I am just using it wrong!)

    First, the upcoming show widget is not showing the actual upcoming show. It is showing the most recently added show, and it is also showing the incorrect time for it. See my website homepage for an example of this bug. khdx.fm

    Additionally, the theme I am using uses a bkground image and then a separate area for the main body of posts/pages. Can you implement the ability to switch the background of playlists/shows to reflect the theme’s body color? The current way has my playlists and shows unreadable. See for example http://khdx.fm/home/?show=buns-of-brixton

    Thanks, I really appreciate this plugin.

    • Nikki Blight says:

      I would start by checking your site’s timezone settings. If those are incorrect, then everything about the schedule will be off. I watched the up-next box change over from Question Mark to Down in the Willow Garden (which is correct according to your schedule), so it’s definitely not pulling in the most recently created show. So I think your timezone is a few hours off. It’s showing the 4pm schedule at 10am.

      As for the background issue, you’re going to need to do some theme work. The plugin’s templates are based on TwentyEleven. If you’re not using the TwentyEleven theme, you’ll need to read the readme file and create a template file in your theme’s directory that matches the theme you ARE using.

  26. Mike Rawlins says:

    Hi Nikki

    is there a short code to list the DJs with an output like [list-shows]?

    • Nikki Blight says:

      Not built in, but since DJ is its own role, you should be able to just use:

      ` ‘dj’) ); ?> `

      in your template and print them out however you’d like.

      • Mike Rawlins says:

        Cool, thanks Nikki.

        Is there any easy way to have the same show with different presenters on different days?

        EG
        Mon AM show with Bob
        Tue AM show with Ted
        Wed AM show with Ted & Bob
        Thu AM show with Steve
        Fri AM show with Bob

        I could do this with creating different shows but that would add to the list of shows and make it messy.

  27. David says:

    I’m wondering if there’s a way to show a larger profile picture or DJ avatar? I’ve increased the size in the DJONAIR file to make them larger, but it cuts off some of the image. I’ve tried making the image size wider but all it does is stretch out the picture rather than showing more of it. Can you assist?

  28. Ash says:

    Hi there, great concept for a plugin. I’m building a new version of codesouth.fm and we wanted to use this plugin to manage the schedule. I’m using the DIVI theme by elegant themes as its so flexible. I would prefer to use the existing 70+ pages I’ve created for the DJ profiles as it has loads of customisation and specific page access for DJ’s to only edit their pages. I see you can have a website link when adding a show, ideally I would like to show the featured image, DJ name and then somehow link to that website you can specify in the add show section? Has this been done before as I can’t see where else the website shows up? Would realllllyyyy appreciate this, Im doing the site for free as a favour for a friend.

    • Nikki Blight says:

      I’m not entirely sure how I would go about doing that. It might be possible, but it would probably take some custom coding. Where exactly are your looking to put this output? In the mast schedule grid?

  29. Paul says:

    I’m using a 12hr clock in the Upcoming DJ On Air widget, but schedule overrides display as 24hr clock no matter. Is there a way to update this?

  30. Ellen says:

    Hi Nikki,
    I quite enjoy yout plugin.

    I just have a minor problem. When I click “More Playlists” I get a page with only the title “Playlist Archive” and the links “older posts” and “newer posts” but nothing seems to work. I have to click on a playlist and navigate through Previous and Next in order to see older playlists. Do you have any idea why that’s happening?

    Thanks in advance

    • Nikki Blight says:

      I’m not entirely sure, as I’m not seeing that behavior in my test site. It could be WordPress not recognizing the permalink for the playlists archive page. Try re-saving your permalink settings and see if it fixes it.

Nikki Blight – Web/PHP Developer