Options

XenForo includes a wide range of options to allow you to configure your forum to fit your needs.

Most of these options are straightforward, so they are not detailed here. Specific information about more complex options can be found below.

The options system

The main XenForo options system can be found in the Home section of the admin control panel, under Options.

Closing the forums

One of the most important options controls whether or not the forums are open to visitors.

The Board is Active option in the Board Active option group toggles this.

When the board is not active, all visitors apart from those administrators with admin control panel access will be shown the message you enter in the Inactive Board Message box.

Visitors will not be able to view or post any content while the board is not active, so don't forget to reactivate the board once you've finished doing whatever necessitated their closure!

It's usually a good idea to close the forums for essential maintenance operations, like running XenForo upgrades, importing data and installing large or complex add-ons.

Censoring

Site administrators will commonly want to censor certain words or phrases so they do not appear on their sites when posted by visting users.

XenForo has a comprehensive system for censoring content in this way, which is accessed through the Censoring section of the main XenForo options system.

To censor a word or a word fragment, enter your term in an empty Words to Censor box. You may use a * wildcard character to match any text:

  • dog matches dog only
  • dog* matches dog, dogs and dogmatic etc.
  • d*g matches dog and dug etc.
  • d*g* matches dog, dug, dogs, dogmatic and duggery etc.

Note

The censor words are not case-sensitive, so any combination of DoG, dOG, doG etc. will match dog.

Each censor word will normally be replaced by a repeating string of the Censor Character, which is an asterisk * by default. A three-letter censored word will be replaced with three asterisks ***, while dogmatic, having been matched by dog* will be replaced with eight asterisks ********.

Special replacements

Alternatively, each censor word can have a replacement word, so you could have dog replaced with canine by entering the replacement word into the Replacement box next to dog.

CAPTCHA

Included within XenForo is a bespoke CAPTCHA system which can be used as an additional spam prevention measure.

If enabled, it requires questions to be answered correctly for new registrations and, if allowed, guests posting messages. This helps to prevent robots from registering and creating content.

Selecting a CAPTCHA type

XenForo includes support for reCAPTCHA and custom CAPTCHA questions. You may select your CAPTCHA type from the options:

  1. Log in to the admin control panel.
  2. Select Options.
  3. Select Basic Board Information.
  4. Choose the Enable CAPTCHA for Guests option and select your CAPTCHA type.

Creating custom questions and answers

  1. Log into the admin control panel.
  2. Select the Tools section.
  3. Click on Question and Answer from the list under the CAPTCHA section.

Once at the main screen, click on the Add New Question button.

Note

It is imperative that you do not make the list of questions and answers public, as that will compromise the integrity of the system.

Questions can be created with as many answers as you wish, any one of which will be accepted as the correct response.

Visiting users who need to complete a CAPTCHA will be presented with a random item from the list of active questions.

Email

Immediately after installation, XenForo will be able to send email on most servers using PHP's default mailing settings. However, if you wish to control more aspects of the mail sent by XenForo, log into your admin control panel, go to Options and into the Email Options group.

Transport configuration

The Email Transport Method controls the approach to sending mail. The two methods supported by XenForo are:

  • Default – This uses the default configuration of PHP to send email. In general, this is the preferred option as it offloads the actual act of sending the mail to a dedicated program on the server, giving you better performance. It is recommended that you enable the Set return path with -f parameter if possible, as this can reduce the likelihood of your mails being seen as spam.
  • SMTP – This uses an outside server to send emails. In some situations, this can reduce the likelihood of your mails been seen as spam. While this option does give you a lot of flexibility when sending email, sending emails with this method will be slower than in the default method. This is because each mail is sent by XenForo, rather than handing it off to a dedicated program.

Additional options

There are several additional email options that you should consider setting.

  • Default Email Address – Most emails sent from your XenForo installation appear to be sent by this account. This must be a valid email address. Note: This needs the Set return path with -f parameter or SMTP options to be enabled.
  • Bounced Email Address – When an email cannot be delivered, a message indicating this will be sent to the address you specify here. If you don't specify anything, it will go to your Default Email Address.
  • Default Email Sender Name – Normally emails sent via XenForo will have a sender name of your Board Title. This option can override that with a more reasonable name.

Friendly URLs

Friendly URLs (also called SEO URLs) are web page addresses that are more readable and convenient for humans. Without friendly URLs enabled, a thread may have a URL like this:

http://www.example.com/index.php?threads/thread-title-here.12345/

With friendly URLs enabled, that URL would become:

http://www.example.com/threads/thread-title-here.12345/

Note that to enable friendly URLs, configuration of the web server may be required. This is discussed below.

Configuring friendly URLs

By default, XenForo does not enable friendly URLs due to the web server configuration requirements. To enable friendly URLs, log in to your admin control panel, and go to Options and then Search Engine Optimization (SEO). There are several options here which you may wish to configure:

  • Use Full Friendly URLs - Enabling this will change the structure of the URLs as mentioned at the beginning of this section. The requirements for this vary based on your web server and are discussed below.
  • Include Content Title in URLs - Disabling this option will make your URLs much shorter, but less friendly to humans as no keywords will be included in them. For example, with this option disabled, the example URL at the beginning of this section would become: http://www.example.com/threads/12345/

Note

If you enable friendly URLs but your web server can’t support them, your admin control panel will still be accessible.

Friendly URL web server requirements and setup

Enabling the Use Full Friendly URLs option requires some web server configuration or additional files. Find your web server software in the list below for more details.

Apache

Apache is the most common web server available. If you are unsure what web server you are running, it is likely Apache. Therefore, XenForo includes the necessary configuration file in the root directory.

If after uploading XenForo, you do not see an .htaccess file in your XenForo root directory, rename htaccess.txt to .htaccess (be sure to include the . prefix). You should now be able to enable friendly URLs. If, after enabling friendly URLs your XenForo installation does not function correctly, please contact your host to confirm that they have mod_rewrite installed and allow overrides via an .htaccess file.

LiteSpeed web server

LiteSpeed Web Server reads and uses Apache configurations (including .htaccess files) and will work using the above Apache documentation.

IIS 7

To enable friendly URLs in IIS 7, put the following code into a web.config file in your XenForo root directory:

<?xml version="1.0" encoding="UTF-8"?>
<configuration>
    <system.webServer>
        <rewrite>
            <rules>
                <rule name="Imported Rule 1" stopProcessing="true">
                    <match url="^.*$" />
                    <conditions logicalGrouping="MatchAny">
                        <add input="{REQUEST_FILENAME}" matchType="IsFile" ignoreCase="false" />
                        <add input="{REQUEST_FILENAME}" matchType="IsDirectory" ignoreCase="false" />
                    </conditions>
                    <action type="None" />
                </rule>
                <rule name="Imported Rule 2" stopProcessing="true">
                    <match url="^(data|js|styles|install)" />
                    <action type="None" />
                </rule>
                <rule name="Imported Rule 3" stopProcessing="true">
                    <match url="^.*$" />
                    <action type="Rewrite" url="index.php" />
                </rule>
            </rules>
        </rewrite>
        <httpErrors existingResponse="PassThrough" />
    </system.webServer>
</configuration>

Nginx

To enable friendly URLs in Nginx, you must put the following in your server configuration:

location /xf/ {
    try_files $uri $uri/ /xf/index.php?$uri&$args;
    index index.php index.html;
}

location /xf/install/data/ {
    internal;
}
location /xf/install/templates/ {
    internal;
}
location /xf/internal_data/ {
    internal;
}
location /xf/library/ { #legacy
    internal;
}
location /xf/src/ {
    internal;
}

location ~ \.php$ {
    try_files $uri =404;
    fastcgi_pass    127.0.0.1:9000;
    fastcgi_param   SCRIPT_FILENAME $document_root$fastcgi_script_name;
    include         fastcgi_params;
}

The /xf/ paths must be changed to match your XenForo installation path.

This configuration also helps protect web-based access to directories that aren't normally accessible.

Lighttpd

To enable friendly URLs in Lighttpd, ensure that you have the mod_rewrite module loaded and add the following to your server configuration:

url.rewrite = (
    "^/(data|install|js|styles)/(.*)$" => "$0",
    "^/(.*\.php)(.*)$" => "$0",
    "^/.*(\?.*)" => "/index.php$1",
    "" => "/index.php"
)

Setting the index page

Assume that you've installed XenForo into http://example.com/community/. When you access this URL or http://example.com/community/index.php, a specific page in the XenForo system must be loaded.

By default, this is the list of forums. However, you can change this to a page of your choosing. This may be a portal that you've installed, the resource manager, or even a custom page node.

This is controlled by the Index Page Route option in the Basic Board Information group. This defaults to forums/. When you change this value, whatever used to be at the index will now be accessible by its default URL. Any links that point to the new index route will simply point to the http://example.com/community/ or http://example.com/community/index.php URL instead.

To change this, you must first identify the route of the page you want to set as the index. This is discussed in the Route filters section. Here are a few examples:

  • Forum list: forums/
  • A page node: pages/page-name/ (change page-name as necessary)
  • The recent activity list: recent-activity/
  • The resource manager: resources/ (only applies with the necessary add-on)
  • A custom portal: portal/ (you may need to change this route depending on the portal add-on)

After changing the index route, you should check that the index URL displays the content you expect.

It may be advantageous for your site to act as a proxy for any hot-linked images and links posted in user messages.

Proxying images can have several benefits, including the assurance that the image will remain available to your visitors even if the original image is removed from its source site, and allowing you to track metrics of how many times images have been viewed by your visitors.

Note

Acting as an image proxy will incur an increase in the amount of bandwidth used by your site, as your own server will be responsible for fetching the original image, and then serving it to any visitors who request it.

To enable the image and or link proxying service, visit the Messages section of the options system.

Here, you can set parameters for your proxy, including how often your server will check for updates of the original source image and how large images can be before your site will opt to keep them hot-linked instead of proxying them.