[Template]Remove Posts/Threads & Views/Replies bar
Nov 16, 2012 23:40:23 GMT -8
Impy?!, Mrs Twisted, and 1 more like this
Post by pawl on Nov 16, 2012 23:40:23 GMT -8
This came up as a request, and I was in the middle of doing it myself anyway, so I thought I'd just post it here too.
Removing the "Posts & Threads" bar from the main page.
Admin Home -> Themes -> Layout Templates -> Board
Then navigate to the Board List tab.
Look at lines 2-10 and add the text in red.
<!-- <thead>
<tr>
<th class="icon"></th>
<th class="main">Board</th>
<th class="threads">Threads</th>
<th class="posts">Posts</th>
<th class="latest last">Last Post</th>
</tr>
</thead> -->
This will stop the row from displaying on the main page, without actually deleting the code itself. This means if you want to display it again in the future, the code is still there to use. =]
Also, if you want to have the words 'threads' and 'posts' in the appropriate cells, then look at lines 33 and 34, and make the appropriate changes again.
<td class="threads">{if $[board.threads] == -1}N/A{else}$[board.threads]{/if} thread{if $[board.threads] != 1}s{/if}</td>
<td class="posts">{if $[board.posts] == -1}N/A{else}$[board.posts]{/if} post{if $[board.posts] != 1}s{/if}</td>
I also made the following changes to lines 36-45;
<td class="latest last">
{if $[board.posts] > 0}
{if $[board.last_thread]}
Last post: $[board.last_thread.recent_link]<br />
by $[board.last_thread.last_post.created_by_user]<!-- <br />
<span class="date">$[board.last_thread.last_post.date]</span> -->
{/if}
{else}
No posts have been made on this board.
{/if}
</td>
Removing the "Views & Replies" bar from the thread-list page.
Same idea;
Admin Home -> Themes -> Layout Templates -> Board
You'll want the Board tab to begin with, lines 27-37, adding the red text again.
<!-- <thead>
<tr class="head">
<th class="icon"><span class="aria-hidden">Status</span> </th>
<th class="checkbox"> </th>
<th class="main">Subject</th>
<th class="created-by">Created By</th>
<th class="replies">Replies</th>
<th class="views">Views</th>
<th class="latest last">Last Post</th>
</tr>
</thead> -->
Once you've done this, head over to the Thread List tab, lines 17 to 20. This is where you want to add any additional explanation text before or after the numbers.
As an example, here's the one I've used;
<td class="created-by clickable">by $[thread.created_by_user]</td>
<td class="replies clickable">$[thread.replies] repl{if $[thread.num_posts] == 2}y{else}ies{/if}</td>
<td class="views">$[thread.views] view{if $[thread.views] != 1}s{/if}</td>
<td class="latest last">Last post by $[thread.last_post.created_by_user]<br />$[thread.last_post.date]</td>
In these examples, the green text is replaced by the appropriate numbers/words on the page, so you can work out where you want to add your text.
Edit; added [Template] to title.
Removing the "Posts & Threads" bar from the main page.
Admin Home -> Themes -> Layout Templates -> Board
Then navigate to the Board List tab.
Look at lines 2-10 and add the text in red.
<!-- <thead>
<tr>
<th class="icon"></th>
<th class="main">Board</th>
<th class="threads">Threads</th>
<th class="posts">Posts</th>
<th class="latest last">Last Post</th>
</tr>
</thead> -->
This will stop the row from displaying on the main page, without actually deleting the code itself. This means if you want to display it again in the future, the code is still there to use. =]
Also, if you want to have the words 'threads' and 'posts' in the appropriate cells, then look at lines 33 and 34, and make the appropriate changes again.
<td class="threads">{if $[board.threads] == -1}N/A{else}$[board.threads]{/if} thread{if $[board.threads] != 1}s{/if}</td>
<td class="posts">{if $[board.posts] == -1}N/A{else}$[board.posts]{/if} post{if $[board.posts] != 1}s{/if}</td>
I also made the following changes to lines 36-45;
<td class="latest last">
{if $[board.posts] > 0}
{if $[board.last_thread]}
Last post: $[board.last_thread.recent_link]<br />
by $[board.last_thread.last_post.created_by_user]<!-- <br />
<span class="date">$[board.last_thread.last_post.date]</span> -->
{/if}
{else}
No posts have been made on this board.
{/if}
</td>
Removing the "Views & Replies" bar from the thread-list page.
Same idea;
Admin Home -> Themes -> Layout Templates -> Board
You'll want the Board tab to begin with, lines 27-37, adding the red text again.
<!-- <thead>
<tr class="head">
<th class="icon"><span class="aria-hidden">Status</span> </th>
<th class="checkbox"> </th>
<th class="main">Subject</th>
<th class="created-by">Created By</th>
<th class="replies">Replies</th>
<th class="views">Views</th>
<th class="latest last">Last Post</th>
</tr>
</thead> -->
Once you've done this, head over to the Thread List tab, lines 17 to 20. This is where you want to add any additional explanation text before or after the numbers.
As an example, here's the one I've used;
<td class="created-by clickable">by $[thread.created_by_user]</td>
<td class="replies clickable">$[thread.replies] repl{if $[thread.num_posts] == 2}y{else}ies{/if}</td>
<td class="views">$[thread.views] view{if $[thread.views] != 1}s{/if}</td>
<td class="latest last">Last post by $[thread.last_post.created_by_user]<br />$[thread.last_post.date]</td>
In these examples, the green text is replaced by the appropriate numbers/words on the page, so you can work out where you want to add your text.
Edit; added [Template] to title.