MyBB Community Forums

Full Version: Trying to style subforums like regular categories/forums?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
(I'm pretty sure this goes here in Development rather than in Support. Correct me if I'm wrong.)

I'm not good at putting things into words, so here are some pictures.

This is a category.
This is what the inside of the forum Announcements looks like.
Announcements is set as a forum.

This is what I want the inside of Announcements to look like.
Womp and Doh are set as categories. Uno, Dos, and Tres are set as forums. Sketched up roughly with Photoshop. (The "New Thread" button accidentally got cut off.)

So far, I can only get this.
(Sorry for the different skin. The forums/threads/posts/latestposts top row is meant to be invisible.)

Any ideas? I can't find a comprehensive list of variables ({$orwhateveryoucallthese}), and I'm not self-hosting so I'm limited to the plugins I can use, which means no PHP. (I think. It's to my understanding that you can only put PHP in templates with a plugin.)

It's also pulling thread and post data from the parent forums (Womp or Doh), which lies in that I'm calling them with {forum['value']} variables instead of subforum variables, I guess. But replacing "forum" with "subforum" or "subforums" doesn't work. If only it were that easy. I can't figure out where - and if - it stores the values of subforum information (description, number of threads, number of replies, and latest reply).

I basically just copied and pasted part of forumbit_depth2_forum into depth2_cat.

forumbit_depth2_cat
<table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" class="tborder">
<thead>
<tr>
<td class="thead" colspan="5">
<div class="expcolimage"><img src="{$theme['imgdir']}/{$expcolimage}" id="cat_{$forum['fid']}_img" class="expander" alt="{$expaltext}" title="{$expaltext}" /></div>
<div><strong><a href="{$forum_url}">{$forum['name']}</a></strong><br /><div class="smalltext">{$forum['description']}</div></div>
</td>
</tr>
</thead>
<tbody style="{$expdisplay}" id="cat_{$forum['fid']}_e">
<tr>
<td class="tcat" colspan="2"><span class="smalltext"><strong>{$lang->forumbit_forum}</strong></span></td>
<td class="tcat" width="85" align="center" style="white-space: nowrap"><span class="smalltext"><strong>{$lang->forumbit_threads}</strong></span></td>
<td class="tcat" width="85" align="center" style="white-space: nowrap"><span class="smalltext"><strong>{$lang->forumbit_posts}</strong></span></td>
<td class="tcat" width="200" align="center"><span class="smalltext"><strong>{$lang->forumbit_lastpost}</strong></span></td>
</tr>

<tr>
<td class="{$bgcolor}" align="center" valign="top" width="1"><img src="{$theme['imgdir']}/{$lightbulb['folder']}.gif" alt="{$lightbulb['altonoff']}" title="{$lightbulb['altonoff']}" class="ajax_mark_read" id="mark_read_{$forum['fid']}" /></td>
<td class="{$bgcolor}" valign="top">
<strong>{$subforums}</strong><div class="desc" style="font-size:11px">{$modlist}<span class="description"></span></div>
</td>
<td class="{$bgcolor}" valign="top" align="center" style="white-space: nowrap">{$threads}{$unapproved['unapproved_threads']}</td>
<td class="{$bgcolor}" valign="top" align="center" style="white-space: nowrap">{$posts}{$unapproved['unapproved_posts']}</td>
<td class="{$bgcolor}" valign="top" align="left" style="white-space: nowrap">{$lastpost}</td>
</tr>

</tbody>
</table>
<br />

forumbit_subforums
{$subforums}

forumdisplay_subforums
<table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" class="tborder">
<tr>
<td class="thead" colspan="5" align="center"><strong>{$lang->sub_forums_in}</strong></td>
</tr>
<tr>
<td class="tcat" width="2%">&nbsp;</td>
<td class="tcat" width="59%"><span class="smalltext"><strong>{$lang->forumbit_forum}</strong></span></td>
<td class="tcat" width="7%" align="center" style="white-space: nowrap"><span class="smalltext"><strong>{$lang->forumbit_threads}</strong></span></td>
<td class="tcat" width="7%" align="center" style="white-space: nowrap"><span class="smalltext"><strong>{$lang->forumbit_posts}</strong></span></td>
<td class="tcat" width="15%" align="center"><span class="smalltext"><strong>{$lang->forumbit_lastpost}</strong></span></td>
</tr>
{$forums}
</table>
<br />