Friday, August 5, 2011

Iframe Widget for MediaFrontPage







I have created a widget to display an iframe so I can add another webpage frem my HTPC to the MediaFrontPage dashboard.

Create /var/www/mediafrontpage/widgets/wIframe.php

<?php
$wdgtIframe = array("name" => "Iframe Widget", "type" => "inline", "function" => "widgetIframe();");
$wIndex["wIframe"] = $wdgtIframe;

function widgetIframe() {
echo "<iframe src=\"http://tron:8080\" width=\"100%\" height=\"600\">
</iframe>";
}

?>

Change the iframe source to your url. Put the url between \" and \"

Add the widget somewhere in /var/www/mediafrontpage/layout.php

"wIframe" => array(
"title" => "AWX",
"display" => ""
),

Remove the comma if it is the last one in the array.

There you have it, you can put any web page inside a widget in MediaFrontPage

Thursday, July 16, 2009

Louisville Live Music

LouisvilleLiveMusic.com is my premier website. It evolved from my music Meetup group as a way to inform people of music performances happening in Louisville that don't have an associated Meetup event. In order to reduce the amount of editing required, I have automated it so that content comes from event descriptions written by the musicians and venues, mostly from Facebook, but I use other sources as well.


How it works:
I created a Facebook application called event-tools that gets data from all the FB events that are in my FB calendar through the FB API and copies it to my website's database. A cron job automates this process. I need only click on the event or rsvp for it to appear in my calendar and event-tools takes it from there.

Once in the database, the events are displayed on louisvillelivemusic.com. Pretty straight forward so far.

Here's where it get's interesting:
Another cron job publishes the data back to FB on my website's fanpage wall through the event-tools application and FB API. This is useful because not all my FB friends and fans are friends with the musicians and venues so they might not see all of the events that I do. This benefits the musicians and venues by increasing attendance to events, benefits fans by informing them of events they might not know about, and benefits me by increasing awareness of Louisville Live Music. Everyone benefits!

That's the main part of it. I also have created:
Scapers that get content from other locations like Meetup and various venue's calendars,
an RSS feed, and a fully AJAXified content management system for editing and greenlighting the database entries.


Planned improvements:
In addition to pushing the events to the fanpage as they come in, I will also have the publisher re- send alerts for events happening "Tonight - ".
Make the website W3C validated. The RSS feed is already because it has to be.
Integrate with the Meetup API instead of using their RSS feed. (a lot of work for little benefit)
Improve and update the CMS system. It is very out of date. It was designed around an old model for the site but still works and is still very useful. (I'm quite proud of it) It is also the most complex piece of code on the site.

I will post a record here of improvements as I make them, and also list planned improvements so I don't forget.

Facebook Page
Website