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

07 Aug 2006, 19:20
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!

08 Aug 2006, 04:36
You spelled favorites wrong but :) nice hack

08 Aug 2006, 05:52
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'

08 Aug 2006, 22:50

Nice hack.

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

14 Aug 2006, 12:07
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 :))

30 Aug 2006, 17:10
Thanks for the hack! I'll install it right away... :)

11 Sep 2006, 21:28
Great hack, thanks *clicks install*

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

12 Sep 2006, 22:09
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?

13 Sep 2006, 14:31
Nice one. It installed easily and works fine in IE 6.0 on a PC.

However it add to favourites OK in Firefox 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?

02 Oct 2006, 00:58
nice hack zero issues with 3.6.0
Thxs mate

08 Feb 2007, 05:47
The hack works on my forum root, but not on my forum subdirectory:


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?


08 Feb 2007, 06:02
/me installed on test site

14 Mar 2007, 20:40
i'm having probs on my site ... www.obkrew.net

14 Mar 2007, 20:55
Has minor bugs :|

24 Mar 2007, 11:21
On firefox isn't functionally... why?

24 Mar 2007, 12:09
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.