vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 4.x Template Modifications (https://vborg.vbsupport.ru/forumdisplay.php?f=246)
-   -   Mini Mods - Bookmark this Site (https://vborg.vbsupport.ru/showthread.php?t=232868)

TimberFloorAu 01-11-2010 10:00 PM

Bookmark this Site
 
1 Attachment(s)
Easy to do.

Takes 1 minute max.

Admincp > Styles and Templates > Search In Templates

Locate headinclude.

at very bottom of page add:

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>

Click Save

Then Admincp > Styles and Templates > Search In Templates

Locate: navbar

find this code

Code:

</ul>

        <vb:if condition="$vboptions['enablesearches']">
        <div id="globalsearch" class="globalsearch">

Above it add:

Code:

<li><a class="navtab" href="javascript:bookmarksite('British Expats', 'http://www.yobromofo.com')">Bookmark this site!</a></li>
Change 'British Expats' to your site name
Change 'http://www.yobromofo.com' to your domain

Click Save

Done

Added: For BOOKMARK this PAGE

Change second template edit to:

Code:

<li><a class="navtab" href="javascript:bookmarksite('British Expats', (document.location.href))">Bookmark this Page</a></li>
Change 'British Expats' to your site name

steve1966 01-12-2010 09:02 AM

great thanks

Charlie98902 01-12-2010 10:16 AM

Someone have a screenshot?

Marv 01-12-2010 11:04 AM

The basic feature is nice. But could you add a function to bookmark each and every thread you want ? Tested it with
PHP Code:

<li><class="navtab" href="javascript:bookmarksite('MySite.com - {vb:raw post.threadtitle}', 'http://www.mysite.com/showthread.php?{vb:raw session.sessionurl}t={vb:raw post.threadid}')">Bookmark now!</a></li

but that won?t work.

May be you can have a look into that. Most users dont wanna bookmark the domain, they want to bookmark a single thread.

TimberFloorAu 01-12-2010 11:40 AM

I am sure you could use a vb phrase ( would need to look further )

Such as {vb:rawphrase bookmarks}

TimberFloorAu 01-12-2010 11:59 AM

*updated*

For Page Bookmark

VonDoom 01-12-2010 04:55 PM

Good Stuff. I used the Page Mod. But i was wondering how to move this from the navtabs bar to the menu bar. im running out of premium real estate up there.

bilgicc 01-12-2010 06:18 PM

Don't work on ie8.

WeBeef 01-12-2010 06:27 PM

Quote:

Originally Posted by bilgicc (Post 1953768)
Don't work on ie8.

You're right. IE stinks. Hopefully it's an easy fix.

VonDoom 01-12-2010 06:27 PM

Quote:

Originally Posted by bilgicc (Post 1953768)
Don't work on ie8.

Confirmed.

TimberFloorAu 01-12-2010 07:55 PM

I dont use IE

But there are quite a few articles on this: http://www.google.com.au/search?q=%2...ient=firefox-a


To move the Link to another area.

Add it after :

Code:

<li><a href="calendar.php{vb:raw session.sessionurl_q}">{vb:rawphrase calendar}</a></li>

StormLily 01-12-2010 07:59 PM

It's not working for me either...even on FF. It shows up on the navbar, but when you click on it, nothing happens.

TimberFloorAu 01-12-2010 08:07 PM

Click Install: post a link and I will check.

You could change :

document.location.href to

window.location.href

VonDoom 01-13-2010 08:15 PM

Quote:

Originally Posted by TimberFloorAu (Post 1953859)

To move the Link to another area.

Add it after :

Code:

<li><a href="calendar.php{vb:raw session.sessionurl_q}">{vb:rawphrase calendar}</a></li>

-----------------------------------------------------

Thanks for the tip.. If anybody else needs to move this below the nav tabs you need to remove the phrase "navtab" see example below
Code:

<li><a class= href="javascript:bookmarksite('British Expats', 'http://www.yobromofo.com')">Bookmark this site!</a></li>

TimberFloorAu 01-14-2010 06:06 AM

Thought about that after I left for Work, cheers VonDoom :up:

S.McAvoy 01-27-2010 03:19 AM

Very nice! Thanks!

is_it_me 02-21-2010 01:59 PM

This is odd, as it appears to work OK for me in I.E.

It doesn't seem to work at all in Chrome - any suggestions?

My main problem is how it's working in Firefox, it bookmarks the site OK, but when you click on the bookmark the site doesn't open in the existing tab nor a new normal tab, like any other bookmark, but in a strange tab to the left of the screen - see screenshot - something I've never come across before.

My test site is here: http://test.doctorwatson.info/content.php

Is it something I've done wrong? Is there a fix for this?

is_it_me 02-24-2010 02:06 PM

Can anyone help me with ^^^^ that?

Thanks in advance.

Dr.osamA 06-17-2010 09:30 AM

tanxxxx TimberFloorAu

you are great man

installed + 5 stars

MrBig 06-23-2010 03:30 AM

any screen caps?


All times are GMT. The time now is 04:38 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01152 seconds
  • Memory Usage 1,758KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (7)bbcode_code_printable
  • (1)bbcode_php_printable
  • (3)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (20)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.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
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete