Skip to Content Skip to Menu

[SOLVED] user_id with content bot plugin is not displayed in an article

  • sorozco
  • sorozco
  • OFFLINE
  • Posts: 92
  • Thanks: 5
  • Karma: 1
10 years 2 months ago - 10 years 2 months ago #248201 by sorozco
I have been testing the plugin cb content bot for substitutions in articles. It works fine with the format

{cb:[FIELD]}

as in

{cb:[username]}

But, when I try to show the user id it shows the code text, like in:

{cb:[user_id]}

Instead of showing the id number of the actual user, shows the text [user_id]. Does this field needs something special? Or it's not the correct name?

Regards
Last edit: 10 years 2 months ago by nant.

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

  • sorozco
  • sorozco
  • OFFLINE
  • Posts: 92
  • Thanks: 5
  • Karma: 1
10 years 2 months ago - 10 years 2 months ago #248202 by sorozco
Can I use conditions in articles, with content bot, to show some content, but with fields created by the user?

Like:

{cb:[cb:if id_equipo!=""]SHOW SOME CONTENT...[/cb:if]}

If the answer is affirmative, Is the notation used correct?

Because when I use it, not matter if I use != or = the article doesn't show anything. Not even the code. I mean, it doesn't matter if the condition is true or false, in every scenario it is executed as the condition was false, even if it is true. It never shows the content.
Last edit: 10 years 2 months ago by sorozco.

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48478
  • Thanks: 8282
  • Karma: 1443
10 years 2 months ago #248228 by krileon

Instead of showing the id number of the actual user, shows the text [user_id]. Does this field needs something special? Or it's not the correct name?

Only reason for it to do that is if there is no user object to run substitutions through. Is the substitution target the viewing user or the article author?

Can I use conditions in articles, with content bot, to show some content, but with fields created by the user?

Yes, by default it runs its substitutions against the article author. This can be reconfigured in the CB Content Bot plugin. Alternatively you change the user of the conditional as follows.

{cb:[cb:if user="#me" id_equipo!=""]SHOW SOME CONTENT...[/cb:if]}


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.

  • sorozco
  • sorozco
  • OFFLINE
  • Posts: 92
  • Thanks: 5
  • Karma: 1
10 years 2 months ago - 10 years 2 months ago #248241 by sorozco

krileon wrote:

Instead of showing the id number of the actual user, shows the text [user_id]. Does this field needs something special? Or it's not the correct name?

Only reason for it to do that is if there is no user object to run substitutions through. Is the substitution target the viewing user or the article author?

Can I use conditions in articles, with content bot, to show some content, but with fields created by the user?

Yes, by default it runs its substitutions against the article author. This can be reconfigured in the CB Content Bot plugin. Alternatively you change the user of the conditional as follows.

{cb:[cb:if user="#me" id_equipo!=""]SHOW SOME CONTENT...[/cb:if]}


The substitution target is the viewing user.
Last edit: 10 years 2 months ago by sorozco.
The following user(s) said Thank You: nant

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

  • sorozco
  • sorozco
  • OFFLINE
  • Posts: 92
  • Thanks: 5
  • Karma: 1
10 years 2 months ago #248243 by sorozco
It worked great, thank you krileon.

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

  • sorozco
  • sorozco
  • OFFLINE
  • Posts: 92
  • Thanks: 5
  • Karma: 1
9 years 6 months ago #263344 by sorozco
I have the same problem, but this time with different versions:


Joomla 2.5.11
CB 1.9.1
Content bot 2.2.0

The plugin is installed and published.


I am using the same code as in the older versions in the other site:

{cb:[user_id]}

But what is shown in the page is:

[user_id]

I tried with different fields, but all are the same.

We just installed CB 1.9.1, because we had 1.9.0. And the plugin contentbot 2.2.0 seems to be compatible with 1.9.1. We thought that was the problem. But is showing the same way.

What could be the problem?

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

Moderators: beatnantkrileon
Powered by Kunena Forum