How can I hide the sidebloc if certain modules are selected?

  Post new topicReply to topicPrintable Version
<< View previous topic View next topic >>
Share: Del.icio.us  Digg  Google  Spurl  Blink  Furl  Y! MyWeb  
#1   How can I hide the sidebloc if certain modules are selected?
Jazzy
CZ Super Newbie
Jazzy has been a member for over 20 year's 20 Year Member
Status: Offline
Joined: Sep 25, 2004
0.01 posts per day
Posts: 64
Points: 3,820
   
I am using the Sand_Journey theme that came with PHPNUKE. The problem is when certain modules are active, it does'nt look right.

I would like to hide the sideblocks certain modules are selected.

Here is the code I tried...

//Hiding left sideblock for these modules listed below:
if (($name=='Forums') OR ($name=='Private_Messages') OR ($name=='Gallery') OR ($name=='Members_List')) {
} else {
blocks('left');
}
echo "<td><img src=\"themes/Sand_Journey/images/spacer.gif\" width=\"4\" height=\"1\" border=\"0\" alt=\"\"></td>\n"
."<td align=\"center\" valign=\"top\" width=\"100%\" border=\"0\" cellspacing=\"1\" cellpadding=\"0\">\n";
if ($index == 1) {
blocks('centre');
}
}

The problem is I don't know where in the code to put it. When I try it I lose my center and right blocks.

Any suggestions?



Back to top Reply with quote
#2   re: How can I hide the sidebloc if certain modules are selec
Taut
PayPal Donation
CZ Revered Member
 Codezwiz Site Donator
usa.gif california.gif
Occupation: Entrepreneur
Gender: Female
Fav. Sports Team: SF Giants
Status: Offline
Joined: May 27, 2003
0.71 posts per day
Posts: 5530
Points: 481,695
   
You can try this [ Register or login to view links on this board. ]
or Telli has released the Hide Side blocks mod. It's in the download section



Back to top Reply with quote
#3   re: How can I hide the sidebloc if certain modules are selec
Jazzy
CZ Super Newbie
Jazzy has been a member for over 20 year's 20 Year Member
Status: Offline
Joined: Sep 25, 2004
0.01 posts per day
Posts: 64
Points: 3,820
   
Thank you! The code worked great!



Back to top Reply with quote
Display posts from previous:      
Add To: Del.icio.us  Digg  Google  Spurl  Blink  Furl  Y! MyWeb  
<< View previous topic View next topic >>
Post new topicReply to topic

Jump to 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum