Common concepts

Some concepts and principles are used throughout the XenForo system, so having an understanding of some of these will save you some head-scratching later.

Display order

Display order is a concept widely used in XenForo.

It allows items to be set in an order relative to one another that is quickly and easily changed.

The system is based on each item having a display order value, which is an arbitrary whole number. Items with higher numbers are displayed after items with lower numbers, as shown in this example, where the item's display order is shown in parentheses:

  • Blue (5)
  • Purple (7)
  • Red (29)
  • Green (1578)

Display order applies only to items with the same (or no) parent item. If an item is a child of another item, it will only be affected by the display order of its sibling children, and not by the display order values of its parent, or children of another parent.

Here's another example showing this, with a list of parent items, each of which have their own child items. Again, the display order value is shown in parentheses:

  • Colors (1000)
    • Blue (5)
    • Purple (7)
    • Red (29)
    • Green (1578)
  • Animals (2000)
    • Badger (100)
    • Hedgehog (101)
    • Otter (102)
  • Fast food (10000)
    • Hamburger (30)
    • Hot dog (50)
    • Fried chicken (75)

In this example, the top-level items (Colors, Animals and Fast food) are ordered by display order values of 1000, 2000 and 10000. These are entirely independent of the values of their child items, which relate only to their own siblings. The color codings help to illustrate the relative display order values.

Criteria

Multiple systems in XenForo allow you to apply criteria to whether or not an item is visible or available.

These criteria can also be used to fine-tune searching processes.

The uses of criteria are many, but you will most likely use them when searching the control panel for users, or defining when Notices should be displayed.

Data fields containing text will be searched using any text entered into corresponding text boxes, so entering jo into a 'username' text box would return users named Jo, John, Joanne, Bjorn and Marjory.

When searching a numeric field, options are provided to specify a minimum and or maximum value for a particular data field, and to select all users that match the given parameters.

For example, to find all users who have posted at least one message, enter 1 into the first Message count between box, and -1 into the second (to specify no maximum).

Note

Fields left empty, or with their noted default value, will not be searched.

User criteria

These criteria draw from information about a user, and include things like being a member of a certain user group, or having a user name containing specific text.

Many of these criteria are of the form 'User has something', and are frequently paired with the opposite 'User does not have something'.

User search criteria are used across the system, including:

  • Users > Search for users
  • Users > Member statistics
  • Communication > Notices
  • Communication > Contact users

User field criteria

Similar to user criteria, these options refer to custom user fields that have been defined by the site administrator.

The criteria options will be appropriate for each type of user field that has been defined, so for example, if the user field contains text, the criteria option will be Field contains text whereas in cases where a user field is a multiple-choice option, the criteria would allow you to specify one or more of the available options.

Page criteria

Page criteria are more about the current environment, such as the current time and date, or the area of the site within which a user is browsing.

It also contains a very useful criteria which can determine whether or not a user arrived at your site from a search engine.

Filtering

Almost all data lists within the admin control panel include a Filter gadget.

Typing a text snippet into the filter box will instantly filter the list of items to show only those whose titles or descriptions contain the text in your filter.

You may additionally select the Prefix option, which will limit the results to those items whose titles or descriptions start with the text in the filter.

Finally, there is a cancel control, which will clear the filter text and reset the prefix option, returning your list to its unfiltered state.

Cron

Named after the UNIX utility, which was in turn named after the Greek god of time Chronos, cron is a system for scheduling automated tasks.

A variety of scheduled tasks or jobs are listed in the Tools > Cron entries section of the Admin control panel, each of which perform important tasks related to system housekeeping, clean-up, periodic updates etc.

Job run trigger

Normally, cron tasks are run automatically in an asynchronous fashion when triggered by a XenForo page being loaded by one of your site visitors. Occasionally however, in specific rare circumstances, this will not be sufficient and it will be necessary to have your server execute the job trigger at a specific time.

To do this, edit the Setup > Options > System and performance > Job run trigger option from the Admin control panel and set it to Server based trigger.

It will then be necessary to instruct your server to run the CLI command php cmd.php xf:run-jobs from within your XenForo installation directory on a regular basis using its own scheduled task manager.

Warning

Changing the job run trigger is an advanced operation and will not be necessary for the vast majority of XenForo installations.

In the event that you opt for Server based trigger but fail to add the necessary configuration to crontab, cron.d, system.d or some other suitable task scheduler, cron tasks will not run on your XenForo installation and unexpected outcomes may occur.

About configurable job run trigger | crontab guru