PDA

View Full Version : Need a little help modifying a banner code...


okrogius
01-11-2002, 09:54 PM
Currently this is the code I have in my header.php file (non vb file)


if ($banners) {
include("banners.php");
$showbanners = "<a href=\"$nukeurl/banners.php?op=click&bid=$bid\" target=\"_blank\"><img src=\"$imageurl\" border=\"1\" alt=\"\"></a>";
}else{
$showbanners = "";
}


I'd like to modify the code in sucha way so if the page is being viewed by a member of user group 5, 6, or 13 then it would set $showbanners equal to show a certain vb template. If it's viewed by ANY other usergroup then keep the $showbanners variable as "<a href=\"$nukeurl/banners.php?op=click&bid=$bid\" target=\"_blank\"><img src=\"$imageurl\" border=\"1\" alt=\"\"></a>"

Any help would be greatly appreciated...

okrogius
01-11-2002, 10:50 PM
I've tried:


if ($banners) {
include("banners.php");
if ($bbuserinfo[usergroupid]=="5" or $bbuserinfo[usergroupid]=="6" or $bbuserinfo[usergroupid]=="13") {

eval("\$showbanners = \"".gettemplate("showbanners_none")."\";");
} else {
$showbanners = "<a href=\"$nukeurl/banners.php?op=click&bid=$bid\" target=\"_blank\"><img src=\"$imageurl\" border=\"1\" alt=\"\"></a>";
}
}else{
$showbanners = "";
}


Yet that doesn't work...

okrogius
01-11-2002, 10:53 PM
BTW this if the file I'm trying to modify...