Post by HotRod Richard on Apr 11, 2018 18:16:17 GMT -5
To have each post or reply show a numbered reply for each post
i.e., Reply #1, Reply #2, Reply #3, etc
This will assign Reply numbers to all thread posts that have already been posted too.
Admin > Structure > Headers & Footers > Global Header & Footer
Put the following code in the Global Footer, click "Save Changes"
<script type="text/javascript">
$(function(){
if(window.listMan && listMan.item_type == "post"){
var p = listMan.options, r = proboards.data("route")
$('.content-head .info .date', listMan.content).each(function(i,e){
var post = {element:$(e), index: i, id: $(e).closest('tr.item.post').attr('id').split("-").pop(), page: listMan.pagination.data("pagination").page},
search = /search/i.test(r.name) || p.data.search || p.data.posts_search || p.data.post_query || p.data.hash.q || p.data.recent_page?1:0;
post.element.before('<span class="post-method post-number" />').prev()
.html( '<a href="/post/' + post.id + '/thread" title="Link to Post" >' + ((i+post.page+search) == 1 ? 'Thread ' : (search?'Result':'Reply') + ' #' + ((post.page - 1) * p.limit + i + search)) + '</a> ' + (i+post.page+search == 1 ?'started ' : 'posted '))
})
}
if($.inArray(arguments.callee, proboards.events.afterSearch) == -1)proboards.on("afterSearch",arguments.callee);
})
</script>