now/WP-Stats

now/Content

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.

now/Information




comment/Content

comment/Information


  1. personal avatar

    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

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



  3. personal avatar

    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

    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

    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

    M



  7. personal avatar

    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 :(



  8. personal avatar

    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.



  9. personal avatar

    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!



  10. personal avatar

    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.



  11. personal avatar

    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:



  12. personal avatar

    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.



  13. personal avatar

    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?



  14. personal avatar

    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



  15. personal avatar

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



  16. personal avatar

    ok. this works very well for me. thanks!



  17. personal avatar

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



  18. personal avatar

    great script! God bless :)



  19. personal avatar

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



  20. personal avatar

    same problem here i dont find download it gives error




comment/Body

comment/Meta



media/Flickr





media/LastFM

http://www.last.fm/music/Cake/_/Stickshifts+and+Safetybelts
http://www.last.fm/music/Poor+Old+Lu/_/Bones+are+Breaking
http://www.last.fm/music/Billy+Joel/_/Hey+Girl
http://www.last.fm/music/Gorillaz/_/Feel+Good+Inc
http://www.last.fm/music/ZZ+Top/_/Certified+Blues
http://www.last.fm/music/Da+Vinci%27s+Notebook/_/Blue+Moon
http://www.last.fm/music/The+Beatles/_/Can%27t+Buy+Me+Love
http://www.last.fm/music/KISS/_/Nothin%27+to+Lose
http://www.last.fm/music/KISS/_/See+You+Tonight
http://www.last.fm/music/Natasha+Bedingfield/_/These+Words
http://www.last.fm/music/Cake/_/Sheep+Go+to+Heaven
http://www.last.fm/music/Model+Engine/_/Drawing+Lines
http://www.last.fm/music/The+Temptations/_/Sugar+Pie+Honey+Bunch
http://www.last.fm/music/Sting/_/This+Cowboy+Song
http://www.last.fm/music/Barenaked+Ladies/_/The+King+of+Bedside+Manor
http://www.last.fm/music/Billy+Joel/_/The+Downeaster+%27Alexa%27
http://www.last.fm/music/Alanis+Morissette/_/You+Learn
http://www.last.fm/music/Barenaked+Ladies/_/I+Love+You
http://www.last.fm/music/ZZ+Top/_/Waitin%27+for+the+Bus
http://www.last.fm/music/Foo+Fighters/_/Another+Round