1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. This forum is for release discussion only. Discussions that do not relate specifically to the resource release should be discussed in another, more appropriate forum.
    Dismiss Notice
  3. This forum has been archived. New threads and replies may not be made. All add-ons/resources that are active should be migrated to the Resource Manager. See this thread for more information.

Add to favorites in the navbar

Discussion in 'Template Modifications [Archive]' started by cobra1162, Nov 21, 2010.

  1. cobra1162

    cobra1162 Active Member

    Hello

    Here's a small change to put a tab "add to favorites" in the navbar.


    favooris EN.png
    in the template navigation

    Find:

    Code:
            <!-- help -->
            <xen:if is="{$tabs.help}">
    Add above:
    Code:
            <!-- favoris-->
            <li class="navTab PopupClosed"><a href="javascript:bookmarksite('You-title', 'You-URL')" class="navLink">Add to Favorites</a></li>
    Remember to change it (url and name of the forum)
    Then add at the end of the template navigation


    Code:
    <!--add to favorites-->
    <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>
    <!--Add to favorites-->
    Support fran├žais ICI
    French support HERE
     
    turtile, Veer, shenmuee and 7 others like this.
  2. Allan

    Allan Well-Known Member

    Good idea :)
     
  3. manik

    manik Member

    Very nice friend, is a terrific add.
     
  4. DSF

    DSF Well-Known Member

    Code:
    <li class="navTab PopupClosed"><a href="javascript:bookmarksite('You-title', 'You-URL')" class="navLink">Add to Favorites</a></li>
    In You-URL I must set my Path.
    Is there a possibility to set the current actuell Path?
     
  5. DSF

    DSF Well-Known Member

    Has nobody a idea?
     
  6. cobra1162

    cobra1162 Active Member

    <li class="navTab PopupClosed"><a href="javascript:bookmarksite('You-title', 'You-URL')" class="navLink">Add to Favorites</a></li>
    sorry for the delay you replace you as the title of your forum and you the URL of your forum url
     
  7. Brogan

    Brogan XenForo Moderator Staff Member

    I think the poster is looking for a way to set a dynamic URL based on which page they're on when the link is clicked.
     
    Puntocom likes this.
  8. DSF

    DSF Well-Known Member

    Yes, I mean a dynamic URL. Sorry
    Has nobody a idea?
     
  9. DSF

    DSF Well-Known Member

    ***a little bump*** [​IMG]
     

Share This Page