vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=251)
-   -   Twitter Like Button (https://vborg.vbsupport.ru/showthread.php?t=293556)

Bob_R 01-03-2013 04:07 PM

Twitter Like Button
 
I was advised at vbulletin.com https://www.vbulletin.com/forum/show...ok-Like-button to ask over here.

So, here goes.

I'd like a Twitter Like button on the top of SHOWTHREAD and would like it to function just like my Facebook Like button does.

In other words the button doesn't show in private forums.

How can this be done?

Thanks!!

Brandon Sheley 01-03-2013 04:22 PM

That link doesn't work for me..
but.. I had added my social networking buttons in one of the ad_location templates, I think it was ad_location_above_forum or something like that.
Just past the "tweet me" button code in there, you can add google plus and facebook if you want as well.
You can add if conditions around the code to prevent them from showing in forums you wish.

Bob_R 01-03-2013 04:51 PM

FYI: Fixed link

Brandon, I'd like it exactly where vBulletin places the Facebook Like button (next to it obviously).

I have the code to render it, what I really just need is help with the code to exclude the certain forums (which the Facebook Like button just does by default for lack of a better word).

Brandon Sheley 01-03-2013 08:29 PM

Quote:

Originally Posted by Bob_R (Post 2394525)
FYI: Fixed link

Brandon, I'd like it exactly where vBulletin places the Facebook Like button (next to it obviously).

I have the code to render it, what I really just need is help with the code to exclude the certain forums (which the Facebook Like button just does by default for lack of a better word).

I don't exactly remember where vbulletin has those located, are they under the post or above?
Either way I don't think there is a hook for it, I'd poke around the showthread template and see if you can find the facebook code, place it under that.

Bob_R 01-03-2013 08:41 PM

Thanks.

All I need is code to exclude certain forums. The Facebook Like automatically doesn't appear in private forums. Which to have the same for Twitter.

FYI: Facebook code doesn't have the code, it's done automatically (for lack of a better word).

Brandon Sheley 01-03-2013 09:41 PM

Quote:

Originally Posted by Bob_R (Post 2394560)
Thanks.

All I need is code to exclude certain forums. The Facebook Like automatically doesn't appear in private forums. Which to have the same for Twitter.

Here you go :)

https://vborg.vbsupport.ru/showthread.php?t=231525

karnevil 10-24-2013 10:02 AM

I've just done this, and used the same conditional as on the facebook like...as they will only want to show together. May be a bit simplistic but works perfectly.

Code:

<vb:if condition="$show['fb_likebutton']">
                        {vb:raw fblikebutton}
                </vb:if>



<vb:if condition="$show['fb_likebutton']">

 <a href="https://twitter.com/share" class="twitter-share-button" data-via="LegalBeagles">Tweet</a>
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+'://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js,fjs);}}(document, 'script', 'twitter-wjs');</script>

</vb:if>



All times are GMT. The time now is 01:21 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.01101 seconds
  • Memory Usage 1,727KB
  • 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
  • (1)bbcode_code_printable
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (7)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
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete