Here is another fix with some corrections on the first... To generate
an email notification when a user attempts to befriend another user:
1. Open /list_pop.php file
2. Around line 23 find:
require_once( BX_DIRECTORY_PATH_INC . 'profiles.inc.php' );
3. AFTER add the following:
require_once( BX_DIRECTORY_PATH_INC . 'utils.inc.php' ); // 405Mod - Friend Request Notify
4. in this function (around line 98)
function PageListFriend($sourceID, $targetID)
{
$ret = '';....
add this line below $ret = ''; :
global $site;
5. Around line 119 find:
$ret = _t_action('_User was invited to friend list');
6. AFTER add the following:
// 405Mod - Friend Request Notify
$query = "SELECT * FROM `Profiles` WHERE `ID` = '$targetID'";
$temp = db_assoc_arr($query);
if( $targetID == $temp['ID'] ) {
$message = "Dear " . $temp['NickName'] . ",\r\n\r\n".getNickName(
$sourceID ) . " has requested to become your friend.\r\n\r\n"."To view
this request please
visit:\r\n".$site['url']."contacts.php?show=friends_inv&list=me\r\n\r\nSincerely,\r\n".$site['title']."
Team";
sendMail( $temp['Email'], "Friendship Request", $message );
}
// end mod
7. You are done!
now the database error's will be gone in version 6.1.1 and above.
Further more now the $site['url'] and $site['title'] will actually
print something in the mail sent to the invitee.
Hope this is usefull.
For more questions don't hesitate to contact me at
http://www.netmuzz.com/jurgen
Also no database errors whatsoever.
Probably one of the best and easiest to install mods!