PDA

View Full Version : Forum Home Enhancements - Bookmark Us on Navbar or footer


Magnumutz
12-23-2007, 10:00 PM
Bookmark Us! (Add to Favorites) on Navbar or footer.


Brought to you by the Haste Network (http://haste-network.net/) - Free MMORPG Network


Please mark as "Installed (https://vborg.vbsupport.ru/vborg_miscactions.php?do=installhack&threadid=166058)" 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:
<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:

<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:

<td class="vbmenu_control"><a href="javascript:bookmarksite('$vboptions', '$vboptions[bburl]')">Bookmark Us!</a></td>
For the footer version, search the footer template for:

<if condition="$show['contactus']"><a href="$vboptions[contactuslink]" rel="nofollow" accesskey="9">$vbphrase[contact_us]</a> -</if>
Above that, add:

<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.

[B]Please mark as "Installed (https://vborg.vbsupport.ru/vborg_miscactions.php?do=installhack&threadid=166058)" if you use this modification, thanks !

dvbusuario
12-25-2007, 11:03 PM
Screenshots?
Demo?

Thaks!

Magnumutz
12-26-2007, 12:24 AM
Dude, this adds a link in your navbar or footer. When you click on that link, a window pops-up and asks you if you want to add the website as a bookmark or favorite.
I added screenshots to the first post... simple links.

SwollenCranium
12-26-2007, 12:39 AM
Good job, I'm sure some will use it.

But I'm 100% sure I do not want members that are incapable of using the bookmark feature in the usual manner.

Magnumutz
12-26-2007, 01:45 AM
Well, it wasn't my idea in the first place. I only made it for vB :p
However, i know what' your saying... it's nasty to have newb members, that stay that way.

Hornstar
12-27-2007, 10:20 AM
But still, if it invites users to bookmark your site (some forget to bookmark useful sites) and if this makes more people bookmark your site, you might just get more return visitors. I think this is quite a handy addition.

Thanks for sharing.

TPOCJames
01-06-2008, 10:38 PM
But still, if it invites users to bookmark your site (some forget to bookmark useful sites) and if this makes more people bookmark your site, you might just get more return visitors. I think this is quite a handy addition.

Thanks for sharing.

I agree. Installed.

chennairam
01-08-2008, 02:51 AM
How to put this ??

all are put only in header ?? please guide me individual how to install this... im new in forum

Brandon Sheley
01-16-2008, 04:14 PM
How to put this ??

all are put only in header ?? please guide me individual how to install this... im new in forum

The first post clearly explains how to add the link :)
You'll edit these 2 or 3 templates in your vBulletin Styles section in the admincp.

cheers

Dark Cynicus!
01-26-2008, 12:05 AM
doesnt work for ie... =/ it works on firefox

Aziz Elkbiry
01-26-2008, 02:18 AM
thank you

ARB4HOSTING.COM
01-26-2008, 11:13 AM
thanks....

UltraFanatics
02-12-2008, 06:17 PM
When you say bookmark, does that mean add to favourites? or as homepage?

PaulSonny
02-12-2008, 06:18 PM
This seems very basic? does it not?

Thanks, Paul.

Boofo
02-12-2008, 06:27 PM
Good job, I'm sure some will use it.

But I'm 100% sure I do not want members that are incapable of using the bookmark feature in the usual manner.

You'll be surprise how many new visitors will use this if they actually see it. It seems to say come back and visit. ;)

Magnumutz
02-13-2008, 06:44 AM
@UltraFanatics: Yes, as a favorite... bookmark is the Firefox term for it :p
@PaulSonny: Yeah, i mostly is. But it's the first one of it's kind :)

logicuk
02-13-2008, 08:03 AM
does this work in IE7, FF2 ?

Magnumutz
02-13-2008, 10:10 AM
Donno if it works with IE7, i don't have it on my PC, but it does with FF2.

youradhere4222
02-13-2008, 08:16 PM
How should I align this on the left side of the footer bar? Thanks!

Magnumutz
02-14-2008, 02:20 PM
Well... that depends on the skin you got. On the default skin i aligned it on the right side.

youradhere4222
02-14-2008, 07:23 PM
Yes, I'm using the default skin...

Magnumutz
02-15-2008, 02:25 PM
Then it'll auto align itself there... on the right side, just like in the screenshot.

youradhere4222
02-15-2008, 03:56 PM
Yes, but I'm pretty sure I asked how to align it on the left side...

Magnumutz
02-16-2008, 05:07 AM
Oh, my bad :p
I tried aligning it on the left side, right after the Style and Language selector... but it looks real ugly, the whole text breaks down like this:

Bookmark
Us!!

ShadowOne
05-16-2008, 11:49 AM
Oh, my bad :p
I tried aligning it on the left side, right after the Style and Language selector... but it looks real ugly, the whole text breaks down like this:

Bookmark
Us!!


do you have a <br />

after bookmark? if so delete it...

GremlinPrince
05-18-2008, 12:45 PM
thank you installed

Boofo
05-18-2008, 01:29 PM
How about a text file with the instructions in case someone has to reinstall sometime?

Magnumutz
05-19-2008, 12:22 PM
Thanks for the suggestion Boofo, i added one :)

Freddy.k
05-27-2008, 10:24 AM
thank you

Boofo
05-27-2008, 10:42 AM
Doesn't work for me with IE8 beta. I get an eror on page.

Magnumutz
05-27-2008, 11:32 AM
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.

Boofo
05-27-2008, 11:55 AM
You forgot to add this to the first post. I have an apostrophe in my site name. It works fine now. ;)

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>

shofolofo
05-29-2008, 08:28 PM
btw .. this mod can by any mean cuz language disturbances?
I have my language in all forums missed up since installing it

:)

Magnumutz
05-30-2008, 06:32 PM
Nope... it's just a template edit, NOT a product.

Boofo
05-30-2008, 07:00 PM
Alex, did you get my PM?

BeerLuver
06-28-2008, 12:09 AM
Thanks :)

I altered it a bit to use an image instead for the footer version. I used this 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 ;)

pedroenf
06-28-2008, 02:00 PM
Thanks :)

I altered it a bit to use an image instead for the footer version. I used this 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!

BeerLuver
06-28-2008, 08:09 PM
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 ;)

ShawneyJ
06-29-2008, 10:37 AM
nice man thx. would look good next to forum leaders to ;)

jlew24asu
07-09-2008, 07:22 PM
installed thank you!

BigDog56
07-11-2008, 08:05 PM
Can't get it to work in IE either.

Charlie98902
07-11-2008, 08:07 PM
Ensure you did things right, IE7 is working well with the bookmark in the navbar.

BigDog56
07-11-2008, 08:27 PM
Ensure you did things right, IE7 is working well with the bookmark in the navbar.

Figured it out, thanks to Boofo's posts. Thanks!

tazzarkin
07-13-2008, 04:24 PM
Thank you for this. It's simple, but very helpful.

Chris Sotier
07-14-2008, 09:45 PM
Thanks Clicked installed!

steve1966
07-15-2008, 07:45 AM
thanks

Ohiosweetheart
08-16-2008, 12:44 AM
Can this code be added to a side column, rather than navbar or footer?

Fanny Annie
08-16-2008, 11:12 AM
<a href="javascript:window.external.AddFavorite('http://www.yoursite.com','your site title')">
<center><img src ="/your/image/path.gif" border="0"></center></a>

just add that .............. a lot simpler and add your image where the path is and it centers in the side nav


www.tabletennistalk.co.uk

Magnumutz
08-16-2008, 06:40 PM
Can this code be added to a side column, rather than navbar or footer?
Of course, i don't see why not... just find a good place for it.

Ohiosweetheart
08-25-2008, 03:37 AM
Love it. Thanks!


<a href="javascript:window.external.AddFavorite('http://www.yoursite.com','your site title')">
<center><img src ="/your/image/path.gif" border="0"></center></a>

just add that .............. a lot simpler and add your image where the path is and it centers in the side nav


www.tabletennistalk.co.uk (http://www.tabletennistalk.co.uk/)

Fanny Annie, I tried your code and it didn't work on my site. Nothing happens when I click the bookmark image. I also went to your site and tried clicking on the Bookmark button, again, and nothing happened.




@ Magnumutz - This is the code I used for my side column, using a button image, works like a charm. You may want to add this to your original
post? Just a thought...

<a href="javascript:bookmarksite('$vboptions[bbtitle]', '$vboptions[bburl]')"><img src ="http://www.image path/bookmark.png" border="0"></a>see it here - http://www.themesbydesign.net/forums

jlew24asu
08-28-2008, 11:33 AM
this doesnt work with firefox. is there a fix?

jlew24asu
09-02-2008, 01:27 PM
this doesnt work with firefox. is there a fix?

?????

ShadowOne
09-02-2008, 10:10 PM
this doesnt work with firefox. is there a fix?

works on firefox for me homie...

jlew24asu
09-03-2008, 12:56 PM
works on firefox for me homie...

damn. I can add the bookmark just fine but when I go to bookmarks and click the link, it opens on the left column...

http://i156.photobucket.com/albums/t30/jlew24asu/bookmark.jpg

Magnumutz
09-03-2008, 01:39 PM
You must've had the the "Load this bookmark in sidebar" option checked.
Try adding it again, with that option unchecked, it will work properly.

jlew24asu
09-03-2008, 02:18 PM
You must've had the the "Load this bookmark in sidebar" option checked.
Try adding it again, with that option unchecked, it will work properly.

I didnt even know that option existed. I'm not shown any options when bookmarking a site...where is it?


edit: ok when I right click on the bookmark the option is there. but thats after I add it. there is no option when I first add it. is it a default setting or something? this happened to my brother too.

it only happens when I add using this hack.

jlew24asu
09-08-2008, 03:28 PM
bump

munnakv
11-09-2008, 12:57 AM
Thanks. Installed.

jlew24asu
01-05-2009, 02:13 PM
You must've had the the "Load this bookmark in sidebar" option checked.
Try adding it again, with that option unchecked, it will work properly.

so strange. the option is hidden when bookmarking using this hack. I have to manually right click on the bookmark of my site and uncheck the box.

Kobra Khan
02-08-2009, 02:34 AM
i am having the same problem as Jlew24asu it only adds to the side bar then i had to go into properties and uncheck sidebar but why is it checking that option in the first place

if u look at the code it says side bar maybe that is the problem ?

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();