MyBB Community Forums

Full Version: How To Make {$subforums} Into Multiple Columns?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
(2014-06-25, 05:06 AM)Poliwag Wrote: [ -> ]Open forumbit_subforums and replace all contest with this:
<style>
.alt_sbc {
    list-style: none; 
    margin: 0; 
    padding: 0;
}
.alt_sbc li {
    width: 50%; 
    float: left;
}
</style>

<ul class="alt_sbc">{$sub_forums}</ul>

Open
forumbit_depth3_statusicon
and add an <li> before the code, like this
<li><img src="{$theme['imgdir']}/{$lightbulb['folder']}.gif" alt="{$lightbulb['altonoff']}" title="{$lightbulb['altonoff']}" class="subforumicon ajax_mark_read" id="mark_read_{$forum['fid']}" />
Open
forumbit_depth3
and replace everything with is:
{$statusicon}<a href="{$forum_url}" title="{$forum_viewers_text_plain}">{$forum['name']}</a></li>

This should give you your desired effect.

I did it, and I will repeat what I wrote in the post above:

There are 2 problems with this:

1. I need the columns going down, not horizontally across, as I showed in 2nd screenshot in my 1st post.

Right now they go like this:

1st Subforum, 2nd Subforum, 3rd Subforum,
4th Subforum, 5th Subforum, 6th Subforum,
7th Subforum

I need them like this:

1st Subforum, 4th Subforum, 7th Subforum
2nd Subforum, 5th Subforum,
3rd Subforum, 6th Subforum,

2. I need to specify that 3 rows should get filled out in each column, before filling up the next column.

Does anyone know how I would achieve this? Either with CSS, PHP, Template Conditionals, or Template Edits?
Why not just change display order for each subforum that you need in another place ?
Pages: 1 2