Skip to Content Skip to Menu

Online Status Icon in CB Online / Content Module

  • MMDoege
  • MMDoege
  • OFFLINE
  • Posts: 98
  • Thanks: 3
  • Karma: 0
5 years 11 months ago #308276 by MMDoege
Hello,

Is there a way to get online circle displayed just beneath user's avatar (like in profile and userlist modes) in an CB Online/Content Module?

Thank you.
Attachments:

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48444
  • Thanks: 8277
  • Karma: 1443
5 years 11 months ago #308280 by krileon
Best approach would be a layout override for the module or a custom layout for it. There you'd add the onlinestatus field output however you'd like. The quickest is probably to just use the "User-text" parameter within the module with something like the below.

Code:
<div class="cb_template"> <div class="cbOnlineUserContainer"> [cb:userfield field="avatar" reason="list" /] <div class="cbOnlineUserStatus">[cb:userfield field="onlinestatus" reason="list" /]</div> </div> </div>

You'll need some custom CSS for re positioning the online status wherever you may want it. The below CSS should give what you're wanting.

Code:
.cbOnlineUserContainer { position: relative; } .cbOnlineUserStatus { position: absolute; left: 0; bottom: 0; font: 0/0 a; } .cbOnlineUserStatus .fa { font: initial; }

The module has no functionality for outputting custom css so you'll likely need to add it to your Joomla template or try using CBs built in CSS override feature below.

www.joomlapolis.com/blog/kyle/18711-template-css-overrides-made-easy


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.

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

  • MMDoege
  • MMDoege
  • OFFLINE
  • Posts: 98
  • Thanks: 3
  • Karma: 0
5 years 11 months ago #308305 by MMDoege
Thanks a lot for your quick response.
Code turned out to work properly.

However I'd to switch CB Online Module's "Alternative Layout" setting from avatar-horizontal to default-horizontal.
Both settings did not work before in terms of getting avatars side-by-side.
I assume this was caused by Joomla Template settings in use.
I'd to add:

.cb_template .cbConnectionPaths img {
max-width: 40px;
margin-left:5px;
margin-right:5px;
display: inline;
}


to override.css to get avatars aligned.

So apparently returning to an earlier issue.

What may cause forcing images displaying vertically when set to default-horizontal (see screenshot attached)?

Thank you.
Attachments:

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48444
  • Thanks: 8277
  • Karma: 1443
5 years 11 months ago #308319 by krileon
Change the divs in the above HTML to spans and should work side by side like you're wanting.

Code:
<span class="cb_template"> <span class="cbOnlineUserContainer"> [cb:userfield field="avatar" reason="list" /] <span class="cbOnlineUserStatus">[cb:userfield field="onlinestatus" reason="list" /]</span> </span> </span>


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, MMDoege

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

Moderators: beatnantkrileon
Powered by Kunena Forum