-
Notifications
You must be signed in to change notification settings - Fork 0
/
configure.php
134 lines (105 loc) · 4.87 KB
/
configure.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
<?php
/**
* ENDO Configure
*
* @author Philip Blyth
*/
// --------------------------------------------------
// ROOTS
// --------------------------------------------------
ddefine('ENDO_ROOT', dirname(__FILE__).DS);
ddefine('APP_PACKAGES_ROOT', APP_ROOT.'packages'.DS);
ddefine('ENDO_PACKAGES_ROOT', ENDO_ROOT.'packages'.DS);
ddefine('TMP_ROOT', ROOT.'tmp'.DS);
// --------------------------------------------------
// ROUTES
// --------------------------------------------------
ddefine('DEFAULT_URL', 'pages/home');
ddefine('DEFAULT_REQUEST_TYPE', 'html');
ddefine('DEFAULT_LAYOUT', 'default');
ddefine('DEFAULT_ACTION', 'default');
// --------------------------------------------------
// SUBDOMAIN
// --------------------------------------------------
ddefine('SUBDOMAIN_PREFIX', '~');
ddefine('SUBDOMAIN_DEFAULT_URL', DEFAULT_URL);
// --------------------------------------------------
// ADMIN
// --------------------------------------------------
ddefine('ADMIN_ROUTE', '__admin');
ddefine('ADMIN_PREFIX', 'admin_');
ddefine('ADMIN_DEFAULT_CONTROLLER', '---'); // should be overwritten in APP Configure
ddefine('ADMIN_DEFAULT_ACTION', 'dashboard');
// --------------------------------------------------
// USERS
// --------------------------------------------------
ddefine('CLASS_USER_MEMBER', 'Member');
ddefine('LOGIN_REDIRECT', DS);
// --------------------------------------------------
// FORMATTING
// --------------------------------------------------
ddefine('DATE_FORMAT', 'D, M jS \'y g:ia');
ddefine('DATE_FORMAT_JS', 'D, j M Y H:i:s');
// --------------------------------------------------
// FOLDERS
// --------------------------------------------------
ddefine('INCLUDES_DIR', 'includes'.DS);
ddefine('CLASSES_DIR', 'classes'.DS);
ddefine('MODELS_DIR', 'models'.DS);
ddefine('CONTROLLERS_DIR', 'controllers'.DS);
ddefine('BEHAVIORS_DIR', 'behaviors'.DS);
ddefine('EXECUTE_DIR', 'execute'.DS);
ddefine('CACHES_DIR', 'caches'.DS);
ddefine('PAGES_CONTROLLER', 'pages');
ddefine('EXECUTE_CONTROLLER', 'execute');
// --------------------------------------------------
// STRINGS (CLASS-NAMES / PRE/SUFFIXES)
// --------------------------------------------------
define('STR_BEHAVIOR', 'Behavior');
// --------------------------------------------------
// LOGS
// --------------------------------------------------
ddefine('STR_LOG', TMP_ROOT.'log.txt');
ddefine('STR_FINDCACHE', 'find');
// --------------------------------------------------
// EVENTS
// --------------------------------------------------
ddefine('EVENT_ADD', 'added');
ddefine('EVENT_EDIT', 'edited');
ddefine('EVENT_REMOVE', 'removed');
ddefine('EVENT_SHOW', 'viewed');
ddefine('EVENT_LOGIN', 'logged in');
ddefine('EVENT_LOGOUT', 'logged out');
ddefine('EVENT_SIGNUP', 'signed up');
ddefine('EVENT_FORGOT_PASSWORD', 'forgot their password');
ddefine('EVENT_RESET_PASSWORD', 'reset their password');
// --------------------------------------------------
// SMARTY
// --------------------------------------------------
ddefine('SMARTY_TEMPLATE_DIR', 'views');
ddefine('SMARTY_PLUGINS_DIR', 'helpers');
ddefine('SMARTY_SCAFFOLD_DIR', SMARTY_TEMPLATE_DIR.DS.'scaffolds');
ddefine('SMARTY_CONFIG_DIR', 'config');
ddefine('SMARTY_COMPILE_DIR', APP_ROOT.CACHES_DIR.'views_compiled');
ddefine('SMARTY_CACHE_DIR', APP_ROOT.CACHES_DIR.'views_cached');
ddefine('SMARTY_TEMPLATE_EXT', 'tpl');
// ddefine('SMARTY_CACHING', DEBUG==0 ? true : false);
ddefine('SMARTY_CACHING', false);
ddefine('SMARTY_COMPILE_CHECK', true);
ddefine('SMARTY_DEBUG_OUTPUT', null);
// --------------------------------------------------
// DB
// --------------------------------------------------
ddefine('MYACTIVERECORD_CONNECTION_STR', 'mysql://username:password@host/database');
ddefine('MYACTIVERECORD_CACHE_SQL', true);
ddefine('MYACTIVERECORD_LOG_SQL_TO', TMP_ROOT.'log.sql');
// --------------------------------------------------
// FUNCTIONS
// --------------------------------------------------
function ddefine($constant, $value)
{
if (!defined($constant)) {
define($constant, $value);
}
}
?>