The Radio ‘On Air’ Script

Over the past few months I’ve developing the One Media Group (OMG) website for Staffordshire University Students’ Union.

The theme was ‘out of the box’ from ThemeForest and what I’ve done is add some of the functionality and change how it looks a bit.

The main function that I wanted to add to the site was who was on air and how that was displayed on the site.

I’ve worked my good friend and colleague Christopher Smith for several years and what has become known to us as the ‘on air’ script has helped us both massively.

The basis of the script is a text file which contains each day’s schedule. Each line consists of the time the show is on air and the presenter/show name , all separated by pipes. A PHP file then reads this text file and uses the pipes to divide the information up and assigns it to a string which is printed. There are several different files which do different things; one to see what’s on air now and then ones to display a particular day’s schedule.

When we started using the script we would just simply include the relevant files where we wanted them, but now we both work with WordPress and wanted to integrate it a bit better.

Something I wanted to do was use some AJAX to update the on air information without the user refreshing the page. Christopher found the AJAX which the radio station he was working with used to update their now playing song. We modified it slightly and now on the OMG website it is used in the header to display the on air now and next show information.

My code is different from Christopher’s as I wanted to display it slightly differently. The AJAX is reloading a PHP file which has the listen and webcam button as well as includes for the on air now and next PHP files, which read the schedule text file. This file is reloaded on any OMG page every 60 seconds.

Now for the schedule page of the website. I didn’t want to include an iframe in a page entry (like I did last year for Cre8 Radio) as it wasn’t very tidy and was a pain to maintain! So Christopher and I worked together on creating a page template that we could apply to our schedule pages. All I did on the template was include the seven ‘day’ PHP files and styled them so they looked good.

To edit the text file that would contain all the on air information I wanted something that was easy and plain. So I installed CMS from Scratch in a directory and created a single text file that those with the client password could edit. It does take users outside of  WordPress to edit a single file, but I felt this was easier than trying to direct people to the theme editor page within WordPress (mainly because I didn’t want to give them Admin rights to do so!).

However, I wanted to see if there was anything I could add to this. On websites such as BBC Radio 1, where it tells you who is currently on air in the header, it’s also a link to their show page. What if I could do this as well in the header of the OMG website?

I dived back in to the PHP files which were figuring out what the on air text file meant. I was easily able to add another pipe for it to read, which would contain a URL to print. Originally the button span was printed in the file which the AJAX was reading, but I needed to change it so that the span was printed in the on air now PHP file. It was a bit messy for a while as I tried to figure out where things were being printed.

My next thought was ‘what if that presenter/show doesn’t have a page we can link to?’ This required much more work as I figured out what PHP function to use to see if a string was empty. I eventually used the empty function and told it that if it was empty to point the link to the schedule page. On the schedule page, the show links would also display in the presenter and show names.

Another use that I hope to use the show links for is when the news and sports shows are on, is that the link can point to the news and sports pages. Also when we cover Varsity in a couple of months time, those links can all point to our live blogs and Varsity homepage.


That’s pretty much what I did over Christmas to enhance the OMG website! I will also be using much of that code and integration for the Cre8 Radio website when it comes back on air in May/June.

All of these changes will be activated once the new branding comes in (which should be within a week or two of writing this).

The OMG Rebrand

At the start of the 2011 academic year, the incoming management team of Staffordshire University Students’ Union’s One Media Group (OMG) decided that it was time for a rebrand.

According to reports from students and people around the university, OMG has a ‘rebrand’ almost every two years. But this year, the team didn’t want to completely lose the brand that had already been built up.

The team’s aim for the rebrand is to make it more appealing to students. The main thrust of this will be the redesigned logo which shows more creativity, as we are a creative group on campus. The old logo didn’t reflect this.

My part in this was helping to redesign the website. I was asked at the beginning of the summer if it was possible and necessary to move the OMG website off the Staffs Union website and content management system, MSL. I suggested WordPress straight away. When the rebrand idea was announced, I immediately knew that the website could be an integral part of this.

The new website is hosted by a professional company and I am able to do what I want with it. The website is simply WordPress with a theme on it. Since the hosting being available, I’ve been able to play with it until there was something that I and the management were happy with. I’ve also worked with the Promotions team to ensure that it has the best effect possible.

One big thing that I’m excited about with moving to WordPress is that it means we can continually develop the website. Also it means that the students that are going to be using it to post articles should be familiar with it, as broadcast journalist students who post to StaffsLive use WordPress very regularly.

The theme that I’m using has some great features such as additional review information, YouTube and SoundCloud embed short codes and also built in share options.

The new website will be on and as part of the rebrand we are not using any other variations of the website address, including in our studio email address.

The Day I was on BBC Three’s Young Persons’ Question Time – Riot Special

Click here to watch the programme on BBC iPlayer (Available until Friday 19th August 2011)

So over the past week or so there’s been talk of all the riots in London and other parts of the UK.

In response the Prime Minister came back from his holidays and the BBC decided to do a Question Time and a Young Persons’ Question Time Riot Special.

On Tuesday I filled out an application form to become part of the audience and possibly ask a question on the show. I didn’t expect to hear anything from the show; I don’t think anyone ever does! But on Friday I received a call from the makers of Young Persons’ Question Time, asking me to be part of the audience. I jumped at the chance to be part of a piece of history. So my mum drove me to Peterborough, where I caught a train straight to London. I was outside the BBC Television Centre on Wood Lane by 5:30pm!

As is with all BBC audiences, you have the obligitary bag search and metal detector routine. But after that we were all sent to a conference room under the world famous Television Centre. It was pretty hot and stuffy and all the YP audience was in there! They did provide us with tea, coffee, water, biscuits and KitKats. This was also a chance for us to write down a questionm with a chance that we might be able to ask it.

With less than an hour to go before the show went out live on BBC Three at 8:30pm, we were taken to Studio 8. Being a media student I was facinated to see what the set up was going to be.

As usual there was the teared seating where most of the audience would sit, and as I was close to the front of the line into the studio, I was placed on the end of the second row from the front (on the left as you looked at the panel).

The floor manager introduced himself and decided to get us to help test their mics and cameras. Five members of the audience were picked and they sat in place of the panel. The floor manager then went around the room and get us all to answer the question ‘If you won the £116 million lottery prize, what would you do with it?’ Laughter ripped through the audience as both the panel and audience members answer the question. Then on walked the main man, the host of the show; Richard Bacon, most well known for his talk/discussion show on BBC Radio Five Live.

He started to get to know a few in the audience but also asked some questions to get our brains thinking. He managed to get a good reaction and said that he hoped we were like that when the programme was live.

It came to 8:30pm and the show started with Richard introducing the panel and getting the first question. I was rather excited to witness what was about to happen, even if I wasn’t actually caught on screen! Most of the audience was rowdy and almost everyone had an opinion. I think Richard did very well to control the audience, I don’t know anyone who could of done better.

I do think that some of the outburst were un-needed and people spoke of respect; at times there didn’t seem to be any in the studio from the audience!

The show was trying a new format; Richard was not placed behind the desk with the panel, but on his feet walking amungst the audience. Maybe if he had been behind the desk, I don’t think he would’ve had such command of the audience.

Even though I did have my hand up for ages (and even shouted out once!) I didn’t get the chance to put my view forward. But I am thrilled that I rushed from Spalding to London to be part of a great show and audience.

At the end I got the chance to shake the hand of Richard Bacon and tell him he did a great job. You weren’t supposed to take photos, but as a media student I felt I should anyway!

And if you was wondering where I was sat throughout the whole thing, I was on the end of the second row from the front, on the left as you looked at the panel. To prove it, here’s me in the closing titles:

Here’s a few of photos of the set as I went out and also as I went around BBC Television Centre in London.