Welcome Tour
Site Checklist
Our Story



System Variables

System variables are variables defined in various ways related to the system environment, the user, or the current page. System variables can also be set on a special settings page, or dynamically using PHP. They can be retrieved anywhere in your site.

Many system variables are defined in variables.php, though they can be defined in index.php, engine.php, plugins, and elsewhere. Some are defined in site, on a special page called code.settings. By editing this page you can easily create, modify, or delete your own system variables without having to touch the underlying PHP.

About the Environment

Here is a list of environment variables related to your system installation, a brief description of the markup, and what the variable actually displays below.

{version} current version of BoltWire
{now} current time (unix time stamp)
{return} full url to referrer page
{ip} IP address of visitor
{domain} domain name of website
{field} name of BoltWire field (this site)
{script} full path to script
{shared} full path to shared files
{files} full path to files dir
{action} current action if any
{superadmin} superadmins defined in index.php
{plugins} list of installed plugins
{skin} current skin location
{zones} zones used in current skin

About the Member

These variables retrieve information about the current user.

{id} member id
{member} member name (title)
{groups} current group memberships

About the Page

These system variables return data about the current page, so they work like data variables. The difference, besides the syntax, is that the values are derived (generally) from the page name, and are not stored as data on the page:

{p} full page name
{p0} page name index (number of parts)
{p1}, {p2}, {p3}... part 1, part 2, part 3... of page name
docs, handbook, variables
{page} last part of page name
{title} title data variable (or last part of page name if title is not set)
System Variables
{data} CSV list of all defined data variables

Site Settings

There is a special page in BoltWire called code.settings which allows you to define additional (pseudo) system variables. You define them as simple info variables, but they then become available sitewide as if they were system variables--making them a handy place to store bits of text, code, and markup used in multiple places in your site. Update the setting, and every place using that setting is updated automaticallly.

Because these variables are also available in skins and style sheets, you can use them to easily change colors, set meta tags, etc. For this reason, they are sometimes called skin variables.

Use the syntax {variablename} to access them.
Use the syntax "field: value" to define them

Here is a list of these system variables found in the default code.settings page. To edit them, create new variables, or delete unneeded variables, just edit the content of this page. For more information about these, click here.

sitename This is the main name of the site. In the default skin, it is plastered across the top of every page.
slogan This is the tagling for your site. It appears just below the sitename on the default skin.
description This is used to populate the description meta tag
keywords This is used to populate the keywords meta tag
webmaster This is used to populate the webmaster meta tag
favicon This is the name of the favicon to be used for your site.
copyright Here's the copyright line, used at the bottom of each page.
accent_color Various colors used in your skin. To work, skin designers must use these variables in their style sheets.
text_color Various colors used in your skin. To work, skin designers must use these variables in their style sheets.
background_color Various colors used in your skin. To work, skin designers must use these variables in their style sheets.
box_color This is the background color of any boxes you create. To work, skin designers must use these variables in their style sheets.
systempages A list of page groups used by BoltWire for system purposes. This makes excluding them from searches easy.
search A simply search box you can put anywhere in your skin by a simple {search}
login This var show a login and register button if logged in, and a logout button if logged in. Easily insert in your skin using {login}
actions Here is your action bar, listing the actions your user is authorized to access. Edit this var to change your action bar.

PHP & System Variables

You can define your own system variables (or change an existing system variable) by adding a line like this to config.php or a plugin:

$BOLTvar['myvar'] = 'some value';

This will set {myvar} to "some value" wherever it is found. You can use PHP to dynamically define the value of the variable, based on your needs.

Note: You cannot override true system variables by assigning it a new value on code.settings. You can change them via PHP.