Announcement

Collapse
No announcement yet.

Bookmark

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Bookmark

    Hi,

    I tried searching the forum for item relating to Bookmarks but I couldnt find anything. I then saw a notice about search being down. So sorry if this has been answered before.

    I want to create a "Bookmark Now" button on my site. I'd like it to be on everypage. So I think the best option would be to create a new button across the top ie. next to CONTACT US / STORE TOP / HOME etc. In design they are called XXX CSS BUTTON.

    But now do I create a new one?
    If I want it to bookmark my site www.bigmatts.com, what code should it be.

    I have some HTML code will it work?

    <a href="javascript:window.external.AddFavorite('http://www.bigmatts.com', 'Big Matt's Menswear')" style="font-size:12px;color:#ffffff;font-family:verdana;">Bookmark Now</a>

    I'm on 8.5.1 using Executive layout

    Any advice very welcome

    Matt
    Matthew Wildeman
    www.bigmatts.com
    2XL to 8XL Menswear

    #2
    I have this on my site...but I have found that it only works in IE and not FF

    If anyone knows a way to do this so it works in both, I'd be interested too
    Tracey

    Comment


      #3
      Googled "bookmarks firefox" and hey presto...

      The following modified version of "Add to Favorites" javascript code works across IE, Mozilla Firefox and Opera Browsers. Template Tags for Blogger, Movable Type and Wordpress platform are commented.

      Code:
      <script language="JavaScript1.2" type="text/javascript">
       function CreateBookmarkLink() {
      
       title = "Webpage Title"; 
        // Blogger - Replace with <$BlogItemTitle$> 
        // MovableType - Replace with <$MTEntryTitle$>
      
       url = "Webpage URL";
        // Blogger - Replace with <$BlogItemPermalinkURL$> 
        // MovableType - Replace with <$MTEntryPermalink$>
        // WordPress - <?php bloginfo('url'); ?>
      
      	if (window.sidebar) { // Mozilla Firefox Bookmark
      		window.sidebar.addPanel(title, url,"");
      	} else if( window.external ) { // IE Favorite
      		window.external.AddFavorite( url, title); }
      	else if(window.opera && window.print) { // Opera Hotlist
      		return true; }
       }
      
       if (window.external) {
        document.write('<a href = 
           "javascript:CreateBookmarkLink()");">Add to Favorites</a>'); 
        } else  if (window.sidebar) {
        document.write('<a href = 
          "javascript:CreateBookmarkLink()");">Bookmark Page</a>'); 
       } else if (window.opera && window.print) {	
         document.write('<a href =
           "javascript:CreateBookmarkLink()");">Add Bookmark</a>');
       } 
      </script>
      http://labnol.blogspot.com/2006/01/a...k-firefox.html
      "Opportunities multiply as they are seized." - Sun Tzu

      Comment


        #4

        I did Google it, honest!
        LOL

        thanks, Jon..I'll give that a go
        Tracey

        Comment


          #5
          Where to place script

          Thanks JSnow,

          but I'm just a simple boy. Where do I place this script to create a "extra button" on the top row (see previous post)

          Mat
          Matthew Wildeman
          www.bigmatts.com
          2XL to 8XL Menswear

          Comment


            #6
            If you read further down the page linked to above you will see that it may not work as expected in FF. It seems it may only open the sidebar which doesn't help much.

            There's quite a lot of versions of this particular script about on the net - most have the same issues it seems.

            I'd be interested to hear it it works in all browsers as it claims.

            Comment


              #7
              Given. I did not read the user comments. It appears that some got it working and others did not. Suppose it all depends on whether you are brave enough to play with the code or not.

              mpwildeman... I'm not sure how to get a custom button styled as per those. Search for "custom buttons", check the help file and the AUG. If that fails, post the question in the forum. Budgetbumps, Lee, Jont, Drounding and the rest of the oldies might be able to help.

              Alternatively (because it is what I would do)... From what I can tell, this code creates a text link. Place the code below your terms and coditions link (assuming it is also a text link). Dumb logic reasons that people willing to take the time to read your T&C's would more than likely want to bookmark you.
              "Opportunities multiply as they are seized." - Sun Tzu

              Comment


                #8
                This script works for me in IE and FF (both v1.x and v2.x)
                Code:
                <script type="text/javascript">
                
                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);
                }
                </script>
                <a href="javascript:bookmarksite('My Site Name', 'http://www.mysite.com')">Bookmark Us!</a>
                And if you want to use a button instead of the text 'Bookmark Us' then simply replace
                Code:
                <a href="javascript:bookmarksite('My Site Name', 'http://www.mysite.com')">Bookmark Us!</a>
                with
                Code:
                <a href="javascript:bookmarksite('My Site Name', 'http://www.mysite.com')"><img src="your-bookmark-button.gif" width="x" height="x" border="0" alt="Bookmark Us"></a>
                remembering to replace the widths and heights with your values and the button name to be what you want
                Thanks

                Jos Medinger

                Tel : 01978 843 962
                www.internetology.co.uk
                Actinic / E-Commerce Hosting, Design & SEO
                ______________________________________

                Comment


                  #9
                  thanks for that, Jos
                  I couldn't get the previous code to work at all, I'll have a play with that later
                  Tracey

                  Comment


                    #10
                    one liner, for IE only:
                    HTML Code:
                    <a href="javascript:window.external.AddFavorite('http://www.website.co.uk','This is the title of the bookmark')">Add to favourites</a>

                    Comment


                      #11
                      Originally posted by gabrielcrowe
                      one liner, for IE only:
                      HTML Code:
                      <a href="javascript:window.external.AddFavorite('http://www.website.co.uk','This is the title of the bookmark')">Add to favourites</a>
                      isn't that essentially what the OP said?
                      (ok so there was some styling added in but that's not the point)
                      I did comment that his code in the original post would only work in IE too...do pay attention, Gabe
                      Tracey

                      Comment


                        #12
                        oops. i actually meant this:
                        HTML Code:
                        !!<<a href="javascript:var title='My title'; var url='http://www.mylink.com'; 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)}">link</a>>!!
                        'fragment compatible one liner for those people that dont like to fiddle with external javascript, based on the above code.'

                        give me a break bumps, i'v just woken up.

                        Comment


                          #13
                          Matthew

                          In answer to your original post, you have a menu that is CSS styled.

                          Somewhere in your templates you will have this code for the menu
                          Code:
                          <p class="text_menu" align="left">
                          	  <a href="acatalog/../index.html" target="_self" class="link_menu">Home</a>
                          	  <a href="acatalog/sitemap.html" target="_self" class="link_menu">Site Map</a>
                          	  <a href="acatalog/search.html" target="_self" class="link_menu">Search</a>
                          	  <a href="http://www.bigmatts.com/cgi-bin/os000001.pl?ACTION=Start" target="_self" class="link_menu">Checkout</a>
                          	  <a href="http://www.bigmatts.com/cgi-bin/ss000001.pl?SECTIONID=shop.html&amp;NOLOGIN=1" target="_self" class="link_menu">Store Top</a>
                          	  <a href="http://www.bigmatts.com/cgi-bin/mf000001.pl?ACTION=SHOWFORM" target="_self" class="link_menu">Contact Us</a>
                          	  </p>
                          You should be able to just paste in the code I posted earlier like this:-
                          Code:
                          <p class="text_menu" align="left">
                          	  <a href="acatalog/../index.html" target="_self" class="link_menu">Home</a>
                          	  <a href="acatalog/sitemap.html" target="_self" class="link_menu">Site Map</a>
                          	  <a href="acatalog/search.html" target="_self" class="link_menu">Search</a>
                          	  <a href="http://www.bigmatts.com/cgi-bin/os000001.pl?ACTION=Start" target="_self" class="link_menu">Checkout</a>
                          	  <a href="http://www.bigmatts.com/cgi-bin/ss000001.pl?SECTIONID=shop.html&amp;NOLOGIN=1" target="_self" class="link_menu">Store Top</a>
                          	  <a href="http://www.bigmatts.com/cgi-bin/mf000001.pl?ACTION=SHOWFORM" target="_self" class="link_menu">Contact Us</a>
                          <script type="text/javascript">
                          
                          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);
                          }
                          </script>
                          <a href="javascript:bookmarksite('Big Matts Menswear', 'http://www.bigmatts.com')" target="_self" class="link_menu">Bookmark Us!</a>
                          	  </p>
                          You may need to adjust the width of the Div tag called ''page_menu_content' or 'page_menu_items'though as the button may be too llong for what it's currently set at
                          Thanks

                          Jos Medinger

                          Tel : 01978 843 962
                          www.internetology.co.uk
                          Actinic / E-Commerce Hosting, Design & SEO
                          ______________________________________

                          Comment


                            #14
                            order of buttons

                            Thanks Jos very useful.

                            I've found a slightly different way ( I do like to fiddle with things I don;t understrand!).
                            Using your script I created a new Navigation Icon - called Bookmark Text Link. I have then added it to the Nav Bar in the design library.
                            So now I can go to the design tree and "insert layout" and add the Bookmark layout. All great.
                            But.... I cant seem to change the order they are displayed. i want the Bookmark link to be after the rest e.g. after CONTACT US etc but when you add a new layout it becomes the first one in the list and I cant seem to move it round.
                            Sorry prob. going it all wrong - any ideas

                            mat
                            Matthew Wildeman
                            www.bigmatts.com
                            2XL to 8XL Menswear

                            Comment


                              #15
                              can't you add it directly into your horizontal nav bar layout in the bottom left pane instead to position it, rather than through the design tree?
                              Tracey

                              Comment

                              Working...
                              X