News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

Aligned and Bilateral Child Boards

Started by hhy89, March 23, 2009, 02:53:18 PM

Previous topic - Next topic

Antechinus

Cool. I just took a rough guess at the widths. ;)

You can do four or five columns the same way. Just add another td and change the divisors.

hhy89

Seo4Smf 2.0 - Full Top10 Stats(full top10) - Aligned and Bilateral Child Boards(2li 3lü alt bölümler)
http://www.smfmod.com
http://destek.smfmod.com

dwd2000

QuoteYes it can be done but I'm not sure how many mods he wants to make for the same purpose.

Maybe something in the admin section to allow a choice between 2, 3, or even 4 columns might be a way?

Works great. Thanks.

realign.png - original
realign2.png - on.gif / off.gif aligned top
realign3.png - on.gif / off.gif aligned top and 3 columns
30 years ago I was young and foolish.
Now I'm just young.

DAMMIT JIM...I'M A TWEAKER...NOT A CODER!!!

Dave's Games

edi67

Quote from: Antechinus on March 25, 2009, 04:19:56 AM
Cool. I just took a rough guess at the widths. ;)

You can do four or five columns the same way. Just add another td and change the divisors.

sorry please explain me how i could make it for 4 columns
CrazyZone - My SMF Forum


From the difficult the hardening of the man you can see

Antechinus

#24
The process depends on the number of td cells and the divisors used.
If you look at the difference between the two and three column codes you'll see the extra td cell I added.
The divisor in the first td cell for the two column code is 2, as you would expect for putting half the child boards in each column.

For the three column code the divisor is changed to 3 for the first td cell (to give one third of the child boards in that column) and 1.5 for the second cell (dividing by 1.5 being that same as multiplying by two thirds).  

For a four column code you'd add one more td and change the divisors to 4, 2 and 1.33. This last one may need some tweaking due to rounding errors, since 4/3 is an irrational decimal. Either of 1.32 or 1.34 should work as a limit though.

For five columns, if anyone ever wants them, it's an additional td and the divisors become 5, 2.5, 1.66 and 1.25.
Once again rounding errors may make it necessary to tweak the third one to 1.65 or 1.67. Whichever works best.

ETA: Oh and of course you'd need to adjust the width settings for the td cells. For a start I'd go with 25% for four columns and 20% for five, then play around a bit until it looks right.

dwd2000

Hmmm.

Just noticed it's not working on Child Boards of Child Boards.

Yes, my Child Boards have Child Boards of their own.
(I guess that makes them Grandchild Boards)  ;D

Any ideas?
30 years ago I was young and foolish.
Now I'm just young.

DAMMIT JIM...I'M A TWEAKER...NOT A CODER!!!

Dave's Games

kichu

Child Boards Font is very small.. how to increase ?

hhy89

' . $child['name'] . '
replace
<font size="2">' . $child['name'] . '</font>
Seo4Smf 2.0 - Full Top10 Stats(full top10) - Aligned and Bilateral Child Boards(2li 3lü alt bölümler)
http://www.smfmod.com
http://destek.smfmod.com

kichu


nina-nina

I installed the Aligned and Bilateral Child Boards Mod but my childboards are not aligned even after aplying the mod.  Is there any step I may have missed?  Look below

hhy89

Seo4Smf 2.0 - Full Top10 Stats(full top10) - Aligned and Bilateral Child Boards(2li 3lü alt bölümler)
http://www.smfmod.com
http://destek.smfmod.com

dwd2000

Quote from: hhy89 on March 30, 2009, 08:53:17 AM
give me boardindex.template.php

Wasn't sure if you were saying that to me, nina-nina, or both of us.

My problem is that this is not working on the child boards of my child boards.
30 years ago I was young and foolish.
Now I'm just young.

DAMMIT JIM...I'M A TWEAKER...NOT A CODER!!!

Dave's Games

hhy89

Seo4Smf 2.0 - Full Top10 Stats(full top10) - Aligned and Bilateral Child Boards(2li 3lü alt bölümler)
http://www.smfmod.com
http://destek.smfmod.com

dwd2000

Quote from: hhy89 on March 30, 2009, 08:09:43 PM
can u try it

Didn't work.

It's a great mod. I'm hoping this part can be fixed. It would make it that much better.
30 years ago I was young and foolish.
Now I'm just young.

DAMMIT JIM...I'M A TWEAKER...NOT A CODER!!!

Dave's Games

Antechinus

Those need to be edited in MessageIndex.template.php, not BoardIndex.template.php. The code is much the same, it's just in another template.

spiffypix

hi -

Can someone please tell a noob like me how to get this to work on my template themes as well?  I tried to cut and paste all of that code on the bottom of the mod page into my other theme page.  The child boards did what they were supposed to do, but the stats, calendar, etc all of a sudden moved to the very top of my forum page.

Any ideas?

Thx...Melanie

dwd2000

#36
Quote from: Antechinus on March 31, 2009, 08:04:00 AM
Those need to be edited in MessageIndex.template.php, not BoardIndex.template.php. The code is much the same, it's just in another template.

GOT IT.  ;D

It took a little doing, but it's done.

30 years ago I was young and foolish.
Now I'm just young.

DAMMIT JIM...I'M A TWEAKER...NOT A CODER!!!

Dave's Games

dwd2000

I've reduced the top margin to 10px and added 10px to the bottom margin.
Also used the 3 column edit and changed the tables to 33%, 33% and 34%.

Hope this helps.
30 years ago I was young and foolish.
Now I'm just young.

DAMMIT JIM...I'M A TWEAKER...NOT A CODER!!!

Dave's Games

dwd2000

Quote from: spiffypix on March 31, 2009, 08:57:54 PM
hi -

Can someone please tell a noob like me how to get this to work on my template themes as well?  I tried to cut and paste all of that code on the bottom of the mod page into my other theme page.  The child boards did what they were supposed to do, but the stats, calendar, etc all of a sudden moved to the very top of my forum page.

Any ideas?

Thx...Melanie

You'll need the BoardIndex.template.php from each theme, then do the manual edits.
If you want the "child of child" boards done, you'll have to modify the MessageIndex.template.php from the same theme.

If you are using SMF 2 RC1, I think there's an option to install it into other themes (near the bottom) when you do the initial installation. I'm just using the default theme, although it's heavily modified.
30 years ago I was young and foolish.
Now I'm just young.

DAMMIT JIM...I'M A TWEAKER...NOT A CODER!!!

Dave's Games

Amoreitalia

Quote from: Antechinus on March 31, 2009, 08:04:00 AM
Those need to be edited in MessageIndex.template.php, not BoardIndex.template.php. The code is much the same, it's just in another template.

I could use some help.. i did as you said and put it manually in the MessageIndex.template.php file. It works perfectly, However now im getting an error reading:

8: Undefined index: viewer_text
Line 69.

I know its because of me adding this mod manually. maybe i missplaced something? This is my only error in all of my forums i hope you can help me =(

Advertisement: