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

Reply
 
Thread Tools
AddThis Floating Horizontal Bar Details »»
AddThis Floating Horizontal Bar
Version: 1.00, by Lee G Lee G is offline
Developer Last Online: Nov 2014 Show Printable Version Email this Page

Category: Miscellaneous Hacks - Version: 3.8.7 Rating:
Released: 10-23-2011 Last Update: Never Installs: 4
Template Edits
 
No support by the author.

This is a simple integration of the AddThis Floating Horizontal Bar

At present most share buttons are located in static places.
If you add one to the header, some one has gone down the page, they might not go back up and it the share button.
If you add a social media share button to the last post, you also have to find ways of integrating the buttons into your blogs, photo albums etc.

The new horizontal share bar is easy to install and makes sharing unobtrusive until the user begins scrolling down your page.
Appears on Scroll
The on-demand behavior of the horizontal bar boosts sharing because it appears as your visitors scroll down the page.


To see this bar in action, Im running it on my own forums
http://www.thespainforum.com/

Scroll down the page and it will suddenly appear at the top of the screen
Go back up and it auto hides
This means that if like me you have buttons in the header and the navigation bar are not covered at any time.

Instillation is two template edits

Header template

After
PHP Code:
<!-- /logo --> 
Add
PHP Code:
<div class="addthis_bar addthis_bar_medium">
    <
label>Share This Page:</label>
    <
div class="addthis_toolbox addthis_default_style addthis_32x32_style">
        <
span><class="addthis_button_preferred_1"></a></span>
        <
span><class="addthis_button_preferred_2"></a></span>
        <
span><class="addthis_button_preferred_3"></a></span>
        <
span><class="addthis_button_preferred_4"></a></span>
        <
span><class="addthis_button_compact"></a></span>
        <
span><class="addthis_counter addthis_bubble_style"></a></span>
    </
div>
</
div
At the very end of the footer template add this
PHP Code:
<script type="text/javascript">
var 
addthis_config = {
    
bar_show_below 150
}
</
script>
<
script type="text/javascript" src="http://s7.addthis.com/js/300/addthis_widget.js#pubid=[YOUR PROFILE ID HERE]"></script
If you want to track your clicks, you can register for a free account with AddThis and simply replace [YOUR PROFILE ID HERE] with your profile id

Further information and more layout options can be found on AddThis
http://www.addthis.com/labs/floating...ogin&lb=1#code

Show Your Support

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

Comments
  #2  
Old 10-25-2011, 02:01 AM
sulasno sulasno is offline
 
Join Date: Feb 2010
Posts: 588
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

tagged and thanks

I would assume this would also work for vB 4.X
Reply With Quote
  #3  
Old 10-25-2011, 08:29 AM
Lee G Lee G is offline
 
Join Date: Jun 2006
Location: Costa Blanca
Posts: 143
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I dont see why it wont work on vb4, unfortunately I haven't got my vb4 test site running at present

You can set the bar to show earlier or later when the page is scrolled down by altering one number in the above code. Something I forgot to mention in the original integration

In the footer code, alter this line
PHP Code:
bar_show_below 150 
Edit the 150 to make it show earlier or later
Reply With Quote
  #4  
Old 11-21-2011, 10:56 PM
LordVader LordVader is offline
 
Join Date: Aug 2009
Posts: 57
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Spot On

And I can confirm it works flawlessly on (VB'408)

Exactly what I was looking for, looks great & its not in your face all the time, Perfect. :up:

Rated *****

Thanks

L.V
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 01:45 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.04934 seconds
  • Memory Usage 2,257KB
  • Queries Executed 18 (?)
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
  • (4)bbcode_php
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (4)navbar_link
  • (120)option
  • (4)post_thanks_box
  • (4)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (4)post_thanks_postbit_info
  • (3)postbit
  • (4)postbit_onlinestatus
  • (4)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
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete