if ($name=='Forums') {
/* Don't display it. */
}
else {
blocks(left);
}
to add more modules to this in order to hide the blocks,
you would make the above code look something like the following:
Code:
if ($name=='Forums') {
/* Don't display it. */
}
else
if ($name=='Members_List') {
/* Don't display it. */
}
else
if ($name=='My_eGallery') {
/* Don't display it. */
}
else
if ($name=='Private_Messages') {
/* Don't display it. */
}
else {
blocks(left);
}
You will ALSO need to add $name to your global statement in theme.php like this
Code:
global $user, $banners, $sitename, $slogan, $cookie, $prefix, $dbi, $name;
WOW..now aint' that neat? That would hide the left blocks when viewing the Member List, Private messages, Forums and if you had a gallery module.
mikem
Last edited by mikem on Fri Sep 19, 2003 7:11 pm; edited 2 times in total
ArtificialIntel
Joined: Jan 31, 2004
Posts: -88
Posted:
Wed Jan 15, 2003 11:12 am
there's another way.
create a variable in theme.php called
Code:
$hideleft;
then edit the line in the previous post to look like:
Code:
if($hideleft == 1){
} else {
blocks(left);
}
any module you wish to hide the blocks in, just do this at the beginning of the module:
Code:
global $hideleft;
$hideleft =1;
ArtificialIntel
LeSnork Nuke Cadet
Joined: Jan 15, 2003
Posts: 5
Location: USA
Posted:
Wed Jan 15, 2003 1:17 pm
Well, I am truly new at this... but I tried both ways that was shown and I still have the Left Blocks showing.... I will admit that I am a absolute beginner with php and phpNuke, so I probably more dangerous than I look...
I currently have phpBB 2.0.3 on my main site @ http://www.tpclinks.com and I intend (hopefully) to port it over once we move to phpNuke version.
But for now I was just using the Magic Addon Ver2.0 to display the current messagebaord.
I would like to eliminate the Left block ONLY when the phpBB is being displayed.
Hoping someone has a quick and dirty (or clean) fix...
Code:
/********************************************************************/
/* Magic Addon 2.0 */
/* */
/* Copyright (c) 2002 by Francisco Burzi */
/* http://phpnuke.org */
/* */
/* php Magic Addon 1.0 - Copyright (c) 2002 by Charles Peyatt */
/* http://www.ez-webhosting.net */
/* if you need any help e-mail me webmaster@ez-webhosting.net */
/********************************************************************/
if (!eregi("modules.php", $PHP_SELF)) {
die ("You can't access this file directly...");
}
///////////////////////////////////////////////
$index = 0; // right side off
$magic = "TPC Forum";
include("header.php");
$height = 1500;
the 2nd way won't work wiht modules like the phpBB forum that have many many many files that contain pages that get called directly.
I don't see any reason why the 1st way doesn't work tho
ArtificialIntel
LeSnork Nuke Cadet
Joined: Jan 15, 2003
Posts: 5
Location: USA
Posted:
Wed Jan 15, 2003 1:27 pm
Okay.. thanks ArtificialIntel...
I'll go back and try mikem's version again... I'm probably screwing it up somewheres !!!
mikem Theme Guru
Joined: Jan 13, 2003
Posts: 1582
Location: Corn fields of Indiana
Posted:
Wed Jan 15, 2003 1:32 pm
Magic addon uses iframes. The above methods to hide your left blocks when using MaginAddon more than likely will not work.
You best bet is to continue with your development and get your phpBB standard Forums ported over to Tom's version of PHPBB.
mikem
LeSnork Nuke Cadet
Joined: Jan 15, 2003
Posts: 5
Location: USA
Posted:
Wed Jan 15, 2003 1:36 pm
OK... thank's
I was pretty sure I was following your instructions pretty carefully !!
Pete
chatserv General
Joined: Jan 12, 2003
Posts: 3128
Location: Puerto Rico
Posted:
Mon Feb 10, 2003 12:48 pm
Here is a variant for demented types that wish to remove the blocks from all the site (except the homepage)
Change:
Code:
blocks(left);
to:
Code:
if ($name=='*') {
}
else {
if ($name=='News') {
blocks(left);
}
}
Now why would anyone want to do is way beyond me, they'd have to be half crazy, half senile and just plain nuts, by the way my scriptheaven site has been hacked by someone, all blocks are gone ... errrr... help?
*I wonder if anyone fell for that act?*
_________________ Feed a man a fish and you feed him for a day. Teach a man to fish and you feed him for a lifetime.
ScriptHeaven | NukeResources
mikem Theme Guru
Joined: Jan 13, 2003
Posts: 1582
Location: Corn fields of Indiana
Posted:
Mon Feb 10, 2003 1:02 pm
No but you gots you a BIG 'ole error in your Forums Block on nukeresources..hehe...better fix it ....
mikem
chatserv General
Joined: Jan 12, 2003
Posts: 3128
Location: Puerto Rico
Posted:
Mon Feb 10, 2003 1:11 pm
Hate those RSS blocks..
_________________ Feed a man a fish and you feed him for a day. Teach a man to fish and you feed him for a lifetime.
ScriptHeaven | NukeResources
Guest
Posted:
Tue Feb 11, 2003 5:14 am
Hi!
Is it possible to only show certain blocks on certain pages, i e show some of the blocks in the left column on some of the pages and different blocks on some other pages?
/Johan
mikem Theme Guru
Joined: Jan 13, 2003
Posts: 1582
Location: Corn fields of Indiana
Posted:
Tue Feb 11, 2003 7:40 am
Anonymous wrote:
Hi!
Is it possible to only show certain blocks on certain pages, i e show some of the blocks in the left column on some of the pages and different blocks on some other pages?
/Johan
Only if the pages you are talking about are of a module. This method only works for modules.
Now, if you include your Content module for example into this equation. Any content page would not display the left blocks.
But, you can't simply put a path to a particular page into this eqation.
mikem
Guest
Posted:
Wed Feb 12, 2003 4:22 am
Hi!
Thanks for your reply. I am a beginner in Nuke and are interested to play around w the design. Sorry, I didnt really understand your reply.
What I want to do is to have dynimacally menus. I am going to give an example: I want the module feed-back to be inactive in all pages, but on the page Download (and only on Download) I want feed-back to be active. I also want the module feed-back to be in a new block (ie not in the block Modules).
I you or anybody can help me out I will appreciate it a lot.
Thanks - Johan
Mischieffer Nuke Soldier
Joined: Feb 13, 2003
Posts: 19
Location: UK
Posted:
Sun Mar 02, 2003 8:57 am
Hi,
I am trying to hide the left blocks in the forum module and the parachat chatroom module but am getting an error on other pages using either method.
Using mikem's code I get this error when navigating back to the homepage;
Fatal error: Call to undefined function: opentable() in mainfile.php on line 276
and using artificialintel's code I get:
Fatal error: Call to undefined function: opentable() in index.php on line 102
I am using the Amethyst theme included with PHP Nuke 6.0.
Any ideas ??
Thanks
Mischieffer Nuke Soldier
Joined: Feb 13, 2003
Posts: 19
Location: UK
Posted:
Tue Mar 11, 2003 8:04 am
For anyone else having this problem with the amethyst theme I downloaded it separately from Nukemods.com and found that their version contained an extra javascript file called fade.
Once I replaced the original amethyst theme with the Nukemods one it cured the errors.
Download url:
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