From now through November 15th, I am offering a 40% discount off the purchase of SAM Broadcaster Pro.  To take advantage of this offer, click the SAM Broadcaster banner on my site and use the special promo code TK40SAM or use this direct link to apply the code directly.  All orders are still processed directly by, and supported by, Spacial Audio through their affiliate program.

Some new features have been added to the NGS SAM Integrator plug-in with the release of version 1.1. The new features include 2 new shortcodes and 3 widgets. It should be noted that as I discussed in this post, some users may see a drop in performance when using the widgets.  This is completely dependant upon the hardware and internet connection used to host SAM Broadcaster.

The New Shortcodes

[songsearch] … [/songsearch]

The first new shortcode is the [songsearch] shortcode.  As the name implies, it allows you to create a hyperlink to your song list, searching for a specified artist, title, or album.  For example, if you were writing an article that mentioned AC/DC, you could use [songsearch]AC/DC[/songsearch] and it would create a link to a list of all of your AC/DC tracks.

You can also include an option “search” argument to search for something other than the literal text you are linking.  For example, [songsearch search=”Pink Floyd”]my favorite band[/songsearch] would hyperlink the text “my favorite band” and link it to a list of Pink Floyd songs.

This shortcode will work for song titles and albums as well as artists.  It does, of course, depend on the tags in your SAM Database being accurate.


The second new shortcode is [toplist].  This shortcode will allow you embed a short list of the most requested songs from your library into other content.  By default, it will list the top five, but you can specify the number using an optional “num” parameter.  For example, [toplist num=10] would list the top ten requests instead of the top five.

The Widgets

Top Request Widget

Top Requests Widget

The first of the widgets is the Top Requests widget.  Like the [toplist] shortcode, it will list the top five songs by default.  The widget can be configured to list any number you like.   The list is not hyperlinked for requesting.

Upcoming Tracks Widget


This widget will list the next five tracks in your queue.  If a song was requested through the web-based request system, it will be marked with a ” ~requested~” tag.  Like the Top Request Widget, it can easily be reconfigured to show more (or less) tracks.

Recently Played Widget

Recenly Played Widget

This widget displays a list of recently played tracks (including the current track).  Like the Upcoming Tracks Widget, it will mark any tracks which were requests and, of course, the number of tracks can easily be reconfigured.


NGS SAM Integrator has now been reviewed and approved for release through the WordPress Plugin Directory. I have already put the latest and greatest revision of the code into the repository. The plugin can now be installed automatically through your WordPress Admin Dashboard.

If you have already been using the stock PHP code included with SAM Broadcaster, then the plugin should work out of the box. The only thing you may need to do is add the IP address of your web server to SAM Broadcaster’s allowed IP address list.

Support for the plugin is now also available through the WordPress Plugin Directory at this page.

Back when I first announced that I was working on the plugin, I mentioned the idea of including widgets in the plugin.  After some careful consideration, I think it may be better to have a separate “Widget Pack” available.  This is obviously not to try to make more profit, after all, the plugin is free and the widget pack would be as well.

The issue is one of website performance.  The information displayed by the plug-in is coming directly from SAM Broadcaster and/or the database used by SAM Broadcaster.  These are likely running on the same machine using the same internet connection.  Both the connection as well as the hardware running SAM Broadcaster and the database are likely substantially slower than the web server hosting the WordPress site itself.  As a result, any page displaying information from the plug-in may run substantially slower, depending on connection and hardware used.

A lot of people choose their widgets and display them on every page of the website.  The result here would be a substantial increase in traffic to the SAM database, slowing down the entire site.  The result would be a slew of people complaining that the plug-in is poorly written and slows down their website.   The truth of the matter is, it has nothing to do with how the plug-in is written.  The stock SAM PHP Web code would produce the same results, and for some features may actually run slower.

Yes, I could include the widgets with the plugins and install them, including a slew of warnings about their use.  The sad fact is, it doesn’t matter how many warnings you put into the documentation telling people not to do something, there are people who assume the documentation isn’t going to tell them something they don’t already know.  That’s exactly why I hardcoded the plugin to refuse to run if someone tries to use “Root” as the database user.  I figure if someone is gonna go out of their way to remove the safety measures from the code instead of reading the documentation to find out why the safeties are there, they are on their own.

I would welcome any feedback or thoughts anyone else may have on the subject as I consider how best to go about handling the widgets, or even whether to make them at all.

The initial public release of the NGS SAM Integrator is now out. Currently, the plug-in is available only through my site. I am currently awaiting approval for distribution through the WordPress Plugin Directory. Full instructions for downloading and installing the plug-in (including what you need to do in SAM Broadcaster and MySQL) can be found here.

Once the plug-in has been approved for inclusion in the WordPress Plugin Directory, support will be handled there.  In the mean time, comments are enabled directly on the instruction page.

I am glad to announce that the first version of my WordPress->SAM Broadcaster integration plug-in is almost ready for distribution.   Currently, I have only implemented the request system, but there are plans to add some sidebar widgets as well, such as listing the currently playing track as well as recently played and upcoming tracks.

I’d also like to add functionality to support multiple SAM Hosts.  This would allow stations which have multiple DJs to have the site’s request list and other SAM-integrated features reflect information for the current on-air DJ.  At the moment, it is only possible to configure the plug-in to work for a single host.  The bulk of the “hard” work is done.  It’s able to connect to the host’s database, as well as to the SAM Braodcaster software itself.   At this point, any new features will mainly involve pulling information from the database and making design implementation decisions for how new features should work.

There are a few things I wanted to cover up front, before I even begin distribution.  It is imperative before using this, or any other web integration tool for SAM Broadcaster, that you take some security precautions.   In order for your SAM software and mySQL database to communicate with your webserver, you need to make both and reachable by the outside world.