vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.8 Template Modifications (https://vborg.vbsupport.ru/forumdisplay.php?f=236)
-   -   Add-On Releases - Add "LIKE" button and other Facebook plugins to threads. (https://vborg.vbsupport.ru/showthread.php?t=243319)

BirdOPrey5 10-21-2010 03:30 AM

I see you have the like button on every post- does it link back to the whole thread or just the single post?

carsafety 10-21-2010 05:00 PM

Quote:

Originally Posted by BirdOPrey5 (Post 2112260)
I see you have the like button on every post- does it link back to the whole thread or just the single post?

It links to the thread but adds the post as a qualifier at the end, for example:

http://www.car-seat.org/showthread.php?p=1464875

Also, if you Like a post, it only applies to that post and not any of the other posts in the thread. For that reason, I opted to make it more apparent rather than limit it to the first post.

Also, the comment box appeared to be somehow tied to posts before I removed it. If I was in hybrid view and clicked on a post and left a comment in the box below the thread, I could not view the comments if I clicked the threaded link to another post in the thread. Given that it could be hard to find comments so that any questions would be unlikely to be answered, I decided to remove it. Plus, we allow unregistered members to post (via moderation) questions in some forums. For another forum format, it seems like it was a very nice way to allow visitors to leave a comment.

Oh, I do like how the opengraph image setting forces the Facebook Sharer app to use the forum logo, rather than a random image from the page. That was annoying some users when they posted photos and the sharer would grab them and slap them on FB.

the_ace 10-28-2010 01:06 PM

1 Attachment(s)
I use this mod with a slight modification as my requirement is to show the LIKE button in front of the thread title for a selected forum instead of the individual post.

Managed this by adding the codes to display the like button in the threadbits template.

Complete the steps given up to editing the headerinclude template. After editing the headerinclude templete follow these instructions :

Template to edit : threadbits

Find :
Code:

<a href="showthread.php?$session[sessionurl]t=$thread[threadid]$thread[highlight]" id="thread_title_$thread[realthreadid]"<if condition="$show['gotonewpost']"> style="font-weight:bold"</if>>$thread[threadtitle]</a>
Add below:
Code:

<!--- facebook Like button ------->
<if condition="$foruminfo[forumid]==xxx">
<span id="fb-root"></span>
<script src="/images/fb.js" type="text/javascript"></script>
<fb:like href="$vboptions[bburl]/showthread.php$session[sessionurl]?t=$thread[realthreadid]" width="260"></fb:like></if>

<if condition="$foruminfo[forumid]==xxx"> <-- this is to limit the button only to a selected forum. If you want it like that, replace xxx with the actual forum id.

Thats it.
It shows the FB Like button as follows :
Attachment 123206

soundbarrierpro 11-05-2010 11:20 AM

This mod is not compatible with vbSEO. You will get an error every time. In order for the app to work, you must make coding changes which are available at vbSEO forums.

carsafety 11-23-2010 02:20 PM

I just went live with this mod. I did end up limiting it to the first post. I didn't realize that first post wasn't ONLY the very first post, but at least in hybrid view, it is the first post on the page you are viewing even if it isn't the first post in the thread, which is nice. It worked fine on all posts, but the resizing could take a while on a long thread and was a little annoying. Anyone head about the facebook bug issue? Is it resolved or is there any other fix aside from the custom channel mod?

BirdOPrey5 11-23-2010 11:37 PM

Quote:

Originally Posted by carsafety (Post 2124998)
I just went live with this mod. I did end up limiting it to the first post. I didn't realize that first post wasn't ONLY the very first post, but at least in hybrid view, it is the first post on the page you are viewing even if it isn't the first post in the thread, which is nice. It worked fine on all posts, but the resizing could take a while on a long thread and was a little annoying. Anyone head about the facebook bug issue? Is it resolved or is there any other fix aside from the custom channel mod?

I've looked into this bug issue and confirmed my site was affected even though I never had the issue myself nor did any member ever complain... but I see virtually every news site and blog out there continues to use this so as bad as the problem sounds it really can't be that big of a deal in the end. At least that's my logic.

lukdesigns 12-12-2010 04:51 PM

Thank you, works great!
But how to change language of this text: "Be the first of your friends to like this" and like button ?

carsafety 03-02-2011 12:55 PM

Facebook plugins/like.php has been the top referrer (outside of search engines) for a few months now. Great mod!

yamahapaul 03-05-2011 10:01 AM

Quote:

Originally Posted by soundbarrierpro (Post 2118228)
This mod is not compatible with vbSEO. You will get an error every time. In order for the app to work, you must make coding changes which are available at vbSEO forums.


I run the latest vbseo on 3.8.5 and this mod works fine for me-


https://vborg.vbsupport.ru/showthrea...03#post2152203

SVTCobraLTD 03-08-2011 02:00 AM

Nevermind got it to work. I put the fb.js file in forum root instead of site root.

How can I change the font color of "Be the first of your friends to like this."


All times are GMT. The time now is 11:53 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.01225 seconds
  • Memory Usage 1,747KB
  • 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
  • (2)bbcode_code_printable
  • (3)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