<xen:foreach loop="$customFields" value="$field">
<xen:if is="{$field.isEditable}">
<xen:if is="{$field.field_id} != 'my_identifier' OR {xen:helper ismemberof, $visitor, 4}">
<xen:include template="custom_field_edit" />
</xen:if>
</xen:if>
</xen:foreach>
Admin CP -> Appearance -> Templates -> custom_fields_edit
Add the red code:
Rich (BB code):<xen:foreach loop="$customFields" value="$field"> <xen:if is="{$field.isEditable}"> <xen:if is="{$field.field_id} != 'my_identifier' OR {xen:helper ismemberof, $visitor, 4}"> <xen:include template="custom_field_edit" /> </xen:if> </xen:if> </xen:foreach>
You need to enter the field_id of the private field as well as the user_group_id of the privileged group.
<xen:if is="{$field.field_id} != 'pano' OR {xen:helper ismemberof, $visitor, 3, 17, 4}">
<xen:if is="{$field.isEditable}">
</xen:if>
Ok, here is the actual code I have:
I want to add another field beside 'pano', called 'YouTube'. Does anyone know how to add that in also?Code:<xen:if is="{$field.field_id} != 'pano' OR {xen:helper ismemberof, $visitor, 3, 17, 4}"> <xen:if is="{$field.isEditable}"> </xen:if>
<xen:if is="!in_array({$field.field_id}, array('pano', 'YouTube')) OR {xen:helper ismemberof, $visitor, 3, 17, 4}">
<xen:if is="{$field.isEditable}">
</xen:if>
Worked perfectly. Thank you so much. Now, say I continually add... just add in after 'YouTube', 'PSN')) etc, etc...?
Yes exactly.
<xen:if is="!in_array({$field.field_id}, array('pano', 'iPG')) OR {xen:helper ismemberof, $visitor, 3, 17, 4}">
<xen:if is="{$field.isEditable}">
</xen:if>
<xen:if is="{$field.field_id} != 'YouTube' OR {xen:helper ismemberof, $visitor, 3, 7, 17, 4}">
<xen:if is="{$field.isEditable}">
</xen:if>
Jake, one last thing... haha. Came across something else.
Code:<xen:if is="!in_array({$field.field_id}, array('pano', 'iPG')) OR {xen:helper ismemberof, $visitor, 3, 17, 4}"> <xen:if is="{$field.isEditable}"> </xen:if>
That above is my code.
Now, I want to add another, but have it set different. It would be like the first code:
Code:<xen:if is="{$field.field_id} != 'YouTube' OR {xen:helper ismemberof, $visitor, 3, 7, 17, 4}"> <xen:if is="{$field.isEditable}"> </xen:if>
The main thing is, the YouTube field can now be seen by one extra group, but I don't want that same group to see the fields 'pano' or 'iPG'.
Can I just add that code above the first one?
<xen:if is="!in_array({$field.field_id}, array('pano', 'iPG')) OR {xen:helper ismemberof, $visitor, 3, 17, 4} OR !{xen:helper ismemberof, $visitor, 7}">
<xen:if is="{$field.isEditable}">
</xen:if>
And that would allow group 7 access to YouTube profile field, but not the others?
It should but I have not tested it. Have you tried it?
I can, but I just didn't see where it is showing the YouTube to be accessible by group 7.
<xen:foreach loop="$customFields" value="$field">
<xen:if is="{$field.field_id} != 'YouTube' OR {xen:helper ismemberof, $visitor, 3, 7, 17, 4}">
</xen:if>
<xen:if is="!in_array({$field.field_id}, array('pano', 'mixpod', 'mixpodautoplay', 'mixpodplaylistlink', 'mixpodcolor1', 'mixpodcolor2', 'mixpodcolor3')) OR {xen:helper ismemberof, $visitor, 3, 17, 4}">
<xen:if is="{$field.isEditable}">
</xen:if>
<xen:include template="custom_field_edit" />
This part isn't ---> <xen:if is="{$field.field_id} != 'YouTube' OR {xen:helper ismemberof, $visitor, 3, 7, 17, 4}">
</xen:if>
You don't have anything between that if statement which is why nothing is showing. You have the <xen:if> then you close it.
We use essential cookies to make this site work, and optional cookies to enhance your experience.