1. REGISTRATION REQUIREMENTS:

    Your username here MUST MATCH your XenForo username (connected to your XF license).

    Once you have registered here, then you need to 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.

If Conditional help

Discussion in 'Showcase Support' started by Ludachris, Dec 1, 2017.

  1. Ludachris

    Ludachris Active Member AMS Premium CAS Premium RMS Premium SC Premium UBS Premium

    I want to add a conditional in front of the Create New Item button that checks to see if the user already has an Item created. Is there a "hasItems" tag for the user that I can use for that?
     
  2. Bob

    Bob Developer Staff Member

    The xf_user table has a field named 'showcase_count'. That field stores the number of Showcase Items that the user has (Visible, not Moderated or Soft Deleted).

    $visitor.showcase_count = the number of visible Showcase Items the viewing user has.

    btw, if your reasoning is to limit people to only creating x amount of items, there is a Showcase Permission for that named 'Max items can create (per user)'.
     
  3. Ludachris

    Ludachris Active Member AMS Premium CAS Premium RMS Premium SC Premium UBS Premium

    I'll give that a shot. The idea is to display the button to people who don't have items created. If they do the button won't display, or it will take up less real estate.
     
  4. Ludachris

    Ludachris Active Member AMS Premium CAS Premium RMS Premium SC Premium UBS Premium

    That worked, thanks Bob.
     
    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.