PHP Web Host - Quality Web Hosting For All PHP Applications Free RavenNuke(tm) Add Ons
  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
msimonds
Regular
Regular


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

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

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 Back to top

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 Back to top

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
Worker
Worker


Joined: Sep 09, 2003
Posts: 165

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

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


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

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

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 Visit poster's website AIM Address Yahoo Messenger
Fphilip84
Regular
Regular


Joined: Oct 27, 2003
Posts: 73

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

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


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

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

function blocks - sorry
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger
Fphilip84
Regular
Regular


Joined: Oct 27, 2003
Posts: 73

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

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


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

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

No easy way.
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger
Fphilip84
Regular
Regular


Joined: Oct 27, 2003
Posts: 73

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

The best bet is to just take out the title thing from the blocks.html in my themes...
View user's profile Send private message
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 Back to top

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

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
Forums ©
 

All logos and trademarks in this site are property of their respective owner.
The comments are property of their posters, all the rest © 2002-2011 by Raven

You can syndicate our news using the file xml

CSE HTML Validator Helped Clean up This Page! [Valid RSS] valid RSS 2.0 Valid robots.txt Stop Spam Harvesters, Join Project Honey Pot

Website engines core code is © copyright by PHP-Nuke but has been heavily patched and modified by myself and others.
PHP-Nuke is a free software released under the GNU/GPL.


:: fisubice phpbb2 style by Daz :: PHP-Nuke theme by www.nukemods.com ::
:: fisubice Theme Modified by the RavenNuke™ Team ::

:: W3C CSS Compliance Validation :: W3C HTML 4.01 Transitional Compliance Validation ::

zerosum