Problem with Deleting Members!

Bart

Active Member
I just deleted a few sites from my Topsite as the sites were no longer active and once i deleted those sites it also altered the total stats that the site has given out hits ect...

My stats are now extremely inaccurate.

I understand that the sites stats themselves would not be able to be viewable anymore but why also remove the stats from the overall stats?!
 

Basti

Administrator
Staff member
Overall stats are simply calculated adding all members stats together. And since you deleted some members their stats are also gone.
Doing it in another way would produce unneeded overload.

And on a sidenote. Doing it the other way around would produce unaccurate stats.
Programatical seen ( and practical too, in my opinion ), the site is not there, hence cant provide something to the overall stats, else you would always have higher stats than actually visible on the list.
Unlikely but possible, visitor counts each members stats and compare to overall stats. He would think stats are faked
 

Mark

Administrator
Staff member
Stats are stored in the stats table for each individual member, overall stats simply adds all the members stats together. When you delete a member their stats are deleted as well, and this would be reflected in the overall stats.

Deleting obsolete members stats has worked like this for 5+ years with no complaints and I believe it is the correct way to handle this. You are free to disable overall stats or extend it to store obsolete members stats if you like, you would just need to edit the delete member function so it does not remove data from the VL_stats table. But for those of us with very large lists this is not recommend for optimal performance.

Perhaps Overall stats based on currently active members would be a more accurate title for that plugin.
 

Bart

Active Member
Why would overall site stats get effected if a site gets deleted?
Overall site stats are still relevant regardless if a site is deleted as they are the site stats in general.
 

Mark

Administrator
Staff member
you are free to change the way that works, and we are willing to assist you in doing so. But we will not be changing the core to store obsolete users data.
 

Bart

Active Member
Sorry I'm just a little pissed as half my site stats are gone by deleting a few sites, could you please explain to me how i can disable this and would this affect if the same site joined again?
 

Mark

Administrator
Staff member
well perhaps you would have been better to make those site inactive instead of deleting them...

that is the problem, if the same site joins again the signup may fail because their username already exists in the stats table. I'm not sure how it will react, I have never had a need to keep deleted members stats.

open sources/admin/delete.php and remove this line:

PHP:
    $DB->query("DELETE FROM {$CONF['sql_prefix']}_stats WHERE username = '{$username}'", __FILE__, __LINE__);
 

Mark

Administrator
Staff member
also note... if a user joins in the future with the same username as a member who was deleted they will absorb those old stats.. Unlikely, but a side effect you may want to consider.
 

Harris Marfel

Top 100 Online Gaming
yeah i was trying to delete one site, and the vote counter and google+1, facebook, twiter counter was reset to 0
i don't have a backup :(
 

Mark

Administrator
Staff member
yeah i was trying to delete one site, and the vote counter and google+1, facebook, twiter counter was reset to 0
i don't have a backup :(
Can you explain further, I am not sure I understand what the problem is. facebook, google+ twiiter have absolutley nothing to do with anything in this topic.
 

Harris Marfel

Top 100 Online Gaming
for example. i already have 10 member site, but i found one of them is duplicate. then i remove site that have same URL. and after remove it. IN and OUT value decrease and facebook like become to 0. so i think it was a same think like you say. not to delete it, but deactive it.
 

Basti

Administrator
Staff member
Facebook like dont have anything to do with at all. If the other site as 0 likes you have facebook settings to like members stats page and not member url
 
Top