Jump to content
View in the app

A better way to browse. Learn more.

Invision Community

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Using expressions in logic

As mentioned in the first step, any valid PHP expression can be used in HTML logic tags. You'll often just be checking if an expression is true or false:

{{if $value}} ... {{endif}}

...but there are many other possibilities.

You can also use normal PHP functions in your expressions. For example, you may need to determine if an array has any items, so PHP's count function is appropriate:

{{if count( $items ) > 0}} ... {{endif}}

Consult the full PHP documentation for the functions and language syntax.

 

Getting values from IPS4

You'll often need to compare values in the software in your expressions. For example, is a particular setting enabled, or does the current user have a member ID.

While you can use the standard PHP approach to get these values, IPS4 contains a number of shortcut 'constants' you can use to simplify your logic. They are used like so:

{{if settings.reputation_enabled}} ... {{endif}}

Behind the scenes, this shortcut gets expanded to the PHP equivalent, meaning it gives you access to all of the available methods and properties of the object it translates to.

The available shortcuts are:

 

request
Translates to \IPS\Request::i().
Access to the request variables. e.g.

{{if request.some_param}}

 

member
Translates to \IPS\Member::loggedIn()
The member object for the current user. e.g.

{{if member.language()->isrtl}}

 

settings
Translates to \IPS\Settings::i().
Obtains system setting values (by setting key). e.g.

{{if settings.auto_polling_enabled}}

 

output
Translates to \IPS\Output::i().
The output object, containing the methods/properties the suite uses to output content. e.g.

{{if count( output.contextualSearchOptions )}}

 

theme
Translates to \IPS\Theme::i()->settings.
Access to the theme settings available for the currently-used theme. e.g.

{{if theme.sidebar_position == 'right'}}

 

cookie
Translates to \IPS\\Request::i()->cookie.
Access to the cookie object. e.g.

{{if isset( cookie.hasJS )}}

 

Consult the PHP framework documentation for the full range of properties and methods available for each class. 

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.