We use cookies to improve your experience. No personal information is gathered and we don't serve ads. Cookies Policy.

ExpressionEngine Logo ExpressionEngine
Features Pricing Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University
Log In or Sign Up
Log In Sign Up
ExpressionEngine Logo
Features Pro new Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University Blog
  • Home
  • Forums

Buddies plugin - friendship management

Development and Programming

Yuri's avatar
Yuri
273 posts
15 years ago
Yuri's avatar Yuri

I’ve just released 0.2 version of the plugin. This is a compatibility release: I’ve added alternative syntax of variables. Download link remains the same

       
Yuri's avatar
Yuri
273 posts
15 years ago
Yuri's avatar Yuri

Soon after, v 0.3 released 😊 Added reverse buddy check

       
Dylan Smith/Context Design's avatar
Dylan Smith/Context Design
346 posts
15 years ago
Dylan Smith/Context Design's avatar Dylan Smith/Context Design

Does anyone have any code examples for this plugin? Maybe it’s a lack of caffeine, but I’m not completely wrapping my head around how to implement it, formwise.

thx!

       
wecreateyou's avatar
wecreateyou
86 posts
15 years ago
wecreateyou's avatar wecreateyou

Use this to display everyone who the member in question is following based on the member_id in the url…

{exp:buddies:display subject_id="{segment_x}" object_id="{member_id}" type="buddy"}
<a href="http://link_to_profile">{screen_name}</a>
{/exp:buddies:display}

Use this to display who is following the member in question also based on the url…

{exp:buddies:display_reverse subject_id="{segment_3}" object_id="{member_id}" type="buddy"}
<a href="http://link_to_profile">{screen_name}</a><a href="http://link_to_remove_template">remove this buddy from list</a>
{/exp:buddies:display_reverse}

Notice the link next to the “screen_name” variable. It would be best to first determine if the member is looking at their own profile. If they are show the remove link.

Next I put a link on the profile page that appears for every member like this.

<a href="http://link_to_add_buddy_template">Add this member as a buddy</a>

That’s it! very straight forward and easy. All that’s missing is some type of notification when your “buddy” has posted a new entry or comment.

It’s worth noting that a more robust addon that does this is located http://www.brandnewbox.co.uk/products/details/followers/.

       
Yuri's avatar
Yuri
273 posts
15 years ago
Yuri's avatar Yuri

Dylan, the plugin usage is pretty straightforward, but it’s easy to mess with subject and object. Subject in the one who DOES (usually logged in user) and object is the one on whom the action is DONE.

       
1 2

Reply

Sign In To Reply

ExpressionEngine Home Features Pro Contact Version Support
Learn Docs University Forums
Resources Support Add-Ons Partners Blog
Privacy Terms Trademark Use License

Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.