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

1 Answer

+1 vote
by
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 = CORE_HACK_MODERATE;
else
   $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.

by
Thank you for your answer but it didn't work. I still have the same amount of pending approval posts.
by
This will not change the count. Just show 3k top and 1k top per group.
1. What is the total number displayed in the tab?
2. How many posts are there in the list per group (question/answer/comment)?

The number you see in the tab is the total amount, not the number of elements in the list. What is currently happening is that the elements on the list will not match the total count if they exceed 50 elements per group. This should make them match unless they exceed 1k.
by
I currently have 700+ pending posts. The suggested changes didn't change anything.
by
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
by
Is the item 3 correct? I can't find the line in item 5.
by
Sorry, a copy/paste issue. The file is qa-include/qa-db-selects.php
by
Perfect. Thank you!
...