PDA

View Full Version : Field viewable only by X usergroups.


Lautaro
10-31-2009, 02:28 AM
Hello,

I'm working on a modification and I've added a panel to edit a few options of it on the vBulletin Options.

Now, I have added the next on my product XML:


<phrasetype name="vBulletin Settings" fieldname="vbsettings">
<phrase name="setting_vbducpoptstitle_desc" date="0" username="VBDMPP" version="1.0"><![CDATA[description of the option here]]></phrase>
<phrase name="setting_vbducpoptstitle_title" date="0" username="VBDMPP" version="1.0"><![CDATA[Title of the option here]]></phrase>
<phrase name="settinggroup_vbdgroup" date="0" username="VBDMPP" version="1.0"><![CDATA[main title here]]></phrase>
</phrasetype>
<options>
<settinggroup name="vbdgroup" displayorder="1000">
<setting varname="vbducpoptstitle" displayorder="10">
<datatype>text</datatype>
<defaultvalue>0</defaultvalue>
</setting>
</settinggroup>
</options>


On that field I will write the usergroups allowed to see X content.
then add another field like that but with the id's of the users excluded from viewing that content.

What i need is the PHP condition for this. I have done another condition for a field where you have to select yes or no, but what I want here is a condition so the usergroups ID i write there ( separated by comas ) have access to view X content on a template.

Thanks !