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

fatdr 06-07-2011 12:10 PM

Hi i used these codes but the google+1 doesn't work,
also i added extra code to footer?
vb 4.1.2

Hakan39 06-07-2011 04:12 PM

Thank you
installed

Winter Sonata 06-07-2011 04:19 PM

Quote:

Originally Posted by fatdr (Post 2204583)
Hi i used these codes but the google+1 doesn't work,
also i added extra code to footer?
vb 4.1.2

Strange, add the extra code at the end of the footer and it should work

Winter Sonata 06-07-2011 04:25 PM

Quote:

Originally Posted by Hakan39 (Post 2204641)
Thank you
installed

Please mark as installed ;)

gyancentral 06-07-2011 05:01 PM

can u be just kind enough to tell me which footer should i add ...i mean should i add the postbit_legacy footer or should i add to something other......pls do reply to this,....anyways its ausumn.....thread

Winter Sonata 06-07-2011 05:37 PM

At the footer template :)

Let me know if you need further help :)

Filgga 06-07-2011 08:16 PM

Quote:

Originally Posted by Winter Sonata (Post 2204680)
At the footer template :)

Let me know if you need further help :)

Tried but in vain, doesn't display. I need this Google +1 thing

Last_Zero 06-08-2011 12:39 AM

Why Dont Make It

padding: 10px 5px 8px 10px;

Instead of

padding: 10px 0 8px 10px;

So There Will Be A Spave Between Icons

fatdr 06-08-2011 07:27 AM

Quote:

Originally Posted by Winter Sonata (Post 2204680)
At the footer template :)

Let me know if you need further help :)

i added but it isn't working

ghostiya 06-08-2011 07:10 PM

facebook is kinda not showing the top thing. and Linkin just shows a there logo.

AdamFL 06-09-2011 01:20 AM

Thank you. I have an issue and not sure if it's related. I checked the URL and seems like when I share on twitter the posted tweet links are like:

Quote:

Justanexampleforum.comshowthread.php/9-Qualities-
without the "/" -- Any ideas to fix this?

Thanks

LeventX 06-09-2011 06:31 AM

Thank you...

Winter Sonata 06-10-2011 12:44 PM

Quote:

Originally Posted by AdamFL (Post 2205320)
Thank you. I have an issue and not sure if it's related. I checked the URL and seems like when I share on twitter the posted tweet links are like:



without the "/" -- Any ideas to fix this?

Thanks

Works with me without this issue, could you try another link ?

AdamFL 06-12-2011 04:30 AM

I tried few and I still have the issue: broken shared links.

CoZmicShReddeR 06-12-2011 08:10 AM

Any suggestions how to make the Google+1 alignment?
http://www.cozworld.com/threads/1961...r-in-Minecraft!!
It seems to be ridding in line with the other bubbles...

Alan_SP 06-12-2011 10:07 AM

Maybe it's something with vb4.1.4, as you have it installed.

Wordplay 06-12-2011 10:57 AM

i would love to use this but the facebook part doesn't work at all. i love the look of the buttons, but facebook doesn't show until you click it, then there is a +1, and when you load the page in a different browser, or reload it in that browser the number is gone again.

edit

just noticed it doesn't save anything for me, it doesn't save google+1 and facebook share doesn't work on for me at all even on links with just the thread id.

ETDC 06-13-2011 03:14 PM

What do I need to do to only add the Google +1? I have all the others.

blackberry 06-13-2011 08:13 PM

works with 3.8?

final kaoss 06-16-2011 11:50 PM

Thanks for the tip on how to add the Google plus 1. I found a better place to add it though.

daveaite 06-17-2011 12:19 AM

Not bad of a mod, except the twitter still has
Code:

data-related="aaronwall">
for unsuspecting vBulletin users, which will refer your tweets to his.

Also users can increase load time if they put:

Code:

<script type="text/javascript" src="http://apis.google.com/js/plusone.js"></script>
at the bottom of header include. Javascript is best placed in the top of webpages, not bottom for SEO purposes.

ETDC 06-17-2011 11:58 AM

Quote:

Originally Posted by extreme-gaming (Post 2208756)
Thanks for the tip on how to add the Google plus 1. I found a better place to add it though.

Can't read it.

final kaoss 06-17-2011 03:05 PM

Fixed, I recently added that new category & the forums within it.

All four browsers have no problem with the Plus 1 code where it's at.

However when it comes to the addthis bar:
Firefox, IE, Opera display it fine but google chrome wants to set it above the "thread tools" dropdown menu.

Antonio Pereira 06-22-2011 10:47 AM

Quote:

Originally Posted by Winter Sonata (Post 2203874)
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 :)

Only work for one forum ID.

What to do now?


One more thing with me in the 4.1.4 and vbseo only work with this code, but only for one forum:

Code:

<vb:if condition="$GLOBALS[forumid] != FORUM ID">YOUR CODE HERE</vb:if>

Best Regards

Winter Sonata 06-22-2011 01:12 PM

<vb:if condition="$GLOBALS[forumid] != 1,2,33,55">YOUR CODE HERE</vb:if>

You can add as many as forums you want.

Antonio Pereira 06-22-2011 09:08 PM

Quote:

Originally Posted by Winter Sonata (Post 2211285)
<vb:if condition="$GLOBALS[forumid] != 1,2,33,55">YOUR CODE HERE</vb:if>

You can add as many as forums you want.

You have tried this?

Dont work give error.

Best Regards

Winter Sonata 06-22-2011 10:29 PM

Sorry, did you try this one ?

<vb:if condition="$forum[forumid] != 1,333,55,44,555">YOUR CODE HERE</vb:if>

write the forums ID which you want the buttons to appear in.

MADMA 07-01-2011 07:29 PM

Quote:

Originally Posted by AdamFL (Post 2205320)
Thank you. I have an issue and not sure if it's related. I checked the URL and seems like when I share on twitter the posted tweet links are like:



without the "/" -- Any ideas to fix this?

Thanks

Replace

Code:

<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>
With

Code:

<td valign="bottom"><a href="http://twitter.com/share" class="twitter-share-button" data-count="vertical" data-via="Your-Twitter-Name" data-url="{vb:raw vboptions.bburl}/showthread.php?t={vb:raw thread.threadid}">Tweet</a><script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script></td>

owning_y0u 07-02-2011 01:06 AM

Tweets not updating. keeps standing on 0

MADMA 07-02-2011 04:34 PM

Quote:

Originally Posted by owning_y0u (Post 2215694)
Tweets not updating. keeps standing on 0

the tweet count doesnt work correctly


All times are GMT. The time now is 10:25 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.01440 seconds
  • Memory Usage 1,828KB
  • 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
  • (11)bbcode_code_printable
  • (14)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
  • (40)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