PHP Web Host - Quality Web Hosting For All PHP Applications Sign up for PayPal and start accepting credit card payments instantly
  Login or Register
 • Home • Downloads • Your Account • Forums • 

View next topic
View previous topic


Google
 
Web RavenPHPScripts (This Site)
Post new topic   Reply to topic
Author Message
Raven
Site Admin/Owner


Joined: Aug 27, 2002
Posts: 14946
Location: Kansas

PostPosted: Thu Oct 30, 2003 6:01 am Reply with quote Back to top

To hide the left blocks for all modules, you need to edit your theme.php file. Find this code
Code:
blocks(left);
and comment it out
Code:
//blocks(left);


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 code
Code:
blocks(left);
and change it to
Code:
    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 code
Code:
    if ($name=="Members_List") {}
    else blocks(left);


Note that you will have to do this for every theme that you use
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger
msimonds
Regular
Regular


Joined: Jul 15, 2003
Posts: 56
Location: Dallas

PostPosted: Thu Oct 30, 2003 8:53 pm Reply with quote Back to top

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
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger MSN Messenger
Raven
Site Admin/Owner


Joined: Aug 27, 2002
Posts: 14946
Location: Kansas

PostPosted: Thu Oct 30, 2003 8:55 pm Reply with quote Back to top

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 Laughing ?
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger
msimonds
Regular
Regular


Joined: Jul 15, 2003
Posts: 56
Location: Dallas

PostPosted: Thu Oct 30, 2003 9:02 pm Reply with quote Back to top

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=modules.php?name=Your_Account&op=new_user>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>";
}
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger MSN Messenger
Raven
Site Admin/Owner


Joined: Aug 27, 2002
Posts: 14946
Location: Kansas

PostPosted: Thu Oct 30, 2003 9:10 pm Reply with quote Back to top

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.
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger
msimonds
Regular
Regular


Joined: Jul 15, 2003
Posts: 56
Location: Dallas

PostPosted: Thu Oct 30, 2003 9:16 pm Reply with quote Back to top

not written by me....... thought that was the problem
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger MSN Messenger
twelves
Regular
Regular


Joined: Aug 22, 2003
Posts: 84

PostPosted: Sun Feb 29, 2004 10:38 am Reply with quote Back to top

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
Wink
View user's profile Send private message Visit poster's website
chatserv
The Mouse Is Extension Of Arm


Joined: May 02, 2003
Posts: 1393

PostPosted: Sun Feb 29, 2004 2:12 pm Reply with quote Back to top

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;
View user's profile Send private message Visit poster's website
twelves
Regular
Regular


Joined: Aug 22, 2003
Posts: 84

PostPosted: Sun Feb 29, 2004 2:31 pm Reply with quote Back to top

Yes, thanks very much. Right blocks GONE!
Only registered users can see links on this board!
Get registered or login to the forums!


And to get the left removed?


Guitar tab can be very wide,

Thank you very much.
View user's profile Send private message Visit poster's website
chatserv
The Mouse Is Extension Of Arm


Joined: May 02, 2003
Posts: 1393

PostPosted: Sun Feb 29, 2004 2:43 pm Reply with quote Back to top

Have you tried what's described above?
add $name to the themeheader global line and change:
Code:
    blocks(left);

to:
Code:
    if ($name=='Recipes') {
   }
   else {
    blocks(left);
   }

???
View user's profile Send private message Visit poster's website
twelves
Regular
Regular


Joined: Aug 22, 2003
Posts: 84

PostPosted: Sun Feb 29, 2004 2:55 pm Reply with quote Back to top

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.
Only registered users can see links on this board!
Get registered or login to the forums!


I bet the above fix will work. And I will email the author about the small input box for the text.

Thanks.

Jay.
View user's profile Send private message Visit poster's website
Nukeum66
Life Cycles Becoming CPU Cycles


Joined: Jul 30, 2003
Posts: 546
Location: Neurotic, State, USA

PostPosted: Sun Feb 29, 2004 6:33 pm Reply with quote Back to top

I just use a 2 1/2in. wide strip of tape placed vertically on the left side of my monitor, works great! Laughing
View user's profile Send private message Visit poster's website MSN Messenger
twelves
Regular
Regular


Joined: Aug 22, 2003
Posts: 84

PostPosted: Tue Mar 02, 2004 9:22 am Reply with quote Back to top

O yes, I don't know how I skipped that. Thanks again from Noob Planet.
Worked 100% as described.
Only registered users can see links on this board!
Get registered or login to the forums!


Now I am going to try to figure out how to edit the Text input box to have FULL
size Pagination.

Looks good so far. Next im going to edit the SQL file to reflect Guitar related words. Mr. Green
View user's profile Send private message Visit poster's website
Wazock
New Member
New Member


Joined: Nov 27, 2004
Posts: 16

PostPosted: Tue Jul 19, 2005 3:31 pm Reply with quote Back to top

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.
View user's profile Send private message
chatserv
The Mouse Is Extension Of Arm


Joined: May 02, 2003
Posts: 1393

PostPosted: Tue Jul 19, 2005 3:56 pm Reply with quote Back to top

Code:
    if ($name=='Module1' || $name=='Module2' || $name=='Module3') {
   }
   else {
    blocks(left);
   }

Or:
Code:
    if ($name!='Module1' || $name!='Module2' || $name!='Module3') {
    blocks(left);
   }
View user's profile Send private message Visit poster's website
Wazock
New Member
New Member


Joined: Nov 27, 2004
Posts: 16

PostPosted: Tue Jul 19, 2005 7:57 pm Reply with quote Back to top

Thanks man works great much apreciated Smile

Looks so simple put like that Sad

Oh well cant all be geniuses.
View user's profile Send private message
manunkind
Client


Joined: Apr 26, 2004
Posts: 368
Location: Albuquerque, NM

PostPosted: Fri May 19, 2006 8:52 pm Reply with quote Back to top

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);
   }
View user's profile Send private message Visit poster's website
Raven
Site Admin/Owner


Joined: Aug 27, 2002
Posts: 14946
Location: Kansas

PostPosted: Fri May 19, 2006 10:31 pm Reply with quote Back to top

Try a period instead of an underscore.
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger
manunkind
Client


Joined: Apr 26, 2004
Posts: 368
Location: Albuquerque, NM

PostPosted: Sat May 20, 2006 5:51 am Reply with quote Back to top

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.
View user's profile Send private message Visit poster's website
Raven
Site Admin/Owner


Joined: Aug 27, 2002
Posts: 14946
Location: Kansas

PostPosted: Sat May 20, 2006 6:03 am Reply with quote Back to top

Try
Code:

global name;
if ($name=="Forums" || $name=="PHP_Manual" || $name=="Amazon" ||  $name=="Content") {
}
else {
blocks(left);
}
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger
manunkind
Client


Joined: Apr 26, 2004
Posts: 368
Location: Albuquerque, NM

PostPosted: Sat May 20, 2006 6:09 am Reply with quote Back to top

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.
View user's profile Send private message Visit poster's website
Raven
Site Admin/Owner


Joined: Aug 27, 2002
Posts: 14946
Location: Kansas

PostPosted: Sat May 20, 2006 6:31 am Reply with quote Back to top

Bang Head - oops, I forgot that $name was already transformed. Good job!
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger
manunkind
Client


Joined: Apr 26, 2004
Posts: 368
Location: Albuquerque, NM

PostPosted: Sat May 20, 2006 10:55 am Reply with quote Back to top

Dumb luck. Smile

Thanks for pointing me in the right direction earlier.
View user's profile Send private message Visit poster's website
manunkind
Client


Joined: Apr 26, 2004
Posts: 368
Location: Albuquerque, NM

PostPosted: Thu May 25, 2006 6:04 am Reply with quote Back to top

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?
View user's profile Send private message Visit poster's website
manunkind
Client


Joined: Apr 26, 2004
Posts: 368
Location: Albuquerque, NM

PostPosted: Thu May 25, 2006 7:39 pm Reply with quote Back to top

Stumper? Smile

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.
View user's profile Send private message Visit poster's website
Display posts from previous:       
Post new topic   Reply to topic