Befriend notifications in Dolphin 6.1.1 and above

netmuzz posted 6th of February 2009 in Community Voice. 1 comment.

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

 
Comments
·Oldest
·Top
Please login to post a comment.
cosmobc
Thanks! works great!!!! =D

Also no database errors whatsoever.
Probably one of the best and easiest to install mods!
 
 
Below is the legacy version of the Boonex site, maintained for Dolphin.Pro 7.x support.
The new Dolphin solution is powered by UNA Community Management System.
PET:0.05771803855896