Took the code and hacked it so it should be able to search checkboxes etc...
Let me know if any problems...
Code:
// *********************
// CUSTOM PROFILE FIELDS
// HACK : START : FRIENDSTER STYLE LINKS
//$profilefields = $DB_site->query("
// SELECT profilefieldid, required, title, type, data, def, height
// FROM " . TABLE_PREFIX . "profilefield
// WHERE form = 0 " . iif(!can_moderate(), "
// AND hidden = 0") . "
// ORDER BY displayorder
//");
$profilefields = $DB_site->query("
SELECT profilefieldid, required, title, type, data, def, height, searchable
FROM " . TABLE_PREFIX . "profilefield
WHERE form = 0 " . iif(!can_moderate(), "
AND hidden = 0") . "
ORDER BY displayorder
");
// HACK : END : FRIENDSTER STYLE LINKS
while ($profilefield = $DB_site->fetch_array($profilefields))
{
exec_switch_bg();
$profilefieldname = "field$profilefield[profilefieldid]";
if ($profilefield['type'] == 'checkbox' OR $profilefield['type'] == 'select_multiple')
{
$data = unserialize($profilefield['data']);
foreach ($data AS $key => $val)
{
if ($userinfo["$profilefieldname"] & pow(2, $key))
{
$profilefield['value'] .= iif($profilefield['value'], ', ') . $val;
$profilefield['value2'] .= iif(isset($profilefield['value2']), ',') .vb_number_format($key+1);
}
}
}
else
{
$profilefield['value'] = $userinfo["$profilefieldname"];
}
if ($profilefield['value'] != '')
{
$show['extrainfo'] = true;
// HACK : START : FRIENDSTER STYLE LINKS
if ($profilefield['searchable']) {
$profileLinks = explode(',', $profilefield['value']);
$profileLinks2 = explode(',', $profilefield['value2']);
for ($ii = 0; $ii < count($profileLinks); $ii++)
{
if ($profilefield['type'] == 'checkbox' || $profilefield['type'] == 'select_multiple' ) {
if ($profilefield['type'] == 'checkbox') {
$profileLinks[$ii] = '<a href="'.$vboptions[bburl].'/memberlist.php?do=getall&'.$profilefieldname.'[]='.$profileLinks2[$ii].'">'.trim($profileLinks[$ii]).'</a>';
} else {
$profileLinks[$ii] = '<a href="'.$vboptions[bburl].'/memberlist.php?do=getall&'.$profilefieldname.'='.$profileLinks2[$ii].'">'.trim($profileLinks[$ii]).'</a>';
}
} else {
$profileLinks[$ii] = '<a href="'.$vboptions[bburl].'/memberlist.php?do=getall&'.$profilefieldname.'='.urlencode(trim($profileLinks[$ii])).'">'.$profileLinks[$ii].'</a>';
}
}
$profilefield['value'] = implode(',', $profileLinks);
}
// HACK : END : FRIENDSTER STYLE LINKS
}
eval('$customfields .= "' . fetch_template('memberinfo_customfields') . '";');
}
// END CUSTOM PROFILE FIELDS
// *************************