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.


All times are GMT. The time now is 01:00 PM.

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.01232 seconds
  • Memory Usage 1,735KB
  • 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
  • (4)bbcode_code_printable
  • (1)bbcode_php_printable
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete