
| Tutorials Main Latest Tutorials Popular Tutorials Top Rated Tutorials |
| Login to See your Favorite Tutorials |
| Description: This tutorial will show you how to have diffrent left/right blocks in your theme. | |
| Version: 1.0 | |
| Added on: 30 May 2006 | |
| Author: Admin | |
| Difficulty Level: Intermediate | |
| Views: 738 | |
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.
| Code: |
| blocks(left); |
| Code: |
| global $swapleftright;
$swapleftright = "1"; blocks(left); $swapleftright = "0"; |
| Code: |
| 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; } |
| Code: |
| function themesidebox($title, $content) {
global $swapleftright; 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; } |