WordPress.org

Ready to get started?Download WordPress

Forums

Pageviews Plugin (ready) (20 posts)

  1. anatman
    Member
    Posted 10 years ago #

    Hi jmschot,
    I didn't know of any plugin like yours. Does it count views by unique readers, or does it count views by the same reader as different views? I would love to have views by unique readers (uinque IPs), that gives a better idea of how many people read a post.
    Thanks,
    Eduardo

  2. jmschot
    Member
    Posted 10 years ago #

    Heey anatman,
    Well, it doesn't do that now, but i could do that if you like, it's not really much work.
    Check back later this day ;)

  3. anatman
    Member
    Posted 10 years ago #

    Thanks jmschot, i didn't find you online, so i'm emailing you now!

  4. Anonymous
    Unregistered
    Posted 10 years ago #

    I'm having a challenge getting pageviews to work. I've modified my mySQL database to create the wp_count table with the 2 fields.
    In my index.php page, I call the pageviews script, like so:
    require_once('plugins/pageviews.php');
    In my index.php page, I've modified the 2nd line of the post metadata so that it adds the # pageviews after the date and time, like so:
    <div class="meta">Filed under: <?php the_category() ?> — <?php the_author() ?> @ <?php the_time() ?> <?php edit_post_link(); ?> <?php views(); ?></div>
    Now when I load my website, I get some text like this:
    Filed under: wordpress � midtoad @ 16:27:49 MDT pageviews
    Since the word pageview is printed, I can see that the pageviews.php has been found and processed. However, there is no number of views printed. Upon closer examination of the pageviews script, I don't see anywhere where a database connection is made, so it's possible that no number is printed because none is fetched! How do I ensure that I get a db connection with this script?
    thanks

  5. jmschot
    Member
    Posted 10 years ago #

    1) anatman, i emailed you
    2) midtoad, you must put the script into your plugins dir in wp-content ... then you get the db connection

  6. Anonymous
    Unregistered
    Posted 10 years ago #

    jmschot, my index.php is in a directory /wp/ . If I understand you correctly, this would be my wp-content dir. I've created a plugins dir off that and put the pageviews script in there - no go.
    have I got it in the right place? thanks.

  7. anatman
    Member
    Posted 10 years ago #

    Thanks jmschot, i got it and will install the plugin as soon as i upgrade my WP to 1.2. Just waiting for the beta cycle to finish so i install the final.

  8. jmschot
    Member
    Posted 10 years ago #

    Midtoad, nope you didn't understand me correctly ... If you're running 1.2, there is a directory called wp-content. In that directory there is a dir called plugins. Drop the stats.php file there. Then go to your website, login to wp, and go to the plugins. There, activate the plugin. Then just add the function <? views(); ?> anywhere within ,,the loop'' and everything will work correctly. If you don't have 1.2, you'll have to create the file my-hacks.php in the same dir were your index.php is. Then just add the <? views(); ?> inside ,,the loop''.
    Hope this helps ...

  9. jmschot
    Member
    Posted 10 years ago #

    Well, my site is still doing funky, but i think this should work:
    http://schot.xs4all.nl/plugs.php
    If it doesnt, well, shit.

  10. haasim
    Member
    Posted 10 years ago #

    Error
    SQL-query :
    CREATE TABLE 'wp_count'(
    'count'varchar( 255 ) NOT NULL default '',
    'count_id'varchar( 25 ) NOT NULL default ''
    ) TYPE MYISAM
    MySQL said:
    #1064 - 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 ''wp_count'( 'count'varchar( 255 ) NOT NULL default '',
    'c

  11. Anonymous
    Unregistered
    Posted 10 years ago #

    @haasim: you are missing spaces. replace 'count'varchar with 'count' varchar. Or use phpMyAdmin and use it to create the new table. That's what I did.
    @jmschot: now I understand what you mean. Since I'm running v.1.0.2, I don't have the same dir structure as you did. Got it working anyway! :-)

  12. haasim
    Member
    Posted 10 years ago #

    re: midtoad's reply
    I believe I used the appropriate spaces... I copied the original parameters posted within this thread.
    I'm not really familiar with SQL databases, but I inputed the parameters into a box labeled 'Run SQL query/queries on database' and it gave me the error message shown in my previous posting.
    I'm not really sure how to proceed.

  13. jmschot
    Member
    Posted 10 years ago #

    re: haasim
    there are some things wrong with the query in your first reply, but if you use the stats_02.sql from my site, and just drop in the box where you previosly droped it, it really should work.

  14. jmschot
    Member
    Posted 10 years ago #

    *Bump* :P
    Well if you haven't noticed yet, i'm really busy with this thingy. Anyway, there is a new version out, which can be used for both unique and non-unique counting. It's also slightly faster, but i'm still working on that. So it's a BETA (i've always wanted to say something like that). New version is going to take a bit longer, because monday it's back to school again ...
    http://schot.xs4all.nl/plugs.php
    look at http://schot.xs4all.nl for more info, and to leave a note if you're going to use it.

  15. jmschot
    Member
    Posted 10 years ago #

  16. haasim
    Member
    Posted 10 years ago #

    I still can't get it to work and I added the most recent version of the code to my-hacks.php

  17. jmschot
    Member
    Posted 10 years ago #

    hi, well im sorry, but i dont know what's wrong than. if it's still the table creating, maby you should try creating the table yourself?

  18. georgianlady
    Member
    Posted 10 years ago #

    I installed this plugin, I had to create the table myself, it worked fine just by letting phpadmin interface for query use the .sql file.
    But with this plugin activated in the WP 1.2 admin interface, and the code in the loop on index.php, the page only loads to the point where that code is, then it stops. So, it doensn't work, it's doing SOMETHING since the page only partially loads, but it's not throwing a visible error other than that.
    I have the plugin deactivated and the code commented out on my index.php right now. I'd appreciate any help I can get with this though.

  19. kristin
    Member
    Posted 10 years ago #

    Doesn't work for me either, I get a mysql error, the table was created fine, but I get a "access denied for root@localhost".

  20. midwinter
    Member
    Posted 10 years ago #

    Has anything been done on this? I'm looking for a plugin that does just this!

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.