Subsonic audio not working as part of $navlink

Third-party modifications and add-ons, Apps and Clients

Moderator: moderators

Subsonic audio not working as part of $navlink

Postby steve1977 » Wed Jul 06, 2011 3:06 pm

I was trying to integrate subsonic into my existing page (clicking on a navbar, it was supposed to pull the full subsonic page allowing me to click to play audio and video). Using PHP command $navlink.

It works for videos, but not for audio. Reason appears that not all frames are disaplayed. Actually basically only the main fame is displayed...
steve1977
 
Posts: 20
Joined: Wed Jul 06, 2011 8:10 am

Link it to the index.jsp

Postby trickydick » Sun Jul 10, 2011 3:47 am

Not really sure what you are trying to do.
Since subsonic uses frames (multiple pages in one main frame), you will only get the page you link to. You will have to link to the index.jsp page to get all the comonents.

Subsonic structure is such:

Code: Select all
-------------------------------------------------------------
|                         top.jsp                           |
-------------------------------------------------------------
|               |                            |              |
|  left.jsp     |         home.jsp           |   right.jsp  |
|               |                            |              |
|               |----------------------------|--------------|
|               |                                           |
|               |                playlist.jsp               |
|_______________|___________________________________________|

Tricky
User avatar
trickydick
 
Posts: 147
Joined: Wed Mar 30, 2011 12:43 am
Location: Sanford, North Carolina

Re: Link it to the index.jsp

Postby steve1977 » Sun Jul 10, 2011 1:12 pm

trickydick wrote:Not really sure what you are trying to do.
Since subsonic uses frames (multiple pages in one main frame), you will only get the page you link to. You will have to link to the index.jsp page to get all the comonents.


Thanks for your reply. This is indeed driving me crazy and I don't know what I am doing wrong.

What I am trying to achieve is to display all frames you outline below underneath my personal navigation bar. Result should look as follows:

Code: Select all
-------------------------------------------------------------
|my navigation bar incl. links to subsonic    |
-------------------------------------------------------------
-------------------------------------------------------------
|                         top.jsp                           |
-------------------------------------------------------------
|               |                            |              |
|  left.jsp     |         home.jsp           |   right.jsp  |
|               |                            |              |
|               |----------------------------|--------------|
|               |                                           |
|               |                playlist.jsp               |
|_______________|___________________________________________|



It actually works with the $navlink comment. And actually on first click everything works exactly as outlined above. So far so good. What is strange is that when I then click any link in "left.jsp", the screen changes and looks like:


Code: Select all
-------------------------------------------------------------
|my navigation bar incl. links to subsonic    |
-------------------------------------------------------------
-------------------------------------------------------------
|                                                              |
|                             home.jsp                    |
|                                                              |
-------------------------------------------------------------


No clue why this is happening as it first initially (on click on my navbar) and only messes up on click in left.jsp.

Any idea? Your help is hugely appreciated!!!
steve1977
 
Posts: 20
Joined: Wed Jul 06, 2011 8:10 am

Link Target

Postby trickydick » Sun Jul 10, 2011 2:26 pm

So you've added a main navigation buttons on top right? Does this replace the top menu of subsonic? If your navigation bar loads all the frames, are you using your own frame structure or subsonics index.jsp?
Each frame needs a name, like left, main, right, etc. then you need to target those names in order to change the appropiate page.

Are you targeting the link like this <a href="" target="main">?
Tricky
User avatar
trickydick
 
Posts: 147
Joined: Wed Mar 30, 2011 12:43 am
Location: Sanford, North Carolina

Re: Link Target

Postby steve1977 » Sun Jul 10, 2011 3:41 pm

trickydick wrote:So you've added a main navigation buttons on top right? Does this replace the top menu of subsonic?


You are right. I have added a main navigation bar on-top. This navbar allows me to pull underneath subsonic (on-click) or google or any other applications I have running on my computer. The top-menu of subsonic remains on first-click (which it is supposed to do), but then disappears with all other frames (except "my" top-bar" and the "main-subsonic" one on click of anything in the left frame of subsonic.

trickydick wrote:If your navigation bar loads all the frames, are you using your own frame structure or subsonics index.jsp?
Each frame needs a name, like left, main, right, etc. then you need to target those names in order to change the appropiate page.


I am not surel, but thought I had kept it as maximum simplicity (i.e., subsonic's frame structure. Below how I am pulling this up and also all other things from my navbar.

$navlink;
$navlink["TRAKT"] = 'http://trakt.tv/movies/watchers/daily';
$navlink["Subsonic"] = 'my-personal_URL/subsonic';
[[ note: remark, I am using reverse proxies. When typing directly "my-personal_URL/subsonic", everything works perfectly, but then of course without my personal top-nav-bar ]]
$navlink["XBMC Forum"] = "http://forum.xbmc.org";


Any thoughts?
steve1977
 
Posts: 20
Joined: Wed Jul 06, 2011 8:10 am

PHP coding

Postby trickydick » Sun Jul 10, 2011 4:45 pm

I think i understand now. I'm not very familiar with PHP, I'm actully an ASP developer (odd i know). But in all web code, most things follow the same rules and all code has to be translated to html...

To understand this part:
Code: Select all
$navlink;
$navlink["Subsonic"] = 'my-personal_URL/subsonic';


This is just an array you set using $navlink as a variable. True? Then in your html code, you are putting the PHP code in a menu of some sort. But somehow that menu calls the variable and then writes it in html for the browser. Whats the html code (include the PHP code) tha uses $navlink. i bet somewhere in that html code is something of this sort...

Code: Select all
<a href="<?php $navlink;?>"><?php $navlink[];?></a>


Thats just an example may not be fully correct.

my next question is: instead of providing just the links for the html code in the $navlink like ..

Code: Select all
$navlink["Subsonic"] = 'my-personal_URL/subsonic';


Coul you instead do this:

Code: Select all
$navlink["Subsonic"] = "<a href='my-personal_URL/subsonic' target='main'">Subsonic</a>


My php code may be off a little. then in the html portion, remove the <a href></a>
Tricky
User avatar
trickydick
 
Posts: 147
Joined: Wed Mar 30, 2011 12:43 am
Location: Sanford, North Carolina


Return to Mods, Apps and Clients

Who is online

Users browsing this forum: No registered users and 3 guests