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