Skip to Content Skip to Menu

🎃 Happy Halloween! Treat yourself with an awesome discount on memberships! Get 20% off now with code SPOOKY-2024!

[SOLVED] CB Forums: Sidebar field documentation

  • gjschaller
  • gjschaller
  • OFFLINE
  • Posts: 169
  • Thanks: 21
  • Karma: 7
8 years 10 months ago - 8 years 10 months ago #274570 by gjschaller
While looking through my CB 2.0.12 plugins, I came across CB Forums => Parameters => Forums => Sidebar.

It looks like this is a way to replace the information displayed in the sidebar on Kunena or similar, which I am very interested in. Is there any documentation on how to use this field? I didn't see it listed online, or missed it somehow.

Specifically, in addition to the typical Kunena user information, I am looking to display if the user is a member of select Joomla User Groups (i.e. - if a member of the Rules Team group, display "Rules Team" on the sidebar.)

Geoffrey Schaller
Technical Officer
www.knightrealms.com
Last edit: 8 years 10 months ago by krileon.

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

  • nant
  • nant
  • OFFLINE
  • Posts: 12339
  • Thanks: 1467
  • Karma: 877
8 years 10 months ago #274606 by nant
Replied by nant on topic CB Forums: Sidebar field documentation

gjschaller wrote: While looking through my CB 2.0.12 plugins, I came across CB Forums => Parameters => Forums => Sidebar.

It looks like this is a way to replace the information displayed in the sidebar on Kunena or similar, which I am very interested in. Is there any documentation on how to use this field? I didn't see it listed online, or missed it somehow.

Specifically, in addition to the typical Kunena user information, I am looking to display if the user is a member of select Joomla User Groups (i.e. - if a member of the Rules Team group, display "Rules Team" on the sidebar.)


Please download the CB Primer Book and read it.
There is some related info and example in it for this.

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

  • gjschaller
  • gjschaller
  • OFFLINE
  • Posts: 169
  • Thanks: 21
  • Karma: 7
8 years 10 months ago #274832 by gjschaller
Replied by gjschaller on topic CB Forums: Sidebar field documentation
Got it, thank you - much easier than I thought.

For my next trick... Joomla User Groups! :)

What is the best way to set up a query, so that if a user is a member of the Joomla Group "Foo" the sidebar lists "Foo" in their profile? I imagine it would be something like:

[cb:if (groupmember)="true"]
<li>
<span>Member of FOO</span>
</li>
[/cb:if]

Just not sure how to get the part in ( ) to work...

Geoffrey Schaller
Technical Officer
www.knightrealms.com

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

  • nant
  • nant
  • OFFLINE
  • Posts: 12339
  • Thanks: 1467
  • Karma: 877
8 years 10 months ago #274853 by nant
Replied by nant on topic CB Forums: Sidebar field documentation

gjschaller wrote: Got it, thank you - much easier than I thought.

For my next trick... Joomla User Groups! :)

What is the best way to set up a query, so that if a user is a member of the Joomla Group "Foo" the sidebar lists "Foo" in their profile? I imagine it would be something like:

[cb:if (groupmember)="true"]
<li>
<span>Member of FOO</span>
</li>
[/cb:if]

Just not sure how to get the part in ( ) to work...


www.joomlapolis.com/support/tutorials/107-use-cases/18353-using-substitutions-throughout-cb

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

  • gjschaller
  • gjschaller
  • OFFLINE
  • Posts: 169
  • Thanks: 21
  • Karma: 7
8 years 10 months ago - 8 years 10 months ago #274858 by gjschaller
Replied by gjschaller on topic CB Forums: Sidebar field documentation
This is what I am using - I'm getting the Online / Offline, but not the posts, or the user groups. Any tips on what I am missing?
Code:
<ul class="kpost-profile"> <li class="kpost-username"><a class="kwho-user" href="index.php?option=com_comprofiler&task=userProfile&user=[user_id]" title="View [username]'s Profile" rel="nofollow">[username]</a></li> <li class="kpost-avatar"><span class="kavatar"><a class="kwho-user" href="index.php?option=com_comprofiler&task=userProfile&user=[user_id]" title="View [username]'s Profile" rel="nofollow"><img class="kavatar" src="[cb:userdata field="avatar" reason="list" /]" alt="[username]'s Avatar" style="max-width: 144px; max-height: 144px" /></a></span></li> [cb:if onlinestatus="true"]<li><span class="kicon-button kbuttononline-yes"><span class="online-yes"><span>NOW ONLINE</span></span></span></li>[/cb:if] [cb:if onlinestatus="false"]<li><span class="kicon-button kbuttononline-no"><span class="online-no"><span>OFFLINE</span></span></span></li>[/cb:if] <li class="kpost-userrank">[cb:userfield field="cb_rank"/]</li> [cb:if usergroup includes "39”]<li>New Player Marshal</li>[/cb:if] [cb:if usergroup includes "28”]<li>Rules Marshal</li>[/cb:if] [cb:if usergroup includes "30”]<li>Role Play Marshal</li>[/cb:if] [cb:if usergroup includes "29”]<li>Monster Marshal</li>[/cb:if] [cb:if usergroup includes "38”]<li>Logistics Marshal</li>[/cb:if] [cb:if usergroup includes "47”]<li>Card Marshal</li>[/cb:if] [cb:if usergroup includes "31”]<li>Kitchen Marshal</li>[/cb:if] [cb:if usergroup includes "51”]<li>Safety Marshal</li>[/cb:if] [cb:if usergroup includes "54”]<li>Land System Marshal</li>[/cb:if] [cb:if usergroup includes "33”]<li>Marketing Team</li>[/cb:if] [cb:if usergroup includes "42”]<li>Storyteller</li>[/cb:if] </ul>

Geoffrey Schaller
Technical Officer
www.knightrealms.com
Last edit: 8 years 10 months ago by gjschaller.

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

  • nant
  • nant
  • OFFLINE
  • Posts: 12339
  • Thanks: 1467
  • Karma: 877
8 years 10 months ago #274927 by nant
Replied by nant on topic CB Forums: Sidebar field documentation

gjschaller wrote: This is what I am using - I'm getting the Online / Offline, but not the posts, or the user groups. Any tips on what I am missing?

Code:
<ul class="kpost-profile"> <li class="kpost-username"><a class="kwho-user" href="index.php?option=com_comprofiler&task=userProfile&user=[user_id]" title="View [username]'s Profile" rel="nofollow">[username]</a></li> <li class="kpost-avatar"><span class="kavatar"><a class="kwho-user" href="index.php?option=com_comprofiler&task=userProfile&user=[user_id]" title="View [username]'s Profile" rel="nofollow"><img class="kavatar" src="[cb:userdata field="avatar" reason="list" /]" alt="[username]'s Avatar" style="max-width: 144px; max-height: 144px" /></a></span></li> [cb:if onlinestatus="true"]<li><span class="kicon-button kbuttononline-yes"><span class="online-yes"><span>NOW ONLINE</span></span></span></li>[/cb:if] [cb:if onlinestatus="false"]<li><span class="kicon-button kbuttononline-no"><span class="online-no"><span>OFFLINE</span></span></span></li>[/cb:if] <li class="kpost-userrank">[cb:userfield field="cb_rank"/]</li> [cb:if usergroup includes "39”]<li>New Player Marshal</li>[/cb:if] [cb:if usergroup includes "28”]<li>Rules Marshal</li>[/cb:if] [cb:if usergroup includes "30”]<li>Role Play Marshal</li>[/cb:if] [cb:if usergroup includes "29”]<li>Monster Marshal</li>[/cb:if] [cb:if usergroup includes "38”]<li>Logistics Marshal</li>[/cb:if] [cb:if usergroup includes "47”]<li>Card Marshal</li>[/cb:if] [cb:if usergroup includes "31”]<li>Kitchen Marshal</li>[/cb:if] [cb:if usergroup includes "51”]<li>Safety Marshal</li>[/cb:if] [cb:if usergroup includes "54”]<li>Land System Marshal</li>[/cb:if] [cb:if usergroup includes "33”]<li>Marketing Team</li>[/cb:if] [cb:if usergroup includes "42”]<li>Storyteller</li>[/cb:if] </ul>


Online status works ok on my testing (used to actually generate the screenshots of primer book).

Test the group if clause on a CB Custom HTML field to debug.

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

Moderators: beatnantkrileon
Powered by Kunena Forum