In my product I check what number is in the field then I write an HTML conditional for the appropiate parts.
PHP Code:
//not logged in
if($dlink['view_link] == 1)
{
$custom_droplinks .= "<if condition='".$show['registerbutton']."'>
<tr><td class='vbmenu_option'>$img<a href='".$dlink['url']."' target='$new' title='".$dlink['alt']."'>".$dlink['name']</a></td></tr></if>";
}
//is logged in
elseif($dlink['view_link] == 2)
{
$custom_droplinks .= "<if condition='".$show['member']."'>
<tr><td class='vbmenu_option'>$img<a href='".$dlink['url']."' target='$new' title='".$dlink['alt']."'>".$dlink['name']</a></td></tr></if>";
}
//both
else
{
$custom_droplinks .= "
<tr><td class='vbmenu_option'>$img<a href='".$dlink['url']."' target='$new' title='".$dlink['alt']."'>".$dlink['name']</a></td></tr>";
}
The hook I'm using is "global_start"