Allan
Well-known member
Hide contents of BBcode code, html and php to guest
___________________________________
Replace by:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Replace by:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Replace by:
___________________________________
These changes in templates allow you to hide the contents of the bbcode code, html and php in yours messages and will encourage visitors to register to see them.
- In the "bb_code_tag_code" template, find:
Code:
<pre>{xen:raw $content}</pre><xen:comment><!-- content is escaped via parser --></xen:comment>
Replace by:
Code:
<xen:if is="!{$visitor.user_id}">
Sorry you need to <a href="{xen:link register}">register/login</a> to see this BBcode !
<xen:else />
<pre>{xen:raw $content}</pre><xen:comment><!-- content is escaped via parser --></xen:comment>
</xen:if>
- In the "bb_code_tag_html" template, find:
Code:
<pre>{xen:raw $content}</pre><xen:comment><!-- content is escaped via parser --></xen:comment>
Replace by:
Code:
<xen:if is="!{$visitor.user_id}">
Sorry you need to <a href="{xen:link register}">register/login</a> to see this BBcode !
<xen:else />
<pre>{xen:raw $content}</pre><xen:comment><!-- content is escaped via parser --></xen:comment>
</xen:if>
- In the "bb_code_tag_php" template, find:
Code:
<div class="code">{xen:raw $content}</div><xen:comment><!-- content is escaped via parser --></xen:comment>
Replace by:
Code:
<xen:if is="!{$visitor.user_id}">
Sorry you need to <a href="{xen:link register}">register/login</a> to see this BBcode !
<xen:else />
<div class="code">{xen:raw $content}</div><xen:comment><!-- content is escaped via parser --></xen:comment>
</xen:if>
Before
After