Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
+2 votes
in Q2A Core by
The current limit is around 100. Older posts do not show up.

1 Answer

+1 vote
selected by
Best answer

After taking a quick look at the code I can confirm this page has no pagination. The 100 limit is not correct though. It has a limit of 50 per answer, comment and question. That means you can have a total number between 0 and 150. There is no way to configure this. You'll have to create a feature request for 1.8 (as I guess 1.7 backlog is already full).

Regarding older posts not showing up it is just a matter of refreshing the page so that the query is run again. If you consider this is something critical then:

1. Open file qa-include/qa-page-admin-moderate.php

2. Locate this:

list($queuedquestions, $queuedanswers, $queuedcomments)=qa_db_select_with_pending(
   qa_db_qs_selectspec($userid, 'created', 0, null, null, 'Q_QUEUED', true),
   qa_db_recent_a_qs_selectspec($userid, 0, null, null, 'A_QUEUED', true),
   qa_db_recent_c_qs_selectspec($userid, 0, null, null, 'C_QUEUED', true)
And add this line immediately before the previos text:
@define('CORE_HACK_MODERATE', 1000);
3. Open file qa-include/qa-db-selects.php
4. Locate function qa_db_qs_selectspec
5. Change this line:
$count=isset($count) ? min($count, QA_DB_RETRIEVE_QS_AS) : QA_DB_RETRIEVE_QS_AS;

Into this:

if (defined('CORE_HACK_MODERATE'))
   $count=isset($count) ? min($count, QA_DB_RETRIEVE_QS_AS) : QA_DB_RETRIEVE_QS_AS;

6. Repeat step 5 for functions qa_db_recent_a_qs_selectspec and qa_db_recent_c_qs_selectspec that are located in the same file

This will filter up to 1000 for each type. Not the same as pagination but it is a quick and dirty workaround :)

A cleaner way to do this is to find the @define('QA_DB_RETRIEVE_QS_AS', 50); in qa-include/qa-db-maxima.php and change the 50 into a 1000. The thing is it will affect other lists (not sure which ones) while the steps I've given you will only affect that one.

You're right. It seems each function is overriding the value set in the count to a more general application value. I've updated the answer with a definite solution
Is the item 3 correct? I can't find the line in item 5.
Sorry, a copy/paste issue. The file is qa-include/qa-db-selects.php
Perfect. Thank you!