BoltWire

Basic Concepts

Site Config

There are many configuration options you can use to change the way BoltWire works. These are set in the page site.config, but can be modified, or even changed dynamically in config.php, farm.php or a plugin.

How it Works

When BoltWire loads, it reads site.config and extracts all the configuration settings on the page (as well as all enabled plugins). Then when some function needs a config value, it calls the BOLTconfig utility, often (not always) sending along a hard-coded default value. In determining which value to return, BoltWire returns the site.config value if found, and if not the supplied default value.

BoltWire also allows you to change config values dynamically using PHP in config.php or a plugin. Suppose for example you want to set the site language based on a member's preference. Simply add this line:

$BOLTconfig['language'] = BOLTvars("member.$BOLTid:language");

This looks for a language data variable stored on the current user's member page. Otherwise the value is left blank which defaults to English.

It is also possible to extend BoltWire's configuration values in a plugin. Suppose you had a blog plugin and wanted to give admins the ability to configure how the date setting is formatted in that plugin. Simply use a line similar to this:

$dateFmt = BOLTconfig('blogDateFmt', '%x');

This defaults to '%x' but allows admins to overwrite that value by setting blogDateFmt to some other value in site.config. The field name for config options are all case insensitive. Their values are not.

System Config Options

Here is a list of the configuration options available to you in BoltWire and their hard-coded default values.

actionHeaders: false
Use normal headers and footers on action pages

dataAuth: true
Require write permissions to save data values

deprecate: true
Log pages that are using features about to be deprecated

escapeTitle: false
Prevents any markup from being processed in page titles.

funcMessages: false
Turn's off messages from forms unless explicitly turned on in the function

guestName: Guest
A users member name before he logs in

homeMobile: main
The landing page for the mobile skin when no page is specified

homePage: main
The landing page when no page is specified

indexBatch: 25
How many pages are indexed each time the index function is called

indexing: true
Turns on BoltWires automatic indexing

language:
Reset the site language to some other installed language pack

legend_query_some_page:
Define a legend for some info page or index

linkExtAttr: rel='nofollow'
Added attribute(s) on links to external sites

linkIntAttr:
Added attribute(s) on links to local pages

linkRot:
Turns on an internal log of links to pages that do not exist

linkTitle:
Use titles in links without having to specify '+'

localSkins
Copies a skin's html and css page into BoltWire for local editing

localTime: 0
Time zone difference from GMT

mailMode:
Set mailing mode (active or demo)

mailSubject: Mail from BoltWire
Default subject if not supplied in function/command

missingMark: true
Shows little red question mark when a local link does not exist

mobilePat: /(iphone|ipod|android|webos|iemobile|kindle|blackberry)/i
How BoltWire determines if HTTP_USER_AGENT is mobile device

reloadMark: true
Turns on the little upload symbol to allow overwriting of existing files

robotBlock:
Can be set to pages or groups of pages to turn off robot visitors

safeData: title
Strips markup from specified data fields. Set to title in site.config

searchExclude:
Can set to pages or groups of pages to exclude from searches by default

searchLimit: 50
How many matches are returns if count is not set (to false, or another number)

searchType:
Types of pages to exclude by default, like headers, footers and side pages.

serverHeaders: true
Turns on server header messages like page blocked or missing.

siteMail:
Set a default to or from email address if not set in the mail command

skin: default
The skin to be used in the page display

skinMobile: false
Turn on the default mobile skin, or set to another skin for

skinPrint: true
Use the print skin when the action is set to print

ssl:
Set to true to change http to https on local links

stampsExpire: 90
How long before stamps are deleted

stampsMax: 7
Max number of stamp pages saved. The eigth is automatically deleted

stampsMin: 1
How many stamps will be preserved for a page regardless of expiration

textDirection:
Can set to rtl for right to left languages. Only used in breadcrumbs

threadStart: 1000
Where the first thread begins.

timeFmt: %c
The default time format if not specified in a time command/function

uploadCase: false
Converts all uploads to lowercase to minimize case matching erros

uploadSize: 100000
Maximum uploaded file size

uploadStrict: true
Forces all uploads to match a strict pattern (see the uploads filter in variables.php)

uploadTypes: jpg,jpeg,gif,pdf,txt,png
Allowed types of file uploads

utfpages: true
Turns on BoltWire internal UTF conversion of page names

vSpacing: true
Can use to turn off BoltWires automatic vertical spacing. Not recommended.