WordPress.org

Forums

wp-stats (34 posts)

  1. Mark (podz)
    Support Maven
    Posted 10 years ago #

    That's *nice* !! Thanks !

  2. Mark (podz)
    Support Maven
    Posted 10 years ago #

    Can I be a complete idiot and ask how I execute the code ?
    Put into php and call it once through the browser ?

  3. Chris J. Davis
    Member
    Posted 10 years ago #

    Hey Podz, there are instructions included with the download, as well as an example stats page.
    What exactly are you asking? How to execute the visit logging code, or the actual stats page?

  4. Mark (podz)
    Support Maven
    Posted 10 years ago #

    1. First of all you need to execute the following code:
    CREATE TABLE wp_stats (
    date date DEFAULT '0000-00-00' NOT NULL,
    hits mediumint(8) unsigned DEFAULT '0' NOT NULL,
    PRIMARY KEY (date)
    );
    From other hacks I've seen, I don't know if this is mysql or a php snippet......
    Apologies

  5. cLin
    Member
    Posted 10 years ago #

    you need to go into phpmyadmin to do that

  6. skippy
    Member
    Posted 10 years ago #

    podz: that's MySQL.

  7. Chris J. Davis
    Member
    Posted 10 years ago #

    Sorry, I thought that was documented well enough :(
    I will go back and add that the aforementioned code is SQL.
    Thanks Podz.

  8. unoamigo
    Member
    Posted 10 years ago #

    Very cool. Thanks.
    I've been thinking about doing something similar along with tracking referrers and search strings.
    Although can I make a suggestion? It might be helpful to rename it to "traffic" or "hit monitor". See:

    Combine that with all the various little plugins for bits and pieces of statistical information. I think you can see a world of confusion brewing! ;-)

  9. Chris J. Davis
    Member
    Posted 10 years ago #

    Hmmm.. good point, but I like wp-stats.php!
    I will give this some thought.

  10. nefarious
    Member
    Posted 10 years ago #

    BAM... broken with nightly update. They apparently changed database call names etc. Any idea when an update might be coming for this? see http://www.geekasaurus.com/clint/blog/stats/ for example of fugly errors. ;-)

  11. Beel
    Member
    Posted 10 years ago #

    Assuming things don't change in the next couple of days, you can fix it following this:
    http://wordpress.org/support/6/6128

  12. nefarious
    Member
    Posted 10 years ago #

    Cool, thanks Beel.
    A note to anyone else doing this... the changes are made in the statistics.pho file in your plugins directory.
    DO NOT change the $tablexxxx on the 'global' lines or you will get an error.

  13. Anonymous
    Unregistered
    Posted 10 years ago #

    maybe I smoke too much carpet but I don't see any file called statistics.pho in the download I got...
    right now I'm getting:
    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
    when I try to ad <?php the_stats(); ?> to my WP index file...
    any idea?

  14. Anonymous
    Unregistered
    Posted 10 years ago #

    also the read me says you have to edit wp-stat-body.php to point to the images location but I can't find any variable to edit at the beginning of the file, a line number would be cool, anyone? Thx!

  15. Ksp
    Member
    Posted 10 years ago #

    I also get the same error as misterx. Anyone?

  16. elise
    Member
    Posted 10 years ago #

    I get the same error on line 35 as mentioned above, and there is no instruction in the readme as to where to edit to point to the images. Anyone figure it out?

  17. Syphon
    Member
    Posted 10 years ago #

    Well I am guessing that you edit the $bar2_image and $bar_image parts
    However I get the same error as misterx, Ksp and elise. How do you fix this error on line 35?

  18. OtherMichael
    Member
    Posted 10 years ago #

    Hey, so much for being a "plug-in." Anything that requires me to run something in phpmyadmin AND have to edit several files is NOT pluggable.
    In the meantime, are there any answers on the problems above? I've got 'em all, from not being able to figure out where exactly to add the path info (oh, I found the variables all right--but as I don't speak PHP I am at a bit of a loss where to add it between the quotes and slashes and whatnot) to how to reconfigure the tablenames.
    replace $tablexxxx with $wpdb->xxxx
    on the page referred to, above, still remains a bit opaque. ass does any reference to "statistics.php" as no such file exists yet. this plugin has returned errors from day 1, which is today.
    Am I to be editing "wp-record-stats.php" at this point:
    global $tablestats;
    $strsql="SELECT * FROM $tablestats where date='$date'";

    thus, replacing $tablestats like this: $wpdb->stats ???

  19. OtherMichael
    Member
    Posted 10 years ago #

    Man, was I cranky last night.
    Let me say--the script looks like a useful item! I would just like to see it in a version that can be made to work by someone who works with VisualBasic for a living....

  20. slucas76
    Member
    Posted 10 years ago #

    How do I point the wp-stats code to mySQL database if it is on a different server from the one my weblog is on? Thanks for any help you can provide.

  21. OtherMichael
    Member
    Posted 10 years ago #

    slucas76--it uses the same database as the blog, so it would use the same connection info. The tricky part is you have to manually run some SQL "code" as part of the setup. You'll need phpMyAdmin or something (if your server doesn't already provide access of this type--mine didn't; but installation was not a problem).
    caveat--I'm the whiner who can't get it working!

  22. slucas76
    Member
    Posted 10 years ago #

    I figured it out and got it working, I think. Well, it's recording the number of hits I've had since it started up, so that's a plus. Sweet. Great plug in!

  23. Root
    Member
    Posted 10 years ago #

    I do not suppose there is any chance of adding a function that isolates and counts referrer spam by using a blacklist? I am fed up with pasting urls, clicking, and then being offered *enhancements* to parts of my anatomy :)

  24. particle
    Member
    Posted 10 years ago #

    Can anyone provide CLEAR instructions for newbies using WP? I added the query but the rest might as well be chinese to me.

  25. Beel
    Member
    Posted 10 years ago #

    Root: Check out David Chait's CG-Referer

  26. davidchait
    Member
    Posted 10 years ago #

    Root - if you have the PowerPack, CG-Referer is already there. Just need to Activate, click the Install link, and go. ;)
    It is certainly not a 'stats' system like all the others, it is specifically a referrer tracking system, which includes blank referers (internal clicks), bot detection and tracking, blacklist filtering of referrals, main user IP ignore, unique-user-IPs in a period, etc.
    -d

  27. Root
    Member
    Posted 10 years ago #

    Well that sounds like just the job. Thanks.

  28. jrobbio
    Member
    Posted 10 years ago #

    Couldn't you have used a GPL stats program like the one I promote http://bbclone.de ?
    You can see how its used with wordpress here: http://www.oobrien.com/weblog/archives/2004/05/31/wordpress-and-bbclone.php
    Rob

  29. Anonymous
    Unregistered
    Posted 10 years ago #

    I get the same error - line 35. Still trying to work it out.
    In wp-stat-header.php ----- redirect to your image folder there.

  30. Anonymous
    Unregistered
    Posted 10 years ago #

    change the $strsql="SELECT * FROM $tablestats where date='$date'";
    to
    $strsql="SELECT * FROM wp_stats where date='$date'"; //i.e. NO $
    I actually continually got an "error on line 1 {" for file wp-stat-body.php. Until I realized that it sent it to the server as binary and everything was on one line. Just fix the linebreaks and it will be gtg.
    Excellent PLUGIN.
    Perogi.

Topic Closed

This topic has been closed to new replies.

About this Topic