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
Locked
drtran
Registered User
Posts: 60
Joined: Sat May 02, 2009 3:15 pm

Re: The new Facebook like button

Post by drtran »

this might sound stupid but i install it correctly, when i click LIKE, it show up on my facebook like this: yourdomain.com • Information on ccmeets.com.
how do i get rid of yourdomain.com ...it links to other site not my forum..
King-Nothing
Registered User
Posts: 458
Joined: Sat Oct 06, 2007 6:14 pm

Re: The new Facebook like button

Post by King-Nothing »

I`m currently using this code:

Code: Select all

<iframe src="http://www.facebook.com/plugins/like.php?href={BOARD_URL}viewtopic.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="{BOARD_URL}viewtopic.php?f={S_FORUM_ID}&t={S_TOPIC_ID}" layout="standard" show_faces="true" width="450" action="like" colorscheme="light" />
and I`m trying to show the "Like"-button just below the topictitle.

This this the code for the topictitle:

Code: Select all

<h2><a href="{U_VIEW_TOPIC}">{TOPIC_TITLE}</a></h2>
Only problem is that I get a huge gap and the link to MCP is centered.

Take a look here:

Image

Does anyone know hwo to fix this?
King-Nothing
Registered User
Posts: 458
Joined: Sat Oct 06, 2007 6:14 pm

Re: The new Facebook like button

Post by King-Nothing »

No one else having issues with this?
User avatar
popescucv
Registered User
Posts: 43
Joined: Sat Nov 15, 2008 7:35 am

Re: The new Facebook like button

Post by popescucv »

{S_FORUM_ID} and {S_TOPIC_ID} do not return anything for me so, I use this code and work fine on Subsilver2 phpbb3.0

Code: Select all

<fb:like var iframeurl = document.getElementById('iframeid').getAttribute('src') layout="standard" show_faces="false" width="450"  height:40px action="like" colorscheme="light" /></fb>
If you need to use faces change false with true

You can see it here
INDEX : http://www.campervan.ro/forum/index.php
FORUM : http://www.campervan.ro/forum/viewforum.php?f=70
TOPIC : http://www.campervan.ro/forum/viewtopic ... 60&start=0
User avatar
popescucv
Registered User
Posts: 43
Joined: Sat Nov 15, 2008 7:35 am

Re: The new Facebook like button

Post by popescucv »

King-Nothing wrote:I`m currently using this code:

Code: Select all

<iframe src="http://www.facebook.com/plugins/like.php?href={BOARD_URL}viewtopic.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="{BOARD_URL}viewtopic.php?f={S_FORUM_ID}&t={S_TOPIC_ID}" layout="standard" show_faces="true" width="450" action="like" colorscheme="light" />
and I`m trying to show the "Like"-button just below the topictitle.

This this the code for the topictitle:

Code: Select all

<h2><a href="{U_VIEW_TOPIC}">{TOPIC_TITLE}</a></h2>
Only problem is that I get a huge gap and the link to MCP is centered.
I use only <fb:like> and not both <iFrame> and <fb:like>

For <iFrame>
I recomand you to set the iFrame High to 20px or 40px by ex. - height:20px and not height=px
and no faces : show_faces=false&amp

Or for <fb:like>

Code: Select all

<fb:like href="{BOARD_URL}viewtopic.php?f={S_FORUM_ID}&t={S_TOPIC_ID}" layout="standard" show_faces="false" width="450"  height:20px action="like" colorscheme="light" />
or like my previous post

Code: Select all

    <fb:like var iframeurl = document.getElementById('iframeid').getAttribute('src') layout="standard" show_faces="false" width="450"  height:40px action="like" colorscheme="light" /></fb>

Try this (tested on Subsilver2):

<div id="pageheader">
<h2><a class="titles" href="{U_VIEW_TOPIC}">{TOPIC_TITLE}</a></h2>

<div id="pageheader">
<fb:like var iframeurl = document.getElementById('iframeid').getAttribute('src') layout="standard" show_faces="false" width="450" height:40px action="like" colorscheme="light" /></fb>
</div>

<!-- IF MODERATORS -->
<p class="moderators"><!-- IF S_SINGLE_MODERATOR -->{L_MODERATOR}<!-- ELSE -->{L_MODERATORS}<!-- ENDIF -->: {MODERATORS}</p>
<!-- ENDIF -->
<!-- IF U_MCP -->
<p class="linkmcp">[ <a href="{U_MCP}">{L_MCP}</a> ]</p>
<!-- ENDIF -->
</div>



Image
TSFrankL
Registered User
Posts: 3
Joined: Thu Aug 26, 2010 8:53 pm

Re: The new Facebook like button

Post by TSFrankL »

I am clearly missing some vital piece of information here. I am very new to php, html, and all that code stuff.
I took the code that was provided earlier in this thread and placed it into my viewtopic_body.html file.
It is located between the <!--Pagination or Total Posts--> and <!--If S_HAS_POLL--> sections.
I have also tried the ={FORUM_ID}&t={TOPIC_ID} with the S_ in front of them as the code was originally. Still no love.

</div>
<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:25px"></iframe>
<fb:like href="http://www.mctsol.com/phpbb3/forum/view ... ={TOPIC_ID}" layout="standard" show_faces="true" width="450" action="like" colorscheme="light" />

<div class="clear"></div>


The Like Button shows up just fine, the bots have been configured according to earlier posts but when the like button is selected I recieve the error regarding the forum not being found.
"The page at http://www.mctsol.com/phpbb3/forum/view ... ?f=31&t=40 could not be reached"

I have remarked the code out of the page for the time being as I am sure that I am just missing some type of newb thing...

Thanks for any assistance.
User avatar
popescucv
Registered User
Posts: 43
Joined: Sat Nov 15, 2008 7:35 am

Re: The new Facebook like button

Post by popescucv »

Read the above post, I had the same problem and instead of this code:

Code: Select all

<iframe src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fwww.mctsol.com/phpbb3%2Fforum%2Fviewtopic.php%3Ff%3D{FORUM_ID}%26t%3D{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:25px"></iframe>
<fb:like href="http://www.mctsol.com/phpbb3/forum/viewtopic.php?f={FORUM_ID}&t={TOPIC_ID}" layout="standard" show_faces="true" width="450" action="like" colorscheme="light" />
I use this code, and working fine now

Code: Select all

    <fb:like var iframeurl = document.getElementById('iframeid').getAttribute('src') layout="standard" show_faces="false" width="450"  height:40px action="like" colorscheme="light" /></fb>
And I inserted here in viewtopic_body.html :

<table class="tablebg" width="100%" cellspacing="1">
<tr>
<td class="cat">
<table width="100%" cellspacing="0">
<tr>

<fb:like var iframeurl = document.getElementById('iframeid').getAttribute('src') layout="standard" show_faces="false" width="450" height:40px action="like" colorscheme="light" /></fb>
<td class="nav" nowrap="nowrap">&nbsp;




Image

Image

Image
Melian01
Registered User
Posts: 42
Joined: Thu Jan 25, 2007 1:03 am
Contact:

Re: The new Facebook like button

Post by Melian01 »

Hey there,

The mod works great , i tested it on a test forum but my main forum has rewrited urls and i need some help to adapt the code

First the normal url / code

Code: Select all

http://www.psu-odyssey.com/fotest/viewtopic.php?f=2&t=2
http%3A%2F%2Fwww.psu--dyssey.com%2Fforum%2Fviewtopic.php%3Ff%3D{S_FORUM_ID}%26t%3D{S_TOPIC_ID}&
Now the url i need to adpat.

Code: Select all

http://www.psu-odyssey.com/forum/blabla/final-fantasy-xiv-online-t4475.html
http%3A%2F%2Fwww.psu-odyssey.com%2Fforum%2F
you can read: sitename/forumindex/forum/topicname-topicID. that's how the url is rewrited

any ideas?
Davidwarr
Registered User
Posts: 47
Joined: Fri Oct 22, 2010 10:37 pm

Re: The new Facebook like button

Post by Davidwarr »

Melian01 wrote:Hey there,

The mod works great , i tested it on a test forum but my main forum has rewrited urls and i need some help to adapt the code

First the normal url / code

Code: Select all

http://www.psu-odyssey.com/fotest/viewtopic.php?f=2&t=2
http%3A%2F%2Fwww.psu--dyssey.com%2Fforum%2Fviewtopic.php%3Ff%3D{S_FORUM_ID}%26t%3D{S_TOPIC_ID}&
Now the url i need to adpat.

Code: Select all

http://www.psu-odyssey.com/forum/blabla/final-fantasy-xiv-online-t4475.html
http%3A%2F%2Fwww.psu-odyssey.com%2Fforum%2F
you can read: sitename/forumindex/forum/topicname-topicID. that's how the url is rewrited

any ideas?
I have the same issue, Anybody want to lend a hand here :(
Melian01
Registered User
Posts: 42
Joined: Thu Jan 25, 2007 1:03 am
Contact:

Re: The new Facebook like button

Post by Melian01 »

Davidwarr wrote:I have the same issue, Anybody want to lend a hand here :(
What I did is this :

Code: Select all

http%3A%2F%2Fwww.psu-odyssey.com%2Fforum%2F{forum_url}%2F{TOPIC_URL}%2Dt{TOPIC_ID}.html
It works fine, even though on Facebook the topics urls will look like this:

Code: Select all

http://www.psu-odyssey.com/forum//-t4896.html
you'll get automatically redirected to the right url just because of -txxxx.
Davidwarr
Registered User
Posts: 47
Joined: Fri Oct 22, 2010 10:37 pm

Re: The new Facebook like button

Post by Davidwarr »

Actually reading over it i think if you leave the url as standard it pick up the site url as is ...

At least i think it does, i'm still testing it here...

i'm tryin to get mine to display like

phpbb3/general-fishing-news/topic1367.html

Dóh just tested it on the live site and it worked great :D
CrawlDad
Registered User
Posts: 1
Joined: Fri Nov 26, 2010 2:18 pm

Re: The new Facebook like button

Post by CrawlDad »

I have this working just fine but I'm not sure there's any value to this. Most of my forums are private and when I originally studied this mod, I had hoped that the new Like button would have deeper functionality, other than posting just a link on FB.

My question is does this Like button really just limit people to showing a Link to the Post on their FB page, or can it "repost" and display the entire content of the phpBB Post? To me that would offer more value. Thoughts?
Last edited by CrawlDad on Sun Nov 28, 2010 4:26 pm, edited 1 time in total.
maque
Registered User
Posts: 5
Joined: Wed Nov 17, 2010 8:22 am

Re: The new Facebook like button

Post by maque »

Wow, thanks. I didn't know that it exists.
User avatar
beggers
Registered User
Posts: 1257
Joined: Fri Nov 23, 2001 8:19 pm
Location: Las Vegas
Contact:

Re: The new Facebook like button

Post by beggers »

[quote="popescucv"]Read the above post, I had the same problem and instead of this code:

Code: Select all

<iframe src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fwww.mctsol.com/phpbb3%2Fforum%2Fviewtopic.php%3Ff%3D{FORUM_ID}%26t%3D{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:25px"></iframe>
<fb:like href="http://www.mctsol.com/phpbb3/forum/viewtopic.php?f={FORUM_ID}&t={TOPIC_ID}" layout="standard" show_faces="true" width="450" action="like" colorscheme="light" />
I use this code, and working fine now

Code: Select all

    <fb:like var iframeurl = document.getElementById('iframeid').getAttribute('src') layout="standard" show_faces="false" width="450"  height:40px action="like" colorscheme="light" /></fb>

Well, yours was the first example that I basically got working. The one issue is that it's posting the URL on Facebook instead of the topic titles. Any thoughts about how to fix that? Thanks!
User avatar
popescucv
Registered User
Posts: 43
Joined: Sat Nov 15, 2008 7:35 am

Re: The new Facebook like button

Post by popescucv »

Sorry, I'm not a coder and I find and adapt this solution from what I found on internet.
For me is working fine and post on facebook Site Title and Topic Title in one link to that topic
I use only this code as I show above
<fb:like var iframeurl = document.getElementById('iframeid').getAttribute('src') layout="standard" show_faces="false" width="450" height:40px action="like" colorscheme="light" /></fb>

Image
Locked

Return to “[3.0.x] MOD Requests”