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


Author: Evaders99PostPosted: Sat Mar 05, 2005 6:16 pm    Post subject: Re: Hide left blocks when viewing Forum or ANY module

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

Author: kazookiPostPosted: Thu Feb 10, 2005 3:38 pm    Post subject: Re: Hide left blocks when viewing Forum or ANY module

I have downloaded and tried to use blocksmod2.

I made all the changes but the modmod file just completely baffled me.

Is there a walkthru other than the help file, because that explained everything BUT what to do with the modmod.php file?

Author: evonderPostPosted: Sat Mar 05, 2005 3:13 pm    Post subject: Re: Hide left blocks when viewing Forum or ANY module

I have managed to get rid of the table after eliminating the left blocks in certian modules by editing my theme/MYTHEME/header.html. Now to make some modules look right with left blocks enabled I have had to make a header2.html and leave it stock. I then had to modify my theme.php to the following:
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, 276 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 Previous  1, 2, 3, 4, 5, 6, 7, 8, 9, 10  Next  :| |:
Nuke Cops -> Tips And Tricks

Author: kampuz PostPosted: Wed Feb 09, 2005 5:34 am    Post subject: Re: Hide left blocks when viewing Forum or ANY module

djmaze wrote:
WHY IS EVERYONE IS MESSING WITH THEMES Confused

Just do it the easy way:

Open mainfile.php and change
Code:
function blocks($side) {
    global $storynum, $prefix, $multilingual, $currentlang, $db, $admin, $user;

into
Code:
function blocks($side) {
    global $storynum, $prefix, $multilingual, $currentlang, $db, $admin, $user, $hideleftblocks;
    if (strtolower($side[0]) == "l" && $hideleftblocks) return;


Then in any module change
Code:
include("header.php");

into
Code:
global $hideleftblocks;
$hideleftblocks = 1;
include("header.php");


Tested and works open your "modules/Forums/nukebb.php" to hide left blocks in phpBB

The cool thing is, if you have viewers with bad eyes for example they just put "&hideleftblocks=1" in the URL and it's hidden for that page so they can easily view/print it.

Make this standard and all themes still work.


I have done this and it works but... the left blocks aren't there but the space is still there. How can I make that blanck space desappear?

Thanks
Code:

snip..
    $public_msg = public_message();
    if ($name =='Forums') {
    $tmpl_file = "themes/$ThemeSel/header2.html";
    } elseif ($name =='MS_Analysis') {
    $tmpl_file = "themes/$ThemeSel/header2.html";
    } else {
    $tmpl_file = "themes/$ThemeSel/header.html";
    }
    $thefile = implode("", file($tmpl_file));
    $thefile = addslashes($thefile);
    $thefile = "\$r_file=\"".$thefile."\";";
    eval($thefile);
    print $r_file;
    blocks(left);
..snip

Now there must be a better way to do this...though I have tried the formerly mention method to multiselect header files:
Code:

snip..
    $public_msg = public_message();
    if ($name!=Forums AND $name!=MS_Analysis) {
    $tmpl_file = "themes/$ThemeSel/header2.html";
    } else {
..snip

This does not work, all modules will then be full sized with no left blocks showing. Any pointers as to how I can put multiple modules in one if line?

EDIT: changed if to proper elseif
Code:

    if ($name!="Forums" AND $name!="MS_Analysis") {

would be the proper code. But I'm not sure if that's just an error or if there's something else wrong with your script.

Author: evonder PostPosted: Sat Mar 05, 2005 6:53 pm    Post subject: Re: Hide left blocks when viewing Forum or ANY module

Evaders99 wrote:
Code:

    if ($name!="Forums" AND $name!="MS_Analysis") {

would be the proper code. But I'm not sure if that's just an error or if there's something else wrong with your script.

Unfortunetly this is not working for me..o well I will just have kind of a bollixed up looken theme.php in that block of code. I kind of baffled as to why it is not working properly though...I will continue to look about for an answer. good thing I dont have many modules that need no left blocks.

Author: VinDSLLocation: Arizona (USA) Site Admin: Lenon.com Admin: Disipal Designs PostPosted: Sat Mar 05, 2005 10:12 pm    Post subject: Re: Hide left blocks when viewing Forum or ANY module

I'd be inclined to try...

Code:
snip..
    $public_msg = public_message();
    if ($name=='Forums' || $name=='MS_Analysis') {
    $tmpl_file = "themes/$ThemeSel/header2.html";
    }else{
    $tmpl_file = "themes/$ThemeSel/header.html";
    }
    $thefile = implode("", file($tmpl_file));
    $thefile = addslashes($thefile);
    $thefile = "\$r_file=\"".$thefile."\";";
    eval($thefile);
    print $r_file;
    blocks(left);
..snip

Author: evonder PostPosted: Sun Mar 06, 2005 12:28 pm    Post subject: Re: Hide left blocks when viewing Forum or ANY module

VinDSL wrote:
I'd be inclined to try...

Code:
snip..
    $public_msg = public_message();
    if ($name=='Forums' || $name=='MS_Analysis') {
    $tmpl_file = "themes/$ThemeSel/header2.html";
    }else{
    $tmpl_file = "themes/$ThemeSel/header.html";
    }
    $thefile = implode("", file($tmpl_file));
    $thefile = addslashes($thefile);
    $thefile = "\$r_file=\"".$thefile."\";";
    eval($thefile);
    print $r_file;
    blocks(left);
..snip
Image
This works very well, thanks.

Author: jib_intelliLocation: Lucknow, India PostPosted: Sat Apr 30, 2005 12:11 pm    Post subject:

Code:
if ($name=='gallery' || $name=='DisError' || $name=='Forums' || $name=='Members_List' || $name=='Private_Messages') {
    } else {
        blocks(left);
    }


I tried to use the following code to make the left blocks disappear. (This is the one originally posted in the thread), but the left blocks are disappearing only for gallery and Forums and not member_list and Private_Messages Sad I tried changing the order, but still no use.

Please advise.

Author: florimonte PostPosted: Fri Jun 03, 2005 7:22 am    Post subject: Re: Hide left blocks when viewing Forum or ANY module

I've installed BlocksMod2 into Nuke 7.7 Everything seems to instaleld correctly- I guess. Reading fourms about BlocksMod2 and seem to have a hold on how it works. Add the code to footer.php header,php modules.php and the themes theme.php, change ModMod.php to liking, drop the dir BlocksMod into affected modules, and it works. Well I counldn't get it to work.
Actually the added code in themes.php:
-------
global $name;
$ch_blockl="modules/$name/BlocksMod/ModBlockL.php";
if (file_exists($ch_blockl)){ include("$ch_blockl");}
else{blocks(left);}
----------
gives me trouble. It seems $name doesn't equal anything. And isn't in the newer php, globals are turned off anyways?
Point me in the right direction. Thanks.
Thomas

Author: Evaders99 PostPosted: Fri Jun 03, 2005 7:54 am    Post subject: Re: Hide left blocks when viewing Forum or ANY module

Try using $module_name

Author: florimonte PostPosted: Fri Jun 03, 2005 6:17 pm    Post subject: Re: Hide left blocks when viewing Forum or ANY module

That ($module_name) doesn't work either. Where is $name set to anything? I've looked in several .php files and don't seem to see it assigned to anything. The add on code referies to $name, but doesn't set it. What ya think.
Another good question is- Has anybody gotten the BlockMod2 (the current version over at http://www.sengers-au.com/Portal/component/option,com_remository/Itemid,249/func,fileinfo/filecatid,1/parent,folder/) code to work with phpNuke 7.7.0.3.0? I've tried it with fresh install to see if I've already modded it past the point of thie mod working with it. No luck. Thanks for all the info.
Thomas

Author: Evaders99 PostPosted: Mon Jun 06, 2005 6:20 am    Post subject: Re: Hide left blocks when viewing Forum or ANY module

$name is assumed to be passed when a module is being called

modules.php?name=Forums for example

As well, $module_name is called inside the modules file itself, in case it is needed. This variable may not be defined globally..

Code:

$module_name = basename(dirname(__FILE__));

Author: kanuni PostPosted: Fri Jun 17, 2005 12:11 pm    Post subject: Re: Hide left blocks when viewing Forum or ANY module

Thanks..

Author: NabZ PostPosted: Tue Oct 25, 2005 11:59 pm    Post subject: Re: Hide left blocks when viewing Forum or ANY module

im using platinum and i cant find any of this in the theme.php. Sad
cant anyone help? thans Smile (i just want to remove them when the forum shows)
thanx guys.

Author: sandman229Location: Victorville, Ca. PostPosted: Thu Dec 29, 2005 10:59 am    Post subject: Re: Hide left blocks when viewing Forum or ANY module

florimonte wrote:
That ($module_name) doesn't work either. Where is $name set to anything? I've looked in several .php files and don't seem to see it assigned to anything. The add on code referies to $name, but doesn't set it. What ya think.
Another good question is- Has anybody gotten the BlockMod2 (the current version over at http://www.sengers-au.com/Portal/component/option,com_remository/Itemid,249/func,fileinfo/filecatid,1/parent,folder/) code to work with phpNuke 7.7.0.3.0? I've tried it with fresh install to see if I've already modded it past the point of thie mod working with it. No luck. Thanks for all the info.
Thomas


I got it to work with 78 but it doesn't change the themes at all. Haven't figured it out yet. I guess I'll stay with 75.. It worked on that version. (See below site)

http://www.kittykorp.com/kittys/index.php



Nuke Cops -> Tips And Tricks

All times are GMT - 8 Hours

Goto page Previous  1, 2, 3, 4, 5, 6, 7, 8, 9, 10  Next  :| |:
Page 8 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.060 Seconds - 127 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) ::