Jump to content

Leaderboard

  1. GradientWizzard

    GradientWizzard

    Senior Moderator


    • Points

      1

    • Posts

      454


  2. Tony

    Tony

    Administrator


    • Points

      1

    • Posts

      5,256


  3. killshandra

    killshandra

    Blizzard


    • Points

      1

    • Posts

      347


  4. James

    James

    Administrator


    • Points

      1

    • Posts

      1,080


Popular Content

Showing content with the highest reputation on 03/31/2019 in all areas

  1. Version 2.0.6

    865 downloads

    updated for 4.4
    1 point
  2. I mixed up the topics and moved another one to archives and this one to help. Pmsl.
    1 point
  3. helpful IF codes In IPS4, logic checks are done using the special {{if}}, {{else}} and {{elseif}} tags. As with standard programming logic, if the expression results in true, the block of code within is executed. If it is false, it isn't (and if there's an else or elseif block, that is tested for a true result instead). So, a block of logic in a template might look like this: {{if member.member_id == 3}} <!-- If the member has ID 3, this will be shown --> {{elseif member.member_id == 9}} <!-- But if the member has ID 9, this will be shown instead --> {{else}} <!-- If the member isn't ID 3 or 9, then this will show --> {{endif}} If you need help constructing a logic check, feel free to check out the Customization Resources forum. Examples. I want to... Check if the user is logged in {{if member.member_id}} <!-- this will show if the member is logged in --> {{endif}} Check if the user isn't logged in {{if !member.member_id}} <!-- this will show if the user is a guest --> {{endif}} Check if the user's ID is one of x, y or z You can check as many values as you like; just add more numbers to the array. {{if in_array( member.member_id, array( 5, 28, 472 ) )}} <!-- Shows if the member's ID is 5, 28 or 472 --> {{endif}} Check if the user is in group x Where x is the group ID number. Note that this also checks secondary member groups. {{if member.inGroup('x')}} <!-- Shows if member is in group 'x' --> {{endif}} Check if the user has more than x posts In IPS4, all content in all apps counts as a 'post'. {{if member.member_posts > 3}} <!-- Shows if the member has more than 3 posts --> {{endif}} Check if the user has fewer than x posts In IPS4, all content in all apps counts as a 'post'. {{if member.member_posts < 3}} <!-- Shows if the member has fewer than 3 posts --> {{endif}} Check if the user is an administrator Note that this also checks if any of the user's secondary member groups has admin permissions. {{if member.isAdmin()}} <!-- Shows if the user is an administrator --> {{endif}} Check if the user is banned {{if member.isBanned()}} <!-- Shows if the user is banned --> {{endif}} Check if the current page is part of app x You need to check the application key. Most are obvious (e.g. forums is the forums app), but there are some others to be aware of. For custom/third-party apps, ask the author which app key they use. - core = Any system page that isn't part of another app, e.g. search, login/registration, profiles etc. - cms = Pages - nexus = Commerce {{if request.app == 'forums'}} <!-- Shows if the user is viewing any page in the 'forums' app --> {{endif}} Check if a system setting has value x You can check whether system settings have a given value, although you will need to know the setting key used by the backend. Values may not be simple to check, depending on their type - consult our Customization Resources forum if you aren't sure how to check a particular setting. {{if settings.auto_polling_enabled}} <!-- Shows if the 'auto_polling_enabled' setting is true (i.e. enabled) --> {{endif}} Check a variable in a template has value x Template bits in IPS4 may receive one or more variables from the backend code. You can check the values of these within the template to do something based on the value. This only works within the template into which the variable you are checking is passed - they are not inherited. {{if $myVariable == 'some_value'}} <!-- Shows if $myVariable is equal to 'some_value' --> {{endif}} Check if the current forum is forum ID x Within the forums app, you can check whether the current page is showing the forum with ID x {{if request.app == 'forums' && request.module == 'forums' && request.id == 3}} <!-- Shows if the user is in the forums app, viewing a forum with the ID 3 --> {{endif}} .
    1 point
  4. 86 downloads

    The requirements for running XF 2.0 have changed since XF 1.5. The recommended requirements are as follows: PHP: 5.4.0+ MySQL: 5.5+ PHP extensions: MySQLi, GD (with JPEG support), PCRE, SPL, SimpleXML, DOM, JSON, iconv, ctype, cURL
    1 point
  5. Version 1.0.0

    151 downloads

    I made these years ago when I used to use the member ranking system as levels instead. Even now with IPB 4.0 you can still do this and the levels(member ranks) will appear over a members avatar in post giving your theme has not modified its location. Useful for communities who are trying to promote more activity.
    1 point
  6. Version 1.0

    217 downloads

    [center]This pack is full of PSD (Photoshop Files), Avatars, Signatures, Logos and more! I hope some of you find this useful.[/center]
    1 point
  7. Version 4

    527 downloads

    Show a legend of your groups in Who's Online and Recently Browsing active users list, sorted in the order you specify and linked to the search system. Handy so that people know what those group prefixes and suffixes mean. FYI: Be sure you are running the latest version on the newer versions (4.3.x) of Invision Community. Also, if you end up with errors in the logs that seem to implicate GNI make sure you have EXIF installed - that's the root cause of the problem and the plugin is just getting caught in the crossfire. What's New in Version 4 Released February 2 4.4 Compatibility
    0 points
This leaderboard is set to New York/GMT-05:00
×
×
  • Create New...