I know not everyone wants those boring blocks on both sides of their phpnuke themes. I am here to save the day :) This tutorial will show you how to have different block for the right and left blocks.
Steps :
This is strictly theme based so all editing will be inside the theme's folder. First you need to create two block files. One for the right [rblocks.html] and the other for the left [lblocks.html].
So you now have your cool blocks, it's time to tell nuke that the right block should be shown on the right and the left blocks to show on the left. Don't worry, it's actually very simple.
Open themes/YOUR_THEME/themes.php and search for the following line of codes.
<?
blocks(left);
?>
Change it to:
<?
global $swapleftright;
$swapleftright = "1";
blocks(left);
$swapleftright = "0";
?>
Find your side block function which is usually at the bottom of the php file. It should look similar to the following:
<?
function themesidebox($title, $content) {
$tmpl_file = "themes/themename/blocks.html";
$thefile = implode("", file($tmpl_file));
$thefile = addslashes($thefile);
$thefile = "\$r_file=\"".$thefile."\";";
eval($thefile);
print $r_file;
}
?>
Replace the entire function with this one:
<?
function themesidebox($title, $content) {
global $swapleftright, $bgcolor1, $bgcolor2;
if ($swapleftright=="0") {
$tmpl_file = "themes/themename/rblocks.html"; //link to the right block
} else {
$tmpl_file = "themes/themename/lblocks.html"; //Link to the left block
}
$thefile = implode("", file($tmpl_file));
$thefile = addslashes($thefile);
$thefile = "\$r_file=\"".$thefile."\";";
eval($thefile);
print $r_file;
}
?>
That's it. Save your file and you should now have different blocks on either side of your phpnuke portal. Visit the forums for more help ..