Welcome Guest 

Show/Hide Header

Welcome Guest, posting in this forum requires registration.





Pages: [1]
Author Topic: group(s) only toplist?
oceanude
Newbie
Posts: 11
Post group(s) only toplist?
on: July 12, 2017, 00:28

How can I create a toplist template where only trades from certain group(s) will appear?

oceanude
Newbie
Posts: 11
Post Re: group(s) only toplist?
on: July 12, 2017, 21:32

okay, I found this in russian section of the documentation:

{$i=0}
{foreach $toplist as $top}
{if in_array('somegroup', explode(',', $top.groups)) && $i<10}
{$i++}
<a href='/ftt2/o.php?l=toplist&perm={$top.domain}'>{$top.toplist_name}</a>
{/if}
{/foreach}

oceanude
Newbie
Posts: 11
Post Re: group(s) only toplist?
on: July 12, 2017, 23:29

I'm used to work with toplist templates like:

<table>
<tr>
<td>
<a href='/ftt2/o.php?perm={$toplist[0].id}'>{$toplist[0].toplist_name}</a><br/>
<a href='/ftt2/o.php?perm={$toplist[1].id}'>{$toplist[1].toplist_name}</a><br/>
<a href='/ftt2/o.php?perm={$toplist[2].id}'>{$toplist[2].toplist_name}</a><br/>
</td>
</tr>
</table>

Is there something like {if in_array('somegroup', explode(',', $top.groups)) && $i<10} that can be added above the table so that it shows only trades from 'somegroup'???
Thanks.

Pages: [1]
Mingle Forum by cartpauj
Version: 1.0.33.3 ; Page loaded in: 0.025 seconds.