FatalBreeze
08-06-2005, 05:04 PM
Hello i've created a new profile field in my forum.
his id is: field8 and his type is Multiple-Selection-Checkbox.
now i wanted to display its value in the postbit_legacy,
so i went a bit through member.php and i came up with the following code:
$profilefields = $DB_site->query("
SELECT profilefieldid, required, title, type, data, def, height
FROM " . TABLE_PREFIX . "profilefield
WHERE form = 0 " . iif(!($permissions['genericpermissions'] & CANSEEHIDDENCUSTOMFIELDS), "
AND hidden = 0") . "
ORDER BY displayorder
");
while ($profilefield = $DB_site->fetch_array($profilefields))
{
exec_switch_bg();
if ($profilefield['type'] == 'checkbox')
{
$data = unserialize($profilefield['data']);
foreach ($data AS $key => $val)
{
if ($post["field8"] & pow(2, $key))
{
$profilefield['value'] .= iif($profilefield['value'], ', ') . $val;
}
}
}
}
$games = $profilefield['value'];
and put it in functions_showthread.
and in the postbit_legacy template i added the variable $games of course.
the problem is, that it doesn't work.... :(
Can you please help me?
his id is: field8 and his type is Multiple-Selection-Checkbox.
now i wanted to display its value in the postbit_legacy,
so i went a bit through member.php and i came up with the following code:
$profilefields = $DB_site->query("
SELECT profilefieldid, required, title, type, data, def, height
FROM " . TABLE_PREFIX . "profilefield
WHERE form = 0 " . iif(!($permissions['genericpermissions'] & CANSEEHIDDENCUSTOMFIELDS), "
AND hidden = 0") . "
ORDER BY displayorder
");
while ($profilefield = $DB_site->fetch_array($profilefields))
{
exec_switch_bg();
if ($profilefield['type'] == 'checkbox')
{
$data = unserialize($profilefield['data']);
foreach ($data AS $key => $val)
{
if ($post["field8"] & pow(2, $key))
{
$profilefield['value'] .= iif($profilefield['value'], ', ') . $val;
}
}
}
}
$games = $profilefield['value'];
and put it in functions_showthread.
and in the postbit_legacy template i added the variable $games of course.
the problem is, that it doesn't work.... :(
Can you please help me?