pnConfigGetVar() obtains a configuration variable from the PostNuke system.
Parameters
name
The name of the configuration variable to obtain
Return Values
This function returns the requested variable if the variable exists. If the variable does not exist then this function will return void. This function also returns void if an exception was raised.
Exceptions
This function raises BAD_PARAM if you pass an invalid parameter. This function raises DATABASE_ERROR if an error occurs while querying data.
Notes
The configuration variables available with this release of the API are as follows:
debug
Level of debugging required. 0 is no debugging, 1 is normal debugging.
Version_Num
Version of this PostNuke system
Version_ID
ID of this PostNuke system; currently always 'PostNuke'
Version_Sub
Sub-ID of this PostNuke system
startpage
Name of initial module for this PostNuke system to load
adminmail
Email address of site administrator
sitename
Name of this PostNuke system
slogan
Slogan of this PostNuke system
timezone_offset
Timezone offset of this PostNuke system, in hours from GMT-12
seclevel
Security level of this site; one of 'high', 'medium', or 'low'
banners
Flag to state whether advertising banners are shown; '0' for no or '1' for yes
language
Code of default language for this PostNuke system
locale
Locale for this PostNuke system
CensorMode
Flag to state whether censoring is active; '0' for no or '1' for yes
CensorList
Array of words that are censored by this PostNuke system
Other variables will be made available in future releases of the API.
Examples
// Get locale for this site
$locale = pnConfigGetVar('locale');