2011-05-02, 02:30 AM
How do I make my mod add a profile field? Also how would it get removed upon deactivation.
Would something like this work or am i FAAAAAAAAAAR off?
Would something like this work or am i FAAAAAAAAAAR off?
$profilefieldresult = $db->simple_select('profile field', 'fid', "title = 'custom status'", array('limit' => 1));
$profilefield = $db->fetch_array($profilefieldresult);
if(empty($profilefield['fid']))
{
$new_profilefield = array(
'title' => ('Custom Status)'),
'description' => ('Allows users to make their own status!'),
'field type' => textbox,
'maximum_lenth' => 300,
'field_lenth' => 0,
'display_order' => 1212,
'required' => 2
'edit_by_user' => 1,
'hide_on_profile' => 2
);