Mailer New Theme Sample Edits

From MontegoScriptsWiki
Jump to: navigation, search

Home>Mailer>New Installation>Core File Edits>themes/xxxxxx/theme.php

Given the vast number of *nuke-based forks and versions across all of these, we cannot possibly provide updates to all of them. In fact, the bulk of the updates will be based upon PHP-Nuke 7.6 just like the instructions for new installations. However, where possible, a few RavenNukeā„¢ specific notes will be added as helpful hints along the way.

There are too many themes out there to know exactly how each formats their mail headers / etc. Usually the only mailing that is done from themes is in function themeheader() and is used to send to a banner client when their number of impressions have been reached (thus, their banners will no longer be shown).

Here is a sample "template" of a change, this one taken from the "fisubice" theme:

Open File

Open the following file to edit:

themes/YourTheme/theme.php

Modify Ad "Impressions Reached" Mail Send Code If Exists in Theme

FIND THIS CODE BLOCK USUALLY WITHIN FUNCTION themeheader():

mail($to, $subject, $message, "From: $from\nX-Mailer: PHP/" . phpversion());

REPLACE WITH (MINIMUM REPLACEMENT):

/*
 * TegoNuke(tm) Mailer
 */
$mailsuccess = false;
if (TNML_IS_ACTIVE) {
  $mailsuccess = tnml_fMailer($to, $subject, $message, $from, '');
} else {
  $mailsuccess = mail($to, $subject, $message, "From: $from\r\nX-Mailer: PHP/" . phpversion());
}
//mail($to, $subject, $message, "From: $from\nX-Mailer: PHP/" . phpversion());;
/*
 * end of TegoNuke(tm) Mailer add
 */
Personal tools