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


Author: LeSnorkLocation: USAPostPosted: Wed Jan 15, 2003 1:17 pm    Post subject:

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

NukeCops  
•  Home •  Downloads •  Gallery •  Your Account •  Forums • 

Author: ArtificialIntelPostPosted: Wed Jan 15, 2003 11:12 am    Post subject:

there's another way.

create a variable in theme.php called
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, 114 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 Hide left blocks when viewing Forum or ANY module
Goto page 1, 2, 3, 4, 5, 6, 7, 8, 9, 10  Next  :| |:
Nuke Cops -> Tips And Tricks

Author: mikemLocation: Corn fields of Indiana PostPosted: Wed Jan 15, 2003 10:55 am    Post subject: Hide left blocks when viewing Forum or ANY module

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

Author: ArtificialIntel PostPosted: Wed Jan 15, 2003 1:20 pm    Post subject:

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

Author: LeSnorkLocation: USA PostPosted: Wed Jan 15, 2003 1:27 pm    Post subject:

Okay.. thanks ArtificialIntel...

I'll go back and try mikem's version again... I'm probably screwing it up somewheres !!!

Author: mikemLocation: Corn fields of Indiana PostPosted: Wed Jan 15, 2003 1:32 pm    Post subject:

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

Author: LeSnorkLocation: USA PostPosted: Wed Jan 15, 2003 1:36 pm    Post subject:

OK... thank's

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

Pete

Author: chatservLocation: Puerto Rico PostPosted: Mon Feb 10, 2003 12:48 pm    Post subject:

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

Author: mikemLocation: Corn fields of Indiana PostPosted: Mon Feb 10, 2003 1:02 pm    Post subject:

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

mikem

Author: chatservLocation: Puerto Rico PostPosted: Mon Feb 10, 2003 1:11 pm    Post subject:

Hate those RSS blocks..

Author: Guest PostPosted: Tue Feb 11, 2003 5:14 am    Post subject: Show certain blocks for different pages

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

Author: mikemLocation: Corn fields of Indiana PostPosted: Tue Feb 11, 2003 7:40 am    Post subject: Re: Show certain blocks for different pages

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

Author: Guest PostPosted: Wed Feb 12, 2003 4:22 am    Post subject: Design issue

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

Author: MischiefferLocation: UK PostPosted: Sun Mar 02, 2003 8:57 am    Post subject: hiding left blocks

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

Author: MischiefferLocation: UK PostPosted: Tue Mar 11, 2003 8:04 am    Post subject: Problem solved

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



Nuke Cops -> Tips And Tricks

All times are GMT - 8 Hours

Goto page 1, 2, 3, 4, 5, 6, 7, 8, 9, 10  Next  :| |:
Page 1 of 10

Powered by phpBB © 2001,2002 phpBB Group
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.038 Seconds - 88 pages served in past 5 minutes. Nuke Cops Founded by Paul Laudanski (Zhen-Xjell)
added by Evaders - DO NOT REMOVE
:: FI Theme :: PHP-Nuke theme by coldblooded (www.nukemods.com) ::