veenuisthebest
08-08-2008, 03:14 AM
I have some HTML stored in a variable in a custom vb page something like this:-
//My variable
$myvariable="<a href=page.php?do=deleteitem&uid=$row_id><img src=delete.png border=0 alt=Delete width=12 height=12></a>";
//my variable
I am simply putting that variable in a template and it works great.
Now, all I want is to restrict the above image link in the variable to be viewed only by a certain usergroup, but it isn't working. I am using this:-
//my variable with conditional
$myvariable="<if condition=is_member_of($vbulletin->userinfo, 6)><a href=page.php?do=deleteitem&uid=$row_id><img src=delete.png border=0 alt=Delete width=12 height=12></a></if>";
//my variable with conditional
1. The above doesn't work instead its showing up the condition in source.
2. Please note, this is the only way I need to achieve this. I do not want to put the link code in template directly. I need to use the variable from php page in the template.
3. I have omitted the double course in the conditional as it gives a syntax error.
Thank You
//My variable
$myvariable="<a href=page.php?do=deleteitem&uid=$row_id><img src=delete.png border=0 alt=Delete width=12 height=12></a>";
//my variable
I am simply putting that variable in a template and it works great.
Now, all I want is to restrict the above image link in the variable to be viewed only by a certain usergroup, but it isn't working. I am using this:-
//my variable with conditional
$myvariable="<if condition=is_member_of($vbulletin->userinfo, 6)><a href=page.php?do=deleteitem&uid=$row_id><img src=delete.png border=0 alt=Delete width=12 height=12></a></if>";
//my variable with conditional
1. The above doesn't work instead its showing up the condition in source.
2. Please note, this is the only way I need to achieve this. I do not want to put the link code in template directly. I need to use the variable from php page in the template.
3. I have omitted the double course in the conditional as it gives a syntax error.
Thank You