Premium Membership
Subscription graphics design php html youtube
Gold Subscription with Silver access
graphics design php html youtube
Live Support
Contact us by live help [photoshop, website design, tutorials]
Not available on weekends
Different blocks for phpnuke theme


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 ..

 



Advertisement





New Subscribers



Subscriber

CubanoSiempre

Platinum Subscribers

#1
Subscriber

chefjustinh

Silver Subscribers

#2
Subscriber

ballistique

Silver Subscribers

#3
Subscriber

xplan

Silver Subscribers

#4
Subscriber

kenno

Ultimate Subscriber

#5




Our Sponsors



Free e Cards of holidays, cute animals, nature and more
Advertise with Western Studios.net
Custom jobs at low cost, free lancers and service buyers.
PHP Nuke themes, stock photos, icons, drupal themes and more.


Downloads



Latest in downloads

Most downloaded


Jobs





Community

Western Studios is an award winning website creating website disign and professional php scripts.

Associated Sites

Marketplace Themes, scripts, icons and images

Themes site PHP Nuke themes preview site.