Mailer New Advertising Edits

From MontegoScriptsWiki
Jump to: navigation, search

Home>Mailer>New Installation>Core File Edits>modules/Advertising/index.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.

These instructions were originally written for RavenNukeā„¢ 2.30.00 and above installations where the Advertising module was brought into the system. It is possible that these edits are close enough to a stock PHP-Nuke Advertising module that came after 7.6 (cannot recall exactly when the Advertising module was added to PHP-Nuke), but you may still need to reconcile your edits as such.

Open File

Open the following script:

modules/Advertising/index.php

Modify How Ad Statistics Are Sent

FIND THIS CODE BLOCK HERE:

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

REPLACE WITH:

$from = "$adminmail"; // montego: was not providing a valid "from" email address before, so changed
/*
 * TegoNuke(tm) Mailer
 */
$mailsuccess = false;
if (TNML_IS_ACTIVE) {
    $to = array(array($email, $name));
    $mailsuccess = tnml_fMailer($to, $subject, $message, $from, $sitename);
} else {
    $mailsuccess = mail($email, $subject, $message, "From: $sitename <$from>\r\nX-Mailer: PHP/" . phpversion());
}
if ($mailsuccess) {
    echo "<center><br />"
        . "<b>"._STATSSENT." $email</b><br />"
        . _GOBACK;
} else {
    echo '<center><br />'._STATSSENTERROR.'<br /><br />'."\n"
        . _GOBACK;
}
//            mail($email, $subject, $message, "From: $from\r\nX-Mailer: PHP/" . phpversion());
/*
 * end of TegoNuke(tm) Mailer add
 */
Personal tools