Page 4 of 8

Posted: Wed Mar 03, 2004 1:11 am
by R45
Did you upload the template files to all the template admin directories? /templates/template_name/admin

Posted: Thu Mar 04, 2004 12:04 am
by Nautilus_Xtrem!!
I downloaded your pruning mod but it's not exactly what I want or need. Maybe if I just discribe what I need then you guys can tell me if this or someother mod is what I need. I have ranks set up and some are fairly high in post count. We like to keep our forums, which are small, clean and tidy, so that means we delete old and useless posts all the time. But at the same time we don't delete whole groups of posts too often so the pruning mod seems like bringing a howitzer to a knife fight. But on the other hand if we just delete single posts post counts decrease which is what we don't want. Someone let me know what I need please.

Posted: Fri Mar 26, 2004 7:46 pm
by khisanthax
is it possible for me to prune the replies/posts but not the actual topic in a forum?

Posted: Tue Mar 30, 2004 2:07 am
by R45
khisanthax wrote: is it possible for me to prune the replies/posts but not the actual topic in a forum?

Nope, no such feature exists in this version.

Re: Queries

Posted: Mon May 17, 2004 6:08 pm
by Andrew Mills
afx114 wrote: Also, unrelated, but I think it would be wise for you to change the default selected radio button of the Date Criteria from "All Posts" !!!! The combination of "All Users" and "All Dates" is can very easily lead to accidental loss of all posts, I've come very close to doing so myself! Force the admin to specifically and manually select "All Posts" in order to avoid massive meltdown. Or perhaps a JavaScript confirmation box: "Are you sure you want to delete posts from All Users and All Dates? This will delete every single post in the DB!!!"

He has a VERY good point. If it wasn't for reading ALL the way through this topic before downloading and installing your pruning MOD, I too woul dhave accidentilly deleted EVERY SINGLE post on my forum as the Date Criteria default dot is on: All Posts 8O

You mod has helped me solve a few MAJOR pruning headaches for my site, but please try and set a deault that doesn't let Admins accidentilly remove their entire forum in your next update.

And thanks again for the MOD. I hope it does exactly what it says on the tin. :D

Re: Queries

Posted: Thu Jun 10, 2004 7:43 am
by frankderond
Andrew Mills wrote:
afx114 wrote:Also, unrelated, but I think it would be wise for you to change the default selected radio button of the Date Criteria from "All Posts" !!!! The combination of "All Users" and "All Dates" is can very easily lead to accidental loss of all posts, I've come very close to doing so myself! Force the admin to specifically and manually select "All Posts" in order to avoid massive meltdown. Or perhaps a JavaScript confirmation box: "Are you sure you want to delete posts from All Users and All Dates? This will delete every single post in the DB!!!"

He has a VERY good point. If it wasn't for reading ALL the way through this topic before downloading and installing your pruning MOD, I too woul dhave accidentilly deleted EVERY SINGLE post on my forum as the Date Criteria default dot is on: All Posts 8O

You mod has helped me solve a few MAJOR pruning headaches for my site, but please try and set a deault that doesn't let Admins accidentilly remove their entire forum in your next update.

And thanks again for the MOD. I hope it does exactly what it says on the tin. :D


I would like to get an overview of all the topics that will be deleted before I confirm the pruning. Besides that it would be nice when I can save the options per forum, so that I can run the pruning of every forum (with different settings) by one click.

Maybe, I ask to much?

Re: Queries

Posted: Thu Jun 10, 2004 7:03 pm
by R45
frankderond wrote:
Andrew Mills wrote:
afx114 wrote:Also, unrelated, but I think it would be wise for you to change the default selected radio button of the Date Criteria from "All Posts" !!!! The combination of "All Users" and "All Dates" is can very easily lead to accidental loss of all posts, I've come very close to doing so myself! Force the admin to specifically and manually select "All Posts" in order to avoid massive meltdown. Or perhaps a JavaScript confirmation box: "Are you sure you want to delete posts from All Users and All Dates? This will delete every single post in the DB!!!"

He has a VERY good point. If it wasn't for reading ALL the way through this topic before downloading and installing your pruning MOD, I too woul dhave accidentilly deleted EVERY SINGLE post on my forum as the Date Criteria default dot is on: All Posts 8O

You mod has helped me solve a few MAJOR pruning headaches for my site, but please try and set a deault that doesn't let Admins accidentilly remove their entire forum in your next update.

And thanks again for the MOD. I hope it does exactly what it says on the tin. :D


I would like to get an overview of all the topics that will be deleted before I confirm the pruning. Besides that it would be nice when I can save the options per forum, so that I can run the pruning of every forum (with different settings) by one click.

Maybe, I ask to much?

It's a very good idea, however I've had little time of late to work on anything phpBB related unfortunately. I will keep this idea in mind.

Posted: Sun Jul 11, 2004 11:04 am
by Emanuele
khisanthax wrote: is it possible for me to prune the replies/posts but not the actual topic in a forum?


Hi, I needed this feature, because I use topics as categories and need to autoprune only replies, based on time.
So I modified the default prune() function to prune only outdated posts, leaving the first post of every topic.

Here is my modified prune() function (in includes/prune.php):

Code: Select all

function prune($forum_id, $prune_date, $prune_all = false)
{
	global $db, $lang;

	//
	// Recupera tutti i post_id dei primi messaggi di ciascuna discussione
	// (che dovranno essere esclusi dal prune)
	//
	$sql = "SELECT topic_first_post_id
		FROM " . TOPICS_TABLE . "
		WHERE forum_id = $forum_id";

	if ( !($result = $db->sql_query($sql)) )
	{
		message_die(GENERAL_ERROR, 'Could not obtain lists of topics to prune', '', __LINE__, __FILE__, $sql);
	}

	$exclude_posts = '';
	while( $row = $db->sql_fetchrow($result) )
	{
		$exclude_posts .= ( ( $exclude_posts != '' ) ? ', ' : '' ) . $row['topic_first_post_id'];
	}
	$db->sql_freeresult($result);
		
	if( $exclude_posts != '' )
	{
		$sql = "SELECT post_id
			FROM " . POSTS_TABLE . " 
			WHERE forum_id = $forum_id " .
	 			(($prune_date != '')? "AND post_time < $prune_date" : "" ) . "
				AND post_id NOT IN ($exclude_posts)";
		if ( !($result = $db->sql_query($sql)) )
		{
			message_die(GENERAL_ERROR, 'Could not obtain list of posts to prune', '', __LINE__, __FILE__, $sql);
		}

		$sql_post = '';
		while ( $row = $db->sql_fetchrow($result) )
		{
			$sql_post .= ( ( $sql_post != '' ) ? ', ' : '' ) . $row['post_id'];
		}
		$db->sql_freeresult($result);

		if ( $sql_post != '' )
		{
			$pruned_topics = 0;

			$sql = "DELETE FROM " . POSTS_TABLE . " 
				WHERE post_id IN ($sql_post)";
			if ( !$db->sql_query($sql) )
			{
				message_die(GENERAL_ERROR, 'Could not delete post_text during prune', '', __LINE__, __FILE__, $sql);
			}

			$pruned_posts = $db->sql_affectedrows();

			$sql = "DELETE FROM " . POSTS_TEXT_TABLE . " 
				WHERE post_id IN ($sql_post)";
			if ( !$db->sql_query($sql) )
			{
				message_die(GENERAL_ERROR, 'Could not delete post during prune', '', __LINE__, __FILE__, $sql);
			}

			remove_search_post($sql_post);
//-- mod : attach mod ------------------------------------------------------------------------------
//-- add
			prune_attachments($sql_post);
//-- end mod : attach mod --------------------------------------------------------------------------

			return array ('topics' => $pruned_topics, 'posts' => $pruned_posts);
		}
	}

	return array('topics' => 0, 'posts' => 0);
}
NOTE: I have installed the Attachment MOD, if you haven't it, simply remove the //-- mod : attach mod lines

Posted: Sat Jul 17, 2004 9:56 pm
by nik0l
R45
Dear R45, I have installed your MOD. It has beatiful options. But i want to prune all posts of specified user. I selected options, wrote his member name and click to submit button. MOD reported me that all posts has been succesfully pruned. But I can see all his posts on forum. I mean no post was deleted. Can you help me in this case ?

Posted: Sun Jul 18, 2004 2:01 pm
by R45
nik0l wrote: R45
Dear R45, I have installed your MOD. It has beatiful options. But i want to prune all posts of specified user. I selected options, wrote his member name and click to submit button. MOD reported me that all posts has been succesfully pruned. But I can see all his posts on forum. I mean no post was deleted. Can you help me in this case ?

Which options did you select?

Posted: Sun Jul 18, 2004 9:25 pm
by nik0l
Just Simple options, i selected 3 forums, typed his member name, selected option "All Messages". And Select Pruning Options, like Yes or No.
The number of his posts is 186. That's All.

Posted: Fri Jul 23, 2004 6:43 pm
by R45
nik0l wrote: Just Simple options, i selected 3 forums, typed his member name, selected option "All Messages". And Select Pruning Options, like Yes or No.
The number of his posts is 186. That's All.

I'm not aware of any bugs in this MOD at present. Which specific pruning options did you set (yes/no section)?

Posted: Mon Sep 20, 2004 7:38 am
by webiser
nice mod :)

can you explain a method to add a message on index showing "Prune is active on this forum"

thx :)

Username contains problematic character

Posted: Tue Sep 21, 2004 6:55 pm
by yewknee
I've done a bit of reading on the phpBB forums in search of someone else having this problem and have not seen it mentioned so I'm hoping that someone who understands how this MOD works can help me out.

So far, the user prune mod has worked exactly as I've needed it. However, I am trying to prune a large group of messages from a user with a username such as "RockN'Roll", which would seem to be no big deal at first, but that single apostrophe is pretty much halting the script before it can even run. I can search the user database for the user and it shows up fine but when I run the User Prune script it says that the user does not exist. I can only assume that the apostrophe is terminating the search function prematurely.

I realize that the function is adding slashes and trimming the username value from HTTP_POST_VARS but I'm still hitting a roadblock here.

Any suggestions on how to circumvent this?


Michael

feature request ;-)

Posted: Wed Sep 22, 2004 10:32 am
by jjjjan
Hi folks,

it's great, thanks! - but i would like to use another feature like

delete all threads
+ from user X
+ with no reply
++ within 24 hours after posting

to get rid of allmost empty threads. Anybody having an idea how to do that or which mod i need?

Thanks to all the developers - phpBB is great :-)