Bookmark, home page code

Discussion in 'HTML & Website Design' started by ki3000, Aug 3, 2008.

  1. #1
    HI. I was wondering if someone can tell me where i can find a script or code to add to my page so that people can add my site as their home page or bookmark it if they wanted to. i tried dynamic drive but wasn't that helpful.

    thanks.
     
    ki3000, Aug 3, 2008 IP
  2. automatic

    automatic Peon

    Messages:
    26
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    So far I've been using this one and it works perfect for me:

    paste this between your <head> tags:

    <script type="text/javascript">
    
    function bookmark_us(url, title){
    
    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>
    Code (markup):
    This is your bookmarks link:
     
    automatic, Aug 3, 2008 IP
  3. twistedspikes

    twistedspikes Notable Member

    Messages:
    5,694
    Likes Received:
    293
    Best Answers:
    0
    Trophy Points:
    280
    #3
    I've got one I made to use on my site that I know works in the latest versions of IE, FF and Opera (so IE7, FF2 and 3, Opera 9):

    I put this in a file called bookmark.js

    function bookmarksite(title,url){
    if (window.sidebar)
    	window.sidebar.addPanel(title, url, "");
    else if(window.opera && window.print){
    	var elem = document.createElement('a');
    	elem.setAttribute('href',url);
    	elem.setAttribute('title',title);
    	elem.setAttribute('rel','sidebar');
    	elem.click();
    } 
    else if(document.all)
    	window.external.AddFavorite(url, title);
    }
    Code (markup):
    Then add this to the head section of my site:

    <script type="text/JavaScript" src="http://www.freedivs.com/javascript/bookmark.js"></script>
    Code (markup):
    Then add this as the bookmark link:

    <a href="javascript:bookmarksite('Site Name', 'URL')" title="bookmark" id="bookmark-link">Bookmark Us</a>
    Code (markup):
     
    twistedspikes, Aug 3, 2008 IP
  4. ki3000

    ki3000 Active Member

    Messages:
    361
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    60
    #4
    thanks both. I am going to try these. Is there one for making the site your homepage?
     
    ki3000, Aug 5, 2008 IP
  5. twistedspikes

    twistedspikes Notable Member

    Messages:
    5,694
    Likes Received:
    293
    Best Answers:
    0
    Trophy Points:
    280
    #5
    Found this but i've not used it, nor looked at the code properly, so can't say if it works or not.
     
    twistedspikes, Aug 6, 2008 IP
  6. niceilike

    niceilike Active Member

    Messages:
    1,133
    Likes Received:
    16
    Best Answers:
    0
    Trophy Points:
    80
    #6
    Check these guys out:

    http://addthis.com/

    You can bookmark for homepage and also social bookmark
     
    niceilike, Aug 6, 2008 IP
  7. ki3000

    ki3000 Active Member

    Messages:
    361
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    60
    #7
    Here is a list of what they said they can do, where does it say about making the site your homepage or to bookmark it (in the browser - not social bookmarks)

    » Easy Bookmarking & Sharing
    » Spreads Your Content
    » Removes Clutter
    » Fast and Reliable
    » Easily Customizable
    » For Websites and Blogs
    » Completely Free
     
    ki3000, Aug 10, 2008 IP