PDA

View Full Version : Help with adding and removing a button hack...


ranger2kxlt
01-13-2003, 07:37 PM
Need some quick help on this guys. Ive got the html coding part done, i just need to know where to insert the code to get it to work right.

if ($bbuserinfo[usergroupid]==6) {
$adminonly='<a href=\"http://www.thunderbirdnest.com/vb/admin\"><img src=\"http://www.thunderbirdnest.com/vb/images/admin.gif\"</a>';
}

if ($bbuserinfo[usergroupid]==1) {
$register='<a href=\"http://www.thunderbirdnest.com/vb/register.php?action=signup"><img src=\"http://www.thunderbirdnest.com/vb/images/top_register.gif\"</a>';
} else {
$register='';
}

Then i have $register and $adminonly in the header template where i need them displayed....


Anyways what the above does is take away the registration button for people that are already registered or banned, and it also displays the admin button on the top allowing only admins to view it.

I have tried adding this to index.php but i get nothing... it doesnt even look like index.php calls the header template. Anyone know where i can insert this to get it to work?

ranger2kxlt
01-16-2003, 03:25 PM
no one is able to help me with this? can it be done at all? Thanks.

Boofo
01-16-2003, 03:27 PM
Why don't you try Logicians's Dynamic Templates hack and you can do it in the templates instead of doing it in the php from now on?