SimplePortal

Support => English Support => Topic started by: langel on October 21, 2014, 04:06:01 PM

Title: How list numerically the blocks, top user and top topics
Post by: langel on October 21, 2014, 04:06:01 PM
Hi again! :)

Now I come with a new request, how could list numerically the blocks top users & top topics?

Ejem:

1 user(1) 28posts
2 user(2) 14posts

etc, and similarly the blocks the top topics. I did not find how to do it :(

Thanks again!   ;)

Title: Re: How list numerically the blocks, top user and top topics
Post by: [SiNaN] on December 03, 2014, 01:59:07 PM
Sorry for the delayed response. And unfortunately I couldn't understand what kind of block you exactly need? Perhaps the attached changes are what you need?

Sources/PortalBlocks.php

Code: (Find) [Select]
foreach ($members as $member)
echo '
<tr>

Code: (Replace) [Select]
foreach ($members as $key => $member)
echo '
<tr>
<td>', $key + 1, '</td>

Code: (Find) [Select]
foreach ($topics as $topic)
echo '
<li class="sp_list_top">', sp_embed_image('topic'), ' ', $topic['link'], '</li>

Code: (Replace) [Select]
foreach ($topics as $key => $topic)
echo '
<li class="sp_list_top">', $key + 1, ' ', sp_embed_image('topic'), ' ', $topic['link'], '</li>
SimplePortal 2.3.8 © 2008-2024, SimplePortal