JasonWoof Got questions, comments, patches, etc.? Contact Jason Woofenden
silence more warnings
[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_SITE_WIDTH',        950); # "centerer_width" in style.styl
14 define('WFPL_IMAGE_WIDTH_FULL',  WFPL_SITE_WIDTH);
15 define('WFPL_IMAGE_WIDTH_SMALL', 250); # "sidebar_width" in style.styl
16 define('WFPL_IMAGE_WIDTH_THUMB',  70);
17 $GLOBALS['wfpl_image_widths'] = array(
18     WFPL_IMAGE_WIDTH_FULL,
19     WFPL_IMAGE_WIDTH_SMALL,
20     WFPL_IMAGE_WIDTH_THUMB
21 );
22
23 # Enable features, auto-includes
24 require_once(__DIR__.'/'.'inc/wfpl/format.php');
25 require_once(__DIR__.'/'.'inc/wfpl/db.php');
26 require_once(__DIR__.'/'.'inc/wfpl/persistent.php');
27 require_once(__DIR__.'/'.'inc/wfpl/session_messages.php');
28 require_once(__DIR__.'/'.'inc/session_auth.php');
29 require_once(__DIR__.'/'.'inc/cms.php');
30 require_once(__DIR__.'/'.'inc/misc.php');
31
32 # Connect to the database
33 db_connect(WFPL_DB, WFPL_DB_USER, WFPL_DB_PASS);
34
35 # Create tables, update schema, etc as necessary
36 require_once(__DIR__.'/'.'inc/db_upgrade.php');
37 db_upgrade();
38
39 # paypal_ipn.php calls these when it receives a valid payment
40 $GLOBALS['payment_handlers'] = [
41     # the key (below) must be the first word in the paypal variable "custom"
42     # the file will be run with wfpl's file_run()
43     # example:
44     #'membership' => __DIR__.'/'.'inc/payment_membership.php'
45 ];
46
47 $GLOBALS['email_templates'] = [
48     'backend_bug' => [
49         'title' => "Notification for site programmer(s)",
50         '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.",
51         'variables' => [
52             ['details', "details about the unusual/suspicious situation"]
53         ],
54         'subject' => "backend alert",
55         'content' => "Hi developer,\n\nPlease investigate the following debugging message from the site:\n\n~details~",
56         'from_addr' => 'noreply@example.com',
57         'to_addr' => 'fixme@example.com' # not all templates need this field
58     ]
59     # ...
60 ];