| Author |
Message |
azism
Captain


Joined: May 20, 2004
Posts: 306
Location: Tucson, AZ
|
Posted:
Sun Sep 05, 2004 9:38 am |
  |
I know I've seen this somewhere, but am not finding it. How can I eliminate the left column from displaying when in the Forums module? Most of my users are running 640x480 or 800x600 resolution and the left column takes up valuable screen space for those people. |
_________________ Tom Wills
TI-99/4A On-Line UG Administrator
http://www.ti99ers.org/ |
|
    |
 |
madman
Support Mod


Joined: Feb 15, 2004
Posts: 806
|
Posted:
Sun Sep 05, 2004 10:14 am |
  |
I have several workarounds, but this following way is the easiest for newbies, however you'll need to edit two PHP-Nuke files (standard rule: always make backups!):
Ok, let's started with the first file, mainfile.php. Find these lines: (hint: located within blocks() function)
| Code: |
if (strtolower($side[0]) == "l") {
$pos = "l";
} elseif (strtolower($side[0]) == "r") {
$pos = "r";
} elseif (strtolower($side[0]) == "c") {
$pos = "c";
} elseif (strtolower($side[0]) == "d") {
$pos = "d";
} |
AFTER, add:
| Code: |
| if (($pos == 'l') && defined('THEME_HIDE_LEFT_BLOCKS')) return; |
Now, edit modules.php and find the following lines:
| Code: |
require_once("mainfile.php");
$module = 1;
$name = trim($name); |
AFTER, add:
| Code: |
$mad_hide_left_blocks = array('Forums', 'Private_Messages', 'Journal', 'Members_List');
if (in_array($name, $mad_hide_left_blocks)) define('THEME_HIDE_LEFT_BLOCKS', true); |
From the above code, we will see full page (but still has header and footer) for Forums, Private Messages, Journal, and Members List modules. You can alter the $mad_no_left_block variable (array type) to insert new modules or remove them (names used are similar with directory name for appropriate modules, case sensitive and no whitespaces, please).
ps: Don't get bothered with "mad" prefix in the variable name of the array, it used to prevent variable naming conflicts.
edit: Some typos in codes ( sorry... ) |
_________________ I'm 
Last edited by madman on Sun Sep 05, 2004 10:36 am; edited 2 times in total |
|
      |
 |
azism
Captain


Joined: May 20, 2004
Posts: 306
Location: Tucson, AZ
|
Posted:
Sun Sep 05, 2004 10:18 am |
  |
Interesting. This looks easy enough. ANd you are so rihgt, ALWAYS backup before modifying any code. |
_________________ Tom Wills
TI-99/4A On-Line UG Administrator
http://www.ti99ers.org/ |
|
    |
 |
azism
Captain


Joined: May 20, 2004
Posts: 306
Location: Tucson, AZ
|
Posted:
Tue Sep 07, 2004 8:18 am |
  |
|
    |
 |
madman
Support Mod


Joined: Feb 15, 2004
Posts: 806
|
Posted:
Tue Sep 07, 2004 10:31 am |
  |
Glard to heard that.
I put this as sticky, in case someone else also need the trick. |
_________________ I'm  |
|
      |
 |
wlwcom9000
Nuke Soldier


Joined: Aug 23, 2004
Posts: 19
|
Posted:
Tue Oct 12, 2004 2:51 am |
  |
THANK YOU!!!!!!!!!!!!!!!!!!!!!! |
|
|
   |
 |
azism
Captain


Joined: May 20, 2004
Posts: 306
Location: Tucson, AZ
|
Posted:
Tue Oct 12, 2004 8:28 am |
  |
Looks like you have a winner here. Good job. |
_________________ Tom Wills
TI-99/4A On-Line UG Administrator
http://www.ti99ers.org/ |
|
    |
 |
insanim8er
Nuke Soldier


Joined: Nov 19, 2004
Posts: 11
|
Posted:
Sun Nov 21, 2004 7:55 am |
  |
Yeah, this works fine and all, but what if you want to hide the left colum on say
Universal_Module&file=add
I tried
// hide Left menu (array ('name')
$mad_hide_left_blocks = array('Universal_Module&file=add');
if (in_array($name, $mad_hide_left_blocks)) define('THEME_HIDE_LEFT_BLOCKS', true);
but it doesn't work... if I remove the &file=add then it works when I activate the Universal_Module... but that's not what I want.
I only want the Left Blocks to disable when a person is adding a submission. |
|
|
   |
 |
Ginza
Private


Joined: Dec 27, 2004
Posts: 40
|
Posted:
Sun Jan 23, 2005 2:03 am |
  |
Is there anyway to hide the right menu when we view the News articles (news file) only? |
|
|
   |
 |
Xyberian
Colonel


Joined: Mar 14, 2004
Posts: 1921
Location: Behind you
|
Posted:
Sun Jan 23, 2005 2:21 am |
  |
| Ginza wrote: |
| Is there anyway to hide the right menu when we view the News articles (news file) only? |
You have another threads replied by me. |
|
|
    |
 |
Divvy
Lieutenant


Joined: Jul 25, 2004
Posts: 213
|
Posted:
Thu Mar 24, 2005 3:29 pm |
  |
GREAT MOD!!!!
Nice one madman !!! Thank you!
But It´s possible to make this with right block and not left?
I want to hide right block in my forum but nobody can help me...
Can you help me? or someone... |
|
|
   |
 |
durango
Corporal


Joined: Apr 13, 2003
Posts: 64
|
Posted:
Sat May 14, 2005 10:30 pm |
  |
The above doesnt seem to work with Nuke 7.5?! |
_________________ Durango |
|
   |
 |
Evaders99
Site Admin


Joined: Aug 17, 2003
Posts: 12373
|
Posted:
Sat May 14, 2005 10:42 pm |
  |
|
     |
 |
durango
Corporal


Joined: Apr 13, 2003
Posts: 64
|
Posted:
Sat May 14, 2005 10:46 pm |
  |
I got it working (I tried putting comments in the mainfile.php before and after the line... thats what was messing it up ) |
_________________ Durango |
|
   |
 |
Armon
Nuke Soldier


Joined: Sep 12, 2005
Posts: 33
Location: Germany
|
Posted:
Wed Sep 21, 2005 12:00 pm |
  |
|
    |
 |
|
|