A custom page has access to the XF engine's functions, including sessions and permissions.
All custom pages are their own PHP script with individual configuration; PHP knowledge is required.
A custom page script can be above, below or within the XF install folder, no restrictions.
You can optionally configure any of the following items on a per-page basis:
- The custom <head> tag items on top of XenForo's defaults (presumably from an external script)
- The custom page title
- The custom page content
- Whether or not to wrap above content in the XenForo layout
- Whether or not to include XF's social meta tags for social media content previews
- Whether or not to show breadcrumbs, and what breadcrumbs to show
- Install the add-on zip file (this is an add-on package without extra files)
- Make a copy of sample.php script and name it whatever you want
- Point the script's XF constant value to your XenForo install folder; the default is DIR
- Set the $head and/or $content variables
- Adjust the \ScriptsPages\Setup::set parameters (below), and installation is complete
Parameters:
How to set parameters externally
To set any parameter above from an external script, define the PHP constant SCRIPT_PAGE_{KEY} prior to loading XenForo, i.e.