Jump to content

Welcome to Fundayforum. Please register your ID or get login for more access and fun.

Signup  Or  Login

house fdf.png


Captain Marvel Movie 2019

IMDb - 6.3/10 Rotten Tomatoes Description: Captain Marvel gets caught in the middle of a galactic war between two alien races. Initial release: March 8, 2019 (USA) Directors: Anna Boden, Ryan Fleck Budget: 152 million USD Music composed by: Pinar Toprak Screenplay: Anna Boden, Ryan Fleck, Nicole Perlman, Geneva Robertson-Dworet, Meg LeFauve, Liz Flahive, Carly Mensch
Watch and Download

Alita - Battle Angel 2019

IMDb: 7.6/10 Genre : Action, Science Fiction, Thriller, Romance Director : Robert Rodriguez Stars : Rosa Salazar, Christoph Waltz, Ed Skrein, Mahershala Ali, Jennifer Connelly LANGUAGE: Hindi (Cleaned) – English Quality: 720p HD-Camrip PLOT: Six strangers find themselves in a maze of deadly mystery rooms, and must use their wits to survive.
Watch and Download

Rate this topic

Recommended Posts

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 -->
    <!-- If the member isn't ID 3 or 9, then this will show -->

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 -->


Check if the user isn't logged in

{{if !member.member_id}}
    <!-- this will show if the user is a guest -->


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 -->


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' -->


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 -->


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 -->


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 -->


Check if the user is banned

{{if member.isBanned()}}
    <!-- Shows if the user is banned -->


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 -->


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) -->


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' -->


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 -->


  • Like 1

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Forum Statistics

    Total Topics
    Total Posts