News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

3rd level Child Boards

Started by Lady Night Owl, November 13, 2008, 07:27:16 PM

Previous topic - Next topic

Lady Night Owl

The height seems to be screwy. Is this changeable in the style sheet - if not, where?

Thanks in advance.
Running SMF 2.0.1

ccbtimewiz


Lady Night Owl

#2
It's a custom theme based on CORE. But, I just checked the default and it looks the same, so maybe it's the height of the cell that needs to be adjusted? I just can't find it in the style sheet.
Running SMF 2.0.1

Bulakbol

It is because MessageIndex.template.php uses "<p>" instead of "<td>" to display child-board names.
Please do not PM me for support · My Mods and Theme · SMF Coding Guidelines · Modifications Approval Guidelines

Antechinus

And I'll be converting all my themes straight back to <td> for stability. I think the use of <p> was a mistake (particularly in BoardIndex.template.php).


Lady Night Owl

Quote from: JohnyB on November 18, 2008, 12:35:54 AM
It is because MessageIndex.template.php uses "<p>" instead of "<td>" to display child-board names.

Oh ok. So would I hurt anything if I changed the <p>'s to <td>'s ?

Quote from: votrungtruong on November 18, 2008, 01:28:44 AM
test

???
Running SMF 2.0.1

Antechinus

I've done it and it doesn't seem to hurt anything, although you may need to play with css classes. Then again, if you're doing a custom theme anyway I imagine you'll be mangling the templates beyond recognition (I sure do) so what's a bit of extra css?

Lady Night Owl

The theme didn't change much from the CORE template/style sheet - it's just different colors, buttons & background really. I'll give it whirl see what happens. Thanks guys!
Running SMF 2.0.1

Antechinus

#9
If that <p> class is listed separately in style.css you could just change the top padding. If it isn't listed you could add it to the css.

Note that for SMF 2 it will not be in the ordinary style.css file. It will be in forum.css under the css folder.
Sorry, I probably should have mentioned that before. I just go ahead and reconstruct the whole template anyway, but that's me.

Lady Night Owl

Thanks, I'll comb through the file and see what I can do <inserts crossed eyes emote here>

Yeah, I'll leave the reconstruction up to you :P as I'm not confident enough in my CSS skills to go and mess around like that. ;)
Running SMF 2.0.1

Lady Night Owl

#11
:( I'm experiencing technical difficulties with this. I found the <p windowbg3 smalltext children> in the MessageIndex.template and what looks like the corresponding code in the forum.css file - but when I change the padding/margins, it doesn't look any different. Any other suggestions? As I pretty much said in my last post, I'm still learning to work with CSS so a lot of what you guys are saying is foreign to me...sorry!

The only thing I see in the forum.css file that has to do with child boards is:


#childboards table
{
width: 100%;
}


and


table.boardsframe p.children
{
border-top: solid 1px #ADADAD;
margin: 0;
padding: 0.5em;
}


And changing those things does nothing - especially in that second piece.
Running SMF 2.0.1

Antechinus

Well that border is definitely there in your screenshot so you seem to have the right class there.
Try this:

table.boardsframe p.children
{
   border-top: solid 1px #ADADAD;
   margin: 0;
   padding: 1.0em 0.5em 0.5em 0.5em;
}


Not promising it'll work but give it a shot and see what happens.

ETA: Are you doing a forced refresh after each code change ( Ctrl+F5) ?

Lady Night Owl

That didn't work - thank you though :)

Yes, I am doing the forced refresh - nothing changes. :(
Running SMF 2.0.1

Antechinus

Ok, now you've got me curious. Firing up local host now. ;)

Antechinus

Got it. It involves putting nasty nasty styling back into those ever so semantic new templates but dammit, it works. ;D

This starts on Line 71 of an unmodified MessageIndex.template:

// Has it posts awaiting approval?
if ($child['can_approve_posts'] && ($child['unapproved_posts'] || $child['unapproved_topics']))
$child['link'] .= ' <a href="' . $scripturl . '?action=moderate;area=postmod;sa=' . ($child['unapproved_topics'] ? 'topics' : 'posts') . ';brd=' . $child['id'] . ';sesc=' . $context['session_id'] . '" title="' . sprintf($txt['unapproved_posts'] . $child['unapproved_topics'] . $child['unapproved_posts']) . '" class="moderation_link">(!)</a>';
$children[] = $child['new'] ? '<b>' . $child['link'] . '</strong>' : $child['link'];
}
echo '
<p class="windowbg3 smalltext children" style="padding-top: 0.5em;"><strong>', $txt['parent_boards'], '</strong>: ', implode(', ', $children), '</p>';
}


The top padding is the important bit. Everything else is standard.

Lady Night Owl

Well, I'll be damned!  :D

It does work, you're awesome! Thanks a million!!! 8)
Running SMF 2.0.1

Antechinus

No worries. I learnt something out of it too. If you want to preserve the sanctity of the holy semantic templates you could create a new class for it and do the styling in forum.css. Up to you. Wont make any difference to how your theme functions AFAIK.

Lady Night Owl

Hehe, I think I'll just leave it as is if the functionality is all the same. ;)
Running SMF 2.0.1

Advertisement: