inherit
259698
0
Apr 21, 2024 17:50:58 GMT -8
Tman2010
37
October 2019
tman2010
|
Post by Tman2010 on Oct 24, 2019 9:25:12 GMT -8
Is there a plugin just to add a counter next to each post on a thread?
|
|
inherit
96289
0
May 17, 2020 9:37:00 GMT -8
elli
1,822
January 2007
ebbymac
|
Post by elli on Oct 24, 2019 9:54:47 GMT -8
I don't know of a plugin, but this could be easily accomplished through the layout templates.
If you go to Admin > Themes > Layout Templates > Thread > Post List, this is the template for posts.
Depending on where you'd like this number to show up, you can use the following variable (optionally prefixed by a hash):
#$[post.iteration] This displays the post number relative to the thread.
Let me know if you'd like help placing it.
|
|
inherit
259698
0
Apr 21, 2024 17:50:58 GMT -8
Tman2010
37
October 2019
tman2010
|
Post by Tman2010 on Oct 24, 2019 10:18:59 GMT -8
I don't know of a plugin, but this could be easily accomplished through the layout templates. If you go to Admin > Themes > Layout Templates > Thread > Post List, this is the template for posts. Depending on where you'd like this number to show up, you can use the following variable (optionally prefixed by a hash): #$[post.iteration] This displays the post number relative to the thread. Let me know if you'd like help placing it. Thank you for showing me where that is. I got that open and I think I'd like to place either before the "Quote" button, or upper right corner of the post box itself.
|
|
inherit
96289
0
May 17, 2020 9:37:00 GMT -8
elli
1,822
January 2007
ebbymac
|
Post by elli on Oct 24, 2019 10:33:57 GMT -8
Upper-right seems to look ok. In that same template, around line 20, you'll find the HTML for the post controls (quote, like, options, etc.):
<div class="controls"> $[post.quote_button] $[post.edit_button] $[post.likes.button] $[post.select_options] </div> We can add $[post.iteration] just below $[post.select_options]. I've also added a conditional statement so this won't show on the "View Recent Posts" page, and a span with a class so you can style it:
<div class="controls"> $[post.quote_button] $[post.edit_button] $[post.likes.button] $[post.select_options] {if !$[viewing_recent_posts]} <span class="post-count"> #$[post.iteration] </span> {/if} </div>
Then to add styles, go to your stylesheet in Admin > Themes > Advanced Styles & CSS > "Style Sheet". You can place this either in the section for posts (around line 964 on an unmodified stylesheet) or at the bottom of the stylesheet:
.post-count { /* styles here */ } Let me know if you'd like help adding styles, like spacing or font styles.
|
|
inherit
259698
0
Apr 21, 2024 17:50:58 GMT -8
Tman2010
37
October 2019
tman2010
|
Post by Tman2010 on Oct 24, 2019 10:39:25 GMT -8
That worked great!!!! Thank you sir!! Or MS.
|
|