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.
Options

Forum Statistics 0.2

123457»

Comments

  • Options
    The two errors on "unlink" and "chmod" are because the webserver program doesn't have permission to do those operations. This could be because you're using PHP safemode? Alternatively, you may need to change the ownership of those files to match the webserver (e.g. www-data.www-data instead of debono.users, but you have to check). Either way, as long as the permissions are manually correct (as they appear to be), you can just comment out those lines...it probably works just fine without them.
  • Options
    it'l work fine but it probably isnt cacheing the details correctly which results in a heavier mysql load.
  • Options
    edited August 2006
    That was my problem exactly! The stats do seem to be working but I still get the same errors when I hit the Modify button.

    I was able to set all permissions in my control panel to allow (hopefully this won't cause problems other places??) but never did find anything related to CHMOD anywhere in my control panel. I just assumed it referred to permissions since I really don't know what CHMOD means (or does).
  • Options
    chmod refers to the linux/unix command for changing file permissions, so you've already found it in your control panel. Which errors exactly do you get when you choose "Modify"? Is it these:

    Warning: unlink(/usr/www/users/debono/forum/extensions/Statistics/options.inc): Permission denied in /forum/extensions/Statistics/default.php on line 59 Warning: chmod(): Operation not permitted in /forum/extensions/Statistics/default.php on line 63

    It sure seems to me like it's actually saving the file without any problem...otherwise we'd see an error on line 60. If so, then it's just failing to delete the file (on line 59) and then change the permission (on line 63). If I were you, I'd comment out lines 59 and 63, like so (note the double-forward slash...//):

    //if(file_exists($this->Context->Configuration['EXTENSIONS_PATH']."Statistics/options.inc")) unlink($this->Context->Configuration['EXTENSIONS_PATH']."Statistics/options.inc"); $link = fopen($this->Context->Configuration['EXTENSIONS_PATH']."Statistics/options.inc", "w"); fwrite($link, $this->StatisticsFile); fclose($link); //chmod($this->Context->Configuration['EXTENSIONS_PATH']."Statistics/options.inc", 0660); unset($this->StatisticsFile);

    See if that fixes it. In particular, see if the options.inc file changes after a new post. If so, then it's working.
  • Options
    That's exactly what I did jonathanve see here...

    Fatal error: Call to a member function on a non-object in forum/extensions/Statistics/default.php on line 28
    The above error on previewing a new comment.
  • Options
    Wow...that's a weird one. That doesn't seem to be the result of the suggested change...line 28 is way before and very much unrelated. Are you sure you're using the latest version of Vanilla?
  • Options
     Quote: jonathanve  Are you sure you're using the latest version of Vanilla?
    Yes unless someone slipped me an imposter!
  • Options
    Alright, I see what you're saying. You've hit a genuine bug between the statistics plugin and the preview post plugin. Here's a link to an updated version:

    http://jdve.yi.org/downloads/Statistics-2006-06-11-Fixed.zip

    This version has both the permissions issue and the recent bug fixed (hopefully).
  • Options
    edited August 2006
    wow, i didn't know there were so many problems with it!!! Looking at the great responce to this extension, and how many people have downloaded it, i'll make a newer version once i get the time for it. @jonathanve - Thanks for the fixup, i'll update it now.
  • Options
     Quote: jonathanve  This version has both the permissions issue and the recent bug fixed (hopefully).

    Thank you, all fixed, working beautifully.
    I changed it so it displays on the categories page instead of discussions, more room for it there.

    Thanks again.
  • Options
    the statistics extension doesn't appear on index if you have the show categories page first extension enabled, it only seems to work if you have the default page disucsssions, if you have the category first it will display only when you click on a discussion is there anway to keep the stats on even if we have categories first ?
  • Options
    Open up the default.php file in the statistics folder, find the bit which says something like
    in_array($Context-SelfUrl, 'index.php'); or whatever, and add ,'categories.php' into that bracket.
  • Options
    I only see this if ($Context->SelfUrl == "index.php") { when I try to add ,'categories.php' only a blank page appears, I also tried it with " " and same thing
  • Options
    change that line to
    if (in_array($Context->SelfUrl('index.php','categories.php'))) {

    Should work i think.
  • Options
    edited September 2006
    virtually deleted ;-)
  • Options
    Sorry. I'm trying to do stuff from memory here. Replace the if statement with:
    if (in_array($Context->SelfUrl, array("account.php", "categories.php", "comments.php", "index.php", "search.php"))) {
    (you can remove any of those pages you dont want it on) and it should definitely work!
  • Options
    edited September 2006
    virtually deleted ;-)
  • Options
    ever since I did a new install of vanilla the statistics extension has had some major issues, no doubt some of the permissions issues described up top but have not found any solution, I downloaded that updated fix but now it own't even show up in the extension list, that is the only extension i'm having trouble with
This discussion has been closed.