$config
ProofBuddy >= 0.7
The $config class gives you read-only access to the settings stored in the ProofBuddy database.
$x = $config->readValue('value_name', ['default']);
Parameters
value_name - The name of the config value to load. See below for a list of valid values.
default - Optional. Value to return if the value_name returns an empty string.
Values
| company_name | The name of the company entered during setup or changed on the Options -> General tab. |
| company_address_1 company_address_2 |
The first and second lines of the company street address. |
| company_city company_state company_zip |
The city, state, and zip code of the company |
| company_phone company_fax |
The phone and fax numbers of the company. |
| company_email | The email address for the company. This is not necessarily the same address as any of the admin users. It is the address entered during setup as the company address or changed on the Options -> General tab. |
| datetime_longformat datetime_shortformat date_longformat date_shortformat |
These strings are used to determine the formatting of dates and times. For more information see the page for the date function on the PHP website. |
| db_version | The current version of the ProofBuddy database. |
| image_height image_width |
The height and width limits for fullsized images. This is not the same as the actual image size. If you need the actual dimensions of an image it can be found in other classes. |
| invoice_format | The format string that's used for invoices. |
| layout_columns layout_rows |
The columns and rows settings from the Options -> Images page. If you need this value to display a thumbnail page you should load it from the $cAlbum class instead since the theme files can override this setting. |
| thumbnail_height thumbnail_width |
The maximum height and width of the thumbnail images. This is not the same as the actual size of the images. If you need the actual dimensions they can be found using either the cAlbum or cImage classes. |
Return Value
$config->readValue() returns a string with either the value of value_name if it exists or the value passed as default if it does not.
Example
The following code will output the company name.
<?php
echo $config->readValue('company_name');
?>
echo $config->readValue('company_name');
?>




