Bookmarking

Discussion in 'HTML & Website Design' started by Kokiri Kid, Jun 25, 2007.

  1. #1
    This may sound noobish lol . . . but here we go.

    How do I place a link on my site, that will enable someone to click on it and it will automatically add the site to their bookmarks or favourites.

    I have seen thhis on many sites.

    Thanks
     
    Kokiri Kid, Jun 25, 2007 IP
  2. mgrohan

    mgrohan Active Member

    Messages:
    671
    Likes Received:
    18
    Best Answers:
    0
    Trophy Points:
    58
    #2
    Insert this code where you want the bookmark link to appear. Won't work in firefox, but you will get this to instruct the user 'Bookmark this Page (Ctrl+D)'

    <script>
    var txt = "Bookmark this Page"
    var url = "http://www.yoursite.com";
    var who = "Your bookmark title"
    var ver = navigator.appName
    var num = parseInt(navigator.appVersion)
    if ((ver == "Microsoft Internet Explorer")&&(num >= 4)) {
    document.write('<A HREF="javascript:window.external.AddFavorite(window.location,who);" ');
    document.write('onMouseOver=" window.status=')
    document.write("txt; return true ")
    document.write('"onMouseOut=" window.status=')
    document.write("' '; return true ")
    document.write('">'+ txt + '</a>')
    }else{
    txt += " (Ctrl+D)"
    document.write(txt)
    }
    </script>
     
    mgrohan, Jun 25, 2007 IP
  3. Kokiri Kid

    Kokiri Kid Peon

    Messages:
    218
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Wow thanks mgrohan, very fast reply. Repped +
     
    Kokiri Kid, Jun 25, 2007 IP
  4. deathshadow

    deathshadow Acclaimed Member

    Messages:
    9,732
    Likes Received:
    1,999
    Best Answers:
    253
    Trophy Points:
    515
    #4
    Even though you should never actually do that as it usually just pisses off the users passing through your site. If they want to bookmark your site, they'll bookmark it, don't shove the bookmark down their throat.

    To quote "Why the **** did this get added to my favorites? Well, I'm never visiting this piece of **** site again."

    BAD, BAD behavior.
     
    deathshadow, Jun 25, 2007 IP
  5. mgrohan

    mgrohan Active Member

    Messages:
    671
    Likes Received:
    18
    Best Answers:
    0
    Trophy Points:
    58
    #5
    Ummm. it's not automatic bookmarking.

    It is done by the user clicking on a link saying <bookmark this page>
     
    mgrohan, Jun 25, 2007 IP
  6. amanamission

    amanamission Notable Member

    Messages:
    1,936
    Likes Received:
    138
    Best Answers:
    0
    Trophy Points:
    210
    #6
    You can also get an "all purpose" (mostly) Social Bookmarking Widget from a few places- addme.com is one. This enables people to choose which service(s) they want to bookmark your site to, They give you customizable script that seems to work with most of the BM services.
    :)
     
    amanamission, Jun 25, 2007 IP
  7. deathshadow

    deathshadow Acclaimed Member

    Messages:
    9,732
    Likes Received:
    1,999
    Best Answers:
    253
    Trophy Points:
    515
    #7
    So... it's a waste of bandwidth implementing something every browser already has?
     
    deathshadow, Jun 25, 2007 IP