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 - Twitter - Tweet Button in SHOWTHREAD (https://vborg.vbsupport.ru/showthread.php?t=248569)

Merenguista 02-08-2011 09:04 PM

I'll tying this .. Thank's man ..

Kingdombuilder 02-13-2011 09:51 PM

For those that are using 4.1.1 and you are using the fb integration, I used this code that i put together from the earlier posts in this thread:

Code:

<div id="fb_likeframe" style="border: none; overflow: hidden; height: 27px; width: 95px; vertical-align: text-bottom; padding-top:1px;"><a href="http://twitter.com/share" class="twitter-share-button" data-count="horizontal" data-via="YOUR TWITTER ACCOUNT NAME" data-url="{vb:raw vboptions.bburl}/showthread.php?t={vb:raw threadid}" data-counturl="{vb:raw vboptions.bburl}/showthread.php?t={vb:raw threadid}">Tweet</a><script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script></div>{vb:raw fblikebutton}
I hope this helps you. this is an awesome mod thanks to all for this hack!

Krusty1231 02-14-2011 10:00 AM

Thanks for this - tested on VB 4.1.1 using Kingdombuilder's code.....works great.

AURFSCAN 02-14-2011 09:52 PM

hello BOP5

If i have a thread with 50 pages, when i make a tweet for a particular page... say page 20 it will resolve the url of the page to twitter if the format of the url ending is like this

/page20

but will not resolve the url of the page to twitter if the end of the url is like this

&p=46607#post46607

if the url ends with eg. &p=46607#post46607 the tweet url will point to the start of the thread regardless how many pages in the thread.

How do I make it that the url tweeted will be whatever is in the address bar

It understands /page20 but wont resolve &p=46607#post46607

thanks

BirdOPrey5 02-16-2011 01:03 PM

First, in general tweeting page numbers tends to cause problems. Most forums allow users to select the number of posts per page so your page 10 might be my page 5 or someone else's page 1... so the page number tweeted might not work for whoever follows the link in the tweet.

In the code I recently posted:
Code:

<a href="http://twitter.com/share" class="twitter-share-button" data-count="horizontal" data-via="YOUR_TWITTER_USERNAME" data-url="{vb:raw vboptions.bburl}/showthread.php?t={vb:raw threadid}" data-counturl="{vb:raw vboptions.bburl}/showthread.php?t={vb:raw threadid}">Tweet</a><script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script>
It will always tweet the first page of the thread which is what I recommend.

If you remove the data-url and data-counturl attributes the URL tweeted should match exactly the URL in the browser address bar which should respect page numbers, but as I said they can be different for different people.

Code:

<a href="http://twitter.com/share" class="twitter-share-button" data-count="horizontal" data-via="YOUR_TWITTER_USERNAME">Tweet</a><script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script>

AURFSCAN 02-16-2011 05:49 PM

I'll check it out.. big thanks BOP5

Poker Face 03-05-2011 05:15 PM

<a href="https://vborg.vbsupport.ru/attachment.php?attachmentid=121142&d=1282396263" target="_blank">https://vborg.vbsupport.ru/attac...2&d=1282396263</a>

Just upgraded to 4.1.2 and the facebook like button is floating left, to the end of Thread Title instead of staying right with the tweet button as shown in this image...

Everything seems to be working...

What do I need to change to keep it to the Right?

BirdOPrey5 03-05-2011 05:46 PM

Quote:

Originally Posted by Poker Face (Post 2169889)
https://vborg.vbsupport.ru/attachmen...2&d=1282396263

Just upgraded to 4.1.2 and the facebook like button is floating left, to the end of Thread Title instead of staying right with the tweet button as shown in this image...

Everything seems to be working...

What do I need to change to keep it to the Right?

See post # 180 in this thread... if/when I get to install 4.1.2 I may have more answers.

yahooooh 03-13-2011 07:11 AM

count issue
i think it is because of t.co short url services of twitter and some pages will not be counted
if you can add short url to the code so it will works

nick-harper 03-22-2011 10:53 PM

In 4.1.2 there is a template called "facebook_likebutton"

Just add it to the end of that template :)


All times are GMT. The time now is 05:08 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.01205 seconds
  • Memory Usage 1,741KB
  • 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
  • (3)bbcode_code_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (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