PDA

View Full Version : "Add to Favourites" in navbar - IE/Opera/Firefox


sambah
08-06-2006, 10:00 PM
This is my first hack so go gentle. Its also tiny!

What it does?

This hack adds an "Add to Favourites" Button in your navbar, which the user can click on to add the forum to their favourites.

Install Time: 2 Minutes
Templates to Edit: 1
Files to edit: 1

Install Instructions:

1. Open your ftp client and navigate to forumroot/clientscript
2. Open vbulletin_global.js to edit

Add this to the file anywhere:

function addBookmark(title,url) {
if (window.sidebar) {
window.sidebar.addPanel(title, url,"");
} else if( document.all ) {
window.external.AddFavorite( url, title);
} else if( window.opera && window.print ) {
return true;
}
}

3. Close the file and reupload it to your server

4. Go to edit templates and open the template navbar

Look for:

<td id="navbar_search" class="vbmenu_control"><a href="search.php$session[sessionurl_q]" accesskey="4" rel="nofollow">$vbphrase[search]</a> <script type="text/javascript"> vbmenu_register("navbar_search"); </script></td>

Below it add:

<td id="navbar_favourites"
class="vbmenu_control"><a href="#" onmousedown="addBookmark('Teensay Forums','http://www.teensay.co.uk/boards/')" onmouseover="return overlib('Bookmark us.');">Add to Favourites</a> <script
type="text/javascript"> addBookmark("title"); </script></td>

5. Save the template

6. Click install

and you're done. :)

Hope this helps somebody!

soletrader
08-08-2006, 03:36 AM
You spelled favorites wrong but :) nice hack

Mastar
08-08-2006, 04:52 AM
You spelled favorites wrong but :) nice hack


Actually its not spelt wrong. Europeans and most of the world spells it 'Favourites' and Americans spells it 'Favorites'

almukmin
08-08-2006, 09:50 PM
<removed>

Nice hack.

Paul M
08-09-2006, 07:42 AM
Post edited, in future don't be offensive please.

djtheropy
08-14-2006, 11:07 AM
Hi, installed and during testing it worked in IE, FF & Netscape but did not seem to work in Opera 9.01. (im not worried about this just thought i would let u know :))

Snake
08-30-2006, 04:10 PM
Thanks for the hack! I'll install it right away... :)

Triggerhappy
09-11-2006, 08:28 PM
Great hack, thanks *clicks install*

In use here Eugaming.net (http://www.Eugaming.net) if you want to see how it looks :)

yinyang
09-12-2006, 09:09 PM
is there a way to use this and have the "favourites" button correspond to individual threads?

for example, let's say there's a great thread... can you click on favourite sand add that particular URL and also reference that URL in the favorites folder?

perfphysio
09-13-2006, 01:31 PM
Nice one. It installed easily and works fine in IE 6.0 on a PC.

However it add to favourites OK in Firefox 1.5.0.6 but when you cl;ick on it in the bookmarks list it opens in a split windw on the left of screen as if we opened the whole bookmarks bar in the left column of the screen. It does not do this for other links in my list so I am wondering if this is a code issue?

oberheimhaven
10-01-2006, 11:58 PM
nice hack zero issues with 3.6.0
Thxs mate
MArkAnthony

FreshPrince
02-08-2007, 04:47 AM
The hack works on my forum root, but not on my forum subdirectory:

http://www.politicsforumpoliticalworld.com/forum/

I have the link in the navbar under "Click here to BOOKMARK this Site"


I uploaded the vbulletin_global.js file to the client script folder in my forum root and my forum folder. What else can I do to make this work on all locations on my site?

Thanks

Shazz
02-08-2007, 05:02 AM
/me installed on test site

dazed12
03-14-2007, 07:40 PM
i'm having probs on my site ... www.obkrew.net

Shazz
03-14-2007, 07:55 PM
Has minor bugs :|

siriuxs
03-24-2007, 10:21 AM
On firefox isn't functionally... why?

PoetJA-1975
03-24-2007, 11:09 AM
i'm having probs on my site ... www.obkrew.net

Has minor bugs :|

um... I think it would be nice if YAWL posted the issues so that the modification author can at least have a clue as to how to fix :)

Anyway - seems like a nice modification - Because of the file edit - I'll just wait till it works perfectly though...

Thanx for the share.

Jacquii.