Log in to check your private messages 
Username: Password:   
  howtodoit.myfastforum.org
  Walkthough guides for myfreeforum phpbb 2 forums
Index  FAQ  Search  Memberlist  Usergroups  Profile

Text
Text
Friends
MYFF Support Forum
HOWTODOIT (PHPbb3)
portalogy
CGArts
ANNOUNCEMENTS
Complete List of templates Available
Please Read First Before Editing your template
Permissions
Admin Index
Sticky Articles
Latest Posts
Friends

Start | Stop
The free forums are now under new ownership, a full announcement will be made shortly
Facebook Like button
Jump to:  
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    howtodoit.myfastforum.org Forum Index » Add-on`s for your forum
Author Message
Please Register and Login to this forum to stop seeing this advertising.







Add Comment
Show Comments
Posted:

Symon
Guide Legend
Guide Legend



Joined: 11 Jun 2006
Posts: 911


Location: Berkshire,England
FLAGS
Add Comment
Show Comments
PostPosted: Sat Dec 11, 2010 1:30 am  Reply with quote

This hack will add a like button to your post that links to your facebook account.

If you click like then it will post that you have liked the certain post in your newsfeed, also if you leave a comment then again it will post this as a link on your wall, the link will link back to the post you liked.

Please remember that anyone liking the post must be signed into facebook for this to work .

Ok here is HOWTODOIT

Please remember to use the Editor account before making any template changes, If you have not made an editor account yet please read HERE

Second you must have all ready a template you can edit.

If you have not done this please read HOWTODOIT



Choose the template you wish to edit using the top drop down bar and click submit.

1. Goto admin panel --- 3. Styles --- Edit Templates/Logos

You should now see a screen like this



Now you need use the top drop down bar marked  Choose Forum template/javascript/css File to Edit

And chose the file  viewtopic_body.tpl

Now open that file up

Look for a bit of code that looks like this.. (please remember that not all templates are the same so some codes may look different)

Code:
<td width="150" align="center" valign="middle" class="{postrow.ROW_CLASS}">{postrow.AIM_IMG} {postrow.YIM_IMG} {postrow.MSN_IMG} {postrow.ICQ_IMG}</td>
      <td class="{postrow.ROW_CLASS}" height="28" valign="bottom" nowrap="nowrap"><table cellspacing="0" cellpadding="0" border="0" height="18">
         <tr>
            <td valign="middle" nowrap="nowrap">{postrow.PROFILE_IMG} {postrow.PM_IMG} {postrow.EMAIL_IMG} {postrow.WWW_IMG}
</td>
         </tr>
      </table>


Now place the code after
Code:
{postrow.WWW_IMG}
and before
Code:
 </td>


Code:


<iframe src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2FYOURFORUMNAMEHERE/viewtopic.php%3Fp%3D{postrow.U_POST_ID}%23p{postrow.U_POST_ID}&amp;layout=standard&amp;show_faces=true&amp;width=450&amp;action=like&amp;colorscheme=light" scrolling="no" frameborder="0" allowTransparency="true" style="border:none; overflow:hidden; width:450px; height:60px"></iframe>

<fb:like href="YOURFORUMLINKHERE/viewtopic.php?t={F_TOPIC_ID}" layout="standard" show_faces="true" width="450" action="like" colorscheme="light" />


Now you need to change that code by adding your forum name and forum address in TWO places.

1 where it says YOURFORUMNAMEHERE
2.Where it says YOURFORUMLINKHERE

So for the first one marked YOURFORUMNAMEHERE all you need to put is your forum name minus the www. or the http://  so for this forum i would just put howtodoit.myfastforum.org

Now for the second edit

Where it says YOURFORUMLINKHERE you need to add the whole of your forum address, so for example on here i would put http://howtodoit.myfastforum.org


So your finished code should look like this (but with your forum name and link)

Code:
<td width="150" align="center" valign="middle" class="{postrow.ROW_CLASS}">{postrow.AIM_IMG} {postrow.YIM_IMG} {postrow.MSN_IMG} {postrow.ICQ_IMG}</td>
      <td class="{postrow.ROW_CLASS}" height="28" valign="bottom" nowrap="nowrap"><table cellspacing="0" cellpadding="0" border="0" height="18">
         <tr>
            <td valign="middle" nowrap="nowrap">{postrow.PROFILE_IMG} {postrow.PM_IMG} {postrow.EMAIL_IMG} {postrow.WWW_IMG}
<iframe src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fhowtodoit.myfastforum.org/viewtopic.php%3Fp%3D{postrow.U_POST_ID}%23p{postrow.U_POST_ID}&amp;layout=standard&amp;show_faces=true&amp;width=450&amp;action=like&amp;colorscheme=light" scrolling="no" frameborder="0" allowTransparency="true" style="border:none; overflow:hidden; width:450px; height:60px"></iframe>

<fb:like href="http://howtodoit.myfastforum.org/viewtopic.php?t={F_TOPIC_ID}" layout="standard" show_faces="true" width="450" action="like" colorscheme="light" />
</td>


Now save and exit.


You must remember to allow HTML tags in your profile and also in


Admin panel--2. General--Configuration---Allowed HTML tags

The easy way to do this is just to enter * in the box this will allow all html subject to some global restrictions.

Ok once done go to any post on your forum and you should see a like button at teh bottom of the post.



If someone click likes it will change as below



If you want to add a comment then hoover the mouse over the like button and you will see a box appear to write in.



By liking a post only will show the following way on facebook



By adding a comment will show a post like this on facebook




And thats HOWTODOIT

View user's profile Send private message Visit poster's website FACEBOOKSTEAM
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    howtodoit.myfastforum.org Forum Index » Add-on`s for your forum


 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

HOWTODOIT was designed and built by Symon Field
Creator Of ☆ ☆ FunnyWorld
HOWTODOIT© Symon Field 2006,2007,2008

Powered by phpBB Group © 2001,2005.
 
Create your own free forum | Buy a domain to use with your forum