We've decided to drop the functionality we wanted, but here's an example:
Create a couple of single-line textbox userfields, IDs 59 and 60.
Modify memberinfo_profilefield, adding vb:if condition to userfield 60:
PHP Code:
<vb:if condition="$show['profilefield_edit']">
<dl>
<dt id="profilefield_title_{vb:raw profilefield.profilefieldid}" class="aboutme_left">{vb:raw profilefield.title}</dt>
<dd id="profilefield_value_{vb:raw profilefield.profilefieldid}" class="aboutme_right">
<vb:if condition="$profilefield[profilefieldid] == 60">
XXX: {vb:raw profilefield.value}
<vb:else />
{vb:raw profilefield.value}
</vb:if>
<script type="text/javascript">
<!--
vBulletin.register_control("vB_ProfilefieldEditor", "{vb:raw profilefield.profilefieldid}");
//-->
</script>
</dd>
<vb:else />
<dl class="stats agerow">
<dt>{vb:raw profilefield.title}</dt>
<vb:if condition="$profilefield[profilefieldid] == 60">
<dd>XXX: {vb:raw profilefield.value}</dd>
<vb:else />
<dd>{vb:raw profilefield.value}</dd>
</vb:if>
</vb:if>
</dl>
Attachments 1-5 shows editing UPF 59 and 60, after 60 is edited the XXX isn't shown but when the page is refreshed, the XXX shows again.
Inspect element of UPF 60 on display:
HTML Code:
<dd id="profilefield_value_60" class="aboutme_right">
XXX: N/A
<script type="text/javascript">
<!--
vBulletin.register_control("vB_ProfilefieldEditor", "60");
//-->
</script>
</dd>
Inspect element of UPF 60 after edit:
HTML Code:
<dd id="profilefield_value_60" class="aboutme_right">Edited 60</dd>
Inspect element of UPF 60 after refresh:
HTML Code:
<dd id="profilefield_value_60" class="aboutme_right">
XXX: Edited 60
<script type="text/javascript">
<!--
vBulletin.register_control("vB_ProfilefieldEditor", "60");
//-->
</script>
</dd>
It looks like VB reverts to a standard field display template after Ajax edit, ignoring the modified template.