[2.0.6] Prune User Posts

The cleanup is complete. This forum is now read only.

Rating:

Excellent!
21
66%
Very Good
5
16%
Good
3
9%
Fair
0
No votes
Poor
3
9%
 
Total votes: 32

The Bad Astronomer
Registered User
Posts: 78
Joined: Mon Mar 24, 2003 11:31 pm
Location: CA
Contact:

Post by The Bad Astronomer »

I just installed it (I just upgraded to 2.0.14) and I get "Internal Server Error" when I click on the link in my admin panel. My error log gives me the dreaded and somewhat useless "Premature end of script header" error for /admin/admin_prune_user_posts.php.

Any ideas?
Phil Plait, aka "The Bad Astronomer"
http://www.badastronomy.com
R45
Registered User
Posts: 2830
Joined: Tue Nov 27, 2001 10:42 pm

Post by R45 »

The Bad Astronomer wrote: I just installed it (I just upgraded to 2.0.14) and I get "Internal Server Error" when I click on the link in my admin panel. My error log gives me the dreaded and somewhat useless "Premature end of script header" error for /admin/admin_prune_user_posts.php.

Any ideas?

Try narrowing down the prune criteria to only prune a smaller amount of posts, perhaps this is due to the script timing out.
pennino
Registered User
Posts: 165
Joined: Thu May 05, 2005 2:07 pm

Post by pennino »

Hi R45!

I would like only to delete CLOSED TOPICS from my forums. I'm using phpbb 2.0.15 and MySQL 4.0.20 on another machine.
This version of MySQL (I cannot upgrade it!) does not allow me to run a such SQL query:

DELETE FROM phpbb_posts_text INNER JOIN (phpbb_posts INNER JOIN phpbb_topics ON phpbb_topics.topic_id=phpbb_posts.topic_id) ON phpbb_posts_text.post_id=phpbb_posts.post_id WHERE phpbb_topics.topic_status=1 AND phpbb_topics.forum_id=35

So, I would like to try your MOD.
Is your MOD compatible with phpbb 2.0.15 and does it allow me only to delete closed topics?
Could I do that thing only by selecting the name of the forum ("Forums to prune"), specifying no username and no other info in "Users to prune" area, "All posts" in "Date criteria" and also setting "Expemt Open Topics" to YES? ( http://phpbb.rasadam.com/demo.php?id=1 ).

Thanks in advance! :D
R45
Registered User
Posts: 2830
Joined: Tue Nov 27, 2001 10:42 pm

Post by R45 »

pennino wrote: Hi R45!

I would like only to delete CLOSED TOPICS from my forums. I'm using phpbb 2.0.15 and MySQL 4.0.20 on another machine.
This version of MySQL (I cannot upgrade it!) does not allow me to run a such SQL query:

DELETE FROM phpbb_posts_text INNER JOIN (phpbb_posts INNER JOIN phpbb_topics ON phpbb_topics.topic_id=phpbb_posts.topic_id) ON phpbb_posts_text.post_id=phpbb_posts.post_id WHERE phpbb_topics.topic_status=1 AND phpbb_topics.forum_id=35

So, I would like to try your MOD.
Is your MOD compatible with phpbb 2.0.15 and does it allow me only to delete closed topics?
Could I do that thing only by selecting the name of the forum ("Forums to prune"), specifying no username and no other info in "Users to prune" area, "All posts" in "Date criteria" and also setting "Expemt Open Topics" to YES? ( http://phpbb.rasadam.com/demo.php?id=1 ).

Thanks in advance! :D

What error message is being returned?
gianni76
Registered User
Posts: 71
Joined: Sun Jul 03, 2005 11:04 am

Post by gianni76 »

Hi Rj45,
great utility. I am looking for something similar but with attention to criteria based on the user status.

I would like to be able to:

- delete users if they have less than x posts (e.g. less than 2 posts)
- delete users (and their messages) if they did not post since date yyy
- delete users if they have not been active for xxx months.

Your mod only focuses on post dates. Could you add the delete option based on these user criteria?
gdiv
Registered User
Posts: 12
Joined: Thu Jan 13, 2005 7:38 pm

Post by gdiv »

Today I've installed several versions of this mod on my 2.0.11 phpBB and none of them work. My user admin panel shows no change. All of the mod files have been uploaded to the correct directories. My only other existing mods are for ads. Can someone tell me what I might be doing wrong?
Katie Pie
Registered User
Posts: 165
Joined: Fri Apr 25, 2003 10:52 pm
Location: Bollnäs, Sweden
Contact:

Post by Katie Pie »

Does this Mod means you can remove all posts by a certain member? I'm somewhat confused what prune means.
R45
Registered User
Posts: 2830
Joined: Tue Nov 27, 2001 10:42 pm

Post by R45 »

Katie Pie wrote: Does this Mod means you can remove all posts by a certain member? I'm somewhat confused what prune means.

Yes, it can do that.
Coagulant
Registered User
Posts: 51
Joined: Sun Feb 13, 2005 10:13 am
Location: Moscow Russia
Contact:

Post by Coagulant »

In admin/admin_prune_user_posts.php
// Mark posts in topic for deletion (if there are other posts in this thread)
if($posts[$i]['topic_last_post_id'] != $posts[$i]['topic_last_post_id'])
Looks like a bug to me, should be
// Mark posts in topic for deletion (if there are other posts in this thread)
if($posts[$i]['topic_first_post_id'] != $posts[$i]['topic_last_post_id'])
Prince of phpbb
Registered User
Posts: 286
Joined: Mon Jun 13, 2005 12:29 pm
Location: UK
Contact:

Post by Prince of phpbb »

nice mod .. :d .. great work ..

but before i install i want to confirm one thing .. after pruning .. does the member post count or total forum post count changes ???
cruisemates
Registered User
Posts: 77
Joined: Fri Sep 09, 2005 2:42 am

Post by cruisemates »

Did you know your MOD Demo is showing broken DB connections? Is this mod compatible with 2.0.17? I sure hope so as I can certainly use it.
dcz
Registered User
Posts: 787
Joined: Sun Feb 13, 2005 5:37 am
Contact:

Post by dcz »

Coagulant wrote: In admin/admin_prune_user_posts.php
// Mark posts in topic for deletion (if there are other posts in this thread)
if($posts[$i]['topic_last_post_id'] != $posts[$i]['topic_last_post_id'])
Looks like a bug to me, should be
// Mark posts in topic for deletion (if there are other posts in this thread)
if($posts[$i]['topic_first_post_id'] != $posts[$i]['topic_last_post_id'])


well what happend before and after this change ?

phpBB SEO || phpBB3 SEO Premod || SEO phpBB3
GYM Sitemaps & RSS for phpBB3: GYM Sitemaps & RSS
dcz
Registered User
Posts: 787
Joined: Sun Feb 13, 2005 5:37 am
Contact:

Post by dcz »

I think you are right by the way, lol, nobody had tested to delelete a topic before or what? :)
++

phpBB SEO || phpBB3 SEO Premod || SEO phpBB3
GYM Sitemaps & RSS for phpBB3: GYM Sitemaps & RSS
dzm
Registered User
Posts: 44
Joined: Fri Jan 21, 2005 10:06 pm

Feature request

Post by dzm »

I know the nobody is actively working on this, but if there WERE I'd ask for this enhancement:

Overview: Provide a "save" checkbox that appears for moderators next to threads when viewing forums (or search results) that prevents auto-pruning (or this module in this case) from deleting the thread. Provide a "save" checkbox for all individual messages (which by default inherit the state of their parent thread) visible to me and mods when viewing the contents of threads. Allow me to purge everyone older than a certain date EXCEPT the items that have Save checked.

Why: This allows me to have long idle but still open threads that contain useful archival information. If somebody desired they could resurrect the thread by posting to it. This would not require me to lock my saved threads in order to protect them for this module's purges.

Ultimately I would prefer to see this somehow integrate with the automated pruning feature already in phpBB2, but would be just as happy with a cron job that ran daily to perform the actual purge.
R45
Registered User
Posts: 2830
Joined: Tue Nov 27, 2001 10:42 pm

Re: Feature request

Post by R45 »

dzm wrote: I know the nobody is actively working on this, but if there WERE I'd ask for this enhancement:

Overview: Provide a "save" checkbox that appears for moderators next to threads when viewing forums (or search results) that prevents auto-pruning (or this module in this case) from deleting the thread. Provide a "save" checkbox for all individual messages (which by default inherit the state of their parent thread) visible to me and mods when viewing the contents of threads. Allow me to purge everyone older than a certain date EXCEPT the items that have Save checked.

Why: This allows me to have long idle but still open threads that contain useful archival information. If somebody desired they could resurrect the thread by posting to it. This would not require me to lock my saved threads in order to protect them for this module's purges.

Ultimately I would prefer to see this somehow integrate with the automated pruning feature already in phpBB2, but would be just as happy with a cron job that ran daily to perform the actual purge.

I am hoping to get some time this month to start reviewing all my previously released MODs. I know I've said this before, unfortunately my schedule is way too unpredictable. Hopefully I will get a chance to set down with all these MODs and review the code. I do have several different customised version of this Prune mod with additional settings (Like "saving" prune setting as well as confirmation boxes prior to the actual delete). Both this and the advanced user search mod should be the first to be looked at.
Post Reply

Return to “[2.0.x] MOD Database Cleanup”