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)

doobiefillin 01-08-2011 05:40 PM

i get this error when i click the tweet button and the popup appears

'url' parameter does not contain a valid URL.

nevermind it was fixed with the above mentioned code change

BirdOPrey5 01-08-2011 05:41 PM

Quote:

Originally Posted by doobiefillin (Post 2146055)
i get this error when i click the tweet button and the popup appears

'url' parameter does not contain a valid URL.

Use the fix posted in post # 143,

RK KINGKONG 01-14-2011 08:03 PM

I got this to look n work well http://www.righteouskings.com/showth...ease-Post-Here

but for some reason though my facebook like button is activated in my facebook options its not showing

RK KINGKONG 01-14-2011 08:59 PM

1 Attachment(s)
this is what my showthread template looks like with the tweet in it already
but my facebook button isnt showing

RK KINGKONG 01-14-2011 10:15 PM

WOW this is aggravating , at first when i first put in this code it worked fine , now i get some error
Quote:

'url' parameter does not contain a valid URL.
but then when i put in the fix from post 143 the tweet button winds up all the way towards the middle of my page not far right where it was . what i dont understand is that it worked fine when i first input .
Quote:

Originally Posted by RK KINGKONG (Post 2149153)
this is what my showthread template looks like with the tweet in it already
but my facebook button isnt showing


RK KINGKONG 01-14-2011 10:33 PM

ok lol so the twitter is fully functional now , however the facebook like button , the defualt one can anyone tell me or give me an idea as to why it wont show ? it is selected in the admin cp options for facebook to display it

BirdOPrey5 01-14-2011 10:54 PM

There are several built in facebook templates you should have, including one called facebook_likebutton

The contents of this are:
Code:

<iframe id="fb_likeframe" src="http://www.facebook.com/plugins/like.php?href={vb:raw href}&amp;layout=standard&amp;show_faces=false&amp;width=260&amp;action=like&amp;font=tahoma&amp;colorscheme=light&amp;height=27" scrolling="no" frameborder="0" allowTransparency="true"></iframe>
My guess is that template is empty, or non-existent in your custom style and that is why you don't have a facebook button... you should add it if it's missing...

RK KINGKONG 01-14-2011 11:10 PM

ok im about to throw my pc out the window , thank you for trying , yes there is such a template n yes it does have that code in it , so i just dont know , and lack of experience doesnt help but im pretty sure im all well but it just doesnt want to work for me sad day , 8 hours dam near trying to get this to work for me , well it works im just talking abou the facebook button the tweet is perfect now

EquinoxWorld 01-15-2011 12:15 AM

Quote:

Originally Posted by RK KINGKONG (Post 2149179)
ok lol so the twitter is fully functional now , however the facebook like button , the defualt one can anyone tell me or give me an idea as to why it wont show ? it is selected in the admin cp options for facebook to display it

Did you set up the API key and everything and enabled f/b through your admincp options?

RK KINGKONG 01-15-2011 06:59 AM

Yes my issue was that I didn't have the default facebook on. Then on top of that I have another modd called facebook bridge, which was conflicting with the default. Making it give me a error code. However the great dev gave me great help and was very patient. THANKS for your reply. VB 4.1. PATCH 2. THANKS

zelnik 01-24-2011 12:53 PM

Hey BOP any idea how to add the twitter button to CMS and Blog stuff yet?

BirdOPrey5 01-24-2011 05:33 PM

I just got access to a Suite version of VB4 so I'll play around and let you know soon.

Special Pages 01-24-2011 05:36 PM

Thank you so much! I love it! :D

BirdOPrey5 01-24-2011 09:02 PM

Quote:

Originally Posted by BirdOPrey5 (Post 2153938)
I just got access to a Suite version of VB4 so I'll play around and let you know soon.

Uggh! I thought it was the suite version, it turned out to be classic forum with VB Advanced instead. If anyone has a VB Full Suite test site I can login and play with I can try to figure out how to add it to the Articles... If you do PM me the login details, will need to be an admin account.

Thanks.

I will edit this post if someone sends me a login so if you are reading this probably no one has yet. ;)

Iguana Goddess 02-01-2011 05:52 PM

Everything works great except lol I can ONLY tweet from the private forums and not the public ones! I have the built in fb like button enabled, followed the instructions, I am running version 4.1.1

BirdOPrey5 02-01-2011 07:36 PM

Are you using a <vb:if...> conditional? If so it sounds like there is an extra or missing exclamation point (!) which would show the tweet button in the opposite forums.

Iguana Goddess 02-01-2011 11:12 PM

Quote:

Originally Posted by BirdOPrey5 (Post 2157479)
Are you using a <vb:if...> conditional? If so it sounds like there is an extra or missing exclamation point (!) which would show the tweet button in the opposite forums.

The buttons show everywhere (unless I am misunderstanding what you mean).
Decided to test the forums again, and well now it's working with no problem, maybe I just needed to clear my cache? That is all I have done since the install earlier now no issues. Thanks for your time.

BirdOPrey5 02-02-2011 12:25 AM

OK, glad it is working. :up:

BlueCheri 02-05-2011 11:55 AM

Working fine, thanx

BirdOPrey5 02-07-2011 12:14 PM

It appears vBulletin has changed the location of the Facebook Like button in version 4.1.2. As a result it is likely the code changes needed will be different in 4.1.2 and beyond, I will not be able to support installs beginning with version 4.1.2 since my license stops at 4.0.8. You can try the code and report your results on 4.1.2 and beyond. The main point is the twitter code can really be placed anywhere on showthread- it's finding the ideal location that will take some trial and error:
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>
After you find the best location you can worry about a conditional to only show in some forums if you want.

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 :)

nick-harper 03-22-2011 11:12 PM

Try This:

Code:

<a href="http://twitter.com/share" class="twitter-share-button" data-count="horizontal" data-via="TWITTERNAME" data-url="{vb:raw vboptions.bburl}/{vb:link thread, {vb:raw thread}, {vb:raw pageinfo_newpost}, 'threadid', 'threadtitle'}">Tweet</a><script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script>

BirdOPrey5 03-22-2011 11:26 PM

Quote:

Originally Posted by nick-harper (Post 2176359)
In 4.1.2 there is a template called "facebook_likebutton"

Just add it to the end of that template :)

Great Idea :up:

Quote:

Originally Posted by nick-harper (Post 2176366)
Try This:

Code:

<a href="http://twitter.com/share" class="twitter-share-button" data-count="horizontal" data-via="TWITTERNAME" data-url="{vb:raw vboptions.bburl}/{vb:link thread, {vb:raw thread}, {vb:raw pageinfo_newpost}, 'threadid', 'threadtitle'}">Tweet</a><script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script>

That should work, my concerns are it will use the page number and the thread title. On many forums people's page numbers vary... For instance this is page 4 for me, it may be page 10 for someone else or page 2 for yet someone else. Therefore if you tweet the url with the page number the person following the link could very well end up on a different page.

For this reason I prefer to tweet the first page only no matter what page someone hits the tweet button on. Not to mention each page would have it's own tweet counter (so if someone tweets page 2, page 1 would be zero still).

For the same reason I don't like using the full title in the URL because if the title is edited the count will reset as well.

Eruantien 03-23-2011 07:20 PM

Anyone know why the tweet count resets to 0 when you refresh the page?

TWood 06-09-2011 04:24 PM

I used the code from Post 143 here and it works nicely to fix the dropped slash problem. Thank you!

How would that code be modified to Tweet a link to a single post? I'd add the button to the post header bar, next to the permalink. I assume it would use the permalink, but don't know how to code that.

Similarly, how would the code for the Facebook 'Like' button be modified to 'Like' a single post instead of the entire thread?

Thanx

(I'm using 4.1.3)

BirdOPrey5 06-09-2011 05:34 PM

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?p={vb:raw post.postid}#post{vb:raw post.postid}">Tweet</a><script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script>
That should work per post anywhere in the postbit templates.

In facebook or anything else use this URL per post:
Code:

{vb:raw vboptions.bburl}/showthread.php?p={vb:raw post.postid}#post{vb:raw post.postid}

andycaps 06-09-2011 06:08 PM

I installed this ok and it sends the thread out to my twitter page but the URL on the tweet does not take the reader back to the forum thread?

Its: Tweet to Twitter test http://t.co/vzi8yBF

Does anyone know why its creating the wrong link, what do i need to do to the code to correct this and auto post the correct URL back to the forum thread?

thanks guys
Andy

BirdOPrey5 06-09-2011 07:04 PM

There is so much wrong with the URL you pasted I don't know where to begin...

Exactly what code are you using for the twitter buttong- post it here.

Also post the URL to a thread that has the twitter button on your forum.

TWood 06-10-2011 12:48 AM

Thanks BoP -

BTW, I placed a bug report at Twitter regarding the missing / after the .com and they acknowledge the bug:

http://code.google.com/p/twitter-api...detail?id=2231

Quote:

Looking at your source code you have the following line in your <head> element:
<link rel="canonical" href="showthread.php?37-Welcome-to-78759-and-Surrounding-Areas">

Your canonical URL is relative and it looks like the concatenation of base url + canonical url is missing the joining '/'.

Letting the team know so they can look into it. Updating the title from:
Tweet button removes slash in vBulletin URL and breaks the hyperlink


Summary: forward slash is missing when a relative rel="canonical" is concatenated to the domain
Status: Acknowledged

BirdOPrey5 06-10-2011 11:49 AM

Cool. :up:

TWood 06-11-2011 04:40 PM

Heh,

I also submitted this as a bug report to vBulletin and they acknowledged the bug but downgraded it from my "Major" rating to "Minor". Not being able to let your Twitter users with a large number of followers share a link to your forum is minor?


All times are GMT. The time now is 07:31 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.01704 seconds
  • Memory Usage 1,842KB
  • 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
  • (9)bbcode_code_printable
  • (10)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)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