Chris D XenForo developer Staff member Jun 14, 2013 #21 $content should be $contents (You missed the S off the end)
M Matthew Hawley Well-known member Jun 14, 2013 #22 Okay I did that and it still doesn't show, but I know why. This is the code you gave me: Code: <xen:if is="{$hasPosted}"> <label><a href="{xen:link search/search, '', 'type=post', 'thread_id={$thread.thread_id}', 'users={$visitor.username}'}">Your Posts</a></label> <xen:else /> </xen:if> It only shows If I remove the parts of the code you gave me.
Okay I did that and it still doesn't show, but I know why. This is the code you gave me: Code: <xen:if is="{$hasPosted}"> <label><a href="{xen:link search/search, '', 'type=post', 'thread_id={$thread.thread_id}', 'users={$visitor.username}'}">Your Posts</a></label> <xen:else /> </xen:if> It only shows If I remove the parts of the code you gave me.
M Matthew Hawley Well-known member Jun 14, 2013 #24 Okay now it's this. Code: <xen:if is="{$post.user_id} == {$visitor.user_id}"> <xen:if is="{$hasPosted}"> <li><a href="{xen:link search/search, '', 'type=post', 'thread_id={$thread.thread_id}', 'users={$visitor.username}'}">Your Posts</a></li> <xen:else /> </xen:if> </xen:if> And it still doesn't show
Okay now it's this. Code: <xen:if is="{$post.user_id} == {$visitor.user_id}"> <xen:if is="{$hasPosted}"> <li><a href="{xen:link search/search, '', 'type=post', 'thread_id={$thread.thread_id}', 'users={$visitor.username}'}">Your Posts</a></li> <xen:else /> </xen:if> </xen:if> And it still doesn't show
M Matthew Hawley Well-known member Jun 14, 2013 #26 Could you give me the straightforward code I need to put into the template?
Chris D XenForo developer Staff member Jun 14, 2013 #27 HTML: <xen:foreach loop="$posts" value="$post"> <xen:if is="{$post.user_id} == {$visitor.user_id}"> <xen:set var="$hasPosted">1</xen:set> </xen:if> </xen:foreach> Then you can use: HTML: <xen:if is="{$hasPosted}"> <li><a href="{xen:link search/search, '', 'type=post', 'thread_id={$thread.thread_id}', 'users={$visitor.username}'}">Your Posts</a></li> </xen:if>
HTML: <xen:foreach loop="$posts" value="$post"> <xen:if is="{$post.user_id} == {$visitor.user_id}"> <xen:set var="$hasPosted">1</xen:set> </xen:if> </xen:foreach> Then you can use: HTML: <xen:if is="{$hasPosted}"> <li><a href="{xen:link search/search, '', 'type=post', 'thread_id={$thread.thread_id}', 'users={$visitor.username}'}">Your Posts</a></li> </xen:if>
M Matthew Hawley Well-known member Jun 14, 2013 #28 thanks! is there a tutorial on how to set up permissions?