My options.inc file is CHMOD'ed to 777. I'm still getting 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
I get the same error each time it updates the stats. It does seem to work, and even if the errors are a result of a server config, is there a way to turn them off?
If anyone wants to have some more statistics all you need to do is to do these following steps
Step 1:
Add a language definition at the top in this kind of format
$Context->Dictionary["Statistic_ -- Statistic Name -- "] = " -- Language Name -- ";
if you would like another language definition for other lines, somethign like this can be achieved
$Context->Dictionary["Statistic_ -- Statistic Name -- _ -- Number > 1 -- "] = " -- Language Name -- ";
Step 2:
Add a new line into the DefineSQL function in this kind of format
$this->StatisticsSQL[' -- Statistic Name -- '] = " -- SQL -- ";
Within this sql you may have multiple results, but they will need to have names for good user reference
Step 3:
This will be the hardest part of it all and the extension may not do what you want to if you stuff it up
Open up the options.inc file and add something like this into the file.
-- Statistics Name -- => -- Enabled (0/1) -- => 0 -- Any other lines needed ( => 0) --
NOTE:// the separator is " => " WITH the spaces!!
The order of the statistics will be will be shown from top to bottom of the options.inc file so put it in the position that you would like to have it.
REMEMBER:// This extension has a cache in it and will only reset after every 5 minutes, so you may want to set the top line to -- 0 -- so that it will reset
If anyone has succeded in making their own that they like or find useful, can you please add them here, with the appropriate database variables inside them, for anyone who wants to use them.
@ Nathan and Jade
This problem is probably with the sql being used. I will probably need to make another sql query to address the problem of earlier MySQL versions
Yeah. I am using MySQL 3.23.58, which is a problem for a lot of applications. It is MediaTemple, and they 'say' there is an upgrade in the works, but God knows when that will take place.
mine died yesterday...
i still get the Statistic header on the left, but no stats.. when i go to the control panel for it, I get
"Please configure the options for the statistics on the index page to whatever your personal needs are for this forum"
and the Modify button, but no options
anybody run into this ? i re-installed
getting there errors as well..
Notice: Undefined index: discussions in /xxx/extensions/Statistics/default.php on line 92
Notice: Undefined index: comments in /xxx/extensions/Statistics/default.php on line 84
Seems like the permissions issue evidences itself in a number of different ways (both of the last two posts). To resolve this, change line 63:
FROM:
chmod($this->Context->Configuration['EXTENSIONS_PATH']."Statistics/options.inc", "0770");
TO:
chmod($this->Context->Configuration['EXTENSIONS_PATH']."Statistics/options.inc", 0660);
Note that there are NO quotes around the permission value (it's not a string) and there IS a leading zero (which means it's octal).
This must be changed before using the plugin, otherwise the "options.inc" file gets corrupted (so you get the errors in the last post). Simply reinstall the plugin by extracting the original files, then immediately make the change above before enabling the plugin.
wow, that was it... all it said was "1154635778".. it must have corrupted somehow.. just replaced with the original and its back up.. very weird since i did reinstall it the other day and it didnt work
I simply cannot get this gadget to work, no way, no how.
Warning: unlink(/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 I If I ignore these errors, the display in the side panel never updates.
rw-r--r-- 1 debono users 648 Aug 4 06:55 ReadMe.txt
rw-r--r-- 1 debono users 10461 Aug 4 06:55 default.php
rwxrwxrwx 1 debono users 220 Aug 4 06:56 options.inc
rw-r--r-- 1 debono users 188 Aug 4 06:55 style.css
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
I changed the permission setting in line 63 to 0777 without the quotes...
chmod($this->Context->Configuration['EXTENSIONS_PATH']."Statistics/options.inc", 0777); Although I still get the errors after I click the Modify button in the Settings tab, the actual stats in the panel are working.
Fatal error: Call to a member function on a non-object in
/forum/extensions/Statistics/default.php on line 28 The above error occurs when trying to preview a new comment. I give up with this extension.
Comments
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
Help?
-JaDe
the reason i'd like to do this is to add more stats and make a bit more of it.
e.g.
top 10 topics ordered by most comments
top 10 users ordered by visits/comments/discussions started
thanks, i really appreciate the try though...
heres my options panel for it
thanks for the help.. much appreciated
Warning: unlink(/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
I If I ignore these errors, the display in the side panel never updates.
rw-r--r-- 1 debono users 648 Aug 4 06:55 ReadMe.txt rw-r--r-- 1 debono users 10461 Aug 4 06:55 default.php rwxrwxrwx 1 debono users 220 Aug 4 06:56 options.inc rw-r--r-- 1 debono users 188 Aug 4 06:55 style.css
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
chmod($this->Context->Configuration['EXTENSIONS_PATH']."Statistics/options.inc", 0777);
Although I still get the errors after I click the Modify button in the Settings tab, the actual stats in the panel are working.
Fatal error: Call to a member function on a non-object in /forum/extensions/Statistics/default.php on line 28
The above error occurs when trying to preview a new comment.
I give up with this extension.