For instance, in gallery image view, I want the argument
if($row4['value'] == 'specific global')
echo'Something';
Here's the code for custom fields.
// Check to show custom fields
if ($context['gallery_USER_ID_CAT'] == 0)
{
// Show Custom Fields
$result = db_query("
SELECT
f.title, d.value
FROM ({$db_prefix}gallery_custom_field as f,{$db_prefix}gallery_custom_field_data as d)
WHERE d.ID_CUSTOM = f.ID_CUSTOM AND d.ID_PICTURE = " . $context['gallery_pic']['ID_PICTURE'] . " ORDER BY f.roworder desc", __FILE__, __LINE__);
while ($row4 = mysql_fetch_assoc($result))
{
// No reason to show empty custom fields on the display page
if ($row4['value'] != '')
echo $row4['title'], ': ',$row4['value'], '<br />';
}
mysql_free_result($result);
}