Werbebanner im Theme einbauen

Es müssen ein paar kleine Änderungen an der header.html, theme.php und banner.php vornehmen:

header.html:

<tr>
<td>
<img>
<a><img></a></td>
<td>
$showbanners
</td>
<td><IMG></td>
<td><img>

theme.php

function themeheader() {
global $user, $banners, $sitename, $slogan, $cookie, $prefix, $dbi, $showbanners;
cookiedecode($user);
$username = $cookie[1];
if ($username == "") {
$username = "Anonymous";
}
echo "<body>";
if ($banners == 1) {
include("banners.php");
}
$tmpl_file = "themes/NukeNews/header.html";
$thefile = implode("", file($tmpl_file));
$thefile = addslashes($thefile);
$thefile = "\$r_file=\"".$thefile."\";";
eval($thefile);
print $r_file;
blocks(left);
$tmpl_file = "themes/NukeNews/left_center.html";
$thefile = implode("", file($tmpl_file));
$thefile = addslashes($thefile);
$thefile = "\$r_file=\"".$thefile."\";";
eval($thefile);
print $r_file;
}

banners.php

function viewbanner() {
global $prefix, $db, $admin, $sitename, $adminmail, $nukeurl, $showbanners;
$numrows = $db->sql_numrows($db->sql_query("SELECT * FROM " . $prefix . "_banner WHERE type='0' AND active='1'"));

(der restliche Code der Funktion)

}
// echo "<center><a><img></a></center>";
$showbanners = "<center><a><img></a></center>";
}
}
Share and Enjoy:
  • Print
  • Digg
  • del.icio.us
  • Facebook
  • Mixx
  • Google Bookmarks
  • Blogplay
  • PDF
  • Twitter

This entry was posted in PHPNuke, RavenNuke and tagged , , , , , , , , , , . Bookmark the permalink.

Hinterlasse eine Antwort

Deine E-Mail-Adresse wird nicht veröffentlicht. Erforderliche Felder sind markiert *

*

Du kannst folgende HTML-Tags benutzen: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>