HomeUnityBlogs
 
 
405ideas

DOLPHIN: Befriend Notification

Here is another fix... 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. Around line 119 find:
    $ret = _t_action('_User was invited to friend list');
  5. 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
  6. You are done!

Please comment if you find this post useful. 

P.S. I have also written an SMTP mod for sendMail function that allows to do authenticated emailing among other things.  This is especially usefull for people who's mail() function is not working. Please comment if you are interested.

 

bad
3
good
 
 

Comments

melia
melia(positive) 41 days agocomment permalink
 
Thanks for this mod!
 
bad
0
good
 
 
zak2008
zak2008 40 days agocomment permalink
 
fyi...received db error when tested. I have 6.1.3
 
bad
0
good
 
 
Synergy
Synergy 40 days agocomment permalink
 
I received a database error also.
 
bad
0
good
 
 
Stuart038
Stuart038(positive) 40 days agocomment permalink
 
Nice one - Which Dolphin version is this for?
 
bad
0
good
 
 
Punkis
Punkis(negative) 29 days agocomment permalink
 
no you are not done. database error
 
bad
0
good
 
 
Whitt
Whitt 6 days agocomment permalink
 
If you're getting a Database Error in Dolphin 6.1.4

Error: Database 'profiles' doesn't exist

Please change to 'Profiles'
 
bad
0
good
 
 


Post a Comment

Please login to post a comment.

This Post
 
 
405ideas Blog
All Blogs
Found a bug? Have a suggestion? We really value your feedback!
 
© 2008 BoonEx Ltd
ABN 27 127 966 581
 
PET:0.608743906021