ElkArte Community

Project Support => Support => Topic started by: badmonkey on April 23, 2017, 04:43:54 am

Title: Custom profile fields on SSI page
Post by: badmonkey on April 23, 2017, 04:43:54 am
Using 1.1 b4.  How would one go about outputting information from custom profile fields to an SSI driven page?  Specifically what I'm doing is creating a custom profile field where users can enter the number of people they plan to bring to an event.  The SSI page contains general information about the event, then outputs the usernames and number of people attending  with those members.  Perhaps even with a total at the end.  How can this be done?  Alternatively, can anyone think of an easier way to store this info in the database then output it on the appropriate page using the existing software?  Thanks for your thoughts!  Hope all is well for you. 
Title: Re: Custom profile fields on SSI page
Post by: emanuele on April 23, 2017, 10:54:41 pm
I'm a bit tired now and my brain is not working so well[1] so I'm not sure if what I'll say does make sense or not.

If you use loadMemberData/loadMemberContext to load the members data, you'll get all the custom fields values in
Code: [Select]
$memberContext[$user]['custom_fields']
that is an array. So you should be able to find the custom field by looping over the the entries of the array.
... that doesn't really make any difference from usual, so I'm not sure if it is an excuse or what xD
Title: Re: Custom profile fields on SSI page
Post by: Spuds on April 24, 2017, 12:58:29 am
Could you somehow use a poll for that ... if not ignore me, I just finished a quadruple ale :P
Title: Re: Custom profile fields on SSI page
Post by: badmonkey on April 24, 2017, 01:47:13 am
Could you somehow use a poll for that ... if not ignore me, I just finished a quadruple ale :P

I'm all ears for suggestions.   Far from being a programmer, any help is welcome!  Haha