A
Anonymous
Guest
A friend was having an issue with his phpbb forum and the mass email. He sends stock information through the mass email to his select groups. Since his host was not in the same timezone, the emails did not reflect the accurate sending time. He asked me to make a timestamp and a footer for his emails.
What I came up with was to modify the admin/admin_mass_email.php file.
Find:
Make that section look like this:
The code pulls the timezone offset from the board settings and adjusts it from GMT time, then appends the $message varriable with whatever footer you like.
What I came up with was to modify the admin/admin_mass_email.php file.
Find:
Code:
//
// Do the job ...
//
if ( isset($HTTP_POST_VARS['submit']) )
{
$subject = stripslashes(trim($HTTP_POST_VARS['subject']));
$message = stripslashes(trim($HTTP_POST_VARS['message']));
$error = FALSE;
$error_msg = '';
Make that section look like this:
Code:
//
// Do the job ...
//
if ( isset($HTTP_POST_VARS['submit']) )
{
$subject = stripslashes(trim($HTTP_POST_VARS['subject']));
$message = stripslashes(trim($HTTP_POST_VARS['message']));
$sql = "SELECT *
FROM " . CONFIG_TABLE ." WHERE config_name='board_timezone'";
if(!$result = $db->sql_query($sql))
{
message_die(CRITICAL_ERROR, "Could not query config information in admin_board", "", __LINE__, __FILE__, $sql);
}
$row = mysql_fetch_array($result);
$offset = $row[config_value];
$stt = strtotime($offset." hours");
$sft = gmstrftime("%m-%d-%Y %H:%M",$stt);
$message .= "
Alert generated: $sft
- - - - - - - - - -
Footer message goes here.
";
$error = FALSE;
$error_msg = '';
The code pulls the timezone offset from the board settings and adjusts it from GMT time, then appends the $message varriable with whatever footer you like.