We are going to edit HTML/mainfile.php.
We are looking for a function called "blockfileinc".
Here is what it looks like:
function blockfileinc($title, $blockfile, $side=0) {
$blockfiletitle = $title;
$file = @file("blocks/".$blockfile."");
if (!$file) {
$content = _BLOCKPROBLEM;
} else {
include("blocks/".$blockfile."");
}
if ($content == "") {
$content = _BLOCKPROBLEM2;
}
if ($side == 1) {
themecenterbox($blockfiletitle, $content);
} elseif ($side == 2) {
themecenterbox($blockfiletitle, $content);
} else {
themesidebox($blockfiletitle, $content);
}
}
|
Change it to this:
function blockfileinc($title, $blockfile, $side=0) {
$blockfiletitle = $title;
$file = @file("blocks/".$blockfile."");
if (!$file) {
$content = _BLOCKPROBLEM;
} else {
include("blocks/".$blockfile."");
}
if ($content == "") {
$content = _BLOCKPROBLEM2;
}
if ($side == 1) {
themecenterbox($blockfiletitle, $content);
} elseif ($side == 2) {
themecenterbox($blockfiletitle, $content);
} elseif ($side == 3) {
themesidebox2($blockfiletitle, $content);
} else {
themesidebox($blockfiletitle, $content);
}
}
|
The result is we will call our new themesidebox2 function ONLY if $side = 3.
Since no other script sets $side=3, this function will currently never be called.
Save the file to your site, and test.
(make sure you have selected the right theme in Your Account!)
You still should see no changes or errors! That's good.
|
PHP-Nuke Docs module made by Chris Karakas pages added by AnOldMan |








