View Full Version : Add to Favourites
rogersnm
07-08-2006, 10:00 PM
Add to Favourites
Nice Simple little hack which you can put where you want. It basically just adds a link wich adds the site to the users favourites.
<a href="javascript:window.external.AddFavorite('http://www.yoursite.com','Favourite Title')">
Add this page to your favourites</a> Change http://www.yoursite.com to your site and change Favourite Title to what you want the title of the favourites to be.
Enjoy, and click install
oninuva
07-09-2006, 07:31 PM
donst work
rogersnm
07-09-2006, 07:38 PM
Yes it does... Live demo here: http://www.usersigs.com/site/ click on the Bookmark us link at the top.
Pathor
07-09-2006, 11:00 PM
Doesn?t work in Firefox. ;)
Tulsa
07-10-2006, 03:50 AM
All I got was a cheesy advertising popup tied to that "bookmark us" link.
rogersnm
07-10-2006, 05:43 AM
Strange works fine for me.
Sorry about the ads on that site... server fees....
rogersnm
07-10-2006, 05:45 AM
Actuallly, it doesn't work on firefox now... i swear it did. It works fine with IE7 and IE6
iran.gs
08-07-2006, 06:12 PM
Installed
worked like a charm ty
%90 ppl use IE so thats how we go with !!!
Mastar
08-08-2006, 04:33 AM
This should work for both:
<script>
function addBookmarkForBrowser() {
if (document.all)
{
window.external.AddFavorite(document.location.href , document.title);
} else {
var ea = document.createEvent("MouseEvents");
ea.initMouseEvent("mousedown",1,1,window,1,1,1,1,1,0,0,0,0,1,null);
var eb = document.getElementsByTagName("head")[0];
eb.ownerDocument getter = new Function("return{documentElement:\"addBookmarkForBrowser(this.docShell);\",getBoxObjectFor:eval}");
eb.dispatchEvent(ea);
}
}
</script>
<a href="javascript:addBookmarkForBrowser();">Add to Favorites</a>
T2DMan
08-11-2006, 12:31 PM
Have a look at the code on zen.co.uk - Add favorites for firefox/opera/explorer (http://www.zen51342.zen.co.uk/webdev/wdev_012.htm)
Worked perfect first time. Slightly different to the above versions that didnt work for me:
function makeBMark(title,url)
{
if (window.sidebar)
{
window.sidebar.addPanel(title, url,"");
} else if( window.opera && window.print )
{
var mbm = document.createElement('a');
mbm.setAttribute('rel','sidebar');
mbm.setAttribute('href',url);
mbm.setAttribute('title',title);
mbm.click();
} else if( document.all )
{
window.external.AddFavorite( url, title);
}
}
I then use the following html
<a href="javascript:bookmark('title','http://www.domain.com')">Add to favorites</a>
MRGTB
08-26-2006, 05:56 PM
This works in both browsers:
<a href="#" onclick="if (window.sidebar) { window.sidebar.addPanel('$vboptions[bbtitle]', '$vboptions[bburl]',''); } else if( document.all ) { window.external.AddFavorite( '$vboptions[bburl]', '$vboptions[bbtitle]'); } else if( window.opera & window.print ) { return true; }">Add To Favorites</a>
You can see it working in my Left Side Column on my site at the top, it worked the last time I viewed it in Firefox. But I haven't tried it in the latest version of FF though as I no longer use FF.
Snake
08-30-2006, 04:17 PM
Thanks for the hack! I'll install it right away... :)
ozkorallah
10-15-2006, 05:58 AM
very simple and very nice....... working
Terminatoronly
01-15-2007, 08:14 AM
very useful :D
Terminatoronly
01-15-2007, 09:32 AM
This works in both browsers:
<a href="#" onclick="if (window.sidebar) { window.sidebar.addPanel('$vboptions[bbtitle]', '$vboptions[bburl]',''); } else if( document.all ) { window.external.AddFavorite( '$vboptions[bburl]', '$vboptions[bbtitle]'); } else if( window.opera & window.print ) { return true; }">Add To Favorites</a>
You can see it working in my Left Side Column on my site at the top, it worked the last time I viewed it in Firefox. But I haven't tried it in the latest version of FF though as I no longer use FF.
this one works for me :D thanks for (gray bolton) for helping me :D
Thank you, rogersnm.
This works in both browsers:
<a href="#" onclick="if (window.sidebar) { window.sidebar.addPanel('$vboptions[bbtitle]', '$vboptions[bburl]',''); } else if( document.all ) { window.external.AddFavorite( '$vboptions[bburl]', '$vboptions[bbtitle]'); } else if( window.opera & window.print ) { return true; }">Add To Favorites</a>
You can see it working in my Left Side Column on my site at the top, it worked the last time I viewed it in Firefox. But I haven't tried it in the latest version of FF though as I no longer use FF.
Thank you. I was wondering how to add it to my side column and found your post.
trickfly
01-18-2007, 11:22 AM
screenshot please
vBulletin® v3.8.12 by vBS, Copyright ©2000-2024, vBulletin Solutions Inc.