• unoamigo

    (@unoamigo)


    Word Press Statistics (zip file)
    This is a port to WP 1.2 as a plugin and significant improvement based on the code from GamerZ.
    It features some pretty significant changes and improvements for template integration. Installation instructions are included. It does operate differently than the release by GamerZ, it probably is not compatible with WordPress 1.0.x. Although I’m sure it could be with a few tweaks to the code.
    The original forum for discussion is here.
    I do not currently have a demo online, my website has not been upgraded to WP 1.2 yet, I’ve been testing it locally. Hopefully in the next day or two, I’ll have a sample site online for people to check out.
    If were lucky there won’t be too many issues with it so people can hit the ground running with it when WP 1.2 is released this week.

Viewing 15 replies - 76 through 90 (of 113 total)
  • Unoamigo/Ryan
    Really appreciate you trying to get to the root of this issue.
    sad to say, i am seeing my most recent post reflected in some part of the stats only.
    I see that the count is correct.
    But the title of the latest post is not shown as yet in the 10 recent posts section
    I see my comments for the latest post in the 10 recent comments
    Not reflected in the 10 most commented posts
    I only have 10 posts, but the post categories stats show 12

    Helpppp.
    Site: http://www.os42.com
    I added the plugin to the plugins directory – activated [CHECK]
    I changed my .htaccess file to read as follows
    RewriteEngine on
    RewriteCond %{HTTP_REFERER} !^http://os42.com/.*$ [NC]
    RewriteCond %{HTTP_REFERER} !^http://os42.com$ [NC]
    RewriteCond %{HTTP_REFERER} !^http://www.os42.com/.*$ [NC]
    RewriteCond %{HTTP_REFERER} !^http://www.os42.com$ [NC]
    RewriteRule .*\.()$ – [F,NC]
    Redirect temp /oldirectory http://new subdomain.os42.com
    RewriteRule ^stats/author/(.*)?/page/?(.*)?/?$ /index.php?wp_stats=1&author=$1&page=$2 [QSA]
    RewriteRule ^stats/author/?(.*) /index.php?wp_stats=1&author=$1 [QSA]
    RewriteRule ^stats/ /index.php?wp_stats=1 [QSA]
    RewriteRule ^stats /index.php?wp_stats=1 [QSA]
    [CHECK]
    Changed this line:
    <?php if ($posts) : foreach ($posts as $post) : start_wp(); ?>
    To:
    <?php
    if (! empty($display_stats) ) {
    get_stats(1);
    echo “
    “;
    }
    else if (($posts & empty($display_stats)) ) : foreach ($posts as $post) : start_wp(); ?>
    [CHECK]
    Saved and uploaded index.php to root (Where WP resides)
    [CHECK]
    Tried to access site front page
    [ERROR]
    Couldn’t parse etc etc on Line 103 which contains this
    <?php } } else { // end foreach, end if any posts ?>
    Couldn’t do anything from that point so changed index.php back to previous….
    I would really like to get this stats plugin working. Does anyone have any ideas/suggestions/advice?
    Any help would be much appreciated.

    Thanks J3rom3,
    The plugin is still activated but I had to take out the call function in index.php because I couldn’t access the site at all…
    Hoping I can work out before I have another attempt. 🙂

    http://aitor11.com
    This is the adresses, the stats should be working on http://aitor11.com/wordpress/stats
    Aitor

    Thread Starter unoamigo

    (@unoamigo)

    • Anonymous
    • Shadow
    • Did you upgrade from 1.0.x and keep your old index.php file by any chance? It looks to me like you did. The foreach loop in the mingus index.php file ends differently than what your indicating. You will first want to merge the index.php file with the one you have. At least the foreach part.
    • J3r0m3
    • Well, we are making progress.

    Hi unoamigo,
    Yes I did. Should I replace
    <?php } } else { // end foreach, end if any posts ?>
    Sorry, no posts matched your criteria.
    <?php } ?>
    </div>
    with this ?
    <?php endforeach; else: ?>
    <?php _e(‘Sorry, no posts matched your criteria.’); ?>
    <?php endif; ?>
    </div>
    and then replace this
    <?php if ($posts) { foreach ($posts as $post) { start_wp(); ?>
    with this?
    <?php
    if (! empty($display_stats) ) {
    get_stats(1);
    echo “
    “;
    }
    else if (($posts & empty($display_stats)) ) : foreach ($posts as $post) : start_wp(); ?>

    Thread Starter unoamigo

    (@unoamigo)

    Shadow,
    Looks right. Not sure if I have a 1.0.2 index file laying around to double check. Give it a swing, looks like it should fly.

    Thanks Unoamigo,
    All fixed and working. One minor issue…when I am in the stats page – clicking on the header to return to index.php is not happening. I can get back by clicking on a category instead but the header return just doesn’t want to take me back.
    I can live with it – but is it something I have done wrong or is this normal?
    Thanks again for all your help 🙂 🙂

    Sorry Unoamigo…
    I’m confused – what should I do exactly? Are you referring to my index.php?
    So little time and so much to learn….

    Thread Starter unoamigo

    (@unoamigo)

    Eh, you can really simplify your life there. Probably coming up that way based on what you have stored in wp-admin for your site location. Thats ok though, just do something like this:
    `<h1 id=”header”>“<?php bloginfo(‘name’); ?></h1>
    That will work all the same. You don’t have to make the call to echo out the siteurl. You can just code it in there. No big deal.
    Hope that works well for you.

    Thanks again Unoamigo….
    Not sure how but it seems to be working …
    :):)

    Hi Unoamigo,
    Just to check if you managed to sort out the server time issue?
    To be honest, i can live with it. As my posts increase, i realise that it gets harder to really tally the number of posts with the stats output. Therefore eventually, the only people that will know that there is a deficit will only be me. Haha.
    Having said that, it would defeat the purpose of having a stats page, ya?
    Oxymoronic reply from a moron (me) =P

    A couple of extensions:

    //gets total number of characters posted
    function get_charcount() {
    global $wpdb, $tableposts;
    $posts = $wpdb->get_results('SELECT post_content FROM ' . $tableposts);
    foreach($posts as $post) {
    $count += strlen($post->post_content);
    }
    echo number_format($count);
    }
    //gets total number of characters posted, excluding whitespace
    function get_charcountexws() {
    global $wpdb, $tableposts;
    $posts = $wpdb->get_results('SELECT post_content FROM ' . $tableposts);
    foreach($posts as $post) {
    $text = preg_split('/\s/', $post->post_content);
    foreach ($text as $tex) {
    $count += strlen($text);
    }
    }
    echo number_format($count);
    }

    Oops, in that last post, the ‘&amp#92’ should have been a backslash.

    And in that last post, that should have been &#92. Post preview would be nice…

Viewing 15 replies - 76 through 90 (of 113 total)

The topic ‘WP 1.2, Statistics’ is closed to new replies.