Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.7 > vBulletin 3.7 Template Modifications
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Bookmark Us on Navbar or footer Details »»
Bookmark Us on Navbar or footer
Version: 1.00, by Magnumutz Magnumutz is offline
Developer Last Online: Jun 2014 Show Printable Version Email this Page

Category: Forum Home Enhancements - Version: 3.7.x Rating:
Released: 12-23-2007 Last Update: 05-18-2008 Installs: 176
Template Edits
Re-useable Code  
No support by the author.

Bookmark Us! (Add to Favorites) on Navbar or footer.


Brought to you by the Haste Network - Free MMORPG Network


Please mark as "Installed" if you use this modification, thanks !



Q: What this does?
A: It adds a "Bookmark Us" link in your navbar or your footer.


This code is a free source from DynamicDrive.com. Users are NOT allowed to remove the copyrights.

How to install:

In the header template place this at the end of the template:
HTML Code:
<script type="text/javascript">

/***********************************************
* Bookmark site script- ? Dynamic Drive DHTML code library (www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit Dynamic Drive at http://www.dynamicdrive.com/ for full source code
***********************************************/

/* Modified to support Opera */
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>
Now, for the navbar version, search the navbar template for:
PHP Code:
    <if condition="$show['registerbutton']">
        <
td class="vbmenu_control"><a href="register.php$session[sessionurl_q]rel="nofollow">$vbphrase[register]</a></td>
    </if> 
After that, add:
PHP Code:
        <td class="vbmenu_control"><a href="javascript:bookmarksite('$vboptions[bbtitle]', '$vboptions[bburl]')">Bookmark Us!</a></td
For the footer version, search the footer template for:
PHP Code:
                <if condition="$show['contactus']"><a href="$vboptions[contactuslink]rel="nofollow" accesskey="9">$vbphrase[contact_us]</a> -</if> 
Above that, add:
PHP Code:
                <a href="javascript:bookmarksite('$vboptions[bbtitle]', '$vboptions[bburl]')">Bookmark Us!</a> - 
That's about it... tested with Firefox and IE6.

Added Installation Instructions file on 19th of May.

Please mark as "Installed" if you use this modification, thanks !

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #32  
Old 05-27-2008, 11:32 AM
Magnumutz's Avatar
Magnumutz Magnumutz is offline
 
Join Date: Feb 2006
Location: Romania
Posts: 731
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Well, the code was probably made for FF2 and IE6/7.
So i'll look for another one to include all these new browsers and update it.
Reply With Quote
  #33  
Old 05-27-2008, 11:55 AM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

You forgot to add this to the first post. I have an apostrophe in my site name. It works fine now.

Quote:
Remember, if your site's title contains apostrophes, they need to be backslashed when entered:

<a href="javascript:bookmarksite('Mike\'s Place', 'http://www.google.com')">Bookmark this site!</a>
Reply With Quote
  #34  
Old 05-29-2008, 08:28 PM
shofolofo shofolofo is offline
 
Join Date: Aug 2007
Posts: 54
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

btw .. this mod can by any mean cuz language disturbances?
I have my language in all forums missed up since installing it

Reply With Quote
  #35  
Old 05-30-2008, 06:32 PM
Magnumutz's Avatar
Magnumutz Magnumutz is offline
 
Join Date: Feb 2006
Location: Romania
Posts: 731
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Nope... it's just a template edit, NOT a product.
Reply With Quote
  #36  
Old 05-30-2008, 07:00 PM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Alex, did you get my PM?
Reply With Quote
  #37  
Old 06-28-2008, 12:09 AM
BeerLuver's Avatar
BeerLuver BeerLuver is offline
 
Join Date: Mar 2002
Location: Green Bay, WI, US
Posts: 69
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks

I altered it a bit to use an image instead for the footer version. I used this code:
Code:
<div><a href="javascript:bookmarksite('$vboptions[bbtitle]', '$vboptions[bburl]')"><img src="images/misc/bookmark.png" border="0" align="left" style="margin-right: 5px; margin-left: 5px;" alt="Bookmark Us" /></a></div>
Attached a screenshot; it's the yellow star icon next to the rss icon. And attached the bookmark icon itself.

Also attached the big version of the icon png if anyone wants to change the colors; change the Hue in Photoshop to get the color you want, then resize down to 16x16 pixel size.

Hope this is useful to someone then
Reply With Quote
  #38  
Old 06-28-2008, 02:00 PM
pedroenf pedroenf is offline
 
Join Date: Jun 2006
Location: Portugal
Posts: 308
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by BeerLuver View Post
Thanks

I altered it a bit to use an image instead for the footer version. I used this code:
Code:
<div><a href="javascript:bookmarksite('$vboptions[bbtitle]', '$vboptions[bburl]')"><img src="images/misc/bookmark.png" border="0" align="left" style="margin-right: 5px; margin-left: 5px;" alt="Bookmark Us" /></a></div>
Attached a screenshot; it's the yellow star icon next to the rss icon. And attached the bookmark icon itself.

Also attached the big version of the icon png if anyone wants to change the colors; change the Hue in Photoshop to get the color you want, then resize down to 16x16 pixel size.

Hope this is useful to someone then

It was to me! Thanks

Just to say that it does not work in Opera 9.5. IE and FF3 working great!
Reply With Quote
  #39  
Old 06-28-2008, 08:09 PM
BeerLuver's Avatar
BeerLuver BeerLuver is offline
 
Join Date: Mar 2002
Location: Green Bay, WI, US
Posts: 69
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I look at it this way... if it works in FF & IE at least.. that's two of the most popularly used browsers heh. Doesn't work in Opera or Safari, but viewers can just manually add the bookmark then in those
Reply With Quote
  #40  
Old 06-29-2008, 10:37 AM
ShawneyJ's Avatar
ShawneyJ ShawneyJ is offline
 
Join Date: Jul 2006
Location: Australia
Posts: 1,758
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

nice man thx. would look good next to forum leaders to
Reply With Quote
  #41  
Old 07-09-2008, 07:22 PM
jlew24asu jlew24asu is offline
 
Join Date: Nov 2006
Location: Chicago, IL USA
Posts: 702
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

installed thank you!
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 11:19 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.07338 seconds
  • Memory Usage 2,330KB
  • Queries Executed 25 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (2)bbcode_code
  • (1)bbcode_html
  • (4)bbcode_php
  • (2)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete