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, 278 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
kampuz
Private
Private


Joined: Dec 13, 2004
Posts: 43


PostPosted: Wed Feb 09, 2005 5:34 am Reply with quoteBack to top

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


Joined: Feb 01, 2005
Posts: 4


PostPosted: Thu Feb 10, 2005 3:38 pm Reply with quoteBack to top

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


Joined: Mar 05, 2005
Posts: 8


PostPosted: Sat Mar 05, 2005 3:13 pm Reply with quoteBack to top

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

_________________
Image
Find all posts by evonderView user's profileSend private message
Evaders99
Site Admin
Site Admin


Joined: Aug 17, 2003
Posts: 12482


PostPosted: Sat Mar 05, 2005 6:16 pm Reply with quoteBack to top

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.

_________________
Helping those that help themselves
Read FIRST or DIE!

"Fighting is terrible, but not as terrible as losing the will to fight."
Star Wars Rebellion Network - Need Help? Evaders Squadron Coding
Find all posts by Evaders99View user's profileSend private messageVisit poster's websiteAIM Address
evonder
Nuke Cadet
Nuke Cadet


Joined: Mar 05, 2005
Posts: 8


PostPosted: Sat Mar 05, 2005 6:53 pm Reply with quoteBack to top

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.

_________________
Image
Find all posts by evonderView user's profileSend private message
VinDSL
Site Admin
Site Admin


Joined: Jul 08, 2003
Posts: 1193

Location: Arizona (USA) Site Admin: Lenon.com Admin: Disipal Designs

PostPosted: Sat Mar 05, 2005 10:12 pm Reply with quoteBack to top

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

_________________
.:: "The further in you go, the bigger it gets!" ::.
.:: VinDSL's Lenon.com | The Disipal Site ::.
Find all posts by VinDSLView user's profileSend private messageVisit poster's websiteICQ Number
evonder
Nuke Cadet
Nuke Cadet


Joined: Mar 05, 2005
Posts: 8


PostPosted: Sun Mar 06, 2005 12:28 pm Reply with quoteBack to top

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.

_________________
Image
Find all posts by evonderView user's profileSend private message
jib_intelli
Captain
Captain


Joined: Jun 10, 2004
Posts: 338

Location: Lucknow, India

PostPosted: Sat Apr 30, 2005 12:11 pm Reply with quoteBack to top

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.

_________________
It is not our abilities which decide what we truly are, it is our choices.

Image
Find all posts by jib_intelliView user's profileSend private messageVisit poster's websiteAIM AddressYahoo MessengerMSN Messenger
florimonte
Nuke Cadet
Nuke Cadet


Joined: Jun 03, 2005
Posts: 7


PostPosted: Fri Jun 03, 2005 7:22 am Reply with quoteBack to top

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
Find all posts by florimonteView user's profileSend private message
Evaders99
Site Admin
Site Admin


Joined: Aug 17, 2003
Posts: 12482


PostPosted: Fri Jun 03, 2005 7:54 am Reply with quoteBack to top

Try using $module_name

_________________
Helping those that help themselves
Read FIRST or DIE!

"Fighting is terrible, but not as terrible as losing the will to fight."
Star Wars Rebellion Network - Need Help? Evaders Squadron Coding
Find all posts by Evaders99View user's profileSend private messageVisit poster's websiteAIM Address
florimonte
Nuke Cadet
Nuke Cadet


Joined: Jun 03, 2005
Posts: 7


PostPosted: Fri Jun 03, 2005 6:17 pm Reply with quoteBack to top

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
Find all posts by florimonteView user's profileSend private message
Evaders99
Site Admin
Site Admin


Joined: Aug 17, 2003
Posts: 12482


PostPosted: Mon Jun 06, 2005 6:20 am Reply with quoteBack to top

$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__));

_________________
Helping those that help themselves
Read FIRST or DIE!

"Fighting is terrible, but not as terrible as losing the will to fight."
Star Wars Rebellion Network - Need Help? Evaders Squadron Coding
Find all posts by Evaders99View user's profileSend private messageVisit poster's websiteAIM Address
kanuni
Nuke Cadet
Nuke Cadet


Joined: Jun 17, 2005
Posts: 1


PostPosted: Fri Jun 17, 2005 12:11 pm Reply with quoteBack to top

Thanks..
Find all posts by kanuniView user's profileSend private message
NabZ
Nuke Cadet
Nuke Cadet


Joined: Jul 02, 2005
Posts: 1


PostPosted: Tue Oct 25, 2005 11:59 pm Reply with quoteBack to top

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.
Find all posts by NabZView user's profileSend private message
sandman229
Sergeant
Sergeant


Joined: Jul 28, 2003
Posts: 104

Location: Victorville, Ca.

PostPosted: Thu Dec 29, 2005 10:59 am Reply with quoteBack to top

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

_________________
Sandman
Find all posts by sandman229View user's profileSend private messageSend e-mailYahoo MessengerMSN MessengerICQ Number
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.055 Seconds - 225 pages served in past 5 minutes. Nuke Cops Founded by Paul Laudanski (Zhen-Xjell)
:: FI Theme :: PHP-Nuke theme by coldblooded (www.nukemods.com) ::