MyBB Community Forums

Full Version: clear unapproved posts
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I have had (3) unapproved posts on my forum for over a year. I cant seem to get rid of them. They dont show in the thread listing or in ACP under unapproved. But it shows that there are 3 posts unapproved. Is there a way to remove these since it seems to be unfindable?
Try rebuilding the Forums cache and then the stats. ACP->Tools & Maintenance -> Cache Manager.
it still shows after that
I guess the best way then would be to run this query:

DELETE FROM mybb_posts WHERE visible=0

Note that this will delete all posts that are unapproved. You may need to rebuild those caches after running the query.
I was worried if it would delete a tutorial thread as the 3 unapproved posts are in that forum. However i went through the forum pages one by one and selected all threads and selected approved threads, but the unapproved threads still remain.

Is there a way to make all threads approved? As we dont really use that feature. Unapproved threads are just deleted threads in the first place.

But i am worried that somehow one of the legit threads are labeled unapproved.
SELECT * FROM mybb_posts WHERE visible = 0
that gives unapproved posts & content can be checked

below changes unapproved posts to approved
UPDATE `mybb_posts` SET visible = 1 WHERE visible = 0

Quote: You may need to rebuild those caches after running the query
i still have unapproved threads after/posts after running all of these queries and rebuilding all the cache after each one. 
mysql> DELETE FROM mybb_posts WHERE visible=0 
    -> ;
Query OK, 0 rows affected (0.00 sec)

mysql> UPDATE `mybb_posts` SET visible = 1 WHERE visible = 0;
Query OK, 0 rows affected (0.00 sec)
Rows matched: 0  Changed: 0  Warnings: 0

mysql> SELECT * FROM mybb_posts WHERE visible = 0;
Empty set (0.00 sec)

mysql> UPDATE `mybb_posts` SET visible = 1 WHERE visible = 0;
Query OK, 0 rows affected (0.00 sec)
Rows matched: 0  Changed: 0  Warnings: 0

mysql>
i wonder if it messed the database up? because for a single day we had new users require approval, and some were purged spammer'd...did they not get deleted form the database?

However if i check mysql there is nothing there.


mysql> SELECT * FROM mybb_posts WHERE visible = 0;
Empty set (0.00 sec)

mysql> SELECT * FROM mybb_threads WHERE visible = 0;
Empty set (0.03 sec)