PDA

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


Magnumutz
24 Dec 2007, 16:47
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 (http://www.vbulletin.org/forum/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 (http://www.vbulletin.org/forum/vborg_miscactions.php?do=installhack&threadid=166058)" if you use this modification, thanks !

dvbusuario
26 Dec 2007, 00:03
Screenshots?
Demo?

Thaks!

Magnumutz
26 Dec 2007, 01:24
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
26 Dec 2007, 01:39
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
26 Dec 2007, 02:45
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
27 Dec 2007, 11:20
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
06 Jan 2008, 23:38
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
08 Jan 2008, 03:51
How to put this ??

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

Brandon Sheley
16 Jan 2008, 17:14
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!
26 Jan 2008, 01:05
doesnt work for ie... =/ it works on firefox

Aziz Elkbiry
26 Jan 2008, 03:18
thank you

ARB4HOSTING.COM
26 Jan 2008, 12:13
thanks....

UltraFanatics
12 Feb 2008, 19:17
When you say bookmark, does that mean add to favourites? or as homepage?

PaulSonny
12 Feb 2008, 19:18
This seems very basic? does it not?

Thanks, Paul.

Boofo
12 Feb 2008, 19:27
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
13 Feb 2008, 07:44
@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
13 Feb 2008, 09:03
does this work in IE7, FF2 ?

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

youradhere4222
13 Feb 2008, 21:16
How should I align this on the left side of the footer bar? Thanks!

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

youradhere4222
14 Feb 2008, 20:23
Yes, I'm using the default skin...

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

youradhere4222
15 Feb 2008, 16:56
Yes, but I'm pretty sure I asked how to align it on the left side...

Magnumutz
16 Feb 2008, 06:07
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
16 May 2008, 12:49
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
18 May 2008, 13:45
thank you installed

Boofo
18 May 2008, 14:29
How about a text file with the instructions in case someone has to reinstall sometime?

Magnumutz
19 May 2008, 13:22
Thanks for the suggestion Boofo, i added one :)

Freddy.k
27 May 2008, 11:24
thank you

Boofo
27 May 2008, 11:42
Doesn't work for me with IE8 beta. I get an eror on page.

Magnumutz
27 May 2008, 12:32
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
27 May 2008, 12:55
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
29 May 2008, 21:28
btw .. this mod can by any mean cuz language disturbances?
I have my language in all forums missed up since installing it

:)

Magnumutz
30 May 2008, 19:32
Nope... it's just a template edit, NOT a product.

Boofo
30 May 2008, 20:00
Alex, did you get my PM?

BeerLuver
28 Jun 2008, 01:09
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
28 Jun 2008, 15:00
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
28 Jun 2008, 21:09
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
29 Jun 2008, 11:37
nice man thx. would look good next to forum leaders to ;)

jlew24asu
09 Jul 2008, 20:22
installed thank you!

BigDog56
11 Jul 2008, 21:05
Can't get it to work in IE either.

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

BigDog56
11 Jul 2008, 21:27
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
13 Jul 2008, 17:24
Thank you for this. It's simple, but very helpful.

Chris Sotier
14 Jul 2008, 22:45
Thanks Clicked installed!

steve1966
15 Jul 2008, 08:45
thanks

Ohiosweetheart
16 Aug 2008, 01:44
Can this code be added to a side column, rather than navbar or footer?

Fanny Annie
16 Aug 2008, 12:12
<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
16 Aug 2008, 19:40
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
25 Aug 2008, 04:37
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
28 Aug 2008, 12:33
this doesnt work with firefox. is there a fix?

jlew24asu
02 Sep 2008, 14:27
this doesnt work with firefox. is there a fix?

?????

ShadowOne
02 Sep 2008, 23:10
this doesnt work with firefox. is there a fix?

works on firefox for me homie...

jlew24asu
03 Sep 2008, 13:56
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
03 Sep 2008, 14:39
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
03 Sep 2008, 15:18
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
08 Sep 2008, 16:28
bump

munnakv
09 Nov 2008, 01:57
Thanks. Installed.

jlew24asu
05 Jan 2009, 15:13
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
08 Feb 2009, 03:34
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();