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)
-   -   Show Thread Enhancements - Google+1 / Facebook / Linkedin / Twitter Share Buttons (https://vborg.vbsupport.ru/showthread.php?t=264711)

Winter Sonata 06-03-2011 10:00 PM

Google+1 / Facebook / Linkedin / Twitter Share Buttons
 
1 Attachment(s)
Hello VBers!
This is my first modification here, I hope you will find it useful and helpful

About
Most of us now are aware of the importance of integrating social networks plugins into our websites and the great impact on increasing the site visibility and traffic, social networks made it too easy to share and recommend content which you consider useful for your friends.

What we will do now is integrating, Google+1, Facebook, Linked and Twitter share Buttons at your Showthread page

Live Demo : Language Teaching & Learning Resources Check it under the signature
There is also a photo attached below.

Installation
We will edit the template : postbit_legacy or postbit ( whatever you use
let's assume that I will edit the postbit_legacy.

open postbit_legacy, look for this code :
Code:

          {vb:raw template_hook.postbit_signature_start}
                                {vb:raw ad_location.ad_showthread_firstpost_sig}
                <vb:if condition="$post['signature']">
                        <blockquote class="signature restore"><div class="signaturecontainer">{vb:raw post.signature}</div></blockquote>
                </vb:if>
                                        {vb:raw template_hook.postbit_signature_end}
            </div>
            </vb:if>


add after ( DON'T FORGET TO EDIT THE TWITTER ACCOUNT IN RED):
Code:

<vb:if condition="$post[postcount] == 1">
<div style="float: right; padding: 10px 0 8px 10px;">
    <table border="0" height="62px">

  <tr>
    <td valign="bottom"><g:plusone size="tall"></g:plusone></td>
    <td valign="bottom"><a href="http://twitter.com/share" class="twitter-share-button" data-count="vertical" data-via="YOUR TWITTER USERNAME" data-related="aaronwall">Tweet</a><script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script></td>
    <td valign="bottom"> <script type="text/javascript" src="http://platform.linkedin.com/in.js"></script><script type="in/share" data-counter="top"></script></td>
    <td valign="bottom"><a name="fb_share" type="box_count" expr:share_url="data:post.url" href="http://www.facebook.com/sharer.php">Share</a><script src="http://static.ak.fbcdn.net/connect.php/js/FB.Share" type="text/javascript"></script></td>

  </tr>
</table>
 </div>
</vb:if>

For Google +1 , you should add this code to the footer to work :
Code:

<script type="text/javascript" src="http://apis.google.com/js/plusone.js"></script>

Known Problems : Linkedin button give error if the thread titles has some characters like @, !!!!!! , etc, hope that once can help sort this out.

Disclaimer I have got this idea from this post Thanks naveeid

Feel free to Click ' Mark As Installed ' if you used.

Samhan 06-05-2011 01:22 AM

Thank you,
How to hide it in private forums!?

Dr.osamA 06-05-2011 01:43 AM

installed

thank you bro

MADMA 06-05-2011 01:53 PM

hi i am having problems with the google+1 bit. were in the footer do i put that script

Winter Sonata 06-05-2011 03:28 PM

Quote:

Originally Posted by MADMA (Post 2203827)
hi i am having problems with the google+1 bit. were in the footer do i put that script

You should insert this code at the end of footer for ex : It may work in another places too.

Code:

<script type="text/javascript" src="http://apis.google.com/js/plusone.js"></script>

Winter Sonata 06-05-2011 03:33 PM

Quote:

Originally Posted by Samhan (Post 2203636)
Thank you,
How to hide it in private forums!?

Put the code between :

Code:

<vb:if condition="$forum[forumid] != FORUM ID">YOUR CODE HERE</vb:if>
Don't forget to write the forum ID, and your most done :)

tarzan22 06-05-2011 03:56 PM

Very good, but it could take just google +1?

thanks and regards

Winter Sonata 06-05-2011 04:30 PM

Quote:

Originally Posted by tarzan22 (Post 2203885)
Very good, but it could take just google +1?

thanks and regards

Yes, you can delete other buttons if you would , let me know if you need any further help, I would be happy to assist :)

CrossWind 06-05-2011 04:49 PM

thank you nice work

tarzan22 06-05-2011 04:58 PM

perfect.

Thank you very much greetings

ejem

http://www.foroxd.com/gramola-dedica...de-foroxd.html


All times are GMT. The time now is 07:18 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.01164 seconds
  • Memory Usage 1,748KB
  • 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
  • (5)bbcode_code_printable
  • (3)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)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