Kodi Community Forum
MediaFrontPage - Web interface with widget type architecture to control multiple apps - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Support (https://forum.kodi.tv/forumdisplay.php?fid=33)
+--- Forum: Supplementary Tools for Kodi (https://forum.kodi.tv/forumdisplay.php?fid=116)
+--- Thread: MediaFrontPage - Web interface with widget type architecture to control multiple apps (/showthread.php?tid=83304)



- croontje - 2011-04-04

syk3d Wrote:I'm experiencing the exact same thing. Doesn't bother me in the slightest, but yes, that does happen to me as well. I currently have 30 different index.html files in my root folder. I checked the dates on the files, and they have been there since the 13th of March. For me, that's roughly when I installed MFP.

Perfect Smile thanx

I don't care either if those files are created but I would prefer them to be created in some sort of temporary folder and not in the root.


- hernandito - 2011-04-04

Hey guys,

Have you guys given some thought to adding Couch Potato to MediFrontpage? It would be nice to get a widget that shows your CP Wanted List and your Soon list... Similar to the Sickbeard Coming Episodes.

Many thanks for this awesomeness... FMP is my browser's Home page!


Index.html gone - croontje - 2011-04-05

croontje Wrote:Perfect Smile thanx

I don't care either if those files are created but I would prefer them to be created in some sort of temporary folder and not in the root.

YES! I found the cause of the index.html files and it's not Mediafrontpage :p

In the sickbeard script in /etc/init.d they use this command to shutdown sickbeard:
Code:
wget -q --user=$SBUSR --password=$SBPWD "http://$HOST:$PORT/home/shutdown/"
This will download a index.html file at shutdown to the root folder. The solution is to add the following to the end of that line: --delete-after

Like so:
Code:
wget -q --user=$SBUSR --password=$SBPWD "http://$HOST:$PORT/home/shutdown/" --delete-after

No strange index.html files anymore Big Grin

You can test it before you add the extra parameter bij starting and stopping sickbeard a few times:
Code:
/etc/init.d/sickbeard.sh stop
/etc/init.d/sickbeard.sh start



- DejaVu - 2011-04-05

I have now forwarded the port for MediaFrontPage and I noticed that no Login page is present. I now I can secure it using .htaccess, but is there a way we can get a proper login page made for this?

Better still, I'm going to try to add an unobtrusive one today. Wink


- DejaVu - 2011-04-05

I've come up with something (very early stages), but it's by no means secure and I'm having problems with it. Anyone with a tiny bit of coding skills should be able to fix this.

It's just a PHP powered user/pass script that I've copied, pasted and edited (I cannot code for toffee)

First off, I've given the index.php (frameset) a new name (mfpindex.php) and the script redirects to it. It does not secure access because mediafrontpage.php is still accessible bypassing it and also, leaving the fields blank automatically logs in.

If you enter the wrong details in it denies access.
I'm using a .htaccess file to redirect to the login page.

I think the CSS file should also be linked if possible.

Here's a JPG of it -
Image
and here is the basic code.
Code:
<?php
# Create as many usernames and passwords as you wish below.
# Format : $u['username'] = 'password';
# If possible do not associate the same password with more than one username.
# If you wish to remove authentication from the system simply remove any user details below.
$u['Username']  = 'password';
# This can be any value. It is recommended that this value is a variable to ensure maximum security.
# The default is todays date as this value is variable.
$secretkey = date("m.d.y");
##
## No need to edit below.
##
if (@$_GET['do'] == 'logout')  {
         setcookie ("user", '', time() - 12200);
         setcookie ("token", '', time() - 12200);
         $ref = $_SERVER['HTTP_REFERER'];
         header("Location: $ref");
}
if (!empty($u)) {
if(@$_GET['do'] == 'login') {
     $username = $_POST['username'];
     $password = $_POST['password'];
     if( array_search($password, $u) == $username && $u[$username] == $password ) {
         setcookie ("user", $username, time() + 12200);
         setcookie ("token", sha1($username.$secretkey), time() + 12200);
         header('Location: mfpindex.php');
     } else {
         show_login("Username & Password Do Not Match.");
         die();
     }
}
if (!$_COOKIE['token'] || !$_COOKIE['user'])
{
         show_login("MediaFrontPage Login");
         die();
} else {
     if ( sha1($_COOKIE['user'].$secretkey) !== $_COOKIE['token'] ) {
         setcookie ("user", "", time() - 3600);
         setcookie ("token", "", time() - 3600);
         show_login("MediaFrontPage Login");
         die();
     }
}
}
function show_login($message) {
    ?>
    <style type="text/css">
body {
    background:url(../media/background.png) #222528;
    font-family: 'Helvetica Neue','HelveticaNeue',Helvetica, Arial, sans-serif;
    font-size:12px;
    line-height:140%;
    color: #FF9522;
    height: 100%;
    margin: 5px 5px;
}
input {
    background-color: #EEE;
    padding: 5px;
    border: 1px solid #CCC;
}
#logintable {
    font-family: Arial, Helvetica, sans-serif;
    background:url(../media/background.png) #222528;
    border: 1px solid #ccc;
    color: #FF9522;
    box-shadow:0px 0px 8px #FF9522;
    -moz-box-shadow:0px 0px 8px #FF9522;
    -webkit-box-shadow:0px 0px 8px #FF9522;
    -webkit-border-radius: 5px;
    -moz-border-radius: 5px;
    border-radius: 5px;
    padding:10px;
}
.message {
    text-align: center;
    padding: 20px;
    font-size: 24px;
    text-shadow: 1px 1px 0px #666666;
    filter: dropshadow(color=#666666, offx=2, offy=2);
}
    </style>
<form action="index.php?do=login" method="post">
<div class="message"><?php echo $message; ?></div>
<table width="258" border="0" align="center" cellpadding="05" cellspacing="0" id="logintable">  <tr>
  <td width="80"> </td>
  <td width="192"> </td>
</tr>
  <tr>
    <td>Username</td>
    <td><label for="username"></label>
    <input name="username" type="text" id="username" value="User"></td>
  </tr>
  <tr>
    <td>Password</td>
    <td><label for="password"></label>
    <input name="password" type="password" id="password" value="Pass"></td>
  </tr>
  <tr>
    <td> </td>
    <td> </td>
  </tr>
  <tr>
    <td> </td>
    <td align="right"><input type="submit" name="button" id="button" value="Submit"></td>
  </tr>
</table>
</form>
    <?php
}
?>

Like I said, leaving the fields blank allows the user to load the frameset file.


- rflores2323 - 2011-04-05

rflores2323 Wrote:my mobile version does not show sickbeard or couch potato. is it suppose to?

when I got to my MFP on my droidx I cannot see any upcoming episodes from sickbeard. How can I get this?

Also would be nice to see CP on this also as wanted list.

anyone know how to do the above?


- RaNaMaster - 2011-04-05

DejaVu77 Wrote:I've come up with something (very early stages), but it's by no means secure and I'm having problems with it. Anyone with a tiny bit of coding skills should be able to fix this.

It's just a PHP powered user/pass script that I've copied, pasted and edited (I cannot code for toffee)

First off, I've given the index.php (frameset) a new name (mfpindex.php) and the script redirects to it. It does not secure access because mediafrontpage.php is still accessible bypassing it and also, leaving the fields blank automatically logs in.

If you enter the wrong details in it denies access.
I'm using a .htaccess file to redirect to the login page.

I think the CSS file should also be linked if possible.

Here's a JPG of it -
Image
and here is the basic code.
Code:
<?php
# Create as many usernames and passwords as you wish below.
# Format : $u['username'] = 'password';
# If possible do not associate the same password with more than one username.
# If you wish to remove authentication from the system simply remove any user details below.
$u['Username']  = 'password';
# This can be any value. It is recommended that this value is a variable to ensure maximum security.
# The default is todays date as this value is variable.
$secretkey = date("m.d.y");
##
## No need to edit below.
##
if (@$_GET['do'] == 'logout')  {
         setcookie ("user", '', time() - 12200);
         setcookie ("token", '', time() - 12200);
         $ref = $_SERVER['HTTP_REFERER'];
         header("Location: $ref");
}
if (!empty($u)) {
if(@$_GET['do'] == 'login') {
     $username = $_POST['username'];
     $password = $_POST['password'];
     if( array_search($password, $u) == $username && $u[$username] == $password ) {
         setcookie ("user", $username, time() + 12200);
         setcookie ("token", sha1($username.$secretkey), time() + 12200);
         header('Location: mfpindex.php');
     } else {
         show_login("Username & Password Do Not Match.");
         die();
     }
}
if (!$_COOKIE['token'] || !$_COOKIE['user'])
{
         show_login("MediaFrontPage Login");
         die();
} else {
     if ( sha1($_COOKIE['user'].$secretkey) !== $_COOKIE['token'] ) {
         setcookie ("user", "", time() - 3600);
         setcookie ("token", "", time() - 3600);
         show_login("MediaFrontPage Login");
         die();
     }
}
}
function show_login($message) {
    ?>
    <style type="text/css">
body {
    background:url(../media/background.png) #222528;
    font-family: 'Helvetica Neue','HelveticaNeue',Helvetica, Arial, sans-serif;
    font-size:12px;
    line-height:140%;
    color: #FF9522;
    height: 100%;
    margin: 5px 5px;
}
input {
    background-color: #EEE;
    padding: 5px;
    border: 1px solid #CCC;
}
#logintable {
    font-family: Arial, Helvetica, sans-serif;
    background:url(../media/background.png) #222528;
    border: 1px solid #ccc;
    color: #FF9522;
    box-shadow:0px 0px 8px #FF9522;
    -moz-box-shadow:0px 0px 8px #FF9522;
    -webkit-box-shadow:0px 0px 8px #FF9522;
    -webkit-border-radius: 5px;
    -moz-border-radius: 5px;
    border-radius: 5px;
    padding:10px;
}
.message {
    text-align: center;
    padding: 20px;
    font-size: 24px;
    text-shadow: 1px 1px 0px #666666;
    filter: dropshadow(color=#666666, offx=2, offy=2);
}
    </style>
<form action="index.php?do=login" method="post">
<div class="message"><?php echo $message; ?></div>
<table width="258" border="0" align="center" cellpadding="05" cellspacing="0" id="logintable">  <tr>
  <td width="80"> </td>
  <td width="192"> </td>
</tr>
  <tr>
    <td>Username</td>
    <td><label for="username"></label>
    <input name="username" type="text" id="username" value="User"></td>
  </tr>
  <tr>
    <td>Password</td>
    <td><label for="password"></label>
    <input name="password" type="password" id="password" value="Pass"></td>
  </tr>
  <tr>
    <td> </td>
    <td> </td>
  </tr>
  <tr>
    <td> </td>
    <td align="right"><input type="submit" name="button" id="button" value="Submit"></td>
  </tr>
</table>
</form>
    <?php
}
?>

Like I said, leaving the fields blank allows the user to load the frameset file.

hey DejaVu77
just n idea how about this the login page only come up for remote users localhost and lan users can access it with going to login page


- DejaVu - 2011-04-05

RaNaMaster Wrote:hey DejaVu77
just n idea how about this the login page only come up for remote users localhost and lan users can access it with going to login page

If you can help make it happen RaNaMaster, I'd be extremely grateful. Like I said, this was just an idea I had as I have just made mine available to the world and I think it needs looking into. Smile

And I have no idea really were to start! Big Grin

I original thought of a Login Modal box, over a 'MediaFrontPage' landing page perhaps, but I could not bend my head around how to do it.


Mobile layout - allen00se - 2011-04-06

I seem to have most things working, but have not yet been able to use the /m site. I tried accessing from my ipad and it automatically detects and tries to switch to the mobile site, but then the connection just times out.
I tried renaming default-mobileconfig.php to mobileconfig.php and now there is no timeout, but it just displays a blank white page.
Is there some setup to get the mobile site working? or should it work out of the box?
thanks,
-Krys

**Edit
Ok so it looks like if I go to the mobile site from firefox and just let it sit for a long time the mobile site eventually comes up, im guessing safari's timeout maybe just cuts if off too soon? Any ideas why the mobile site would take so long to display if the regular site loads quickly?

**Edit Again
I found the culprit... the widget for XBMC wasnt loading because the xbmc json server was locked up. Once I restarted xbmc-live everything pulls up fine.

New problem, I noticed that anytime I try to start a video from the frontpage recent TV or Movie widget the xbmc json service gets locked up and i have to restart xbmc-live


custom css not working - allen00se - 2011-04-06

I have tried to change the layout for upcoming episodes by removing the comments for the poster layout in the config.php file, however nothing seems to change. I also uncommented the lighttheme to test and nothing happened there as well. I have cleared the cache etc. and even tried from a different browser/pc etc, still looks the same. Am i missing something?

//$customStyleSheet = ""; ** i have tried with this line uncommented as well
//Example of how to use this
//$customStyleSheet = "css/lighttheme.css";

//Show only posters for coming episodes
$customStyleSheet = "css/comingepisodes-minimal-poster.css";

//Show only banners for coming episodes
//$customStyleSheet = "css/comingepisodes-minimal-banner.css";


- Nick8888 - 2011-04-07

@allen00se,

In regards to xbmc's json service locking up, I think one/some of the xbmc developers made some changes to it recently so it is possible mediafrontpage does not work with newer versions of xbmc.

Custom Stylesheets - when you are in firefox, right click and go view frame source while viewing mfp and see if there is any mention of the stylesheet you are trying to load, it could be a typo.


- hernandito - 2011-04-07

I am a better designer than I am a coder/programmer. I took my best attempt at editing the css to create an interface that was a little easier on my eyes. What do you guys think?

Image

I have not been able to figure out where to change the font sizes for the HDD Widget...

On the RSS Feed Widget,
I want to add a space between the Sab icon and the Text for the link. They are too close together.
I want to get rid of the border around the Sab icon.
I also want to valign=center the text Link and icon.
Cannot figure out how to do it.


coming episodes - allen00se - 2011-04-07

yes the css/comingepisodes-minimal-poster.css is showing up when I view the source.. and i can click the link to the css/comingepisodes-minimal-poster.css and it takes me to the .css file

.listing .title {
display: none;
}
.listing .info {
display: none;
}
.listing h1 {
display: none!important;
}
.listing {
width: 100px;
height: 139px;
float: left;
padding: 10px 0 10px 0!important;
background: transparent!important;
}
br {
clear: both;
}
#outerWrapper {
padding-left: 12px!important;
}


*edit
I should note that if i comment out the poster/banner css the lighttheme.css starts working


- Nick8888 - 2011-04-08

hernandito Wrote:I am a better designer than I am a coder/programmer. I took my best attempt at editing the css to create an interface that was a little easier on my eyes. What do you guys think?

Image

I have not been able to figure out where to change the font sizes for the HDD Widget...

On the RSS Feed Widget,
I want to add a space between the Sab icon and the Text for the link. They are too close together.
I want to get rid of the border around the Sab icon.
I also want to valign=center the text Link and icon.
Cannot figure out how to do it.
Mind posting your changes?

Make sure you get firebug for firefox and right click > inspect element

It will show you what you need to edit for specific things like this.


- Nick8888 - 2011-04-08

allen00se Wrote:yes the css/comingepisodes-minimal-poster.css is showing up when I view the source.. and i can click the link to the css/comingepisodes-minimal-poster.css and it takes me to the .css file

.listing .title {
display: none;
}
.listing .info {
display: none;
}
.listing h1 {
display: none!important;
}
.listing {
width: 100px;
height: 139px;
float: left;
padding: 10px 0 10px 0!important;
background: transparent!important;
}
br {
clear: both;
}
#outerWrapper {
padding-left: 12px!important;
}


*edit
I should note that if i comment out the poster/banner css the lighttheme.css starts working

Its possible that it only allows one custom stylesheet at a time