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)



- rflores2323 - 2011-07-12

DejaVu Wrote:I found this from another forum... I usually just download it manually -

git clone git://github.com/MediaFrontPage/mediafrontpage.git /var/www
cd /var/www
git fetch
git checkout --track -b INI origin/remote-branch-name

It might be wrong, but that would be the way Github explains how to do it.

You can go to the Repo Branch and click the download button and get the Zip (What I do).

ok I will download it manually. question though. If I download another copy of the iNI branch how do I save my config file to the new one? Or do I have to manually save it or update it on the new INI branch download?


- Aenima99x - 2011-07-12

gugahoi Wrote:Aenima, are all your widgets working?? You might just have pointed a bug to me accidentally. When Reverse Proxies are set to true, MFP uses GLOBAL_IP for all internal urls (used by the widgets) therefore I find odd that yours would be working.

Yeah all of my widgets are working fine both internally and externally. You know though the one thing I cannot get working and is driving me nuts...the HDD space widget. I can only get it to show my /tmp drive and nothing else. Oo I've tried /, /volume1, /dev/md0 and none will work. Got any ideas?


- _Mikie_ - 2011-07-12

Which file/function controls the rewrite of the layout file when you move widgets around?


- rflores2323 - 2011-07-12

what other themes are out there? I see these below? maybe the first post should have pics of each theme?

//$customStyleSheet = "css/customcss/lighttheme.css";
//$customStyleSheet = "css/customcss/comingepisodes-minimal-banner.css";
//$customStyleSheet = "css/customcss/comingepisodes-minimal-poster.css";
$customStyleSheet = "css/customcss/black_modern_glass.css";
//$customStyleSheet = "css/customcss/hernandito.css";
//$customStyleSheet = "css/customcss/dpickles.css";


- Archigos - 2011-07-13

rflores2323 Wrote:what other themes are out there? I see these below? maybe the first post should have pics of each theme?

//$customStyleSheet = "css/customcss/lighttheme.css";
//$customStyleSheet = "css/customcss/comingepisodes-minimal-banner.css";
//$customStyleSheet = "css/customcss/comingepisodes-minimal-poster.css";
$customStyleSheet = "css/customcss/black_modern_glass.css";
//$customStyleSheet = "css/customcss/hernandito.css";
//$customStyleSheet = "css/customcss/dpickles.css";

Pics of most of them are on the Official Repo's Wiki (at least I'm pretty sure I added them when I did the last updates)... Too lazy too look right now, it's 6:40PM and I'm going to a bar to have a beer or two before I pass out... I hate being sick.


- DejaVu - 2011-07-13

rflores2323 Wrote:what other themes are out there? I see these below? maybe the first post should have pics of each theme?

https://github.com/DejaVu77/mediafrontpage

Scroll down to 'CSS Skins Available'. Wink


_Mikie_ Wrote:Which file/function controls the rewrite of the layout file when you move widgets around?
I'm not confident, but I think the second from last function in the widget.js might be a good place to start.
Code:
savePreferences : function () {
        var widgets = this,
            $ = this.jQuery,
            settings = this.settings,
            arrLayout = '';
        var jsonLayout = '';
            
        // Assemble the layout array in json
        $(settings.sections).each(function(i){
            jsonLayout += (i===0) ? '{ "method" : "SaveLayout", "params" : { "section'+(i+1)+'" : { ' : ', "section'+(i+1)+'" : { ';
            $(settings.widgetSelector,this).each(function(i){
                jsonLayout += (i===0) ? '"' : ', "';
                // ID of widget:
                jsonLayout += $(this).attr('id') + '" : { "title" : "';

                // Title of widget (replaced used characters)
                jsonLayout += $('h3:eq(0)',this).text().replace(/\|/g,'[-PIPE-]').replace(/,/g,'[-COMMA-]') + '", "display" : "';

                // Collapsed/not collapsed widget? :
                jsonLayout += $(settings.contentSelector,this).css('display') === 'none' ? 'collapsed" }' : '" }';
            });
            jsonLayout += ' }';
        });
        jsonLayout += ' } }';
        
        // Call json service to save the layout.
        var jsonResponse = "";
        $.post("jsonservice.php", jsonLayout, function(jsonResponse) {
            if(jsonResponse.error) {
                alert ('Problem saving layout file.\n\nError: '+jsonResponse.error.message);
            }
        }, "json");
    },



- gugahoi - 2011-07-13

DejaVu Wrote:
Code:
savePreferences : function () {
        var widgets = this,
            $ = this.jQuery,
            settings = this.settings,
            arrLayout = '';
        var jsonLayout = '';
            
        // Assemble the layout array in json
        $(settings.sections).each(function(i){
            jsonLayout += (i===0) ? '{ "method" : "SaveLayout", "params" : { "section'+(i+1)+'" : { ' : ', "section'+(i+1)+'" : { ';
            $(settings.widgetSelector,this).each(function(i){
                jsonLayout += (i===0) ? '"' : ', "';
                // ID of widget:
                jsonLayout += $(this).attr('id') + '" : { "title" : "';

                // Title of widget (replaced used characters)
                jsonLayout += $('h3:eq(0)',this).text().replace(/\|/g,'[-PIPE-]').replace(/,/g,'[-COMMA-]') + '", "display" : "';

                // Collapsed/not collapsed widget? :
                jsonLayout += $(settings.contentSelector,this).css('display') === 'none' ? 'collapsed" }' : '" }';
            });
            jsonLayout += ' }';
        });
        jsonLayout += ' } }';
        
        // Call json service to save the layout.
        var jsonResponse = "";
        $.post("jsonservice.php", jsonLayout, function(jsonResponse) {
            if(jsonResponse.error) {
                alert ('Problem saving layout file.\n\nError: '+jsonResponse.error.message);
            }
        }, "json");
    },

That plus a function called save_layout in jsonservice.php


- DejaVu - 2011-07-13

While your here Gugahoi, did you notice the bug I noticed/posted on your recent commit to the INI branch...? (settings.js are not all in Caps and it creates 2 sections in the config.ini file called (GLOBAL and global).

Was going to correct them, but thought I'd just mention it to you. Smile


- gugahoi - 2011-07-13

DejaVu Wrote:While your here Gugahoi, did you notice the bug I noticed/posted on your recent commit to the INI branch...? (settings.js are not all in Caps and it creates 2 sections in the config.ini file called (GLOBAL and global).

Was going to correct them, but thought I'd just mention it to you. Smile

Oh I didn't see that. Thanks, will fix it up. How do you like this "new" tab system? Working ok for you?


- DejaVu - 2011-07-13

It's far easier than explaining to new users how to set it up!

Just some inline explanations and I think this is onto a winner.
Once the js file is sorted I'll redownload it and see how I get on with it properly. Wink

You know me though, I'm likely to change bits to my liking! Big Grin


- kontax - 2011-07-13

Aenima99x Wrote:Yeah all of my widgets are working fine both internally and externally. You know though the one thing I cannot get working and is driving me nuts...the HDD space widget. I can only get it to show my /tmp drive and nothing else. Oo I've tried /, /volume1, /dev/md0 and none will work. Got any ideas?

Something to do with permissions? I had to chmod 755 my home folder, still can't get / to work..


- DejaVu - 2011-07-13

The drives need specifying were they are mounted to the Operating System in Linux.

My Hard Drive widget is setup like this -
Code:
$drive;
          $drive["Revo"] = "/";
          $drive["Movies 1"] = "/media/Movies 1/Movies/";
          $drive["Movies 2"] = "/media/Movies 2/Movies/";
          $drive["TV Shows 1"] = "/mnt/TVShows1/";
          $drive["TV Shows 2"] = "/media/TV Shows 2/";
          $drive["TV Shows 3"] = "/media/TV Shows 3/";
I use FSTAB to force my drives to mount in the same place.


- _Mikie_ - 2011-07-13

Guys do you think it would be possible to rewrite the way layout is required so instead of it being like this..

<?php
$arrLayout = array(
"section2" => array(
"wXBMCLibrary" => array(
"title" => "XBMC Library",
"display" => ""
),
"wControl" => array(
"title" => "Control",
"display" => ""
)
)
);
?>

It is like this..

<?php
$arrLayout = array(
"section1" => array(
array(
"wXBMCLibrary" => array(
"title" => "XBMC Library",
"display" => ""
),
array(
"wControl" => array(
"title" => "Control",
"display" => ""
)
)
);
?>

Each widget is its own array within the section array.


- Zenshi - 2011-07-13

Hey guys,

Just a quick question, is it possible, or will it ever be, to open a widget when you click on a link?

I ask this because i'm developing a php/mysql script that loads the information of the movies/tv shows/music from the mysql database and would be nice to be able to integrate it with mfp.

Cheers,

Zenshi.


- Dougedey - 2011-07-14

The XBMC Library plugin shows the correct artwork (in my case: http://xbmc:xbmc@beer:8080/vfs/special://masterprofile/Thumbnails/Video/e/e2bd6c3a.tbn)
The Now Playing Plugin tries to get Fanart, but it doesn't exist: http://xbmc:xbmc@beer:8080/vfs/special://masterprofile/Thumbnails/Video/Fanart/e2bd6c3a.tbn

It should fall back to the standard art if it doesn't find fanart.

Edit: Using a different, updated git repo works