WordPress.org

Ready to get started?Download WordPress

Forums

WP-Advanced-Stats 1.0.0 Beta Tester/Programmers Needed (47 posts)

  1. John
    Member
    Posted 8 years ago #

    This is the beta of the WP-Advanced-Stats plugin for WordPress. If you have some PHP/mySQL please test it out and anyone who wants to write there own viewer or suggest a change or help out in anyway leave and comment and you can email me at jpiasetz@noontide.ca.

    How far from release is this?

    • It needs to be test on other wp installs
    • It needs a completed viewer (somebodies, anybodies)

    Download

    Install Recorder

    1. Download the plugin and put it in your plugins directory.
    2. Activate the plugin.

    FAQ

    • When is a viewer coming out? I'm writing one as fast as I can and hopefully some other people take up the cause and start writing there own (if you do email me your site and I'll link back to you).
    • What happened to the stats? WP-Advanced-Stats is now being released in two parts, WP-Advanced-Stats-Recorder which records all the data and WP-Advanced-Stats-Viewer which parses, evaluates and displays the data.
    • Why did WP-Advanced-Stats get broken up into two parts? Well there are a bunch of reasons I broke it up.
      • Easier to Update I can now update either the Recorder or the viewer depending on what changes.
      • Community Being broken up allows other people to use the recording engine for there own stats. The database keeps track of pretty much all the important session variables. You can query it to get country, time, os, browser, predictions of hits, hits and about a million other things. The more people using it to find out cool stats the happy everyone will be.
      • Server Load If you have a huge user load the recorder takes very little time on it's own and you can hopefully (please make difference viewers everyone) find a different viewer that doesn't display very many statistics.
  2. Put your functions in a class or uniquely name at least with like a prefix. It conflicts with "WP-ContactForm" due to the getip function.

    I also suggest a more unique default table name on the off chance that someone else wants to use that table name. Perhaps avdstats or astats.

    I'd also like to see it test to see if the user is logged in and if so, record their userid. That way any stats displayer could sort out me (a level 10) or even all logged in users.

    Besides that, while it's simple, your plugin looks good. :)

  3. John
    Member
    Posted 8 years ago #

    Alright I:

    • Renamed all functions to be more unique.
    • Turned Username into a tinytext so as to fit the maximum comment_author length.
    • Renamed database to $advanced_stats_table_name
  4. John
    Member
    Posted 8 years ago #

    Count-My-Clicks (using WP-Advanced-Stats-Recorder)

    My clicks now works with Advanced-Stats, it just changes the url to the one there going to.

  5. John
    Member
    Posted 8 years ago #

    There is now also a viewer up

  6. pizdin_dim
    Member
    Posted 8 years ago #

    I also suggest a more unique default table name on the off chance that someone else wants to use that table name. Perhaps avdstats or astats.

    I'm just curious ... Can you please elaborate a little on this? Why would you choose a name that somebody else might want to choose, presumably (you mean) in the future? Huh?

  7. John
    Member
    Posted 8 years ago #

    I changed the name so as not to overlap but it was a discriptive simple name. It was just stats lol.

  8. lipa
    Member
    Posted 8 years ago #

    WordPress database error: [Table 'web303_wordpress.adstats' doesn't exist]
    SELECT count(DISTINCT username) as users, count(ip) as hits, count(DISTINCT ip) as vistors, count(DISTINCT referer) as referers, count(DISTINCT user_agent) as user_agent FROM adstats

    That's what I'm getting under Dashboard > Advanced Stats after activating both recorder and viewer. How can I repair this?

  9. piginzen
    Member
    Posted 8 years ago #

    I am getting the same SQL error.

    I have noticed that when I activated the plugin, it did not create the SQL tables.

    What is the SQL query I need to run?

    Thanks.

  10. John
    Member
    Posted 8 years ago #

    Try download the new version of the viewer http://blog.noontide.ca/?file=wp-advanced-stats-viewer.phps Is there an error on your main blog page? If there isn't the problem is limited to the viewer. piginzen are you sure it didn't create it with the wordpress table prefix?

  11. piginzen
    Member
    Posted 8 years ago #

    you are right... it did create the table with the wp_ prefix...

    but the view still will not work:

    WordPress database error: [Table 'wrdp1.adstats' doesn't exist]
    SELECT count(DISTINCT username) as users, count(ip) as hits, count(DISTINCT ip) as vistors, count(DISTINCT referer) as referers, count(DISTINCT user_agent) as user_agent FROM adstats

    etc...

  12. lipa
    Member
    Posted 8 years ago #

    It's still the same. The table has been created, but it's actually named 'wp_adstats' and the plugin is looking for 'wordpress_adstats'...

    @piginzen: writing at the same time ;]
    edit: I guess it created the table but without the prefix... and that's the problem.

  13. piginzen
    Member
    Posted 8 years ago #

    I will try and change it.

    Thanks Lipa

  14. lipa
    Member
    Posted 8 years ago #


  15. piginzen
    Member
    Posted 8 years ago #

    I actually changed it to simply "adstats" without any prefix and it's working better... However I am still getting this error:

    Daily Stats

    WordPress database error: [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 '(time) AS date FROM adstats GROUP BY DATE(time) ORDER BY time A]
    SELECT count(DISTINCT username) as users, count(ip) as hits, count(DISTINCT ip) as vistors, count(DISTINCT referer) as referers, count(DISTINCT user_agent) as browsers, date(time) AS date FROM adstats GROUP BY DATE(time) ORDER BY time ASC

    Warning: Invalid argument supplied for foreach() in /home/public_html/wp-content/plugins/WP-Advanced-Stats-Viewer.php on line 63
    Users Online Hits Vistors Referers Browsers Date

  16. lipa
    Member
    Posted 8 years ago #

    let's just wait for the fix... I'm no php guru either :] hopefully J2000_ca will come out with the fix soon...

  17. piginzen
    Member
    Posted 8 years ago #

    Sounds good to me!

  18. lipa
    Member
    Posted 8 years ago #

    I'd really like to give this plugin a try...

  19. John
    Member
    Posted 8 years ago #

    Try the new version (same link). If either of you has msn or gmail please add me john.piasetzki@gmail.com or J2000_ca@hotmail.com so we can talk about it live.

  20. jwurster
    Member
    Posted 8 years ago #

    I've tried this too. I just downloaded the latest viewer. I now only get the [Table 'jimw3141_wrdp1.adstats' doesn't exist]. Can I just create the table adstats?

  21. John
    Member
    Posted 8 years ago #

    New Version is up give it a try. (If this one doesn't work to answer jwurster's question no you can't because the recorder would depend on a different name for the db). When posted error messages it's best if you post the url (-your blog address) of the error and the complete error.

  22. jwurster
    Member
    Posted 8 years ago #

    After activating the new versions, I only have one error:

    Warning: Invalid argument supplied for foreach() in /home/jimw3141/public_html/wordpress/wp-content/plugins/wp-advanced-stats-viewer.php on line 127

    My blog is http://www.jwurster.us/wordpress.

  23. John
    Member
    Posted 8 years ago #

    jwurster view your main page and tell me if you still get that error.

  24. jwurster
    Member
    Posted 8 years ago #

    I have been out of Admin all day. I just when back in to the Dashboard and clicked on adnavced stats and got the same error.
    Could this be a conflict with another plugin?

  25. John
    Member
    Posted 8 years ago #

    Hmmm maybe, does it say that you have had hits?

  26. Slappa
    Member
    Posted 8 years ago #

    getting the same error :|

    Warning: Invalid argument supplied for foreach() in /home/jimw3141/public_html/wordpress/wp-content/plugins/wp-advanced-stats-viewer.php on line 127

    not sure what it is

  27. jwurster
    Member
    Posted 8 years ago #

    Yes, I get hits, referrers and user agents.

    I did look at the foreach statement. It seems that the "select" statement fot that function is different than the rest in that it uses quotes outside the whole statement where the others use single quotes. I see you do this because you have single quotes in the actual select statement. Perhaps it's some kind of syntax error?

  28. Slappa
    Member
    Posted 8 years ago #

    nfi, i'm pretty newb. if you work it out can you post your findings.

  29. jwurster
    Member
    Posted 8 years ago #

    If the SELECT statement is correct, then my next thought would be if the fields in the sql table match the code.

  30. John
    Member
    Posted 8 years ago #

    New Version of both are up. I think I have the error fixed.

Topic Closed

This topic has been closed to new replies.

About this Topic