Page 1 of 1

Browser 'Mod'

PostPosted: Thu Jul 14, 2011 5:18 pm
by Qbix
Hi,

Just wanted to let you guys see that I added a browser function which loads
all the pages you look for just in the main frame of subsonic. That way I never have to leave my Subsonic page ever again 8)

Image

For those who are interested, just let me know and I'll post the code :)

i like it

PostPosted: Fri Jul 15, 2011 8:27 pm
by trickydick
interesting, is it just adding a new link menu to top frame then pointing a search engine to it? is it database driven (basically turn on or off, set home page)?

PostPosted: Fri Jul 15, 2011 11:56 pm
by GJ51
I now this might be cheating, but I just added the link as an Internet TV/radio link.

I am so lazy when it comes to doing this sort of thing. :wink:

PostPosted: Sat Jul 16, 2011 9:53 am
by Qbix
Hehehe...it is very easy...the search field just opens the URL you type in the main frame. So the whole main frame acts like a normal browser windows.

Also loading all subpages in the main frame when you click a link.

PostPosted: Sat Jul 16, 2011 11:32 am
by muiz
please post the code

PostPosted: Sun Jul 17, 2011 1:19 pm
by Qbix
Ok...more people may be interested so here's what you've got to do:

1: Download browse.jsp and place it in the folder: ..\subsonic\jetty\2289\webapp\WEB-INF\jsp

2: Open subsonic\jetty\2289\webapp\WEB-INF\jsp\top.jsp

2.1: Put the following line between the <head></head> tags:
Code: Select all
<%@ include file="browse.jsp" %>


2.2. Find:
Code: Select all
<img src="<spring:theme code="searchImage"/>" alt="${search}" title="${search}"></a>
                           </td>
                        </tr>
                        </form>

And below that add:
Code: Select all
                                                         <tr>
                           <td>
                              <input onKeyDown="if (window.event.keyCode==13) navigate();" type="text" value="www.google.nl" onclick="this.value=''" id="TheAddress" name="TheAddress">
                              <input type="button" value="Go" id="AddGo" name="AddGo" onkeypress="navigate()"><br>
                           </td>
                        </tr>


This is it, delete the folder ..\subsonic\jetty\2289\jsp so it rebuilds the jsp and you're done :)

Oh yeah...before I forget: Backup top.jsp before you're going to edit it :)

PostPosted: Sun Jul 24, 2011 1:04 am
by muiz
it works, only the button doesnt, i have to press enter

PostPosted: Fri Aug 05, 2011 11:17 am
by Qbix
muiz wrote:it works, only the button doesnt, i have to press enter


Oops...I see what I did here:
Replace:
Code: Select all
<input type="button" value="Go" id="AddGo" name="AddGo" onkeypress="navigate()"><br>


With:
Code: Select all
<input type="button" value="Go" id="AddGo" name="AddGo" onClick="navigate()"><br>


That's all, the button will work now :)