Buddy System v1.00
Original Author: CrappoMan (v4.01)
Mod Author: Carsten Puka  2004-2005
Email: webmaster@carstenpukass.de
-------------------------------------------

INSTALLATION
------------
1. Upload the complete ZIP-File in the correct folders of your Webspace

2. Open profile.php File in an editor of your choice
and follow the steps :

a) Search for :

include LOCALE.LOCALESET."user_fields.php";

Add directly under the following :

if (file_exists(INFUSIONS."buddy_system_panel/locale/".$settings['locale'].".php")) {
include INFUSIONS."buddy_system_panel/locale/".$settings['locale'].".php";
} else {
include INFUSIONS."buddy_system_panel/locale/English.php";
}
if(iMEMBER && isset($lookup) && isset($addbuddy)){
dbquery("INSERT INTO ".$db_prefix."buddy VALUES('".$userdata['user_id']."','".$lookup."')");
}

b) Search for :

echo "</table>\n";
closetable();

Add directly before the following :

if(dbrows(dbquery("SELECT * FROM ".$db_prefix."buddy WHERE buddy_user_id='".$userdata['user_id']."' AND buddy_buddy_id='".$lookup."'"))==0){
echo "<tr><td align='center' colspan='3' class='tbl'><a href='".BASEDIR."profile.php?lookup=".$data['user_id']."&addbuddy'><center>".$locale['BUD106']."</center></a></td>\n</tr>";
}


3. Open the edit_profile.php File in an editor of your choice
and follow the steps :

a) Search for :

include LOCALE.LOCALESET."user_fields.php";

Add directly under the following :

if (file_exists(INFUSIONS."buddy_system_panel/locale/".$settings['locale'].".php")) {
include INFUSIONS."buddy_system_panel/locale/".$settings['locale'].".php";
} else {
include INFUSIONS."buddy_system_panel/locale/English.php";
}

if(iMEMBER && isset($lookup) && isset($removebuddy)){
dbquery("DELETE FROM ".$db_prefix."buddy WHERE buddy_user_id='".$userdata[user_id]."' AND buddy_buddy_id='".$lookup."'");
}

b) Search for :

</form>\n";
closetable();

Add directly under the following :

opentable($locale['BUD100']);
$result=dbquery(
"SELECT user_id,user_name FROM ".$db_prefix."buddy JOIN ".$db_prefix."users ON buddy_buddy_id=user_id ".
"WHERE buddy_user_id='".$userdata[user_id]."' ORDER BY user_name ASC" );
if(dbrows($result)!=0){
echo "<table align='center' cellpadding='0' cellspacing='0'>";

while($data=dbarray($result)){
echo "<tr>
<td class='small' align='left'><a href='".BASEDIR."profile.php?lookup=".$data['user_id']."'>".$data['user_name']." </a></td>
<td class='small' align='right'> [ <a href='".BASEDIR."edit_profile.php?lookup=".$data['user_id']."&removebuddy'>".$locale['BUD105']."</a> ]</td></tr>";
}

echo "</table>";
} else {
echo "<center>".$locale['BUD103']."</center>";
}

echo "<br /><div align='center'><a href='".BASEDIR."members.php'>".$locale['BUD104']."</a></div>";
closetable();


4. Go to the Infusion Management in the Admin Panels and install the Infusion.

5. Go to the Panel Management and add a new Panel by choosing the File Name buddy_system_panel !
Dont forget to activate the new Panel.

Features
--------
* A complete Buddy List System (add and delete Buddy function)

