Post by pawl on Nov 18, 2012 20:45:00 GMT -8
Expanded slightly on a request here.
Please make sure before committing to any changes that you have some sort of backup of your original templates. You can either copy them in a Notepad (or similar) file on your computer and save them, or open a duplicate tab of the Template page in your browser and not touch it. This way, should you make any mistakes that you want to undo, you have a copy of your original settings, which could save you no end of frustration.
Before you start this modification, I would recommend you look at this thread, and either remove the "Posts & Threads" bar first, or remove the relevant cells from the bar. Failure to do this will result in the following code not working properly within the board table structure.
Admin Panel -> Themes -> Layout Templates -> Board -> [ tab ] Board List
Head to Lines 15-45, and look below.
Please note that at no point is any of the code being deleted - instead we are simply commenting it out using <!-- and -->
This means that the commented code will not display on page-load, but will still be in the template if you want it back at any point.
<!-- <td class="icon">$[board.icon]</td> -->
<!-- <td class="main clickable">
<span class="link">$[board]</span><br />
<p class="description">$[board.description]</p>
{if $[board.num_mods]}
<p class="moderators">
Moderator{if $[board.num_mods] != 1}s{/if}:
{foreach $[board.moderator_group]}$[board.moderator_group.comma_before] $[board.moderator_group]{/foreach}{if $[board.moderator]}{if $[board.moderator_group]}, {/if}{/if}
{foreach $[board.moderator]}$[board.moderator]$[board.moderator.comma] {/foreach}
</p>
{/if}
{if $[board.sub_board]}
<p class="sub-boards">
Sub-board{if $[board.sub_board] != 1}s{/if}:
{foreach $[board.sub_board]}$[board.sub_board]$[board.sub_board.comma] {/foreach}
</p>
{/if}
</td> -->
<!-- <td class="threads">{if $[board.threads] == -1}N/A{else}$[board.threads]{/if}</td> -->
<!-- <td class="posts">{if $[board.posts] == -1}N/A{else}$[board.posts]{/if}</td> -->
<!-- <td class="latest last">
{if $[board.posts] > 0}
{if $[board.last_thread]}
$[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> -->
Adding the purple text will remove the column for on/off icons (new post indicators).
Adding the blue text will remove the column for the board name & description.
Adding the green text will remove the column showing the number of threads in a board.
Adding the red text will remove the column showing the number of posts in a board.
Adding the orange text will remove the column showing the last post made to the board.
If you wish to display the information you've removed somewhere else (for example, merging the threads/posts/last post columns), look for the variables within the sections you're commenting out. For example, adding $[board.threads] will show the number of threads in the board, in any of the other columns.
At approximately line 50, you will find the following;
<td class="main clickable redirect last" colspan="4">
For every column that you remove, decrease the number in brown by one. This will make sure that a board set up as a redirect will display correctly.
Additionally, if you want to resize the cells that are left, look at the following (this is something I've yet to play with properly, so be prepared for a little trial-and-error - don't forget what I said about backups!)
Admin Panel -> Themes -> Colours & Styles -> Style Sheet -> [ Tab ] Style Sheet
Lines 843-846 are copied below;
.boards .main { width: 59%; text-align: @board_align_main; }
.boards .threads { width: 9%; text-align: @board_align_threads; white-space: nowrap; }
.boards .posts { width: 8%; text-align: @board_align_posts; white-space: nowrap; }
.boards .latest { width: 20%; text-align: @board_align_last_post; }
Each of these has been coloured to show you the width of the cells they represented in the code above (the on/off icon doesn't seem to feature here) before you removed them, and can be modified.
I would recommend that if you still have the on/off icon column, that you keep the values of your remaining columns adding up to 96% (the current total - I assume the icon column is set at 4%).
For example if you removed the latest column, you might use 69%, 14% and 13% for the remaining cells.
If however you have removed the on/off column, I would suggest making the four (or less) remaining values add up to the full 100%
Lastly, if you remove the 'Last post' column, or rearrange the boards, make sure that the last column has the last highlighted in bold in the td class. This will make sure that the forum borders are properly displayed.
Hope this has helped, feel free to ask any questions/post any problems. =]
Please make sure before committing to any changes that you have some sort of backup of your original templates. You can either copy them in a Notepad (or similar) file on your computer and save them, or open a duplicate tab of the Template page in your browser and not touch it. This way, should you make any mistakes that you want to undo, you have a copy of your original settings, which could save you no end of frustration.
Before you start this modification, I would recommend you look at this thread, and either remove the "Posts & Threads" bar first, or remove the relevant cells from the bar. Failure to do this will result in the following code not working properly within the board table structure.
Admin Panel -> Themes -> Layout Templates -> Board -> [ tab ] Board List
Head to Lines 15-45, and look below.
Please note that at no point is any of the code being deleted - instead we are simply commenting it out using <!-- and -->
This means that the commented code will not display on page-load, but will still be in the template if you want it back at any point.
<!-- <td class="icon">$[board.icon]</td> -->
<!-- <td class="main clickable">
<span class="link">$[board]</span><br />
<p class="description">$[board.description]</p>
{if $[board.num_mods]}
<p class="moderators">
Moderator{if $[board.num_mods] != 1}s{/if}:
{foreach $[board.moderator_group]}$[board.moderator_group.comma_before] $[board.moderator_group]{/foreach}{if $[board.moderator]}{if $[board.moderator_group]}, {/if}{/if}
{foreach $[board.moderator]}$[board.moderator]$[board.moderator.comma] {/foreach}
</p>
{/if}
{if $[board.sub_board]}
<p class="sub-boards">
Sub-board{if $[board.sub_board] != 1}s{/if}:
{foreach $[board.sub_board]}$[board.sub_board]$[board.sub_board.comma] {/foreach}
</p>
{/if}
</td> -->
<!-- <td class="threads">{if $[board.threads] == -1}N/A{else}$[board.threads]{/if}</td> -->
<!-- <td class="posts">{if $[board.posts] == -1}N/A{else}$[board.posts]{/if}</td> -->
<!-- <td class="latest last">
{if $[board.posts] > 0}
{if $[board.last_thread]}
$[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> -->
Adding the purple text will remove the column for on/off icons (new post indicators).
Adding the blue text will remove the column for the board name & description.
Adding the green text will remove the column showing the number of threads in a board.
Adding the red text will remove the column showing the number of posts in a board.
Adding the orange text will remove the column showing the last post made to the board.
If you wish to display the information you've removed somewhere else (for example, merging the threads/posts/last post columns), look for the variables within the sections you're commenting out. For example, adding $[board.threads] will show the number of threads in the board, in any of the other columns.
At approximately line 50, you will find the following;
<td class="main clickable redirect last" colspan="4">
For every column that you remove, decrease the number in brown by one. This will make sure that a board set up as a redirect will display correctly.
Additionally, if you want to resize the cells that are left, look at the following (this is something I've yet to play with properly, so be prepared for a little trial-and-error - don't forget what I said about backups!)
Admin Panel -> Themes -> Colours & Styles -> Style Sheet -> [ Tab ] Style Sheet
Lines 843-846 are copied below;
.boards .main { width: 59%; text-align: @board_align_main; }
.boards .threads { width: 9%; text-align: @board_align_threads; white-space: nowrap; }
.boards .posts { width: 8%; text-align: @board_align_posts; white-space: nowrap; }
.boards .latest { width: 20%; text-align: @board_align_last_post; }
Each of these has been coloured to show you the width of the cells they represented in the code above (the on/off icon doesn't seem to feature here) before you removed them, and can be modified.
I would recommend that if you still have the on/off icon column, that you keep the values of your remaining columns adding up to 96% (the current total - I assume the icon column is set at 4%).
For example if you removed the latest column, you might use 69%, 14% and 13% for the remaining cells.
If however you have removed the on/off column, I would suggest making the four (or less) remaining values add up to the full 100%
Lastly, if you remove the 'Last post' column, or rearrange the boards, make sure that the last column has the last highlighted in bold in the td class. This will make sure that the forum borders are properly displayed.
Hope this has helped, feel free to ask any questions/post any problems. =]