Mailer New Banners Edits

From MontegoScriptsWiki
Jump to: navigation, search

Home>Mailer>New Installation>Core File Edits>banners.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.

Here are the required edits for this script:

Open File

Open the following script:

modules/banners.php

Modify viewbanner() Function

FIND THIS CODE BLOCK WITHIN FUNCTION viewbanner():

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

REPLACE WITH:

/*
 * TegoNuke(tm) Mailer
 */
$mailsuccess = false;
if (TNML_IS_ACTIVE) {
    $to2 = array(array($c_email, $c_contact));
    $mailsuccess = tnml_fMailer($to2, $subject, $message, $adminmail, $sitename);
} 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
 */

Modify EmailStats() Function

FIND THIS CODE BLOCK WITHIN FUNCTION EmailStats():

$subject = "Your Banner Statistics at " . $sitename . "";
$message = "Following are the complete stats for your advertising investment at $sitename:\n\n\nClient Name: $name\nBanner ID: $bid\nBanner Image: $imageurl\nBanner URL: $clickurl\n\nImpressions Purchased: $imptotal\nImpressions Made: $impmade\nImpressions Left: $left\nClicks Received: $clicks\nClicks Percent: $percent%\n\n\nReport Generated on: $fecha";
$from = "$sitename";
mail($email, $subject, $message, "From: $from\nX-Mailer: PHP/" . phpversion());

REPLACE WITH:

/*
 * TegoNuke(tm) Mailer
 */
global $sitename, $adminmail;
$subject = "Your Banner Statistics at " . $sitename . "";
$message = "Following are the complete stats for your advertising investment at $sitename:\n\n\nClient Name: $name\nBanner ID: $bid\nBanner Image: $imageurl\nBanner URL: $clickurl\n\nImpressions Purchased: $imptotal\nImpressions Made: $impmade\nImpressions Left: $left\nClicks Received: $clicks\nClicks Percent: $percent%\n\n\nReport Generated on: $fecha";
$from = "$sitename <$adminmail>";
$mailsuccess = false;
if (TNML_IS_ACTIVE) {
    $to = array(array($email, $name));
    $mailsuccess = tnml_fMailer($to, $subject, $message, $adminmail, $sitename);
} else {
    $mailsuccess = mail($email, $subject, $message, "From: $from\r\nX-Mailer: PHP/" . phpversion());
}
//mail($email, $subject, $message, "From: $from\nX-Mailer: PHP/" . phpversion());
/*
 * end of TegoNuke(tm) Mailer add
 */
Personal tools