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 - Add New Facebook "Like" button to your threads (https://vborg.vbsupport.ru/showthread.php?t=241011)

TimberFloorAu 04-23-2010 09:20 PM

I disagree.

From my knowledge of conditionals, even with multiple and / if / else statements inline. To display in particular forums the correct conditional is:

Code:

<vb:if condition="in_array($forum['forumid'], array(1,2,3))">Show this to forum 1, 2 and 3</vb:if>

AURFSCAN 04-23-2010 09:21 PM

$forum does not work for me


this does

Code:


<vb:if condition="in_array($thread['forumid'], array(1,2,3))">Show this to forum 1, 2 and 3</vb:if>


AURFSCAN 04-23-2010 09:23 PM

just try $thread

CoZmicShReddeR 04-23-2010 09:49 PM

On dark themes the part where it says "likes this.Be the first of your friends to like this." is too hard to read... Is there a way to color code that to a lighter color?

TimberFloorAu 04-23-2010 10:30 PM

Its an iframe, so apply a class to a div. Then add that class to your css

worried 04-24-2010 12:33 AM

Quote:

Originally Posted by AURFSCAN (Post 2026201)
$forum does not work for me


this does

Code:


<vb:if condition="in_array($thread['forumid'], array(1,2,3))">Show this to forum 1, 2 and 3</vb:if>


Thanks! That works! I modified that line of code for my forum
Code:

<vb:if condition="THIS_SCRIPT == showthread && $post[postcount] == '1' && in_array($thread[forumid],array(2,3,8,9,13))">

ericgtr 04-24-2010 01:02 PM

Quote:

Originally Posted by CoZmicShReddeR (Post 2026208)
On dark themes the part where it says "likes this.Be the first of your friends to like this." is too hard to read... Is there a way to color code that to a lighter color?

Try changing colorscheme=light to colorscheme=dark in the code.

Also, please click Install if you use this. :)

Ranger375 04-24-2010 06:44 PM

Quote:

Originally Posted by Mutt (Post 2026076)
change
Code:

show_faces=true
to
Code:

show_faces=false

Thanks for the response, but it is still showing names for some reason..

Uberguilds 04-24-2010 07:12 PM

I had to take this off my site.

The button loads slow and cracks out some people's browsers. I have it on for every post, which is pretty much the only thing I have use for it. Problem on Facebook's end.

=(

ericgtr 04-24-2010 07:16 PM

Quote:

Originally Posted by Uberguilds (Post 2026672)
I had to take this off my site.

The button loads slow and cracks out some people's browsers. I have it on for every post, which is pretty much the only thing I have use for it. Problem on Facebook's end.

=(

FB has been really slow for me but since this is iframe it still doesn't slow the site down but may affect the formatting a little bit. I think they are making site updates and it probably won't last too long.

MedellinStyle 04-25-2010 10:30 PM

Hi

I want to ask, the script works fine, it displays fine on peoples wall on facebook, but in VBULLETIN, different to how many people clicks on LIKE, it still displays , LIKE 1.

Only 1 not acumulate, any help would be appreciated , thanks!

ericgtr 04-25-2010 11:18 PM

Quote:

Originally Posted by MedellinStyle (Post 2027294)
Hi

I want to ask, the script works fine, it displays fine on peoples wall on facebook, but in VBULLETIN, different to how many people clicks on LIKE, it still displays , LIKE 1.

Only 1 not acumulate, any help would be appreciated , thanks!

It only shows how many of your friends clicked on it.

Please click install. :)

YankForum 04-26-2010 01:03 PM

tnx installed

AndrewSpearin 04-26-2010 02:06 PM

I have this installed and working fine for forum posts, but how do I go about adding it for CMS articles, blog posts, and albums/pictures?

ericgtr 04-26-2010 02:24 PM

Quote:

Originally Posted by AndrewSpearin (Post 2027622)
I have this installed and working fine for forum posts, but how do I go about adding it for CMS articles, blog posts, and albums/pictures?

Here's some suggestions.

For CMS, in vbcms_content_article_page add the code below this:
Code:

{vb:raw comment_block}
For pictures, in template album_pictureview add the code below this:
Code:

{vb:raw picturecomment_commentarea}
This gives you the idea, I haven't added it to the blog yet but it's just a matter of locating the right template.

AndrewSpearin 04-26-2010 03:58 PM

Thanks, I added this code:

<!-- Facebook Like -->
<iframe src="http://www.facebook.com/plugins/like.php?href=http://www.npac.ca/2010/{vb:link thread, {vb:raw thread}, {vb:raw pageinfo_post}}&amp;layout=button_count&amp;show_f aces=false&amp;width=450&amp;action=like&amp;color scheme=light" scrolling="no" frameborder="0" allowTransparency="true" style="border:none; overflow:hidden; width:450px; height:30px"></iframe>
<!-- / Facebook Like -->

in: vbcms_content_article_page

after: <vb:if condition="$comment_block"> ... </vb:if>

Example: http://npac.ca/2010/content.php/121-QA-with-Rod-MacIvor

I click like, it shows up with the proper article title on my Facebook profile, however it links to the corresponding forum post for the article: http://www.npac.ca/2010/showthread.p...th-Rod-MacIvor

The 'like' does appear in both the forum post and article though.

How can I make it link straight back to the article? I'm not familiar with the {vb:link} stuff, so I don't really know what else to try instead.

Thanks again for your help!

movslow 04-26-2010 04:25 PM

FYI, I had the error, and realized you need the trailing / on the end of the url.

Added that, worked liked a charm, this was in Postibit Legacy.

fluidswork 04-27-2010 02:49 AM

Awesome mod i will try it ..............

junaid 04-27-2010 06:40 AM

Is possible to add like thanks button or same locations?

junaid 04-27-2010 07:06 AM

I want code for button count 16x16
could you provide me code

hoadiem 04-27-2010 11:14 PM

will this work with 4.0.3

Ranger375 04-28-2010 03:50 PM

yeah it works with 4.0.3

Red Spider 04-30-2010 09:47 AM

im struggling to get this working correctly as per the screenshots in OP.

When i click "like" it on my fb newsfeed it just says "xxx likes xxx forum"... does NOT say "xxx likes xxx on xxx forum" as per the screenshot. any help?

Crazyfruitbat 04-30-2010 01:36 PM

that works great in postbit legacy - front page articles would be great now

ericgtr 04-30-2010 03:26 PM

Quote:

Originally Posted by Red Spider (Post 2029468)
im struggling to get this working correctly as per the screenshots in OP.

When i click "like" it on my fb newsfeed it just says "xxx likes xxx forum"... does NOT say "xxx likes xxx on xxx forum" as per the screenshot. any help?

That usually means something isn't right with your forum path, I would double check it.

Quote:

Originally Posted by Crazyfruitbat (Post 2029548)
that works great in postbit legacy - front page articles would be great now

I have a location for that a little while back here https://vborg.vbsupport.ru/showpost....3&postcount=95

ijob 05-01-2010 07:10 AM

1 Attachment(s)
have installed this. cheers.

how do you include tweets like in my attached image?

wIrEs 05-01-2010 07:59 AM

any way to display "Be the first of your friends to like this." in a different language ? like spanish or french. What i am trying to say is when a user changes the Forum Language from the bottom of the page, the phrase "Be the first of your friends to like this." should change accordingly.
(installed) thanks!

RockstarNetwork 05-01-2010 07:28 PM

Quote:

Originally Posted by ericgtr (Post 2027633)
Here's some suggestions.

For CMS, in vbcms_content_article_page add the code below this:
Code:

{vb:raw comment_block}
For pictures, in template album_pictureview add the code below this:
Code:

{vb:raw picturecomment_commentarea}
This gives you the idea, I haven't added it to the blog yet but it's just a matter of locating the right template.

This doesn't seem to work for me. No like button appears in the CMS article. I tried changing "THIS_SCRIPT == showthread" to "THIS_SCRIPT == content" with no luck either.

Any tips?

unfv 05-01-2010 08:28 PM

It worked for me, I have VB 4.0.3

RockstarNetwork 05-01-2010 11:38 PM

Okay I got it to work by removing the first and last lines containing the "<vb:if..." and "</vb:if>" code. Now to reposition it somewhere that's a bit more appealing...

Also, I'm having the same issue as on the previous page where it links to the forum thread for the article instead of the article itself. Any ideas on how to change that?

Edit: Resolved the above with this code in the cms article template:
Code:

<!-- Facebook Like -->
<iframe src="http://www.facebook.com/plugins/like.php?href={vb:raw page_url}&amp;layout=standard&amp;show_faces=true&amp;width=450&amp;action=like&amp;font=tahoma&amp;colorscheme=light" scrolling="no" frameborder="0" allowTransparency="true" style="border:none; overflow:hidden; width:450px; height:75px"></iframe>
<!-- / Facebook Like -->


salvador21 05-02-2010 02:27 PM

Quote:

Originally Posted by ericgtr (Post 2027633)
Here's some suggestions.

For CMS, in vbcms_content_article_page add the code below this:
Code:

{vb:raw comment_block}

This didn't work for me, it's fine on forum threads though (in the postbit legacy template)

EDIT: and rockstarnetworks code isn't working either.

Also, any idea how to get it working in blogs?

asus78 05-03-2010 12:51 PM

How do i get this for my articles and user blogs (cms)

that makes even more sense than just in the forum...

ericgtr 05-03-2010 02:27 PM

Quote:

Originally Posted by salvador21 (Post 2030585)
This didn't work for me, it's fine on forum threads though (in the postbit legacy template)

EDIT: and rockstarnetworks code isn't working either.

Also, any idea how to get it working in blogs?

Quote:

Originally Posted by asus78 (Post 2031094)
How do i get this for my articles and user blogs (cms)

that makes even more sense than just in the forum...

I've updated the first post to give the locations frequently asked here, these include photo albums, blogs and vbcms.

maipoman 05-04-2010 05:19 PM

But when you add this to a vbcms article, the link that is posted on Facebook is the one to vBCms Comments forum, not the article itself. Is there a way to fix this?

RockstarNetwork 05-04-2010 11:35 PM

Quote:

Originally Posted by maipoman (Post 2031701)
But when you add this to a vbcms article, the link that is posted on Facebook is the one to vBCms Comments forum, not the article itself. Is there a way to fix this?

See my post #110 above to fix this.

maipoman 05-05-2010 06:02 AM

Quote:

Originally Posted by RockstarNetwork (Post 2031871)
See my post #110 above to fix this.

Thank you, that worked like a charm! :)

Jabong82 05-05-2010 07:32 AM

Hey great Mod. I want to use this on my blog, but I think I need to modify the code?

I tried to use the post bit legacy version and did this:


<!-- Facebook Like -->
<iframe src="http://www.facebook.com/plugins/like.php?href=http://www.YOURSITE.com/{vb:link blog, {vb:raw blog}}&amp;layout=standard&amp;show_faces=true&amp;wid th=450&amp;action=like&amp;font=tahoma&amp;colorsc heme=light" scrolling="no" frameborder="0" allowTransparency="true" style="border:none; overflow:hidden; width:450px; height:75px"></iframe>
<!-- / Facebook Like -->



Using this code it posts to facebook however the title is wrong, and it doesn't go to the specific blog, but rather all of the users blogs.


Is there a way to use the PostBit Legacy version you posted of the mod but make it work for blogs in the exact same way? (ie. posts blog title on FB and connects to the right blog?).

I know your other mod where you add the FB comment box has a "like" button that accomplishes this. I would like that basically without the cumbersome comment box (only like button).

Thanks in advance.

gyaronn 05-05-2010 12:08 PM

How can i add this to my CMS 2 ?

ericgtr 05-05-2010 01:34 PM

Quote:

Originally Posted by gyaronn (Post 2032084)
How can i add this to my CMS 2 ?

This code can be used pretty much anywhere, so it's just a matter of finding a location in your template for it. Not sure about CMS2 but what I normally do is find the template then look for keywords on the page that correspond to that template for placement ideas.

gyaronn 05-05-2010 07:45 PM

ok and another question i am traying to make a Like Box from facebook as a widget at my web site (www.fmsas.org) by using this code :
Quote:

<iframe src="http://www.facebook.com/plugins/likebox.php?profile_id=189546965717&amp;width=226& amp;height=295&amp;connections=6&amp;stream=false& amp;header=false" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:226px; height:295px;" allowTransparency="true"></iframe>
but for some reason it does not work can any one help me?


All times are GMT. The time now is 04:13 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.01549 seconds
  • Memory Usage 1,838KB
  • 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
  • (12)bbcode_code_printable
  • (16)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