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)

Danoxth 08-22-2010 05:55 AM

Quote:

Originally Posted by baghdad4ever (Post 2083835)
installed

but there is problem

it send this

http://www.baghdad4ever.netshowthread.php/299978

instead of this url

http://www.baghdad4ever.net/vb/showthread.php/299978

how to fix that?

I'm having the same problem as this, I've checked the contact details in the options and everything is as it should be, any ideas?

BirdOPrey5 08-22-2010 01:37 PM

That's weird but this should fix it...

Edit your headinclude template:

Find:
Code:

                <meta name="description" content="{vb:raw vboptions.description}" />
</vb:if>

Below it Add:
Code:

<vb:if condition="THIS_SCRIPT == 'showthread'">
<link rel="canonical" href="http://www.example.com/forum/{vb:link thread, {vb:raw thread}, {vb:raw pageinfo_post}}" />
</vb:if>

Make sure you change http://www.example.com/forum/ to the URL to your own forums, whatever is before "showthread.php..." when you are viewing a thread. (In the example given it would be: http://www.baghdad4ever.net/vb/)

This will include a canonical link on your threads (and only threads) which over-rides the URL passed to Twitter, with hopefully, the right one now...

If this doesn't work please give me a link to your forums so I can see what is up...

Danoxth 08-22-2010 07:01 PM

That worked, cheers for that - much appreciated :)

Alucard^ 08-22-2010 07:08 PM

Hi man, nice hack!

I have some little problems... see the image:

https://vborg.vbsupport.ru/external/2010/08/22.png

I am using this code:

PHP Code:

<vb:if condition="!in_array($GLOBALS[forumid], array(191, 192, 217, 114, 216))">
<
div align="right" style="height:27px;">
<
a name="fb_share" type="button_count" href="http://www.facebook.com/sharer.php">Compartir</a><script src="http://static.ak.fbcdn.net/connect.php/js/FB.Share" type="text/javascript">
</
script>
<
a href="http://twitter.com/share" class="twitter-share-button" data-count="horizontal" data-via="nvnetgroup">Tweet</a><script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script>
</
div>
</
vb:if> 

What is wrong?

Thanks.

zelnik 08-22-2010 07:29 PM

Quote:

Originally Posted by Alucard^ (Post 2087960)
Hi man, nice hack!

I have some little problems... see the image:

Look at post one and use the code near the bottom and it might work.

BirdOPrey5 08-22-2010 09:59 PM

Quote:

Originally Posted by Danoxth (Post 2087955)
That worked, cheers for that - much appreciated :)

Great!

Quote:

Originally Posted by Alucard^ (Post 2087960)
Hi man, nice hack!

I have some little problems... see the image:

http://www.webpagescreenshot.info/im...10110302pm.png

I am using this code:

PHP Code:

<vb:if condition="!in_array($GLOBALS[forumid], array(191, 192, 217, 114, 216))">
<
div align="right" style="height:27px;">
<
a name="fb_share" type="button_count" href="http://www.facebook.com/sharer.php">Compartir</a><script src="http://static.ak.fbcdn.net/connect.php/js/FB.Share" type="text/javascript">
</
script>
<
a href="http://twitter.com/share" class="twitter-share-button" data-count="horizontal" data-via="nvnetgroup">Tweet</a><script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script>
</
div>
</
vb:if> 

What is wrong?

Thanks.

Looks like you used the first code labeled for people who DO NOT use Facebook Like... you seem to use Facebook Like so use the alternate instructions I provided in the top post...
(Copied below for easy reference)


If you DO USE the built-in Facebook Like button do the following:


Find:
Code:

                {vb:raw fblikebutton}
Replace it with:

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_USERNAME">Tweet</a><script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script></div>{vb:raw fblikebutton}
Replace "YOUR_TWITTER_USERNAME" with your twitter username, it will be referenced in the tweet- but the tweet will not be from YOU, it will be from whoever hits the tweet button.

The Tweet button will now show up next to the Facebook Like button in anytime the Facebook Like button is displayed in a thread.

Alucard^ 08-23-2010 01:25 PM

1 Attachment(s)
Yes but like you can see... i am not using the like button... i am using another button, share button (i am using this https://vborg.vbsupport.ru/showthread.php?t=234548 but i want to use both in the same location).

I tried with:

PHP Code:

<vb:if condition="!in_array($GLOBALS[forumid], array(191, 192, 217, 114, 216))">
<
div style="border: none; overflow: hidden; height: 27px; width: 95px; vertical-align: text-bottom; padding-top:1px;">
<
a name="fb_share" type="button_count" href="http://www.facebook.com/sharer.php">Compartir</a><script src="http://static.ak.fbcdn.net/connect.php/js/FB.Share" type="text/javascript">
</
script>
<
a href="http://twitter.com/share" class="twitter-share-button" data-count="horizontal" data-via="nvnetgroup">Tweet</a><script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script>
</
div>
</
vb:if> 

But this happen (see the attached image)

BirdOPrey5 08-23-2010 02:08 PM

If you're using another mod I can't tell you where to put it- but if you can post your say the top third of your showthread template can look at it and try to give you an idea on where to put it and how to customize the code a little.

If you post it, post it without the tweet code at all- whatever you have that works for you now.

Tony_FPM 08-23-2010 02:24 PM

Quote:

Originally Posted by CMSTemplateZ (Post 2083730)
Thanks bud for a quick reply... i worked it out.... See Here: http://battlefield3forums.com/content/

I added it to the start of the breadcrumb div and wrapped it in my own custom div to style it a little better... because the facebook like text color can not be changed it's kinda hard to see i will keep playing around with it.

Thanks for this, just hope people still click these buttons, now that every site seems to have them numbers have dropped alot, hopefully the tweet button gets people clicking it.

Cheers again for posting this

WOW man, very nice template. How do you make the spaces between the widgets on the CMS

Thanks man.

Alucard^ 08-23-2010 06:51 PM

Quote:

Originally Posted by BirdOPrey5 (Post 2088336)
If you're using another mod I can't tell you where to put it- but if you can post your say the top third of your showthread template can look at it and try to give you an idea on where to put it and how to customize the code a little.

If you post it, post it without the tweet code at all- whatever you have that works for you now.

Really sry for my english but i didn't understand at all this... what do you mean with "top third of your showthread template"?

The problem is that the facebook share button appear some pixels lower than the tweet button.

Thanks


All times are GMT. The time now is 09:48 AM.

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.01192 seconds
  • Memory Usage 1,777KB
  • 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
  • (4)bbcode_code_printable
  • (3)bbcode_php_printable
  • (6)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