Hi this will help you to add an add to bookmarks script to your site.
Edit: js/myjavascriptfx.js
Add the following to the bottom of the above file:
Code:
// Add to favorites - BEGIN
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);
}
// Add to favorites - END
Next in you templates/footer.tpl fit this into your template somewhere:
You can see it in action at : http://www.youtwatonline.com at the footer of the site.
Enjoy,
Mat.
P.S You can add this to header.tpl instead of footer.tpl but do not add it to footer.tpl and header.tpl at the same time or your get an error.
Bookmarks