Hi all,

I've got a very basic Wordpress plugin that will display the currently playing song on your website. At the moment it only shows "Song Title By Artist" e.g. "OMG by Usher" (Screenshot attached, please excuse our sites choice of colours).

You can put it anywhere on a Wordpress site by adding the shortcode [tvanowplaying]. If you want to style it I'm using a class for the italics block (<i class="tvanowplaying">) so adjust your CSS accordingly.

The way it works is I made an RLM module that talks to a PHP page via curl. This page simply adds records to a database table on Wordpress (wp -> prefix + tva_nowplaying).

This records the title by artist String from Rivendell as well as the length. It uses this to calculate when the event should be ending (and adds 3 seconds for good measure). Then by some AJAX magic it will auto update after the time has been reached.

If there is nothing playing as we're Live on the Mic, it will default to a 30 second update loop and display nothing.

If you want to use it you need to copy the plugin directory to your Wordpress Plugins and activate (wp-content/plugins/).

Make sure you edit rlm_nowOrNext.php to put in the necessary database info. This page can be anywhere either on an Internal website or public facing. It will only process requests from known IP addresses so make sure you add your Rivendell IP (or your Internet IP if this is public facing).

Finally load up the rlm module in the normal way following the template of the rlm_wordpress.conf file.

If anyone wants more info feel free to reply. I'll be amending this plugin slightly so that it works without Wordpress over the next week or so.

Regards,

Wayne

Attachment: tva_nowplaying.tar.gz
Description: GNU Zip compressed data

<<attachment: nowplaying.jpg>>

_______________________________________________
Rivendell-dev mailing list
[email protected]
http://lists.rivendellaudio.org/mailman/listinfo/rivendell-dev

Reply via email to