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)

digobguerreiro 09-13-2010 08:02 PM

Find: headinclude

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

Replace

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

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

Find: SHOWTHREAD

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

Replace

<vb:if condition="$show['fb_likebutton']">
<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?url=http://www.forumdigitalfoto.com/{vb:link thread, {vb:raw thread}}" class="twitter-share-button" data-count="horizontal" data-via="f_digitalfoto">Tweet</a><script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script></div>{vb:raw fblikebutton}

---------------------------------------------

The code above worked for my forum but now have a problem. Topics with accents do not work. How to solve this problem?

BirdOPrey5 09-13-2010 08:38 PM

What do you mean by "accents"? Accented characters? like ãàÈ? Can you link me to a thread where it isn't working?

ComoEstaEso-com 09-14-2010 04:58 AM

Installed!
Using this mod, and the vB 4.0.6 built-in Facebook Like button.
All working smoothly.
THANK YOU! :D
w00t w00t! :)

digobguerreiro 09-15-2010 11:32 AM

Quote:

What do you mean by "accents"? Accented characters? like ???? Can you link me to a thread where it isn't working?
Characters ??? not working

BirdOPrey5 09-15-2010 02:49 PM

Honestly I have no experience with non english characters, I'll google and see if I can find the issue. A link where I could see it may be able to help.

BirdOPrey5 09-16-2010 02:19 PM

I'm not having a problem with accented characters... Here I tweeted this and it worked fine:
http://t.co/TAIYSz1

Also no reports on Google of any issues on this subject. I will need a link to a thread where it isn't working to be able to try anything else.

ComoEstaEso-com 09-16-2010 08:08 PM

I'm experiencing the zero-value tweet count.
We are running vBseo, and vB4.0.6

Somehow, I think it is something on Twitter's side.
In any event... so far so good! :)

Neal-UK 09-20-2010 03:20 PM

This is odd. I'm using the built-in Facebook like option. When vBSEO is enabled, only the Facebook button shows. Disabling vBSEO and the Twitter button shows but no Facebook.

Montecristo 09-20-2010 04:57 PM

Help. I've tried everything and does not work.

Clicking the button tweet sends me www.miforo.comshowthread.... instead of www.miforo.com / forums / showthread ....

What could be?

BirdOPrey5 09-20-2010 06:56 PM

Quote:

Originally Posted by Montecristo (Post 2101049)
Help. I've tried everything and does not work.

Clicking the button tweet sends me www.miforo.comshowthread.... instead of www.miforo.com / forums / showthread ....

What could be?

The 'fix' for your problem was posted in post #42 of this thread.

Quote:

Originally Posted by Neal-UK (Post 2101002)
This is odd. I'm using the built-in Facebook like option. When vBSEO is enabled, only the Facebook button shows. Disabling vBSEO and the Twitter button shows but no Facebook.

That is very odd... I would double check the template edit was in the exact right place... Also would be interested in viewing source of your pages in each condition (at least the text around where the buttons should be) so can you post that code or a link where I can see it myself?

Montecristo 09-21-2010 01:10 AM

[QUOTE=BirdOPrey5;2101108]The 'fix' for your problem was posted in post #42 of this thread.

No... I tried everthing.... and nathing!!!!!!!!!!!!!!:(

BirdOPrey5 09-21-2010 01:24 AM

[QUOTE=Montecristo;2101221]
Quote:

Originally Posted by BirdOPrey5 (Post 2101108)
The 'fix' for your problem was posted in post #42 of this thread.

No... I tried everthing.... and nathing!!!!!!!!!!!!!!:(

Link to your forum? www.miforo.com isn't working...

Montecristo 09-21-2010 03:03 PM

The problem are the titles of the post. If you have óíéúá´. not work.

your post appears showthread.php?t=54254

my post showthread?t=54254-this-is-the-name-my-póst <---the accent no works

BirdOPrey5 09-21-2010 03:55 PM

Quote:

Originally Posted by Montecristo (Post 2101449)
The problem are the titles of the post. If you have ??????. not work.

your post appears showthread.php?t=54254

my post showthread?t=54254-this-is-the-name-my-p?st <---the accent no works

Yes you are correct... when I repeated the test on a 4.0 test board I get the error "'url' parameter does not contain a valid URL" I notice if you erase the text and keep the number the link still works, for example:
http://www.testdomain/test/showthread.php/16-accent-test-%C3%B3%C3%AD%C3%A9%C3%BA%C3%A1

goes to the same place as simply:
http://www.testdomain/test/showthread.php/16

I will see if there's a way to use the simplified URL as the URL parameter

Montecristo 09-21-2010 04:14 PM

Quote:

Originally Posted by BirdOPrey5 (Post 2101466)
Yes you are correct... when I repeated the test on a 4.0 test board I get the error "'url' parameter does not contain a valid URL" I notice if you erase the text and keep the number the link still works, for example:
http://www.testdomain/test/showthread.php/16-accent-test-%C3%B3%C3%AD%C3%A9%C3%BA%C3%A1

goes to the same place as simply:
http://www.testdomain/test/showthread.php/16

I will see if there's a way to use the simplified URL as the URL parameter


Thanks, I look forward to your response. :D:up:;)

Montecristo 09-21-2010 08:32 PM

Ok, i change url friendly in admincp url and works.

URL FRIENDLY STANDAR

Thanks!!!!!!!!!!!

BirdOPrey5 09-21-2010 09:44 PM

Great news!

subvertbeats 09-22-2010 10:28 AM

Hi Joe

Indeed setting the board to use standard URLs does get around this issue, but if the mod can somehow use the standard URL whislt friendly URLs are enabled for the board that would be ideal since friendly URLs are good for our search engine rankings.

Thanks for this excellent mod...

BirdOPrey5 09-22-2010 11:19 AM

Quote:

Originally Posted by subvertbeats (Post 2101771)
Hi Joe

Indeed setting the board to use standard URLs does get around this issue, but if the mod can somehow use the standard URL whislt friendly URLs are enabled for the board that would be ideal since friendly URLs are good for our search engine rankings.

Thanks for this excellent mod...

Understood. Is this problem currently affecting you personally? (Just trying to prioritize things.)

Neal-UK 09-23-2010 04:08 AM

Got mine working again, it's a vBSEO issue: http://www.vbseo.com/f77/facebook-li...hes-45619-new/

ceho 09-23-2010 04:25 PM

I installed it on a customized 4.0.7 using the I Like button and it works perfect, thank you very much.

However, it looks I am a bit slow tonight ;-), is it possible to have the twitter button and cound left to the FB button? I am a bit confused with the code, maybe you can help me?

Thanks a lot!

BirdOPrey5 09-23-2010 04:52 PM

Although it's counter-intuitive if you just swap the code location with the facebook like button the Tweet button will be to the left of the FB button.

Use this as a replacement instead of the original directions:

Code:

{vb:raw fblikebutton}<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>

ceho 09-23-2010 06:30 PM

That was too easy ;-). Thank you very much and I will consider your advice for sure!

Tony_FPM 09-23-2010 09:24 PM

Quote:

Originally Posted by BirdOPrey5 (Post 2087821)
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...

Done but still not working. Now i get http://www.freakpyromaniacs.com/foru...uot-16-09-2010 when i click the link in the tweet and it is missing again a / ....http://www.freakpyromaniacs.com/forum/forum.phpshow/thread.php?28916-Bunker-met-vuurwerk-in-Duitsland-quot-ontploft-quot-16-09-2010

Help me please...

This is my template code
PHP Code:

<meta http-equiv="Content-Type" content="text/html; charset={vb:stylevar charset}" />
<
meta id="e_vb_meta_bburl" name="vb_meta_bburl" content="{vb:raw vboptions.bburl}" />
<
base href="{vb:raw vboptions.bburl}/" /><!--[if IE]></base><![endif]-->
<
meta name="generator" content="vBulletin {vb:raw vboptions.templateversion}" />

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

<
vb:elseif condition="$show['foruminfo']" />
        <
meta name="keywords" content="{vb:raw foruminfo.title_clean}, {vb:raw vboptions.keywords}" />
        <
meta name="description" content="<vb:if condition="$pagenumber 1">{vb:rawphrase page_x, {vb:raw pagenumber}}-</vb:if>{vb:raw foruminfo.description_clean}" />
<
vb:else />
        <
meta name="keywords" content="{vb:raw vboptions.keywords}" />
        <
meta name="description" content="{vb:raw vboptions.description}" />
</
vb:if>
<
vb:if condition="THIS_SCRIPT == 'showthread'">
<
link rel="canonical" href="http://www.freakpyromaniacs.com/forum/forum.php{vb:link thread, {vb:raw thread}, {vb:raw pageinfo_post}}" />
</
vb:if>

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

<
script type="text/javascript" src="{vb:stylevar yuipath}/yuiloader-dom-event/yuiloader-dom-event.js?v={vb:raw vboptions.simpleversion}"></script>
<
script type="text/javascript" src="{vb:stylevar yuipath}/connection/connection-min.js?v={vb:raw vboptions.simpleversion}"></script>
<
script type="text/javascript">
<!--
    var 
SESSIONURL "{vb:raw session.sessionurl_js}";
    var 
SECURITYTOKEN "{vb:raw bbuserinfo.securitytoken}";
    var 
IMGDIR_MISC "{vb:stylevar imgdir_misc}";
    var 
IMGDIR_BUTTON "{vb:stylevar imgdir_button}";
    var 
vb_disable_ajax parseInt("{vb:raw vboptions.disable_ajax}"10);
    var 
SIMPLEVERSION "{vb:raw vboptions.simpleversion}";
    var 
BBURL "{vb:raw vboptions.bburl}";
    var 
LOGGEDIN = {vb:raw bbuserinfo.userid} > true false;
    var 
THIS_SCRIPT "{vb:raw this_script}";
        var 
RELPATH "{vb:raw relpath}";
// -->
</script>
<
script type="text/javascript" src="{vb:raw vboptions.bburl}/clientscript/vbulletin-core.js?v={vb:raw vboptions.simpleversion}"></script>
{
vb:raw template_hook.headinclude_javascript}

<
vb:if condition="$vboptions['externalrss']">
    <
link rel="alternate" type="application/rss+xml" title="{vb:raw vboptions.bbtitle} {vb:rawphrase rss_feed}" href="{vb:raw vboptions.bburl}/external.php?type=RSS2" />
    <
vb:if condition="$show['foruminfo'] OR $show['threadinfo']">
        <
link rel="alternate" type="application/rss+xml" title="{vb:raw vboptions.bbtitle} - {vb:raw foruminfo.title_clean} - {vb:rawphrase rss_feed}" href="{vb:raw vboptions.bburl}/external.php?type=RSS2&amp;forumids={vb:raw foruminfo.forumid}" />
    </
vb:if>
</
vb:if>

<
vb:if condition="$vboptions['storecssasfile']">
    {
vb:cssfile main-rollup.css}
        {
vb:raw template_hook.custom_css_links}
<
vb:else />
    {
vb:cssfile bbcode.css,editor.css,popupmenu.css,reset-fonts.css,vbulletin.css,vbulletin-chrome.css,vbulletin-formcontrols.css{vb:raw template_hook.custom_css_list}}
</
vb:if>
{
vb:raw template_hook.headinclude_css


BirdOPrey5 09-23-2010 09:50 PM

^^^^

Your issue is with the line:

HTML Code:

<link rel="canonical" href="http://www.freakpyromaniacs.com/forum/forum.php{vb:link thread, {vb:raw thread}, {vb:raw pageinfo_post}}" />
Change it to:

HTML Code:

<link rel="canonical" href="http://www.freakpyromaniacs.com/forum/{vb:link thread, {vb:raw thread}, {vb:raw pageinfo_post}}" />
and you should be set. :up:

You had an extra "forum.php" in that line...

Tony_FPM 09-23-2010 10:48 PM

Quote:

Originally Posted by BirdOPrey5 (Post 2102460)
^^^^

Your issue is with the line:

HTML Code:

<link rel="canonical" href="http://www.freakpyromaniacs.com/forum/forum.php{vb:link thread, {vb:raw thread}, {vb:raw pageinfo_post}}" />
Change it to:

HTML Code:

<link rel="canonical" href="http://www.freakpyromaniacs.com/forum/{vb:link thread, {vb:raw thread}, {vb:raw pageinfo_post}}" />
and you should be set. :up:

You had an extra "forum.php" in that line...

Thanks. It works now! :)

swiftor 09-26-2010 08:12 PM

1 Attachment(s)
You didn't mention this working for blogs, but I tried anyway in the blog_show_entry template, and it appears on two separate lines. Any chance of instructing on how to make it look nicer on one line?

Attachment 122351

BirdOPrey5 09-26-2010 10:09 PM

I don't have the vB4 Suite so I can't test out too much. I downloaded a copy of your blog and played with some settings- if you completely remove the <div> tag around the Twitter code then both buttons show up on the same line, but the twitter button is a few pixels higher than the Facebook button. I haven't figured out a way to correct this without using a div tag, if I had a suite license I would try some more but if you play with it hopefully you can figure it out.

Also I noticed you didn't put your Twitter username into the code, your username is still set to "YOUR_TWITTER_USERNAME."

swiftor 09-27-2010 02:40 AM

thanks for that!

subvertbeats 09-27-2010 11:29 AM

Quote:

Originally Posted by BirdOPrey5 (Post 2101791)
Understood. Is this problem currently affecting you personally? (Just trying to prioritize things.)

Hi Joe

Id be hard pressed to say that with any confidence.
Basically, I just dont know if its affecting us. I think it might be but can't say for sure.

All the best,

Tony_FPM 09-27-2010 01:48 PM

Everything works accept the counter.
We also work with VBseo but don't use the FB options.

BirdOPrey5 09-27-2010 02:03 PM

The counter may not work if you have unique URL's for whatever reason. You can remove the count by changing the code from data-count="horizontal" to data-count="none".

motorola 09-29-2010 09:44 PM

I got this error in vB 4.0.7 => 'url' parameter does not contain a valid URL. What's wrong?

BirdOPrey5 09-29-2010 11:02 PM

Quote:

Originally Posted by motorola (Post 2104817)
I got this error in vB 4.0.7 => 'url' parameter does not contain a valid URL. What's wrong?

Does the URL contain foreign language characters? Maybe ones with accents? This was a reported issue so far the only solution is to change the type of URL's in vbulletin options to Standard instead of Friendly, but this isn't an ideal solution because friendly url's are better for SEO. I am working on another solution but haven't found it yet.

Sea Shepherd 09-30-2010 03:14 PM

I also get:
After clicking the TWEET button.

URL required

'url' parameter does not contain a valid URL.

BirdOPrey5 09-30-2010 03:21 PM

Quote:

Originally Posted by Sea Shepherd (Post 2105141)
I also get:
After clicking the TWEET button.

URL required

'url' parameter does not contain a valid URL.

I ask you the same question as I asked in post #114, do you have accented characters in your thread title?

Sea Shepherd 10-01-2010 07:46 AM

Not that i can see.
However it seems to be working today!

Edit: Stopped working again. Example URL: http://www.planetoceanalliance.org/f...e.-Please-Read.

BirdOPrey5 10-01-2010 02:56 PM

You have the "Canonical Link Element" on your page, I don't know if you added it following the instructions here or for some other reason, but in either case it's wrong.

You have:
<link rel="canonical" href="showthread.php/11265-Forum-Downtime..Sorry!" />

It's missing the http://www.planetoceanalliance.org/forum/" before the "showthread.php..." you should manually add this info to the template... from your source code it looks like this is in your SHOWTHREAD template but I'm not 100% sure.

oldfan 11-03-2010 05:42 PM

works great with 4.08 thanks

oldfan 11-07-2010 03:35 AM

Quote:

Originally Posted by oldfan (Post 2117567)
works great with 4.08 thanks

All but the tweet count :(


All times are GMT. The time now is 01:03 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.03102 seconds
  • Memory Usage 1,880KB
  • 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
  • (4)bbcode_html_printable
  • (1)bbcode_php_printable
  • (13)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)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