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 0.2

12357

Comments

  • If you're comfortable running mysql queries from the command line then sure. I'm afraid i cant talk you through it though.
  • i'll see if I still have phpmyadmin on my server somewhere... hmmm
  • haha. Well if you can run that query on your database and see what error it gives that should let us know why it's not grabbing the latest user. Then we can get to the bottom of the permissions issue. For the time being though i need to get some beauty sleep. I'll be back in a coupla hours if you still need a hand.
  • okay i did it! here's the results! Have a good rest! SQL query: Documentation SELECT LUM_User.Name FROM `LUM_User` WHERE LUM_User.UserID = ( SELECT MAX( LUM_User.UserID ) FROM `LUM_User` ) MySQL said: Documentation #1064 - You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'SELECT MAX(LUM_User.UserID) FROM `LUM_User`)' at line 1
  • ok, for the current version of the Forum Statistics, you'll need to make a file called options.inc inside the Statistics folder and put this in: 0 categories => 1 => 0 discussions => 1 => 0 comments => 1 => 0 users => 1 => 0 unique_guests => 1 => 0 top_posting_user => 1 => 0 => 0 top_discussion_starter => 1 => 0 => 0 BE CAREFUL ABOUT SPACES because it can mess it up majorly Sorry that i haven't been able to do any more on the add-on because i've been working hard on other things that i kinda need done, which is a big project
  • Did that but it still shows Newest user as 0 :-(
  • Then your not getting all the information needed, try replacing the sql query with what you had before. This is only going to work with your site unless you change something database wise, but it'll still be able to recieve the data needed
  • edited June 2006
    @kimonostereo: If your MySQL is older than some version or other, subqueries (the second select in parentheses) are not supported.

    Try this to select the latest user:
    SELECT LUM_User.Name
    FROM `LUM_User` 
    ORDER BY UserID DESC 
    LIMIT 0 , 1
  • Yeah it's definitely that query that's bugging this out. If wallphones query works you need to go to line 76 (i think) in your default.php and swap: $this->StatisticsSQL['newest_user'] = "SELECT ".$USER_TABLE.".".$USERNAME." FROM `".$USER_TABLE."` WHERE ".$USER_TABLE.".".$USERID." = (SELECT MAX(".$USER_TABLE.".".$USERID.") FROM `".$USER_TABLE."`);"; for: $this->StatisticsSQL['newest_user'] = "SELECT ".$USER_TABLE.".".$USERNAME." FROM `".$USER_TABLE."` ORDER BY ".$USERID." DESC LIMIT 0 , 1"; Then see what happens. On a slightly unrelated matter, do these statemenets really need to ". and ." all the time if the string is encased in ""'s? Wouldnt it evaluate the variables anyway?
  • Double quotes don't need them, but if you always use single quotes you do.

    This SHOULD be equilivent
    
    $this->StatisticsSQL['newest_user'] = "SELECT $USER_TABLE.$USERNAME FROM `$USER_TABLE` ORDER BY $USERID DESC LIMIT 0, 1";
  • Hi guys, I've installed the extension, everything shows up right. The only problem I have is when I got to the settings/statistics/ page, and try to unselect certain options and click "modify", it sends me to "/settings/settings.php" which doesn't exist in the vanilla root folder. Any ideas? what could I be doing wrong? Any help appreciated. Alex.
  • @wallphone - what version of mysql should I be running to get this to work? Currently it's 4.0.21 thanks!
  • @Kimono

    You should be able to get it working with your current version if you swap the code like Minisweeper noted between my two earler posts.

    Otherwise, upgrade MySQL greater than 4.1
  • Thanks Mr. WallPhone! I'll be doing extensive upgrades to my server soon anyway!
  • rockwaldorockwaldo New
    edited June 2006
    hmmmm, the stats work fine, but after about 5 minutes of having them enabled i get this error at the top of the index page:

    Warning: unlink(d:/domains/stillwater-rock.com/wwwroot/forum/extensions/Statistics/options.inc): Permission denied in d:\domains\stillwater-rock.com\wwwroot\forum\extensions\Statistics\default.php on line 59 Warning: fopen(d:/domains/stillwater-rock.com/wwwroot/forum/extensions/Statistics/options.inc): failed to open stream: Permission denied in d:\domains\stillwater-rock.com\wwwroot\forum\extensions\Statistics\default.php on line 60 Warning: fwrite(): supplied argument is not a valid stream resource in d:\domains\stillwater-rock.com\wwwroot\forum\extensions\Statistics\default.php on line 61 Warning: fclose(): supplied argument is not a valid stream resource in d:\domains\stillwater-rock.com\wwwroot\forum\extensions\Statistics\default.php on line 62

    any ideas?
  • hang on, just read up, we've had this before....sorry i'l read the thread properly...
  • hmmm, still getting this error, which is odd
  • edited July 2006
    I just did a clean install of Vanilla 1 and I enabled Statistics 0.2.8. Sometimes when I go to the "Discussions" section of the forum, I get this error:
    Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in /home/content/j/a/d/jade4269/html/vanilla_1/extensions/Statistics/default.php on line 85

    Warning: Invalid argument supplied for foreach() in /home/content/j/a/d/jade4269/html/vanilla_1/extensions/Statistics/default.php on line 87


    Looks sort of like errors people were having before, but a little bit different. I was going to do the whole thing of making the options.inc file, but there's already one there. Should I add the text Vincent put in his post to the end of my options.inc file? I don't think I should, it already has it's own stats there.

    -Karasuhebi
  • i get these errors: Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in /www/htdocs/thascrip/vanilla/extensions/Statistics/default.php on line 85 Warning: Invalid argument supplied for foreach() in /www/htdocs/thascrip/vanilla/extensions/Statistics/default.php on line 87 the options.inc is chmodded 410 is this correct??? 410 is not much?! i cant open this file via ftp and i cant delete it either...
  • it should be like 777
This discussion has been closed.