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

Documentation

In this article..

In this article..

    Using Constants

    About the File

    Classic Self-Hosted Only

    The constants.php file is only relevant to classic self-hosted installations of Invision Community and should be modified with caution. It is intended for specific configuration changes as directed by official guidance, and altering it outside of those instructions can lead to unexpected behaviour or site issues.

    As this involves direct changes to your application environment, you should ensure a backup is in place and consult your hosting provider or server administrator if you are unsure.

    Throughout the self-hosted guides for Invision Community, you may see references to a file named constants.php.

    This is an optional configuration file that can be created within the root directory of your Suite. This is an advanced option, in which is not actively supported.

    You will see references to "constants.php" throughout our guides. The constants.php is a special file you an optionally create in the root directory of your Suite which can include special commands and configuration options which alter the normal behavior of the Suite.

    File Format

    You would create a file in the root directory of your Suite, the same directory where index.php and init.php are located, called constants.php. In that file you would simply enter:

    <?php
    \define('THE_CONSTANT_YOU_ARE_ADDING','ValueOfConstantHere');

    Then below that line any special commands referenced throughout our guides or via instructions in the AdminCP. Many functions are available and common settings include caching controls, debug tools, and special overrides based on your server environment.

    Most people do not ever need to worry about constants.php until you find a special circumstance.

    Common Constants

    While this list is not a full list of constants within the system, these are some of the most common ones you will find in use

    WARNING: Changing any of these values without full knowledge of what you are doing can result in system issues. Please do not add constants without this knowledge.

    • Constant - CP_DIRECTORY
      Use - Name of your admin CP directory when changed from the default of 'admin'
      Example value - 'newcpdirectory'
       

    • Constant - IN_DEV
      Use - Places the system into developer mode (dev tools must be present)
      Example value - TRUE
       

    • Constant - IPS_FOLDER_PERMISSION
      Use - Default permission folders will be set to for writable folders
      Example value - 0777
       

    • Constant - FOLDER_PERMISSION_NO_WRITE
      Use - Default permission folders will be set to for non-writable folders
      Example value - 0755
       

    • Constant - IPS_FILE_PERMISSION
      Use - Default permission files will be set to
      Example value - 0666
       

    • Constant - FILE_PERMISSION_NO_WRITE
      Use - Default permission files will be set to for non-writable files
      Example value - 0644
       

    • Constant - COOKIE_PREFIX
      Use - Prefix to add to any cookie. Helpful if you have cookies of the same name for other uses
      Example value - 'ips4_'
       

    • Constant - UPGRADE_MANUAL_THRESHOLD
      Use - Row count in a table before manual query prompt will occur. Do not change unless you are 100% sure your server will run above this in all queries.
      Example value - 250000
       

    • Constant - UPGRADE_LARGE_TABLE_SIZE
      Use - Size of table before manual query prompt will occur. Do not change unless you are 100% sure your server will run above this in all queries.
      Example value - 100000000
       

    • Constant - USE_DEVELOPMENT_BUILDS
      Use - Adding a true value to this will allow the automatic upgrader to pick up public alpha and beta releases.
      Example value - TRUE
       

    • Constant - TEMP_DIRECTORY
      Use - Temp directory to use. By default this will use your servers set temp directory
      Example value - '/some/full/path/'
       

    • Constant - BYPASS_ACP_IP_CHECK
      Use - Removes the check of IP from your ACP
      Example value - TRUE
       

    • Constant - RECOVERY_MODE
      Use - Used for recovery of the system when failure occurs in 3rd party items, preventing ACP access
      Example value - TRUE
       

    • Constant - DISABLE_MFA
      Use - Disabled two factor authentication on the system.
      Example value - TRUE
       

    • Constant - REBUILD_SLOW
      Use - Number of items to be rebuilt per-cycle for routines that take a while (change only if you are 100% sure your system will cope)
      Example value - 50
       

    • Constant - REBUILD_NORMAL
      Use - Number of items to be rebuilt per-cycle for most routines (change only if you are 100% sure your system will cope)
      Example value - 250
       

    • Constant - REBUILD_QUICK
      Use - Number of items to be rebuilt per-cycle for routines that are fast (change only if you are 100% sure your system will cope)
      Example value - 500
       

    • Constant - UPGRADING_PAGE
      Use - Allows you to use an alternative page to the usual upgrading.html page, which is shown when an upgrade is in progress
      Example value -  '/some/full/path/something.html'

    User Feedback

    Recommended Comments

    There are no comments to display.

    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.