![]() |
Quote:
I'm a bit confused now that you mentioned not to re-run this script. Is there a check put in place so that it won't reimport if it exist? Should I run it or should I wait? Was hoping to completely convert over to HA, but for now, we are feeding 'thanks' into vbexperience system to generate stats via their CDP addon which allows to score members based on their activites. Since HA is not listed as a CDP addon, will need both systems until CDP addon is available. Can this be done? HA to only show status without 'voting' HA to coexist with THANKS and a nightly run of ha_import.php Hope that all makes sense. |
Interesting need.
The script will only import a vote once per user but let me dig in a little deeper and see if that would cause any problems and if so, how I can make sure it all works ok. |
1 Attachment(s)
Ok cooltechie, I think I've got the script you need.
Basically I've written a combination of the import routine and the recalculate votes routine such that thank you posts are reviewed, new votes are added and old ones are skipped. This builds the vote database up properly paving the way to clear the master post records (which tell the post how many people voted up/down). Finally we rebuild all of those master records off the raw votes. This should be something you can run every 24 hours or 24 seconds. Just keep in mind that there are a lot of queries involved as this is litterally checking every post to update the thankyous and rebuild the master vote record. |
Quote:
|
Quote:
|
I noticed another small bug - when quick replying to a thread, helpful_answers_mosthelp_post shows up under the new reply.
|
Quote:
1. Add a separate table to store the id of any vote that is "soft-deleted". That way current code would stay the same, and only the top helpful posts page would check it. 2. Leave votes intact when hard/soft deleting a post, and clean them out with a daily cron job. That way if you soft-delete a post and go right back and restore it, it would still have its votes. |
No, just use ha_import_clean.php. It's written specifically to do what you need.
|
Quote:
|
Quote:
|
All times are GMT. The time now is 09:34 PM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|