Go Back   vb.org Archive > vBulletin Modifications > vBulletin 4.x Modifications > vBulletin 4.x Add-ons
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Like it? Share it! Neat Social Bookmarks Add-on Details »»
Like it? Share it! Neat Social Bookmarks Add-on
Version: 1.00, by StarBuG StarBuG is offline
Developer Last Online: Nov 2022 Show Printable Version Email this Page

Category: Miscellaneous Hacks - Version: 4.1.9 Rating:
Released: 01-02-2012 Last Update: Never Installs: 15
Template Edits
Additional Files  
No support by the author.

Hello

I created a special way of implementing social bookmarks to my forum www.AdSenseExperts.com

They are shown in a block left to the forum (I use a fixed width forum though!).
To prevent an overlapping with the forum when the browser window is small or resized there is a JavaScript check which removes the bookmarks or places them within the thread options box when viewing a thread.

See Screenshot attachments

Please NOTE:
  • I use a fixed width of 900px for my forum so this mod is primarily for forums width a fixed with!
  • jquery is needed for the browser size check. If you implemented jquery already, skip step 2.
  • I use a modified footer so I can't promise 100% that it will work like I posted it here but it should
  • This mod is released AS IS! No support will be provided!
You'll find all links to create your button codes below the install instructions.

Install:

In additional.css add:

Code:
/* Like it? Share it! Social Bookmarks by AdSenseExperts.com */
#socialbookies { background:#FFFFFF; border:1px solid #d7dee3; padding-top: 3px; padding:5px 5px; position:fixed; top:5px; color: #930101; display: none; margin-left:-90px;}
#socialbookies-small { display: none;}
in template headinclude_bottom search:

Code:
{vb:raw template_hook.headinclude_bottom_css}
add below:

Code:
<script src='http://ajax.googleapis.com/ajax/libs/jquery/1.6.4/jquery.min.js' type='text/javascript'></script>
in template SHOWTHREAD search:

Code:
<ul id="postlist_popups" class="postlist_popups popupgroup">
add below:

Code:
<li class="popupmenu"><div style="align:left;" class="socialbookies-small"><a href="http://twitter.com/share" class="twitter-share-button" data-count="horizontal" data-via="YourTwitterAccount">Tweet</a><script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script><br />
<font color="#930101"><b>&nbsp;&nbsp;Like It? Share It!</b></font></div></li>
<li class="popupmenu"><div class="socialbookies-small"><g:plusone size="medium"></g:plusone></div></li>
<li class="popupmenu"><div style="align:left;" class="socialbookies-small"><script src="http://connect.facebook.net/en_US/all.js#xfbml=1"></script><fb:like href="" layout="button_count" show_faces="false" width="90" font="arial"></fb:like></div></li>
in Template footer search:

Code:
<vb:if condition="$vboptions['enablefacebookconnect']">
    {vb:raw facebook_footer}
</vb:if>
</div>
and add below:

Code:
<div id="socialbookies">
<center><big><b>Like It?<br />
Share It!</b></big><br /><br />
<div class="g-plusone" data-size="tall"></div><br /><br />
<a href="http://twitter.com/share" class="twitter-share-button" data-count="vertical" data-via="YourTwitterAccount">Tweet</a><script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script><br /><br />
<iframe src="//www.facebook.com/plugins/like.php?href=http%3A%2F%2Fwww.YourDomain.com&amp;send=false&amp;locale=en_US&amp;layout=box_count&amp;width=55&amp;show_faces=false&amp;action=like&amp;colorscheme=light&amp;font=arial&amp;height=90&amp;appId=YourFacebookAppID" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:55px; height:90px;" allowTransparency="true"></iframe>
<a rel="author" href="https://plus.google.com/YourGooglePlusProfileID/"><img src="http://www.google.com/images/icons/ui/gprofile_button-64.png" width="55" height="55"></a><br /><br />
<a href="http://twitter.com/YourTwitterAccount" target="new" title="Follow YourTwitterAccount on Twitter"><img src="./images/twitter_follow_vs.png" width="50px" height="38px" alt="Follow YourTwitterAccount on Twitter" /></a></center>
</div>

<!-- Browser Window Size Check -->
<script type="text/javascript">
    jQuery(document).ready(function($) {
        // Show social voter only if the browser window is wide enough.
        if( $(window).width() >= 1110 ) 
            $('#socialbookies').show();
                        $('.socialbookies-small').hide();
 
        // Update when user resizes browser.
        $(window).resize(function() {
            if( $(window).width() < 1110 ) {
                $('#socialbookies').hide();
                                $('.socialbookies-small').show();
            } else {
                $('#socialbookies').show();
                                $('.socialbookies-small').hide();
            }
        });
    });
</script>

<!-- Plus One Asynchronous Snippet -->
<script type="text/javascript">
  (function() {
    var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true;
    po.src = 'https://apis.google.com/js/plusone.js';
    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);
  })();
</script>
I uploaded the image for "follow me on Twitter". You need to upload the image to your /image/ directory.

I marked all IDs you need to adapt to your accounts in red.

Also In the JavaScript part for the browser window size check you need to change 1110 (px) to the browser window width where you want the bookmarks to be removed.

DEMO:
Forumhome: http://www.AdSenseExperts.com
Thread: http://www.adsenseexperts.com/adsens...ssage-t15.html

Where to create your social buttons:

Google Plus Profile Button: http://www.google.com/webmasters/profilebutton/
Google +1 Button: http://www.google.com/webmasters/+1/button/
Facebook Like Button: http://developers.facebook.com/docs/...plugins/like/#
Twitter Button: https://twitter.com/about/resources/buttons

Screenshots

File Type: png bookmarks_left.png (68.7 KB, 0 views)
File Type: png bookmars_resized.png (64.0 KB, 0 views)

Show Your Support

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

Comments
  #2  
Old 01-03-2012, 03:26 PM
Gemma's Avatar
Gemma Gemma is offline
 
Join Date: Apr 2004
Location: Scotland
Posts: 1,229
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Not something I can use but nicely done. Thanks for taking the time to share
Reply With Quote
  #3  
Old 01-04-2012, 07:05 PM
v123shine v123shine is offline
 
Join Date: Sep 2008
Posts: 242
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Please make this mod for vb 3.8.x
Reply With Quote
  #4  
Old 01-04-2012, 10:52 PM
tafreeh tafreeh is offline
 
Join Date: May 2008
Location: Canada
Posts: 536
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

what do you suggest to implement this on a fluid style theme ?
Reply With Quote
  #5  
Old 01-04-2012, 11:40 PM
GameOverViper GameOverViper is offline
 
Join Date: Jun 2011
Posts: 161
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thank you for doing this! However, there is some problems with it. In your code you provide, the facebook options has a different language than English setup. I have made the adjustment to en_US for English though.

Is there an issue with the Facebook Like? After liking, there was a popup that wouldn't go off the screen until I reloaded the page.

How can I bring it down some? It doesn't look that great with it being all the way to the top of my header with the theme I'm using and it would look better if it was more mid-screen.
Reply With Quote
  #6  
Old 01-05-2012, 11:33 AM
StarBuG's Avatar
StarBuG StarBuG is offline
 
Join Date: Dec 2001
Location: Germany
Posts: 1,033
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Americanbang View Post
Thank you for doing this! However, there is some problems with it. In your code you provide, the facebook options has a different language than English setup. I have made the adjustment to en_US for English though.

Is there an issue with the Facebook Like? After liking, there was a popup that wouldn't go off the screen until I reloaded the page.

How can I bring it down some? It doesn't look that great with it being all the way to the top of my header with the theme I'm using and it would look better if it was more mid-screen.
I missed that FB changed the behaviour of the XFBML implementation to display a comment box after pressing Like.
Unfortunatly this option can't be disabled.
I changed the code to use the iframe version which does not use a comment box.
However the iframe version does only support 1 fixed url and not the url of the current page you are on.
If someone finds a solution for this problem please let me/us know!
I also fixed the languange

Thanks for pointing this out
Reply With Quote
  #7  
Old 01-08-2012, 09:38 AM
GameOverViper GameOverViper is offline
 
Join Date: Jun 2011
Posts: 161
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

The website Forbes.com has something similar to this and it is located right below the header and scrolls with the screen. It's also got the Facebook Share button. I'm curious to know how I can get the Facebook Share button.

If you view one of Forbes articles, it show's more social sites like Reddit. If we could have more options like this that would also be great.
Reply With Quote
  #8  
Old 01-08-2012, 01:46 PM
StarBuG's Avatar
StarBuG StarBuG is offline
 
Join Date: Dec 2001
Location: Germany
Posts: 1,033
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

It is just html and css, you can implement as much icons as you want.
you can get the share button where you get the like button from facebook.
Reply With Quote
  #9  
Old 07-03-2012, 11:26 AM
Antonio Pereira Antonio Pereira is offline
 
Join Date: Sep 2007
Posts: 104
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

No updates on this Mod?
Reply With Quote
  #10  
Old 07-03-2012, 01:17 PM
Antonio Pereira Antonio Pereira is offline
 
Join Date: Sep 2007
Posts: 104
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

How to add right place the code is for left:
margin-left:-90px;}
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:16 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.05475 seconds
  • Memory Usage 2,333KB
  • Queries Executed 24 (?)
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
  • (7)bbcode_code
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (4)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (9)postbit
  • (2)postbit_attachment
  • (10)postbit_onlinestatus
  • (10)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_attachment
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete