PDA

View Full Version : deleting posts/threads doesnt reduce post counts


corsacrazy
02-27-2004, 11:13 AM
this was avaiable for vb2 just wondering if any one has made for vb3. basically i dont want user OR forum post counts to reduce when deleting a thread/post

Andreas
02-27-2004, 12:28 PM
In functions_databuild FIND

function delete_post($postid, $countposts = 1, $threadid = 0, $physicaldel = 1, $delinfo = NULL)
{


BELOW that ADD

$countposts = 0;



In functions_databuild FIND

function delete_thread($threadid, $countposts = 1, $physicaldel = 1, $delinfo = NULL)
{


BELOW that ADD

$countposts = 0;


Then the post count should not change when you delete a post/thread.

corsacrazy
02-27-2004, 01:01 PM
this tested ? cheers my friend

Andreas
02-27-2004, 01:12 PM
No. That's why I said it should work ;)

The General
04-09-2004, 04:35 PM
No. That's why I said it should work ;)
Cool thanks! Works fine on vB 3 gold.

Envy-UK
04-09-2004, 04:43 PM
Wouldn't it just be easier to have a 'Storage Bin' type forum and move threads to that? Obviously this would not be visible for users.

Although the post count on the specific forum would decrease, the overall post count would stay the same, and, if needs be, you could refer to these posts.

Catch-22|BL
04-15-2004, 11:54 AM
Warning!

If I make the above changes, I get this error when I try to edit a post:

Parse error: parse error in /home/xxxx/public_html/forums/includes/functions_databuild.php on line 332

Fatal error: Call to undefined function: delete_post_index() in /home/xxxx/public_html/forums/editpost.php on line 406

Proceed with caution! (I am removing the changes....)

Hazzo
04-28-2004, 08:45 PM
Hopefully there is a fix for this one :)

SVTBlackLight01
04-29-2004, 04:58 AM
Wouldn't it just be easier to have a 'Storage Bin' type forum and move threads to that? Obviously this would not be visible for users.

Although the post count on the specific forum would decrease, the overall post count would stay the same, and, if needs be, you could refer to these posts.
Exactly. No use hacking and making upgrades more difficult.

Sonic625
05-30-2004, 04:33 PM
Worked for me and a bump for those who might be interested in this.

snake-boy
02-05-2005, 12:34 PM
Using 3.03 and this does not work for me :(

Post counts are still decremented after pruning.

I WAS using a 'recycle bin' to move threads to, but space is a SERIOUS problem with my host and I HAVE to delete posts, but screwing over the users post counts periodically does not go down well :(

Can ANYONE suggest a hack to prevent this?

-snake

Andreas
02-05-2005, 08:15 PM
I just tested this with 3.0.6 and it does work just fine.
Nevertheless, you should get another host ;)

@Catch22|Bl
Adding those 2 lines can't cause the error you got, you must have done smth. wrong.

snake-boy
02-06-2005, 03:12 AM
But I didn't get an error? (I assume your reply is directed at me?)

Only thing I did was add those lines, then I logged in as a test user, noted my post-count. Deleted a few posts, updated the post counts via admin panel and checked again.
The test users post count had been reduced. No error messages or problems otherwise.

As for another host... aside from the space issues I am very happy with what I am getting for the price I am paying. :) I shouldn't have to change hosts to acommodate a missing feature.

-snake

Andreas
02-06-2005, 04:38 AM
updated the post counts via admin panel and checked again.

Well, if you update the post counters form ACP this is obvious as the functions does update the post counters with the real number of posts found in the database.

Those two lines I posted you prevent the post counter from decreasing if you delete a post or thread.

pedroenf
10-15-2006, 10:52 AM
If it is of interesse of annyone this "mod" works in 3.6.x. But with a little difference, instead of $countposts = 0; there should be $countposts = false;. Hoppe i could be usefull to someone. Bye.

snake-boy
10-15-2006, 01:30 PM
I found that very useful. :)

Thank you pedroenf for the update!

-snake

bki
10-16-2006, 06:01 PM
If it is of interesse of annyone this "mod" works in 3.6.x. But with a little difference, instead of $countposts = 0; there should be $countposts = false;. Hoppe i could be usefull to someone. Bye.It's not working for me :(

pedroenf
10-16-2006, 09:35 PM
Just follow de install instructions. It has to work.

bki
10-17-2006, 01:53 PM
Sometimes it works sometime it doesn't. It depens on how you delete the files, so I don't think it's a 100% solution for me.

Come on your coders...... crack that functions_databuild.php, please.

TiA