Krug-Markus.de

Werbebanner im Theme einbauen

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>";
}
}

Schreibe einen Kommentar