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

No comments:

Post a Comment