• 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

cobra1162

Active member
Hello

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


favooris EN.webp
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
 
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?
 
<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
 
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.
 
***a little bump***
smile.png

 
Top Bottom