Dec
5
2007

Send eMail Notification When Inviting Friends - Version 6.0.0003

I'm surprised Dolphin doesn't come with this feature already!

What this MOD does is it sends out an email notification to the member who has been invited as a friend by another member. Without an email notification, the only other way a member knows that a friend request has come in is by logging to his/her account. Using this MOD will notify the invited member right away by email to approve or reject a friend request, and will drive existing member traffic back to your site and hopefully click on your Adsense Ads ;)

Anyway, here is the MOD on how to do it.  You may download the code here:  email-notification-for-friend-invites.zip

Backup /list_pop.php before doing anything, in case you screw things up like you always do

Open /list_pop.php and find:

Line 90: function PageListFriend($sourceID, $targetID)
Line 91: {

On line 92, insert this code:

global $site; // this makes site-wide variables available for this function

Then, find:

Line 114: else
Line 115: {
Line 116: $query = "INSERT INTO `FriendList` SET `ID` = '$sourceID', `Profile` = '$targetID', `Check` = '0′;";
Line 117: if( db_res( $query ) )
Line 118: {
Line 119: $ret = _t_action('_User was invited to friend list');

The line number could be off because you have inserted another line of code from above step. But the most important thing is that you find a code block that looks like line 114 - line 119.

On line 120, insert the following code:

$recipient = getProfileInfo( $targetID );
$aReporter = getProfileInfo( $sourceID );
$rnickname = $recipient['NickName'];
$nickname = $aReporter['NickName'];
$message ="
Hi {$rnickname},

You have received a new friend request at {$site['title']}!
from {$nickname}.

You may login to your account at

{$site['url']}member.php

and approve or reject this friend request.


{$site['title']} mail delivery system

Auto-generated e-mail, please, do not reply
";
$subject = "You Have A New Friend Request!";
sendMail( $recipient['Email'], $subject, $message );

That should do it!

I would appreciate your rating on Expertzzz.com:

http://www.expertzzz.com/Downloadz/view/1512

Be sure to subscribe to my blog feed if you want more MODs in the future!

3 Responses so far

  1. Paul Enderson December 5, 2007 7:45 am

    Bloody superb! You have no idea how grateful I am for this mod! :D
    What I would love to see is notifications for everything - comments on a user's profile, replies to comments that user's have left, comments on uploaded media. Everything..! Facebook does this, and it draws people back to the site over and over again!

    Would you like to make this happen for me? I'm happy to pay for it if you would prefer to do it that way? Drop me an email!

  2. Andrew June 27, 2008 12:35 pm

    You rock! Thanks very much for this valuable addition!

  3. Shmulik July 11, 2008 9:42 pm

    THANK YOU !!!!

Leave a Comment

Name (required)

Email (required)

Website

Comments



You haven't activated the Flickr plugin.
If You don't have it installed
You can
Download the Flickr Plugin
from here

Recent Flickr Photo

2008 (c) InfinityScript.com - theme by ReviewSaurus