Vanilla 1 is no longer supported or maintained. If you need a copy, you can get it here.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

Forum Statistics



  • "Newest User" displays correctly but links incorrectly, it goes back to your profile instead of the newest user.
  • I had that same problem with this extension installed. Is there any fix for this?
  • Not that I know of, I'm looking for one as well.
  • The solution to the missing link on the new user link is very simpel.

    Just open the default.php from your \extention\statistics page and scroll down to the "function GetUserLink($Username) {"
    aprox line 192

    between the line that says "function GetUserLink($Username) {" and "$USER_TABLE = (isset($this->Context->DatabaseTables['User']))"......
    add the following:

    So your lines should look like:
    function GetUserLink($Username) { $Username=trim($Username); $USER_TABLE = (isset($this->Context->DatabaseTables['User'])) ? $this->Context->DatabaseTables['User'] : $Context->DatabaseTables['User'];

    This should do the trick.
  • Bug: username with ' sample ol'chous generate цarning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in /.../extensions/Statistics/default.php on line 192

    I'm having the same problem. I had to turn the addon off. is there a fix for this? Thanks for your help this is a great addon!
  • Would this be caused by the apostrophe?

    Posted: Tuesday, 24 June 2008 at 5:02PM

  • Yes It is.
  • replace the line "$Username=trim($Username);" in my previous bug fix with


    I think that will fix the bug with the apostrophe, and the userlink!
  • That Fixed it! Thanks for your help! This is a great add-on! My users love it!
  • Vincent: If you bring an update pls dont forget to update the "Version: 0.4.6" in "default.php" else the update routine will not check that the newest version is installed and will ask anytime to get the latest.
  • I just updated this extension but it still says 0.4.5 in default.php. I thought I should let you know And thanks for "trim()" fix. it took me half an hour to figure out the error in the code. I came here to comment but it was already being discussed. BTW Thanks for this extension
  • version still says 0.4.5 in latest download for me, too
  • Same problem for me. And the username linking still works randomly.
  • Hi, I wanted the statistics to disappear on the settings-page. My plan: changing line 293 into "...settings.php" but: have to change line 305 too - because that enables to change settings through the settings.php if line 293 ist "index.php" so, for example, delete the "else" of "else if" By change line 293 into: if ($Context->SelfUrl == "settings.php" or "index.php") { the statistics will appear on both (or more) pages. Will try to translate the extention into German - if your interessted contact me.
  • I was wondering if there is a place where I can reset the information that is shown with this add-on? I installed the forum and added this add-on (together with some others), but now I want to go live. With all my testing and logging in and out, it has obviously now exploded my stats. When I go live, I would like the stats to be clear. Is there also a what to exclude specific users? I have a test account and also and administrator's account, but I do not what these accounts to be added to the stats. Thanks and this is a great add-on (as everyone else has also already stated). Julian.
  • SheilaSheila ✭✭
    Are these instructions
    @ littlepeet Apr 14th 2008

    replace the last two chars "; on the end of line 86 in default.php with \nusers_in_the_last_24_hours".$GlobalKey."1".$GlobalKey."0".$GlobalKey."0"; add the following line to default.php at line 41 $Context->SetDefinition("Statistic_users_in_the_last_24_hours", "Users Logged on the last 24 hours"); insert the followingline at line 123 to default.php $this->StatisticsSQL['users_in_the_last_24_hours'] = "SELECT count(*) FROM `".$this->Context->DatabaseTables['User']."` WHERE DATE_SUB(NOW(),INTERVAL 1 DAY) <= ".$this->Context->DatabaseTables['User'].".".$this->Context->DatabaseColumns['User']['DateLastActive'].";";
    Still meant to be somewhat accurate? At least linenumbers to insert code are not..

    Tested this and all it resulted was losing the total comments count. Appreciated if somebody knows how to add data of Users Logged on the last 24 hours with latest release of Vanilla.

    Admin option to show phantom users to selected groups would also be just superb feature. (Supposing that does not exist or am I just missin something?)
  • There's a bug in GetUserLink(), the username in the query isn't escaped. Add a mysql_real_escape_string around $Username in the "$Query =" line.
Sign In or Register to comment.