1. REGISTRATION REQUIREMENTS:

    Register with your xenforo.com Username then start a conversation at xenforo.com w/Bob and provide the following:
    1. Your XenForo License Validation Token
    2. The Domain Name associated with the License
    NOTE: Your account will be validated once ALL requirements are verified/met. Thank you for your patience.

Conditional "is author"

Discussion in 'Showcase Support' started by bloh, Jun 22, 2014.

  1. bloh

    bloh New Member Showcase

    Is there any conditional " if user is author" for your addon?
     
  2. Bob

    Bob Developer Staff Member

    in what context? The item record contains the field "user_id" which is the author of the item. There are several case where there are checks to see whether the viewing user is the owner of the item (or items).

    I need you to give me a specific example of what you are trying to do in order to help.
     
  3. bloh

    bloh New Member Showcase

    I only wanted the author to leave comment, so I will add conditional statement to check whether the user is the author of the item, and show the comment box only if the user is the author.
     
  4. Bob

    Bob Developer Staff Member

    This will work for that...
    HTML:
    <xen:if is="{$item.user_id}  == {$visitor.user_id}">
     
  5. bloh

    bloh New Member Showcase

    Bob likes this.
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.