This section contains detailed articles elaborating on some of the common issues phpBB users encounter while using the product. Articles submitted by members of the community are checked for accuracy by the relevant phpBB Team. If you do not find the answer to your question here, we recommend looking through the Support Section as well as using the Site Wide Search.

Add an "Author" column to Prosilver

Description: Add a Subsilver2-inspired "Author" column to Prosilver's viewforum page.

In Categories:

Link to this article: Select All
[url=https://www.phpbb.com/support/docs/en/3.0/kb/article/add-an+quotauthor+quot-column-to-prosilver/]Knowledge Base - Add an "Author" column to Prosilver[/url]

Introduction
One of the noticeable differences between Prosilver and Subsilver2 is the lack of "Author" column in viewforum. With a few simple edits it's possible to add this column whilst still maintaining a consistent structure across the rest of your board.

What we'll achieve in this guide:
Image

CSS Edits
Firstly, we will reduce the width of the "last post" column to accommodate the new "Author" column. Then we'll add a new CSS class for the Author column so that it displays correctly.

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

Find:

Code: Select all

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

Replace with:

Code: Select all

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

Find:

Code: Select all

dd.posts, dd.topics, dd.views {
   width: 8%;
   text-align: center;
   line-height: 2.2em;
   font-size: 1.2em;
}

Below, Add:

Code: Select all

dd.author {
   width: 10%;
   text-align: center;
   line-height: 2.2em;
   font-size: 1.2em;
}


HTML Edits
Now we're going to physically add the new column to viewforum. We'll also remove the post author from below the Topic Title as there's no need to have it twice - and it'll look a lot cleaner.

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

Find:

Code: Select all

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

Before, Add:

Code: Select all

<dd class="author">{L_AUTHOR}</dd>

Find:

Code: Select all

<dd class="posts">{topicrow.REPLIES} <dfn>{L_REPLIES}</dfn></dd>

Before, Add:

Code: Select all

<dd class="author">{topicrow.TOPIC_AUTHOR_FULL}</dd>

Find:

Code: Select all

<!-- IF topicrow.ATTACH_ICON_IMG -->{topicrow.ATTACH_ICON_IMG} <!-- ENDIF -->{L_POST_BY_AUTHOR} {topicrow.TOPIC_AUTHOR_FULL} &raquo; {topicrow.FIRST_POST_TIME}

Replace with:

Code: Select all

<!-- IF topicrow.ATTACH_ICON_IMG -->{topicrow.ATTACH_ICON_IMG} <!-- ENDIF -->{L_POSTED} &raquo; {topicrow.FIRST_POST_TIME}


Finishing off
Save and Upload the modified files.

To see the changes take effect, you need to refresh your theme and template cache:
Admin Panel -> Styles Tab -> Style Components -> Themes -> Prosilver -> Refresh
Admin Panel -> Styles Tab -> Style Components -> Templates -> Prosilver -> Refresh
.

Assuming you followed the instructions correctly you'll now have a nice clean Author column, just like Subsilver2. These edits should work on Prosilver based styles.

Enjoy :)