Fatal error: Out of memory (allocated 3145728) (tried to allocate 40398 bytes) in st['postid'] = $postid; $pagetext = $mainpost['pagetext']; $threadinfo['replycount'] = $threadinfo['replycount']+1; if ($mainpost['title']) { $title = $mainpost['title']; } else { $title = $threadinfo['title']; } $evalemailplain = array(); $evalemailhtml = array(); while ($touser = $vbulletin->db->fetch_array($useremails)) { if (!($vbulletin->usergroupcache["$touser[usergroupid]"]['genericoptions'] & $vbulletin->bf_ugp_genericoptions['isnotbannedgroup'])) { continue; } // Checks this user's usergroup against the list of allowable usergroupids that can use this feature $forumusergroupids = explode(",", $foruminfo['ei_usergroups']); if (!is_member_of($touser, $forumusergroupids)) { continue; } // Checks if the user to be emailed is the same as the poster and if they do not want to get their own posts via email if (($touser['userid'] == $mainpost['userid']) AND !$touser['ei_own_posts']) { continue; } else if (in_array($touser['email'], $mod_emails)) { // this user already received an email about this post via // a new post email for mods -- don't send another continue; } $touser['username'] = unhtmlspecialchars($touser['username']); $touser['languageid'] = iif($touser['languageid'] == 0, $vbulletin->options['languageid'], $touser['languageid']); $touser['auth'] = md5($touser['userid'] . $touser['subscribethreadid'] . $touser['salt'] . COOKIE_SALT); if (empty($evalemailplain)) { if ($vbulletin->options['ei_email_layout']) { $email_texts = $vbulletin->db->query_read(" SELECT text, languageid, fieldname FROM " . TABLE_PREFIX . "phrase WHERE fieldname IN ('emailsubject', 'emailbody') AND varname = 'ei_notify_post_plain_old' "); } else { $email_texts = $vbulletin->db->query_read(" SELECT text, languageid, fieldname FROM " . TABLE_PREFIX . "phrase WHERE fieldname IN ('emailsubject', 'emailbody') AND varname = 'ei_notify_post_plain' "); } while ($email_text = $vbulletin->db->fetch_array($email_texts)) { $emails["$email_text[languageid]"]["$email_text[fieldname]"] = $email_text['text']; } // for replace_template_variables() require_once(DIR . '/includes/functions_misc.php'); foreach ($emails AS $languageid => $email_text) { // lets cycle through our array of notify phrases $text_message = str_replace("\\'", "'", addslashes(iif(empty($email_text['emailbody']), $emails['-1']['emailbody'], $email_text['emailbody']))); $text_message = replace_template_variables($text_message); $text_subject = str_replace("\\'", "'", addslashes(iif(empty($email_text['emailsubject']), $emails['-1']['emailsubject'], $email_text['emailsubject']))); $text_subject = replace_template_variables($text_subject); $evalemailplain["$languageid"] = ' $message = "' . $text_message . '"; $subject = "' . $text_subject . '"; '; } } if (empty($evalemailhtml)) { $emaillinks = ""; if ($vbulletin->options['ei_email_footer']) { if ($vbulletin->options['ei_email_homepage']) { $emaillinks .= construct_phrase($vbphrase['ei_links_homepage'], $vbulletin->options['homeurl']); } if ($vbulletin->options['ei_email_forums']) { if ($emaillinks) { $emaillinks .= " | "; } $emaillinks .= construct_phrase($vbphrase['ei_links_forums'], $vbulletin->options['bburl']); } if ($vbulletin->options['ei_email_calendar']) { if ($emaillinks) { $emaillinks .= " | "; } $emaillinks .= construct_phrase($vbphrase['ei_links_calendar'], $vbulletin->options['bburl']); } if ($vbulletin->options['ei_email_memberlist']) { if ($emaillinks) { $emaillinks .= " | "; } $emaillinks .= construct_phrase($vbphrase['ei_links_memberlist'], $vbulletin->options['bburl']); } if ($vbulletin->options['ei_email_search']) { if ($emaillinks) { $emaillinks .= " | "; } $emaillinks .= construct_phrase($vbphrase['ei_links_search'], $vbulletin->options['bburl']); } if ($emaillinks) { $emaillinks = $vbphrase['ei_links_start'] . $emaillinks . $vbphrase['ei_links_end']; } } if ($vbulletin->options['ei_email_layout']) { $email_texts = $vbulletin->db->query_read(" SELECT text, languageid, fieldname FROM " . TABLE_PREFIX . "phrase WHERE fieldname IN ('emailsubject', 'emailbody') AND varname = 'ei_notify_post_html_old' "); } else { $email_texts = $vbulletin->db->query_read(" SELECT text, languageid, fieldname FROM " . TABLE_PREFIX . "phrase WHERE fieldname IN ('emailsubject', 'emailbody') AND varname = 'ei_notify_post_html' "); } while ($email_text = $vbulletin->db->fetch_array($email_texts)) { $emails["$email_text[languageid]"]["$email_text[fieldname]"] = $email_text['text']; } // for replace_template_variables() require_once(DIR . '/includes/functions_misc.php'); foreach ($emails AS $languageid => $email_text) { // lets cycle through our array of notify phrases $text_message = str_replace("\\'", "'", addslashes(iif(empty($email_text['emailbody']), $emails['-1']['emailbody'], $email_text['emailbody']))); $text_message = replace_template_variables($text_message); $text_subject = str_replace("\\'", "'", addslashes(iif(empty($email_text['emailsubject']), $emails['-1']['emailsubject'], $email_text['emailsubject']))); $text_subject = replace_template_variables($text_subject); $evalemailhtml["$languageid"] = ' $message = "' . $text_message . '"; $subject = "' . $text_subject . '"; '; } } $threadid = $threadinfo['threadid']; $eirefs = ''; if($threadinfo['firstpostid'] != $postid) { $eiparentpostid = $mainpost['parentid']; $eirootpostid = $threadinfo['firstpostid']; $eirefs = "<$threadid.$eirootpostid@emailintegration> <$threadid.$eiparentpostid@emailintegration>"; } if ((!$vbulletin->options['ei_format_allow_user'] AND $vbulletin->options['ei_format_forced']) OR ($vbulletin->options['ei_format_allow_user'] AND $touser['ei_format'])) { if ($vbulletin->options['ei_email_layout']) { eval(iif(empty($evalemailhtml["$touser[languageid]"]), $evalemailhtml["-1"], $evalemailhtml["$touser[languageid]"])); if(preg_match('#(.*
)(.*)(
\s*
)(.*)(
\s*
.*)#is', $message, $messageparts)) { $message = $messageparts[1] . $parser->do_parse($messageparts[2], 1, 1, 1, 1, 1, 0) . $messageparts[3] . $parser->do_parse($messageparts[4], 1, 1, 1, 1, 1, 0) . $messageparts[5]; } else { $message = $parser->do_parse($message, 1, 1, 1, 1, 1, 0); } } else { eval(iif(empty($evalemailhtml["$touser[languageid]"]), $evalemailhtml["-1"], $evalemailhtml["$touser[languageid]"])); if(preg_match('#(.*
)(.*)(
\s*
)(.*)(
\s*
.*)#is', $message, $messageparts)) { $message = $messageparts[1] . $parser->do_parse($messageparts[2], 1, 1, 1, 1, 1, 0) . $messageparts[3] . $parser->do_parse($messageparts[4], 1, 1, 1, 1, 1, 0) . $messageparts[5]; } else { $message = $parser->do_parse($message, 1, 1, 1, 1, 1, 0); } } if (!$threadid) { $threadid = $newpost['threadid']; } } else { eval(iif(empty($evalemailplain["$touser[languageid]"]), $evalemailplain["-1"], $evalemailplain["$touser[languageid]"])); $plaintext_parser->set_parsing_language($touser['languageid']); $message = $plaintext_parser->parse($message, $foruminfo['forumid']); if (!$threadid) { $threadid = $newpost['threadid']; } } $delimiter = stripcslashes($vbulletin->options['ei_header_newline']); $emailreturnaddress = $foruminfo['ei_replyaddress']; $eiusername = $vbulletin->userinfo['username']; $eiheaders = ''; $eiheaders .= 'Date: ' . date('r') . $delimiter; $eifromheader = 'From: '; if($vbulletin->options['ei_use_single_from_address']) { $eifromheader .= $vbulletin->options['ei_single_from_name'] . '<' . $vbulletin->options['ei_single_from_address'] .'>'; } else { $eifromheader .= "$eiusername <$emailreturnaddress>"; } $eiheaders .= $eifromheader . $delimiter; $eiheaders .= "Reply-To: $emailreturnaddress" . $delimiter; $eiheaders .= 'MIME-Version: 1.0' . $delimiter; if ((!$vbulletin->options['ei_format_allow_user'] AND $vbulletin->options['ei_format_forced']) OR ($vbulletin->options['ei_format_allow_user'] AND $touser['ei_format'])) { $eiheaders .= 'Content-Type: text/html' . iif($encoding, "; charset=\"$encoding\"") . $delimiter; } else { $eiheaders .= 'Content-Type: text/plain' . iif($encoding, "; charset=\"$encoding\"") . $delimiter; } $eiheaders .= 'Content-Transfer-Encoding: 8bit' . $delimiter; $eiheaders .= "Message-Id: <$threadid.$postid@emailintegration>" . $delimiter; if($eirefs) { $eiheaders .= 'References: ' . $eirefs . $delimiter; } $eiheaders .= 'X-Priority: 3' . $delimiter; $eiheaders .= 'X-Mailer: vBulletin Mail via PHP'; vbmail($touser['email'], $subject, $message, false, '', $eiheaders); } unset($parser, $useremails, $touser); } on line 82