Jump to content

blustic

Members
  • Posts

    9
  • Joined

  • Last visited

 Content Type 

Downloads

Release Notes

IPS4 Guides

IPS4 Developer Documentation

Invision Community Blog

Development Blog

Deprecation Tracker

Providers Directory

Forums

Events

Store

Gallery

Posts posted by blustic

  1. Update:

    So I've made a test and the code you mentionned wasn't enough because it's not restoring the topics the users created and the responses made to their topics are also hidden by Invision.

    I've investigated more and found out that I had to do these additional steps to restore the topics created by the user and the responses :

    1. Find all the posts created by the user inside the "forums_topics" table (starter_id = user ID) and update the "approved" from "-1" to "1" ;
    2. Update all the responses inside the table "forums_posts" from "queued" = "2" to "0" where "topic_id" = "TOPIC_IDS_FOUND_IN_STEP_1".

    I had to create a small PHP script to update them correctly, as the number is huge and was too lazy to update them one by one.

    For those searching the SQL queries :

    As mentionned by @Jim M don't forget to create a backup of your database before trying any modification and if you don't know what you're doing, don't do it 🙂 !

    UPDATE forums_posts SET queued = 0 WHERE queued = 2 AND author_id = XXX;
    UPDATE forums_posts SET queued = 0 WHERE queued = -1 AND author_id = XXX;

    afterwards

    UPDATE forums_topics SET approved = 1 WHERE approved = -1 AND starter_id = XXX;

    and finally :

    UPDATE forums_posts SET queued = 0 WHERE queued = 2 AND topic_id = XXX;

    Thanks again for your help, you can now tag this topic as fixed.

  2. 6 hours ago, Adriano Faria said:

    You can run the following query in your PHPMyAdmin (your host panel:

    update forums_posts set queued = 0 WHERE queued = 2 AND author_id = XXX;

    where XXX is the member_id.

    After that, hide and unhide any post just to update the cache so then it will dismiss the pending notice in the index/forum view.

    DO AT YOUR OWN RISK.

    Thank YOU ! Will try this soon and let you know. There shouldn't be a problem.

    6 hours ago, Jim M said:

    If you do wish to update manually via SQL, as mentioned by Adriano, it is at your own risk and please take a backup of your database before 🙂 .

    No worries, backups are made daily 🙂

  3. Hello,

    A moderator flagged a few accounts as SPAMMERS making all their posts hidden.

    The problem is that some of the users have >1000 posts and they're not spammer, they probably had access to their accounts because of passwords leaks on the internet.

    Now I'm searching for a way to restore all the hidden posts/responses for these users, even if its through an SQL code, that would help us a lot.

    I don't even understand that such an option doesn't exist yet.

    Thanks in advance.

×
×
  • Create New...