Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> How To's
Author Message
msimonds
Regular
Regular



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

PostPosted: Mon Nov 24, 2003 1:28 pm Reply with quote

Is there a way to make a block so it does not display a title! I want to put up some small banners on my site and put them into a block but I do not want a title on the block. Is that possible
 
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger MSN Messenger
fury
Worker
Worker



Joined: Sep 09, 2003
Posts: 165

PostPosted: Mon Nov 24, 2003 3:22 pm Reply with quote

yes take out the $title in the block.html
 
View user's profile Send private message
Fphilip84
Regular
Regular



Joined: Oct 27, 2003
Posts: 73

PostPosted: Wed Nov 26, 2003 9:52 am Reply with quote

Yes, I had that same question...but one thing, if I take the title out of the block.html, that will effect ALL the blocks right?..Is there anyway to do it for just 1 or 2 blocks?
 
View user's profile Send private message
fury







PostPosted: Wed Nov 26, 2003 1:09 pm Reply with quote

yes i believe there is let me experiment on it tonight when i get home from work and I will let you know
Thanks
Fury
 
Raven
Site Admin/Owner



Joined: Aug 27, 2002
Posts: 17088

PostPosted: Wed Nov 26, 2003 7:33 pm Reply with quote

First of all, you need to find the Block ID for the block you want to hide the title for. Use nuke Administration panel and select Blocks. Then, mouse over the Edit hyperlink of the block. The block id will appear in the browser status line. You will need that for the next part.

In mainfile.php find the blocks() function. Then find this code
Code:
while($row = $db->sql_fetchrow($result)) {

        $bid = $row[bid];
        $title = $row[title];
The $bid is the BlockID that you located in the first part of this post. Let's assume the $bid is 20. Add this line of code to the code above, after the $title = $row[title]; line
Code:
if ($bid==20) $title = "";
That should take care of it.


Last edited by Raven on Wed Nov 26, 2003 9:14 pm; edited 1 time in total 
View user's profile Send private message
Fphilip84







PostPosted: Wed Nov 26, 2003 9:11 pm Reply with quote

Raven, the only thing for block() that I have in my mainfile.php is

Quote:
function userblock() {
global $user, $cookie, $db, $user_prefix;
if((is_user($user)) AND ($cookie[8])) {
$sql = "SELECT ublock FROM ".$user_prefix."_users WHERE user_id='$cookie[0]'";
$result = $db->sql_query($sql);
$row = $db->sql_fetchrow($result);
$title = ""._MENUFOR." $cookie[1]";
themesidebox($title, $row[ublock]);
}


Do I change something in here?
 
Raven







PostPosted: Wed Nov 26, 2003 9:14 pm Reply with quote

function blocks - sorry
 
Fphilip84







PostPosted: Wed Nov 26, 2003 9:30 pm Reply with quote

Raven, yeah this work...it takes the wording out, but it still leaves the box for the title still there. So basically its a small little empty box above the module. Anyway to get rid of that too?
 
Raven







PostPosted: Wed Nov 26, 2003 9:41 pm Reply with quote

No easy way.
 
Fphilip84







PostPosted: Wed Nov 26, 2003 9:56 pm Reply with quote

The best bet is to just take out the title thing from the blocks.html in my themes...
 
revspalding
New Member
New Member



Joined: Oct 20, 2003
Posts: 15
Location: NW Colorado

PostPosted: Mon Dec 01, 2003 3:37 pm Reply with quote

The file that controls how the blocks are laid out (the upper left corner graphic, the title container graphic and the upper left corner graphic) is located in your theme directory. It's named blocks.html.

You might be able to mess around with that file and add an if statement with the following idea in mind.
Code:
    if ($title=='hideme') { 

    /* If title is hideme, this is where you'd put the code to display table contents to redraw the top of the block without the title and with the correct graphics */
   }
   else { ?*This is where you'd put the existing code that draws the table top with the title graphics and the title.
   }


I am a noobie, but I think this would work. You might also have to wrap it with php tags and put echo statements within the include brackets. But, no need to worry about the block bid number, or modifying mainfile with every block that you want this way. Just make the custom title of the block 'hideme' in the blocks admin section.

I haven't tried this out, so as always, back up first.

_________________
The Spalding Supplement to the Peter Principle:
You can be promoted beyond your level of competance, if your boss is working at his. 
View user's profile Send private message
Display posts from previous:       
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> How To's

View next topic
View previous 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
You can attach files in this forum
You can download files in this forum


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 6 Hours
 
Forums ©