Hey Guys,
How would I go about using the custom profile fields in a script? Not too sure if they're numbered, or what.
Im trying to use them in another way for the profiles page, but all I can find in Profile.Template.php is
if (!empty($context['custom_fields']))
{
foreach ($context['custom_fields'] as $field)
if (($field['placement'] == 1 || empty($field['output_html'])) && !empty($field['value']))
echo '
<li class="custom_field">', $field['output_html'], '</li>';
}
Any pointers?
How about explaining the details of what you're trying to do and maybe we can help better, eh?
lol, yeah.
Trying to use certain parts of the custom fields in selected areas.
I currently have Add & Create soicial mediua icons to profiles mod on the forum. It gives users the option of adding Social networks to their profiles. The thing is, I am trying to setup a feed from the selected profile, but with most of them requiring Authentication to get the feed I am in need of a few more fields.. that's where the custom fields come in.
Here's an example.
For twitter, you just need $context['member']['twitter']['name/link/href'] to use it. With custom fields I have setup 4 fields for the twitter authentication which requires Access Token, Access Token Secret, Consumer Key and Consumer Secret.
I am not sure on how to call these as I can't really find a solid reference to using custom fields.
I can't comment on how a mod does things, only on how SMF itself does them. And SMF wouldn't load them to $context['member'] like that for custom profile fields...
Found a way to do it. Thanks :)