The new Facebook like button

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)
Suggested Hosts
Artistix
Registered User
Posts: 36
Joined: Sat Apr 17, 2010 1:36 pm

Re: The new Facebook like button

Post by Artistix » Tue Apr 27, 2010 12:49 pm

Is this an "I like" for the actuall post, or is it "i like for the whole forum?

plasmino
Registered User
Posts: 261
Joined: Sat Jul 25, 2009 11:12 am

Re: The new Facebook like button

Post by plasmino » Tue Apr 27, 2010 12:53 pm

Artistix wrote:Is this an "I like" for the actuall post, or is it "i like for the whole forum?
only for topic

edit: To be precise Clicking is sent in the wall of facebook the title and the url of the topic you like, not the index

Artistix
Registered User
Posts: 36
Joined: Sat Apr 17, 2010 1:36 pm

Re: The new Facebook like button

Post by Artistix » Tue Apr 27, 2010 1:04 pm

How does your code look like? and what did you do to get it to like the exact topic? where did you put your code?

Please share :)

plasmino
Registered User
Posts: 261
Joined: Sat Jul 25, 2009 11:12 am

Re: The new Facebook like button

Post by plasmino » Tue Apr 27, 2010 1:27 pm

I have using

open styles/prosilver/template/viewtopic_body.html

Find

Code: Select all

<!-- IF PAGINATION or TOTAL_POSTS -->
		<div class="pagination">
			{TOTAL_POSTS}
			<!-- IF PAGE_NUMBER --><!-- IF PAGINATION --> &bull; <a href="#" onclick="jumpto(); return false;" title="{L_JUMP_TO_PAGE}">{PAGE_NUMBER}</a> &bull; <span>{PAGINATION}</span><!-- ELSE --> &bull; {PAGE_NUMBER}<!-- ENDIF --><!-- ENDIF -->
		</div>
	<!-- ENDIF -->
</div>
Add after this code

* change YOUR URL with you url

Code: Select all

<iframe src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fwww.YOU URL.com%2Fforum%2Fviewtopic.php%3Ff%3D{S_FORUM_ID}%26t%3D{S_TOPIC_ID}&layout=standard&show_faces=true&width=450&action=like&colorscheme=light" scrolling="no" frameborder="0" allowTransparency="true" style="border:none; overflow:hidden; width:450px; height:px"></iframe>
<fb:like href="http://www.YOU URL.com/forum/viewtopic.php?f={S_FORUM_ID}&t={S_TOPIC_ID}" layout="standard" show_faces="true" width="450" action="like" colorscheme="light" />
clear your cache and refresh your template

RRManager
Registered User
Posts: 32
Joined: Mon Sep 28, 2009 9:44 pm

Re: The new Facebook like button

Post by RRManager » Tue Apr 27, 2010 3:14 pm

It works perfectly for me. I'll see about implementing it today.

RRManager
Registered User
Posts: 32
Joined: Mon Sep 28, 2009 9:44 pm

Re: The new Facebook like button

Post by RRManager » Tue Apr 27, 2010 4:29 pm

I got it to work for a minute, but I tried tweaking the code and now no one can get into threads. It gives a Parse Error. Probably my fault for trying to put it in a Subsilver theme.

plasmino
Registered User
Posts: 261
Joined: Sat Jul 25, 2009 11:12 am

Re: The new Facebook like button

Post by plasmino » Tue Apr 27, 2010 4:40 pm

I not use subsilver 2

but added code after

Code: Select all

<td class="gensmall" width="100%" align="{S_CONTENT_FLOW_END}" nowrap="nowrap"><!-- INCLUDE pagination.html --></td>
		<!-- ENDIF -->
	</tr>
	</table>

</div>
es:

Image

Uploaded with ImageShack.us

RRManager
Registered User
Posts: 32
Joined: Mon Sep 28, 2009 9:44 pm

Re: The new Facebook like button

Post by RRManager » Tue Apr 27, 2010 4:50 pm

I was trying to get rid of the space after the button.

plasmino
Registered User
Posts: 261
Joined: Sat Jul 25, 2009 11:12 am

Re: The new Facebook like button

Post by plasmino » Tue Apr 27, 2010 5:04 pm

is quite simple

within the script find

style="border:none; overflow:hidden; width:450px; height:px"></iframe>

and repalce with this

style="border:none; overflow:hidden; width:450px; height:60px"></iframe>


Image

RRManager
Registered User
Posts: 32
Joined: Mon Sep 28, 2009 9:44 pm

Re: The new Facebook like button

Post by RRManager » Tue Apr 27, 2010 6:13 pm

How can I get it to post the title of the thread? Right now on my FB profile, it just says "RAW ROCK MILITIA - Login". The link works fine, but not the right title.

RRManager
Registered User
Posts: 32
Joined: Mon Sep 28, 2009 9:44 pm

Re: The new Facebook like button

Post by RRManager » Tue Apr 27, 2010 6:23 pm

Actually, that only happens with threads that are hidden from unregistered guests. Any ideas on a workaround?

plasmino
Registered User
Posts: 261
Joined: Sat Jul 25, 2009 11:12 am

Re: The new Facebook like button

Post by plasmino » Tue Apr 27, 2010 7:25 pm

You have set the permissions so that the bot can read this forum?

RRManager
Registered User
Posts: 32
Joined: Mon Sep 28, 2009 9:44 pm

Re: The new Facebook like button

Post by RRManager » Tue Apr 27, 2010 7:34 pm

Bots are set to Read Only Access

plasmino
Registered User
Posts: 261
Joined: Sat Jul 25, 2009 11:12 am

Re: The new Facebook like button

Post by plasmino » Tue Apr 27, 2010 9:03 pm

added bot

UPDATE bot

pca - system - spiders / robots

bottom of the page click "Add bot" and you put these items

Name of bot: FaceBook [Linkcheck]
Style bot: leave what is
Language bot: English
Active bot: Yes
Agent match: facebookexternalhit/1.1
Bot's IP address: leave it blank

Then click "Send" so then facebook will have access and can also read the forum with read permissions for the bot
Last edited by plasmino on Fri Jun 25, 2010 6:37 am, edited 1 time in total.

RRManager
Registered User
Posts: 32
Joined: Mon Sep 28, 2009 9:44 pm

Re: The new Facebook like button

Post by RRManager » Tue Apr 27, 2010 11:11 pm

Thanks! Works like a charm!

Locked

Return to “[3.0.x] MOD Requests”