Skip to:
Content
Pages
Categories
Search
Top
Bottom

Plugin: Simple Onlinelist


  • thomasklaiber
    Member

    @thomasklaiber

    Hi.

    I really missed an onlinelist in bbpress, so i made a simple one myself. Dont expect anything special, it just tells who was online over the past 5 minutes.

    Download it here.

    See a demo here. (Login use: Test / test)

    To Display the online list simply add show_online_users(); wherever you want it in your template.

    Additional Features:

    – Last online time on profile page: profile_last_online();

    – Current online users as number: total_online_users();

Viewing 25 replies - 1 through 25 (of 54 total)

  • Null
    Member

    @null

    Great plugin, if you made this one AJAXED it would be even greater!

    PS: it just tells who was online over the past 5 minutes. This is not true, it only shows te persons currently online, which is good!

    Would be nice to add total guests too

    Greetz


    thomasklaiber
    Member

    @thomasklaiber

    “PS: it just tells who was online over the past 5 minutes. This is not true, it only shows te persons currently online, which is good!”

    – If the user clicks on Logout, otherwise he will disappear after 5 minutes.

    “Would be nice to add total guests too”

    – Good idea … i’ll give it a try =)

    “Great plugin, if you made this one AJAXED it would be even greater!”

    – Thought about it, but this would be easer to realize with next version of bbpress (current version only loads bb_head() when topic is displayed)

    Thx for your critique.


    ardentfrost
    Member

    @ardentfrost

    It seems, for some reason, the plugin looks for a table entry that isn’t in my database. Am I just supposed to add it? It seems to be called “tableprefix_online”

    I’m about to add _online into my database by hand, just didn’t know if that was on purpose or if I missed something


    thomasklaiber
    Member

    @thomasklaiber

    the *first* time after you’ve installed the plugin, it will display this error, but then the table will be added automatically and there shouldn’t be any errors any more =)


    ardentfrost
    Member

    @ardentfrost

    Oh, mine didn’t do that :( I had to create the tables myself. Once I created them, though, the plugin rocks :) Saved me some time certainly b/c it was on my list of plugins to write.


    topiq
    Member

    @topiq

    i have a slight problem…

    i added the entry to my DB by hand but then i dont know where exactly i should exactly add the code…

    thx for your help!


    thomasklaiber
    Member

    @thomasklaiber

    It’s your choice where you put ‘show_online_users()’ in your template. I suggest the following way if you use default theme:

    – open bb-templates/front-page.php

    – search for line 5 – 8:

    <div id="hottags">

    <h2><?php _e('Hot Tags'); ?></h2>

    <p class="frontpageheatmap"><?php tag_heat_map(); ?>

    </div>

    – replace with:

    <div id="hottags">

    <h2><?php _e('Hot Tags'); ?></h2>

    <p class="frontpageheatmap"><?php tag_heat_map(); ?>

    <h2><?php _e('Online'); ?></h2>

    <?php show_online_users(); ?>

    </div>

    – save as my-templates/front-page.php

    I’ll fix the database setup and some other things as fast as i can =)

    #edit: new version up, feel free to try it out

    thanks a lot! it works now…

    Great Plugin thanks :)

    Any progress about:

    “Would be nice to add total guests too”

    – Good idea … i’ll give it a try =)

    “Great plugin, if you made this one AJAXED it would be even greater!”

    – Thought about it, but this would be easer to realize with next version of bbpress (current version only loads bb_head() when topic is displayed)

    ??


    thomasklaiber
    Member

    @thomasklaiber

    I donno, the current structure of the plugin makes adding guests a bit complicated, but i’ll give my best … im not the fastest guy.

    Ajaxed is something even bigger for the future, sorry.

    New Version: http://la-school.com/2006/downloads/onlinelist_1_3.zip

    (Better online_update on mysql 4.1 and greater. Will work with old Versions anyway! )

    i get this error with the new version:

    Fatal error: Call to a member function query() on a non-object in /srv/www/httpd/phost/c/com/pytalhost/cessi/web/bbpress/my-plugins/onlinelist.php on line 26

    when I installed the plugin it had my user online when I was testing it. After 5 minutes it said no one was online. I was still logged in and started viewing posts. It remained with saying that I was not online.

    If I then logout and login again, it still says no one is online. If I drop the table in the database and go back to the main page, it says I am online for 5 minutes and then goes back to saying no one again.

    What am I doing wrong or is this an error?

    Trent

    I am testing the new version. You should know that line 26 of the plugin has a syntax error that needs fixing. Change from:

    $bbdd->query

    to:

    $bbdb->query

    Trent

    Same problem with the new version. If I logout it goes to no members online and stays there even if I log back in. I have mySQL 4.1.21

    Trent

    it also does not work properly for me. sometimes it there are twice, three or more times the same members listed…


    thomasklaiber
    Member

    @thomasklaiber

    ehm … sorry guys, i didn’t test the new function because i’m running mysql 4.0… on my site. I fixed the $bbdb and added the following config-var:

    $mysql41 = true;

    If you have any problems simply set to false and it should work well.

    Download here:

    http://la-school.com/2006/downloads/onlinelist_1_3.zip

    Hmm….I don’t have that var in that download Thomas….

    The URL is actually http://la-school.com/2006/downloads/onlinelist_1_3-fix.zip

    Trent

    ehhhm. sorry but the “$bbdb-Error” still exists. there is no change at all…

    EDiT: ahhh. now i see. you linked to the wrong file. the one which should work is here:

    http://la-school.com/2006/downloads/onlinelist_1_3-fix.zip

    I still don’t my online status update with that var true or false. Any ideas?

    Trent


    thomasklaiber
    Member

    @thomasklaiber

    Ah … sorry for that wrong link -.-“

    Trent … i have no idea at the moment. did this plugin work anytime before? … which version of bbpress are you using? …

    I have tried it on the latest TRAC version as well as a normal 0.73 version and neither works. Unfortunetely, I never tried it on 0.72 so I don’t know if it ever would have worked. I will try on my other server and see what happens.

    Trent

    i have the problem that e.g. my username is displayed more than once… actually 23 times. how do i solve this?!


    thomasklaiber
    Member

    @thomasklaiber

    Have you set the $mysql41 to false? … Try deleting the whole table in the database.

    i deleted the whole table and now it seems to work. thx a lot!

Viewing 25 replies - 1 through 25 (of 54 total)
  • You must be logged in to reply to this topic.
Skip to toolbar