Log in

View Full Version : how to enable script for usergroup only


snoop1979
12-20-2007, 06:16 PM
hi, i need to create some kind of IF for the postbit_attachment so that way only vip group can download attachments.
this is the code on the postbit_attachmentsf
<tr>
<td><img class="inlineimg" src="$stylevar[imgdir_attach]/$attachment[attachmentextension].gif" alt="<phrase 1="$attachment[attachmentextension]">$vbphrase[file_type_x]</phrase>" width="16" height="16" border="0" style="vertical-align:baseline" /></td>
<td><a href="attachment.php?$session[sessionurl]attachmentid=$attachment[attachmentid]&amp;d=$attachment"<if condition="$show['newwindow']"> target="_blank"</if>>$attachment[filename]</a> ($attachment[filesize]<if condition="$show['views']">, <phrase 1="$attachment[counter]">$vbphrase[x_views]</phrase></if>)</td>
</tr>
so i need to make this code workable for a specific groupid, how can i do this?

--------------- Added [DATE]1198187733 at 1198187733 ---------------

i found this
<if condition="$bbuserinfo[usergroupid] == 6">
works perfect but is there a way to make it multi usergroup? i hav tried put 6 7 10 or 6, 7, 10 and doesnt work

Opserty
12-21-2007, 08:19 AM
<if condition="is_member_of($bbuserinfo, 6, 7, 10)">
Display Code
</if>