My archive: http://www.athenewolfe.com/justrewards/index.php
On the main index where the site stats are they are blank:
Site Info
We are the home of authors from among our members. There have been reviews written about our stories consisting of chapters and words. A special welcome to our newest member, . You are currently logged in as athenewolfe.
I have already
1) Gone to archive maintenance and did the Re-calculate Site Statistics with no change
2) This is not a skin issue as it has never worked since my upgrade - (which I managed to crash my site about 6 times. So it could stem from there.) and the new skin was only activated today
3) I have turned on debug but don't see anything
4) I have gone to MySQL and PHP table I have the table xxxxfanfictionstats
Field Type Collation Attributes Null Default Extra Action
sitekey varchar(50) latin1_swedish_ci No 0
stories int(11) No 0
chapters int(11) No 0
series int(11) No 0
reviews int(11) No 0
wordcount int(11) No 0
authors int(11) No 0
members int(11) No 0
reviewers int(11) No 0
newestmember int(11) No 0
With selected: Check All / Uncheck All With selected:
And that looks normal to me from the browsing I have done ... I am not sure what I can do from here to fix. Any ideas of suggestions?
did you try reclicking Initialize Block for the site info block from the blocks menu within the admin section if not try that (tho im not sure whether you have to reInitialize Blocks after an upgrade) but I would go to the blocks section and see if the link is there to Initialize the site info block
~Spikey~
my site url: http://www.fanfictionworld.org
efic version:3.5.3
I went into Admin - Blocks and everything is initialized and it is active I even submitted it again and no luck - thanks for the idea - researching in blocks to see if I spot any errors but no luck yet
A quick question on info.php the following code is listed
if(_AUTHORTABLE != $tableprefix."fanfiction_authors") {
list($members) = dbrow(dbquery("SELECT COUNT("._UIDFIELD.") as members FROM "._AUTHORTABLE));
list($newest) = dbrow(dbquery("SELECT "._UIDFIELD." as uid FROM "._AUTHORTABLE." ORDER BY "._UIDFIELD." DESC LIMIT 1"));
dbquery("UPDATE ".$tableprefix."fanfiction_stats SET members = $members, newestmember = '$newest' WHERE sitekey = '$sitekey' LIMIT 1");
my tables are fangfanfiction not fanfiction - is this the possible error - in experimentation I tried fangfanction and it did nothing but then where it said fanfiction_stats and I changed it to fangfanfcition in crashed the site ... so I undid it and put it back to how it read previously
Not sure if this is relevant or not but thought I would post it
Next step I had someone send me their version 3 info file because theirs works on thier site and compared it with mine. Mine was wrong... so I cut and pasted thiers (after saving mine of course) and now it works - except my author count is off by six and I already tried to recalculate - any ideas on why that would be?
Original code
<?php
if(!defined("_CHARSET")) exit( );if(file_exists(_BASEDIR."blocks/info/{$language}.php")) include_once(_BASEDIR."blocks/info/{$language}.php");
else include_once(_BASEDIR."blocks/info/en.php");
global $noskin, $tpl;
$storiesquery =dbquery("SELECT COUNT(sid) as totals, COUNT(DISTINCT uid) as totala, SUM(wordcount) as totalwords FROM ".$tableprefix."fanfiction_stories WHERE validated > 0");
$storyresult = dbassoc($storiesquery);$chapterquery = dbquery("SELECT COUNT(chapid) as chapters FROM ".$tableprefix."fanfiction_chapters where validated > 0");
list($chaptercount) = dbrow($chapterquery);
$authorquery = mysql_query("SELECT COUNT("._UIDFIELD.") as totalm FROM "._AUTHORTABLE);
$authorresult = mysql_fetch_assoc($authorquery);$newest = mysql_fetch_assoc(mysql_query("SELECT "._UIDFIELD." as uid, "._PENNAMEFIELD." as penname FROM "._AUTHORTABLE." ORDER BY "._UIDFIELD." DESC LIMIT 1"));
$reviewquery = mysql_query("SELECT COUNT(reviewid) as totalr FROM ".$tableprefix."fanfiction_reviews");
$reviewresult = mysql_fetch_assoc($reviewquery);
$submissions = "";
if($adminloggedin) {
if(file_exists(_BASEDIR."languages/".$language."_admin.php")) include_once(_BASEDIR."languages/".$language."_admin.php");
else include_once(_BASEDIR."languages/en_admin.php");
$countquery = dbquery("SELECT COUNT(DISTINCT chapid) FROM ".$tableprefix."fanfiction_chapters WHERE validated = '0'");
list($count) = dbrow($countquery);
if($count) $submissions = sprintf(_QUEUECOUNT, $count);
}
if(!empty($blocks['info']['style']) && $blocks['info']['style'] == 2) {
$tpl->assignGlobal("totalstories", $storyresult['totals']);
$tpl->assignGlobal("totalauthors", $storyresult['totala']);
$tpl->assignGlobal("totalmembers", $authorresult['totalm']);
$tpl->assignGlobal("totalreviews", $reviewresult['totalr']);
$tpl->assignGlobal("totalwords", !empty($storyresult['totalwords']) ? $storyresult['totalwords'] : "0");
$tpl->assignGlobal("totalchapters", $chaptercount);
$tpl->assignGlobal("newestmember", "<a href=""viewuser.php?uid=".$newest['uid'"]."">".$newest['penname']."</a>");
if($loggedin) $tpl->assignGlobal("loggedinas", _LOGGEDINAS." $userpenname. ".($noskin ? _NOSKIN : ""));
$tpl->assignGlobal("submissions", $submissions);
}
else {
if($loggedin) $loggedinas = _LOGGEDINAS." $userpenname. ".($noskin ? _NOSKIN : "");
else $loggedinas = "";
if(empty($blocks['info']['style'])) {
$content = "<div id="info_left" style="float: left; text-align: right;" class='label'>"._STORIES.": <br />"._CHAPTERS.": <br/>"._WORDCOUNT.": <br/>"._AUTHORS.": <br />"._MEMBERS.": <br />"._REVIEWS.": <br/></div><div id="info_right" style="text-align: left;">".$storyresult['totals']."<br />".$chaptercount."<br />".(!empty($storyresult['totalwords']) ? $storyresult['totalwords'] : "0")."<br />".$storyresult['totala']."<br />".$authorresult['totalm']."<br />".$reviewresult['totalr']."<br /></div><div id="newestmember"><span class='label'>"._NEWESTMEMBER.":</span> <br /><a href=""viewuser.php?uid=".$newest['uid'"]."">".$newest['penname']."</a><br /></div><div id="loggedinas">$loggedinas</div>";
}
else if($blocks["info"]["style"] == 1) {
$replace = array($storyresult['totala'], $authorresult['totalm'], $reviewresult['totalr'], $storyresult['totalwords'], $chaptercount, $storyresult['totals'], "<a href=""viewuser.php?uid=".$newest['uid'"]."">".$newest['penname']."</a>", $loggedinas, $submissions);
$search = array("@{authors}@", "@{members}@", "@{reviews}@", "@{totalwords}@","@{chapters}@", "@{stories}@", "@{newest}@", "@{loggedinas}@", "@{submissions}@");
$content = preg_replace($search, $replace, (!empty($blocks['info']['template']) ? stripslashes($blocks['info']['template']) : _NARTEXT));
}
}
?>
and the new code
<?php
if(!defined("_CHARSET")) exit( );if(file_exists(_BASEDIR."blocks/info/{$language}.php")) include_once(_BASEDIR."blocks/info/{$language}.php");
else include_once(_BASEDIR."blocks/info/en.php");
global $noskin, $tpl;$storiesquery =dbquery("SELECT COUNT(sid) as totals, COUNT(DISTINCT uid) as totala, SUM(wordcount) as totalwords FROM ".$tableprefix."fanfiction_stories WHERE validated > 0");
$storyresult = dbassoc($storiesquery);$chapterquery = dbquery("SELECT COUNT(chapid) as chapters FROM ".$tableprefix."fanfiction_chapters where validated > 0");
list($chaptercount) = dbrow($chapterquery);
$authorquery = mysql_query("SELECT COUNT("._UIDFIELD.") as totalm FROM "._AUTHORTABLE);
$authorresult = mysql_fetch_assoc($authorquery);$newest = mysql_fetch_assoc(mysql_query("SELECT "._UIDFIELD." as uid, "._PENNAMEFIELD." as penname FROM "._AUTHORTABLE." ORDER BY "._UIDFIELD." DESC LIMIT 1"));
$reviewquery = mysql_query("SELECT COUNT(reviewid) as totalr FROM ".$tableprefix."fanfiction_reviews");
$reviewresult = mysql_fetch_assoc($reviewquery);
$submissions = "";
if($adminloggedin) {
if(file_exists(_BASEDIR."languages/".$language."_admin.php")) include_once(_BASEDIR."languages/".$language."_admin.php");
else include_once(_BASEDIR."languages/en_admin.php");
$countquery = dbquery("SELECT COUNT(DISTINCT chapid) FROM ".$tableprefix."fanfiction_chapters WHERE validated = '0'");
list($count) = dbrow($countquery);
if($count) $submissions = sprintf(_QUEUECOUNT, $count);
}
if(!empty($blocks['info']['style']) && $blocks['info']['style'] == 2) {
$tpl->assignGlobal("totalstories", $storyresult['totals']);
$tpl->assignGlobal("totalauthors", $storyresult['totala']);
$tpl->assignGlobal("totalmembers", $authorresult['totalm']);
$tpl->assignGlobal("totalreviews", $reviewresult['totalr']);
$tpl->assignGlobal("totalwords", !empty($storyresult['totalwords']) ? $storyresult['totalwords'] : "0");
$tpl->assignGlobal("totalchapters", $chaptercount);
$tpl->assignGlobal("newestmember", "<a href=""viewuser.php?uid=".$newest['uid'"]."">".$newest['penname']."</a>");
if($loggedin) $tpl->assignGlobal("loggedinas", _LOGGEDINAS." $userpenname. ".($noskin ? _NOSKIN : ""));
$tpl->assignGlobal("submissions", $submissions);
}
else {
if($loggedin) $loggedinas = _LOGGEDINAS." $userpenname. ".($noskin ? _NOSKIN : "");
else $loggedinas = "";
if(empty($blocks['info']['style'])) {
$content = "<div id="info_left" style="float: left; text-align: right;" class='label'>"._STORIES.": <br />"._CHAPTERS.": <br/>"._WORDCOUNT.": <br/>"._AUTHORS.": <br />"._MEMBERS.": <br />"._REVIEWS.": <br/></div><div id="info_right" style="text-align: left;">".$storyresult['totals']."<br />".$chaptercount."<br />".(!empty($storyresult['totalwords']) ? $storyresult['totalwords'] : "0")."<br />".$storyresult['totala']."<br />".$authorresult['totalm']."<br />".$reviewresult['totalr']."<br /></div><div id="newestmember"><span class='label'>"._NEWESTMEMBER.":</span> <br /><a href=""viewuser.php?uid=".$newest['uid'"]."">".$newest['penname']."</a><br /></div><div id="loggedinas">$loggedinas</div>";
}
else if($blocks["info"]["style"] == 1) {
$replace = array($storyresult['totala'], $authorresult['totalm'], $reviewresult['totalr'], $storyresult['totalwords'], $chaptercount, $storyresult['totals'], "<a href=""viewuser.php?uid=".$newest['uid'"]."">".$newest['penname']."</a>", $loggedinas, $submissions);
$search = array("@{authors}@", "@{members}@", "@{reviews}@", "@{totalwords}@","@{chapters}@", "@{stories}@", "@{newest}@", "@{loggedinas}@", "@{submissions}@");
$content = preg_replace($search, $replace, (!empty($blocks['info']['template']) ? stripslashes($blocks['info']['template']) : _NARTEXT));
}
}?>
Now If I can figure out why my author count is off I will be set....
Still taking suggestions and tips for that!
Last note which is a question actually - My site stats are off by 6 - I have 6 co-authors listed who have not written any independent fic only co-authored fics - is it possible that this is why my stats are off?
Probably. π
Whoever said nothing is impossible never tried slamming a revolving door.
url: https://www.potionsandsnitches.org/fanfiction
php: 7.4.33 msql: 5.6.51-community GPL
efic version: 3.5.5 latest patches: yes
bridges: none mods: challenges, tracker, story end, beta, word
Hi,
I've just upgraded myself, and have this same problem. I just wondered if someone could provide the path to the file that needs to be edited with the new info? I thought I had it, but I got a mySQL error returned, and I think I may have edited the wrong file all together. Oops!
Thanks!
No, this is an old problem. You probably have the sitekey problem. Try this:
Copy the site key info from the database table fanfiction_settings and paste it into the database table fanfiction_stats for the sitekey. It will otherwise say SITEKEY.
Undo whateber you did before on this thread. π
3.3 has a problem with the sitekey not saving in new installations and upgrades. Doing what I say will fix it.
Whoever said nothing is impossible never tried slamming a revolving door.
url: https://www.potionsandsnitches.org/fanfiction
php: 7.4.33 msql: 5.6.51-community GPL
efic version: 3.5.5 latest patches: yes
bridges: none mods: challenges, tracker, story end, beta, word
Ah thanks, worked a charm.
