There's not much I can suggest. Using more complicated substitutions is rather difficult. Have to understand the $user object passed to the substitutions is established by PHP. For example when viewing a users profiles the $user object is assumed that of the user displayed. So you need to change your IF to be based off #me or myid instead of #displayed.
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.
I played a lot with substitutions and followed all available examples and tutorials... thats why I am clueless about the simple IF OR problem.
I assume the following Syntax is correct...
[cb:if user="#displayed" usertype="Registered" OR usertype="Editor"] The displayed User is of type: [cb:userdata field="usertype" /][/cb:if]
It does not produce any output?!
EDIT:
Also followed
this Incubator discussion
, and tried the same in Joomla article and CBcontent Bot. Same issues. Also the alternative pipe-character Syntax did not work for me.
By the way, In the discussion you suggested to use "gid" instead of usertype names. I could not find an example how to check the groupID value. Your substitution tutorial does not list it.
[cb:if user="#displayed" usertype="Registered" or usertype="Editor"]The displayed User is of type: [cb:userdata field="usertype" /][/cb:if]
Was able to confirm the above is working fine. Seams the OR must be lowercase, have updated the substitution guide to reflect this.
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: pepperstreet
Delimiter field works now! :woohoo:
[cb:if user="#displayed" usertype="Registered" or usertype="Editor"]The displayed User is of type: [cb:userdata field="usertype" /][/cb:if]
Article with CB Content Bot 1.0.2 works now.
Hint: Remember to change user="#me" in this particular case :whistle:
{cb: [cb:if user="#me" usertype="Registered" or usertype="Editor"]The currently viewing User is of type: [cb:userdata field="usertype" /][/cb:if] }