For those annoying members that don't want to upload an avatar, I have created the following mod that emails them every 2 days to remind them they haven't uploaded an avatar.
Run the following 2 sql queries to add information to your database
INSERT INTO `sys_cron_jobs` (`name`, `time`, `class`, `file`, `eval`) VALUES ('avatar_upload_reminder', '0 1 * * *', '', '', '$iPeriod = $GLOBALS[''MySQL'']->getParam(''remind_avatar_period''); \n$aProfilesAvatar = $GLOBALS[''MySQL'']->getAll("SELECT `ID` FROM `Profiles` WHERE `Avatar` = ''0'' AND (TO_DAYS(NOW()) - TO_DAYS(`DateReg`)) % {$iPeriod} = 0"); foreach ($aProfilesAvatar as $aProfile) avatar_mail($aProfile[''ID''], 0);
INSERT INTO `sys_email_templates` (`Name`, `Subject`, `Body`, `Desc`, `LangID`) VALUES ('t_AvatarReminder', 'Missing Avatar', '<html><head></head><body style="font: 12px Verdana; color:#000000">
<p><b>Dear <RealName></b>,</p>);
INSERT INTO `sys_options` (`Name`, `VALUE`, `kateg`, `desc`, `Type`, `check`, `err_text`, `order_in_kateg`, `AvailableValues`) VALUES
('remind_avatar_period', '2', 15, 'Time period for sending reminders about no Avatar (in days)', 'digit', '', '', 28, '')
This is just a friendly reminder that you have not yet added an Avatar on <SiteName>.<br>\r\n
You can <ClickHere> to add your Avatar.<br><p>--</p>
<p style="font: bold 10px Verdana; color:red"><SiteName> mail delivery system!!!\r\n<br>
<br />Auto-generated e-mail, please, do not reply!!!</p></body></html><font size="4">\r\n', 'Avatar Missing', 0)
add this to inc/admin.inc
function avatar_mail( $ID, $text = 1 ) {
global $ret;
$ID = (int)$ID;
$p_arr = db_arr( "SELECT `Email`, 'NickName' FROM `Profiles` WHERE `ID` = '$ID'" );
if ( !$p_arr ) {
$ret['ErrorCode'] = 7;
return false;
}
$rEmailTemplate = new BxDolEmailTemplates();
$aTemplate = $rEmailTemplate -> getTemplate( 't_AvatarReminder' ) ;
$aPlus = array();
$recipient = $p_arr['Email'];
$aPlus['SiteName'] = $GLOBALS['site']['title'];
$aPlus['RealName'] = $p_arr['NickName'];
$aPlus['Subject'] = $aTemplate['Subject'];
$aPlus['ClickHere'] = '<a href="' .BX_DOL_URL_ROOT . 'm/avatar">Click Here</a>';
$aPlus['SiteLink'] = '<a href="' . BX_DOL_URL_ROOT . '">'. $GLOBALS['site']['title'] . '</a>';
$aPlus['Subject'] = $aTemplate['Subject'];
$mail_ret = sendMail( $recipient, $aTemplate['Subject'], $aTemplate['Body'], $ID, $aPlus, 'html', false, true );
return ($text) ? $page_text : true;
}
This will give you an option in your admin panel to control how many days it waits to email them.
if the SQL query gives you an error,check the syntax as I am headed out the door to go to my step dad's funeral, I just wanted to get this out here for you guys.