1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Signature conditionals in template

Discussion in 'Styling and Customization Questions' started by Andy.N, Oct 11, 2011.

  1. Andy.N

    Andy.N Well-Known Member

    I have modified the message template to show the latest status instead of signature.
    PHP:
    <xen:if is="{$visitor.content_show_signature} && ({$message.signature} OR {$message.status})">
                <
    div class="baseHtml signature ugc{xen:if $message.isIgnored, ' ignored'}"><aside><xen:if is="{$message.status}">
                        <
    div>Latest status: {$message.status}</div>
                    </
    xen:if></aside></div>
            </
    xen:if>
    There is a small problem. If someone has a signature but no status, the message template will display the small horizontal blue line (I believe it comes from <div class="baseHtml signature).

    I'd like to wrap the conditionals around that as well so it will only show the line if there is a status.
     
    jadmperry likes this.
  2. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    Remove the red code:

    Code:
    <xen:if is="{$visitor.content_show_signature} && ({$message.signature} OR {$message.status})">
                <div class="baseHtml signature ugc{xen:if $message.isIgnored, ' ignored'}"><aside><xen:if is="{$message.status}">
                        <div>Latest status: {$message.status}</div>
                    </xen:if></aside></div>
            </xen:if>
    
    Resulting in this:

    Code:
    <xen:if is="{$visitor.content_show_signature} && {$message.status}">
                <div class="baseHtml signature ugc{xen:if $message.isIgnored, ' ignored'}"><aside><xen:if is="{$message.status}">
                        <div>Latest status: {$message.status}</div>
                    </xen:if></aside></div>
            </xen:if>
    
    That way it only displays the signature block if there is a user status.

    My posts in this thread might interest you if you wish to expand on your signature modification:

    http://xenforo.com/community/thread...us-in-own-signature-maybe-a-suggestion.13701/
     
    Andy.N likes this.
  3. Andy.N

    Andy.N Well-Known Member

Share This Page