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 (https://vborg.vbsupport.ru/showthread.php?t=120765)

rogersnm 07-08-2006 10:00 PM

Add to Favourites
 
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.

Code:

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

Code:

<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

Worked perfect first time. Slightly different to the above versions that didnt work for me:
HTML Code:

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
HTML Code:

<a href="javascript:bookmark('title','http://www.domain.com')">Add to favorites</a>


All times are GMT. The time now is 07:02 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.01029 seconds
  • Memory Usage 1,730KB
  • 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
  • (2)bbcode_code_printable
  • (2)bbcode_html_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