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)



- SleepyP - 2011-05-18

OK, just got my own fork, committed my changed files, and submitted a pull request back to the master branch. My fork repo is here: https://github.com/DivinityCycle/mediafrontpage


- Nick8888 - 2011-05-18

SleepyP Wrote:I am working on making a single setup that automatically works with both versions of the XBMC JSON interface. ... If I do this right, the widgets can pretty much be version-agnostic and work with either interface. ... Once I get that done, it should actually make it a lot easier to make a "port" of that library that essentially serves up the same data, but pulled directly from a MySQL database.

One thing I think we oughta do: A single widget that combines Now Playing, Control, and XBMC Message and also some additional controls and an "XBMC is offline" page with Wake-On-LAN and Start XBMC buttons.

I like your thinking. One point I would like to make and I can't really remember the details of how it is currently, but I think we need to look at moving alot of the xbmc json functionality into the core of MFP so that the xbmc widgets can function independent from one another.

Either that or we just combine Recent TV, Recent Movies and the Library widgets into one but I don't think thats a good solution.


- SleepyP - 2011-05-18

Well they essentially are one widgt at the moment, they all come out of wXBMCLibrary.php. I need to look at how the stuff works a bit more but I think I can build some examples of how to make any widget "talk" to XBMC using libXBMCLibrary.php. I will at that soon.


- gugahoi - 2011-05-18

DejaVu Wrote:Me personally, I'm using XBMCLive. Cannot remember if I install SQLite on it - PHP Curl definitely is though. I shall install SQLite onto my XBMCLive install and see if it fixes it (although, I think it;s already there in XBMCLive).
The Uniform Server was for a friend running the original on Windows 7.

Not SQLite itself, but the plugin that allows php to control an sqlite database. In apache (or maybe just xampp) it's there activated by default but that was a 'recent' change I believe.

Nick8888 Wrote:I like your thinking. One point I would like to make and I can't really remember the details of how it is currently, but I think we need to look at moving alot of the xbmc json functionality into the core of MFP so that the xbmc widgets can function independent from one another.

Either that or we just combine Recent TV, Recent Movies and the Library widgets into one but I don't think thats a good solution.

I think incorporating xbmc functionality throughout will be amazing but this would also mean it would be extremely harder to expand mfp to work with other media players (boxee, plex). Don't want to infer anything tho, I'm just saying.


I would also like to show how the "CrazyLayouts" branch is looking. I implemented a few more modifications with the ideas from Hernandito.

Here's MFP CrazyLayout in action -> http://www.youtube.com/watch?v=-RNcc6jd8UU

Keep in mind I would not recommend using it like that yet. This is just me implementing some ideas. Atm I'm pretty sure all the layouts get scrambled if changed (as you could see, my 4 Col layout was missing the 4 column the 1st time but the second time worked fine). But this is an initial implementation of a workspace like environment for MFP.


- DPickles - 2011-05-18

gugahoi Wrote:I would also like to show how the "CrazyLayouts" branch is looking. I implemented a few more modifications with the ideas from Hernandito.

Here's MFP CrazyLayout in action -> http://www.youtube.com/watch?v=-RNcc6jd8UU

This is incredible. Heading in exactly the right direction.

Just thought I would post a screenshot of of my mfp with my edited css. Thanks to Hernandito for putting the effort in with his css.

Image


- hernandito - 2011-05-18

SleepyP Wrote:One thing I think we oughta do: A single widget that combines Now Playing, Control, and XBMC Message and also some additional controls and an "XBMC is offline" page with Wake-On-LAN and Start XBMC buttons. I think this would obviously be renamed something else, like XBMC Remote. This widget is pretty much independent of the database, so I'll work on that after I get the Recent Movies, Recent Episodes, and the database library done. I already did most of the hard stuff, its just implementing it and debugging now.

Sleepy, please consider allowing this widget to select which computer to control... much like the pull-down list in the Message plugin...


- _Mikie_ - 2011-05-18

What do I do when I get

$ git push -u origin master
ssh: connect to host hub.com port 22: Bad fi
fatal: The remote end hung up unexpectedly


- Nick8888 - 2011-05-18

gugahoi Wrote:I think incorporating xbmc functionality throughout will be amazing but this would also mean it would be extremely harder to expand mfp to work with other media players (boxee, plex). Don't want to infer anything tho, I'm just saying.

SleepyP Wrote:Well they essentially are one widgt at the moment, they all come out of wXBMCLibrary.php. I need to look at how the stuff works a bit more but I think I can build some examples of how to make any widget "talk" to XBMC using libXBMCLibrary.php. I will at that soon.

Good points. Perhaps it doesn't need that much work and the xbmcjsonlib can remain separate but I remember it having issues depending on which loaded first. I wish I had more time to spend on this again.


- hernandito - 2011-05-18

gugahoi Wrote:\Layouts" branch is looking. I implemented a few more modifications with the ideas from Hernandito.

Here's MFP CrazyLayout in action -> http://www.youtube.com/watch?v=-RNcc6jd8UU

Keep in mind I would not recommend using it like that yet. This is just me implementing some ideas. Atm I'm pretty sure all the layouts get scrambled if changed (as you could see, my 4 Col layout was missing the 4 column the 1st time but the second time worked fine). But this is an initial implementation of a workspace like environment for MFP.

Perfection....!! I tried similar by creating another instance of the MFP folder where I edited the layout.php and widget.css to create an alternate workspace. The link in my Nav bar targets the alternate folder's mediafrontapge.php to the in-line frame.

Works fine, but a bitch to implement and maintain.

What I find intriguing on your video is that at the 00:39 sec mark, it shows 2 widgets spanning the 3 sections above. If this can be easily configured... WOW...


- hernandito - 2011-05-18

This is what I am trying... but painful to setup.

Image

Image


- DejaVu - 2011-05-18

hernandito Wrote:This is what I am trying... but painful to setup.

Image

Image

Different mediafrontpage.php files with specific layout.php and widget.css's?
Or have you just iFramed them? I would prefer just have the widgets set as you have it, not so much the entire program - although I suppose once it's done it could be optional! Smile

But I do really like the idea.

--EDIT--
Had a go at this and splitting the Widget into separate pages is really easy.


- The_Dogg - 2011-05-18

I wanted to try and create my own widget, so I added the example widget supplied with the package to the layout.php file. I can now see the widget on my page, but there is no content in the example widget.

In the widgetfile there is an hello world(didnt modify the example file), but it doesn't show up.

anyone have an idea why?


- hernandito - 2011-05-18

DejaVu Wrote:Different mediafrontpage.php files with specific layout.php and widget.css's?
Or have you just iFramed them? I would prefer just have the widgets set as you have it, not so much the entire program - although I suppose once it's done it could be optional! Smile

But I do really like the idea.

--EDIT--
Had a go at this and splitting the Widget into separate pages is really easy.

Basically yes... I have the following folders in my www server

mfp
----css
----widgets
----etc.
--------index.php
--------layout.php

mfp-downloads
----css
----widgets
----etc.
--------index.php
--------layout.php

mfp-watchlists
----css
----widgets
----etc.
--------index.php
--------layout.php

Very hard to keep them all synched. The widgets I created are simple iFrame containers... This is technically as far as I can take it...

Would love to hear what you guys think and anything to make it better and easier.


- hernandito - 2011-05-18

I have tweaked the html pages of the jDownloader widget so it fits better within the iFrame. Also tweaked color to make is more "our" style.

EDIT: To clarify, I edited the template files that jDownloader uses to display its web interface.

Image

Now I wish there could be an easy way to get the widget box and iFrame to automatically size the height to fit the contents being displayed. Some toggles within jDownloader expand the page vertically; it would be nice if both widget and iFrame expanded and contracted as necessary.

This is the code for the widget:
Code:
<?php
$wdgtjDown = array("name" => "jDown", "type" => "inline", "function" => "widgetjDown();");
$wIndex["wjDown"] = $wdgtjDown;

function widgetjDown() {
    echo "<iframe src='http://192.168.0.190:8777' frameborder='0' scrolling='auto' width='99%' height='640'></iframe>";
}

?>



- DejaVu - 2011-05-18

The_Dogg Wrote:I wanted to try and create my own widget, so I added the example widget supplied with the package to the layout.php file. I can now see the widget on my page, but there is no content in the example widget.

In the widgetfile there is an hello world(didnt modify the example file), but it doesn't show up.

anyone have an idea why?

Strange one that. I just changed the layout.php to include the Example and worked perfectly...


Code:
"section4" => array(
            "wSearch" => array(
                "title" => "Search",
                "display" => ""
            ),
            "wExample" => array(
                "title" => "Example",
                "display" => ""
            )
        )
    );
?>

wExample.php
Code:
<?php
$wdgtExample = array("name" => "Example Widget", "type" => "inline", "function" => "widgetExample();");
$wIndex["wExample"] = $wdgtExample;

function widgetExample() {
    echo "<p>Hello World</p>";
}

?>

Hello World appears on mine. Check your syntax above.

As for the Split MFP into loads of sections, this seems pretty easy.
I'm going to have a go and put up on my Repo - just for fun and an example of what CAN be done.

I do not expect it to go into the master as it will be bit of mess. Smile