Arrange boards according to how many columns

Started by SFF Forum, May 08, 2011, 06:24:36 AM

Previous topic - Next topic

SFF Forum

#40
Joker™,you did a lot of job and is great.But i am sorry to show my testing result for the new codes.

The two boards can't stay in a line when the last poster's name is a long one or there are two/three words ,it can make the board too large.

And when the board has many child boards it can make the board too large,too.

It seems that it can't work well on smf for my layout with your newest code.

So please think about this theme, http://custom.simplemachines.org/themes/index.php?lemma=1358 (justboards_andcats) if you can.It can slove all these problem



I Love Simple Machines Forum .

Joker™

To solve your problem we can remove the topics and post count column and put the numbers in the foot of board name. This will give us an opportunity to increase the size of last post column.
Github Profile
Android apps
Medium

How to enable Post Moderation

"For the wise man looks into space and he knows there is no limited dimensions." - Laozi

All support seeking PM's get microwaved

SFF Forum

Quote from: Joker™ on May 12, 2011, 10:01:02 AM
To solve your problem we can remove the topics and post count column and put the numbers in the foot of board name. This will give us an opportunity to increase the size of last post column.

Yes,it is also a good idea.
I Love Simple Machines Forum .

Joker™

How about something like this (see pic attached)

Don't look that much at column size of empty boards as on live site no one leave boards that much empty :P. Also the board having a lot of boards is having the board description of 80 characters which I think is more than enough size.

Also in this look need to work on to align the image in center, add some paddings here and there and have to arrange some stuff to make it to look more clean.

Hope someone likes this styling 8).
Github Profile
Android apps
Medium

How to enable Post Moderation

"For the wise man looks into space and he knows there is no limited dimensions." - Laozi

All support seeking PM's get microwaved

SFF Forum

#44
Good job!! Hoping for your new codes :laugh:
And do you decide to put the post station(xpost xtopic) in the center,how about on the left?

I Love Simple Machines Forum .

Joker™

So you have to make a lot of edits, remove all previous edits make a backup of the file before editing it


Code (Find:) Select
<div class="tborder" style="margin-top: ' , $first ? '0;' : '1ex;' , '' , $context['browser']['needs_size_fix'] && !$context['browser']['is_ie6'] ? 'width: 100%;' : '', '">



Code (Replace it with:) Select
<div class="tborder boardsep" style="margin-top: ' , $first ? '0;' : '1ex;' , '' , $context['browser']['needs_size_fix'] && !$context['browser']['is_ie6'] ? 'width: 100%;' : '', '">



Code (Find:) Select
echo '
<table border="0" width="100%" cellspacing="1" cellpadding="5" class="bordercolor" style="margin-top: 1px;">';

/* Each board in each category's boards has:
new (is it new?), id, name, description, moderators (see below), link_moderators (just a list.),
children (see below.), link_children (easier to use.), children_new (are they new?),
topics (# of), posts (# of), link, href, and last_post. (see below.) */
foreach ($category['boards'] as $board)
{

echo '



Code (Replace it with:) Select
/* Each board in each category's boards has:
new (is it new?), id, name, description, moderators (see below), link_moderators (just a list.),
children (see below.), link_children (easier to use.), children_new (are they new?),
topics (# of), posts (# of), link, href, and last_post. (see below.) */
foreach ($category['boards'] as $board)
{
echo '<table class="boardborder" cellspacing="0" cellpadding="0">



Code (Find:) Select
<td ' , !empty($board['children']) ? 'rowspan="2"' : '' , ' class="windowbg" width="6%" align="center" valign="top"><a href="', $scripturl, '?action=unread;board=', $board['id'], '.0">';


Code (replace it with:) Select
<td ' , !empty($board['children']) ? 'rowspan="4"' : 'rowspan="3"' , ' class="windowbg" width="3%" align="center" valign="middle" style="border-right: 1px solid #476C8E;"><a href="', $scripturl, '?action=unread;board=', $board['id'], '.0">';



Code (Find:) Select
// If the board is new, show a strong indicator.
if ($board['new'])
echo '<img src="', $settings['images_url'], '/on.gif" alt="', $txt[333], '" title="', $txt[333], '" />';
// This board doesn't have new posts, but its children do.
elseif ($board['children_new'])
echo '<img src="', $settings['images_url'], '/on2.gif" alt="', $txt[333], '" title="', $txt[333], '" />';
// No new posts at all! The agony!!
else
echo '<img src="', $settings['images_url'], '/off.gif" alt="', $txt[334], '" title="', $txt[334], '" />';



Code (Replace it with:) Select
// If the board is new, show a strong indicator.
if ($board['new'])
echo '<img style="valign:middle;" src="', $settings['images_url'], '/on.gif" alt="', $txt[333], '" title="', $txt[333], '" />';
// This board doesn't have new posts, but its children do.
elseif ($board['children_new'])
echo '<img style="valign:middle;" src="', $settings['images_url'], '/on2.gif" alt="', $txt[333], '" title="', $txt[333], '" />';
// No new posts at all! The agony!!
else
echo '<img style="valign:middle;" src="', $settings['images_url'], '/off.gif" alt="', $txt[334], '" title="', $txt[334], '" />';




Code (Find:) Select
<td class="windowbg2">



Code (Replace it with:) Select
<td class="windowbg2" style="padding: 0 5px;">



Code (Find:) Select
<div style="padding-top: 1px;" class="smalltext"><i>', count($board['moderators']) == 1 ? $txt[298] : $txt[299], ': ', implode(', ', $board['link_moderators']), '</i></div>';



Code (Replace it with:) Select
<br /><div style="padding-top: 1px; float:right;" class="smalltext"><i>', count($board['moderators']) == 1 ? $txt[298] : $txt[299], ': ', implode(', ', $board['link_moderators']), '</i></div>';




Code (Find:) Select
<td class="windowbg" valign="middle" align="center" style="width: 12ex;"><span class="smalltext">
', $board['posts'], ' ', $txt[21], ' <br />
', $board['topics'],' ', $txt[330], '
</span></td>

<td class="windowbg2" valign="middle" width="22%">
<span class="smalltext">';



Code (Replace it with:) Select
</tr>
<tr>
<td class="windowbg" valign="middle" style="width: 12ex;padding: 0 5px;"><span class="smalltext">
', '(', $board['posts'], ' ', $txt[21], ' ,
', $board['topics'],' ', $txt[330], ')','
</span></td>
</tr>
<td class="windowbg2" valign="middle" width="22%" style="padding: 0 5px;">
<span class="smalltext">';



Code (Find:) Select
<td colspan="3" class="windowbg', !empty($settings['seperate_sticky_lock']) ? '3' : '', '">



Code (Replace it with:) Select
<td style="padding: 0 5px;" colspan="3" class="windowbg', !empty($settings['seperate_sticky_lock']) ? '3' : '', '">



Code (Find:) Select
</tr>';
}
}
echo '
</table>';
}



Code (Replace it with:) Select
</tr>';
}

echo '
</table>';
}
}
Github Profile
Android apps
Medium

How to enable Post Moderation

"For the wise man looks into space and he knows there is no limited dimensions." - Laozi

All support seeking PM's get microwaved

SFF Forum

Thank you, i think you have success this time,i will try it at once ;D
I Love Simple Machines Forum .

SFF Forum

It is working now,thanks for your hard work these days.You make a best theme ever.It will make my big forum tidy and short. :D

Hope that anyone else can enjoy your work,too.

Big thanks
I Love Simple Machines Forum .

Joker™

Quote from: SFF Forum on May 15, 2011, 11:26:30 AM
It is working now,thanks for your hard work these days.You make a best theme ever.It will make my big forum tidy and short. :D

Hope that anyone else can enjoy your work,too.

Big thanks
If I get some time out of schedule I'll make a 2-3 column board theme for SMF 2 (right now it seems to be impossible for me :P).
Github Profile
Android apps
Medium

How to enable Post Moderation

"For the wise man looks into space and he knows there is no limited dimensions." - Laozi

All support seeking PM's get microwaved

SFF Forum

Quote from: Joker™ on May 16, 2011, 01:20:33 AM
Quote from: SFF Forum on May 15, 2011, 11:26:30 AM
It is working now,thanks for your hard work these days.You make a best theme ever.It will make my big forum tidy and short. :D

Hope that anyone else can enjoy your work,too.

Big thanks
If I get some time out of schedule I'll make a 2-3 column board theme for SMF 2 (right now it seems to be impossible for me :P).

IF it has a setting pandel i think it is more better,people can set use column or not
I Love Simple Machines Forum .

Joker™

Quote from: SFF Forum on May 16, 2011, 01:50:51 AM
IF it has a setting pandel i think it is more better,people can set use column or not
Yeah I was also thinking of it. Let's see how fast can I start working over it as by next weak my exams are also starting (I hate them).
Github Profile
Android apps
Medium

How to enable Post Moderation

"For the wise man looks into space and he knows there is no limited dimensions." - Laozi

All support seeking PM's get microwaved

Advertisement: