News:

Join the Facebook Fan Page.

Main Menu

Bulk delete posts

Started by nizarala, January 12, 2015, 04:59:20 PM

Previous topic - Next topic

kat

For future reference, should you need to remove spamtards, again...

When you remove a member, I believe you get the option to remove their posts, too.

I checked the "Members" section of the wiki, though, and couldn't find details. So, I could be wrong (I haven't needed to remove a member, on my fora, for yonks).

Illori

Quote from: K@ on January 13, 2015, 07:21:47 AM
I checked the "Members" section of the wiki, though, and couldn't find details. So, I could be wrong (I haven't needed to remove a member, on my fora, for yonks).

it would be from their profile, but we are missing that on the wiki.

http://wiki.simplemachines.org/smf/Profile#Delete_This_Account should be the page it may appear on in the future. so you can not bulk remove members and their posts at the same time.

kat

I meant as he deleted each member, individually.

But, I see your point.

Ta!

Hj Ahmad Rasyid Hj Ismail

Quote from: K@ on January 13, 2015, 07:21:47 AM
For future reference, should you need to remove spamtards, again...

As I recall while deleting member's post is default feature, there is a mod to "purge" member with post(s).

Quote from: davidhs on May 28, 2010, 10:16:26 PM
Link to Mod

...

Enhancements to purge inactive members

...

DESCRIPTION

Adds enhancements in "Administration Center > Forum Maintenance > Members > Remove Inactive Members":

  • Options to remove members who have not activated their account after email change, have not approved their account, have not approved the deletion of their account or have not parental approval of their account.
  • Option to remove members according to date registered.
  • Maximum number of posts that members should have to be eliminated. Default value is 0.
  • Delete posts of removed members. Possible values are: None, All posts, Topics and posts. Default value is None.
  • Maximum number of processed members to delete members. This is in order not to exceed the system resources. Default value is 4,000.


Without this MOD the forum removes all inactive members, with or without posts, and does not delete posts of removed members (changes to guest authors). If their number is very high may fail for lack of resources and not removed anything.

If this is not so suitable for current situation, perhaps it might be useful in the future to delete spam members &/ posts in bulk.

Sir Osis of Liver

Quote from: nizarala on January 13, 2015, 04:11:52 AM
How do I go about assigning all these posts to one member?

Quote from: Krash on January 12, 2015, 11:24:34 PM



UPDATE smf_messages SET id_member=#### WHERE poster_time BETWEEN 1388534401 AND 1420070399



#### is new member id.  Then you could delete the member and remove all posts.

You have to register a new member, then run the query with new member id replacing ####.
Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

Illori

cant you use the admin option to reassign posts to the new user?

Arantor

Holder of controversial views, all of which my own.

Sir Osis of Liver

Don't think so.  There's an option to attribute guest posts to a member, but don't see any way to attribute one member's posts to another.  Wouldn't be useful here anyway, as op has already deleted multiple members.  Also no way to specify a date/time range.
Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

Illori

Quote from: Krash on January 13, 2015, 02:36:40 PM
Don't think so.  There's an option to attribute guest posts to a member, but don't see any way to attribute one member's posts to another.

even though the name says it is for guests, it also works for members.

why do they need to define a range of time if the posts were made by the same person(s) ?

Sir Osis of Liver

If you're going to assign each spammer's posts to the same new member in order to delete them, you may as well just delete the spam accounts and remove their posts, it's less work.  In this case, the spam accounts have already been deleted, you'd have to pick through the entire forum looking for spam posts and reassign by username one at a time.
Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

Illori

right you want to reassign the posts, but your query has a timestamp in it. why does the timestamp even matter? as long as the posts were not made in an account that got hacked they want to delete any/all of the posts no matter what time they were made.

Kindred

no, Krash -- reassigning posts is done in the maintenance utility...  not by post - so, you don't need to search for each individual post.
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Sir Osis of Liver

Quote from: Illori on January 13, 2015, 02:57:13 PM
right you want to reassign the posts, but your query has a timestamp in it. why does the timestamp even matter? as long as the posts were not made in an account that got hacked they want to delete any/all of the posts no matter what time they were made.

The original request was for a method to bulk delete all posts made in 2014, as the forum was inactive for the entire year, and all 2014 posts are spam.


Quote from: Kindred on January 13, 2015, 02:57:56 PM
no, Krash -- reassigning posts is done in the maintenance utility...  not by post - so, you don't need to search for each individual post.

I know, but you would have to search for each individual member to reassign.
Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

Kindred

right....   delete all posts form 2014.

Unfortunately, deleting them directly in the database is problematic, because it leaves loose ends hanging all over the place.

bulk deleting threads is easy with checkbox moderation.

deleting posts out of threads is easy for one or two, but gets tiresome if there are bunches
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Sir Osis of Liver

But if you run the query to reassign all 2014 posts to a new member, then delete the member and remove all posts, does that leave as many loose ends?  And would the loose ends matter if spam posts are all in spam topics, not in legitimate topics?
Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

Kindred

I don't think it would leave "as many" loose ends... but would still leave - at least the topics table with dangling bits...
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

nizarala

Thanks again to all of you for the help.

I think I should clarify the situation. The spammers created hundreds of new members, and spread the comments across about half of them. So, there are   over a hundred spam members with only a few posts each. I saw the option to remove a member and all their topics, and I used it, but it quickly became clear that doing this for all the spammers was going to take a huge amount of time. Although I had stopped the spammers from  creating new members, they were still posting using the members they had already created, and the rate at which they posted was too high. This is why I had to take fast measures, and what I though to do was to order the members by the date they joined, and then bulk delete them by page, about 50 at a time. Now I don't have any new spam, but I am left with thousands of topics created by hundreds of "guest" members (Note: only members are allowed to post, but now that I deleted the spammers, their posts show as if made by a guest member).

I cannot use any of the purge options in the panel shown by ahrasis. I had seen those when I was searching for solutions, but he first option would delete all the legitimate members. The second option could have been useful before I deleted the spam members, but if I used it I would also be deleting legitimate members who never posted. The only safe unifying characteristic os both the topics and spam members is that they were all created in 2014 (actually the attack was in December). There are no legitimate members or posts in 2014.

I'm inclined to run Krash's query. Is it safe after all? I don't want to break the forum, because I know I don't have much skill to fix it later. Thanks!!!


Gwenwyfar

You could change the page display limit to a very high number, then just go around through select all to delete them. Maybe even search (you can change the limit of that too), so you could just search for 2014 posts and go on delete all.

nizarala

Fortytwo, this completely solved my problem! Thank you, thank you!!!

So, I went to Admin>Manage Posts and Topics>Topic Settings and increased the "Number of topics per page in the message index to 300. This left me with just a few pages per board. I deleted the bulk, and the remaining few I just deleted manually.

Thanks to all of you. I am glad this could be fixed without the need to run any query. I was a bit afraid of breaking something and not being capable of fixing it.

Kindred

Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Advertisement: