1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. Please donate today & help us with our growing server costs or buy premium for access to our premium products
    Dismiss Notice

Free Hide contents of BBcode code, html and php to guest

Discussion in 'Xenforo Template Mods & Extras' started by HAWK, Mar 21, 2016.

  1. HAWK

    HAWK Administrator Staff Member ADMIN

    Likes Received:
    593
    Trophy Points:
    113
    Gender:
    Male
    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>
     

Share This Page