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)



- chrisuk11 - 2011-07-09

UPDATE -

Good news, I have now gone back to the uniform server (after reading about issues using XAMPP) and now all aspects are working.

Soo all good Smile


Some of the widgets do seem to take a little while to load. Is this normal?

thanks again


- chrisuk11 - 2011-07-09

Edited


- LiLChris - 2011-07-10

So I switched to DejaVu's settings and everything seems to be working as usual.

When I tried adding a different image to one of the customcss (hernandito) my image gets messed up near the navigation bar and at the bottom.
It seems like its trying to repeat itself and I tried adding - background-repeat:no-repeat; but didn't change anything.

Image

Got any idea what I need to do?


LiLChris Wrote:Though I have a tiny problem...

When I try to play any movie or tv show it won't start up.
All the controls in the Widget Control work though, even added an Exit link.

Not sure what I need to change to get it to play from the web ui. Sad

Even after a new windows install, and fresh everything I still have this problem. Sad
Though this time it lets me play music from the widget, do not remember if it could before.


- gugahoi - 2011-07-10

LiLChris Wrote:So I switched to DejaVu's settings and everything seems to be working as usual.

When I tried adding a different image to one of the customcss (hernandito) my image gets messed up near the navigation bar and at the bottom.
It seems like its trying to repeat itself and I tried adding - background-repeat:no-repeat; but didn't change anything.

Image

Got any idea what I need to do?

Even after a new windows install, and fresh everything I still have this problem. Sad
Though this time it lets me play music from the widget, do not remember if it could before.

Seems to me like your image is not big enough, try increasing the size in photoshop or something.

The music feature was added recently by Nick8888.


- gugahoi - 2011-07-10

chrisuk11 Wrote:UPDATE -

Good news, I have now gone back to the uniform server (after reading about issues using XAMPP) and now all aspects are working.

Soo all good Smile


Some of the widgets do seem to take a little while to load. Is this normal?

thanks again

Ye it's normal. Maximum should be 10 seconds tho, so if it's more than that something might be wrong. This also only happens when your web server and the program you are trying to access are on different machines.


- gugahoi - 2011-07-10

Aenima99x Wrote:I only don't have global-machine set to true because I have 2 boxes, my NAS running the webserver & all the apps and my HTPC running only XBMC. As for the $_SERVER["HTTP_HOST"] - I was having some trouble with everything working properly inside my network and externally and this fixed it. I'm not real sure on the implications of using this yet, but I'll let you know what I find out.

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.


- LiLChris - 2011-07-10

gugahoi Wrote:Seems to me like your image is not big enough, try increasing the size in photoshop or something.

The music feature was added recently by Nick8888.

Hmm cant be, the image is 1920x1200 and I am on 1080p, I did try reducing it to the same size but no difference and other sizes as well.
It isn't a big deal though, I will play with it some more and figure out why its doing that.


And if you don't mind also adding the exit command to the control widget.
PHP Code:
$shortcut["Exit XBMC"]             = array("cmd" => 'exit'); 
I was trying to get a restart one but couldn't find the commands that worked. >.<





Also found something minor that needs changing for DejaVu...
NavBar instructions.
PHP Code:
//     Examples                                                                      //
//     ========                                                                      //
//     $navlink["TV Headend"]   = "/tvheadend";                                      //
//     $navlink["Transmission"] = "http://localhost:9091/transmission/web/";         //
//     $navlink["uTorrent"]     = "http://localhost:8081/gui/";                      //
//     $navlink["jDownloader"]  = "http://localhost:8765/";                          //
//     $navlink["Test"]  = array( "path"=>"http://www.example.com/",                 //
//                                "title" => "Custom",                               //
//                                "image" => "example.png",                          //
//                                "target => "_blank" ); 

Last line should be "target" => "_blank" ); its missing a quotation mark. :p
I didn't notice until after 10mins trying to figure out if I messed up in the instructions for custom links.




One last thing I remembered was when using Subsonic it would get bugged out if I opened it within MFP, like it wouldn't let me add songs only play those already in the playlist.
When it doesn't do that, it sometimes just opens the page and leaves MFP (but same tab) not sure why its doing that either.


- gugahoi - 2011-07-10

guy_smiley:) Wrote:I finally did the right thing and checked the log file;

Code:
[Sat Jul 09 20:08:44 2011] [error] [client 192.148.117.104] PHP Notice:  Undefined index: REMOTE_HOST in /var/www/widgets/wSystem.php on line 67, referer: htt
p://myurl.dyndns.org/mediafrontpage.php
[Sat Jul 09 20:08:44 2011] [error] [client 192.148.117.104] PHP Notice:  Undefined variable: newlink in /var/www/widgets/wComingEpisodes.php on line 158, refe
rer: http://myurl.dyndns.org/mediafrontpage.php
[Sat Jul 09 20:08:44 2011] [error] [client 192.148.117.104] PHP Notice:  Undefined variable: newlink in /var/www/widgets/wComingEpisodes.php on line 158, refe
rer: http://myurl.dyndns.org/mediafrontpage.php
[Sat Jul 09 20:08:44 2011] [error] [client 192.148.117.104] PHP Warning:  Invalid argument supplied for foreach() in /var/www/widgets/libXBMCLibrary.php on li
ne 311, referer: http://myurl.dyndns.org/mediafrontpage.php
[Sat Jul 09 20:08:44 2011] [error] [client 192.148.117.104] File does not exist: /var/www/routine_data.js, referer: http://myurl.dyndns.org/widgets/wComin
gEpisodes.php?display=yes
[Sat Jul 09 20:08:44 2011] [error] [client 192.148.117.104] File does not exist: /var/www/msg.js, referer: http://myrul.dyndns.org/widgets/wComingEpisodes
.php?display=yes
[Sat Jul 09 20:08:44 2011] [error] [client 192.148.117.104] File does not exist: /var/www/widgets/util.js, referer: http://myurl.dyndns.org/widgets/wComin
gEpisodes.php?display=yes
[Sat Jul 09 20:08:45 2011] [error] [client 192.148.117.104] PHP Notice:  Undefined variable: newlink in /var/www/widgets/wComingEpisodes.php on line 158, refe
rer: http://myurl.dyndns.org/widgets/wComingEpisodes.php?display=yes
[Sat Jul 09 20:08:45 2011] [error] [client 192.148.117.104] PHP Notice:  Undefined variable: newlink in /var/www/widgets/wComingEpisodes.php on line 158, refe
rer: http://myurl.dyndns.org/widgets/wComingEpisodes.php?display=yes
[Sat Jul 09 20:08:45 2011] [error] [client 192.148.117.104] File does not exist: /var/www/routine_data.js, referer: http://myurl.dyndns.org/widgets/wComin
gEpisodes.php?display=yes
[Sat Jul 09 20:08:46 2011] [error] [client 192.148.117.104] PHP Notice:  Undefined variable: newlink in /var/www/widgets/wComingEpisodes.php on line 158, refe
rer: http://myurl.dyndns.org/widgets/wComingEpisodes.php?display=yes
[Sat Jul 09 20:08:46 2011] [error] [client 192.148.117.104] PHP Notice:  Undefined variable: newlink in /var/www/widgets/wComingEpisodes.php on line 158, refe
rer: http://myurl.dyndns.org/widgets/wComingEpisodes.php?display=yes
[Sat Jul 09 20:08:46 2011] [error] [client 192.148.117.104] File does not exist: /var/www/routine_data.js, referer: http://myurl.dyndns.org/widgets/wComin
gEpisodes.php?display=yes
[Sat Jul 09 20:08:47 2011] [error] [client 192.148.117.104] File does not exist: /var/www/bob_help.html, referer: http://myurl.dyndns.org/widgets/wComingE
pisodes.php?display=yes
[Sat Jul 09 20:08:47 2011] [error] [client 192.148.117.104] File does not exist: /var/www/widgets/hr.gif, referer: http://myurl.dyndns.org/widgets/wComing
Episodes.php?display=yes

Even tho your reverse proxies might not be set up properly, what I mean was permissions in MFP's folder. You neet to enable your webserver to have write permissions there. This way it will delete firstrun automatically.


- steve1977 - 2011-07-10

Aenima99x Wrote:I only don't have global-machine set to true because I have 2 boxes, my NAS running the webserver & all the apps and my HTPC running only XBMC. As for the $_SERVER["HTTP_HOST"] - I was having some trouble with everything working properly inside my network and externally and this fixed it. I'm not real sure on the implications of using this yet, but I'll let you know what I find out.

Actually, I also have it spread across several computers. I am using the reverse proxies to "loop in" the other computers (so, the reverse proxy on the NAS is doing this job). Anyhow, it appears if both of our approaches lead to the same result?!

Aenima99x Wrote:Haven't tried Subsonic, but I'll give it a look.

Would really encourage you (not only because of helping replicate my issue ;-) It is open-source a really cool piece of software with full API!


- guy_smiley:) - 2011-07-10

gugahoi Wrote:Even tho your reverse proxies might not be set up properly, what I mean was permissions in MFP's folder. You neet to enable your webserver to have write permissions there. This way it will delete firstrun automatically.

Yeah, sorry I've set that up. It's all owned by www-data, which is the user who runs Apache2.

@Aenima99x
Do you have another file httpd.conf that has your document root set or is that done somewhere else?

EDIT:
Removed mfp and re-git? it. Set up the config file properly, etc etc. It runs, but won't let me set authentication for some reason, login page just refreshes after entering correct user/pass. Removed this for the time being. It won't go to my router page anymore, after I turned off DDNS on the router, but no widgets. Getting closer I feel...


- DPickles - 2011-07-10

Code:
$shortcut["Restart XBMC"]             = array("cmd" => 'reboot');
pretty sure that SHOULD do it. I haven't tried it though.


Quote:When I tried adding a different image to one of the customcss (hernandito) my image gets messed up near the navigation bar and at the bottom.
It seems like its trying to repeat itself and I tried adding - background-repeat:no-repeat; but didn't change anything.

try this. Although you might want to set the image position. If you didn't want it to repeat did you want it to stretch?

Code:
body
{
background: url(image.jpg) no-repeat;
background-size: 100%;
}



- Archigos - 2011-07-10

DPickles Wrote:
Code:
$shortcut["Restart XBMC"]             = array("cmd" => 'reboot');
pretty sure that SHOULD do it. I haven't tried it though.

I tried this for the hell of it, but it ended up doing what I thought, rebooted the computer and not just XBMC Sad


==
By the way, they let me out of the hospital about 6 hours ago... feels good to be home, but wish they gave me more pain killers.


- gugahoi - 2011-07-10

guy_smiley:) Wrote:Removed mfp and re-git? it. Set up the config file properly, etc etc. It runs, but won't let me set authentication for some reason, login page just refreshes after entering correct user/pass. Removed this for the time being. It won't go to my router page anymore, after I turned off DDNS on the router, but no widgets. Getting closer I feel...

It look like your problems are completely different than what I thought. Are your reverse proxies working at all?

LiLChris Wrote:Last line should be "target" => "_blank" ); its missing a quotation mark. :p

That was my bad, sorry!


- gugahoi - 2011-07-10

DejaVu Wrote:@Gughoi
Loving your new Settings script. That is excellent work.

I know it's still WIP. But I just tried to integrate it into my Repo with the Nav Menu - skinning the Settings page was pretty easy, and everything seemed to work fine. The only thing I think it needs to do (if possible) is reload the page after Saving (perhaps a timeout of 5 seconds or a alert box that refreshes like mfpedit.php).

This would only be to reload the menu once the settings have been saved. Without refreshing, the Menu locks all the tabs in the out position.

Other than that, I think it would integrate quite well, unless you can think of reasons it may not?

Also, I've been looking into trying to change Programs.php.

Code:
<?php
if ($qs == 'SickBeard') {
    echo $sickbeardurl;
}    elseif($qs == 'CouchPotato') {
    echo $cp_url;
}    elseif($qs == 'SabNZBd') {
    echo $saburl;
}    elseif($qs == 'Transmission') {
    echo $transmission_web;
}    elseif($qs == 'uTorrent') {
    echo $utorrent_url;
}    elseif($qs == 'XBMC') {
    echo str_replace("vfs/","",$xbmcimgpath);
}    elseif($qs == 'HeadPhones') {
    echo $HEADPHONES_URL;
}    elseif($qs == 'JDownloader') {
    echo $jd_weburl;
}    elseif($qs == 'SubSonic') {
    echo $subsonicurl;
}
?>
Instead of using elseif's I want to try and load the array from the config.php from $navlinks and $subnavlinks and use the variables specified to show the correct pages. This would then keep MFP loaded, even when visiting external sites. That way, programs.php will never need to be editted. Smile

Thanks, it's virtually ready. There's only one thing I haven't been able to figure out, other than being messy as hell that is.

Ye, definitely should arrange things as an array, kind of like the way I extended your nav menu. But this is exactly the problem I'm having in the settings page. The widgets that make use of arrays for their variables haven't been implemented yet because I'm not sure how to parse that information in a config.ini file. Still need some more research there...



BTW to everyone, I've created a How To video on getting MFP running on OS X. Hopefully will make it easier on new users. Want to make one for Linux and Windows too but don't have those on me right now. I'm also using the INI branch in the video...

http://www.youtube.com/watch?v=dntYWidWYzc


- guy_smiley:) - 2011-07-10

gugahoi Wrote:It look like your problems are completely different than what I thought. Are your reverse proxies working at all?

As in, if I go to myurl.com/tvshows, /sabnzbd, etc.
Yes they work perfectly. I'm thinking of changing the port that the webserver is running on. Seeing as it's trying to log into my router, maybe another port will work.

EDIT:
Didn't work, still loads the router's login page.

I keep coming back to that REMOTE_HOST in the wSystem.php, would it be a loopback in the NAT for my port forwards?

Will try a new modem when I get home from work on Wednesday... unless anyone can think of anything else, maybe a proxy or something webserver based?