mcor

Moderator column on index page

Add a new column to the index page showing forum-specific Moderators next to their respective forum(s). This was default in phpBB1, and has proved a popular feature in other bulletin board solutions ever since.

What we’re trying to achieve

Quite simply we’re going to learn how to add a “Moderator” column to the index page, after the “last post” column . If the Administrator has set forum-specific moderators they will be displayed next to their respective forums.

Preparation

To complete this tutorial, you’ll need a decent Source Code Editor.

Step 1) HTML Edits

Here we’re simply placing the code and the necessary IF statements. We’ll also remove the old “Moderators:” display from below the forum description. It won’t look quite right until we add the CSS later.

Open: /styles/prosilver/template/forumlist_body.html

Find:

<dd class="posts">{L_POSTS}</dd>

Below, Add:

<dd class="moderators">{L_MODERATORS}</dd>

Find:

<dd class="posts">{forumrow.POSTS} <dfn>{L_POSTS}</dfn></dd>

After, Add:

<dd class="moderators"><!-- IF forumrow.MODERATORS -->{forumrow.MODERATORS}<!-- ELSE -->--<!-- ENDIF --></dd>

Find and delete:

<!-- IF forumrow.MODERATORS -->
    <br /><strong>{forumrow.L_MODERATOR_STR}:</strong> {forumrow.MODERATORS}
<!-- ENDIF -->

Step 2) CSS Edits

At this point your index page should be looking pretty messy. We need to cut down the width of the topiclist <dt> tag (and some of the “last post” column) to accommodate the width of the Moderator column, then add some styling rules for the moderator column.

Open: /styles/prosilver/theme/content.css

Find:

ul.topiclist dt {
    display: block;
    float: left;
    width: 50%;
    font-size: 1.1em;
    padding-left: 5px;
    padding-right: 5px;
}

Replace with:

ul.topiclist dt {
    display: block;
    float: left;
    width: 40%;
    font-size: 1.1em;
    padding-left: 5px;
    padding-right: 5px;
}

Find:

dd.lastpost {
    width: 25%;
    font-size: 1.1em;
}

Replace with:

dd.lastpost {
    width: 20%;
    font-size: 1.1em;
}

Below that, Add:

dd.moderators {
    width: 15%;
    font-size: 1.1em;
    text-align: center;
    line-height: 2.2em;
}

Finishing off

What you should now see is a Moderator column on the index page (and on viewforum.php if you have subforums). If the Administrator hasn’t assigned any forum-specific Moderators, two dashes “–” will be displayed instead. To set forum-specific Moderators, click: ACP → “Permissions” tab → Forum Moderators, then choose your forums and add users using the bottom-left box. Also make sure “Enable display of moderators:” is enabled in ACP → Load Settings.

Support / Donations

If you find a mistake in this tutorial, please let me know. Did you find this tutorial useful? Make a donation. If you’re having trouble implementing this on your board, ask for help. Thanks!