Info
- 54 posts
- 14 voices
- Started 5 years ago by thomasklaiber
- Latest reply from zaerl
- This topic is not a support question
Plugin: Simple Onlinelist
-
- Posted 5 years ago #
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(); -
- Posted 5 years ago #
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
-
- Posted 5 years ago #
"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.
-
- Posted 5 years ago #
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
-
- Posted 5 years ago #
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 =)
-
- Posted 5 years ago #
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.
-
- Posted 5 years ago #
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! -
- Posted 5 years ago #
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
-
- Posted 5 years ago #
thanks a lot! it works now...
-
- Posted 5 years ago #
Great Plugin thanks :)
-
- Posted 5 years ago #
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)??
-
- Posted 5 years ago #
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! )
-
- Posted 5 years ago #
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
-
- Posted 5 years ago #
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
-
- Posted 5 years ago #
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->queryto:
$bbdb->queryTrent
-
- Posted 5 years ago #
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
-
- Posted 5 years ago #
it also does not work properly for me. sometimes it there are twice, three or more times the same members listed...
-
- Posted 5 years ago #
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 -
- Posted 5 years ago #
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
-
- Posted 5 years ago #
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 -
- Posted 5 years ago #
I still don't my online status update with that var true or false. Any ideas?
Trent
-
- Posted 5 years ago #
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? ...
-
- Posted 5 years ago #
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
-
- Posted 5 years ago #
i have the problem that e.g. my username is displayed more than once... actually 23 times. how do i solve this?!
-
- Posted 5 years ago #
Have you set the $mysql41 to false? ... Try deleting the whole table in the database.
-
- Posted 5 years ago #
i deleted the whole table and now it seems to work. thx a lot!
-
- Posted 5 years ago #
If I delete the table, it works for the first logged in visitor to view the site, but no others. I am still at a loss. That is with the variable set to false.
Trent
-
- Posted 5 years ago #
Hehe ... I think I found the bug. You've said, you're using the latest Trac-Version of bbPress?
Then I think you have to change line 48 of my plugin from
add_action('init', 'online_update');
to
add_action('bb_init', 'online_update');then ... it should work! (for me it did)
-
- Posted 5 years ago #
That was it! Working now!
Trent
-
- Posted 5 years ago #
i got this error:
bbPress database error: [Table 'gray_wordpress.bb_online' doesn't exist]
SELECT * FROM bb_online WHERE user_id = 1 LIMIT 1bbPress database error: [Table 'gray_wordpress.bb_online' doesn't exist]
INSERT INTO bb_online (user_id, activity) VALUES ('1', '1167539857')what happened?
EDIT: (2 posts above) http://bbpress.org/forums/topic/283?replies=30#post-2413 seems to have fixed it.