I just realized that the archive stats are not being updated automaticaly. :/
My Hub TrekNation | World of X | Arda Fanfiction
There's nothing that's changed in the archive stats. For that matter what archive stats are you talking about? Details. Please include them.
On the "main" page there are several blocks to the right side, e.g. "latest story", "story of the month" ... and on of them is called "Archive Stats".
Content example:
We are the home of 65 authors from among our 84 members. There have been 182 reviews written about our 420 stories consisting of 714 chapters and 1818523 words. A special welcome to our newest member, ********. You are currently logged in as ########.
These stats never get updated automatically but have to be updated via "Admin -> Archive Maintentance -> Re-calculate Site Statistics"
Bug or "feature" ?
My Hub TrekNation | World of X | Arda Fanfiction
I usually click all of the Archive Maintenance links (recalculate reviews, recalculate stories, fix category counts, etc.) and sometimes that will correct the Site Stats.
Also sometimes I've found if I go into Admin->Blocks->Site Stats->Options and change it from narrative to chart is regenerates the page with the corrected numbers.
******************************************
Mucking around in eFiction since circa 2001 (ver. 1.0)
Now running v.3
Each of those stats is updated independently as those things change. Which one isn't changing? If you've updated from a previous version of eFiction, make sure you've got the stats table with data in it. Also use the recalc option as Babaca said. As I said, nothing has changed on the stats since probably 3.3.
I've always been up to date with the scripts version. And I can only tell you what I have observed. The reviews, chapters and stories count is not updated automatically. At least not when I (as admin) add new stories. I know where to update these stats manually but I think that is not the point. This is not a new bug. I was having that problem with 3.5.1 too. π
My Hub TrekNation | World of X | Arda Fanfiction
I don't think it's a true bug, as it's not global. It's not happening to any of my sites. It must be something unique to your site. I'm not really sure what that would be, though. Maybe a database issue? Or perhaps since it's a block, are you using Admin > Blocks to control it, or is there any style/info stuff being controlled through the skin's variables.php?
Yeah, I'd have to agree with what Lyndsie said. If it were a true bug we'd have a lot of other people reporting it and long before now. I'd guess somewhere along the line your database got messed up. Again, check for a _stats table and make sure there is data in it. I'd also probably try repairing that table through phpmyadmin. Since it's all of your stats, it's almost certainly an issue with your database or with that block. I'd maybe also re-upload the stats block from the current download. Sometimes FTP and file managers can do strange things. More than a few times, I've found files that should have been over-written weren't.
The table is correct. My hubby checked the coding and made some changes - he knows php too - and now it works. I have no idea what the prob was. Well now it is fixed.^^
My Hub TrekNation | World of X | Arda Fanfiction
Well, my wife is not 100% precise ... I did not fix it, i completely changed it in ./blocks/info/info.php
I commented out:
[code$stats = dbassoc(dbquery("SELECT * FROM ".TABLEPREFIX."fanfiction_stats WHERE sitekey = '".SITEKEY."' LIMIT 1"));
And put this query in:
$stats = dbassoc(dbquery("SELECT *
FROM
( SELECT SUM( wordcount ) AS `wordcount` , COUNT( chapid ) AS `chapters`, COUNT(DISTINCT `uid`) as authors
FROM fanfiction_chapters WHERE `validated` > '0' ) AS Chapters,
( SELECT COUNT(`seriesid`) as `series`
FROM `fanfiction_series` ) as Series,
( SELECT COUNT(`sid`) as `stories`
FROM `fanfiction_stories` ) as Stories,
( SELECT COUNT(`uid`) as `members`
FROM `fanfiction_authors` ) as Authors,
( SELECT `uid` as newestmember
FROM `fanfiction_authors` ORDER BY `uid` DESC LIMIT 0 , 1 ) as Member,
( SELECT COUNT(reviewid) as reviews, COUNT(DISTINCT item) as review_distinct, COUNT(DISTINCT uid) as reviewers
FROM `fanfiction_reviews`) as Reviews"));
Depending on some "validated" issues this is maybe not perfect but works fine otherwise, plus it fixes the element "reviewers" which did not work on our efiction - it returned the exact number of reviews - 1, don't see where that would make sense.
After people said it would work just fine we entered another story, counter went DOWN by 1, then after validating it went UP by 1 to the original value ... now we missed the new story on the counter and had to manually run an update.
That is a horrible fix. That's going to slow your site down considerably. And again...which stats are wrong and how?
ETA: Okay found the issue with the story count. A fix is now in the SVN. What other stats do you think aren't being updated correctly?
Okay found an error in the archive maintenance for the reviewers. It's calculating correctly when a review is added, but not when you recalculate the statistics from the admin panel. There's a fix in the SVN.
That is a horrible fix. That's going to slow your site down considerably. And again...which stats are wrong and how?
Thanks for the flowers π The time for this query is somewhere in the microseconds, I am on a dedicated server with local mysql, and thanks to a well set amount of index fields almost nothing requires excessive data collection - plus it shows the correct values at any time.
Wrong stats: As said (and SVN-fixed): reviewers, most others are ok I guess - not that I feel like counting the words by hand.
ETA: Okay found the issue with the story count. A fix is now in the SVN. What other stats do you think aren't being updated correctly?
See above - and thanks for the fix.
That's great that you're on a dedicated server and can do that, but most are on shared hosting and need every little bit we can give them and probably shouldn't follow your example.
That's great that you're on a dedicated server and can do that, but most are on shared hosting and need every little bit we can give them and probably shouldn't follow your example.
And some of us are on dedicated servers and need every little bit of help we can get on keeping the load low.
Skins made by Kali are no longer supported!
