PDA

View Full Version : Is there a way...


Boofo
05-31-2002, 05:46 AM
Is there way to have the Admin Options link at the bottom of the profile page only show up for Admins and not show up for anyone else viewing the page?

Lesane
05-31-2002, 07:14 AM
Find in member.php:

eval("dooutput(\"".gettemplate("getinfo")."\");");

Add BEFORE it:

if($bbuserinfo[usergroupid]==6) {
eval("\$admin .= \"".gettemplate("getinfo_admin")."\";");
} else {
$admin="";
}

Open template getinfo and find:

<table cellpadding="2" cellspacing="0" border="0" width="{contenttablewidth}" {tableinvisibleextra} align="center">
<tr>
<td align="center"><smallfont><b>
Administrative Options: <a href="moderator.php?s=$session[sessionhash]&action=useroptions&userid=$userinfo[userid]">User Options</a>
</b></smallfont></td>
</tr>
</table>

And REPLACE it with:

$admin

Make a new template with the name: getinfo_admin

<table cellpadding="2" cellspacing="0" border="0" width="{contenttablewidth}" {tableinvisibleextra} align="center">
<tr>
<td align="center"><smallfont><b>
Administrative Options: <a href="moderator.php?s=$session[sessionhash]&action=useroptions&userid=$userinfo[userid]">User Options</a>
</b></smallfont></td>
</tr>
</table>

Done. :)

Boofo
05-31-2002, 07:55 AM
Works like a charm. Thank you, again. :)

Although no one could get into it, I just thought it didn't need to be there to non-Admins to tempt anyone. :)