News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

Recount Member Posts

Started by SMFHacks.com Team, January 23, 2010, 09:26:57 PM

Previous topic - Next topic

SMFHacks.com Team

Link to Mod

Recount Member Posts



This mod will allow the admin to recount every members post counts back to their respective numbers. Due to a variety of mods as well as human who can manipulate members' post counts, this mod may serve many well for when they wish to reset their forums.


Thanks
Thank you for installing this mod, and don't forget to support the developer!
Disclaimer: SMFHacks.com Team is not affiliated with the SMF Team or the SimpleMachines NPO.
SMFHacks.com -  Paid Modifications for SMF
Latest Mods:
Community Suite
Newsletter Pro SMF Gallery Pro SMF Classifieds SMF Store

rithera


vbgamer45

Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

Mace360

#3
My forum has had difficulties with this mod. It applied itself to only a handful of users, and left the vast majority with their original (altered) post count.

We had accepted post counts from a prior forum up until some time ago, and recently decided to get rid of them entirely. These "recoveries" were done over an extensive period of time, so we're confused as to how the process worked. The selection process for whose posts to remove seems haphazard at best.

Is there any way to ensure it applies universally?

edit: weee caps lock

vbgamer45

As long as it completes all the members it should do the post counts. It  does check if the posts where made in a forum that does not count posts.

Updated for SMF 2.0 RC3!
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

Mace360

Quote from: vbgamer45 on March 08, 2010, 08:55:54 PM
As long as it completes all the members it should do the post counts. It  does check if the posts where made in a forum that does not count posts.

Updated for SMF 2.0 RC3!
It only did a handful, as I said. Any ideas as to why?

vbgamer45

Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

Mace360

Quote from: vbgamer45 on March 08, 2010, 10:26:58 PM
Did it stop and not reach 100%?
It goes to the "Not Done!" screen very briefly, then just ends. It's usually at 6% or so at the time of doing this.

vbgamer45

It just ends as in the screen is stuck? Or do you get a white page? What page does it end up on?
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

Bugo

Why in file installrc3.xml made this change?
<file name="$themedir/ManageMaintenance.template.php">
<operation>
<search position="after"><![CDATA[<div class="cat_bar">
<h3 class="catbg">', $txt['maintain_logs'], '</h3>
</div>]]></search>
<add><![CDATA[<div class="cat_bar">
<h3 class="catbg">', $txt['maintain_logs'], '</h3>


In my opinion, appropriate to be replaced by a variable $txt['maintain_recount_posts'], as in the file install.xml:
<file name="$themedir/ManageMaintenance.template.php">
<operation>
<search position="after"><![CDATA[<div class="cat_bar">
<h3 class="catbg">', $txt['maintain_logs'], '</h3>
</div>]]></search>
<add><![CDATA[<div class="cat_bar">
<h3 class="catbg">', $txt['maintain_recount_posts'], '</h3>


Sorry for bad English - I'm worried :)

In addition, Russian-language translation here:
this for languages-utf8.xml (encoded to UTF8 w\o BOM)
<file name="$languagedir/ManageMaintenance.russian-utf8.php" error="skip">
<operation>
<search position="after"><![CDATA[$txt['maintain_errors']]]></search>
<add><![CDATA[$txt['maintain_recount_posts'] = 'Пересчитать количество сообщений у всех пользователей';
$txt['maintain_recount_posts_info'] = 'Если общее количество сообщений какого-либо пользователя было изменено, запустите эту операцию. Будет восстановлено реальное количество сообщений.';]]></add>
</operation>
</file>


and this for languages.xml (encoded to ANSI):
<file name="$languagedir/ManageMaintenance.russian.php" error="skip">
<operation>
<search position="after"><![CDATA[$txt['maintain_errors']]]></search>
<add><![CDATA[$txt['maintain_recount_posts'] = 'Пересчитать количество сообщений у всех пользователей';
$txt['maintain_recount_posts_info'] = 'Если общее количество сообщений какого-либо пользователя было изменено, запустите эту операцию. Будет восстановлено реальное количество сообщений.';]]></add>
</operation>
</file>

Mace360

Quote from: vbgamer45 on March 12, 2010, 01:35:04 AM
It just ends as in the screen is stuck? Or do you get a white page? What page does it end up on?
It shows me the Not Done screen with the loading bar, then goes back to the page for maintenance.

Robin1989

same i just installed it and i have a few problems. 1 its labeled as a second empty out unimportant logs and 2 it does the first 3% then stops and goes back to the maintenance screen.

vbgamer45

Updated the mod with a fix that should help with that issue.
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

~DS~

"There is no god, and that's the simple truth. If every trace of any single religion were wiped out and nothing were passed on, it would never be created exactly that way again. There might be some other nonsense in its place, but not that exact nonsense. If all of science were wiped out, it would still be true and someone would find a way to figure it all out again."
~Penn Jillette – God, NO! – 2011

vbgamer45

Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

Robin1989

cool it fixed the title of it been wrong its now correctly labled but its still not going past 3%

~DS~

This doesn't work when moving database to another forum. It still have post counts from another database.

BTW...this doesn't show the green thing. :P
"There is no god, and that's the simple truth. If every trace of any single religion were wiped out and nothing were passed on, it would never be created exactly that way again. There might be some other nonsense in its place, but not that exact nonsense. If all of science were wiped out, it would still be true and someone would find a way to figure it all out again."
~Penn Jillette – God, NO! – 2011

shadow82x

Stops at 1% for me too, on a big board. Please fix this.
Colin B
Former Spammer, Customize, & Support Team Member

CeFurkan

can not install at RC4

can you update the package

Lars-Christian

Quote from: CeFurkan on January 06, 2011, 10:25:22 PM
can not install at RC4

can you update the package

Just echoing this. Any chance of a working version for RC4?

Snape


Wanny

*sigh* I have the same problem as one of the people in the 1st page... the recount was applied only to some people, leaving a lot out.

When I press the button I see the screen with the progress bar, it stays at 48% for a second, then it goes back to the maintenance screen.
No messages, no confirmation, nada

Aleksi "Lex" Kilpinen

No idea why, but it does indeed look like this only goes as far as the first refresh in versions post RC3.
I tested with RC5 just now, and it did 6%, refreshed and jumped back to the maintanence section with no confirmation or anything.
Slava
Ukraini!
"Before you allow people access to your forum, especially in an administrative position, you must be aware that that person can seriously damage your forum. Therefore, you should only allow people that you trust, implicitly, to have such access." -Douglas

How you can help SMF

Road Rash Jr.

vbgamer45, is this mod going to be updated for SMF 2.0 Final?
Never argue with an Idiot like myself, they just drag you down to their level then beat you with experience.

vbgamer45

Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

Jessica.

very useful mod. will install once I can get on my forum
Testing Zone - SMF 2.0.7, default Curve
School & Chat - phpBB3, over 170 mods installed, official live forum

I use the latest version of Chrome

phpBB: Forum = a section; Board = whole site
SMF: Forum = whole site; Board = a section

Road Rash Jr.

Never argue with an Idiot like myself, they just drag you down to their level then beat you with experience.

Aleksi "Lex" Kilpinen

Just as earlier when I tested this on my live forum, it seems to work for a while, and then just stop without any confirmation or anything... Did not work for me.  (I have a test member with manually set post count of over a thousand, and it stayed that way... )
Slava
Ukraini!
"Before you allow people access to your forum, especially in an administrative position, you must be aware that that person can seriously damage your forum. Therefore, you should only allow people that you trust, implicitly, to have such access." -Douglas

How you can help SMF

vbgamer45

I checked it over again I can't find anything that looks wrong I use the same code in a couple mods.
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

Aleksi "Lex" Kilpinen

Don't know either - Don't have time to start looking in to it, but there are many people here saying the same, and I just confirmed it did it for me too...
Slava
Ukraini!
"Before you allow people access to your forum, especially in an administrative position, you must be aware that that person can seriously damage your forum. Therefore, you should only allow people that you trust, implicitly, to have such access." -Douglas

How you can help SMF

Road Rash Jr.

I installed it yesterday on SMF 2.0 final and it works fine for me. Mind you I don't have a lot of mods like others do that may have a conflict.
Never argue with an Idiot like myself, they just drag you down to their level then beat you with experience.

lukeren

I upgraded my 1.1.14 to a 2.0.
One member who once was an admin modified his postcount to something completely ridiculous, so I'd like to fix it.
I installed this mod, but his postcount doesn't change when I run it.

oOo--STAR--oOo

Doesn't work on my forum, SMF 2.0.1

I press to run task, gets to 8% 1st screen then returns to maintenance.
Checked members with inhuman post count, nothing changed.
You can't fool a sufficiently talented fool.

http://www.uniquez-home.com
In Design Phase!

Mods I am designing,  No refresh Collapse Categories , Poll Redesign , Pure CSS Breadcrumb , Profile Statuses, Profile Views.

Costner

Just to confirm also, ran, saind 24% paused, not done, then went straight back to the maintainence screen.

bfeist

Hi all,
I know this is an old thread, but I'm trying to recount member posts on a forum after deleting large parts of the subject matter.

I have many members who's profile shows a number of posts, who actually have no posts in the system  now. Here is an example: http://smf1.temac.ca/smf/index.php?action=profile;u=110

The stats say he has 1 post, but if you click "Show Posts", there are no results.

I've installed and run the mod several times. It doesn't seem to fix this. I have no other mods installed on a 2.0.5 installation.
Any suggestions?

Thanks,
Ben

bfeist

Quote from: bfeist on October 20, 2013, 10:52:48 PM
Hi all,
I know this is an old thread, but I'm trying to recount member posts on a forum after deleting large parts of the subject matter.

I have many members who's profile shows a number of posts, who actually have no posts in the system  now. Here is an example: http://smf1.temac.ca/smf/index.php?action=profile;u=110

The stats say he has 1 post, but if you click "Show Posts", there are no results.

I've installed and run the mod several times. It doesn't seem to fix this. I have no other mods installed on a 2.0.5 installation.
Any suggestions?

Thanks,
Ben

I managed to fix this myself. The mod as it stands, doesn't appear to work.
First I manually set the batch processing size limit to 500 instead of 100, this allowed the updates to run in a single refresh. This activated the mod (with multiple batches it doesn't appear to work at all).
Then I noticed that it was leaving untouched members who have existing post stats but have 0 posts at all in the forums (due to deleting multiple forums in my case). The entire way this mod works is to start with a list of users from the messages table. By definition, if a member has left no messages, their stats won't be reset to zero. To get around this I zeros all of the "posts" values in the smf_members table, then reran the modified mod to recount the stats for those who had posted.

sorensonfan41

I tried this mod out for a relatively large forum (1700+ members and over 300,000 posts) a few weeks ago and the mod stopped after a certain period of time and percentage and took me back to the maintenance page.  I checked out everything and the mod didn't fix any of the members' post counts correctly.  The forum I'm referring to is using SMF 2.0.6 and I used the latest version of the mod.

Any ideas on how to fix the problem?  Seems like it's stopping to not overload the server but instead of resuming where it left off, it terminates.

Sorunome

in order to get it work I had to replace
$context['continue_get_data'] = '?action=admin;area=maintain;sa=recountposts;start=' . $_REQUEST['start'] . ';' . $context['session_var'] . '=' . $context['session_id'];
with
$context['continue_get_data'] = '?action=admin;area=maintain;sa=routine;activity=recountposts;start=' . $_REQUEST['start'] . ';' . $context['session_var'] . '=' . $context['session_id'];
in Sources/ManageMaintenance.php

Still a awesome mod, though :)

SMFHacks.com Team

Quote from: Sorunome on June 05, 2014, 02:01:46 PM
in order to get it work I had to replace
$context['continue_get_data'] = '?action=admin;area=maintain;sa=recountposts;start=' . $_REQUEST['start'] . ';' . $context['session_var'] . '=' . $context['session_id'];
with
$context['continue_get_data'] = '?action=admin;area=maintain;sa=routine;activity=recountposts;start=' . $_REQUEST['start'] . ';' . $context['session_var'] . '=' . $context['session_id'];
in Sources/ManageMaintenance.php

Still a awesome mod, though :)

Fixed thanks for the big tip!
Disclaimer: SMFHacks.com Team is not affiliated with the SMF Team or the SimpleMachines NPO.
SMFHacks.com -  Paid Modifications for SMF
Latest Mods:
Community Suite
Newsletter Pro SMF Gallery Pro SMF Classifieds SMF Store

leftezi

Before i proceed to recount, i have a question:

J have some boards in my forum where posts don't count.
Will this mod take this in mind by the recounting?

vbgamer45

Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

leftezi

Thank you for your answer.  :)

I have done the recount in a 16.000 members SMF 2.0.12 forum. The script was running to 100% without problems. I am not sure if it have done the job because i have focused in another problem:
One mod have changed the membergroups that are based in members post in a lot of members. So i have done the recount to fix the problem.
I was expecting that after the recount this members will return in their right membergrup but unfortunately the membergroups are untouched.
The question is: This mod takes in mind the membergroup based in posts by the recounting?

vbgamer45

If it is modified SMF software that does something with post groups then no it does not.
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

Kindred

No...   smf does not recalculate a members post count base during group until they make a new post.
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Biology Forums

Was a 1.x version ever released?

vbgamer45

Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

Biology Forums

Would you mind if I got this backported?

vbgamer45

Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

Kindred

Why don't you just upgrade to the current version instead of continuing to use a version which is barely supported and won't work at all when you host drops the outdated, unsupported and vulnerable php version and instead of trying to keep nursing that outdated version along with custom work?
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

FishingManMatt

Quote from: leftezi on November 17, 2016, 06:39:12 PM
The question is: This mod takes in mind the membergroup based in posts by the recounting?

Quote from: Kindred on November 17, 2016, 10:25:04 PM
No...   smf does not recalculate a members post count base during group until they make a new post.

Indeed.
There is also another way to update these membergroups. After using the mod one can also edit each post count based group and just save it. This will update each membergroup considering new recounted values.

Advertisement: