Author |
Message |
Raven
Site Admin/Owner
Joined: Aug 27, 2002
Posts: 17088
|
Posted:
Thu Oct 30, 2003 6:01 am |
|
To hide the left blocks for all modules, you need to edit your theme.php file. Find this codeand comment it out
To hide the left block for a specific module, you need to edit theme.php and do 2 things. First of all, in the themeheader() function, add the variable $name to the global statement. Then, find this codeand change it toCode: if ($name=="MODULE_NAME") {}
else blocks(left);
| where MODULE_NAME is the name of the module to hide the blocks. For example, to hide the left blocks when viewing the Member List, you would codeCode: if ($name=="Members_List") {}
else blocks(left);
|
Note that you will have to do this for every theme that you use |
|
|
|
|
msimonds
Regular
Joined: Jul 15, 2003
Posts: 56
Location: Dallas
|
Posted:
Thu Oct 30, 2003 8:53 pm |
|
don't forget that you have to use put the $name variable in the global under the function
function themeheader() {
global $sitename, $pagetitle, $slogan, $prefix, $dbi, $user, $cookie, $banners, $anonymous, $user, $name;
Thought that had to be in place also |
|
|
|
|
Raven
|
Posted:
Thu Oct 30, 2003 8:55 pm |
|
Raven wrote: | To hide the left block for a specific module, you need to edit theme.php and do 2 things. First of all, in the themeheader() function, add the variable $name to the global statement. | Did I use invisible ink again ? |
|
|
|
|
msimonds
|
Posted:
Thu Oct 30, 2003 9:02 pm |
|
woops sorry long day, and actually i have a theme that wont work on... tried a few different things and it still will not work
look at this !!!
Code:function themeheader() {
global $sitename, $pagetitle, $slogan, $prefix, $dbi, $user, $cookie, $banners, $anonymous, $user, $name;
if (is_user($user)) {
cookiedecode($user);
$username = $cookie[1];
$welcome = "Welcome, $username!";
$menu = "<a href=index.php>Home</a> - <a href=modules.php?name=Your_Account>Your Account</a> - <a href=forums.html>Forums</a> - <a href=modules.php?name=Your_Account&op=logout>Logout</a>";
} else {
$welcome = "Welcome, Guest!";
$menu = "<a href=modules.php?name=Your_Account>Login</a> - <a href=account-new_user.html>Sign Up</a>";
}
if ($banners) {
include ("banners.php");
}
echo "<br><body bgcolor=ffffff font=000000>
<table align=center width=100% border=0 cellpadding=0 cellspacing=0>
<tr valign=middle><td width=151><a href=index.php><img src=themes/Yahoo/images/logo.jpg border=0></a></td>
<td width=100% align=right><a href=index.php></a><hr size='1'></td>
</tr>
</table>
<table align=center width=100% border=0 cellpadding=8 cellspacing=0>
<tr><td valign=middle>";
//if ($banners) {
//include ("banners.php");
//}
echo "</td></tr></table>
<table align=center width=100% cellpadding=2 cellspacing=0 border=0>
<tr><td width=50% align=left bgcolor=EEEEEE><b>$welcome</b></td>
<td nowrap width=50% align=right bgcolor=EEEEEE>$menu</td>
</tr><tr>
<td colspan=2 width=100% bgcolor=6996E0 align=left><font class=title>$sitename ";
if ($pagetitle == ""){
echo "";
} else {
echo "$pagetitle";
}
echo "</font></td></tr></table><font class=tiny><br></font>
<table align=center width=100% cellpadding=0 cellspacing=0 border=0>
<tr><td width=180 valign=top bgcolor=EEEEEE>";
if ($name=='Forums') {
/* Don't display it. */
}
else {
blocks(left);
}
echo "<td width=6 bgcolor=ffffff><img src=themes/Yahoo/images/pixel.gif width=6 height=1></td>
<td bgcolor=ffffff valign=top>";
}
|
|
|
|
|
|
Raven
|
Posted:
Thu Oct 30, 2003 9:10 pm |
|
That's because that theme is not written like standard nuke themes. This fix assumes that the theme.php is written as a standard nuke theme.php. |
|
|
|
|
msimonds
|
Posted:
Thu Oct 30, 2003 9:16 pm |
|
not written by me....... thought that was the problem |
|
|
|
|
twelves
Regular
Joined: Aug 22, 2003
Posts: 84
|
Posted:
Sun Feb 29, 2004 10:38 am |
|
Is their a way to remove the Left and right blocks for a module?
(I looked at this thread, not just the left, but both.)
This is a custom module for serving documents and I thought it was great because the comments and ratings are on the bottom. I would like to turn this into a Guitar Tab module!
(As you can see the needed comments and ratings are on the bottom and leaving the much needed realistate for the removed left and side blocks for the proper pagination the guitar tab requires)
I am talking to this guy that produced the Recipe module and he said he is going to re write the descriptions to include documents. I may just do this my self and change the Breakfast, Meat, Food names to Country, Rock, Hard Rock, Classic Rock and change the icons to Guitar related Tab indexes.
Going to be just great!
How can I remove BOTH left and right blocks?
From this Module only.
Peace
|
|
|
|
|
chatserv
Member Emeritus
Joined: May 02, 2003
Posts: 1389
Location: Puerto Rico
|
Posted:
Sun Feb 29, 2004 2:12 pm |
|
Open the module's index file and change:
$index = 1;
to:
$index = 0;
If it doesn't have the code just insert it near the start:
$index = 0; |
|
|
|
|
twelves
|
Posted:
Sun Feb 29, 2004 2:31 pm |
|
|
|
|
chatserv
|
Posted:
Sun Feb 29, 2004 2:43 pm |
|
Have you tried what's described above?
add $name to the themeheader global line and change:
to:
Code: if ($name=='Recipes') {
}
else {
blocks(left);
}
|
??? |
|
|
|
|
twelves
|
Posted:
Sun Feb 29, 2004 2:55 pm |
|
I will try again.
But from what I see the main issue with the shrinking text with guitar tab is
the way the user pastes the text. (Like the smallish box I am typing in "Quick Reply" that is the main issue with shrunken miss paginated guitar tabs.
http://guitarchat.net/modules.php?name=Recipes&op=viewrecipe&recipeid=2&offset=0
I bet the above fix will work. And I will email the author about the small input box for the text.
Thanks.
Jay. |
|
|
|
|
Nukeum66
Life Cycles Becoming CPU Cycles
Joined: Jul 30, 2003
Posts: 551
Location: Neurotic, State, USA
|
Posted:
Sun Feb 29, 2004 6:33 pm |
|
I just use a 2 1/2in. wide strip of tape placed vertically on the left side of my monitor, works great! |
_________________ Scott Johnson MIS Ubuntu/Linux 11.10 |
|
|
|
twelves
|
Posted:
Tue Mar 02, 2004 9:22 am |
|
|
|
|
Wazock
New Member
Joined: Nov 27, 2004
Posts: 16
|
Posted:
Tue Jul 19, 2005 3:31 pm |
|
How do i do this for other modules? say i wanted two or three modules not to display left blocks but wanted the rest of the site to show left blocks.
I have tried to repeat the above method but returns a blank white page.
I have my forum like above and wanted another module that i have made not to show left blocks too.
Thnx in advance. |
|
|
|
|
chatserv
|
Posted:
Tue Jul 19, 2005 3:56 pm |
|
Code: if ($name=='Module1' || $name=='Module2' || $name=='Module3') {
}
else {
blocks(left);
}
|
Or:
Code: if ($name!='Module1' || $name!='Module2' || $name!='Module3') {
blocks(left);
}
|
|
|
|
|
|
Wazock
|
Posted:
Tue Jul 19, 2005 7:57 pm |
|
Thanks man works great much apreciated
Looks so simple put like that
Oh well cant all be geniuses. |
|
|
|
|
manunkind
Client
Joined: Apr 26, 2004
Posts: 368
Location: Albuquerque, NM
|
Posted:
Fri May 19, 2006 8:52 pm |
|
Quick question:
This doesn't seem to work for me with any compound names that have an underscore in them. For example.....Forums work fine, Content works fine. But Members_List, Web_Links, etc will not work.
Any ideas? (This is for removing the left blocks, not the right)
Using this type of code:
Code:if ($name=='Module1' || $name=='Module2' || $name=='Module3') {
}
else {
blocks(left);
}
|
|
|
|
|
|
Raven
|
Posted:
Fri May 19, 2006 10:31 pm |
|
Try a period instead of an underscore. |
|
|
|
|
manunkind
|
Posted:
Sat May 20, 2006 5:51 am |
|
Still doesn't work. Here is the exact code I am using:
Code:if ($name=="Forums" || $name=="PHP_Manual" || $name=="Amazon" || $name=="Content") {
}
else {
blocks(left);
}
|
All single words work fine. Nothing with an underscore will work. |
|
|
|
|
Raven
|
Posted:
Sat May 20, 2006 6:03 am |
|
Try
Code:
global name;
if ($name=="Forums" || $name=="PHP_Manual" || $name=="Amazon" || $name=="Content") {
}
else {
blocks(left);
}
|
|
|
|
|
|
manunkind
|
Posted:
Sat May 20, 2006 6:09 am |
|
Thanks Raven. Your previous post pointed me in the right direction and I got it working. It turns out you can use spaces in there instead of the underscore. For example, my previous code above now works by doing this:
Code:if ($name=="Forums" || $name=="PHP Manual" || $name=="Amazon" || $name=="Content") {
}
else {
blocks(left);
}
|
All compound names are working for me now if I include a space as the underscore in the if/else statement. |
|
|
|
|
Raven
|
Posted:
Sat May 20, 2006 6:31 am |
|
- oops, I forgot that $name was already transformed. Good job! |
|
|
|
|
manunkind
|
Posted:
Sat May 20, 2006 10:55 am |
|
Dumb luck.
Thanks for pointing me in the right direction earlier. |
|
|
|
|
manunkind
|
Posted:
Thu May 25, 2006 6:04 am |
|
Another quick question.....how do I remove these left blocks only when I am reading an article? I know I can add "News" to my above code, but that removes them from the home page as well. I want them there, but not when I click to read a full article.
Any ideas? |
|
|
|
|
manunkind
|
Posted:
Thu May 25, 2006 7:39 pm |
|
Stumper?
I'm just thinking of being more search engine friendly. When they hit an article now they have to go through all the block code before it gets to the meat of the content. Removing the left blocks when viewing an article will put them right into the meat almost instantly. |
|
|
|
|
|