I am editing a template with the following conditional structure:
HTML Code:
<vb:if condition="$show['dbtech_thanks_area']">
<vb:if condition="$show['dbtech_thanks_li']">
<li class="postbitlegacy postcontainer dbtech_thanks_container<vb:if condition="$post['userid'] == $bbuserinfo['userid']"> shown</vb:if>">
<vb:else />
<div<vb:if condition="!$show['dbtech_thanks_lineafter']"> class="signature dbtech_thanks_container<vb:if condition="$post['userid'] == $bbuserinfo['userid']"> shown</vb:if>"</vb:if> style="clear:both;">
</vb:if>
<vb:if condition="!$vboptions['dbtech_thanks_cloud_displaystyle']">
<div class="posthead">
<span class="postdate">Post Thanks<vb:if condition="$extrainfo"> - {vb:raw extrainfo}</vb:if></span>
</div>
</vb:if>
<div class="postdetails" id="dbtech_thanks_entries_{vb:var post.postid}">
{vb:raw entries}
</div>
<vb:if condition="$actions">
<div class="postfoot">
<div class="textcontrols">
<span class="postlinking">
{vb:raw actions}
</span>
</div>
</div>
</vb:if>
<vb:if condition="$show['dbtech_thanks_li']">
</li>
<vb:else />
</div>
<vb:if condition="$show['dbtech_thanks_lineafter']"><div class="signature"> </div></vb:if>
</vb:if>
</vb:if>
The template works correctly when viewed by a member who is logged in. However, when a guest views it, this condition gets ignored in both places:
HTML Code:
<vb:if condition="$post['userid'] == $bbuserinfo['userid']"> shown</vb:if>
The shown class is added no matter what condition I add around it. I have even tried changing the condition to
true === false. That condition is ignored when viewed by a guest. I tested that changes were working by adding {vb:raw} for the variables in the template. The values display correctly immediately after saving. The issue is isolated to the vbulletin condition statement.
Once again, it works properly when logged in, but not when viewing as a guest.
How can I resolve this?