Bookmark link on Navbar or footer

Smeker

New Member
Bookmark Us! (Add to Favorites) on Navbar or footer.


Q: What this does?
A: It adds a "Bookmark Us" link in your navbar or your footer.


This code is a free source from DynamicDrive.com. Users are NOT allowed to remove the copyrights.

How to install:

In the header template place this at the end of the template:
HTML:
<script type="text/javascript">

/***********************************************
* Bookmark site script- © Dynamic Drive DHTML code library (www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit Dynamic Drive at http://www.dynamicdrive.com/ for full source code
***********************************************/

/* Modified to support Opera */
function bookmarksite(title,url){
if (window.sidebar) // firefox
    window.sidebar.addPanel(title, url, "");
else if(window.opera && window.print){ // opera
    var elem = document.createElement('a');
    elem.setAttribute('href',url);
    elem.setAttribute('title',title);
    elem.setAttribute('rel','sidebar');
    elem.click();
} 
else if(document.all)// ie
    window.external.AddFavorite(url, title);
}
</script>
Now, for the navbar version, search the navbar template for:
PHP:
    <if condition="$show['registerbutton']">
        <td class="vbmenu_control"><a href="register.php$session[sessionurl_q]" rel="nofollow">$vbphrase[register]</a></td>
    </if>
After that, add:
PHP:
        <td class="vbmenu_control"><a href="javascript:bookmarksite('$vboptions[bbtitle]', '$vboptions[bburl]')">Bookmark Us!</a></td>
For the footer version, search the footer template for:
PHP:
                <if condition="$show['contactus']"><a href="$vboptions[contactuslink]" rel="nofollow" accesskey="9">$vbphrase[contact_us]</a> -</if>
Above that, add:
PHP:
                <a href="javascript:bookmarksite('$vboptions[bbtitle]', '$vboptions[bburl]')">Bookmark Us!</a> -
That's about it... tested with Firefox and IE6.
 
Top