Opened 13 years ago
Last modified 11 years ago
#1792 new enhancement
Add a Who is online widget
Reported by: | alexvorn2 | Owned by: | |
---|---|---|---|
Milestone: | Future Release | Priority: | normal |
Severity: | minor | Version: | 2.1.2 |
Component: | API - Widgets | Keywords: | dev-feedback |
Cc: | jared@…, wordpress@… |
Description
I must have widget for bbPress is that will show how many users are online, a list of user names would be fine showing in the sidebar of in the footer of the site.
Attachments (3)
Change History (19)
#1
@
13 years ago
- Milestone changed from 2.1 to Future Release
- Type changed from task to enhancement
#3
@
13 years ago
this action should be added to work - add_action( 'bbp_widgets_init', array( 'BBP_Online_Widget', 'register_widget' ), 10 );
#4
@
13 years ago
If you could turn this into a patch would be really helpful. Replacing whole files is a huge pain.
#5
follow-up:
↓ 6
@
13 years ago
I have no idea how submit a patch via diff files, I never done this before...
Just compare this file and original one and you will see the code I added.
If you could give a link on "how to submit a patch via Windows" it would be very nice.
#6
in reply to:
↑ 5
@
13 years ago
Replying to alexvorn2:
I have no idea how submit a patch via diff files, I never done this before...
Just compare this file and original one and you will see the code I added.
Doing it this way makes everyone else do all the work for what should be a simple patch. While it's very true that any contribution is greatly appreciated, attaching a modified core file and saying "do the rest yourself" is a rather inconsiderate approach.
If you could give a link on "how to submit a patch via Windows" it would be very nice.
I know you're not new to the Internet; give Google a search on using Subversion in Windows, and I suspect thousands of really great articles will appear. You'll probably end up using TortoiseSVN to start with. It has a great GUI and comes with lots of neat tools to get you started.
#7
@
13 years ago
- Milestone changed from 2.1 to Future Release
After a bit of review, this widget as it's coded here is too costly to use, looping through and hitting the DB at least twice for each user it finds.
Punting back to Future Release.
If you're interested in pursuing this further, check out how we do this in BuddyPress's 'Recently Online' widget.
#8
@
13 years ago
I download the application named TortoiseSVN (from http://tortoisesvn.tigris.org/), after trying how create the diff file it was no clear to me how to do this...
Google results are just bad as hell, from the 10 site results the first seems to me for just what I need but there is lack of a documentation, I need video tutorials or a magic button that will do everything I need. I downloaded two apps, one called "UnxUtils", for it I need to use CMD.EXE app... then I just don't know what to do next..
Another aplication is WinMerge, I did't find where to do what I need.
#10
@
12 years ago
- Keywords has-patch added
- Milestone changed from Future Release to Awaiting Review
- Priority changed from low to normal
- Version changed from 2.0 to 2.1.2
#11
follow-up:
↓ 12
@
12 years ago
- Keywords dev-feedback added; has-patch removed
- Milestone changed from Awaiting Review to Future Release
Hi Alex,
Patch needs:
- Output sanitization.
- Input validation.
- A limit on the WP_User_Query to prevent full table scans on a query of millions of rows.
- Proper phpdoc.
Putting back to Future Release, since this isn't something we can consider for 2.2.
#12
in reply to:
↑ 11
@
12 years ago
Replying to johnjamesjacoby:
Hi Alex,
Patch needs:
- Output sanitization.
- Input validation.
- A limit on the WP_User_Query to prevent full table scans on a query of millions of rows.
- Proper phpdoc.
Putting back to Future Release, since this isn't something we can consider for 2.2.
I'm not good at php, and I don't have an idea how to handle these two: output sanitation and input validation... what code/functions I should use?
#14
@
11 years ago
I'll just leave this here: https://github.com/MZAWeb/bbpress-whos-online
it's just a work-in-progress. Mostly I wanted to test a theory.
It has a couple of weird architecture decisions, but I tested this with 10.000 online users and it works didn't die.
It tracks both logged in and anonymous users. Of course for anons it just shows the count.
Still needs work, and I'm pretty sure this is not suitable for (very)big traffic sites.
#16
@
11 years ago
related http://core.trac.wordpress.org/ticket/24856 , we can use their code with some modifications...
Punting to future release as an enhancement. If someone wants to give this a shot, have at it. BuddyPress does something similar already, and WordPress doesn't make this easy to accomplish.