>>
Site Map
>>
Forums
>>
Blocks 7x
Forum module - topics in forum:
Blocks 7x - Discussions regarding PHP-Nuke Blocks. 7x
Remove all blocks for only one theme?
Ok I have a client that would like the navigation for the website to be a dropdown javascript menu at the top instead of the tables. Adding the javascript to the header file is easy, but how can i modify it so that in the theme the blocks do not show? and ONLY in this theme. I'm working off of modifying a 3d-fantasy default theme, if that helps.
I personally have no idea why she wants to do it this way, it seems confusing to most people to have your main navigation at the top, and i personally hate those javascript menus, but i can't talk her out of it.
Any help is appriciated that will put me down the right path

I still need to keep the tables for the content, so i'm not sure if editing tables.php would help at all. *sighs* i'm exhausted.
i'd suggest looking through the code for theme.php
maybe reducing block width to 0 pixels could be enough
I imagine it would be possible - it would entail you editing the theme.php file for the theme in use - ie: nukeroot/themes/3dfantasy/theme.php
ok thanks you guys

k beat me with a stick. if i wanted to make it so the menu only showed when a certain theme is selected. how would i do that with php?
i have the javascript ready to add to javascript.php, but i stink at php..

something like if $ThemeSel... blah blah.. for the header.php file, or would i put it in custom_header.php? yeah. i really suck

or is there a way to make it an external javascript file and then link to it, but like i said, make it so the code checks for the user's theme and only uses the menu if it's true for a certain theme.
I have absolutely no idea if this would work but anything is worth a try eh.
Try remove the entire Function themesidebox from the theme.php and just add the menu coding to the header.html
hmm fixed the block problem.. i'll try that to the header.html file. should i just link to the external script then?
didn't work *sighs* any other ideas? the menu didn't work that is. the blocks are gone like they're supposed to be.
Ok I'm trying this in the header.php file:
| Code: : |
if (file_exists("themes/$ThemeSel/menu.is")) {
echo"<scipt src=\"themes/$ThemeSel/menu.is\" type=\"text/javascipt\"></scipt>\n";
|
i took out all the R's and changed the j to i so it would let me post that.
but anyway, this didn't work either. any idea why?
Err.. *pokes post above* anyone know?
Would something like http://www.phpnuke-ie.net/77test/ do you?
If so I'll tell you later tonight how to do it, dont have time now.
yeah! that's pretty much exactly what i'm trying to do. 
that's fine. take your time
i'm just happy at the prospect of gettin this to work!
Created a solution for you to remove left and right blocks from your page for 1 user!
Here is goes:
Open theme.php in the default theme, or the theme used by the user who wants the blocks to be removed.
root/themes/YOUR-DEFAULT-THEME/theme.php in function themeheader:
FIND
REPLACE with:
| Code: : |
if ($username != "demo") {
blocks(left);
}
|
This part does remove the left blocks for a user called "demo", replace "demo" with the user on your own website.
The right blocks:
Open all index.php files on modules where the right blocks are shown.
The right blocks will show up when
| Code: : |
define('INDEX_FILE', true);
|
is in that file.
REPLACE this part with:
| Code: : |
cookiedecode($user);
$username = $cookie[1];
if ($username != "demo") {
define('INDEX_FILE', true);
}
|
Now all right blocks are removed too for a user called "demo".
Want to try this out?
Test it at my website: http://test.preservingfidelitysquad.nl
Note: For future readers of this topic: Hack can be possibly removed, because it is a testsite.
I suggest to create something like this for the javascript part.
BL
I think this is for an entire site BL, not just one user, that's a great little hack though BL
Right marni, if you want a menu like on my testsite goto http://www.milonic.com/download.php and grab that, upload all the 4 js files to the sites root and add the js code mentioned in install.txt at the top of theme.php before the opening php tag.
Bear in mind these menu's take a bit of modifying to get them how you want them.
| Marni Wrote: : |
| but how can i modify it so that in the theme the blocks do not show |
I thought that was the idea...
One user doesn't want to see the blocks, because he/she doesn't likes it.
Just replace demo with that users name, and the blocks will never appear for him/her.
| dar63 Wrote: : |
| I think this is for an entire site BL, not just one user, that's a great little hack though BL |
It is only for 1 user, and yes for the whole site. All other users will see the blocks.
Did you test it out on my testsite?
BL