Kaiser Well-known member May 26, 2011 #1 Well I just did a import of another forum db into my forum, and I have 300+ something moderated posts so is there a sql query I can run to approve all the posts? Edit: Looks like I messed up on the title
Well I just did a import of another forum db into my forum, and I have 300+ something moderated posts so is there a sql query I can run to approve all the posts? Edit: Looks like I messed up on the title
Mikey Well-known member May 26, 2011 #2 Code: UPDATE `xf_post` SET `message_state` = 'visible' WHERE `message_state` = 'moderated' This will set EVERY moderated post to visible/unmoderated. Upvote 0 Downvote
Code: UPDATE `xf_post` SET `message_state` = 'visible' WHERE `message_state` = 'moderated' This will set EVERY moderated post to visible/unmoderated.
Jake Bunce Well-known member May 26, 2011 #3 Don't forget the xf_moderation_queue records. You would need to run these two queries to approve all moderated posts (borrowing Mikey's query): Code: DELETE FROM xf_moderation_queue WHERE content_type = 'post'; UPDATE xf_post SET message_state = 'visible' WHERE message_state = 'moderated'; And here are the queries to approve all moderated threads (per this post): Code: DELETE FROM xf_moderation_queue WHERE content_type = 'thread'; UPDATE xf_thread SET discussion_state = 'visible' WHERE discussion_state = 'moderated'; You also need to run this query to reset the count in the moderator bar (per this post): Code: DELETE FROM xf_data_registry WHERE data_key = 'moderationCounts'; Upvote 0 Downvote
Don't forget the xf_moderation_queue records. You would need to run these two queries to approve all moderated posts (borrowing Mikey's query): Code: DELETE FROM xf_moderation_queue WHERE content_type = 'post'; UPDATE xf_post SET message_state = 'visible' WHERE message_state = 'moderated'; And here are the queries to approve all moderated threads (per this post): Code: DELETE FROM xf_moderation_queue WHERE content_type = 'thread'; UPDATE xf_thread SET discussion_state = 'visible' WHERE discussion_state = 'moderated'; You also need to run this query to reset the count in the moderator bar (per this post): Code: DELETE FROM xf_data_registry WHERE data_key = 'moderationCounts';