I want to delete a topic, without changing my statistics ?

Started by sipo, April 30, 2010, 02:38:24 AM

Previous topic - Next topic

sipo

Hello,

Is it possible for my statistics not to get lower if I delete a topic, I want to delete old topics, but without lowering total topics number. Hope you understood me.

Thanks

Alias M2K


sipo

Quote from: Alias M2K on April 30, 2010, 07:02:42 AM
Deleting topics WOULD decrease the number...  :-\

I know, thats my problem, is there a way for the db to keep the ID of the posts and topics, but delete the content ?


sipo



hcfwesker

Quote from: Kat on April 30, 2010, 08:11:30 AM
http://custom.simplemachines.org/mods/index.php?mod=1130
I believe they wanted it so the forum statistics wouldn't lose any numbers.  That MOD is for memeber's own statistics.

the best solution for this is to create a new board that ONLY admins/staff can see for a "Trash Board".  then...

Goto Admin > Boards > Settings

check the box "Enable recycling of deleted topics "

then select the Trash Board.

This will cause any deleted post or topic to be recylcled.  So it's out of view of public's eye, but also stays a part of the forum's statistics.


mcbass

Hey, read my post and pass along any info you may have, that will pad your post stats!

Alias M2K

Hey, be more clear... Besides if you need help, post a new topic and the support staff or anyone else will definitely help you  ::)

sipo

Quote from: hcfwesker on April 30, 2010, 01:26:41 PM
Quote from: Kat on April 30, 2010, 08:11:30 AM
http://custom.simplemachines.org/mods/index.php?mod=1130
I believe they wanted it so the forum statistics wouldn't lose any numbers.  That MOD is for memeber's own statistics.

the best solution for this is to create a new board that ONLY admins/staff can see for a "Trash Board".  then...

Goto Admin > Boards > Settings

check the box "Enable recycling of deleted topics "

then select the Trash Board.

This will cause any deleted post or topic to be recylcled.  So it's out of view of public's eye, but also stays a part of the forum's statistics.




This is even better solution, I did not know that exists :=) Thanks :)

So, I just transfer all topics I want to delete to this forum and delete them there ?


@Kat --> thanks for welcoming me :)

Alias M2K

So, according to that, all the deleted posts would go to a sort of 'Recycle Bin' board, and yet keep the members post number intact :o Cool!!! ;D

Great find!! And thanks for that share bro ;D

sipo

Its me again, is there a way that my forum posts statistics dont go down when I delete a topic/post ? Since when I delete a topic, my forum looses a number of posts there.

Thanks :)

Alias M2K

Quote from: sipo on May 03, 2010, 03:47:09 AM
Quote from: hcfwesker on April 30, 2010, 01:26:41 PM
Quote from: Kat on April 30, 2010, 08:11:30 AM
http://custom.simplemachines.org/mods/index.php?mod=1130

the best solution for this is to create a new board that ONLY admins/staff can see for a "Trash Board".  then...

Goto Admin > Boards > Settings

check the box "Enable recycling of deleted topics "

then select the Trash Board.

This will cause any deleted post or topic to be recylcled.  So it's out of view of public's eye, but also stays a part of the forum's statistics.


Thats the one you are looking for sipo!!! ;D

Arantor

Solution: Don't DELETE, instead MOVE them to the recycle board. They're out the public area but post count is not touched.
Holder of controversial views, all of which my own.


sipo

Quote from: Alias M2K on May 04, 2010, 05:48:35 AM
Quote from: sipo on May 03, 2010, 03:47:09 AM
Quote from: hcfwesker on April 30, 2010, 01:26:41 PM
Quote from: Kat on April 30, 2010, 08:11:30 AM
http://custom.simplemachines.org/mods/index.php?mod=1130

the best solution for this is to create a new board that ONLY admins/staff can see for a "Trash Board".  then...

Goto Admin > Boards > Settings

check the box "Enable recycling of deleted topics "

then select the Trash Board.

This will cause any deleted post or topic to be recylcled.  So it's out of view of public's eye, but also stays a part of the forum's statistics.


Thats the one you are looking for sipo!!! ;D


I did this one, but my forum post statistics are still going down if I delete a post inside that trash forum. Is the recycling process beeing done by it self, or I am suposed to delete the posts ?

Quote from: Arantor on May 04, 2010, 05:58:05 AM
Solution: Don't DELETE, instead MOVE them to the recycle board. They're out the public area but post count is not touched.

Yeah, but my main problem is a big DB, thats why I want to delete topics, its over 1.5gb uncompressed :(

Arantor

No, the recycling part just means it won't be automatically perma-deleted.

You could just delete the topics and posts manually in the DB, of course.

Alternatively, you can force it to not decrease post count for the time being. Edit Sources/RemoveTopic.php.

Find both of these two blocks of code:

function removeTopics($topics, $decreasePostCount = true, $ignoreRecycling = false)
{


function removeMessage($message, $decreasePostCount = true)
{


After each, add:
$decreasePostCount = false;

Then you can delete to your heart's content without post counts going down. When you're done, you may want to put them back.
Holder of controversial views, all of which my own.


sipo

Quote from: Arantor on May 04, 2010, 06:46:48 AM
No, the recycling part just means it won't be automatically perma-deleted.

You could just delete the topics and posts manually in the DB, of course.

Alternatively, you can force it to not decrease post count for the time being. Edit Sources/RemoveTopic.php.

Find both of these two blocks of code:

function removeTopics($topics, $decreasePostCount = true, $ignoreRecycling = false)
{


function removeMessage($message, $decreasePostCount = true)
{


After each, add:
$decreasePostCount = false;

Then you can delete to your heart's content without post counts going down. When you're done, you may want to put them back.


this sounds more like it :) I will do so, thanks for the help :=)

Alias M2K


Advertisement: