HI all…Need help
I’m tying to create a website that enables the current user to view the online status of all the other users that are logged in. Any one with an idea of how to do it please?
HI all…Need help
I believe someone created a plugin that enables you to track which users are logged in. Additionally, you could always set a workflow to run every minute and if the user is logged in then update a time stamp on the user’s table. You’d need to put that workflow into a reusable element and include it on each page in your site as well.
Then, you could create a repeating group that shows all of the user’s whose timestamp is less than 60 seconds old.
Now, I should warn you, this type of thing is going to have performance issues in Bubble. It requires workflows to run for every user in the system somewhat frequently which takes some server capacity to handle. Furthermore, showing a repeating group of all user’s that are active is a computationally intensive thing - RG’s are often slow to begin with, but when you need it to update in near real-time, then it’s doing to need to do a lot of calculations quite often.
So, I’d recommend relaxing the real-time nature of this as much as possible. Setting it to show people who were active within the last 15 minutes might work well.
Thanks alot…I’ll try that out.
Whats the plugin’s name?
Could this help?
Yeah…It definitely would
I would wish to know the plugin’s name for my general knowledge
I’m not sure if this is exactly what you’re looking for, but the way I did this was to create a field on the user data type of “online status”, which is a yes/no.
When current user is logged in, make changes to user, online status is YES.
Have a repeating group that is users. Constraint: online status is YES.
Create elements to display whatever user data you want, such as name.
Create an icon (I used the cloud icon). When user’s online status is yes, the icon color is green. When online status is no, icon is red.
Of course the problem with this is that the value will (practically speaking) never go “no”. You can set it to “no” if the user explicitly logs out, but users will generally rarely do that.
So if you use a system like this what your value represents is that such and such user Logged in and has not yet logged out.
The point being: The User’s state of being “logged in” is NOT the same as the state of actively using your web app.
@AliFarahat published a presence plugin “Efactive”, described here:
I’ve not played around with it, so don’t know exactly how it is that it works, but perhaps it’s a decent solution for detecting user presence in Bubble.
(BTW, this general concept is called “presence”. A quick Google for “how to add presence to a web app” turned up this nice overview from Firebase. This would be another potential solution that could with a bit of work be implemented in a Bubble app:
This topic was automatically closed after 70 days. New replies are no longer allowed.