Do not display members post count, even for admins

This commit is contained in:
Antoine Le Gonidec 2024-07-30 12:33:40 +02:00
parent 143decc3bb
commit 9112dec6ed
Signed by: vv221
GPG key ID: 636B78F91CEB80D8

View file

@ -43,6 +43,10 @@ function template_main()
// Display each of the column headers of the table. // Display each of the column headers of the table.
foreach ($context['columns'] as $key => $column) foreach ($context['columns'] as $key => $column)
{ {
// Do not display the messages count column
if ( $key == 'post_count' )
continue;
// @TODO maybe find something nicer? // @TODO maybe find something nicer?
if ($key == 'email_address' && !$context['can_send_email']) if ($key == 'email_address' && !$context['can_send_email'])
continue; continue;
@ -92,22 +96,6 @@ function template_main()
<td class="id_group centertext">', empty($member['group']) ? $member['post_group'] : $member['group'], '</td> <td class="id_group centertext">', empty($member['group']) ? $member['post_group'] : $member['group'], '</td>
<td class="registered centertext">', $member['registered_date'], '</td>'; <td class="registered centertext">', $member['registered_date'], '</td>';
if (!isset($context['disabled_fields']['posts']))
{
echo '
<td class="post_count centertext">';
if (!empty($member['posts']))
echo '
<div class="generic_bar">
<div class="bar" style="width: ', $member['post_percent'], '%;"></div>
<span>', $member['posts'], '</span>
</div>';
echo '
</td>';
}
// Show custom fields marked to be shown here // Show custom fields marked to be shown here
if (!empty($context['custom_profile_fields']['columns'])) if (!empty($context['custom_profile_fields']['columns']))
foreach ($context['custom_profile_fields']['columns'] as $key => $column) foreach ($context['custom_profile_fields']['columns'] as $key => $column)