NP_Friends is a plugin to add a friends network to community blogs. Site members can designate each other as friends (it must be mutual). Member pages can include lists of a member's friends with links to the friend's member page, the friend's avatar (using NP_Profile) and the friend's online status (using NP_Online).
| General Plugin info | |
|---|---|
| Author: | Wesley Luyten and Frank Truscott |
| Current Version: | 1.04 |
| Download: | NP_Friends.zip, format: zip, size: 15KB, 8 files |
| Code: | N/A |
| Forum Thread: | discuss |
Though NP_Friends can work as a stand-alone plugin, its full features can only be realized in conjunction with NP_Profile (version 2.1 or higher recommended) and NP_Online. If you do not have these plugins installed, please consider doing so. If you have these plugins installed already, please be sure to upgrade them to the latest versions, then proceed with the installation of NP_Friends.
NP_Profile allows the use of avatars in friend lists, and the ability to restrict viewing of friends list to members or friends. NP_Online allows the friend list to designate which of the firends are currently online.
For information on downloading and installing thee plugins, see their respective wiki pages, NP_Profile and NP_Online
After setting the options, all you need to do is add two or three skinvar tags to your Member Details skin part. The skinvars are described below, but an example would be as follows:
<h2>Friends (<%Friends(count)%>)</h2> <br /> <%Friends(add)%><br /> <br /> <%Friends(show)%><br />
If you intend to allow the members to restrict viewing of their friend list to site members or their own friends, you will need to make sure this NP_Profile skinvar tag is included in the edit form of the NP_Profile plugin:
<%Profile(privacylevel,label)%>: <%Profile(privacylevel)%>
Members can invite other members to be their friend by visiting the other member's profile page and clicking an invite button. The invited member will receive an email invitation including a link to activate the “friendship”. Members can be designated into three levels which are, by default, “friend”, “best friend”, and “special friend”. When a member views his entire list of friends, he can manage this list by activating pending invitations, deleting unwanted friends, and changing the friend level.
All words displayed can be customized by changing options or by modifying the nucleus/plugins/friends/english.php file. If your site uses a language other than english, you should copy the english.php file to yourlanguage.php in the firends directory. The filename should be the same as that used in the nucleus/language/ directory. In this file, translate the english into your language. Please, consider submitting any translated files to the forum thread for inclusion in the distribution.
To control the look of the friend list when avatars from NP_Profile are used, you should add this css to your skin's css file:
/*************************************************************
* *
* Copy the following into your skin's css file to make *
* the mini-list of friends on the member page look like *
* the allfriends page format. *
* *
*************************************************************/
.friendcell {
width: 120px;
text-align: center;
}
.friendtitle {
text-align:right;
}
.avatar img {
padding: 2px;
border: 1px solid #333333;
}
.avataronline img {
padding: 2px;
border: 2px solid #00CC00;
}
.onlineimg {
position: relative;
top:10px;
border:none;
z-index:10;
/*display:none;*/
}
.no_onlineimg {
height: 19px;
}
.avatarimg {
height:80px;
width:80px;
position: relative;
}
/******************************************************
* end section to copy into your css file *
******************************************************/
There are three skinvars made available by this plugin. These skinvars are valid only in the Member Details skin part. These are dewscribed below:
Default body of invitation email:
Hi <%toname%>, I am <%fromname%> from the <%sitename%> site. My real name is <%fromrealname%>. I would like to add you to my friends list. See <a href="<%fromurl%>">my profile here</a>. If you would like to add me to your friend list, click this link: <a href="<%activateurl%>"><%activateurl%></a>
Tags for the invitation email subject and body templates:
Please post feature suggestions to the discuss.
Please report bugs to the discuss.
NP_Friends version 1.04 works with Nucleus CMS version 3.31 - 2007-11-04 kg