Page 1 of 3

Facebook like button for every entry-post!?

Posted: Mon Feb 07, 2011 11:36 am
by destment
entry-posts are often more interesting than the thread-name, so i need the like button under every post!
is there already a mod for it? search did not help.

thx and sorry for my bad english.

Re: Facebook like button for every entry-post!?

Posted: Mon Feb 07, 2011 6:44 pm
by Sinom
Hello destment!

It's just as easy to add the Facebook-like button below every post, as it is to add it on top of every topic.

Go to \styles\YourStyle\template and open viewtopic_body.html

Find:

Code: Select all

<div class="back2top"><a href="#wrap" class="top" title="{L_BACK_TO_TOP}">{L_BACK_TO_TOP}</a></div>
Add your Facebook-code below to produce:

Code: Select all

		<div class="back2top"><a href="#wrap" class="top" title="{L_BACK_TO_TOP}">{L_BACK_TO_TOP}</a></div>
		&nbsp;&nbsp;<iframe src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fwww.YOURSITE.com%2Fforum%2Fviewtopic.php%3Fp%3D{postrow.POST_ID}%23p{postrow.POST_ID}&layout=standard&show_faces=true&width=450&action=like&colorscheme=light&height=22" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:450px; height:22px;" allowTransparency="true"></iframe>
Change www.YOURSITE.com to your site's URL, and forum to your forums folder name.


Best of luck!

Hugs :ugeek:

Re: Facebook like button for every entry-post!?

Posted: Mon Feb 07, 2011 9:51 pm
by destment
thx, but you miss understud me!
the url must be different for each "like button", each post has a different url, like this: http://www.phpbb.com/community/viewtopi ... #p12950435

Re: Facebook like button for every entry-post!?

Posted: Mon Feb 07, 2011 10:39 pm
by portugas
Good , Very, Very good...

thanks

Re: Facebook like button for every entry-post!?

Posted: Tue Feb 08, 2011 5:16 pm
by Sinom
destment wrote:thx, but you miss understud me!
the url must be different for each "like button", each post has a different url, like this: http://www.phpbb.com/community/viewtopi ... #p12950435
Yes ;)

If you've implemented any Facebook-like-button, you could see in that code that it would probably include this: (ish)

Code: Select all

/forum/viewtopic.php%3Ff%3D{S_FORUM_ID}%26t%3D{S_TOPIC_ID}
But what we have in the code above is:

Code: Select all

/forum/viewtopic.php%3Fp%3D{postrow.POST_ID}%23p{postrow.POST_ID}
Best of luck!

Hugs :ugeek:

Re: Facebook like button for every entry-post!?

Posted: Tue Feb 08, 2011 7:00 pm
by destment
isnt work correctly.
i will let the topic like button, seems like unpossible to ad the button for each post.
anyway thx for try to help.

Re: Facebook like button for every entry-post!?

Posted: Fri Feb 25, 2011 4:38 pm
by ThunderCrew
worked like a charm cept with one thing ... it does not post to your FB profile wall as a link or post ?

Re: Facebook like button for every entry-post!?

Posted: Wed Mar 23, 2011 1:39 am
by Nabucco
Hi! It would be really nice, but when i click LIKE button i got an ERROR from facebook: it says that the page is not reacheable.

Any ideas? Thanks!

Re: Facebook like button for every entry-post!?

Posted: Thu Mar 24, 2011 11:31 pm
by ~Lily~
Hi, I've just been playing with this (new to php!) and have managed to get the *like* button to link directly to the post.

In public_html/forum/styles/prosilver/template/viewtopic_body.html, add

<a href=<span><td colspan="2"><iframe src="http://www.facebook.com/plugins/like.ph ... heme=light" scrolling="no" frameborder="0" allowTransparency="true" style="border:none; overflow:hidden; width:450px; height:30px"></iframe></td></span></a>

immediately after this:

Code: Select all

					<!-- IF postrow.U_JABBER --><li class="jabber-icon"><a href="{postrow.U_JABBER}" onclick="popup(this.href, 550, 320); return false;" title="{L_JABBER}"><span>{L_JABBER}</span></a></li><!-- ENDIF -->

				</ul>
			</dd>
Replace YOUR_URL with your url lol. Seems to be working on our forum, it appears under the user details to the right hand side :)

Re: Facebook like button for every entry-post!?

Posted: Sat Apr 02, 2011 2:21 pm
by xdamageincx
I tried this:
http://www.4hxh.com/index.php
Doesn't work- all it does is post the forum url on facebook. Anyone else come up with a solution? This would be fantastic!
I have an rss feed to FB that posts every post but the forum is young. Once it grows I will have to stop it (or it will clog up others pages) and want to get this feature implemented. There has got to be a way to do it if each post can feed- they all have their own url then.

Re: Facebook like button for every entry-post!?

Posted: Sat Apr 02, 2011 2:21 pm
by xdamageincx
double post

Re: Facebook like button for every entry-post!?

Posted: Tue May 31, 2011 3:56 pm
by raqman
Love this, works like a charm, but is there any way of also having the topic title posted on the facebook profile page by any chance?

Thanks

Re: Facebook like button for every entry-post!?

Posted: Fri Jan 27, 2012 2:56 am
by roc81
It works, but how to make the button show even if the user is not logged in?

Re: Facebook like button for every entry-post!?

Posted: Fri Mar 02, 2012 5:33 am
by ddeg10
I added this code and it worked, but when you click "Like" it doesn't post anything to your facebook profile?

Please help.

Re: Facebook like button for every entry-post!?

Posted: Thu May 10, 2012 7:46 am
by Theriddler1
i use this and works perfectly

Code: Select all

<fb:like href="{BOARD_URL}/viewtopic.php?p={postrow.POST_ID}#p{postrow.POST_ID}" send="false" width="450" show_faces="true"></fb:like>
thanks Sinom for pointing me into the right direction :)