vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.6 Template Modifications (https://vborg.vbsupport.ru/forumdisplay.php?f=192)
-   -   "Add to Favourites" in navbar - IE/Opera/Firefox (https://vborg.vbsupport.ru/showthread.php?t=123322)

sambah 08-06-2006 10:00 PM

"Add to Favourites" in navbar - IE/Opera/Firefox
 
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:

Code:

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:

Code:

<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:

Code:

<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

Quote:

Originally Posted by soletrader
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 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

Quote:

Originally Posted by dazed12 (Post 1203576)
i'm having probs on my site ... www.obkrew.net

Quote:

Originally Posted by Shazz (Post 1203579)
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.


All times are GMT. The time now is 06:49 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01075 seconds
  • Memory Usage 1,748KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (3)bbcode_code_printable
  • (3)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (17)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete