SupportArea

BoltWire is a FREE content management system written in PHP.

Its innovative architecture combined with best-in-class forms processing makes it ideal for creating complex, interactive, web applications fast...


Documentation

Markups
Variables
Conditions
Functions
Forms
Commands
Cheatsheet

Documentation

Handbook > Variables > 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
6.01
{now}current time (unix time stamp)
1544394906
{return}full url to referrer page
{ip}IP address of visitor
54.227.31.145
{domain}domain name of website
www.boltwire.com
{field}name of BoltWire field (this site)
https://www.boltwire.com
{script}full path to script
https://www.boltwire.com/index.php?p=
{shared}full path to shared files
http://www.boltwire.com/code/boltwire/shared
{files}full path to files dir
https://www.boltwire.com/files/
{action}current action if any
   
{superadmin}superadmins defined in index.php
fast4god
{plugins}list of installed plugins
{skin}current skin location
../code/boltwire/shared/skins/slimblog/
{zones}zones used in current skin
side,dropdown,banner,header,main,footer


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
docs.handbook.variables.system
{p0}page name index (number of parts)
4
{p1}, {p2}, {p3}...part 1, part 2, part 3... of page name
docs, handbook, variables
{page}last part of page name
system
{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
title,counter,tags   


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.

sitenameThis is the main name of the site. In the default skin, it is plastered across the top of every page.
sloganThis is the tagling for your site. It appears just below the sitename on the default skin.
descriptionThis is used to populate the description meta tag
   
keywordsThis is used to populate the keywords meta tag
   
webmasterThis is used to populate the webmaster meta tag
   
faviconThis is the name of the favicon to be used for your site.
   
copyrightHere's the copyright line, used at the bottom of each page.
   
accent_colorVarious colors used in your skin. To work, skin designers must use these variables in their style sheets.
text_colorVarious colors used in your skin. To work, skin designers must use these variables in their style sheets.
background_colorVarious colors used in your skin. To work, skin designers must use these variables in their style sheets.
box_colorThis is the background color of any boxes you create. To work, skin designers must use these variables in their style sheets.
systempagesA list of page groups used by BoltWire for system purposes. This makes excluding them from searches easy.
searchA simply search box you can put anywhere in your skin by a simple {search}
loginThis var show a login and register button if logged in, and a logout button if logged in. Easily insert in your skin using {login}
actionsHere 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.