Page 1 of 1

"Like" feature similar to FB

Posted: Wed Apr 20, 2011 7:21 pm
by Jay1318
I would love to add the ability for users on my forum to "like" a post, just as on Facebook. Don't need it to connect to FB or have anything to do with FB, just the same functionality on my boards. Then below the post or wherever it would say "4 people like this", maybe even the screen manes of the users who liked it.

Does this exist?

Re: "Like" feature similar to FB

Posted: Wed Apr 20, 2011 10:26 pm
by jorgefms
This is not what do you want, but maybe it helps...
http://www.phpbb.com/customise/db/mod/thanks_for_posts/

Re: "Like" feature similar to FB

Posted: Wed Apr 20, 2011 11:39 pm
by Richazey
Jay1318 wrote:I would love to add the ability for users on my forum to "like" a post, just as on Facebook. Don't need it to connect to FB or have anything to do with FB, just the same functionality on my boards. Then below the post or wherever it would say "4 people like this", maybe even the screen manes of the users who liked it.

Does this exist?
there is a snippet to do just that by doyouspeakwak:

Open viewtopic.php

find:

Code: Select all

// Send vars to template
$template->assign_vars(array(
before add:

Code: Select all

// BEGIN THE NEW FACEBOOK LIKE BUTTON MOD
// bots allowed to read the forum the topic is in?
// if not set the facebook link to hidden
// you need to replace the number 370 below with the group id of the BOTS group
$can_facebook = $auth->acl_group_raw_data(370, 'f_read', $forum_id);
$can_facebook = sizeof($can_facebook) ? true : false;
// END THE NEW FACEBOOK LIKE BUTTON MOD
Note: // you need to replace the number 370 below with the group id of the BOTS group

which you can find by going into the ACP->Users and Groups->Manage Groups and hovering over the BOTS groups settings. The group id will be the number after the

Code: Select all

&g=
find:

Code: Select all

    'POST_IMG'             => ($topic_data['forum_status']
before add:

Code: Select all

// BEGIN THE NEW FACEBOOK LIKE BUTTON MOD    
    'CAN_FACEBOOK'    => $can_facebook,
// END THE NEW FACEBOOK LIKE BUTTON MOD
open styles/prosilver/template/viewtopic_body.html

Find:

Code: Select all

<h2><a href="{U_VIEW_TOPIC}">{TOPIC_TITLE}</a></h2>
After add:

Code: Select all

<!-- IF CAN_FACEBOOK -->

<iframe src="http://www.facebook.com/plugins/like.php?href={BOARD_URL}viewtopic.php%3Ff%3D{S_FORUM_ID}%26t%3D{S_TOPIC_ID}&t={TOPIC_ID}&layout=standard&show_faces=false&width=450&action=like&font=tahoma&colorscheme=light&height=35" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:450px; height:35px;" allowTransparency="true"></iframe>
<!-- ENDIF -->
Find:

Code: Select all

<!-- INCLUDE jumpbox.html -->
Before add:

Code: Select all

<!-- IF CAN_FACEBOOK -->
<iframe src="http://www.facebook.com/plugins/like.php?href={BOARD_URL}viewtopic.php%3Ff%3D{S_FORUM_ID}%26t%3D{S_TOPIC_ID}&t={TOPIC_ID}&layout=standard&show_faces=false&width=450&action=like&font=tahoma&colorscheme=light&height=35" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:450px; height:35px;" allowTransparency="true"></iframe>
<!-- ENDIF -->
Refresh your prosilver template.

Re: "Like" feature similar to FB

Posted: Thu Apr 21, 2011 2:10 pm
by Jay1318
Thanks for the replies. But I don't really want it to be connected to Facebook at all. Just the same functionality within my own boards. For example, a user could "Like" a particular post, and as with Facebook, there would be a space under that post that then says "3 people like this", or "Jason, Mike and Debbie like this".

There seems to be a mod to do just this development, however, in its first release it's not expected to be able to like individual posts, just topics.

The "thanks for post" seems to be pretty close. I may have to take a closer look at it. The language it's originally written in may be a challenge to figure out if its what I need though.

Re: "Like" feature similar to FB

Posted: Sun Apr 24, 2011 6:51 am
by benbejay
This MOD does 'Thanks' instead of likes.

http://www.phpbb.com/customise/db/mod/thanks_for_posts/

It could easily be modified to look more Facebook Style. If you want it to look more like Facebook, I'd be happy to have a look at the code for you and work something out. :)

Re: "Like" feature similar to FB

Posted: Tue Apr 26, 2011 2:35 pm
by Thyron
I'm searching for exactly the same feature! The thanks mod looks good, maybe a bit oversized. But features that are not needed can be disabled via acp. If the style would be a bit more facebook-like, I would definitely use the mod for this purpose.

Re: "Like" feature similar to FB

Posted: Tue Apr 26, 2011 2:41 pm
by Jay1318
I installed the "Thanks" mod but it was kinda high maintenance to get working, which it never really did, then wreaked havoc on my CSS when removed. My boards are pretty customized and it just did not play nice with my modifications.

Re: "Like" feature similar to FB

Posted: Wed Apr 27, 2011 12:08 am
by benbejay
So, would you like me to have a look at it to get it looking more like FB?

Re: "Like" feature similar to FB

Posted: Wed Apr 27, 2011 12:20 am
by 4_seven

Re: "Like" feature similar to FB

Posted: Sun May 01, 2011 6:03 pm
by Thyron
benbejay wrote:So, would you like me to have a look at it to get it looking more like FB?
I can only speak for me, but I would appreciate it!

Besides other buttons, it would be the list of users that needs a little modification. What is missing is the amount of users that thank/liked the post. Also I don't like that usernames are only visible when the "show me" link will be hit. For me the hide function is not needed at all. It could look like this:

2 Users like this post: Thyron, Jay1318.

To do it exactly like facebook would be more difficult and not really needed:

You, Thyron, Jay1318 and 2 other Users (as show me link) like that.

For me the like count is important and I have no idea how to get that information...

Re: "Like" feature similar to FB

Posted: Thu May 12, 2011 9:53 am
by benbejay
Thyron wrote:
benbejay wrote:So, would you like me to have a look at it to get it looking more like FB?
I can only speak for me, but I would appreciate it!

Besides other buttons, it would be the list of users that needs a little modification. What is missing is the amount of users that thank/liked the post. Also I don't like that usernames are only visible when the "show me" link will be hit. For me the hide function is not needed at all. It could look like this:

2 Users like this post: Thyron, Jay1318.

To do it exactly like facebook would be more difficult and not really needed:

You, Thyron, Jay1318 and 2 other Users (as show me link) like that.

For me the like count is important and I have no idea how to get that information...
I'm currently working on another MOD, so this is at the bottom of my list. If I get time this weekend, I'll have a look at adding the image for you. I can't do the other bits sorry.