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?


All times are GMT. The time now is 12:32 PM.

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.01574 seconds
  • Memory Usage 1,737KB
  • 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
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete