Oh no.Don't understand yet.
Is this in your add-on or a template, what is $value?
I would like to see not only the administrator group members userfield area was opened, and what can I do for it. this is the questionIn the value area, I think you are needing to place a "1", as that is the value (default) the administrator usergroup.
I think that is what you are asking...
<xen:if is="{$visitor.is_admin}">{$customFields.name}</xen:if>
2. Choose Nodes and Permissions, select which usergroups can use the field and in which nodes.
3. Then navigate to Node Tree -> Node in which field name is acitvated
4. Choose Custom Thread Fields tab and in Header Template HTML or Footer Template HTML, add the following
<xen:if is="{$visitor.is_admin}">
...
</xen:if>
<xen:if is="{$visitor.is_admin}">
{$user.customFields.field_id}
</xen:if>
The code did not work:This is what you have to do:
1. Create field, with a specific ID, eg name.
2. Choose Nodes and Permissions, select which usergroups can use the field and in which nodes.
3. Then navigate to Node Tree -> Node in which field name is acitvated
4. Choose Custom Thread Fields tab and in Header Template HTML or Footer Template HTML, add the following
Code:<xen:if is="{$visitor.is_admin}">{$customFields.name}</xen:if>
I don't follow this.
This is the correct condition to display something only for the admin:
Code:<xen:if is="{$visitor.is_admin}"> ... </xen:if>
Then the question becomes, where do you want to display the custom field? In posts? In profiles? For example, edit this template to make the field show in posts:
Admin CP -> Appearance -> Templates -> message_user_info
You can use this code:
Rich (BB code):<xen:if is="{$visitor.is_admin}"> {$user.customFields.field_id} </xen:if>
This can be, I would uploadOh damn. I was thinking for this addon: http://xenforo.com/community/resources/custom-fields-by-waindigo.885/
No, this is not. For these topics,Oh damn. I was thinking for this addon: http://xenforo.com/community/resources/custom-fields-by-waindigo.885/
I'm writing code to the right place that you wonder if you?
View attachment 32481
The code did not work:
View attachment 32480
<xen:if hascontent="true">
<div class="section">
<h3 class="textHeading">{xen:phrase about}</h3>
<div class="secondaryContent">
<xen:contentcheck>
<xen:if hascontent="true">
<div class="pairsColumns aboutPairs">
<xen:contentcheck>
<xen:if is="{$user.gender}">
<dl><dt>{xen:phrase gender}:</dt> <dd><xen:if is="{$user.gender} == 'male'">{xen:phrase male}<xen:else />{xen:phrase female}</xen:if></dd></dl>
</xen:if>
<xen:if is="{$birthday}">
<dl><dt>{xen:phrase birthday}:</dt> <dd>{xen:date $birthday.timeStamp, $birthday.format} <xen:if is="{$birthday.age}">({xen:phrase age}: {xen:number $birthday.age})</xen:if></dd></dl>
</xen:if>
<xen:if is="{$user.homepage}">
<dl><dt>{xen:phrase home_page}:</dt> <dd><a href="{xen:string censor, $user.homepage, 'x'}" rel="nofollow" target="_blank">{xen:string censor, $user.homepage}</a></dd></dl>
</xen:if>
<xen:if is="{$user.location}">
<dl><dt>{xen:phrase location}:</dt> <dd>{xen:string censor, $user.location}</dd></dl>
</xen:if>
<xen:if is="{$user.occupation}">
<dl><dt>{xen:phrase occupation}:</dt> <dd>{xen:string censor, $user.occupation}</dd></dl>
</xen:if>
<xen:if is="{$customFieldsGrouped.personal}">
<xen:foreach loop="$customFieldsGrouped.personal" value="$field">
<xen:if is="{$field.field_id} != 'field_id of restricted field' OR {$visitor.is_admin}">
<xen:include template="custom_field_view" />
</xen:if>
</xen:foreach>
</xen:if>
</xen:contentcheck>
</div>
</xen:if>
<xen:if is="{$user.about}"><div class="baseHtml ugc">{xen:raw $user.aboutHtml}</div></xen:if>
</xen:contentcheck>
</div>
</div>
</xen:if>
We use essential cookies to make this site work, and optional cookies to enhance your experience.