Simple Machines Community Forum

SMF Support => SMF 2.0.x Support => Topic started by: Dave-user on August 03, 2017, 04:55:19 PM

Title: I deleted Members - How do I delete their posts ?
Post by: Dave-user on August 03, 2017, 04:55:19 PM
Hi,
I am running 2.0.6.

I deleted a load of members and expected that all the posts belonging to them would
also get deleted, but they remain.

Is their a way to to get all POSTS that do not have members deleted ?

I was hoping to find it in maintenance - but no I couldn't see anything like that.
There are loads of spam posts.

Thanks
Title: Re: I deleted Members - How do I delete their posts ?
Post by: Sir Osis of Liver on August 03, 2017, 05:01:05 PM
When you delete the member, you have to set 'Remove posts made by this member:' to 'All Posts'.
Title: Re: I deleted Members - How do I delete their posts ?
Post by: Arantor on August 03, 2017, 05:14:44 PM
Since that's already happened, I'd suggest going to your profile, to look and layout, and setting quick moderation to be checkboxes, then you can at least delete posts and topics in bulk rather than one at a time.
Title: Re: I deleted Members - How do I delete their posts ?
Post by: Dave-user on August 03, 2017, 05:17:43 PM
Thanks.

BTW I just updated to 2.0.8
Title: Re: I deleted Members - How do I delete their posts ?
Post by: Sir Osis of Liver on August 03, 2017, 05:26:47 PM
You should still be able to mass delete the spam posts you left behind.  IIRC, when you delete an account without deleting posts, the posts are attributed to the deleted member's username, marked as guest.  You can create a new member account (i.e., 'Spammer'), then reattribute the spam posts to that member in Admin -> Forum Maintenance -> Members, then delete the new account and remove all posts.
Title: Re: I deleted Members - How do I delete their posts ?
Post by: Dave-user on August 03, 2017, 05:55:20 PM
OK

Thanks for your suggestion.

I created Mr Spammer account

You say ...
"the posts are attributed to the deleted member's username, marked as guest"


But the I don't know the deleted member's username . because i deleted it. Actually not "it" but hundreds
of accounts.

Also - I was deleting by using the Admin->Members->Search for members
and there is no "delete posts as well" option, or I would have checked it.

Any ideas as to what I can do ?
Title: Re: I deleted Members - How do I delete their posts ?
Post by: Gwenwyfar on August 03, 2017, 06:11:54 PM
You'd need to find their posts (that are now as guest instead of an account) and see what name they have. Use that name to attribute posts to your Mr. Spammer account.

Not sure on this one, but maybe the accounts you deleted also appear on the admin log, you could use that as well if so.
Title: Re: I deleted Members - How do I delete their posts ?
Post by: Sir Osis of Liver on August 03, 2017, 06:14:19 PM
You'll have to scroll through topics and find the usernames associated with the remaining spam posts.  They're not listed as members, and there is no guest membergroup.  Don't believe there's any other way to do it.
Title: Re: I deleted Members - How do I delete their posts ?
Post by: Arantor on August 03, 2017, 06:26:26 PM
There is one way and that's direct in the database, which is strongly not recommended.

Still reckon quick moderation is the fastest solution at this point.
Title: Re: I deleted Members - How do I delete their posts ?
Post by: Gwenwyfar on August 03, 2017, 06:28:53 PM
I just confirmed and deleted accounts do appear on the admin log, with their name :)
Title: Re: I deleted Members - How do I delete their posts ?
Post by: Sir Osis of Liver on August 03, 2017, 06:32:23 PM
I suppose that would depend on how many posts each deleted member left behind.  If it's just 2 or 3, quick moderation would be easier, but if it's 20 or 30, would be less work to reattribute the posts.
Title: Re: I deleted Members - How do I delete their posts ?
Post by: Sir Osis of Liver on August 03, 2017, 06:34:20 PM
Quote from: Gwenwyfar on August 03, 2017, 06:28:53 PM
I just confirmed and deleted accounts do appear on the admin log, with their name :)

Yes, that's correct.  Would save a lot of searching through topics.
Title: Re: I deleted Members - How do I delete their posts ?
Post by: Dav999 on August 03, 2017, 06:51:40 PM
If quick moderation checkboxes are still too cumbersome (that is, if we're not talking about a few pages of recognizable spam topics here, but individual messages scattered anywhere across many different topics), and you really want all posts by deleted members (and otherwise guests) gone, I think it would be pretty safe to bulk-change the username on all posts with 0 as their member ID (with a query like UPDATE {prefix}members SET poster_name='Deleted' WHERE id_member='0'), and then to re-attribute all posts with that username to one account (so you can delete that one account along with all these posts). I really wouldn't directly delete the posts from the database, but I think changing usernames on posts isn't going to cause any trouble. Unless anyone knows a relation that would get messed up (like the username on the "last post" in topics and boards?)
Title: Re: I deleted Members - How do I delete their posts ?
Post by: Steve on August 03, 2017, 08:25:37 PM
Once you've got this problem corrected, you need to continue to upgrade. You're still 6 versions behind.
Title: Re: I deleted Members - How do I delete their posts ?
Post by: Dave-user on August 04, 2017, 02:17:30 AM
Can I do these updates from the Admin->Maintenance ?

I am on 2.0.8 what is the latest version ?

BTW - I am not talking about a few post hear and there - I am talking about close to 500,000 posts, these were attached to
about 6000 spam users that I just deleted.

I did that yesterday and overnight I now have another 18 users and 52 spam posts.
I looked for the tick box to delete the posts with the account and can not see it.

It's here:  http://www.support-focus.com/forum/index.php


Would you mind telling which section that is in by using the format like:
  Admin->Members->Search for members
Then it will be clear just where it is.

Many thanks for your help.
Title: Re: I deleted Members - How do I delete their posts ?
Post by: Dave-user on August 04, 2017, 02:24:54 AM
Maybe I should just uninstall the whole thing
and reinstall SMF 2.0.14.

I just did not want to re-create all my sub forums again.
But a new install might be better.
Title: Re: I deleted Members - How do I delete their posts ?
Post by: Steve on August 04, 2017, 08:10:58 AM
Do it this way:

http://wiki.simplemachines.org/smf/How_to_upload_a_fresh_set_of_files
Title: Re: I deleted Members - How do I delete their posts ?
Post by: Illori on August 04, 2017, 08:23:41 AM
Quote from: Steve on August 04, 2017, 08:10:58 AM
Do it this way:

http://wiki.simplemachines.org/smf/How_to_upload_a_fresh_set_of_files

that will not remove the posts/messages/members, i dont think that is what the op wants.
Title: Re: I deleted Members - How do I delete their posts ?
Post by: Sir Osis of Liver on August 04, 2017, 01:27:27 PM
Your forum is basically useless as is.  You either have to manually remove or reattribute all the spam posts, or restore a database backup from before the spam attack (assuming, of course, that you or your host do regular backups).  Your only other option is to start from scratch, and lose all your forum content - members, posts, etc.

Obviously, you need to take some immediate steps to protect your forum from spammers -

https://wiki.simplemachines.org/smf/Spam_-_my_forum_is_flooded_with_spam,_what_can_I_do
 
Title: Re: I deleted Members - How do I delete their posts ?
Post by: Sir Osis of Liver on August 04, 2017, 01:41:24 PM
On second thought, you could retain members, pms, settings, anything not directly involving posts, by deleting or archiving all spammed topics in Forum Maintenance -> Topics.  You'd still have your boards, and once you have some anti-spam measures in place, you can finish cleaning up members.
Title: Re: I deleted Members - How do I delete their posts ?
Post by: Dav999 on August 04, 2017, 01:53:25 PM
Sorry, I wasn't really clear about the query part.

It's a database query, which you can run with phpMyAdmin, in the "SQL" tab after selecting your database (unless your host uses some other database manager which is unlikely). You also need to replace {prefix} with your database prefix (which is normally smf_)

After running it, all posts by deleted members and guests should have the username "Deleted", so you should be able to re-attribute all of the spam posts to one account to delete.
Title: Re: I deleted Members - How do I delete their posts ?
Post by: Dave-user on August 05, 2017, 06:10:30 AM
Hi again.

If possible, I'd like to save the board structure and upgrade to latest ... SMF 2.0.14.

ALL posts, members, pms etc can be gone. Just Board structure passed on to upgrade.

Is that possible ?

Does SMF 2.0.14 have anti spam tactics included ?
Title: Re: I deleted Members - How do I delete their posts ?
Post by: Illori on August 05, 2017, 06:30:55 AM
have you looked at https://wiki.simplemachines.org/smf/Spam_-_my_forum_is_flooded_with_spam,_what_can_I_do ?

there is no way to upgrade and not keep the posts members pm etc and keep the structure of the forum.
Title: Re: I deleted Members - How do I delete their posts ?
Post by: Dave-user on August 05, 2017, 08:22:51 AM
OK

So I have saved the text of the board structure and will
remove the forum from the server and re install SMF 2.0.14.
Title: Re: I deleted Members - How do I delete their posts ?
Post by: Dave-user on August 05, 2017, 08:45:34 AM
Un-installed the forum and

Installed SMF 2.0.14

But when I go to forum/index, I get and error:

Fatal error: Function name must be a string in /home/focus7/public_html/forum/Sources/Load.php on line 142

I have read the "readme.html" but doesn't give any clues.

Have others had this error ?

Thanks
Title: Re: I deleted Members - How do I delete their posts ?
Post by: Steve on August 05, 2017, 09:01:41 AM
Quote from: Illori on August 04, 2017, 08:23:41 AM
Quote from: Steve on August 04, 2017, 08:10:58 AM
Do it this way:

http://wiki.simplemachines.org/smf/How_to_upload_a_fresh_set_of_files

that will not remove the posts/messages/members, i dont think that is what the op wants.

I was talking about his post of uninstalling the whole thing and starting over. I knew it wouldn't do what he originally wanted. I should have quoted the post I was answering I guess.
Title: Re: I deleted Members - How do I delete their posts ?
Post by: Sir Osis of Liver on August 06, 2017, 12:26:19 AM
Quote from: Sir Osis of LiverĀ on August 04, 2017, 01:41:24 PM
On second thought, you could retain members, pms, settings, anything not directly involving posts, by deleting or archiving all spammed topics in Forum Maintenance -> Topics.  You'd still have your boards, and once you have some anti-spam measures in place, you can finish cleaning up members.

Should have tried this. (http://www.thekrashsite.com/pics/idk.gif)

Which php version are you running?


Title: Re: I deleted Members - How do I delete their posts ?
Post by: Dave-user on August 06, 2017, 01:46:07 PM
Hi,

Maybe I misunderstood - but when I saw "there is no way to upgrade and not keep the posts members pm etc and keep the structure of the forum."

It seemed that there was no solution and therefore the best thing to do was to install a new forum.

This is what my dedicated server is running:

Operating system   CentOS Linux 6.9   Perl version   5.010001
Path to Perl   /usr/bin/perl   BIND version   9.8
Postfix version   2.6.6   Mail injection command   /usr/lib/sendmail -t
Apache version   2.2.15   PHP versions   5.3.3
Webalizer version   2.21-02   Logrotate version   3.7.8
MySQL version   5.1.73

Thanks
Title: Re: I deleted Members - How do I delete their posts ?
Post by: Illori on August 06, 2017, 01:50:00 PM
you need to upgrade to php 5.4 or higher.
Title: Re: I deleted Members - How do I delete their posts ?
Post by: Kindred on August 06, 2017, 02:54:09 PM
You are running some seriously outdated server software
Title: Re: I deleted Members - How do I delete their posts ?
Post by: Dave-user on August 08, 2017, 07:04:38 AM
May be I will just give email support instead of offering a forum.