Facebook like button for every entry-post!?

Looking for a MOD? Have a MOD request? Post here for help. (Note: This forum is community supported; phpBB does not have official MOD authors)
Scam Warning
destment
Registered User
Posts: 15
Joined: Fri Aug 13, 2010 10:59 am

Facebook like button for every entry-post!?

Post by destment » Mon Feb 07, 2011 11:36 am

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.

User avatar
Sinom
Translator
Posts: 1682
Joined: Thu Oct 28, 2010 9:53 am
Contact:

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

Post by Sinom » Mon Feb 07, 2011 6:44 pm

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:

destment
Registered User
Posts: 15
Joined: Fri Aug 13, 2010 10:59 am

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

Post by destment » Mon Feb 07, 2011 9:51 pm

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

User avatar
portugas
Registered User
Posts: 37
Joined: Sun Dec 03, 2006 7:14 pm

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

Post by portugas » Mon Feb 07, 2011 10:39 pm

Good , Very, Very good...

thanks

User avatar
Sinom
Translator
Posts: 1682
Joined: Thu Oct 28, 2010 9:53 am
Contact:

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

Post by Sinom » Tue Feb 08, 2011 5:16 pm

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:

destment
Registered User
Posts: 15
Joined: Fri Aug 13, 2010 10:59 am

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

Post by destment » Tue Feb 08, 2011 7:00 pm

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.

User avatar
ThunderCrew
Registered User
Posts: 1438
Joined: Sat Jun 30, 2007 6:26 pm
Location: Ill, Usa
Contact:

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

Post by ThunderCrew » Fri Feb 25, 2011 4:38 pm

worked like a charm cept with one thing ... it does not post to your FB profile wall as a link or post ?
Ugg im a t0tal newb again ...... 2 years off cant remember jack ... time to get to it

User avatar
Nabucco
Registered User
Posts: 9
Joined: Fri Jun 25, 2010 9:43 pm

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

Post by Nabucco » Wed Mar 23, 2011 1:39 am

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!

~Lily~
Registered User
Posts: 1
Joined: Thu Mar 24, 2011 11:24 pm

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

Post by ~Lily~ » Thu Mar 24, 2011 11:31 pm

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

xdamageincx
Registered User
Posts: 131
Joined: Sat Jan 22, 2011 1:47 am

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

Post by xdamageincx » Sat Apr 02, 2011 2:21 pm

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.

xdamageincx
Registered User
Posts: 131
Joined: Sat Jan 22, 2011 1:47 am

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

Post by xdamageincx » Sat Apr 02, 2011 2:21 pm

double post
Last edited by xdamageincx on Sun Oct 23, 2011 3:03 pm, edited 1 time in total.

raqman
Registered User
Posts: 51
Joined: Tue Jul 23, 2002 4:03 pm
Contact:

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

Post by raqman » Tue May 31, 2011 3:56 pm

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

roc81
Registered User
Posts: 22
Joined: Sun Jan 22, 2012 12:56 am

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

Post by roc81 » Fri Jan 27, 2012 2:56 am

It works, but how to make the button show even if the user is not logged in?

ddeg10
Registered User
Posts: 169
Joined: Mon Oct 21, 2002 8:24 am

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

Post by ddeg10 » Fri Mar 02, 2012 5:33 am

I added this code and it worked, but when you click "Like" it doesn't post anything to your facebook profile?

Please help.

User avatar
Theriddler1
Registered User
Posts: 440
Joined: Sat Aug 27, 2011 11:00 pm
Location: NL
Contact:

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

Post by Theriddler1 » Thu May 10, 2012 7:46 am

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 :)
Theriddler - Moderator @ phpBB.nl | phpBBservice.nl Team-member
ImageSupport Tools | Image My Extensions | buy me a beer Image

Locked

Return to “[3.0.x] MOD Requests”

Who is online

Users browsing this forum: No registered users and 14 guests

cron