Skip to Content Skip to Menu

[SOLVED] Display fields in Group Member Tab (Grid View)

  • AlexRag
  • AlexRag
  • ONLINE
  • Posts: 589
  • Thanks: 44
  • Karma: 7
3 weeks 6 days ago #341695 by AlexRag
Apologies for misunderstanding which section you were referring to, and thanks for pointing me in the right direction!
The following user(s) said Thank You: krileon

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

  • AlexRag
  • AlexRag
  • ONLINE
  • Posts: 589
  • Thanks: 44
  • Karma: 7
1 week 5 days ago - 1 week 5 days ago #341770 by AlexRag
Just circling back you your advice about adding a field type to the footer of the members grid view in a group using Autio Actions, quoted below

Code:
$_PLUGINS->trigger( 'gj_onDisplayUser', array( &$row, &$counters, &$content, &$menu, $group, $user ) );
$row = gj group user object
$counters = array of content displayed in the footer (where Member is)
$content = custom content displayed below the footer
$menu = custom links for the dropdown menu
$group = gj group object
$user = cb user object

So the below, for example, should work to output whatever profile fields you like.

Global
Triggers: gj_onDisplayUser
Type: Code
User: Automatic
Access: Everybody
Action
Method: PHP
Code:
Code:
Code:
$variables['var2'] = 'Test';
Parameters
Reference Variables: Variable 2

With the above you should see "Test" output in the footer now. Replace that with substitutions or with whatever custom PHP you want. Add more to that array to output more as it'll split them into containers for the footer.

If I wanted to replace the sample you mentioned, "Test" with a profile field,  what would I replace "Test" with in 
Code:
$variables['var2'] = 'Test';
.
For example, in their profile, I have a field type of "position" that I want to have appear of what they put in it

Thanks!
Last edit: 1 week 5 days ago by AlexRag.

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 49505
  • Thanks: 8478
  • Karma: 1465
1 week 3 days ago #341781 by krileon
You'd just replace it with a substitution. Example as follows.
Code:
$variables['var2'] = '[cb_myfieldname]';


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.

  • AlexRag
  • AlexRag
  • ONLINE
  • Posts: 589
  • Thanks: 44
  • Karma: 7
4 days 4 hours ago #341846 by AlexRag
Thanks, Kyle.

When I added the new code,  I was seeing this error:  implode(): Argument #2 ($array) must be of type ?array, string given

but then I noticed in my earlier test that worked, the code was a little different.  It had the square brackets after , so 
Code:
$variables['var2'][] = 'Test';

The funny thing is, I don't remember adding those [ ] brackets.

In any event, when I added those square brackets, the field item displayed properly: 
Code:
$variables['var2'][]= '[cb_myfieldname]';
 
The following user(s) said Thank You: krileon

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 49505
  • Thanks: 8478
  • Karma: 1465
3 days 9 hours ago #341851 by krileon
Sorry, yes the brackets are necessary. I was looking at the wrong variable being a string (var3 is a string).


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: AlexRag

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

Moderators: beatnantkrileon
Powered by Kunena Forum