XF 2.2 How can I delete quickly all approval queue?

Dkf

Active member
There are more than thousand approval queue wait admin to approve in my forum.
How can I delete quickly all approval queue?
I want to use MySQL command to drop these data (delete). Can you guide me?

1664887854991.png
 
Solution
@Dkf, there can be not only posts in the approval queue, but also users, threads, etc. Please provide the result of this request to determine if there is anything other than posts:
SQL:
SELECT DISTINCT content_type FROM xf_approval_queue
In any case, you can clear the xf_approval_queue table to clear the approval queue:
SQL:
TRUNCATE xf_approval_queue
However, if there was something other than posts in the approval queue, additional manipulations may be required.
I used this command

mysql> UPDATE xf_post SET message_state = 'visible' WHERE message_state = 'moderated';
Query OK, 5544 rows affected (1 min 56,60 sec)
Rows matched: 5544 Changed: 5544 Warnings: 0


But the counter on the site has not changed. How to update it?
 
@Dkf, there can be not only posts in the approval queue, but also users, threads, etc. Please provide the result of this request to determine if there is anything other than posts:
SQL:
SELECT DISTINCT content_type FROM xf_approval_queue
In any case, you can clear the xf_approval_queue table to clear the approval queue:
SQL:
TRUNCATE xf_approval_queue
However, if there was something other than posts in the approval queue, additional manipulations may be required.
 
  • Like
Reactions: Dkf
Solution
One handy way of not messing with SQL in case you mess up the table dependencies is to use jQuery is to mass-check or uncheck the boxes you want on the page. Xenforo 2 as far as I can make out doesn't have a "reject all" or similar button to mass approve/reject new signups.

I use Google Chrome so when you are viewing your approval queue press shift+control+i and the developer console will open.
Click on "Console".
Paste in lines like this (changing as appropriate for your scenario)

// this line below will check all the "reject" radio buttons on every VISIBLE user:
$('input[type="radio"][value="reject"]').prop('checked', true);

// this line will uncheck ALL the "Notify user if action was taken" check boxes
$('input[type="checkbox"]').prop('checked', false);

I'm not sure how to show ALL users on one page but if you have a few hundred signups you want to get rid of you can just do this a few times. Saves time manually checking/unchecking a radio button for each user.

I love Xenforo but there is a lack of simple mass admin options like this for edge scenarios.
 
Back
Top Bottom