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)



- AWilco - 2011-02-05

thezoggy Wrote:there shouldnt have been any need to change anything for sickbeard. if anything just added the two new classes used to the css. which i already mention a week ago before the changes got pushed to master branch.

Mine wouldn't show anything because the scapers cut out too much of the page, left only a blank header section. Not sure why you can't see it though...


- AWilco - 2011-02-05

RaNaMaster Wrote:ok guys i need some info and please go easy im a noob my ? is what do we need mysql for in my config i see

/*
$xbmcdbconn = array(
'video' => array(
'dns' => 'mysql:host=hostname;dbname=videos',
'username' => '',
'password' => '',
'options' => array(PDO::MYSQL_ATTR_INIT_COMMAND


and how does it work im sorry but i just dont make any sense to me and for a long time i wanted to share the xbmc data with my 3 other xbmc box and i did it by using a symbolic link to share out the xbmc folder in the app date

cd c:\Users\%username%\Appdata\Roaming\
rmdir XBMC /s /q
mklink /D XBMC "\\192.168.1.4\c\Documents and Settings\Administrator\Application Data\XBMC"

thank you

By default XBMC uses a SQLLite database, so you do not need to use that bit (which is why it is commented out).

You should only need the first db links:
Code:
$xbmcdbconn = array(
        'video' => array('dns' => 'sqlite:\\192.168.1.4\c\Documents and Settings\Administrator\Application Data\XBMC/userdata/Database/MyVideos34.db', 'username' => '', 'password' => '', 'options' => array()),
        'music' => array('dns' => 'sqlite:\\192.168.1.4\c\Documents and Settings\Administrator\Application Data\XBMC/.xbmc/userdata/Database/MyMusic7.db', 'username' => '', 'password' => '', 'options' => array()),
    );
(I think that should be right for you)


- Celox - 2011-02-05

thezoggy Wrote:there shouldnt have been any need to change anything for sickbeard. if anything just added the two new classes used to the css. which i already mention a week ago before the changes got pushed to master branch.

actually the comingepisodes listing stopped appearing for me to on MFP since an sickbeard update a few days ago. i had the changes for the new classes though, i didn't change a thing in the config or css since then.


- RaNaMaster - 2011-02-05

thank you AWilco


- thezoggy - 2011-02-06

Celox Wrote:actually the comingepisodes listing stopped appearing for me to on MFP since an sickbeard update a few days ago. i had the changes for the new classes though, i didn't change a thing in the config or css since then.

just tested MFP with sickbeard (git source) latest and things look fine, just made some slight changes to make some things look better. I'd recommend updating MFP github with: http://zoggy.net/comingepisodes.css

--z


- DPickles - 2011-02-06

currently I have this is my config
Code:
$sickbeardcomingepisodes = 'http://nerdbox:8081/comingEpisodes';
$sickbeardurl = 'http://nerdbox:8081/home/';

This works fine in my browser and sickbeard works fine as well. But, for some reason I'm unable to get the coming episodes widget to work? I did a clean install and everything else is working fine. Any ideas?


- AWilco - 2011-02-06

thezoggy Wrote:just tested MFP with sickbeard (git source) latest and things look fine, just made some slight changes to make some things look better. I'd recommend updating MFP github with: http://zoggy.net/comingepisodes.css

--z
interesting. I've done some testing myself, and the HTML I get back from Sickbeard, after stripping to the body tags, is this:
Code:
<div id="comingepisodeswrapper"><h1>Coming Episodes</h1>

<div class="h2footer align-right">
    <b>Key:</b>
    <span class="listing_overdue">Past</span>
    <span class="listing_current">Current</span>
    <span class="listing_default">Future</span>
    <span class="listing_toofar">Distant</span>
    <span class="listing_unknown">Unknown</span>
</div><br>

<!-- start non list view -->
<script type="text/javascript" charset="utf-8">
$(document).ready(function(){
  $(".ep_summary").hide();
  $(".ep_summaryTrigger").click(function() {
    $(this).next(".ep_summary").slideToggle('normal', function() {
        $(this).prev(".ep_summaryTrigger").attr('src', function(i, src) {
            return $(this).next(".ep_summary").is(':visible') ? src.replace('plus','minus') : src.replace('minus','plus');
        });
    });
  });
});
</script>
<div id="outsideWrapper">
<div id="insideWrapper">
  <div id="insideContent">


    
    <!-- start Californication -->
        

                    <br><h1 class="day">Sunday</h1>

    <div class="ep_listing listing_current" id="listing_80349">
      <div class="tvshowDiv">
      <table width="100%" border="0" cellpadding="0" cellspacing="0">
        <tbody><tr>
          <th colspan="2">
            <span class="tvshowTitle"><a href="/sickbeard/home/displayShow?show=80349">Californication
            </a></span>
            <span class="tvshowTitleIcons"><a href="http://www.thetvdb.com/?tab=series&amp;id=80349" onclick="window.open(this.href, '_blank'); return false;" title="http://www.thetvdb.com/?tab=series&amp;id=80349"><img alt="[info]" height="20" width="20" src="/sickbeard/images/search32.png"></a> <a href="/sickbeard/home/searchEpisode?show=80349&amp;season=4&amp;episode=5" title="Force Update" id="forceUpdate|80349|Californication" class="forceUpdate"><img alt="[update]" height="20" width="20" src="/sickbeard/images/forceUpdate32.png" id="forceUpdateImage|80349"></a></span>
          </th>
        </tr>
        <tr>
          <th rowspan="2" style="background-color: #efefef;">
            <span class="sbposter-img"><a href="http://server/sickbeard/showPoster/?show=80349&amp;which=poster" class="highslide" onclick="return hs.expand(this)"><img alt="" class="posterThumb" src="/sickbeard/showPoster/?show=80349&amp;which=poster"></a><a><div class="highslide-caption"><br></div></a></span>
          </th>
          <td class="next_episode">
            <span class="title">Next Episode:</span> <span>4x05 - Freeze Frame (2011-02-06)</span>
          </td>
        </tr>
        <tr>
          <td style="vertical-align: top;">
            <span class="title">Airs:</span> <span>Sunday 9:00 PM on Showtime</span>
[<span class="title">HD</span>]
            <br>
            <img class="ep_summaryTrigger" src="/sickbeard/images/plus.png" height="16" width="16" alt="" title="Toggle Summary"><div class="ep_summary">
                A compromising photograph threatens to derail Hank's court case.
            </div><br>
          </td>
        </tr>
      </tbody></table>
      </div>
    </div>
    
    <!-- end Californication -->

<!-- other shows here... -->
    <br>
  </div>
</div>
</div>
<!-- end non list view -->


<script type="text/javascript" charset="utf-8">
setInterval(window.location.reload, 180000); // Refresh every 3 minutes
</script>

The stripInnerWrapper command looks for
Code:
$pos = strpos($body, "<script");
And so cuts it off at the first script, leaving:
Code:
<div id="comingepisodeswrapper"><h1>Coming Episodes</h1>

<div class="h2footer align-right">
    <b>Key:</b>
    <span class="listing_overdue">Past</span>
    <span class="listing_current">Current</span>
    <span class="listing_default">Future</span>
    <span class="listing_toofar">Distant</span>
    <span class="listing_unknown">Unknown</span>
</div><br>

<!-- start non list view -->

would you be willing to look to see what HTML you get?

DPickles: You might have the same problem as me, hopefully zoggy can take a look.


- steve1977 - 2011-02-06

Thanks again for the great work. It has been working great, but suddenly 2 issues came up:

1) The bar on the top stating "XBMC", "Sickbeard", etc is not really visible anymore. The height is only 1mm, so that only a fraction of the "X" from "XBMC" is visible...

2) "Coming episodes" still works, but there is a long intro now including "home", "add shows", "manual post-processing", "restart", "shutdown", etc. This is taking all the space that coming episodes only show at the bottom of the page...


Any thoughts?


- mwkurt - 2011-02-06

Hello again,

I am hoping...well, begging for someone to step up and me out with this installation.

Once again, I am using Windows 7 32 bit and the MySQL database with XBMC.

Has anyone installed this who is running a mysql database? If so, can you please help me out?

I have uninstalled Xampp and just installed Apache 2.2.17 and am trying to get this to work without all of the extra stuff that Xampp installs. I never could get around the problems I was having with PEAR and whatnot. (Don't understand why no one else had the problems with PEAR?)

I do not know what else if anything I have to do now, however I know that it is currently not working in it's present state.

I have installed Apache in "C://Apache"
After doing that I entered "http://localhost" and got the window that says "IT WORKS"...yeah!
So I unzipped the file for MediaFrontPage into the "C://Apache/htdocs" directory. I renamed the 2 default files to config.php and layout.php. Refreshed the browser page and was shown a, "Index of" what was in the htdocs folder:
Index of /

* .gitignore
* README
* config.php
* css/
* favicon.ico
* functions.php
* index.php
* js/
* jsonservice.php
* layout.php
* m/
* media/
* mediafrontpage.php
* nav.php
* sickbeardposter.php
* widgets.php
* widgets/
* xbmcjsonlib.php

Can anyone tell me what I need to do now? Please!

Edit #1 - I have also installed PHP 5.3.5 into the directory "C://PHP", following the directions on this page: http://www.webdevelopersnotes.com/how-do-i/install-PHP-windows-7.php

I still get the "Index of" when entering "http://localhost.

Thanks,
Mark


- branlr - 2011-02-06

mwkurt Wrote:Hello again,

I am hoping...well, begging for someone to step up and me out with this installation.

Once again, I am using Windows 7 32 bit and the MySQL database with XBMC.

Has anyone installed this who is running a mysql database? If so, can you please help me out?

I have uninstalled Xampp and just installed Apache 2.2.17 and am trying to get this to work without all of the extra stuff that Xampp installs. I never could get around the problems I was having with PEAR and whatnot. (Don't understand why no one else had the problems with PEAR?)

I do not know what else if anything I have to do now, however I know that it is currently not working in it's present state.

I have installed Apache in "C://Apache"
After doing that I entered "http://localhost" and got the window that says "IT WORKS"...yeah!
So I unzipped the file for MediaFrontPage into the "C://Apache/htdocs" directory. I renamed the 2 default files to config.php and layout.php. Refreshed the browser page and was shown a, "Index of" what was in the htdocs folder:
Index of /

* .gitignore
* README
* config.php
* css/
* favicon.ico
* functions.php
* index.php
* js/
* jsonservice.php
* layout.php
* m/
* media/
* mediafrontpage.php
* nav.php
* sickbeardposter.php
* widgets.php
* widgets/
* xbmcjsonlib.php

Can anyone tell me what I need to do now? Please!

Edit #1 - I have also installed PHP 5.3.5 into the directory "C://PHP", following the directions on this page: http://www.webdevelopersnotes.com/how-do-i/install-PHP-windows-7.php

I still get the "Index of" when entering "http://localhost.

Thanks,
Mark

That's pretty weird, because the fact that it is listing index.php ought to mean that it automatically loads that file by default just by going to the directory....

Try adding index.php at the end of the url.

Edit: why not just use Xampp? Seriously, it works really well for me, and all that extra stuff is good to have anyway. I find myself using the ftp server etc just because I have it there anyway!

If you were having troubles... I don't know... some kind of conflict on your system or something...

On a clean install of windows, it should be this simple:

1. install xamp
2. Put mediafrontpage in the htdocs directory
3. edit config file appropriately
4. uncomment curl under php.ini in xampp
5. Go to http://yourip/mediafrontpage/
6. Success.

EDIT: Actually, just thought of something--it sounds like you are putting the files directly into htdocs... try putting them in a folder and add it to your url...

http://yourip/nameoffolder/ instead of just your ip. If that doesn't work, add index.php.


- thezoggy - 2011-02-06

AWilco Wrote:interesting. I've done some testing myself, and the HTML I get back from Sickbeard, after stripping to the body tags, is this:
Code:
<div id="comingepisodeswrapper"><h1>Coming Episodes</h1>

<div class="h2footer align-right">
    <b>Key:</b>
    <span class="listing_overdue">Past</span>
    <span class="listing_current">Current</span>
    <span class="listing_default">Future</span>
    <span class="listing_toofar">Distant</span>
    <span class="listing_unknown">Unknown</span>
</div><br>

<!-- start non list view -->
<script type="text/javascript" charset="utf-8">
$(document).ready(function(){
  $(".ep_summary").hide();
  $(".ep_summaryTrigger").click(function() {
    $(this).next(".ep_summary").slideToggle('normal', function() {
        $(this).prev(".ep_summaryTrigger").attr('src', function(i, src) {
            return $(this).next(".ep_summary").is(':visible') ? src.replace('plus','minus') : src.replace('minus','plus');
        });
    });
  });
});
</script>
<div id="outsideWrapper">
<div id="insideWrapper">
  <div id="insideContent">


    
    <!-- start Californication -->
        

                    <br><h1 class="day">Sunday</h1>

    <div class="ep_listing listing_current" id="listing_80349">
      <div class="tvshowDiv">
      <table width="100%" border="0" cellpadding="0" cellspacing="0">
        <tbody><tr>
          <th colspan="2">
            <span class="tvshowTitle"><a href="/sickbeard/home/displayShow?show=80349">Californication
            </a></span>
            <span class="tvshowTitleIcons"><a href="http://www.thetvdb.com/?tab=series&amp;id=80349" onclick="window.open(this.href, '_blank'); return false;" title="http://www.thetvdb.com/?tab=series&amp;id=80349"><img alt="[info]" height="20" width="20" src="/sickbeard/images/search32.png"></a> <a href="/sickbeard/home/searchEpisode?show=80349&amp;season=4&amp;episode=5" title="Force Update" id="forceUpdate|80349|Californication" class="forceUpdate"><img alt="[update]" height="20" width="20" src="/sickbeard/images/forceUpdate32.png" id="forceUpdateImage|80349"></a></span>
          </th>
        </tr>
        <tr>
          <th rowspan="2" style="background-color: #efefef;">
            <span class="sbposter-img"><a href="http://server/sickbeard/showPoster/?show=80349&amp;which=poster" class="highslide" onclick="return hs.expand(this)"><img alt="" class="posterThumb" src="/sickbeard/showPoster/?show=80349&amp;which=poster"></a><a><div class="highslide-caption"><br></div></a></span>
          </th>
          <td class="next_episode">
            <span class="title">Next Episode:</span> <span>4x05 - Freeze Frame (2011-02-06)</span>
          </td>
        </tr>
        <tr>
          <td style="vertical-align: top;">
            <span class="title">Airs:</span> <span>Sunday 9:00 PM on Showtime</span>
[<span class="title">HD</span>]
            <br>
            <img class="ep_summaryTrigger" src="/sickbeard/images/plus.png" height="16" width="16" alt="" title="Toggle Summary"><div class="ep_summary">
                A compromising photograph threatens to derail Hank's court case.
            </div><br>
          </td>
        </tr>
      </tbody></table>
      </div>
    </div>
    
    <!-- end Californication -->

<!-- other shows here... -->
    <br>
  </div>
</div>
</div>
<!-- end non list view -->


<script type="text/javascript" charset="utf-8">
setInterval(window.location.reload, 180000); // Refresh every 3 minutes
</script>

The stripInnerWrapper command looks for
Code:
$pos = strpos($body, "<script");
And so cuts it off at the first script, leaving:
Code:
<div id="comingepisodeswrapper"><h1>Coming Episodes</h1>

<div class="h2footer align-right">
    <b>Key:</b>
    <span class="listing_overdue">Past</span>
    <span class="listing_current">Current</span>
    <span class="listing_default">Future</span>
    <span class="listing_toofar">Distant</span>
    <span class="listing_unknown">Unknown</span>
</div><br>

<!-- start non list view -->

would you be willing to look to see what HTML you get?

DPickles: You might have the same problem as me, hopefully zoggy can take a look.


did you clear your browsers cache recently?
stripinner actually looks for:
$pos = strpos($body, "<h1>Coming Episodes</h1>");


- thezoggy - 2011-02-06

steve1977 Wrote:Thanks again for the great work. It has been working great, but suddenly 2 issues came up:

1) The bar on the top stating "XBMC", "Sickbeard", etc is not really visible anymore. The height is only 1mm, so that only a fraction of the "X" from "XBMC" is visible...

2) "Coming episodes" still works, but there is a long intro now including "home", "add shows", "manual post-processing", "restart", "shutdown", etc. This is taking all the space that coming episodes only show at the bottom of the page...


Any thoughts?

clear browser cache, you have stale css


- AWilco - 2011-02-06

mwkurt. Here is a tutorial that should help you: http://www.thesitewizard.com/php/install-php-5-apache-windows.shtml

note especially: How to Configure Apache for PHP 5
a. Running PHP 5 as an Apache Module (this is preferred to the CGI method)

and

c. Configuring the Default Index Page

This is probably where your installation isn't done. However it's probably worth reading the whole tutorial to check you installed things correctly.

also note what branlr says about putting it in a subfolder (you might want to run other things on your apache server in the future Smile )


- AWilco - 2011-02-06

thezoggy Wrote:did you clear your browsers cache recently?
stripinner actually looks for:
$pos = strpos($body, "<h1>Coming Episodes</h1>");

cleared the cache, still not working.

Code:
function stripInnerWrapper($body) {
    $pos = strpos($body, "<h1>Coming Episodes</h1>");
    if ($pos > 0) {
        $body = substr($body, $pos);
        $pos = strpos($body, "<script");
        if ($pos > 0) {
            $body = substr($body, 0, $pos - 1);
        }
    }
    return $body;
}
AFAIK this function:
Finds the position of "<h1>Coming Episodes</h1>"
Removes everything before it.
Finds the position of "<script"
Removes everything after it.

which based on my Sickbeard output leaves what is in the post above, do you get different output from Sickbeard?


- mwkurt - 2011-02-06

branir,

Thanks for responding to my plea.

A clean install of Windows could be what I need, but I'd rather not try that at this point in time.
If you go back a few pages you can see the problems that I was having with Xampp and why I uninstalled it. I kept getting the follwing errors:

Deprecated: Assigning the return value of new by reference is deprecated in C:\xampp\php\PEAR\Config.php on line 80
Deprecated: Assigning the return value of new by reference is deprecated in C:\xampp\php\PEAR\Config.php on line 166
Deprecated: Assigning the return value of new by reference is deprecated in C:\xampp\php\PEAR\Config\Container.php on line 111


Nobody seemed to know how to fix that. From what I have read, it is not really an error but could be a future problem. The way to get rid of it was to add "~E_DEPRECATED" to the error_reporting line of the php.ini file. Tried that, didn't work. Wouldn't really fix the problem anyway, just mask the problem.

The strange thing is, the first time that I installed Xampp, It all seemed to work except for those errors. I got the upcoming, latest music latest videos, etc. After uninstalling and reinstalling I could never get it back to that point. I continued to have the Deprecated errors and couldn't understand why no one else reported them. I guess it's my system.

At any rate, Jason28 gave me the url of a guide to follow. However, it appears to me, that following that guide is for those who are using the standard sqlite database. I am using the mysql database and question whether the guide will set it up for a MySQL user? So I ask again....Is anyone here using the MYSQL DB with this, that could help me with whatever settings need to be made?

Thanks again,
Mark