You are missing our premiere tool bar navigation system! Register and use it for FREE!

NukeCops  
•  Home •  Downloads •  Gallery •  Your Account •  Forums • 
Readme First
- Readme First! -

Read and follow the rules, otherwise your posts will be closed
Modules
· Home
· FAQ
· Buy a Theme
· Advertising
· AvantGo
· Bookmarks
· Columbia
· Community
· Donations
· Downloads
· Feedback
· Forums
· PHP-Nuke HOWTO
· Private Messages
· Search
· Statistics
· Stories Archive
· Submit News
· Surveys
· Theme Gallery
· Top
· Topics
· Your Account
Who's Online
There are currently, 301 guest(s) and 0 member(s) that are online.

You are Anonymous user. You can register for free by clicking here
Nuke Cops :: View topic - Hide left blocks when viewing Forum or ANY module [ ]
 Forum FAQ  •  Search  •   •  Memberlist  •  Usergroups   •  Register  •  Profile •    •  Log in to check your private messages  •  Log in

 
Post new topic  Reply to topicprinter-friendly view
View previous topic Log in to check your private messages View next topic
Author Message
mikem
Theme Guru
Theme Guru


Joined: Jan 13, 2003
Posts: 1582

Location: Corn fields of Indiana

PostPosted: Wed Jan 15, 2003 10:55 am Reply with quoteBack to top

HIDE LEFT BLOCKS IN ANY MODULE

look in theme.php under themeheader function for

Code:
    blocks(left);


replace with

Code:
    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
Find all posts by mikemView user's profileSend private message
ArtificialIntel



Joined: Jan 31, 2004
Posts: -88


PostPosted: Wed Jan 15, 2003 11:12 am Reply with quoteBack to top

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
Find all posts by ArtificialIntelView user's profileSend private message
LeSnork
Nuke Cadet
Nuke Cadet


Joined: Jan 15, 2003
Posts: 5

Location: USA

PostPosted: Wed Jan 15, 2003 1:17 pm Reply with quoteBack to top

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

Here's my issue...

I am starting with phpNuke Ver 6.0 @ http://www.tpclinks.com/aphpn60 and it's not in production yet.

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;

///////////////////////////////////////////////
//<p align=\"left\"><font color=\"$textcolor1\" ><b><font size=\"-1\">$magic</font></font></b></p><br>
$magic_block = "

<!--URL NEEDS TO BE CHANGED-->
<iframe frame name=\"center\" frameborder=\"0\" src=\"http://www.tpclinks.com/forums/phpBB2\" width=\"100%\" height=\"$height\"  border=\"0\">
</iframe>
<!--End Of Code-->
<!--Copyright notice - Do not remove-->
<hr noshade><div align=\"right\">
&copy; 2002 Copyright <a href=\"http://www.ez-webhosting.net\">EZ WebHosting & Design</a><br></div>
<!--Copyright notice - Do not remove-->
";
if ($opi != "ds") {

   echo "$magic_block";
}
////////////////////////////////// 
 
    include("footer.php");
?>


any and all assistance is greatly appreciated...

Pete Hersom
Find all posts by LeSnorkView user's profileSend private messageSend e-mailICQ Number
ArtificialIntel



Joined: Jan 31, 2004
Posts: -88


PostPosted: Wed Jan 15, 2003 1:20 pm Reply with quoteBack to top

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
Find all posts by ArtificialIntelView user's profileSend private message
LeSnork
Nuke Cadet
Nuke Cadet


Joined: Jan 15, 2003
Posts: 5

Location: USA

PostPosted: Wed Jan 15, 2003 1:27 pm Reply with quoteBack to top

Okay.. thanks ArtificialIntel...

I'll go back and try mikem's version again... I'm probably screwing it up somewheres !!!
Find all posts by LeSnorkView user's profileSend private messageSend e-mailICQ Number
mikem
Theme Guru
Theme Guru


Joined: Jan 13, 2003
Posts: 1582

Location: Corn fields of Indiana

PostPosted: Wed Jan 15, 2003 1:32 pm Reply with quoteBack to top

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
Find all posts by mikemView user's profileSend private message
LeSnork
Nuke Cadet
Nuke Cadet


Joined: Jan 15, 2003
Posts: 5

Location: USA

PostPosted: Wed Jan 15, 2003 1:36 pm Reply with quoteBack to top

OK... thank's

I was pretty sure I was following your instructions pretty carefully !!

Pete
Find all posts by LeSnorkView user's profileSend private messageSend e-mailICQ Number
chatserv
General
General


Joined: Jan 12, 2003
Posts: 3128

Location: Puerto Rico

PostPosted: Mon Feb 10, 2003 12:48 pm Reply with quoteBack to top

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?* Rolling Eyes Embarassed

_________________
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
Find all posts by chatservView user's profileSend private messageVisit poster's website
mikem
Theme Guru
Theme Guru


Joined: Jan 13, 2003
Posts: 1582

Location: Corn fields of Indiana

PostPosted: Mon Feb 10, 2003 1:02 pm Reply with quoteBack to top

No but you gots you a BIG 'ole error in your Forums Block on nukeresources..hehe...better fix it .... Cool

mikem
Find all posts by mikemView user's profileSend private message
chatserv
General
General


Joined: Jan 12, 2003
Posts: 3128

Location: Puerto Rico

PostPosted: Mon Feb 10, 2003 1:11 pm Reply with quoteBack to top

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
Find all posts by chatservView user's profileSend private messageVisit poster's website
Guest







PostPosted: Tue Feb 11, 2003 5:14 am Reply with quoteBack to top

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
Find all posts by Anonymous
mikem
Theme Guru
Theme Guru


Joined: Jan 13, 2003
Posts: 1582

Location: Corn fields of Indiana

PostPosted: Tue Feb 11, 2003 7:40 am Reply with quoteBack to top

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
Find all posts by mikemView user's profileSend private message
Guest







PostPosted: Wed Feb 12, 2003 4:22 am Reply with quoteBack to top

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
Find all posts by Anonymous
Mischieffer
Nuke Soldier
Nuke Soldier


Joined: Feb 13, 2003
Posts: 19

Location: UK

PostPosted: Sun Mar 02, 2003 8:57 am Reply with quoteBack to top

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
Find all posts by MischiefferView user's profileSend private message
Mischieffer
Nuke Soldier
Nuke Soldier


Joined: Feb 13, 2003
Posts: 19

Location: UK

PostPosted: Tue Mar 11, 2003 8:04 am Reply with quoteBack to top

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:

http://www.nukemods.com/modules.php?name=Downloads&d_op=getit&lid=6
Find all posts by MischiefferView user's profileSend private message
Display posts from previous:      
Post new topic  Reply to topicprinter-friendly view
View previous topic Log in to check your private messages View next topic
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



Powered by phpBB © 2001, 2005 phpBB Group

Ported by Nuke Cops © 2003 www.nukecops.com
:: FI Theme :: PHP-Nuke theme by coldblooded (www.nukemods.com) ::
Powered by TOGETHER TEAM srl ITALY http://www.togetherteam.it - DONDELEO E-COMMERCE http://www.DonDeLeo.com - TUTTISU E-COMMERCE http://www.tuttisu.it
Web site engine's code is Copyright © 2002 by PHP-Nuke. All Rights Reserved. PHP-Nuke is Free Software released under the GNU/GPL license.
Page Generation: 0.050 Seconds - 217 pages served in past 5 minutes. Nuke Cops Founded by Paul Laudanski (Zhen-Xjell)
:: FI Theme :: PHP-Nuke theme by coldblooded (www.nukemods.com) ::