hide blocks left on Christmas Theme

  Post new topicReply to topicPrintable Version
<< View previous topic View next topic >>
Share: Del.icio.us  Digg  Google  Spurl  Blink  Furl  Y! MyWeb  
#1   hide blocks left on Christmas Theme
Cohin
CZ Newbie
Cohin has been a member for over 20 year's 20 Year Member
Status: Offline
Joined: Mar 18, 2004
0.00 posts per day
Posts: 12
Points: 1,525
   
Hello everyone ! I tried the good old




print $r_file;
if ($name=='Gallery') {
/* Don't display it. */
}
else
if ($name=='Content') {
/* Don't display it. */
}
else
if ($name=='Forums') {
/* Don't display it. */
}
else
if ($name=='Members_List') {
/* Don't display it. */
}
else
if ($name=='Private_Messages') {
/* Don't display it. */
}
else {
blocks(left);
}



...on theme.php BUT, my blocks left still show. as you might want to see on [ Register or login to view links on this board. ]

Any advise?



Back to top Reply with quote
#2   re: hide blocks left on Christmas Theme
echo
CZ Wiz
 Codezwiz Site Donator
Gender: Male
Status: Offline
Joined: Oct 04, 2003
0.15 posts per day
Posts: 1147
Points: 93
   
Here's a nice mod to hide blocks, it's called: CZHide-Blocks V1 and here's the link:
[ Register or login to view links on this board. ]



Back to top Reply with quote
#3   re: hide blocks left on Christmas Theme
Cohin
CZ Newbie
Cohin has been a member for over 20 year's 20 Year Member
Status: Offline
Joined: Mar 18, 2004
0.00 posts per day
Posts: 12
Points: 1,525
   
Thank you for your repply. I did try it but it did no match my php-nuke 7.5 Particularly the admin/modules/modules.php file is different and has some $row= things there.. I could not get it to work..



Back to top Reply with quote
#4   re: hide blocks left on Christmas Theme
CurtisH
CZ Active Member
 Codezwiz Site Donator
CurtisH has been a member for over 20 year's 20 Year Member
usa.gif texas.gif
Gender: Male
Status: Offline
Joined: Jun 14, 2004
0.02 posts per day
Posts: 112
Points: 5,900
AIM Address Yahoo Messenger  
Deleted by author




_________________
PHP-Nuke and ALL software and/or themes coded to be used with PHP-Nuke are GPL and are FREE to redistribute regardless of what an author may claim.
Back to top Reply with quote
#5   re: hide blocks left on Christmas Theme
echo
CZ Wiz
 Codezwiz Site Donator
Gender: Male
Status: Offline
Joined: Oct 04, 2003
0.15 posts per day
Posts: 1147
Points: 93
   
Have you tried this format:
if ($name=='Forums' || $name=='Members_List' || $name=='Private_Messages') {
  /* Don't display it. */
} else {
  blocks(left);
}



Also make sure you add $name to the list of global variables in themeheader()

global $user, $banners, $sitename, $slogan, $cookie, $prefix, $dbi, $name;



Back to top Reply with quote
#6   re: hide blocks left on Christmas Theme
Cohin
CZ Newbie
Cohin has been a member for over 20 year's 20 Year Member
Status: Offline
Joined: Mar 18, 2004
0.00 posts per day
Posts: 12
Points: 1,525
   
Thank you for the code. It gives me an error on the line next to the code you listed.

Back to the "CZhideblocks" script issue, Instructions call for us to find




$row = $db->sql_fetchrow($db->sql_query("SELECT title, custom_title, view, inmenu, mod_group from " . $prefix . "_modules where mid='$mid'"));



and modules.ph shows



list($main_module) = sql_fetch_row($main_m, $dbi);
$result = sql_query("select title, custom_title, view, inmenu, mcid from ".$prefix."_modules where mid='$mid'", $dbi);
list($title, $custom_title, $view, $inmenu, $mcid) = sql_fetch_row($result, $dbi);



The closest it comes to the above. Now, we suppose to replace with




$row = $db->sql_fetchrow($db->sql_query("SELECT * from " . $prefix . "_modules where mid='$mid'"));



So, instructions do not match the code on php-nuke 7.5. can this be fixed? am I missing something?



Back to top Reply with quote
#7   
Telli
Site Admin
Occupation: Self Employed
Age: 46
Gender: Male
Fav. Sports Team: Detroit Red Wings
Website:
Status: Offline
Joined: May 26, 2003
1.03 posts per day
Posts: 8089
Points: 494,430
   
For yours make it:


list($main_module) = sql_fetch_row($main_m, $dbi);
$result = sql_query("select title, custom_title, view, inmenu, mcid, hideleft, hideright from ".$prefix."_modules where mid='$mid'", $dbi);
list($title, $custom_title, $view, $inmenu, $mcid, $hideleft, $hideright) = sql_fetch_row($result, $dbi);




_________________
The path of the righteous man is beset on all sides by the inequities of the selfish and the tyranny of evil men. Blessed is he, who in the name of charity and good will, shepherds the weak through the valley of darkness, for he is truly his brother's keeper and the finder of lost children. And I will strike down upon thee with great vengeance and furious anger those who would attempt to poison and destroy my brothers. And you will know my name is the Lord when I lay my vengeance upon thee. Ezekiel 25:17
Back to top Reply with quote
#8   re: hide blocks left on Christmas Theme
Cohin
CZ Newbie
Cohin has been a member for over 20 year's 20 Year Member
Status: Offline
Joined: Mar 18, 2004
0.00 posts per day
Posts: 12
Points: 1,525
   
Well we began talking about the blocks left and why these blocks refused to hide. I found the answer and was only due to the missing
$name
fuinction. So far those of you who might have the problem



Don't forget to add $name to the list of global variables in themeheader

More info acan be found at


http://phpnuke.org/modules.php?name=PHP-Nuke_HOWTO&page=hide-left-blocks.html


Thank you for your help.]


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