• This forum has been archived. New threads and replies may not be made. All add-ons/resources that are active should be migrated to the Resource Manager. See this thread for more information.

Hide contents of BBcode code, html and php to guest

You made a nice function in your add-on where the user is asked to login or register. Which code would we add to achive that?
 
You made a nice function in your add-on where the user is asked to login or register. Which code would we add to achive that?

To use it in templates?

To show the register link

Code:
<a href="{xen:link 'register/'}">Register.</a>

To show the log in link:

Code:
<a href="{xen:link 'login/'}">Login here</a>
 
Sorry for the hassle, would the code look like this then:

Code:
<xen:if is="{$isAwaitingEmailConfirmation}">
<a href="{xen:link 'register/'}">Register.</a>
<a href="{xen:link 'login/'}">Login here</a>
<xen:else />
<pre>{xen:raw $content}</pre><xen:comment><!-- content is escaped via parser --></xen:comment>
</xen:if>
 
I have just tested it with the code above with an unconfirmed account, it didn't work :(
 
HTML:
<xen:if is="{$visitor.user_state} == 'email_confirm'">Awaiting Email Confirmation</xen:if>
HTML:
<xen:if is="{$visitor.user_state} == 'email_confirm_edit'">Awaitin Email Confirmation (from edit)</xen:if>
HTML:
<xen:if is="{$visitor.user_state} == 'moderated'">Awaiting Approval</xen:if>
HTML:
<xen:if is="{$visitor.user_state} == 'valid'">Valid</xen:if>
HTML:
<xen:if is="{$visitor.user_state} != 'valid'">NOT Valid (awaitin confirm+awaiting confirm edit+awaiting approval)</xen:if>
 
Top Bottom