MyBB Community Forums

Full Version: [TUTORIAL] How to Add a Moderator Column on Index?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
This tutorial will explain you how to add a Moderator Column on Index, Forumdisplay pages.

First of all, make sure that "display the forum moderators on index" setting is set to ON. You can find this setting in: ACP > Configurations > Settings > Forum Home Options > Forums' Moderator Listing > ON.

Go to: ACP > Templates > Your theme's templates > Forumbit Templates > forumbit_depth1_cat > and find;
<td class="tcat" width="200" align="center"><span class="smalltext"><strong>{$lang->forumbit_lastpost}</strong></span></td>
and Add the following code just After that;
<td class="tcat" width="85" align="center"><span class="smalltext"><strong>{$lang->forumbit_moderated_by}</strong></span></td>

Within the same template, find;
<td class="thead" colspan="5">
and Change 5 to 6 like that;
<td class="thead" colspan="6">

Save template.

Now Open "forumbit_depth2_forum" template, and find the following and Remove;
{$modlist}

Now within the same template, Find
<td class="{$bgcolor}" valign="top" align="right" style="white-space: nowrap">{$lastpost}</td>
and Add the following code just After that;
<td class="{$bgcolor}" valign="top" align="center" style="white-space: nowrap">{$modlist}</td>

Save template.

Now Open "forumbit_moderators" template and find the following and Remove;
<br />{$lang->forumbit_moderated_by} 

Now Open "forumdisplay_subforums" template and find;
<td class="tcat" width="15%" align="center"><span class="smalltext"><strong>{$lang->forumbit_lastpost}</strong></span></td>
and Add the following code just After that;
<td class="tcat" width="7%" align="center"><span class="smalltext"><strong>{$lang->forumbit_moderated_by}</strong></span></td>

Within the same template, find;
<td class="thead" colspan="5"
and Change 5 to 6 like this;
<td class="thead" colspan="6"

At this point it'll be shown like this;
[attachment=24594]

You can see that the usernames on moderator column is plane, no formatting, so here I'll tell you how to format these moderator usernames.

Open ./inc/functions_forumlist.php and find;
$moderators .= "{$comma}<a href=\"".get_profile_link($moderator['id'])."\">".htmlspecialchars_uni($moderator['username'])."</a>";
and Change it into;
$moderators .= "{$comma}<a href=\"".get_profile_link($moderator['id'])."\">".format_name(htmlspecialchars_uni($moderator['username']),$moderator['usergroup'],$moderator['displaygroup'])."</a>";

Now it'll show like this;
[attachment=24595]
Could you make a tutorial on how to increase the height of each thread bar in the thread list view in a section.

For example, see http://www.mebes.net the current height of each thread title bar is too small and the list looks condensed, I'd like to increase the bar height.
(2011-11-04, 02:46 AM)Mebes Net Wrote: [ -> ]Could you make a tutorial on how to increase the height of each thread bar in the thread list view in a section.

For example, see http://www.mebes.net the current height of each thread title bar is too small and the list looks condensed, I'd like to increase the bar height.
1. Go to Admin CP > Templates & Style > Themes > Your Theme > global.css > Advanced Mode.

2. Add this at the bottom:

.forumdisplay_sticky, .forumdisplay_regular {
	padding: 10px;
}

3. Change 10px to something you like.

In the future, it would be ideal if you just created a new thread. Smile
thanks i'll test it, Smile as dysplyed in Startimes i like it
You do know that you can enabled a setting to display the forum moderators on index. The setting is called "Forums' Moderator Listing" under "Forum Home" settings.
Labrocca, I guess they are displayed as linear, they don't have a separate column, this separates them showing in a column.
labrocca has a good point since if the setting "display the forum moderators on index" is set to off then it wouldn't a show moderator's usernames. So empty column wouldn't look good. I'll add this to the First Post aswell.