PDA

View Full Version : Administrator conditional help.


Jinovich
12-09-2008, 02:44 PM
I have a variable which would be this,

$parse_link_results_add = '\n
<fieldset class=\"fieldset\">
<legend>$vbphrase[parse_link_legend]</legend>
<div>$vbphrase[hidden_results_legend_info]</div>
</fieldset>
';

This would be for modifying a template and is only a small abstract of code, I want to hide the fieldset so that only admin can view it.

I tried <if condition=\"is_member_of($bbuserinfo, 6)\"> </if> but for some reason that didnt work.

I then tried something simpler <if condition="$show['admincplink']"> but that gives me a T_string error.


So I have no idea how I can hide this fieldset from all users but admins

SEOvB
12-09-2008, 02:58 PM
if ($show[admin]){
$parse_link_results_add = '\n
<fieldset class=\"fieldset\">
<legend>$vbphrase[parse_link_legend]</legend>
<div>$vbphrase[hidden_results_legend_info]</div>
</fieldset>
'; }


have you tried that, the $show[admin] part probab'y isn't the right variable your looking for though :D

Jinovich
12-09-2008, 05:20 PM
That didnt work, instead it hides the whole thing from me.

Edt: Sorry didnt read your last part.

Lynne
12-09-2008, 05:28 PM
That didnt work, instead it hides the whole thing from me.

the $show[admin] part probab'y isn't the right variable your looking for though :D
You should try something else like is_member_of

Jinovich
12-09-2008, 07:36 PM
Thanks Lynne and FRDS.

Finally managed to get that script sorted out couldnt have done it without you.