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

XF 1.1 Exclude button access to specific group

Discussion in 'Styling and Customization Questions' started by kankan, Oct 9, 2013.

  1. kankan

    kankan Active Member

    Hello,

    In a DIV block, i would like to make this button appears to all group except visitors :

    Code:
    <a class="button primary MenuCloser" href="http://www.forum-des-portables-asus.fr/www/quotes/create-quote"> Ajouter une citation </a></center>
        </div>
    I have modified in this way :

    Code:
    <xen:if is="!{xen:helper ismemberof, $visitor, 1}"><a class="button primary MenuCloser" href="http://www.forum-des-portables-asus.fr/www/quotes/create-quote"> Ajouter une citation </a></center>
      </xen:if>
    But when reloading page i have this error :

    All code is the following :

    Code:
    <xen:require css="xenquote_sidebar_random_quote.css" />
    
    <xen:if is="{$quote}">
        <div class="randomQuotation">
            <span class="quotation">
                {xen:raw $quote.renderedQuotation}
            </span><br>
            <!--<div class="attribution"><br>
                {xen:raw $quote.renderedAttribution} <span class="muted">(<a href="{xen:link 'canonical:quotes/', $quote}" rel="canonical" class="dimmed">#{$quote.quote_id}</a>)</span>
            </div>--><br>
            <div class="footnote">
                {xen:phrase xenquote_added_this_quotation} <xen:username user="$quote.author" />  <xen:if is="{$quote.quote_date} > 0"><xen:datetime time="$quote.quote_date" /><br><a href="http://www.forum-des-portables-asus.fr/www/quotes/">Afficher toutes les citations</a></xen:if>
            </div><center><br>
    <xen:if is="!{xen:helper ismemberof, $visitor, 1}"><a class="button primary MenuCloser" href="http://www.forum-des-portables-asus.fr/www/quotes/create-quote"> Ajouter une citation </a></center>
        </xen:if></div>
    <xen:else />
        {xen:phrase xenquote_there_are_no_quotations_to_display}
    </xen:if>
    Thank you
     
  2. Brogan

    Brogan XenForo Moderator Staff Member

    Just use this to block it from those who aren't logged in:
    Code:
    <xen:if is="{$visitor.user_id}">
    This content will show to logged in members
    </xen:if>
     
    kankan likes this.
  3. kankan

    kankan Active Member

    Thank you
     

Share This Page