PDA

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


okrogius
11 Jan 2002, 23:54
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
12 Jan 2002, 00:50
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
12 Jan 2002, 00:53
BTW this if the file I'm trying to modify...