WordPress.org

Ready to get started?Download WordPress

Forums

Online users? (13 posts)

  1. Daisyhead
    Member
    Posted 10 years ago #

    I wonder if there's been a hack such as this one, written for WP? It counts the number of users currently reading your site and then lists them out based on cookie info. Very cool!
    -Daisyhead

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

  3. Daisyhead
    Member
    Posted 10 years ago #

    Yep, that one will work. One thing though since I'm still learning SQL and whatnot, this part of the instructions:

    1) Open up mysql command line tool, and type in these lines:
    (this is considering wpdatabase is the name of your wordpress database)
    use wpdatabase;
    create table usersOnline
    (
    id int auto_increment not null,
    userIP varchar(20) not null,
    dateAdded timestamp,
    primary key(id),
    unique id(id)
    );
    Or you could use phpMyAdmin or any other MySql admin tool to create a new table called usersOnline
    inside your WordPress database with the above columns.

    I use MyPHPAdmin and I'm not sure I follow what I need to do. I'm going to attempt to try this with what little I know, but if someone could simplify this part for me, I'd really appreciate it.
    Thanks,
    Daisyhead

  4. Daisyhead
    Member
    Posted 10 years ago #

    I'm trying to type the above into my "run query" box in my wordpress database but I'm getting errors. Should I be typing this somewhere else? I thought I could figure this out. Grr.
    -Daisyhead

  5. Daisyhead
    Member
    Posted 10 years ago #

    Waaait a sec. I got it! Yay! Now to see if it actually works....

  6. Daisyhead
    Member
    Posted 10 years ago #

    Too cool! This works like a charm. The only thing that would really make it rock would be if it could someone use cookies like the MT one to actually list who's online by who has commented on the site. But this is awesome. Thanks for the link Podz!
    -Daisyhead =)

  7. Anonymous
    Unregistered
    Posted 10 years ago #

    Can somebody please explain this step by step... like how to update the databes. where to put all those codes. i need tgis so bad. thanks

  8. Daisyhead
    Member
    Posted 10 years ago #

    Gamerz, do you mean I need to clean this table out periodically?
    Anonymous, if you need help with this, feel free to visit my site and drop me a line via my contact page and I'll do what I can to help!
    -Daisyhead

  9. Lester Chan
    Member
    Posted 10 years ago #

    Daisyhead, you need to optimize it every month. I notice the same problem with phpbb session table also.

  10. J3r0m3
    Member
    Posted 10 years ago #

    help!!!
    I got this
    Fatal error: Call to undefined function: whoisonline() in /home/linguagy/public_html/test/index.php on line 120

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

    If you are using 1.2, have you enabled 'legacy my-hacks' ?

  12. Daisyhead
    Member
    Posted 10 years ago #

    Can someone please explain to me what I would need to do to "optimize every month" for this hack?
    Thanks,
    Daisyhead

  13. J3r0m3
    Member
    Posted 10 years ago #

    Thanks Podz

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags