Skip to Content Skip to Menu

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

Easy Way To Display CB Profile Data for a Specific User

11 years 7 months ago #223739 by shoutstream
I want to display fields from a specific CB user's profile within an article. I have used the CB list to display more than one user, but I wanted to have data from just one user.

I wasn't sure if there was a way I could query the CB profiles and display based on if then statement or something like that.

Thanks

Joomla 2.5.6
CB 1.8.1

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48460
  • Thanks: 8280
  • Karma: 1443
11 years 7 months ago #223742 by krileon
First update to CB 1.9 to ensure you've the latest features available to you. Next install CB Content Bot and enable it within Extensions > Plug-in Manager. Now you can use substitutions within Joomla articles. An example usage as follows.

{cb:[usernme]}

Please see the below tutorial for further substitution usage information (for example you can specify a user id to specifically display a users information). Note you must surround substitutions with {cb:} in your articles when using CB Content Bot.

www.allmysocials.com/directory/tutorials/item/233-substitution-usage


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.

11 years 7 months ago #223794 by shoutstream
Thank you Kyle, but after reviewing I do not want to display the user viewing the article's information or profile data, nor do I want to show the author of the articles information either, but I want to query the "CB profile database" (for lack of a better word).

I want to display name, phone and other fields for a specific user who matches a certain criteria.

I have fields that I have created in CB for users called "Registration Type" and "Team". I want to display name, phone, email for a user who's "Registration Type" = Coach and "Team" = Tsunami 13.

I hope this makes more sense.

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48460
  • Thanks: 8280
  • Karma: 1443
11 years 7 months ago #223819 by krileon
You can do that with CB Query Field, but you will still need CB Content Bot to render that query field in a Joomla article.


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.

11 years 6 months ago #224312 by shoutstream
Hi Kyle,

Sorry for the delay, took me a while to upgrade CB, Backups's etc.

I have played with CB Content Bot and it looks good, but I did not understand how CB Query Field can help me accomplish my task.

I have 20 different User List (Teams) that I have created. Each has User List/ Team has a different value for CB Profile Field "cb_myvolleyballteam"

I also have another CB profile Field called "cb_usertype" which has values of "player" and "coach". All users in my current Teams User List have a value of player.

I have inserted each team list into an article for display, I now want to list each coach on the top of this article page.

How do I create a CB Query and display for each coach to show up on each of the 20 different pages if each coach has profile fields that equal the team name and usertype of coach?

Let me know if I should use a support ticket request instead of Forum as this is very important to complete their project :)

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48460
  • Thanks: 8280
  • Karma: 1443
11 years 6 months ago #224341 by krileon
Well CB Content Bot by default uses the article owner or the viewing user for its substitutions. You can force a user id to the substitution though. With that said you can't set the substitution user based off a list of criteria. How did you build your list and display it in an article? Manual substitutions? CB Query Field? You'll probably need to add the coaches manually using substitutions for their user id; example as follows.

{cb:[cb:userfield field="avatar" user="USER_ID_HERE" /]}


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.

Moderators: beatnantkrileon
Powered by Kunena Forum