Showing more than the 10 items in "Top 10 Topics (by Replies)"

Started by themavesite, January 27, 2014, 03:23:58 PM

Previous topic - Next topic

themavesite

Is it possible to either;
- Show more than 10 topics in the "Top 10 Topics by replies"
OR - Find out what topics are on position 11,12,13,14,... sorted by replies?

Currently my stats are like this, but I'm curious what other topics are the most popular by replies (without doing it manually)

TMS Forums
Since 2008 and still going strong! Join today! http://forums.themavesite.com/index.php

Branko.

Sources\Stats.php by default line 322 or find this:
Quote// Topic replies top 10.
   $topic_reply_result = $smcFunc['db_query']('', '
      SELECT m.subject, t.num_replies, t.id_board, t.id_topic, b.name
      FROM {db_prefix}topics AS t
         INNER JOIN {db_prefix}messages AS m ON (m.id_msg = t.id_first_msg)
         INNER JOIN {db_prefix}boards AS b ON (b.id_board = t.id_board' . (!empty($modSettings['recycle_enable']) && $modSettings['recycle_board'] > 0 ? '
         AND b.id_board != {int:recycle_board}' : '') . ')
      WHERE {query_see_board}' . (!empty($topic_ids) ? '
         AND t.id_topic IN ({array_int:topic_list})' : ($modSettings['postmod_active'] ? '
         AND t.approved = {int:is_approved}' : '')) . '
      ORDER BY t.num_replies DESC
      LIMIT 10',
      array(
Keep in mind that this will affect to the height for other tables for example Top 10 Topics (by Views)
Strong people don't put others down, they lift them up.
A clever person solves a problem. A wise person avoids it.

Kindred

Also keep in mind that, the more you add there, the more resources your page will consume.
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Branko.

Strong people don't put others down, they lift them up.
A clever person solves a problem. A wise person avoids it.

margarett

Not only that, but all stats shown there are listing 10 rows. So you will have unequal stats, which doesn't look so pretty ;)
Se forem conduzir, não bebam. Se forem beber... CHAMEM-ME!!!! :D

QuoteOver 90% of all computer problems can be traced back to the interface between the keyboard and the chair

themavesite

Sorry for the late reply, I was travelling abroad.

Thanks for the replies, the LIMIT 10 worked.

As to your concerns about the stats layout messing up now: I only needed to do this once, I set the limit to 100, took a screenshot and reverted my change.
I was just curious as to what the 100 most popular topics were  ;D
TMS Forums
Since 2008 and still going strong! Join today! http://forums.themavesite.com/index.php

Advertisement: