PDA

View Full Version : Add-On Releases - Add Facebook "Like" button to your threads [vB 3.8.x]


hubie
04-22-2010, 10:00 PM
This mod is based on this (https://vborg.vbsupport.ru/showthread.php?t=241011&highlight=rating+v1.7), but working on vB 3.8.x.

As was said there: Facebook has just launched their latest "Like" button to developers to use on any site. What this does is utilizes the Advertising module to add the "Like" button to the first post of each thread. Please see screenshots to get an idea.

DEMO (http://www.htceros.com/noticias/371-comparacion-de-browsers-htc-desire-vs-htc-hd2-vs-iphone.html)

IFrame Method

There is two kind of "Like" button (IFrame Method):

- With a smallest counter at his side *
<iframe src="http://www.facebook.com/plugins/like.php?href=http://www.YOURSITE.com/showthread.php$session[sessionurl]?p=$post[postid]&amp;layout=button_count&amp;show_faces=true&amp;width=&amp;action =like&amp;colorscheme=light"
scrolling="no" frameborder="0" allowTransparency="true" style="border:none; overflow:hidden; width:100px; height:20px"></iframe>


- With a largest counter (and names of people who have clicked) *
<iframe src="http://www.facebook.com/widgets/like.php?href=http://www.YOURSITE.com/showthread.php$session[sessionurl]?p=$post[postid]&amp;show_faces=false&amp
scrolling="no" frameborder="0"
style="border:none; width:450px; height:25px"></iframe>

*Change show_faces=false for true if you want to see faces :)

Installation:

Go to your Postbit/Postbit Legacy template and search for:
<!-- controls -->

And add below the code that you previously selected according your favorite button style.

If you want that the button only appears in first post of a thread, add this variables at the beginning and end of the code that you previously selected:
<if condition="$post[postcount] == 1">YOUR CODE</if>

*You should add these variables, otherwise the button will be displayed in every post, which makes no sense.

https://vborg.vbsupport.ru/external/2011/10/45.png

XFBML Method (recommended)
This is a richer way to send the contents of your board to Facebook, because it gives to users the possibility to add more information and also an image of your site is displayed on their FB wall (see the screenshots below).

Installation: (provided by cdoyle, thanks mate :up:)

You'll need to register your app here: http://developers.facebook.com/setup/, and get an ID to place into the code below.

<if condition="$post[postcount] == 1 AND !in_array($GLOBALS[forumid], array(40, 39))">


<p><fb:like></fb:like></p>

<div id="fb-root"></div>
<script>
window.fbAsyncInit = function() {
FB.init({appId: 'yourappID', status: true, cookie: true,
xfbml: true});
};
(function() {
var e = document.createElement('script');
e.type = 'text/javascript';
e.src = document.location.protocol +
'//connect.facebook.net/en_US/all.js';
e.async = true;
document.getElementById('fb-root').appendChild(e);
}());
</script>


</if>

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

Internet Explorer browser fix: https://vborg.vbsupport.ru/showpost.php?p=2036675&postcount=70

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

For additional information on this button and different parameters please visit http://developers.facebook.com/docs/reference/plugins/like

Remember to click Mark as Installed if you use this modification :up:

kimof911
04-23-2010, 11:36 AM
very cool

thank u

installed

wacnstac
04-23-2010, 02:54 PM
Two comments. After I install and customize to my URL it clicks my like through momentarily and indicates that my User Name likes the post, but then it quickly transistions to showing "Be the first of your friends to like this. · Admin Page · Error" Also my likes never get posted on my facebook wall. How do I get it to show on my wall?

hubie
04-23-2010, 03:22 PM
Two comments. After I install and customize to my URL it clicks my like through momentarily and indicates that my User Name likes the post, but then it quickly transistions to showing "Be the first of your friends to like this. ? Admin Page ? Error" Also my likes never get posted on my facebook wall. How do I get it to show on my wall?

Have you tried the two versions of button? Please send me a link to check.

wacnstac
04-23-2010, 03:27 PM
Looking at my source for the page in question gives me some answers. The source generated shows:

<iframe src="http://www.facebook.com/widgets/like.php?href=http://www.michigan-sportsman.com/showthread.php?p=3110497&amp;show_faces=true&amp
scrolling="no" frameborder="0"


but the real URL for the page is: http://www.michigan-sportsman.com/forum/showthread.php?t=327362

You can see a demo of the problem I am seeing if you go here:
http://www.facebook.com/widgets/like.php?href=http://www.michigan-sportsman.com/showthread.php?p=3110497

wacnstac
04-23-2010, 03:32 PM
Actually once I added "forum" in my path so that I have the correct URL, it does work in isolation:

http://www.facebook.com/widgets/like.php?href=http://www.michigan-sportsman.com/forum/showthread.php?p=3110497&amp;show_faces=true&ampscrolling=%22yes%22

But still throws an error when on my forum. Any ideas?

wacnstac
04-23-2010, 03:33 PM
Here's a link to where it is deployed:

http://www.michigan-sportsman.com/forum/showthread.php?t=327362

hubie
04-23-2010, 03:39 PM
Looking at my source for the page in question gives me some answers. The source generated shows:

<iframe src="http://www.facebook.com/widgets/like.php?href=http://www.michigan-sportsman.com/showthread.php?p=3110497&amp;show_faces=true&amp
scrolling="no" frameborder="0"


but the real URL for the page is: http://www.michigan-sportsman.com/forum/showthread.php?t=327362

You can see a demo of the problem I am seeing if you go here:
http://www.facebook.com/widgets/like.php?href=http://www.michigan-sportsman.com/showthread.php?p=3110497

You have to change "showthread.php?p=3110497" for "showthread.php$session[sessionurl]?p=$post[postid]".

You only have to put your sitename, then you code would be: "http://www.michigan-sportsman.com/forum/showthread.php$session[sessionurl]?p=$post[postid]..."

If it helps you mark as installed, if not, comment please ;)

Yellow Slider
04-23-2010, 03:40 PM
why aren't you using the the meta data in the showthread page?

* <meta property="og:title" content="The Rock"/>
* <meta property="og:site_name" content="IMDb"/>
* <meta property="og:image" content="http://ia.media-imdb.com/rock.jpg"/>

wacnstac
04-23-2010, 03:47 PM
This is exactly how it is coded in the example thread I included above:


<iframe src="http://www.facebook.com/widgets/like.php?href=http://www.michigan-sportsman.com/forum/showthread.php$session[sessionurl]?p=$post[postid]&amp;show_faces=true&amp
scrolling="no" frameborder="0"
style="border:none; width:450px; height:80px"></iframe>

hubie
04-23-2010, 04:04 PM
This is exactly how it is coded in the example thread I included above:


<iframe src="http://www.facebook.com/widgets/like.php?href=http://www.michigan-sportsman.com/forum/showthread.php$session[sessionurl]?p=$post[postid]&amp;show_faces=true&amp
scrolling="no" frameborder="0"
style="border:none; width:450px; height:80px"></iframe>

The code seems to be ok, please add the same code next to "<!-- controls -->" for testing purposes and check if your problem is related with your postbit template.

Yellow Slider
04-23-2010, 04:06 PM
you should have a version with thread id only, for those who want it just for thr first post

showthread.php?t=xxxxxx

AcidX
04-23-2010, 04:11 PM
The first post option doesn't work. "Like" buttons show on every first page, not first post.

Edit: it shows on private messages too.

wacnstac
04-23-2010, 04:12 PM
When I put this code in, replacing what I had:


<div style="margin-top: 10px" align="$stylevar[right]">
<!-- controls -->

<iframe src="http://www.facebook.com/widgets/like.php?href=http://www.michigan-sportsman.com/forum/showthread.php$session[sessionurl]?p=$post[postid]&amp;show_faces=true&amp
scrolling="no" frameborder="0"
style="border:none; width:450px; height:80px"></iframe>



Nothing at all shows up.

Yellow Slider
04-23-2010, 04:41 PM
The first post option doesn't work. "Like" buttons show on every first page, not first post.

Edit: it shows on private messages too.

you're right, can some one fix it?

wacnstac
04-23-2010, 05:20 PM
There is something wrong with the code itself. If I simply put this code:

http://www.facebook.com/widgets/like.php?href=http://www.michigan-sportsman.com/showthread.php?t=333410&amp;show_faces=true&ampscrolling=%22no%22

in a browser line, it takes my click on the like and then gives me an error.

wacnstac
04-23-2010, 05:52 PM
Here is my whole template. I have tried a couple different versions of this. The code in isolation in a browser window works, but in my template below (which I've tried a couple of different versions), it does not:


$template_hook[postbit_start]
<if condition="!$_POST['ajax']">
<!-- Google Hack -->
<if condition="(in_array($bbuserinfo[usergroupid], array(5, 87, 84)) OR is_member_of($bbuserinfo, 94) OR is_member_of($bbuserinfo, 99))">

<else />

<if condition="((($post[postcount] % 15) == 3))">
<if condition="$show['spacer']">$spacer_open<if condition="!$post['islastshown']"><div style="padding:0px 0px $stylevar[cellpadding]px 0px"></if></if>
<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
<tr>
<td class="thead" $scrolltothis><img src="$stylevar[imgdir_statusicon]/forum_link.gif" alt="" border="0" />
</td>
</tr>
<tr>
<td class="alt2" style="padding:0px">
<table cellpadding="0" cellspacing="$stylevar[cellpadding]" border="0" width="100%">
<tr>
</td>
<td nowrap="nowrap">
<a href="http://www.michigan-sportsman.com/sponsoring_member.htm">
<strong>Remove this ad...</strong></a>
</td>
<td width="100%">&nbsp;</td>
<td valign="top" nowrap="nowrap">
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td class="alt1">

<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><div align="left">

{michigan_content_left_300}

</div></td>
</tr>
</table>



</td>
</tr>
</table>
<if condition="$show['spacer']"><if condition="!$post['islastshown']"></div></if>$spacer_close</if>
</if>

<!-- End Google Hack -->

</if>
<!-- Usergroup Hack -->
</if>
<!--- if AJAX hack -->




<table class="tborder" id="post$post[postid]" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
<tr>
<td class="thead" $post[scrolltothis]>
<div class="normal" style="float:$stylevar[right]">
&nbsp;
<if condition="$show['postcount']">#<a href="showpost.php?$session[sessionurl]p=$post[postid]&amp;postcount=$post[postcount]" target="new" rel="nofollow" id="postcount$post[postid]" name="$post[postcount]"><strong>$post[postcount]</strong></a> &nbsp;</if>
<if condition="$show['reputationlink']">
<span id="reputationmenu_$post[postid]"><a href="reputation.php?$session[sessionurl]p=$post[postid]" rel="nofollow" id="reputation_$post[postid]"><img class="inlineimg" src="$stylevar[imgdir_button]/reputation.gif" alt="<phrase 1="$post[username]">$vbphrase[add_to_xs_reputation]</phrase>" border="0" /></a></span>
<if condition="$show['popups']"><script type="text/javascript"> vbrep_register("$post[postid]")</script></if>&nbsp;
</if>
<if condition="$show['infractionlink']"><a href="infraction.php?$session[sessionurl]do=report&amp;p=$post[postid]" rel="nofollow"><img class="inlineimg" src="$stylevar[imgdir_button]/infraction.gif" alt="<phrase 1="$post[username]">$vbphrase[add_infraction_for_x]</phrase>" border="0" /></a> &nbsp;</if>
<if condition="$show['reportlink']"><a href="report.php?$session[sessionurl]p=$post[postid]" rel="nofollow"><img class="inlineimg" src="$stylevar[imgdir_button]/report.gif" alt="$vbphrase[report_bad_post]" border="0" /></a> &nbsp;</if>
$post[iplogged]
<if condition="$show['inlinemod']">
<input type="checkbox" name="plist[$postid]" id="plist_$postid" style="vertical-align:middle; padding:0px; margin:0px 0px 0px 5px" value="$post[checkbox_value]" />
</if>
</div>

<div class="normal">
<!-- status icon and date -->
<a name="post$post[postid]"><img class="inlineimg" src="$stylevar[imgdir_statusicon]/post_$post[statusicon].gif" alt="$post[statustitle]" border="0" /></a>
<if condition="!$show['announcement']">
$post[postdate]<if condition="!$show['detailedtime']">, $post[posttime]</if>
<else />
<phrase 1="$post[startdate]" 2="$post[enddate]">$vbphrase[x_until_y]</phrase>
</if>
$post[firstnewinsert]
<!-- / status icon and date -->
</div>
</td>
</tr>
<tr>
<td class="alt2" style="padding:0px">
<!-- user info -->
<table cellpadding="0" cellspacing="$stylevar[cellpadding]" border="0" width="100%">
<tr>
<if condition="$show['avatar']"><td class="alt2"><a href="member.php?$session[sessionurl]u=$post[userid]"><img src="$post[avatarurl]" $post[avwidth] $post[avheight] alt="<phrase 1="$post[username]">$vbphrase[xs_avatar]</phrase>" border="0" /></a></td></if>
<td nowrap="nowrap">

<div id="postmenu_$post[postid]">
<if condition="$show['profile']">
<a class="bigusername" href="member.php?$session[sessionurl]u=$post[userid]">$post[musername]</a>
$post[onlinestatus]
<script type="text/javascript"> vbmenu_register("postmenu_$post[postid]", true); </script>
<else />
$post[musername]
</if>
</div>

<if condition="$post['usertitle']"><div class="smallfont">$post[usertitle]</div></if>
<!-- <if condition="$post['rank']"><div class="smallfont">$post[rank]</div></if> -->

<!-- rank hack -->
<if condition="is_member_of($post,94)">
<div class="smallfont"><a href="payments.php"><img src="images/ranks/sponsor.gif" border="0" alt="Rank Type" /></a></div><br />
<else />
<if condition="is_member_of($post,99)">
<div class="smallfont"><a href="payments.php"><img src="images/ranks/sponsor.gif" border="0" alt="Rank Type" /></a></div><br />
<else />
<if condition="$post['rank']"><div class="smallfont">$post[rank]</div></if></if></if>
<!-- end rank hack -->
$template_hook[postbit_userinfo_left]

</td>
<td width="100%">

<iframe src="http://www.facebook.com/plugins/like.php?href=http://www.michigan-sportsman.com/forum/showthread.php?t=$post[threadid]&amp;layout=standard&amp;show_faces=true&amp;width=450&amp;action= like&amp;font=verdana&amp;colorscheme=light" scrolling="no" frameborder="0" allowTransparency="true" style="border:none; overflow:hidden; width:450px; height:px"></iframe>


<iframe src="http://www.facebook.com/widgets/like.php?href=http://www.michigan-sportsman.com/forum/showthread.php$session[sessionurl]?t=$post[threadid]&amp;show_faces=false&amp
scrolling="no" frameborder="0"
style="border:none; width:450px; height:80px"></iframe>

</td>
<td valign="top" nowrap="nowrap">

<div class="smallfont">
<if condition="!$post['forwardlink'] AND !in_array($GLOBALS[forumid], array(66))">


<!-- AddThis Button BEGIN -->
<script type="text/javascript">var addthis_pub="shelinski";</script>
<a href="http://www.addthis.com/bookmark.php?v=20" onmouseover="return addthis_open(this, '', '[URL]', '[TITLE]')" onmouseout="addthis_close()" onclick="return addthis_sendto()"><img src="http://s7.addthis.com/static/btn/lg-share-en.gif" width="125" height="16" alt="Bookmark and Share" style="border:0"/></a><script type="text/javascript" src="http://s7.addthis.com/js/200/addthis_widget.js"></script>
<!-- AddThis Button END -->


</if>
<if condition="$post['joindate']"><div>$vbphrase[join_date]: $post[joindate]</div></if>
<if condition="$post['field2']"><div>$vbphrase[location_perm]: $post[field2]</div></if>
<if condition="$post['age']"><div>$vbphrase[age]: $post[age]</div></if>
<div>
$vbphrase[posts]: $post[posts]
<!-- photopost hack -->
<if condition="$post['photos']"><div>Photos: $post[photos]<a href="http://www.michigan-sportsman.com/photopost/showgallery.php?cat=500&ppuser=$post[userid]"><img class="inlineimg" src="$stylevar[imgdir_button]/camera.gif" alt="Users Photo Gallery" border="0" /></a></div></if>

<!-- photopost end hack -->
</div>
$template_hook[postbit_userinfo_right_after_posts]
<if condition="$show['infraction']"><div>$vbphrase[infractions]: $post[warnings]/$post[infractions] ($post[ipoints])</div></if>
<if condition="$show['reputation']"><if condition="$show['reppower']">$vbphrase[reppower]: <span id="reppower_$post[postid]_$post[userid]">$post[reppower]</span> </if><div><span id="repdisplay_$post[postid]_$post[userid]">$post[reputationdisplay]</span></div></if>
$template_hook[postbit_userinfo_right]
<div>$post[icqicon] $post[aimicon] $post[msnicon] $post[yahooicon] $post[skypeicon]</div>
</div>

</td>
</tr>
</table>
<!-- / user info -->
</td>
</tr>
<tr>
<if condition="$show['moderated']">
<td class="alt2" id="td_post_$post[postid]">
<else />
<td class="alt1" id="td_post_$post[postid]">
</if>
<!-- message, attachments, sig -->

$template_hook[postbit_messagearea_start]

<if condition="$show['messageicon'] OR $post['title']">
<!-- icon and title -->
<div class="smallfont">
<if condition="$show['messageicon']"><img class="inlineimg" src="$post[iconpath]" alt="$post[icontitle]" border="0" /></if>
<if condition="$post['title']"><strong>$post[title]</strong></if>
</div>
<hr size="1" style="color:$stylevar[tborder_bgcolor]; background-color:$stylevar[tborder_bgcolor]" />
<!-- / icon and title -->
</if>

<!-- message -->




<if condition="!$_POST['ajax']">
<if condition="(($post[postcount] % $vboptions[maxposts] == 1))">
<if condition="(in_array($bbuserinfo[usergroupid], array(5, 6, 87, 84)) OR is_member_of($bbuserinfo, 94) OR is_member_of($bbuserinfo, 99))">
<else />
<div class="postbit_adcode">
<span style="float: right; width: 300px; height: 270px; margin: 10px;">
<a href="http://www.michigan-sportsman.com/sponsoring_member.htm">
<strong>Remove this ad.....<br /> become a Supporting Member today.</strong></a>
{michigan_content_300}
</span>
</div>
</if>
</if>

</if>





<div id="post_message_$post[postid]">
$ad_location[ad_showthread_firstpost_start]
$post[message]
</div>
<!-- / message -->

<if condition="$show['attachments']">
<!-- attachments -->
<div style="padding:$stylevar[cellpadding]px">

<if condition="$show['thumbnailattachment']">
<fieldset class="fieldset">
<legend>$vbphrase[attached_thumbnails]</legend>
<div style="padding:$stylevar[formspacer]px">
$post[thumbnailattachments]
</div>
</fieldset>
</if>

<if condition="$show['imageattachment']">
<fieldset class="fieldset">
<legend>$vbphrase[attached_images]</legend>
<div style="padding:$stylevar[formspacer]px">
$post[imageattachments]
</div>
</fieldset>
</if>

<if condition="$show['imageattachmentlink']">
<fieldset class="fieldset">
<legend>$vbphrase[attached_images]</legend>
<table cellpadding="0" cellspacing="$stylevar[formspacer]" border="0">
$post[imageattachmentlinks]
</table>
</fieldset>
</if>

<if condition="$show['otherattachment']">
<fieldset class="fieldset">
<legend>$vbphrase[attached_files]</legend>
<table cellpadding="0" cellspacing="$stylevar[formspacer]" border="0">
$post[otherattachments]
</table>
</fieldset>
</if>

<if condition="$show['moderatedattachment']">
<fieldset class="fieldset">
<legend>$vbphrase[attachments_pending_approval]</legend>
<table cellpadding="0" cellspacing="$stylevar[formspacer]" border="0">
$post[moderatedattachments]
</table>
</fieldset>
</if>

</div>
<!-- / attachments -->
</if>

$template_hook[postbit_signature_start]
$ad_location[ad_showthread_firstpost_sig]

<if condition="$post['signature']">
<!-- sig -->
<div>
__________________<br />
$post[signature]
</div>
<!-- / sig -->
</if>

$template_hook[postbit_signature_end]

<if condition="$show['postedited']">
<!-- edit note -->
<div class="smallfont">
<hr size="1" style="color:$stylevar[tborder_bgcolor]; background-color:$stylevar[tborder_bgcolor]" />
<em>
<if condition="$show['postedithistory']">
<phrase 1="$post[edit_username]" 2="$post[edit_date]" 3="$post[edit_time]" 4="posthistory.php?$session[sessionurl]p=$post[postid]">$vbphrase[last_edited_link_by_x_on_y_at_z_postid]</phrase>
<else />
<phrase 1="$post[edit_username]" 2="$post[edit_date]" 3="$post[edit_time]">$vbphrase[last_edited_by_x_on_y_at_z]</phrase>
</if>
<if condition="$post['edit_reason']">
$vbphrase[reason]: $post[edit_reason]
</if>
</em>
</div>
<!-- / edit note -->
</if>

<div style="margin-top: 10px" align="$stylevar[right]">
<!-- controls -->
<if condition="$post['editlink']">
<img style="display: none" id="progress_$postid" src="$stylevar[imgdir_misc]/progress.gif" alt="$vbphrase[loading_editor_please_wait]" />
<a href="$post[editlink]" name="vB::QuickEdit::$post[postid]"><img src="$stylevar[imgdir_button]/edit.gif" alt="$vbphrase[edit_delete_message]" border="0" /></a>
</if>
<if condition="$post['forwardlink']">
<a href="$post[forwardlink]"><img src="$stylevar[imgdir_button]/forward.gif" alt="$vbphrase[forward_message]" border="0" /></a>
</if>
<if condition="$post['replylink']">
<a href="$post[replylink]" rel="nofollow"><img src="$stylevar[imgdir_button]/<if condition="$post['forwardlink']">reply_small<else />quote</if>.gif" alt="$vbphrase[reply_with_quote]" border="0" /></a>
</if>
<if condition="$show['multiquote_post']">
<a href="$post[replylink]" rel="nofollow" onclick="return false"><img src="$stylevar[imgdir_button]/multiquote_<if condition="$show['multiquote_selected']">on<else />off</if>.gif" alt="$vbphrase[multi_quote_this_message]" border="0" id="mq_$post[postid]" /></a>
</if>
<if condition="$show['quickreply'] AND !$show['threadedmode']">
<a href="$post[replylink]" rel="nofollow" id="qr_$post[postid]" onclick="return false"><img src="$stylevar[imgdir_button]/quickreply.gif" alt="$vbphrase[quick_reply_to_this_message]" border="0" /></a>
</if>
<if condition="$show['moderated']">
<img src="$stylevar[imgdir_misc]/moderated.gif" alt="$vbphrase[moderated_post]" border="0" />
</if>
<if condition="$show['spam']">
<img src="$stylevar[imgdir_misc]/spam_detected.png" alt="$vbphrase[spam_post]" border="0" />
</if>
<if condition="$show['deletedpost']">
<if condition="$show['managepost']">
<a href="postings.php?$session[sessionurl]do=managepost&amp;p=$post[postid]"><img src="$stylevar[imgdir_misc]/trashcan.gif" alt="$vbphrase[manage]" border="0" /></a>
<else />
<img src="$stylevar[imgdir_misc]/trashcan.gif" alt="$vbphrase[deleted_post]" border="0" />
</if>
</if>
<if condition="$show['redcard']">
<a href="infraction.php?$session[sessionurl]do=view&amp;p=$post[postid]"><img src="$stylevar[imgdir_button]/redcard.gif" alt="$vbphrase[received_infraction]" border="0" /></a>
<else />
<if condition="$show['yellowcard']">
<a href="infraction.php?$session[sessionurl]do=view&amp;p=$post[postid]"><img src="$stylevar[imgdir_button]/yellowcard.gif" alt="$vbphrase[received_warning]" border="0" /></a>
</if>
</if>
$template_hook[postbit_controls]
<!-- / controls -->
</div>

<!-- message, attachments, sig -->

</td>
</tr>
</table>
$template_hook[postbit_end]

<!-- post $post[postid] popup menu -->
<div class="vbmenu_popup" id="postmenu_$post[postid]_menu" style="display:none;">
<table cellpadding="4" cellspacing="1" border="0">
<tr>
<td class="thead">$post[username]</td>
</tr>
<if condition="$show['profile']">
<tr><td class="vbmenu_option"><a href="member.php?$session[sessionurl]u=$post[userid]">$vbphrase[view_public_profile]</a></td></tr>
</if>
<if condition="$show['pmlink']">
<tr><td class="vbmenu_option"><a href="private.php?$session[sessionurl]do=newpm&amp;u=$post[userid]" rel="nofollow"><phrase 1="$post[username]">$vbphrase[send_private_message_to_x]</phrase></a></td></tr>
</if>
<if condition="$show['emaillink']">
<tr><td class="vbmenu_option"><a href="sendmessage.php?$session[sessionurl]do=mailmember&amp;u=$post[userid]" rel="nofollow"><phrase 1="$post[username]">$vbphrase[send_email_to_x]</phrase></a></td></tr>
</if>
<if condition="$show['homepage']">
<tr><td class="vbmenu_option"><a href="$post[homepage]"><phrase 1="$post[username]">$vbphrase[visit_xs_homepage]</phrase></a></td></tr>
</if>
<if condition="$show['search']">
<tr><td class="vbmenu_option"><a href="search.php?$session[sessionurl]do=finduser&amp;u=$post[userid]" rel="nofollow"><phrase 1="$post[username]">$vbphrase[find_all_posts_by_x]</phrase></a></td></tr>
</if>
<if condition="$post['userid'] AND $show['member']">
<tr><td class="vbmenu_option"><a href="profile.php?$session[sessionurl]do=addlist&amp;userlist=buddy&amp;u=$post[userid]"><phrase 1="$post[username]">$vbphrase[add_x_to_contacts]</phrase></a></td></tr>
</if>
$template_hook[postbit_user_popup]
</table>
</div>
<!-- / post $post[postid] popup menu -->

wacnstac
04-23-2010, 06:20 PM
Ok, I've gotten it to work with the following code:


<iframe src="http://www.facebook.com/plugins/like.php?href=http://(your url)/forum/showthread.php?t=$post[threadid]&amp;layout=standard&amp;show_faces=true&amp;width=450&amp;action= like&amp;font=verdana&amp;colorscheme=light" scrolling="no" frameborder="0" allowTransparency="true" style="border:none; overflow:hidden; width:450px; height:70px"></iframe>


Now what I haven't been able to figure out is where these likes actually get displayed on FB. Does anybody know?

Yellow Slider
04-23-2010, 06:34 PM
in your profile.

hubie
04-23-2010, 06:37 PM
Now what I haven't been able to figure out is where these likes actually get displayed on FB. Does anybody know?
Your code is now working well, when you clic on Like the post appears correctly in your FB wall. I've checked it in your site.

wacnstac
04-23-2010, 06:41 PM
I've marked as installed. But with as many things as I've checked as liked, I don't see anything on my wall. Any idea what gives?

hubie
04-23-2010, 06:44 PM
why aren't you using the the meta data in the showthread page?

* <meta property="og:title" content="The Rock"/>
* <meta property="og:site_name" content="IMDb"/>
* <meta property="og:image" content="http://ia.media-imdb.com/rock.jpg"/>

you should have a version with thread id only, for those who want it just for thr first post

showthread.php?t=xxxxxx

I'll see this. Where do you add meta data? Can you help me? Excuse me for my lack of knowledge :)

The first post option doesn't work. "Like" buttons show on every first page, not first post.

Edit: it shows on private messages too.

Edit: Fix for private messages and first post on every first page issues:

Replace:
<if condition="!$GLOBALS['FIRSTPOSTID']">

by:
<if condition="$post[postcount] == 1">

wacnstac
04-23-2010, 06:46 PM
Close but no cigar. I found all my recent likes on my FB profile page. But if I click on any of them in FB I get a blank page. It trys to take me to a garbage URL:


http://www.facebook.com/l.php?u=http%3A%2F%2Fwww.michigan-sportsman.com%2Fforum%2Fshowthread.php%3Ft%3D33359 3&h=3f000

So obviously for this to be of any use at all these links on the user's FB profile page must be live and they must work!

hubie
04-23-2010, 07:03 PM
wacnstac, i've checked your site and it's working correctly.

The only thing you have to add now is the conditional:
<if condition="$post[postcount] % $vboptions[maxposts] == 1">Your Code</if>

Otherwise, the Like button will be shown on every post of a thread.

wacnstac
04-23-2010, 07:11 PM
So why don't the URLS on my fb profile page click through to a valid page. That's the most important part!

wacnstac
04-23-2010, 07:25 PM
Also need the ability to exclude private forums.

hubie
04-23-2010, 09:21 PM
Also need the ability to exclude private forums.

Put this code:
<if condition="$post[postcount] == 1 AND in_array($GLOBALS[forumid], array(X,Y,Z))">Your Code</if>

Where in X,Y,Z you have to put the forum IDs you want the button appear, and in the forum ID not especified the button won?t appear.

wacnstac
04-23-2010, 10:59 PM
Thanks, and PM's should be excluded.

Gamelobby
04-24-2010, 01:10 AM
This is very cool, but it doesn't seem to work with "Chief 1st post"..?
Any ideas.?

Also how does it work..!?
Any way that i can "like" things from my FB group or company page, instead of my personal profile.?

Floris
04-24-2010, 01:20 AM
THe demo page returns: error.

wacnstac
04-24-2010, 02:22 AM
Also how does it work..!?
Any way that i can "like" things from my FB group or company page, instead of my personal profile.?

That would be very cool, but I don't think it's possible right now.

Brandon Sheley
04-24-2010, 04:27 AM
Very cool mod, thanks so much
it works exactly how it should :)
I'm going to play with the placement a little, but here is a "Like" demo (http://www.general-forums.com/t661/) if you want to check it out.

Geek Specialtie
04-24-2010, 05:58 PM
Looks like a missing closing quote for src tag.

original

<iframe src="http://www.facebook.com/widgets/like.php?href=http://www.YOURSITE.com/showthread.php$session[sessionurl]?p=$post[postid]&amp;show_faces=false&amp
scrolling="no" frameborder="0"
style="border:none; width:450px; height:25px"></iframe>


closing quote added

<iframe src="http://www.facebook.com/widgets/like.php?href=http://www.YOURSITE.com/showthread.php$session[sessionurl]?p=$post[postid]&amp;show_faces=false&amp"
scrolling="no" frameborder="0"
style="border:none; width:450px; height:25px"></iframe>

I haven't tried this yet but seems some browsers may have an issue with this.

Uberguilds
04-24-2010, 06:20 PM
The button on every single post lags out my website in certain browsers/platforms. Had to take it down =/

hubie
04-24-2010, 06:44 PM
This is very cool, but it doesn't seem to work with "Chief 1st post"..?
Any ideas.?

You have to add the code manually in Chief 1st post templates to get it work.

Also how does it work..!?
Any way that i can "like" things from my FB group or company page, instead of my personal profile.?
I would like to know the same.

Very cool mod, thanks so much
it works exactly how it should :)
I'm going to play with the placement a little, but here is a "Like" demo (http://www.general-forums.com/t661/) if you want to check it out.
Great! but testing whit your demo i've noted that when i like the post and then go to my fb page the wall title shows the root of your forums and no the single post in particular. Maybe a miss of code there.

Looks like a missing closing quote for src tag.
Thanks, i'll check and fix.

The button on every single post lags out my website in certain browsers/platforms. Had to take it down =/
You must add the conditional "<if...>" (at first post of this thread) if don't want the button on every single post.

cdoyle
04-24-2010, 11:52 PM
I'm going to add this to my site, just had a question on the demo.
I'm looking at it right now, and it only says 1 for the count (was 0 before I clicked it), is that right?

After so many from here trying it out, I would think it would be higher than that

hubie
04-25-2010, 01:36 AM
I'm going to add this to my site, just had a question on the demo.
I'm looking at it right now, and it only says 1 for the count (was 0 before I clicked it), is that right?

After so many from here trying it out, I would think it would be higher than that

Yes you're right. i've replaced the button and the count is still at 0. Not sure if the problem is related with facebook, please give me feedback about it.

cdoyle
04-25-2010, 01:46 AM
Put this code:
<if condition="$post[postcount] == 1 AND in_array($GLOBALS[forumid], array(X,Y,Z))">Your Code</if>

Where in X,Y,Z you have to put the forum IDs you want the button appear, and in the forum ID not especified the button won?t appear.

Just wanted to add, that I modified this IF a little, to make it so you only need to enter the forums you want to exclude

<if condition="$post[postcount] == 1 AND !in_array($GLOBALS[forumid], array(c, j))">


Just enter the forums you want excluded, and these forums won't show the button and the rest will.

cdoyle
04-25-2010, 12:23 PM
Yes you're right. i've replaced the button and the count is still at 0. Not sure if the problem is related with facebook, please give me feedback about it.

I just took another look at the demo, and right now it's only showing that I clicked the button.
I'm assuming that you clicked it too right?

I think I'm seeing the same thing on my forum, but I'm waiting for members to reply back if they clicked it in the test post.

I think it's a problem on Facebooks side, I've tried adding the like button to my RPG game. So far I only have 1 click there too, even though some have said they clicked it.

It also doesn't help that the facebook developer forums have been down all weekend too.

cdoyle
04-27-2010, 02:18 AM
Has anyone else had any luck with the like button?
It seems for me, at least when I look at it. It only shows when I click on it, and doesn't give a total count of how many have clicked it.

Just like the demo, it only shows that I clicked on it and nobody else.

That can't be right can it?

dr1
04-27-2010, 03:33 PM
It's relates to using the latest version of Facebook’s JavaScript SDK

http://www.allfacebook.com/2010/04/one-problem-with-facebooks-new-like-button-it-doesnt-work-with-connect-sites/

cdoyle
04-27-2010, 06:43 PM
I've been playing around with this a little more using the XFBML method instead of the IFrame. This allows users to enter a comment that appears on their wall, and it also enters a better description on the wall too, with your forum banner thumbnail. I've attached a screenshot of how it looks on the wall.

You'll need to register your ap, and get an ID to place into the code below.

http://developers.facebook.com/setup/

You can try it out http://www.caraudiocentral.net/forums

The thing I'm still unsure of is, sometimes I'll go back to a post and where I clicked like before, it's now saying 'be the first' when I know I clicked it earlier. So I'm not sure if FB is doing stuff on their end that is messing it up or what.


<if condition="$post[postcount] == 1 AND !in_array($GLOBALS[forumid], array(40, 39))">


<p><fb:like></fb:like></p>

<div id="fb-root"></div>
<script>
window.fbAsyncInit = function() {
FB.init({appId: 'yourappID', status: true, cookie: true,
xfbml: true});
};
(function() {
var e = document.createElement('script');
e.type = 'text/javascript';
e.src = document.location.protocol +
'//connect.facebook.net/en_US/all.js';
e.async = true;
document.getElementById('fb-root').appendChild(e);
}());
</script>


</if>

cdoyle
04-29-2010, 02:15 PM
Since I can't seem to create an account at the facebook developers forum, I'm hoping someone here will know.

Is there a way to see who clicked the like button?
Right now if a button says 3 people clicked this, who are the 3 people?

Gamelobby
04-29-2010, 07:09 PM
Fix for private messages and first post on every first page issues:

Replace:
<if condition="!$GLOBALS['FIRSTPOSTID']">

by:
<if condition="$post[postcount] == 1">
I dont mind it being on every post, but i would like it to not show on PM's.



Since I can't seem to create an account at the facebook developers forum, I'm hoping someone here will know.

Is there a way to see who clicked the like button?
Right now if a button says 3 people clicked this, who are the 3 people?
Use the code for this one instead..
https://vborg.vbsupport.ru/

cdoyle
04-29-2010, 07:14 PM
Use the code for this one instead..
https://vborg.vbsupport.ru/

The problem with the Iframe version is it doesn't allow the user to add a comment when they click on it. So on their wall it only shows a small recent activity link.

If they add a comment, it show more on their wall. See my screenshot above.

Is there a way to use the xfbml version, and still get a count and friends who clicked with faces etc.

Stubbed
04-29-2010, 11:42 PM
Changed mine to "Recommend"

I <3 Facebook.

bplinson
04-30-2010, 06:13 AM
Works great.

I like this but, like other have said, it would be much better if the person could comment on the link. The way it is now it only produces a small link on the persons personal wall as "Recent Activity".

It needs to be modified so that the link appears in the "News Feed"

marshal_ramdev
04-30-2010, 07:54 PM
thanks for this one mate

hubie
05-01-2010, 12:36 AM
I've been playing around with this a little more using the XFBML method instead of the IFrame. This allows users to enter a comment that appears on their wall, and it also enters a better description on the wall too, with your forum banner thumbnail. I've attached a screenshot of how it looks on the wall.

You'll need to register your ap, and get an ID to place into the code below.

http://developers.facebook.com/setup/

You can try it out http://www.caraudiocentral.net/forums

The thing I'm still unsure of is, sometimes I'll go back to a post and where I clicked like before, it's now saying 'be the first' when I know I clicked it earlier. So I'm not sure if FB is doing stuff on their end that is messing it up or what.


<if condition="$post[postcount] == 1 AND !in_array($GLOBALS[forumid], array(40, 39))">


<p><fb:like></fb:like></p>

<div id="fb-root"></div>
<script>
window.fbAsyncInit = function() {
FB.init({appId: 'yourappID', status: true, cookie: true,
xfbml: true});
};
(function() {
var e = document.createElement('script');
e.type = 'text/javascript';
e.src = document.location.protocol +
'//connect.facebook.net/en_US/all.js';
e.async = true;
document.getElementById('fb-root').appendChild(e);
}());
</script>


</if>


Thanks mate!, i put it in the first post :up:

efil
05-01-2010, 04:40 AM
Hello,
Is the Add-on working with a vb 3.6?

ZapFlash
05-03-2010, 12:41 AM
i installed the XFBML Method and i see the button in firefox but not in explorer, could you check that to fix it?

besides
how can i make it be in the very same line than the rest of the buttons (edit, quote, etc) because there is a jump there (looks like 2 lines and it's not even aligned to the right).

Thanks

cdoyle
05-03-2010, 11:31 AM
i installed the XFBML Method and i see the button in firefox but not in explorer, could you check that to fix it?

besides
how can i make it be in the very same line than the rest of the buttons (edit, quote, etc) because there is a jump there (looks like 2 lines and it's not even aligned to the right).

Thanks
Ugh, you're right. It was working in IE before, but now it's not. I swear this button has almost been more trouble than it's worth.

I'll try and take a look at it tonight, and see if I can get it working again in IE.

ZapFlash
05-04-2010, 01:06 AM
i'd appreciate it, thanks :)

cdoyle
05-04-2010, 02:37 AM
I got home late so couldn't mess with it much, but what I tried didn't work.
I don't get why it's not working

I've tried to register on the facebook forums, but it errors any time I try.
Does anyone else already have an account there? If you do, post the code we are using and ask why it doesn't work in IE. There has to be a reason, that we are just not seeing.

RonJH
05-04-2010, 10:58 AM
It is not working in IE due to the IF condition. Try removing the IF condition and you'll notice it works fine.

Does anyone have an IF condition for post number that works in IE?

cdoyle
05-05-2010, 01:02 AM
darn, if that's the case then I don't know the solution.
Anyone know why the IF doesn't work in IE?

Brandon Sheley
05-06-2010, 05:58 PM
Great! but testing whit your demo i've noted that when i like the post and then go to my fb page the wall title shows the root of your forums and no the single post in particular. Maybe a miss of code there.


I've noticed that too, but it's not like that for everyone.
Some users have a link back to that thread, some don't :(
I've also noticed that on other threads it's about 50/50 if it links to that thread, or the forumhome.

:(

FiMeTi
05-07-2010, 10:27 AM
Hmm... and there is no if condition to make this not show in personal messages yet? Noone fixed that? The button should not display in private messages at all. :)

kall
05-07-2010, 11:51 AM
I've noticed that too, but it's not like that for everyone.
Some users have a link back to that thread, some don't :(
I've also noticed that on other threads it's about 50/50 if it links to that thread, or the forumhome.

:(
I've not installed this mod, but.. have you defined the og: stuff?

Try: http://www.nzboards.com/new-zealand-travel/manapouri-milford-sound-about-3-5-a-90512/ (it's under the Reply to Thread/Thread Title), then check my FB profile.

;)

Manapouri to MIlford Sound in about 3.5 hours??
www.nzboards.com
Discuss Manapouri to MIlford Sound in about 3.5 hours?? on New Zealand Boards.
a few seconds ago ? Comment ? Like ? Share

hubie
05-07-2010, 01:41 PM
Hmm... and there is no if condition to make this not show in personal messages yet? Noone fixed that? The button should not display in private messages at all. :)

That is already fixed, you must add the cond if like as shown in 1rst post.

cdoyle
05-08-2010, 02:21 AM
has anyone came up with a way to fix the button not showing in IE?

ckelley
05-08-2010, 05:06 AM
IDK, but I tried to install this exactly as the instructed, and absolutely nothing happened. I added it directly after <controls> and nothing happened, I tried the first two codes presented, and then tried the facebook generated code that cdoyle found and nothing happened. I then went to </controls> and entered them there just above that thinking maybe I misunderstood the instructions and still nothing at all happened.

I AM running 3.8.5. Here www.syntheticmotorsports.org, although that won;t due much good as it still has not effected the appearance of the site in any way after installation attempts.

t.uzuner
05-08-2010, 10:44 PM
thanks thats work

ARSamo
05-09-2010, 12:22 PM
I've not installed this mod, but.. have you defined the og: stuff?

Try: http://www.nzboards.com/new-zealand-travel/manapouri-milford-sound-about-3-5-a-90512/ (it's under the Reply to Thread/Thread Title), then check my FB profile.

;)

i want to add button like u say....
what do i do...
further more i want to add book mark, recent activity and members helpful post to every post in my forum .... define plz....
thnx in advance.......

cdoyle
05-10-2010, 12:40 AM
So is this working in IE for everyone else?

ckelley
05-10-2010, 01:27 PM
I can't get it to work at all, according to everything I see, it is fully installed but nothing happens. This is in FF, IMHO, no need to test IE until I get it in FF.

Brandon Sheley
05-10-2010, 03:00 PM
I've not installed this mod, but.. have you defined the og: stuff?

Try: http://www.nzboards.com/new-zealand-travel/manapouri-milford-sound-about-3-5-a-90512/ (it's under the Reply to Thread/Thread Title), then check my FB profile.

;)
That's pretty slick, how did you do that? :)

UnganWeb
05-12-2010, 11:01 PM
That's pretty slick, how did you do that? :)

+1.

cdoyle
05-13-2010, 01:38 AM
I can't get it to work at all, according to everything I see, it is fully installed but nothing happens. This is in FF, IMHO, no need to test IE until I get it in FF.

Not sure why FF wouldn't work, could you post the code you're currently using?

hubie
05-14-2010, 12:28 AM
Here's a fix of IE issue changing some code. With this code the button is now displayed in IE browser.

Please let me know if it's working properly.

<div id="fb-root"></div> <script>
window.fbAsyncInit = function() {
FB.init({
appId : '100673979977717',
status : true, // check login status
cookie : true, // enable cookies to allow the server to access the session
xfbml : true // parse XFBML
});
};

(function() {
var e = document.createElement('script');
e.src = document.location.protocol + '//connect.facebook.net/en_US/all.js';
e.async = true;
document.getElementById('fb-root').appendChild(e);
}());
</script> <fb:like layout="standard" show_faces="true" width="300" action="like" colorscheme="light" />

*Note: If you use the appId that appears in the code above, you'll get an interesting effect 'onmouseover' with the title of thread.

cdoyle
05-14-2010, 02:13 AM
I thought the problem with the IE code was the if statement for displaying only on the first thread? At least I thought that's what someone said earlier. Does the code above solve that too?

hubie
05-14-2010, 05:05 AM
I thought the problem with the IE code was the if statement for displaying only on the first thread? At least I thought that's what someone said earlier. Does the code above solve that too?

I don't think the problem was the variable "if", since I'm currently using it with IE and the problem is solved by changing the code such as above.

imedic
05-14-2010, 09:35 AM
It seems I have same problem of not showing the button. Is probably a conflict with other mods installed. I put it on a forum without Chief First post mod and still not working.
I am thinking of Topic of the month, or quote post on PM mods but is just a guess.
I am looking for having this mod on my forums...
Nice mod.

@ Hubie - Your modification does not work in FF but work in IE. It mislead me the mod is not working.
I am using last version of FF and forum is 3.8.4 with lots of mods.

edit: Am I dumm or what: Remember to tell No script in Firefox to let facebook.net or you won't see the button.
@ Hubie - Your modification works both in IE and FF! Great, thanks.

Deimos
05-15-2010, 12:00 PM
Here's a fix of IE issue changing some code. With this code the button is now displayed in IE browser.

Please let me know if it's working properly.

<div id="fb-root"></div> <script>
window.fbAsyncInit = function() {
FB.init({
appId : '100673979977717',
status : true, // check login status
cookie : true, // enable cookies to allow the server to access the session
xfbml : true // parse XFBML
});
};

(function() {
var e = document.createElement('script');
e.src = document.location.protocol + '//connect.facebook.net/en_US/all.js';
e.async = true;
document.getElementById('fb-root').appendChild(e);
}());
</script> <fb:like layout="standard" show_faces="true" width="300" action="like" colorscheme="light" />

*Note: If you use the appId that appears in the code above, you'll get an interesting effect 'onmouseover' with the title of thread.


I'm using the second bit of code from the original post, which works AOK in firefox, where do I go about putting the IE code pasted above?

Also, I notice some threads properly relay their title to Facebook, but some do not
I'm using VBSeo, so thought it might be that, but it seems odd that two threads in the same forum, have different results.

Xencored
05-15-2010, 12:43 PM
I've not installed this mod, but.. have you defined the og: stuff?

Try: http://www.nzboards.com/new-zealand-travel/manapouri-milford-sound-about-3-5-a-90512/ (it's under the Reply to Thread/Thread Title), then check my FB profile.

;)

What code did you use mate to get it to work like that
It show awesome on my facebook page after i click "like"
Thanks

cdoyle
05-15-2010, 01:06 PM
hmm, I still can't get this to work in IE.

I am now using this

<if condition="$post[postcount] == 1 AND !in_array($GLOBALS[forumid], array(40, 39))">


<div id="fb-root"></div> <script>
window.fbAsyncInit = function() {
FB.init({
appId : 'xxxxxxxxxxxxxx',
status : true, // check login status
cookie : true, // enable cookies to allow the server to access the session
xfbml : true // parse XFBML
});
};

(function() {
var e = document.createElement('script');
e.src = document.location.protocol + '//connect.facebook.net/en_US/all.js';
e.async = true;
document.getElementById('fb-root').appendChild(e);
}());
</script> <fb:like layout="standard" show_faces="true" width="300" action="like" colorscheme="light" />


</if>



seems to work fine in FF, but IE nothing appears at all? Any ideas?

Devanand
05-16-2010, 06:36 AM
hmm, I still can't get this to work in IE.

I am now using this

<if condition="$post[postcount] == 1 AND !in_array($GLOBALS[forumid], array(40, 39))">


<div id="fb-root"></div> <script>
window.fbAsyncInit = function() {
FB.init({
appId : 'xxxxxxxxxxxxxx',
status : true, // check login status
cookie : true, // enable cookies to allow the server to access the session
xfbml : true // parse XFBML
});
};

(function() {
var e = document.createElement('script');
e.src = document.location.protocol + '//connect.facebook.net/en_US/all.js';
e.async = true;
document.getElementById('fb-root').appendChild(e);
}());
</script> <fb:like layout="standard" show_faces="true" width="300" action="like" colorscheme="light" />


</if>



seems to work fine in FF, but IE nothing appears at all? Any ideas?
I did same thing and have same problem....still nothing to show in IE.

cdoyle
05-16-2010, 01:58 PM
I tried the demo out again, and it's not showing in IE either.

Monkeylord
05-17-2010, 04:23 PM
IE fix seems to be working fine for me, although the "Like" button seems to be showing up twice when I checked in Chrome. Not tried any other browsers yet though.

Monkeylord
05-19-2010, 09:11 AM
Spoke to soon, seems the IE fix isn't working properly for me. Everything comes up fine, but between navigating away from the page and returning the FB button seems to have forgotten that I "Like" the thread, and goes back to asking me to be the first of my friends to like it again.

Frustrating!

Also, when it posts a comment to my wall it grabs the first image it can find on the page... which is always a box-corner!

ARSamo
05-19-2010, 09:38 AM
Error
This webpage is not available.

The webpage at http://www.facebook.com/widgets/like.php?

solution plz urgently

WizKaz
05-19-2010, 09:45 AM
It doesnt work with my site either. When I includ "google.com" to test it, it works fine. But if i insert my own URL, I always get an error: "site MYURL not found."
But even if I copy an paste the url from the error in my browser, i find the site.

Any ideas, pls? :(

Brandon Sheley
05-21-2010, 05:10 PM
not working in IE even after the "IE fix" code

kall
05-21-2010, 06:51 PM
not working in IE even after the "IE fix" code
That's because that's nothing to do with why IE isn't rendering the FBML. ;)

*grins* That might be what's up with the other one.. is mine rendering in Firefox?

Blacura
05-21-2010, 07:05 PM
This does not work. It's frustrating that i will go through all the posts with various try this try that and it still does not work. when i click like it shows up briefly and then its gone and i have an error

kall
05-21-2010, 07:23 PM
This does not work. It's frustrating that i will go through all the posts with various try this try that and it still does not work. when i click like it shows up briefly and then its gone and i have an error
Clicking that 'Error' word will pop up a box that tells you what the error is.

cdoyle
05-24-2010, 01:40 AM
I think I'm about ready to just remove the button from pages.

The new thing I'm noticing with it is, that once you click 'like' and close the browser. Then come right back, and it's forgotten that you already clicked it! You can click it again, and it then posts another message on your wall.

Not sure if this is a facebook thing or what.

Xtrigit
05-26-2010, 04:55 PM
For people who cannot get it to work in IE, check out 243319
This also adds the comment box to the LIKE button.

StuSD
05-28-2010, 04:54 PM
what file do I make the modifications in ?
I cant find that code in class_postbit or class_postbitalt
thanks

funmasti
05-30-2010, 09:45 AM
can somebody tell me that the coding is w3.org Valid? bcoz my forum is error free

fmckinnon
05-31-2010, 02:03 PM
Hi, I've installed in my postbits-legacy template (see below), but the button isn't showing up anywhere. I also tried the XFBML version (we have an AppID already for the Facebook Connect plugin) and it also didn't show. I'm not seeing any ERRORS on my page, just no "like" button. Below is the portion of my template ... and you can try to view any thread at:
http://www.theworshipcommunity.com/forums/
<!-- controls -->
<iframe src="http://www.facebook.com/widgets/like.php?href=http://www.theworshipcommunity.com/forums/showthread.php$session[sessionurl]?p=$post[postid]&amp;show_faces=false&amp"
scrolling="no" frameborder="0"
style="border:none; width:450px; height:25px"></iframe>

cdoyle
05-31-2010, 03:05 PM
can somebody tell me that the coding is w3.org Valid? bcoz my forum is error free

I don't believe it is, I believe the facebook code doesn't validate.

EagleNick
05-31-2010, 07:58 PM
What happens when a user "Likes" a post/thread that isn't in a publicly-accessible section of the forum?

Is there any way to show the "Like" button for public threads/posts only?

captainslater
06-01-2010, 04:41 AM
Just wanted to register my Forum-URL and Facebook said the URL is invalid.
So what would be a valid URL?

jayunsplanet
06-01-2010, 06:21 PM
Hello,

This could be a great mod!

I attempted to use the "recommended" version of this mod on my forum. I added the if condition, and inputted my appID from Facebook, code to my postbit_legacy template as instructed. It does indeed add the like button to the first post in the thread. When I click on it to "Like" something, it quickly pulls up my picture and is about to "like" it and then it throws an error.

The error says, verbatim, "The page at http://www.mdstreetscene.com/forum/showthread.php?t=26546&amp;page=2 could not be reached."

Any ideas?

Thanks.

Cla75
06-01-2010, 09:03 PM
I have your same problem ...
placed the code in the postbit_legacy template, see i LIKE button, seems to work but then ERROR in the forum and nothing is published on FB.

I also tried to enter the forum Hubie ... this link ...
http://www.htceros.com/hd2-leo/284-errores-htc-hd2.html#post1019
I see the button LIKE, click and I get the same error:
Me gusta
S? el primero de tus amigos al que le guste esto. ? Error
click error:
The page at http://www.htceros.com/hd2-leo/284-errores-htc-hd2.html#post1019 is unreachable
?!?!!?? the LINK is correct

Why??

thanks for support

despo
06-02-2010, 09:16 AM
Hello,

http://developers.facebook.com/setup/ on this link i add a name and URL, but when İ do that the system gives an error : Invalid url

Whats wrong ? Any one ? :s

Cla75
06-02-2010, 09:59 AM
ou must add the / at the end of the link ...

eg http://www.vbulletin.org/

hubie
06-03-2010, 12:11 AM
It doesnt work with my site either. When I includ "google.com" to test it, it works fine. But if i insert my own URL, I always get an error: "site MYURL not found."
But even if I copy an paste the url from the error in my browser, i find the site.

Any ideas, pls? :(

Have you tried putting "/" at the end of the url?

not working in IE even after the "IE fix" code
For me it works, but sometimes i have to refresh the page to get the button in IE. After refreshing, the button is shown on every page.

what file do I make the modifications in ?
I cant find that code in class_postbit or class_postbitalt
thanks
You have to insert the code under </controls> or wherever you want in postbit/postbit_legacy (deppends wich template your site is using).

I have your same problem ...
placed the code in the postbit_legacy template, see i LIKE button, seems to work but then ERROR in the forum and nothing is published on FB.

I also tried to enter the forum Hubie ... this link ...
http://www.htceros.com/hd2-leo/284-errores-htc-hd2.html#post1019
I see the button LIKE, click and I get the same error:

click error:

?!?!!?? the LINK is correct

Why??

thanks for support

Cla75, i've tested that link and for me everything is working correctly. Also, the post content was posted right on my FB wall.

EagleNick
06-06-2010, 05:09 PM
What happens when a user "Likes" a post/thread that isn't in a publicly-accessible section of the forum?

Is there any way to show the "Like" button for public threads/posts only?
???

jackburaks35
06-12-2010, 08:04 PM
thank you :);)

Hellmaster
06-25-2010, 06:44 AM
Just installed, working perfect, but... how to change de languaje to Spanish (Latinoamerica)?

Thanx!


*****

FIX: es_MX

hubie
06-25-2010, 01:38 PM
Just installed, working perfect, but... how to change de languaje to Spanish (Latinoamerica)?

Thanx!


*****

FIX: es_MX

Just find:

... '//connect.facebook.net/en_US/all.js'; ...

and replace "en_US" for "es_MX" or "es_LA".

FitgirlWorld
06-26-2010, 05:01 AM
Any way to get this to post an image and comment on the person's news feed/wall? This only adds a small link to "recent activity" on the person's facebook page?

thanks

Endertr
07-01-2010, 08:19 PM
thanks..

kyokushin4life
07-10-2010, 01:22 AM
I have a question.

I'm adding the template change to showthread template instead of postbit.(so like button is next to reply button) The facebook like button generates an invalid link. Ithink adding the change to the postbit template works.

What is the right template code that I can use in showthread template to get the like button to work?

Thanks!

<iframe src="http://www.facebook.com/plugins/like.php?href=http://www.example.com/forums/showthread.php$session[sessionurl]?p=$post[postid]&amp;layout=button_count&amp;show_faces=true&amp;width=&amp;action =like&amp;colorscheme=light"
scrolling="no" frameborder="0" allowTransparency="true" style="border:none; overflow:hidden; width:100px; height:20px"></iframe>

kyokushin4life
07-10-2010, 01:43 AM
Got it.

Use t=$threadid in the code.

MagicThemeParks
07-13-2010, 11:31 AM
kyokushin4life, so is it then like this?

<iframe src="http://www.facebook.com/plugins/like.php?href=http://www.example.com/forums/showthread.php$session[sessionurl]?t=$thread[threadid]&amp;layout=button_count&amp;show_faces=true&amp;width=&amp;action =like&amp;colorscheme=light"
scrolling="no" frameborder="0" allowTransparency="true" style="border:none; overflow:hidden; width:100px; height:20px"></iframe>

alehawk
07-20-2010, 05:23 PM
I got problems with xfbml version, it giver me an error "You must specify an "href" attribute to the iframe. Something like <iframe src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fexample.com%2Ffoo%2Fbar .html"></iframe>"
If I use the iframe option It works but it wont allow the user to enter a comment.
Does anyone knows how to fix it?
Tnx!

hubie
07-22-2010, 12:22 AM
I got problems with xfbml version, it giver me an error "You must specify an "href" attribute to the iframe. Something like <iframe src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fexample.com%2Ffoo%2Fbar .html"></iframe>"
If I use the iframe option It works but it wont allow the user to enter a comment.
Does anyone knows how to fix it?
Tnx!

Have you installed another fb mod? I had the same problem when i installed facebook connect on my board.

alehawk
07-22-2010, 11:37 AM
Ah yes, I got it, it may be that... tnx 4 the reply!

ram94401
07-25-2010, 04:46 AM
Thank you hubie. I added like button next to Post Reply button in each thread. I like it this way instead of placing the like button after first post. Like button is more prominent if you place it in the top of thread -- just my thought.

I modfied showthread template. Find

<td class="smallfont"><a

href="newreply.php?$session[sessionurl]do=newreply&amp;noquote=1&amp;p=$FIRSTPOSTID"

rel="nofollow">

and create another td element after this td; place the iframe tag between the new td tags.

To see how it looks, see http://www.digitalbhoomi.in/forums/.

Complete code:


<table cellpadding="0" cellspacing="0" border="0" width="100%" style="margin-bottom:3px">
<tr valign="bottom">
<if condition="$show['largereplybutton']">
<td width="120px;" valign="top" class="smallfont"><a href="newreply.php?$session[sessionurl]do=newreply&amp;noquote=1&amp;p=$FIRSTPOSTID" rel="nofollow"><if condition="$show['closethread']"><img src="$stylevar[imgdir_button]/reply.gif" alt="$vbphrase[reply]" border="0" /><else /><img src="$stylevar[imgdir_button]/threadclosed.gif" alt="$vbphrase[closed_thread]" border="0" /></if></a>
</td>
<td>
<iframe scrolling="no" frameborder="0" src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fwww.digitalbhoomi.in/forums/showthread.php?t=$thread[threadid]&amp;layout=standard&amp;show_faces=false&amp;width=450&amp;action =like&amp;font=verdana&amp;colorscheme=light&amp;height=30" style="border: medium none; overflow: hidden; width: 450px; height: 30px;" allowtransparency="true"></iframe>
</td>

<else />



I used iframe instead of xfbml. The reason is that xfbml needs Javascript SDK which mess up with flash ads in the page. Facebook has a solution for this, but it's not working. Moreover, I don't want to add too many javascripts in the forum page that will slow down the page loading.

soundbarrierpro
08-06-2010, 12:56 PM
Anybody knows how this will work with vbSEO? How would you change standard URL format to SEO urls?

ex. http://www.mysite.com/forum-name/topic-name.html

?

Thank you

ram94401
08-07-2010, 02:12 PM
Anybody knows how this will work with vbSEO? How would you change standard URL format to SEO urls?

ex. http://www.mysite.com/forum-name/topic-name.html

?

Thank you

For Like URL, you dont need to optimize it for SEs. If you want to do it, I guess it may not be too difficult. Find the variable for forum name and topic name and format it the way you want it.

soundbarrierpro
08-07-2010, 07:33 PM
For Like URL, you dont need to optimize it for SEs. If you want to do it, I guess it may not be too difficult. Find the variable for forum name and topic name and format it the way you want it.

The URL added to my FB page isn't a direct link to the topic I "like". Instead since my URL's are SEO'd, the link added on facebook is just my domain name. If a facebook friend clicks the link that was liked, it just goes to my base domain URL, not the topic.

I need to know how I can code http://www.YOURSITE.com/showthread.php$session[sessionurl]?p=$post[postid]&amp;show_faces=false&amp

To be an SEO’d URL

kall
08-07-2010, 08:05 PM
For Like URL, you dont need to optimize it for SEs. If you want to do it, I guess it may not be too difficult. Find the variable for forum name and topic name and format it the way you want it.
That's not true. If vB says one URL, but when Facebook's spider hits it, it sees the vBSEO URL (or vice-versa), the Like will not work.

@soundbarrierpro: There is a thread at vbseo.com that deals with this, just search for Facebook over there. :)

paradoxx109
08-15-2010, 01:37 AM
Hi, excellent mod, but I have 2 issues, I have already read every post here but nothing worked.

First: im using FF 3.5.10 and when I hit the like button, the pop up loops between like and unlike and wont stop.

Second: When you use it in IE, it works fine, but when you go to your FB wall the link redirects to a page not found, because is not including the post number.

Im using the IFrame code and vB 3.8.6PL1

Any tips?

paradoxx109
08-15-2010, 06:04 PM
my second issue above has been already fixed.

Now i wonder, is there any way I can locate the like button just aside the twitter as in this mod

https://vborg.vbsupport.ru/showthread.php?t=248568

Any help will be appreciated.

hubie
08-15-2010, 07:53 PM
my second issue above has been already fixed.

Now i wonder, is there any way I can locate the like button just aside the twitter as in this mod

https://vborg.vbsupport.ru/showthread.php?t=248568

Any help will be appreciated.

Post #4 of that thread explains how to locate the like button. Take a look to his code.

Carlos X
08-15-2010, 08:07 PM
I have vbSEO installed, so does this work with the facebook like? o_O

And, I'm english spoken, I see another language in your ScreenCaps.

paradoxx109
08-15-2010, 08:11 PM
I guess I didnt realize about that one, thank you so much. Although I still have the loop of like dislike in firefox.

m2006
08-16-2010, 04:21 AM
Many thanks for Mode is the result of a page to load slowly silk

paradoxx109
08-19-2010, 03:23 PM
anyone has problems with FF when clicking the like button?

WinnipegHeights
08-21-2010, 06:29 AM
Why would you not simply add this to the social bookmarking template??

In Show Thread templates..

showthread_bookmarksite

Paste the following after the existing code

<if condition="$bookmarksite[title]=='Facebook'">

<li>
<fb:like></fb:like>

<div id="fb-root"></div>
<script>
window.fbAsyncInit = function() {
FB.init({appId: 'YOURAPPID', status: true, cookie: true,
xfbml: true});
};
(function() {
var e = document.createElement('script');
e.type = 'text/javascript';
e.src = document.location.protocol +
'//connect.facebook.net/en_US/all.js';
e.async = true;
document.getElementById('fb-root').appendChild(e);
}());
</script>
</li>

</if>


All that is required is to create a Social Bookmark for Facebook, as suggested in this thread..

https://vborg.vbsupport.ru/showthread.php?t=166332&highlight=facebook

The reason this works more nicely, is that
a) It puts the LIKE button with the rest of the social networking stuff.
b) Vbulletin will only display the Social Bookmarking bits in threads that are GUEST viewable.

SnakeEaterITA
09-07-2010, 12:46 AM
Hi guys, one problem for me.

I put this code in the Showthread

<div id="fb-root"></div> <script>
window.fbAsyncInit = function() {
FB.init({
appId : '116209095073446',
status : true, // check login status
cookie : true, // enable cookies to allow the server to access the session
xfbml : true // parse XFBML
});
};

(function() {
var e = document.createElement('script');
e.src = document.location.protocol + '//connect.facebook.net/it_IT/all.js';
e.async = true;
document.getElementById('fb-root').appendChild(e);
}());
</script> <fb:like layout="standard" show_faces="false" width="300" action="like" colorscheme="light" />


and the Like button is nicely displayed next to the Post Reply, but I have some problems:

1) IE doesn't show anything

2) If I press the Like button and I go in my facebook wall, it doesn't show the infos of the thread.

https://vborg.vbsupport.ru/external/2010/09/47.jpg

No thread title, no thread url, no thread description.

What should I do?

FSA
09-21-2010, 11:16 AM
:edit

i've solved it with the share-button.


<a name="fb_share" type="button_count" share_url="http://WWW.DOMAIN.COM/showthread.php?p=$post[postid]&t" href="http://www.facebook.com/sharer.php">Share</a><script src="http://static.ak.fbcdn.net/connect.php/js/FB.Share" type="text/javascript"></script>

LakeAnna
10-05-2010, 02:44 AM
I have applied the IE fix and still not working - is this still an open issue? Or a dead hack?

Raptor
10-07-2010, 01:51 PM
How about having a like option that links displays who liked the post and also adds to the OP's Karma - but not linking to facebook ?

BirdOPrey5
10-08-2010, 11:47 PM
I'm using the code from the first (top) post and it's working fine for me in IE8 (XFBML method)... is that unusual?

Chance4Today
10-10-2010, 08:36 PM
Thanks :)

soundbarrierpro
10-11-2010, 05:35 PM
:edit

i've solved it with the share-button.


<a name="fb_share" type="button_count" share_url="http://WWW.DOMAIN.COM/showthread.php?p=$post[postid]&t" href="http://www.facebook.com/sharer.php">Share</a><script src="http://static.ak.fbcdn.net/connect.php/js/FB.Share" type="text/javascript"></script>


I'm using this. Great post. All I use is Firefox Browser and the facebook Like button just won't work for me. All I get is an error code. This appears to fix the problem to get the pages posted on facebook.

Nova99
10-15-2010, 06:11 PM
IF you use the FB Like button in your forums you should read this:
http://www.searchmarketingman.com/2010/09/how-to-fix-like-button-bug.html

The Like button messes up the URLs and indexed pages in SE's and makes many pages in your forum blank for IE users, so I've removed it for now until Facebook applies a fix to this.
http://bugs.developers.facebook.net/show_bug.cgi?id=9777

It's listed as a priority 5 bug by Facebook now, and that's the lowest priority so it may take a while until it's getting fixed, so the Like button may really mess up your forums now!

BirdOPrey5
10-15-2010, 08:13 PM
I don't know if this XFBML code is affected by this bug, this code is relatively old and been out for a while... The code they are talking about is when linked directly to facebook's servers to download the latest javascript code...

As a test I put this into google:
inurl:fb_xd_fragment site:mydomain.com

And it didn't return any URL's so so far my site has been unaffected. However if you use a site name that has been affected hundreds of blank pages come up, such as:
inurl:fb_xd_fragment site:thefootballnetwork.net

Nova99
10-15-2010, 09:55 PM
And it didn't return any URL's so so far my site has been unaffected. However if you use a site name that has been affected hundreds of blank pages come up, such as:
inurl:fb_xd_fragment site:thefootballnetwork.net

Your site may be affected even if no pages with fb_xd_fragment has been indexed in SEs, visitors using IE may see blank pages sometimes anyway with the result that they exit your site right away and you may loose a possible registering member.

The best way to see this, and the way I found out the bug on my site (I didn't have any indexed pages with fb_xd_fragment either) ,was through Google Analytics.
I started to notice several links ending in fb_xd_fragment that visitors where only on for a few secs.
When I removed the FB Like button it was ok again, so the bug is still there.

BirdOPrey5
10-16-2010, 02:18 PM
Thanks... sure enough they were there in the Analytics... switched back to the iframe for now.

Nova99
10-16-2010, 02:25 PM
Thanks... sure enough they were there in the Analytics... switched back to the iframe for now.
According to posters on the two sites I linked to in my previous post the iframe button is also affected with this, so that wont help.
I have removed the "Like" button and wont add it until FB confirms that the bug has been fixed.
Had hundreds of pages pr. day that where affected by this according to Google Analytics, and when I removed the button none of the fb_xd_fragment links shows up in the logs there anymore.

It's really bad that FB have put a priority 5 on this, since it's a pretty serious bug.

BirdOPrey5
10-16-2010, 02:46 PM
damn... thanks.

fxwoody
10-27-2010, 11:55 AM
Nice! I'm using it and it works A1 with the IFrame.
Tho, i didn't put it under the control as it's to low, i switch it in my posbit-legacy under Icons&title ;)

<!-- icon and title -->
<h3 class="threadtitle">
<!---facebook-button--->
<if condition="$post[postcount] == 1"><iframe src="http://www.facebook.com/plugins/like.php?href=http://www.yoursite.com/showthread.php$session[sessionurl]?p=$post[postid]&amp;layout=button_count&amp;show_faces=true&amp;width=&amp;action =like&amp;colorscheme=light"
scrolling="no" frameborder="0" allowTransparency="true" style="border:none; overflow:hidden; width:100px; height:20px"></iframe></if>
<!---/facebook-button--->
<if condition="$show['messageicon']"><img class="inlineimg" src="$post[iconpath]" alt="$post[icontitle]" border="0" /></if>

Better like this i think :)

soundbarrierpro
10-28-2010, 11:26 AM
I don't get it.

I'm using this code. It posts to my fb page. but no topic link. Just a link to my domain name. That's it.


<iframe src="http://www.facebook.com/widgets/like.php?href=http://www.mysite.com/forums/showthread.php$session[sessionurl]?p=$post[postid]&amp;show_faces=false&amp
scrolling="no" frameborder="0"
style="border:none; width:450px; height:55px"></iframe>
<hr size="1" style="color:$stylevar[tborder_bgcolor];
fb:admins
background-color:$stylevar[tborder_bgcolor]" />

DannyITR
11-29-2010, 01:27 PM
I'm using the Iframe code with my site correctly inputted and nothign happens. Nothing is showing up in my posts in IE or FF. I saw a few other people with the same prob but nobody answered. I'm using the correct postbit template.

Why is nothing showing up???

Garamond
11-29-2010, 02:58 PM
Coders who never update a bugged product and/or never answers questions from users should be banned from ever posting any modification again :(

It's so pathetic I don't know whether to cry or laugh.

BirdOPrey5
11-29-2010, 03:25 PM
Coders who never update a bugged product and/or never answers questions from users should be banned from ever posting any modification again :(

It's so pathetic I don't know whether to cry or laugh.

Hold up... Look at that stats of this mod, over 100 people marked it as installed... hundreds more probably use it but didn't mark it... There's just a couple people here with problems... For the vast majority of the people it works fine.

If programmers were never allowed to release a program with bugs we'd have no software at all- programs are too complicated to not have any bugs... Even something a simple as this has to deal with bugs that may be present in vBulletin itself or the whole of Facebook.

YOU'VE NEVER EVEN POSTED IN THIS THREAD BEFORE! - So what problems are YOU having with this mod because we don't all have ESP and are able to know the problem before you post it.

If you're commenting on the post made by the guy above you, I saw his post, I'm not the developer so I personally didn't want to comment, but this is what I was going to say:

Either the laws of physics have ceases to work in your general vicinity, facebook is down, or YOU made a mistake somewhere. It's one of those three options... None of those are the fault of the guy who released this mod.

Garamond
11-29-2010, 09:52 PM
BirdOPrey5: you act like I criticised you personally. I'm posting on behalf of the many people that never got any answers here from the author, and last time I checked YOU ARE NOT THE AUTHOR OF THIS MOD!

BirdOPrey5
11-30-2010, 12:46 AM
You say I have no standing to answer because I'm not the mod author... I say you have no standing to complain because you never posted in this thread before... so here we are... two people with no stake in either the start nor outcome of this argument.

Isn't that what the Internet is all about?

Seriously though... while I'm not the author I have released my fair share of mods and when I see people like you complaining about bugs and lack of support for completely free mods I have to vent... You get what you pay for... You dare suggest someone not be allowed to release a mod because they don't meet your time table for replies? (not that you ever even requested help in this thread.) I say look at the 100+ people who installed and use this no problem- you think they'd prefer he not release it at all because he can't keep on top of support requests? What makes it even more annoying to me is there is nothing wrong with this mod- if you follow the instructions (and facebook is working and your vbulletin is working) it WILL work- there is no doubt it my mind it will work... IF setup correctly.

FreshFroot
11-30-2010, 01:33 AM
BirdOPrey5: you act like I criticised you personally. I'm posting on behalf of the many people that never got any answers here from the author, and last time I checked YOU ARE NOT THE AUTHOR OF THIS MOD!
maybe your retarded? It worked fine for me?

Just because the mod says its supported doesn't mean it's supported every day.

It's a free mod what do you expect.. jeez. If you paid for it, then you got a right to whine about it... right now you don't!!

malakaikingston
12-11-2010, 05:25 PM
Anyone know how I would make this appear on all posts but not pm's?

BirdOPrey5
12-11-2010, 06:05 PM
You can put the code in a conditional:
<if condition="THIS_SCRIPT =='showthread'">
code here
</if>
It won't show outside of the showthread.php file.

malakaikingston
12-11-2010, 07:09 PM
You can put the code in a conditional:
<if condition="THIS_SCRIPT =='showthread'">
code here
</if>
It won't show outside of the showthread.php file.

Thanks!

It worked!

malakaikingston
12-11-2010, 07:32 PM
You can put the code in a conditional:
<if condition="THIS_SCRIPT =='showthread'">
code here
</if>
It won't show outside of the showthread.php file.

Do you know how I would get it to only show the subject of the thread and the website as opposed to the subject, title and website?

Like it is showing as "Movember Mo Grow Contest Poll VOTING!! - Silverfish Longboarding - The Longboard Skateboarding Commu on silverfishlongboarding.com."

I want it to just show "Movember Mo Grow Contest Poll VOTING!! on silverfishlongboarding.com."

BirdOPrey5
12-11-2010, 08:10 PM
In your headinclude you should have several "og" meta lines... one of them is for title and should be :

<meta property="og:title" content="$threadinfo[title]"/>


That's what mine is and it uses only the thread title as the subject.

malakaikingston
12-11-2010, 08:41 PM
In your headinclude you should have several "og" meta lines... one of them is for title and should be :

<meta property="og:title" content="$threadinfo[title]"/>


That's what mine is and it uses only the thread title as the subject.

I have no og meta lines.

Should I add them?

If so where?

BirdOPrey5
12-11-2010, 10:00 PM
Definitely everyone who uses the Like button should have these headers... Put them anywhere in your headinclude template.


<meta property="og:title" content="$threadinfo[title]"/>
<meta property="og:site_name" content="$vboptions[bbtitle]"/>
<meta property="og:image" content="http://www... path to image/logo.jpg">
<meta property="og:type" content="article" />


The og:image one is the only one you need to customize... make this a URL of an image you want to use when someone likes your page, usually the site logo- but it should be "roughly" square. Facebook will resize it as needed within reason though.

malakaikingston
12-11-2010, 10:37 PM
Definitely everyone who uses the Like button should have these headers... Put them anywhere in your headinclude template.


<meta property="og:title" content="$threadinfo[title]"/>
<meta property="og:site_name" content="$vboptions[bbtitle]"/>
<meta property="og:image" content="http://www... path to image/logo.jpg">
<meta property="og:type" content="article" />


The og:image one is the only one you need to customize... make this a URL of an image you want to use when someone likes your page, usually the site logo- but it should be "roughly" square. Facebook will resize it as needed within reason though.

Cool I added all those and they work well, except for the image, I got it to work in the case of linking with urls (like posting links on the fan page) but it never showed up via the like button.

This is the code I am using

<meta property="og:image" content="http://www.silverfishlongboarding.com/images/logo.jpg">

Is there a way to fix it to use an image via the like button but still be able to choose the images when linking to it from offsite, such as on the fan page?

If I have to choose one or the other I would rather be able to choose but just thought I should ask.

Thanks for all the help, yer great.

BirdOPrey5
12-11-2010, 10:44 PM
I don't think there's a way to choose, if so I haven't found it. You can remove the whole line to go back to how it was.

If you're using the iframe method the image won't ever show unfortunately.

malakaikingston
12-11-2010, 10:53 PM
I don't think there's a way to choose, if so I haven't found it. You can remove the whole line to go back to how it was.

If you're using the iframe method the image won't ever show unfortunately.

ahhhhh okay.

good to know, thanks.

malakaikingston
12-14-2010, 08:31 PM
I don't think there's a way to choose, if so I haven't found it. You can remove the whole line to go back to how it was.

If you're using the iframe method the image won't ever show unfortunately.

Can you clarify something for me, does adding this code in any way link up to my sites fan page? Is there a way to do that if it doesn't?

Thanks again.

BirdOPrey5
12-14-2010, 08:37 PM
I believe the fan page is totally independent. I don't know of any way to "link" them. There is one additional "og" tag where you can add your facebook id to be the admin of the like button but I don't believe it really does anything for the like button as implemented in this mod.

<meta property="fb:admins" content="9999999999"/>

Replace 999999999999 with your facebook id number.

How to find your facebook ID (http://www.ehow.com/how_5753004_facebook-id.html)

malakaikingston
12-14-2010, 10:33 PM
I believe the fan page is totally independent. I don't know of any way to "link" them. There is one additional "og" tag where you can add your facebook id to be the admin of the like button but I don't believe it really does anything for the like button as implemented in this mod.

<meta property="fb:admins" content="9999999999"/>

Replace 999999999999 with your facebook id number.

How to find your facebook ID (http://www.ehow.com/how_5753004_facebook-id.html)

Okay cool thanks.

Mahoni999
12-16-2010, 11:16 AM
edit:

Anyone knows how we can get the Language changed in the IFrame Version?

Kind Regards

Replicators
12-19-2010, 03:59 PM
I got sort of a request if anyone is willing to try, instead of having the like button inside the postbit, is it possible to have it in it's own box below the first post? I cannot get it situated right without it screwing up the postbit.

Also for the meta stuff, it doesn't seem to work for me. I put the stuff in the headinclude template with correct info, but when it gets to facebook it is as it was before. Maybe i am missing something though, i don't even know what it means by og or how the code would know that that meta is for facebook and not the site itself.

BirdOPrey5
12-19-2010, 05:10 PM
"og" is the name of the standard given to these tags, short for 'open graph.' Other sites besides facebook could use them but I don't know of any that do.

Can you give a link to a thread on your forum? Facebook visits your page to pull this info so your thread needs to be visible to the public for the tags to work right.

Replicators
12-19-2010, 06:14 PM
"og" is the name of the standard given to these tags, short for 'open graph.' Other sites besides facebook could use them but I don't know of any that do.

Can you give a link to a thread on your forum? Facebook visits your page to pull this info so your thread needs to be visible to the public for the tags to work right.

Ok nvm then, my board is disabled atm so maybe once i open it, it will work.

BirdOPrey5
12-19-2010, 08:41 PM
Probably. :up:

Cobra-J82
12-22-2010, 12:49 AM
If you dont want this like button to be shown in specific forums add



<if condition="$forum[forumid]=='7,8,29,30,31,32,33,40'">
<else />

THE LIKE BUTTON CODE

</if>



The numbers are the forum id

muratcan25
01-07-2011, 07:37 AM
YouSite.Com/showthread.php?p the page could not be reached at.
.php?p vBSEO user of
I wonder what's wrong

Replicators
01-16-2011, 06:18 PM
Here is where i put it.

Go into Showthread and find:

<!-- toolbar -->
<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center" style="border-bottom-width:0px">
<tr>After the <tr> put in:

<td id="fb-root"><script>
window.fbAsyncInit = function() {
FB.init({
appId : 'yourappID',
status : true, // check login status
cookie : true, // enable cookies to allow the server to access the session
xfbml : true // parse XFBML
});
};

(function() {
var e = document.createElement('script');
e.src = document.location.protocol + '//connect.facebook.net/en_US/all.js';
e.async = true;
document.getElementById('fb-root').appendChild(e);
}());
</script> <fb:like layout="standard" show_faces="false" width="300" action="like" colorscheme="dark" /></td> Of course, change the colorscheme to what scheme you have on the forum.

NOTE: If someone can help me make it to where the background color is what it's supposed to be, that would be awesome as it don't look exactly right this way.

SamirDarji
01-20-2011, 09:06 AM
Here is where i put it.This is exactly what I was looking to do. :)

What do you mean by the background color? Of the Like button?

Jay106n
01-20-2011, 10:11 PM
I installed this using the XFBML Method, works like a charm on FF, but is a no go on IE.

Jay106n
01-20-2011, 11:05 PM
I found it works on some threads in 3.8.0 , but not others. Any ideas?

BirdOPrey5
01-21-2011, 12:40 AM
I know with the twitter button threads with special characters in the title will stop it from working... basically anything non-english.

Jay106n
01-21-2011, 01:09 AM
I know with the twitter button threads with special characters in the title will stop it from working... basically anything non-english.

I thought it may have been something like that so I took out any BB code in the title and post and it still didnt work. Its not a big deal, just an annoyance.

JDMTuned
02-02-2011, 10:09 PM
iFrame method and zoints seo gives an error page is not reachable. Any solutions???

yamahapaul
02-07-2011, 02:32 PM
Here is where i put it.

Go into Showthread and find:

<!-- toolbar -->
<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center" style="border-bottom-width:0px">
<tr>After the <tr> put in:

<td id="fb-root"><script>
window.fbAsyncInit = function() {
FB.init({
appId : 'yourappID',
status : true, // check login status
cookie : true, // enable cookies to allow the server to access the session
xfbml : true // parse XFBML
});
};

(function() {
var e = document.createElement('script');
e.src = document.location.protocol + '//connect.facebook.net/en_US/all.js';
e.async = true;
document.getElementById('fb-root').appendChild(e);
}());
</script> <fb:like layout="standard" show_faces="false" width="300" action="like" colorscheme="dark" /></td>


I've got this to work (at last!) using the above

http://www.midlandsheritage.co.uk/midlands-heritage-boundary/1961-guide-forum-boundaries.html

m2006
02-09-2011, 03:17 AM
install working thank you for mods

kjsmith84
02-10-2011, 11:58 AM
I keep getting this? it was working fine for the last few months and then now this

You failed to provide a valid list of administators. You need to supply the administors using either a "fb:app_id" meta tag, or using a "fb:admins" meta tag to specify a comma-delimited list of Facebook users.

SamirDarji
02-10-2011, 07:20 PM
Looks like they're making those open graph elements required now:
http://developers.facebook.com/docs/opengraph/

Levelbest
02-18-2011, 01:43 PM
Guys:

Fixed most of my issues and things seem to be working - however using the IE version, if the THREAD TOOLS drop down happens to fall over where the LIKE code is on the page, and the button to perform the action is right there, you can't click on it. It seems the like code layer wise is above where the drop down box appears. Makes it a little difficult to manage a thread if that happens.

Ideas?

mmllc
02-22-2011, 05:37 PM
If you dont want this like button to be shown in specific forums add



<if condition="$forum[forumid]=='7,8,29,30,31,32,33,40'">
<else />

THE LIKE BUTTON CODE

</if>



The numbers are the forum id

Yes, how about if I want it only to show in the first post of the thread?

Guest210212002
02-25-2011, 02:02 PM
Yes, how about if I want it only to show in the first post of the thread?


<if condition="$post[postcount] == 1 AND !in_array($GLOBALS[forumid], array(12, 13))">


Replace array #'s with your own.

fernandezp27
02-25-2011, 03:59 PM
Can I get the like to say "Me Gusta" but, the names off to the side to be in English.

analog-x
03-25-2011, 12:56 AM
So for the XFBML Method do I paste the code in the Postbit/Postbit Legacy template?

Dingo14
03-26-2011, 10:17 PM
XFBML Method (recommended)

Installed this one works great thanks

Dingo14
03-27-2011, 06:13 AM
If you dont want this like button to be shown in specific forums add



<if condition="$forum[forumid]=='7,8,29,30,31,32,33,40'">
<else />

THE LIKE BUTTON CODE

</if>



The numbers are the forum id

Can anyone get this to work for forumid's need to stop some forums being linked to facebook thanks
XFBML Method (recommended)

BirdOPrey5
03-27-2011, 12:08 PM
You could try $thread[forumid] if you're in SHOWTHREAD template, or $post[forumid] in postbit template.

FreshFroot
03-31-2011, 08:10 AM
has anyone got this working properly.

I had it working, but I hate the fact that it SHOWS names. I think people prefer to see the count go up, but not have their names displayed.

unforgotten
04-29-2011, 11:29 PM
Is there a way the user can select which image to show in their facebook? Or to add the image within the vbulletin thread content part?

jskoh
05-15-2011, 07:27 PM
can this fb like be on every post of a thread? meaning user can click on like button on a thread on 3rd post but does not include the 1st post?

mikelangelo2005
06-10-2011, 09:20 AM
Can I get the like to say "Me Gusta" but, the names off to the side to be in English.

Fernandez27,

To switch from English (LIKE) to Spanish (Me Gusta) Search in the code:

connect.facebook.net/en_US/all.js';

and replace by:

connect.facebook.net/es_LA/all.js';

Very Simple

mikelangelo2005
06-15-2011, 01:19 AM
I have a problem with this mod that is not how to fix yet, read the 13 pages of answers that are here and not find a solution.

I have installed the version XFBML. But the problem button "like" is that sometimes appears and sometimes doesn?t appear, not even reloading the page immediately appears.

Any solution?

www.motofanaticos.com (http://www.motofanaticos.com)

My code
<if condition="THIS_SCRIPT =='showthread'">
<div id="fb-root"></div> <script>
window.fbAsyncInit = function() {
FB.init({
appId : '103900849703235',
status : true, // check login status
cookie : true, // enable cookies to allow the server to access the session
xfbml : true // parse XFBML
});
};

(function() {
var e = document.createElement('script');
e.src = document.location.protocol + '//connect.facebook.net/es_LA/all.js';
e.async = true;
document.getElementById('fb-root').appendChild(e);
}());
</script> <fb:like layout="standard" show_faces="true" width="338" action="like" colorscheme="light" />
</if>
<br>

4Play
06-15-2011, 07:51 PM
will this mod work for vB 4?

BirdOPrey5
06-15-2011, 08:25 PM
I have a problem with this mod that is not how to fix yet, read the 13 pages of answers that are here and not find a solution.

I have installed the version XFBML. But the problem button "like" is that sometimes appears and sometimes doesn?t appear, not even reloading the page immediately appears.

Any solution?

www.motofanaticos.com (http://www.motofanaticos.com)

My code
<if condition="THIS_SCRIPT =='showthread'">
<div id="fb-root"></div> <script>
window.fbAsyncInit = function() {
FB.init({
appId : '103900849703235',
status : true, // check login status
cookie : true, // enable cookies to allow the server to access the session
xfbml : true // parse XFBML
});
};

(function() {
var e = document.createElement('script');
e.src = document.location.protocol + '//connect.facebook.net/es_LA/all.js';
e.async = true;
document.getElementById('fb-root').appendChild(e);
}());
</script> <fb:like layout="standard" show_faces="true" width="338" action="like" colorscheme="light" />
</if>
<br>

Facebook will give you updated code if you get it directly from their website:
http://developers.facebook.com/docs/reference/plugins/like/

will this mod work for vB 4?

VB4 has a Facebook Like button built in, it just needs to be enabled.

mikelangelo2005
06-16-2011, 04:59 PM
Facebook will give you updated code if you get it directly from their website:
http://developers.facebook.com/docs/reference/plugins/like/



VB4 has a Facebook Like button built in, it just needs to be enabled.


BirdOPrey5:

I made a new "like" on the web you publish, but publish the new code I have another problem. If I click "like" on a thread, then it appears in all forums as if it had been here

The same thing happens with the first 2 codes are posted here.

regards

BirdOPrey5
06-16-2011, 05:37 PM
In the code they give you, you need to change the URL... Replace the hard coded URL with this code:

$vboptions[bburl]/showthread.php?t=$thread[threadid]

mikelangelo2005
06-17-2011, 12:56 AM
In the code they give you, you need to change the URL... Replace the hard coded URL with this code:

$vboptions[bburl]/showthread.php?t=$thread[threadid]

BirdOPrey5

I'm more confused than before! LOL

This is the code that developers give me in "LIKE". http://developers.facebook.com/docs/reference/plugins/like/

Where would include the code you give me?

IFRAME

<iframe src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fmotofanaticos.com%2Fupl oad&amp;send=false&amp;layout=standard&amp;width=338&amp;show_face s=true&amp;action=like&amp;colorscheme=light&amp;font&amp;height=8 0" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:338px; height:80px;" allowTransparency="true"></iframe>



XFBML

<div id="fb-root"></div><script src="http://connect.facebook.net/en_US/all.js#xfbml=1"></script><fb:like href="http://motofanaticos.com/upload" send="false" width="338" show_faces="true" font=""></fb:like>


Thanks for your help!

BirdOPrey5
06-17-2011, 02:22 AM
You should use the XFBML code like this:



<div id="fb-root"></div><script src="http://connect.facebook.net/en_US/all.js#xfbml=1"></script><fb:like href="$vboptions[bburl]/showthread.php?t=$thread[threadid]" send="false" width="338" show_faces="true" font=""></fb:like>

mikelangelo2005
06-17-2011, 07:08 AM
Thank you very much BirdOPrey5,

The code works fine. I tried it on INTERNET EXPLORER, FIREFOX & GOOGLE CHROME and works perfect on all three browsers, also published the titles in the wall?s facebook as published in the threads.

My code

<if condition="THIS_SCRIPT =='showthread'">
<div id="fb-root"></div><script src="http://connect.facebook.net/es_LA/all.js#xfbml=1"></script><fb:like href="$vboptions[bburl]/showthread.php?t=$thread[threadid]" send="false" width="338" show_faces="true" font=""></fb:like>
</if>



I changed en_US by es_LA for Spanish and additions to the first <if condition="THIS_SCRIPT =='showthread'"> and then at the end </if> to publish "LIKE" in all threads but not in private messages.

regards

dpnow
07-14-2011, 05:47 PM
I'm finding that the 'like' appears briefly and then disappears. Can anyone help?

Ian

suko22
07-22-2011, 06:38 AM
I'm finding that the 'like' appears briefly and then disappears. Can anyone help?

Ian
use mikelangelo2005 code, I had same problem and it worked for me

G37Sam
10-12-2011, 11:19 PM
I've even got it to work on vb4.0, added the code in the SHOWTHREAD template though so it appears once on every thread rather than on every post

Thanks for the code :)

amine13420
11-07-2011, 04:46 PM
How can i put the button in the same line, but in the left it will be better, because here it's behind the quote, thank's button.

cakirts
02-27-2012, 12:09 AM
Hi all,

I use this plugin, and therefore fails to Zoint Seo. I wonder how the need to organize code. If you would be happy to help you.

gregorym
03-27-2012, 06:05 AM
I got it to work, very happy about that, BUT sometimes the Like count doesn't work. I was wondering if someone had a solution for that?

Note that I also have a "like box" which is using the iFrame method while the like button is using the HTML5 method.

shibby2
05-01-2012, 12:17 AM
Terrible instructions on how to install this. Someone really needs to proof-read before they post.

It tells you how to install it, but then after all that it gives another (reccomended) method. But, it has NO INSTRUCTIONS at all on how to install that method. It just says "Instructions: Thanks so and so!". LMAO

Might be a good mod but I sure as hell can't get it to work with the absolute terrible instructions provided.

Panzer Max
05-22-2012, 03:39 AM
Terrible instructions on how to install this. Someone really needs to proof-read before they post.

It tells you how to install it, but then after all that it gives another (reccomended) method. But, it has NO INSTRUCTIONS at all on how to install that method. It just says "Instructions: Thanks so and so!". LMAO

Might be a good mod but I sure as hell can't get it to work with the absolute terrible instructions provided.


Agreed, is there anyone who can tie all this together as one instruction set, with all the tweaks and changes, that works in FF, IE, Chrome? This as the potential to be a great mod but as it is, too sketchy.

thanks!!

TigraTeam
06-08-2012, 04:59 AM
uhh Help? I can't get it working.. I don't see a Like button.

I've inserted the code from the 'XFBML Method', deleted the if statement (I want it everywhere), and inserted my AppID.

Is this all I had to do?

Fera2k
06-20-2013, 04:23 PM
Thanks mate!
I've used the XFBML Method, and it worked like a charm!

mangmel
06-18-2014, 10:08 PM
'Shown on Timeline' vs 'Allow on Timeline

Likes only appear in Allow on Timeline:

how to change Shown on Timeline ?
.
.

.