Stuart Wright
Well-known member
I have this code in the custom whoreplied_list template
which has this line added
which is a tweak to @Xon's
addon and the tweak displays the % total of posts in the thread for each person.
![1.webp 1.webp](https://xenforo.com/community/data/attachments/305/305105-2922784e696ed3bc77b0b46fcb0f9b38.jpg?hash=Sya0tQXLvZ)
What I'd like to do is add the cumulative percentage so I can see how many people are responsible for 50% of the posts in a thread.
Is there a way to have an additional number for the cumulative value of
?
I'm thinking a variable which has the value added to it in each operation of the macro.
Thanks
HTML:
<li class="block-row block-row--separated userList-row js-filterSearchable">
<xf:set var="$extraTemplate">
<div class="whoreplied--postcount">
<xf:if is="$canSearch">
<a href="{{ link('search/search', '', {'c[users]':{$user.username}, 'search_type':'post', 'c[thread]': $thread.thread_id, 'order':'date'}) }}" target="_blank" title="{{ phrase('whoreplied_see_posts')|for_attr }}">
{$user.ThreadUserPost.{$thread.thread_id}.post_count|number}
</a>
<xf:else />
{$user.ThreadUserPost.{$thread.thread_id}.post_count|number}
</xf:if>
({{ (100* $user.ThreadUserPost.{$thread.thread_id}.post_count / ($thread.reply_count))|number(2) }}%)
</div>
</xf:set>
<xf:macro template="member_list_macros"
name="item"
arg-user="{$user}"
arg-extraData="{$extraTemplate}"
arg-extraDataBig="1"
/>
</li>
Code:
({{ (100* $user.ThreadUserPost.{$thread.thread_id}.post_count / ($thread.reply_count))|number(2) }}%)
addon and the tweak displays the % total of posts in the thread for each person.
![1.webp 1.webp](https://xenforo.com/community/data/attachments/305/305105-2922784e696ed3bc77b0b46fcb0f9b38.jpg?hash=Sya0tQXLvZ)
What I'd like to do is add the cumulative percentage so I can see how many people are responsible for 50% of the posts in a thread.
Is there a way to have an additional number for the cumulative value of
Code:
{{ (100* $user.ThreadUserPost.{$thread.thread_id}.post_count / ($thread.reply_count))|number(2) }}
I'm thinking a variable which has the value added to it in each operation of the macro.
Thanks