https://www.icyphoenix.com/viewtopic.php?f=35&t=732
-----------------------------------
tiolalu
Fri 22 Dec, 2006 09:58

How To Don't Discount Posts I Delete To The Users?
-----------------------------------
If I delete posts, the users discounts the number of posts.

How to change it in order not to discount any post?

Thanks!


-----------------------------------
Mighty Gorgon
Sun 24 Dec, 2006 22:14

Re: How To Don't Discount Posts I Delete To The Users?
-----------------------------------
You should check the [b]function_post.php[/b]...

FIND
[codeblock]	$sign = ($mode == 'delete') ? '- 1' : '+ 1';[/codeblock]

REPLACE WITH
[codeblock]	$sign = ($mode == 'delete') ? '- 0' : '+ 1';[/codeblock]


-----------------------------------
tiolalu
Mon 25 Dec, 2006 05:15

Re: How To Don't Discount Posts I Delete To The Users?
-----------------------------------
Thanks!

Merry christmas and a happy new year!


-----------------------------------
Mighty Gorgon
Fri 29 Dec, 2006 11:11

Re: SOLVED -How To Don't Discount Posts I Delete To The User
-----------------------------------
You're welcome... :wink:


-----------------------------------
tiolalu
Wed 03 Jan, 2007 02:12

Re: How To Don't Discount Posts I Delete To The Users?
-----------------------------------
Ok, it works if you delete them single, but if you delete the whole thread it doesn't work, any idea?

Thanks!


-----------------------------------
Mighty Gorgon
Sun 07 Jan, 2007 22:21

Re: SOLVED -How To Don't Discount Posts I Delete To The User
-----------------------------------
I don't have the time to look at this right now... but you may try to check which files is running the topic deletion and then look for the code which is discounting posts...

If you can at least find these part... then someone will try to help you in solving this. :wink:


-----------------------------------
tiolalu
Sun 07 Jan, 2007 22:42

Re: SOLVED -How To Don't Discount Posts I Delete To The User
-----------------------------------
Thanks!

I will try it, but... how to know it?


-----------------------------------
Mighty Gorgon
Mon 08 Jan, 2007 14:35

Re: SOLVED -How To Don't Discount Posts I Delete To The User
-----------------------------------
[quote user="tiolalu" post="6425"]Thanks!

I will try it, but... how to know it?[/quote]
Where do you click to delete a topic? Well... the file that is being recalled is the responsible... that is the first step... :wink:


-----------------------------------
tiolalu
Fri 12 Jan, 2007 13:40

Re: How To Don't Discount Posts I Delete To The Users?
-----------------------------------
I had no time until now. I got the solution :D , thanks MG.

If anybody want it:

In /modcp.php

FIND (All without '///'):
[code linenumbers=false]
			///$count_sql = array();
			///while( $row = $db->sql_fetchrow($result) )
			///{
			///	$count_sql[] = "UPDATE ". USERS_TABLE ." SET user_posts = user_posts - ". $row['posts'] ."
			///			WHERE user_id = ". $row['poster_id'];
			///}
			///$db->sql_freeresult($result);

			///if( sizeof($count_sql) )
			///{
			///	for($i = 0; $i < sizeof($count_sql); $i++)
			///	{
			///		if( !$db->sql_query($count_sql[$i]) )
			///		{
			///			message_die(GENERAL_ERROR, 'could not update user post count information.', '', __LINE__, __FILE__, $sql);
			///		}
			///	}
			///}
[/code]

Comment al lines like above. That is ;) .


-----------------------------------
Mighty Gorgon
Wed 31 Jan, 2007 02:05

Re: SOLVED -How To Don't Discount Posts I Delete To The User
-----------------------------------
Great you could solve on your own... and thanks for sharing. :wink:


-----------------------------------
tiolalu
Tue 29 May, 2007 00:15

Re: SOLVED - How To Don't Discount Posts I Delete To The Use
-----------------------------------
I revive this post to ask how can I avoid discount post when pruning act.

I was looking pruning.php but nothing found, I have function_post.php and modcp.php already modified.

Thanks!


