[SOLVED] display complex substitutions with cbcontent

13 years 5 months ago #145062 by krileon
Don't quite understand what you're trying to do. To dynamically display a user you'll need to use #me, #displayed, or #displayedOrMe for user. Typically you'll want to use #displayedOrMe.


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 to join the conversation.

13 years 5 months ago #145085 by nrdgalor
ya, this goes against much of the community world.

the site i'm preparing has a resident for each of the groups in the cb_group field. this is the focus of the cb_group field and site, this resident. we created user lists to keep the group contained in their own cb_group. the issue comes when you go to the group network page (menu link to the user list). we need to put a bio of the resident of the group in that page based on the "Meaning...." section in my last post. all the users that logon to that site as part of a group will see their group resident bio on that page.

the below user list filter captures the resident for the group and displays only the resident of the group in the list. we would like to use that same dynamic in a cbcontent module to display the resident of the groups info on the right column of the group page we made.

`cb_group` ='[cb:userfield field="cb_group" user="#me" /]' AND `cb_typeofperson` ='Resident'

just a reminder, the group we are referring too is not a gj group here, it is a menu link to the user list based on the field called group, cb_group.

if you want to see it live, you can pm or email me for links, etc... just a private site and i can't put it out on the forum for now

hope you understand, thanks

Jc

Please Log in to join the conversation.

13 years 5 months ago #145110 by krileon
Don't think what you're wanting can be done. I recommend using a group extension such as GroupJive. You can try the following, but I doubt it'll work.

[code:1]
[cb:userdata field="user_id" cb_group="[cb:userdata field='cb_group' user='#displayedOrMe' /]" cb_typeofperson="Resident" /]
[/code:1]

Post edited by: krileon, at: 2010/10/29 18:37


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 to join the conversation.

13 years 5 months ago #145165 by nrdgalor
we have group jive as the group solution. we would like to be able to provide a bio to the cb_group users of the residents info in their network page. just like GJ has the owner of the groups image, i would like to capture that profile in a module in a page.

i tried this, but it did not show anything. only the code in the module.

as a last try, what would you suggest i can do to the fields or any other pertinent part of CB that may allow for cbcontent to display the profile of the resident for the cb_group for users in a page?

once again, thanks for your support

Jc

Please Log in to join the conversation.

13 years 5 months ago #145248 by krileon
You'll need a custom module more then likely. You could also try documentation subscriber incubator project CB Query Field to have a field that's results are displayed based on the custom database query you provide. Example as follows.

Field:
cb_resident

Query:
[code:1]
SELECT `id` FROM `#__comprofiler` WHERE `cb_group` = '[cb_group]' AND `cb_typeofperson` = 'Resident'
[/code:1]

Substitution:
[code:1]
[cb:usertab tab="20" user="[cb_resident]" /]
[/code:1]


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 to join the conversation.

13 years 5 months ago #145321 by nrdgalor
i created a txt field called resident in field mgmt. i created a cbquery query as per your suggestion. then i put the substitution string in cbcontent and got only the code txt output.

just to make sure i understood what you suggested. cbquery will create the query definition for output of the field created. then this ouput will be used to capture the user that will show tab20 in cbcontent.

this is great, if i understood it correctly. this will definitely solve my needs if i get it correct. i can then reference any field based on any query created.

p.s. i set the query to run onAfter Logon. not sure if that was correct.

thanks

Jc

Please Log in to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.220 seconds

Facebook Twitter LinkedIn