Firefox PHP

Module: Friend System Module

Posted by Thomas Seifert 
All files from this thread

File Name File Size   Posted by Date  
friends-v1.1.0.zip 10.2 KB open | download Thomas Seifert 01/30/2011 Read message
friends-v1.1.0.tar.gz 7.4 KB open | download Thomas Seifert 01/30/2011 Read message
Module: Friend System Module
January 30, 2011 07:45AM
Same here, README tells all thats needed in my opinion, therefore see below:

Module  : Friend System Module
Author  : Thomas Seifert <thomas.seifert@mysnip.de>

This module handles a separate controlcenter panel for replacing the buddies 
system with a friend system which allows friend requests and allowing / rejecting 
these and also provides a friend list in the profile which is shown depending on 
the privacy settings set by the user himself.

Development of this module was sponsored by lerepairedesmotards.com !


Installation instructions:
--------------------------

- Unpack the archive;

- Move the directory "friends" to the directory "mods"
  within your Phorum installation;

- Login as administrator in Phorum's administrative interface and
  go to the "Modules" section;

- Enable the module "Friend System Module".



Features and using them:
------------------------

This module adds a controlcenter panel, which allows the user to search for
users and requesting friendship with them. The other user is sent an email 
about the request and he can approve or deny the friendship request in the
controlcenter panel.
(code in templates/emerald/cc_panel_list.tpl / cc_panel_search.tpl)

Similarly to the waiting moderator requests or new pm message notifications there
is the possibility to show a notice about waiting friendship requests in the phorum
header. The code can be used as follows:

{IF USER->NOTICE->FRIENDS}<a class="icon icon-user-add" href="{URL->NOTICE->FRIENDS}">{LANG->mod_friends->WaitingFriendRequests}</a>{/IF}

The user also has a way to define, who can see his friend list. 
(code in templates/emerald/profile_list.tpl)

The setting for that is shown in the privacy settings controlcenter panel.
(code in templates/emerald/cc_privacy_panel.tpl)

Also a variable is available in the profile to show some information depending on the
friendship status. That variable is named IS_FRIEND.
You can use it like follows in the profile.tpl:

{IF PROFILE->IS_FRIEND}
... output something else
{/IF}

The "Add Buddy" URL in the profile is overridden by the URL to add a friend request
by this module. The text is also changed. Feel free to modify that directly in 
profile.tpl. Also all buddy-handling functions in the private messaging are disabled
by this module. As they CANNOT removed from the output you need to remove the link to
it in pm.tpl on your own. The link looks like
<li><a {IF PM_PAGE "buddies"}class="current" {/IF} href="{URL->BUDDIES}">{LANG->Buddies}</a></li>

You should remove that full line. If a user is still accessing the buddy functions by its
direct URL he is getting a "access denied" message.




Some more implementation details:
---------------------------------

The system adds another table to the phorum database which holds the waiting
friend requests. When a friend request is approved, the users are added as mutual 
friends to the regular phorum tables, so that regular phorum functions for handling
buddies can be used afterwards. A friend is assumed as a mutual buddy - keep this in
mind if working with the lower level buddy functions.

To keep the "mutual buddies" in sync I therefore recommend to clean out the buddies
tables on installation of this module.


Thomas Seifert
Attachments:
open | download - friends-v1.1.0.zip (10.2 KB)
open | download - friends-v1.1.0.tar.gz (7.4 KB)
Re: Module: Friend System Module
February 04, 2011 07:56PM
Thanks for publishing this module! When I add a "friend" from a user profile who has a "&" in his username, "&amp" will be displayed. Nothing major..
Sorry, only registered users may post in this forum.

Click here to login