Skip to Content Skip to Menu

🌲 Merry Christmas! Great savings on Professional and Developer Memberships! Get 25% off now with code XMAS-2024!

[SOLVED] Online Status

  • chanteur94
  • chanteur94
  • OFFLINE
  • Posts: 302
  • Thanks: 13
  • Karma: 1
9 years 11 months ago - 9 years 11 months ago #257262 by chanteur94
[SOLVED] Online Status was created by chanteur94
Hello.
I use Joomla 3.3.6 and Cb2.0.4
Why i cannot filter list with online status but i can display it in the columns ?

However, how to do this in a list ?

Thank you.
Last edit: 9 years 11 months ago by nant.

Please Log in or Create an account to join the conversation.

  • nant
  • nant
  • OFFLINE
  • Posts: 12339
  • Thanks: 1467
  • Karma: 877
9 years 11 months ago #257277 by nant
Replied by nant on topic Online Status

chanteur94 wrote: Hello.
I use Joomla 3.3.6 and Cb2.0.4
Why i cannot filter list with online status but i can display it in the columns ?

However, how to do this in a list ?

Thank you.


The online status field is a calculated field and you cannot filter off it.

If you want to show a list of online usres just use the CB Online module.

Please Log in or Create an account to join the conversation.

  • krileon
  • krileon
  • ONLINE
  • Posts: 48622
  • Thanks: 8302
  • Karma: 1446
9 years 11 months ago #257294 by krileon
Replied by krileon on topic Online Status
As Nick stated it's a calculated fields and such fields can't be added to the database query of a userlist as there is nothing stored in CBs table to filter off of.

You can however filter your userlist to online or offline users using an Advanced filter, which directly adds to the WHERE statement of the query. Example as follows.

Online:
Code:
( ( SELECT COUNT(*) FROM `#__session` AS s WHERE s.`userid` = u.`id` ) > 0 )

Offline:
Code:
( ( SELECT COUNT(*) FROM `#__session` AS s WHERE s.`userid` = u.`id` ) = 0 )


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.
The following user(s) said Thank You: nant

Please Log in or Create an account to join the conversation.

  • chanteur94
  • chanteur94
  • OFFLINE
  • Posts: 302
  • Thanks: 13
  • Karma: 1
9 years 11 months ago #257317 by chanteur94
Replied by chanteur94 on topic Online Status
:woohoo: Thank you very much. It was what i'm looking for.

Best regards.
The following user(s) said Thank You: nant

Please Log in or Create an account to join the conversation.

Moderators: beatnantkrileon
Powered by Kunena Forum