Post by Former Member on Aug 5, 2014 2:38:07 GMT -8
Show The Number of PARTICIPANTS of latest thread at top of boards
Tested - Chrome - Firefox - Internet Explorer 11
Latest Versions
Go - Admin - Structure - Layout Templates - Board
And Copy & Paste The Code Below
At The TOP OF THE BOARD TEMPLATE
UPDATED
TO NOT SHOW ON THE RECENT THREAD PAGE
- RECENT POST PAGE - BOOKMARKS - USERS RECENT THREAD PAGE
WITH A LITTLE HELP FROM David Clark
<!-- Template Show Number PARTICIPANTS of latest thread at top of boards by xsteveuk -->
{if $[route.name] != "recent_threads" && $[route.name] != "all_recent_posts" && $[route.name] != "bookmarks" && $[route.name] != "recent_posts" && $[route.name] != "recent_threads_created"}
<div class="container" id="boardtop1-important"><center>
<div style="padding:2px;border:1px dashed #cccccc;border-radius:5px; text-align:center;"> <font size="3">
<br>Our Latest Thread This Board $[board.display_name]<br> $[board.last_thread.recent_link] By $[board.last_thread.created_by] <i>Replies</i> $[board.last_thread.replies]<br>Last poster to post/comment $[board.last_thread.last_post.created_by]<br>$[board.last_thread.last_post.created_on]
<br><br></font></div></center>
</div><script type="text/javascript">
$('#boardtop1-important .thread-participants').after($('#boardtop1-important .thread-participants').html());
$('#boardtop1-important .thread-participants').hide();</script><br />{/if}
It will show the latest post on the top OF ALL BOARDS
And add the number of replies
THAT THE LAST THREAD HAS RECEIVED
THE PARTICIPANTS NUMBER
IS NOT CLICK-ABLE
IT SHOWS THE ACTIVE NUMBER OF REPLIES
Of THE LATEST THREAD POSTED
ON ALL THE BOARDS
See Screenshots
How it looks on my forum
Check This Post For Any Update!
A BIG THANK YOU TO Brian for the fix and update
If you wish to show the thread views count also
See screenshot
Then use the code below
UPDATED
TO NOT SHOW ON THE RECENT THREAD PAGE
RECENT POST PAGE - BOOKMARKS - USERS RECENT THREAD PAGE
<!-- Template Show Number PARTICIPANTS of latest thread at top of boards by xsteveuk -->
{if $[route.name] != "recent_threads" && $[route.name] != "all_recent_posts" && $[route.name] != "bookmarks" && $[route.name] != "recent_posts" && $[route.name] != "recent_threads_created"}
<div class="container" id="boardtop1-important">
<center>
<div style="padding:2px;border:1px dashed #cccccc;border-radius:5px; text-align:center;"> <font size="3">
<br>Our Latest Thread This Board $[board.display_name]<br> $[board.last_thread.recent_link] By $[board.last_thread.created_by] $[board.last_thread.replies] <i>Replies</i><br>(Viewed $[board.last_thread.views] time{if $[thread.views] != 1}s){/if}<br>Last poster to post/comment $[board.last_thread.last_post.created_by]<br>$[board.last_thread.last_post.created_on]
<br><br></font></div></center>
</div>
<script type="text/javascript">
$('#boardtop1-important .thread-participants').after($('#boardtop1-important .thread-participants').html());
$('#boardtop1-important .thread-participants').hide();
</script><br />{/if}
Steve
If you wish to change replies to comments
Try changing this line
$[board.last_thread.replies] <i>Replies</i>
To
<br>This Post Has Received $[board.last_thread.replies] Comment{if $[board.last_thread.num_posts] != 2}s{/if}
Thanks to Nori
EDITED UPDATED:
To fix issue with the container showing on the members recent threads page
Reminder you can always click on the preview button to view how it look
Before saving any changes to your template.
Tested - Chrome - Firefox - Internet Explorer 11
Latest Versions
Go - Admin - Structure - Layout Templates - Board
And Copy & Paste The Code Below
At The TOP OF THE BOARD TEMPLATE
UPDATED
TO NOT SHOW ON THE RECENT THREAD PAGE
- RECENT POST PAGE - BOOKMARKS - USERS RECENT THREAD PAGE
WITH A LITTLE HELP FROM David Clark
<!-- Template Show Number PARTICIPANTS of latest thread at top of boards by xsteveuk -->
{if $[route.name] != "recent_threads" && $[route.name] != "all_recent_posts" && $[route.name] != "bookmarks" && $[route.name] != "recent_posts" && $[route.name] != "recent_threads_created"}
<div class="container" id="boardtop1-important"><center>
<div style="padding:2px;border:1px dashed #cccccc;border-radius:5px; text-align:center;"> <font size="3">
<br>Our Latest Thread This Board $[board.display_name]<br> $[board.last_thread.recent_link] By $[board.last_thread.created_by] <i>Replies</i> $[board.last_thread.replies]<br>Last poster to post/comment $[board.last_thread.last_post.created_by]<br>$[board.last_thread.last_post.created_on]
<br><br></font></div></center>
</div><script type="text/javascript">
$('#boardtop1-important .thread-participants').after($('#boardtop1-important .thread-participants').html());
$('#boardtop1-important .thread-participants').hide();</script><br />{/if}
It will show the latest post on the top OF ALL BOARDS
And add the number of replies
THAT THE LAST THREAD HAS RECEIVED
THE PARTICIPANTS NUMBER
IS NOT CLICK-ABLE
IT SHOWS THE ACTIVE NUMBER OF REPLIES
Of THE LATEST THREAD POSTED
ON ALL THE BOARDS
See Screenshots
How it looks on my forum
Check This Post For Any Update!
A BIG THANK YOU TO Brian for the fix and update
If you wish to show the thread views count also
See screenshot
Then use the code below
UPDATED
TO NOT SHOW ON THE RECENT THREAD PAGE
RECENT POST PAGE - BOOKMARKS - USERS RECENT THREAD PAGE
<!-- Template Show Number PARTICIPANTS of latest thread at top of boards by xsteveuk -->
{if $[route.name] != "recent_threads" && $[route.name] != "all_recent_posts" && $[route.name] != "bookmarks" && $[route.name] != "recent_posts" && $[route.name] != "recent_threads_created"}
<div class="container" id="boardtop1-important">
<center>
<div style="padding:2px;border:1px dashed #cccccc;border-radius:5px; text-align:center;"> <font size="3">
<br>Our Latest Thread This Board $[board.display_name]<br> $[board.last_thread.recent_link] By $[board.last_thread.created_by] $[board.last_thread.replies] <i>Replies</i><br>(Viewed $[board.last_thread.views] time{if $[thread.views] != 1}s){/if}<br>Last poster to post/comment $[board.last_thread.last_post.created_by]<br>$[board.last_thread.last_post.created_on]
<br><br></font></div></center>
</div>
<script type="text/javascript">
$('#boardtop1-important .thread-participants').after($('#boardtop1-important .thread-participants').html());
$('#boardtop1-important .thread-participants').hide();
</script><br />{/if}
Steve
If you wish to change replies to comments
Try changing this line
$[board.last_thread.replies] <i>Replies</i>
To
<br>This Post Has Received $[board.last_thread.replies] Comment{if $[board.last_thread.num_posts] != 2}s{/if}
Thanks to Nori
EDITED UPDATED:
To fix issue with the container showing on the members recent threads page
Reminder you can always click on the preview button to view how it look
Before saving any changes to your template.