JasonWoof Got questions, comments, patches, etc.? Contact Jason Woofenden
add admin_email_templates
[wfpl-cms.git] / config.php
1 <?php
2
3 # This file should be run automatically by wfpl_main.php
4
5 # Settings
6 define('WFPL_DB', 'fixme');
7 define('WFPL_DB_USER', 'fixme');
8 define('WFPL_DB_PASS', 'fixme');
9 # CMS login passwords are stored in the database. See admin_users.php
10 date_default_timezone_set('America/New_York');
11
12 # If you change these, update style.styl too
13 define('WFPL_IMAGE_WIDTH_FULL',  900);
14 define('WFPL_IMAGE_WIDTH_SMALL', 336); # this is "sidebar_width" in style.styl
15 define('WFPL_IMAGE_WIDTH_THUMB',  70);
16 $GLOBALS['wfpl_image_widths'] = array(
17         WFPL_IMAGE_WIDTH_FULL,
18         WFPL_IMAGE_WIDTH_SMALL,
19         WFPL_IMAGE_WIDTH_THUMB
20 );
21
22 # Enable features, auto-includes
23 require_once(DOCROOT . 'inc/wfpl/format.php');
24 require_once(DOCROOT . 'inc/wfpl/db.php');
25 require_once(DOCROOT . 'inc/wfpl/session_messages.php');
26 require_once(DOCROOT . 'inc/session_auth.php');
27 require_once(DOCROOT . 'inc/cms.php');
28 require_once(DOCROOT . 'inc/misc.php');
29
30 # Connect to the database
31 db_connect(WFPL_DB, WFPL_DB_USER, WFPL_DB_PASS);
32
33 # upgrade db (only) on special trigger (assures only one upgrade at a time)
34 if (isset($_SERVER['HTTP_X_UPGRADE_DB_NOW'])) {
35         require_once(DOCROOT . 'inc/db_upgrade.php');
36         db_upgrade();
37 }
38
39 $GLOBALS['email_templates'] = [
40         'backend_bug' => [
41                 'title' => "Notification for site programmer(s)",
42                 'description' => "This email template is used if/when the back-end code of this site encounters an unusual/suspicious situation that it's not sure how to cope with.",
43                 'variables' => [
44                         ['message', "details about the unusual/suspicious situation"]
45                 ],
46                 'subject' => "backend alert",
47                 'content' => "Hi developer,\n\nPlease investigate the following debugging message from the site:\n\n~message~"
48                 'from_addr' => 'noreply@example.com',
49                 'to_addr' => 'fixme@example.com' # not all templates need this field
50         ]
51         # ...
52 ];