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 #275139 by gjschaller
Replied by gjschaller on topic CB Forums: Sidebar field documentation
I tested in a custom HTML field, no output or error is produced.

All other issues are resolved, only Usergroups remains.

I can provide a testing environment if it will help.

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 #275141 by nant
Replied by nant on topic CB Forums: Sidebar field documentation

gjschaller wrote: I tested in a custom HTML field, no output or error is produced.

All other issues are resolved, only Usergroups remains.

I can provide a testing environment if it will help.


As I said it works fine on my test site.

Please make sure you are putting the

[cb:if usergroup includes "2"]I have Registered Usergroup[/cb:if]

directly in editor HTML code and test

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 #275169 by gjschaller
Replied by gjschaller on topic CB Forums: Sidebar field documentation
I have created a Custom HTML field in CB for profiles. In that field, is the following code (no editor, just plain text when entering it):

[cb:if usergroup includes "2"]I have Registered Usergroup[/cb:if]
[cb:if usergroup includes "39”]New Player Marshal[/cb:if]
[cb:if usergroup includes "28”]Rules Marshal[/cb:if]
[cb:if usergroup includes "30”]Role Play Marshal[/cb:if]
[cb:if usergroup includes "29”]Monster Marshal[/cb:if]
[cb:if usergroup includes "38”]Logistics Marshal[/cb:if]
[cb:if usergroup includes "47”]Card Marshal[/cb:if]
[cb:if usergroup includes "31”]Kitchen Marshal[/cb:if]
[cb:if usergroup includes "51”]Safety Marshal[/cb:if]
[cb:if usergroup includes "54”]Land System Marshal[/cb:if]
[cb:if usergroup includes "33”]Marketing Team[/cb:if]
[cb:if usergroup includes "42”]Storyteller[/cb:if]


The first line displays "I have Registered Usergroup" - but none of the other lines display their content, even though I am a member of some of those groups.

Geoffrey Schaller
Technical Officer
www.knightrealms.com

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48464
  • Thanks: 8280
  • Karma: 1443
8 years 10 months ago #275198 by krileon
Replied by krileon on topic CB Forums: Sidebar field documentation
Seams to be working ok in my tests using the following.

[cb:if usergroup includes "1"]Public[/cb:if]
[cb:if usergroup includes "2"]Registered[/cb:if]
[cb:if usergroup includes "7"]Administrator[/cb:if]
[cb:if usergroup includes "8"]Super Users[/cb:if]

Maybe some of the IDs are incorrect in your current usage? Note this is for usergroups and not view access levels (that's a separate usage). Also note due to inheritance you could experience weird issues. For example if I only have Super Users then I am not Registered as Super Users is a child of Public and not Registered so there's no inheriting that group. It maybe better for you to use view access level conditions instead of usergroups.


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.

  • gjschaller
  • gjschaller
  • OFFLINE
  • Posts: 169
  • Thanks: 21
  • Karma: 7
8 years 10 months ago #275218 by gjschaller
Replied by gjschaller on topic CB Forums: Sidebar field documentation
Two profiles as a test:

template.knightrealms.com/my-actions/view-my-profile/userprofile/GJSchaller.html

template.knightrealms.com/my-actions/view-my-profile/userprofile/Gallion.html

It works for the 4 test groups you posted above (1,2,7,8), but not any other groups (the ones after the HR).

Could it be something with them being non-default groups?

Geoffrey Schaller
Technical Officer
www.knightrealms.com

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 #275265 by gjschaller
Replied by gjschaller on topic CB Forums: Sidebar field documentation
This is the CB Custom HTML field I am using to test:

<ul>
<li>[cb:if usergroup includes "1"]Public[/cb:if]</li>
<li>[cb:if usergroup includes "2"]Registered[/cb:if]</li>
<li>[cb:if usergroup includes "7"]Administrator[/cb:if]</li>
<li>[cb:if usergroup includes "8"]Super Users[/cb:if]</li>
</ul>
<hr />
<ul>
<li>[cb:if usergroup includes "39”]New Player Marshal[/cb:if]</li>
<li>[cb:if usergroup includes "28”]Rules Marshal[/cb:if]</li>
<li>[cb:if usergroup includes "30”]Role Play Marshal[/cb:if]</li>
<li>[cb:if usergroup includes "29”]Monster Marshal[/cb:if]</li>
<li>[cb:if usergroup includes "38”]Logistics Marshal[/cb:if]</li>
<li>[cb:if usergroup includes "47”]Card Marshal[/cb:if]</li>
<li>[cb:if usergroup includes "31”]Kitchen Marshal[/cb:if]</li>
<li>[cb:if usergroup includes "51”]Safety Marshal[/cb:if]</li>
<li>[cb:if usergroup includes "54”]Land System Marshal[/cb:if]</li>
<li>[cb:if usergroup includes "33”]Marketing Team[/cb:if]</li>
<li>[cb:if usergroup includes "42”]Storyteller[/cb:if]</li>
</ul>


If it helps, this is a testing environment, and I can give you direct access.

Access Levels won't work, as some groups listed are part of the same Access Level, but are distinct groups.

Geoffrey Schaller
Technical Officer
www.knightrealms.com

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

Moderators: beatnantkrileon
Powered by Kunena Forum