MyBB Community Forums

Full Version: write the correct mybb input code for a custom profile field
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
For example I know the input for the yahoo field is {$mybb->input['yahoo']}

what is the correct syntax for lets say custom profile field 1?

I know its something like this....

{$mybb->input['profile_fields'][fid1]}
Which hook are you using?
(2014-03-23, 04:10 AM)Omar G. Wrote: [ -> ]Which hook are you using?

thanks for the support

I think I have figured it out by looking at modcp.php file.

I am just learning to use mybb with php and am trying to wrap my head around it.

not sure what hook yet, but one within the modcp file. just looking at organizing/grouping custom fields a little better.

So Looking at this selection how would I select just 3 profile fields instead of all of them? Any 3 is fine ...as an example

$query = $db->simple_select("profilefields", "*", "", array('order_by' =>
'disporder'));
        while($profilefield = $db->fetch_array($query))
$db->simple_select("profilefields", "*", "fid IN ('1', '2', '3')", array('order_by' =>
'disporder'));

IIRC fid is the correct field.
(2014-03-24, 12:37 AM)Omar G. Wrote: [ -> ]
$db->simple_select("profilefields", "*", "fid IN ('1', '2', '3')", array('order_by' =>
'disporder'));

IIRC fid is the correct field.

Thanks for the response on this, I believe it will get me started on what I want to accomplish