Featured: Pink for October

Sillyness, werd


Entry: WP-Stats


 

Meta & Errata


I have created a simple stats plugin for WordPress, based on Free Statistics Version 1.1.0 by Free-Webhosts.com.

Basically it is a very simple plugin that records each request to each page that the function resides on, and then uses an algorithim that predicts your traffic for the day.  I did not create a very detailed, or all-encompasing plugin, since that is not what I wanted to do.

I am going to look into hacking up a version of a new admin interface proposal by the big man mpt using this plugin to power some of the features he was proposing.

AS always you can find the hack, with instructions at the usual place.

Let me know what you guys think.

 

Comments & Pontifications


  1. personal avatar Bronski
    Stroll on over and visit Bronski
    March 1, 2007

    The README that comes with wp-stats tells where to put the plugin and where to put the images. But where do wp-stat-body.php, wp-stat-header.php and wp-stats.php go? Or did I just miss something?


  2. personal avatar Jonathan Greene
    Stroll on over and visit Jonathan Greene
    March 1, 2007

    Looks good - How do you protect the page for just the owner’s view?


  3. personal avatar Jonathan Greene
    Stroll on over and visit Jonathan Greene
    March 1, 2007

    got it running… though I can’t quite figure out what bit to tweak to get the images to show.

    Is there anyway to protect that page from anyone but the admin?

    Also - where exactly would you style the look of the page to fit with the site motif?


  4. personal avatar Alex
    Stroll on over and visit Alex
    March 1, 2007

    There is a typo in the readme file. Step 3 says that wp-stat-body.php needs edited to point to image location, which is not true since $bar_image is set in wp-stat-header.php.


  5. personal avatar Chris J. Davis
    Stroll on over and visit Chris J. Davis
    March 1, 2007

    Alex, thanks for pointing that out, I wrote some of the documentation based on an ealier version of the hack/plugin. I will make the changes to the readme.


  6. personal avatar Mathias Bynens
    Stroll on over and visit Mathias Bynens
    March 1, 2007

    Great plugin, although you could’ve made it use the MySQL table prefix from the config… I had to change the files just because I’m not using the wp_ table prefix :(


  7. personal avatar Chris J. Davis
    Stroll on over and visit Chris J. Davis
    March 1, 2007

    Hey nefarious thanks for the heads up!

    I am going to be setting up a DEV blog so I can track the changes they are making to the codebase.

    They are seriously wonking with the pinnings at the moment.


  8. personal avatar elise
    Stroll on over and visit elise
    March 1, 2007

    I get the following error when I attempt to call the script when I place the code () in my index file:

    Error Number: 1064Error Description: mysql_errorQuery: SELECT * FROM where date=’2004-06-11’strWhere:
    Fatal error: Cannot break/continue 1 level in /pat/public_html/blog/wp-content/plugins/wp-record-stats.php on line 35

    I would appreciate any help!


  9. personal avatar jesstech
    Stroll on over and visit jesstech
    March 1, 2007

    Elise: It probably can’t find the $tablestats table. Seems Chris left out the fact that you might need to set this variable in your wp-settings.php file using the following syntax:

    $tablestats = $table_prefix . 'stats';

    This way, the variable $tablestats which is used in the plugin file but not the stats page (why?) will use your preset table prefix. Would’ve corrected some of the issues MaThIbUs was having.


  10. personal avatar Shawn Lucas
    Stroll on over and visit Shawn Lucas
    March 1, 2007

    What does this error mean? And is there an easy fix to it? Thanks for any help you may provide.

    Open Stats2 Database Failed
    Error Number: 1064Error Description: mysql_errorQuery: SELECT * FROM where date=’2004-07-06’strWhere:


  11. personal avatar Abhimanyu Chirimar
    Stroll on over and visit Abhimanyu Chirimar
    March 1, 2007

    you guys just rock. First of all thanks for this wicked plugin in the best blog software i have used so far - WordPress; Secondly thanks for the user feedback right here, all my sql troubles and php edit issues were solved asap.

    You should definitely update the Readme on the download, but whatever this ish works. Thanks.


  12. personal avatar qwerty988
    Stroll on over and visit qwerty988
    March 1, 2007

    Added wp-stats and mod’d the settings file to include tablespace var. The catagory pages come up fine now, but if I try to read any comments, I get:

    Open Stats2 Database Failed
    Error Number: 1046Error Description: mysql_errorQuery: SELECT * FROM wp_stats where date=’2004-12-09’strWhere:

    Any thoughts?


  13. personal avatar Andy Leviss
    Stroll on over and visit Andy Leviss
    March 1, 2007

    Hey Chris,
    I’m trying to get this set up on my site, and keep getting this error:

    Open Stats2 Database Failed
    Error Number: 1064Error Description: mysql_errorQuery: SELECT * FROM where date=’2005-02-06’strWhere:
    Fatal error: Cannot break/continue 1 level in /home/.alimony/andyl/oftr_good/wp-content/plugins/wp-record-stats.php on line 35

    Any suggestions?

    Thanks,
    Andy


  14. personal avatar Andy Leviss
    Stroll on over and visit Andy Leviss
    March 1, 2007

    Okay, I’m a dope, I just found the previous comments asking and answering my same question. Thanks!


  15. personal avatar nofie
    Stroll on over and visit nofie
    March 1, 2007

    ok. this works very well for me. thanks!


  16. personal avatar Ben
    Stroll on over and visit Ben
    March 1, 2007

    The plugin sounds promissing but the download link is broken :/
    Could you fix that please?


  17. personal avatar karina
    Stroll on over and visit karina
    March 1, 2007

    great script! God bless :)


  18. personal avatar Evr
    Stroll on over and visit Evr
    March 1, 2007

    Download link doesn’t seem to work. Where can I download it?


  19. personal avatar xinfo
    Stroll on over and visit xinfo
    March 1, 2007

    same problem here i dont find download it gives error

Leave a Reply