Skip to content

Commit

Permalink
Rename toplist on index template loop to avoid conflicts with other e…
Browse files Browse the repository at this point in the history
…xtensions
  • Loading branch information
rxu committed Nov 27, 2024
1 parent f56a228 commit 5927db9
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion event/listener.php
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ public function get_thanks_list($event)
'L_TOP_THANKS_LIST' => $this->config['thanks_top_number'] ? $this->language->lang('REPUT_TOPLIST', (int) $this->config['thanks_top_number']) : false,
]);

$this->template->assign_block_vars_array('toplist', $thanks_list);
$this->template->assign_block_vars_array('toplistonindex', $thanks_list);
}

public function memberlist_viewprofile($event)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<div class="panel bg3"><a href="{{ U_THANKS_LIST }}">{{ lang('TOP_THANKS_LIST') }}</a>
<div class="post bg1">
{% set thankslist = [] %}
{% for user in toplist %}
{% for user in toplistonindex %}
{% set thankslist = thankslist|merge([user.USERNAME ~ ' (' ~ user.THANKS_COUNT ~ ')']) %}
{% endfor %}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<h3><a href="{{ U_THANKS_LIST }}">{{ lang('TOP_THANKS_LIST') }}</a></h3>
<p>
{% set thankslist = [] %}
{% for user in toplist %}
{% for user in toplistonindex %}
{% set thankslist = thankslist|merge([user.USERNAME ~ ' (' ~ user.THANKS_COUNT ~ ')']) %}
{% endfor %}

Expand Down
2 changes: 1 addition & 1 deletion styles/subsilver2/template/index_body_thanks.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<td class="row1" align="center" valign="middle"><img src="{{ T_THEME_PATH }}/images/whosonline.gif" alt="{{ lang('TOP_THANKS_LIST') }}" /></td>
<td class="row1" width="100%"><p class="genmed">
{% set thankslist = [] %}
{% for user in toplist %}
{% for user in toplistonindex %}
{% set thankslist = thankslist|merge([user.USERNAME ~ ' (' ~ user.THANKS_COUNT ~ ')']) %}
{% endfor %}

Expand Down

0 comments on commit 5927db9

Please sign in to comment.