I'm trying to get the $profilefield[title] to work in the postbit like it does in MemberInfo
I've tried adding a plugin, but it isn't giving any results, anyone have any guess
Code:
$profilefield_categories = array(0 => array());
$profilefields_result = $db->query_read_slave("
SELECT pf.profilefieldid, pf.profilefieldcategoryid, pf.required, pf.type, pf.data, pf.def, pf.height
FROM " . TABLE_PREFIX . "profilefield AS pf
LEFT JOIN " . TABLE_PREFIX . "profilefieldcategory AS pfc ON(pfc.profilefieldcategoryid = pf.profilefieldcategoryid)
WHERE pf.form = 0 " . iif(!($permissions['genericpermissions'] & $vbulletin->bf_ugp_genericpermissions['canseehiddencustomfields']), "
AND pf.hidden = 0") . "
ORDER BY pfc.displayorder, pf.displayorder
");
while ($profilefield = $db->fetch_array($profilefields_result))
{
$profilefield_categories["$profilefield[profilefieldcategoryid]"][] = $profilefield;
}
$customfields = '';
$customfields_category = array();
foreach ($profilefield_categories AS $profilefieldcategoryid => $profilefields)
{
$category = array(
'title' => $vbphrase["category{$profilefieldcategoryid}_title"],
'description' => $vbphrase["category{$profilefieldcategoryid}_desc"],
'fields' => ''
);
foreach ($profilefields AS $profilefield)
{
exec_switch_bg();
fetch_profilefield_display($profilefield, $userinfo["field$profilefield[profilefieldid]"]);
($hook = vBulletinHook::fetch_hook('member_customfields')) ? eval($hook) : false;
if ($profilefield['value'] != '')
{
$show['extrainfo'] = true;
eval('$category[\'fields\'] .= "' . fetch_template('memberinfo_customfields') . '";');
}
}
$customfields_category["$profilefieldcategoryid"] = $category['fields'];
eval('$customfields .= "' . fetch_template('memberinfo_customfields_category') . '";');
}