Skip to Content Skip to Menu

[SOLVED] CB Content Bot

6 years 6 months ago - 6 years 6 months ago #298517 by 3cellhosting
[SOLVED] CB Content Bot was created by 3cellhosting
Hello Support,

I must be having a senile moment! I have downloaded and installed CB Content Bot and ensured it is enabled.

In each user profile I have a tab for Lodge History. It contains a single field cb_lodgehistory.

What I want to do is display that same information in an article. Based on the scant information I could find on the plugin I surmised I should simply add this code to the article...
Code:
<p>[cb:userfield field="cb_lodgehistory" /]</p>
... and the textarea content of cb_lodgehistory would appear as if by magic. No such luck.

I then thought that I ought to make sure it took the field from the correct profile so I selected author in the plugin. No change.

Have I completely misunderstood the use of this bot? Do I need to add extra code to identify correct profile? The information on substitutions just confused me even more.

Is there a video?

Please be gentle when you berate me for not seeing the blindingly obvious that I must have missed ;)
David

David
www.3cellhosting.com - where personality, creativity and integrity come as standard.
Last edit: 6 years 6 months ago by krileon. Reason: Added [SOLVED] tag to subject

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 68607
  • Thanks: 9108
  • Karma: 1434
6 years 6 months ago #298519 by krileon
Replied by krileon on topic CB Content Bot
The user used for the substitution by default is the article owner. If you need it to display for a specific user you need to specify that. If you need it to display for the user viewing the article you also need to specify that. This is done using the user parameter for a substitution. So for example if you want it to display the field value of the user viewing the article you'd use the below.

[cb:userfield field="FIELD_NAME" user="#me" /]

See the below tutorial for further details.

www.joomlapolis.com/documentation/279-community-builder/tutorials/18353-using-substitutions-throughout-cb


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: 3cellhosting

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

6 years 6 months ago #298523 by 3cellhosting
Replied by 3cellhosting on topic CB Content Bot
OK - Senile moment over :blush:

I did need to add a user id in order for the system to know which profile to raid.

In case anyone else has a stupid moment here is the solution to my problem....
Code:
<p>[cb:userfield field="cb_lodgehistory" user="62"/]</p>

As each article is linked by a menu item relevant to the user profile I simply need to include the above code and whenever the user changes the profile then the Joomla article will also change.

Regards
David

David
www.3cellhosting.com - where personality, creativity and integrity come as standard.
The following user(s) said Thank You: krileon

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 68607
  • Thanks: 9108
  • Karma: 1434
6 years 6 months ago #298526 by krileon
Replied by krileon on topic CB Content Bot
You could also make that user the owner of the article, but ensure they've no usergroup to actually edit articles (e.g. Author) and then all substitutions in the article should come from their profile.


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.

6 years 6 months ago #298527 by 3cellhosting
Replied by 3cellhosting on topic CB Content Bot
Thanks Kyle,

None of the users have author status so that is a good suggestion too. There aren't too many articles so it is also practical.

Better still I have only done one article so far so not many to change ;)

Cheers

David
www.3cellhosting.com - where personality, creativity and integrity come as standard.
The following user(s) said Thank You: krileon

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

Moderators: beatnantkrileon
Powered by Kunena Forum

Facebook Twitter LinkedIn