Author |
Message |
msimonds
Regular
Joined: Jul 15, 2003
Posts: 56
Location: Dallas
|
Posted:
Mon Nov 24, 2003 1:28 pm |
|
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 |
|
|
|
|
fury
Worker
Joined: Sep 09, 2003
Posts: 165
|
Posted:
Mon Nov 24, 2003 3:22 pm |
|
yes take out the $title in the block.html |
|
|
|
|
Fphilip84
Regular
Joined: Oct 27, 2003
Posts: 73
|
Posted:
Wed Nov 26, 2003 9:52 am |
|
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? |
|
|
|
|
fury
|
Posted:
Wed Nov 26, 2003 1:09 pm |
|
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
|
Posted:
Wed Nov 26, 2003 7:33 pm |
|
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 codeCode: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]; lineCode: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 |
|
|
|
Fphilip84
|
Posted:
Wed Nov 26, 2003 9:11 pm |
|
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
|
Posted:
Wed Nov 26, 2003 9:14 pm |
|
|
|
|
Fphilip84
|
Posted:
Wed Nov 26, 2003 9:30 pm |
|
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
|
Posted:
Wed Nov 26, 2003 9:41 pm |
|
|
|
|
Fphilip84
|
Posted:
Wed Nov 26, 2003 9:56 pm |
|
The best bet is to just take out the title thing from the blocks.html in my themes... |
|
|
|
|
revspalding
New Member
Joined: Oct 20, 2003
Posts: 15
Location: NW Colorado
|
Posted:
Mon Dec 01, 2003 3:37 pm |
|
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. |
|
|
|
|