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)



- gugahoi - 2011-06-30

DejaVu Wrote:Added you to my collaborators on Git Gugahoi (assumed you was one already!) , would love some help with this.

Although I'm getting there and learning PHP at a relatively good speed, I'm still a total n00b and would appreciate some pointers! Soooo much to learn! Smile

Cool, I'll do pull requests tho. This way you can choose to accept them if you want.

I also forgot to say, but you should look at the code on CrazyLayouts branch. The iframe widget was already implemented there. Some of the stuff might also help you with some ideas.


- Archigos - 2011-07-01

DejaVu Wrote:Navbar should be able to be styled the same as the rest of MFP in the future. This will still need some work (and hopefully some kind assistance), but if you want to see how it works, it is on my Repo at here now.

gugahoi Wrote:1: don't use absolute path on your links, not everyone has xbmclive as their URL so refrain from hardcoding those.

Deja, not sure if gugahoi helped out on this part yet, but it's a simple change in nav.php from:
[HTML]<ul id="navigation">
<li class="mfp"><a href="/"><H3>Widgets</H3></a></li>
<li class="xbmc"><a href="http://xbmclive/programs.php?p=XBMC"><H3>XBMC</H3></a></li>
<li class="sickbeard"><a href="http://xbmclive/programs.php?p=SickBeard"><H3>Sickbeard</H3></a></li>
<li class="couchpotato"><a href="http://xbmclive/programs.php?p=CouchPotato"><H3>CouchPotato</H3></a></li>
etc.[/HTML]
to:
[HTML]<ul id="navigation">
<li class="mfp"><a href="./"><H3>Widgets</H3></a></li>
<li class="xbmc"><a href="./programs.php?p=XBMC"><H3>XBMC</H3></a></li>
<li class="sickbeard"><a href="./programs.php?p=SickBeard"><H3>Sickbeard</H3></a></li>
<li class="couchpotato"><a href="./programs.php?p=CouchPotato"><H3>CouchPotato</H3></a></li>
etc.[/HTML]

One other thing I noticed real quick, I'm not sure if it's a Windows thing or not (I never had to do this with the master branch) but with your type of navigation I had to change the $utorrent_url address near the very bottom of the config.php from: $utorrent_url = "http://$uTorrentlogin"."$uTORRENT_IP:$uTORRENT_PORT/"; to $utorrent_url = "http://$uTorrentlogin"."$uTORRENT_IP:$uTORRENT_PORT/gui/"; to get it to load inside the frame, plus no matter how much fiddling around I've tried so far, I can't get Headphones to load inside the fame. Everything appears set correctly (address/port wise) but it loads blank. However if I switch back to my 'production version' of MFP and click the Headphones link it works fine. My guess is that it has something to do with the way it's passed through the programs.php and I'll look more into it if it's something you haven't come across yet.

Hope this helps.


- DejaVu - 2011-07-01

gugahoi Wrote:1: don't use absolute path on your links, not everyone has xbmclive as their URL so refrain from hardcoding those.
FIXED - that was a mistake. Wink
gugahoi Wrote:2: your new menu doesn't seem to be configurable from config file, are you planning on doing that?
DAM! FIXED THAT!
URL Variables will need checking/updating though - TVHeadend is missing BTW.
gugahoi Wrote:3: Maybe you should consider not coding the images of the menu in CSS. Otherwise it will not be configurable and people will ave different programs running. We may not be able to have images for all of them so it would be nice to allow them to choose where the image is. And possibly have a general icon like a question mark os something if no image is found.
Fix... Er... Sorted. Smile, I'm planning on making ALL the images for ALL the programs and will even make them by request. What I am hoping to do is call the Program by it's name program?p=SickBeard and introduce the exact png name too into it - SickBeard.png. As well as pulling the Header of the Widget from the URL Call too. Make sense?

--EDIT-- an already generated variable helped solve this. Take a look in Nav.php at lines 40 & 41 file for the edit I made. Pretty clever I think. Smile
gugahoi Wrote:4: The config page does not have the nav. Any chance of adding it there?
FIXED - And looks the nuts IMO!

5. Unnoticed by me til now. Logging out is not actually logging out.
Logout loads the Login page, but does not kill the session.
FIXED

6. Because the Nav.php is now on every page, it will check that you are logged in on every page load - once I get it working properly again that is. Smile
FIXED

--UPDATE--
Really REALLY REALLY Pleased with the way this has worked out. I would almost consider this update a total success. Take a look. Lots of edits the last few hours, but hey - t'was worth it. Smile

https://github.com/DejaVu77/mediafrontpage

All it needs now is the CSS collaborating so it can be edited in the future. That being said, I think the !Important tag, should overpower the settings, but dont quote me as yet.


- Archigos - 2011-07-01

Deja,
Great updates, it seems to load even faster for me now, but still have just a couple small problems.
In nav.php on line 37 you link to the web-root to take you back to MFP's home, but for those that run this in a sub directory it kind of 'breaks' MFP by taking them a directory (or more) too far. Changing "/" to "./" calls the current directory, solving the problem.

[HTML]<li class="MFP"><a href="/"><H3>Widgets</H3></a></li>[/HTML]
[HTML]<li class="MFP"><a href="./"><H3>Widgets</H3></a></li>[/HTML]

I can't be 100% sure, but I believe before you integrated the Nav into the Config page, the editor took up the entire frame, but as you can see below it no longer does...
Image

I still noticed the uTorrent thing I mentioned in my last post, but since no one seems to comment on that, I assume it's either something to do with my system or possibly the fact I run MFP out of a sub directory, but leaving the "$utorrent_url" variable alone near the bottom of the config.php gives me what you see in the first screenshot below, however, appending "/gui/" gives me the correct screen (second screenshot)
Image
Image

I really hope I'm not somehow coming across as a dick, I don't mean to be and I really love this project you guys are working on and would find some way to donate again if I could (I donated directly to XBMC on Nick's behalf).
If there's anyway I can help out, let me know, I'm still out of work on disability (4+ years and counting) so I have a LOT of time on my hands.


- Archigos - 2011-07-01

I'm sure Deja and some of the others are already planning on ways to add more links/apps via the new style Nav, but if people could post links to some of the more popular ones I could start adding them and attempting to create icons if needed.

I noticed you already had an icon in there for Trakt, so I started with that. (However for now, the Username is hard-coded, although easy to change)
Image


- gugahoi - 2011-07-01

DejaVu Wrote:DAM! FIXED THAT!
URL Variables will need checking/updating though - TVHeadend is missing BTW.

Feel free to add it in, I don't use it so must have forgotten. But remember the variables are only needed if we have widgets using them. Otherwise there is no point in having them yet. Hopefully soon there will be for headphones.

DejaVu Wrote:Fix... Er... Sorted. Smile, I'm planning on making ALL the images for ALL the programs and will even make them by request. What I am hoping to do is call the Program by it's name program?p=SickBeard and introduce the exact png name too into it - SickBeard.png. As well as pulling the Header of the Widget from the URL Call too. Make sense?

--EDIT-- an already generated variable helped solve this. Take a look in Nav.php at lines 40 & 41 file for the edit I made. Pretty clever I think. Smile

I've got some suggestions regarding that one. To start off, I think the iframe should be a widget like it was done on the crazyLayouts branch. Secondly, assigning url's to strings is not very practical. I think a possible change in the way the $navbar variable is done could fix this. In my mind a way to do this is have the user input the url and img paths this way tackling both problems.

I will fork from you and do this then make a pull request so in case you my method you can choose to accept it.

DejaVu Wrote:Really REALLY REALLY Pleased with the way this has worked out. I would almost consider this update a total success. Take a look. Lots of edits the last few hours, but hey - t'was worth it. Smile

You should be, it's looking good. I am also only giving some advice as I know you're trying to learn so don't wanna code everything and say there you are.

Good job!


- gugahoi - 2011-07-01

Archigos Wrote:In nav.php on line 37 you link to the web-root to take you back to MFP's home, but for those that run this in a sub directory it kind of 'breaks' MFP by taking them a directory (or more) too far. Changing "/" to "./" calls the current directory, solving the problem.

[HTML]<li class="MFP"><a href="/"><H3>Widgets</H3></a></li>[/HTML]
[HTML]<li class="MFP"><a href="./"><H3>Widgets</H3></a></li>[/HTML]

That's also happening to me. Will fix it up.

Archigos Wrote:I can't be 100% sure, but I believe before you integrated the Nav into the Config page, the editor took up the entire frame, but as you can see below it no longer does...
Image

It's working fine for me. Still taking up the full frame. Is that firefox you're using?

Archigos Wrote:I still noticed the uTorrent thing I mentioned in my last post, but since no one seems to comment on that, I assume it's either something to do with my system or possibly the fact I run MFP out of a sub directory, but leaving the "$utorrent_url" variable alone near the bottom of the config.php gives me what you see in the first screenshot below, however, appending "/gui/" gives me the correct screen (second screenshot)
Image
Image

I don't use uTorrent that's why I didn't say anything. But I believe you might be right. If someone else could confirm this we could fix it up.
Archigos Wrote:I really hope I'm not somehow coming across as a dick

Don't worry you're not


- Archigos - 2011-07-01

gugahoi Wrote:It's working fine for me. Still taking up the full frame. Is that firefox you're using?

Firefox 5, haven't tried any other browsers yet since it's the one I mainly use.

P.S. Feel free to call me a dick Big Grin


- gugahoi - 2011-07-01

Archigos Wrote:Firefox 5, haven't tried any other browsers yet since it's the one I mainly use.

P.S. Feel free to call me a dick Big Grin

Hahaha funny man. I just checked that on firefox and you are right. it works fine on chrome tho. I've applied some fixes on Deja's thing, the branch is called Patch if you want to check it out. Nothing major as I want to give Deja a chance to learn with his code.


- Archigos - 2011-07-01

gugahoi Wrote:Hahaha funny man. I just checked that on firefox and you are right. it works fine on chrome tho. I've applied some fixes on Deja's thing, the branch is called Patch if you want to check it out. Nothing major as I want to give Deja a chance to learn with his code.

Not a problem, I remember those days... granted with all my medical issues, my memory sucks and sometimes it feels like I'm still learning the basics, that's why I was trying to be careful with the way I worded it earlier (hence the being a dick comment) as I didn't want to say "No, do this" and plop out code...

Note to Deja: From what I've noticed in your code progression you're catching on fast and I'm impressed, there's some spots in the code (not sure exact author on certain parts) that I looked at it and was like "Why do that? Oh wait, that works and is a hell of a lot more efficient than what I would have done"...


- DejaVu - 2011-07-01

Thanks for the encouragement lads.

Will take a look at your suggestions and definitely the Patch Branch and make a mental note of the improvements.

I think the uTorrent URL also needs an extra bit at the end if memory serves the last time I used that. [noparse]http://utorrentip:port/gui/[/noparse] ?

--EDIT--
Just notcied Archigos's /gui/ bit, thought so!

Going to install it, just to test it! Wink


- Archigos - 2011-07-01

Deja... Tongue Wondered when you'd notice that... Anyway, feel free to contact me if you need any help and I'll try my best.


- dr.energy - 2011-07-01

Hello, first of all i want to thank all of you guys for this amazing application! This was the last thing i was missing. Today i downloaded al the new files from the repository, after i changed my config the frontpage is still working. But i cannot access sickbeard, coach patato, xbmc etc. When i click the link he directing me to the full site and not in MFP itself.

Im using WAMP on a windows server. Sickbeard, coach patato and sabnzdb are also running on this server and xbmc is located on another system.

Please can you help me?


- Archigos - 2011-07-01

dr.energy Wrote:Hello, first of all i want to thank all of you guys for this amazing application! This was the last thing i was missing. Today i downloaded al the new files from the repository, after i changed my config the frontpage is still working. But i cannot access sickbeard, coach patato, xbmc etc. When i click the link he directing me to the full site and not in MFP itself.

Im using WAMP on a windows server. Sickbeard, coach patato and sabnzdb are also running on this server and xbmc is located on another system.

Please can you help me?

A few more details are needed, are you using the main repo, Deja's, gugahoi's, or a different one? Are you using Reverse Proxies? Any extra info (including screenshots) could help.


- dr.energy - 2011-07-01

hi Archigos

Sorry here are the details:

I just downloaded everything in the Deja's repo (DejaVu77-mediafrontpage-34f5d40.zip)

When i click on sickbeard i get the following error in the page where sickbeard should open

Forbidden

You don't have permission to access /<br /><font size= on this server.

Im not using reverse proxies cause i dont know how to config it and i dont think i need it?