forked from briceparent/Shopsailors
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconstants.php
executable file
·173 lines (152 loc) · 4.93 KB
/
constants.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
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
<?php
// Taken from the php documentation at php.net
if (!defined('PHP_VERSION_ID') || PHP_VERSION_ID < 50300) {
die(
'The minimum php version required to use Shopsailors is PHP5.3.<br />
You need to update your version if you want to use Shopsailors.'
);
}
// We use FOLDER for global pathes, from /var/www/...
// and PATH for internet pathes, like everything after the domain name
/** Marker that enables to verify if the site was really built.<br />
* Only works with files that include this one.
*/
define('SH_MARKER',true);
/** Prefix for the long class names */
define('SH_PREFIX','sh_');
define('SH_CUSTOM_PREFIX','cm_'); /* If you change this, make sure you update the .htaccess the same way */
//----------------------------- MAIN FOLDERS ---------------------------------\\
/**
* Constant for the root
*/
define('SH_ROOT_FOLDER',dirname(__FILE__).'/');
/**
* Constant for the root - Without the path to shopsailors
*/
define('SH_ROOT_PATH','/');
/**
* Constant for the classes/ folder
*/
define('SH_CLASS_FOLDER',SH_ROOT_FOLDER.'classes/');
/**
* Constant for the classes/ folder - Without the path to shopsailors
*/
define('SH_CLASS_PATH',SH_ROOT_PATH.'classes/');
/**
* Constant for the include/ folder
*/
define('SH_INCLUDE_FOLDER',SH_ROOT_FOLDER.'include/');
/**
* Constant for the include/ folder - Without the path to shopsailors
*/
define('SH_INCLUDE_PATH',SH_ROOT_PATH.'include/');
/**
* Constant for the templates/ folder
*/
define('SH_TEMPLATE_FOLDER',SH_ROOT_FOLDER.'templates/');
/**
* Constant for the templates/ folder - Without the path to shopsailors
*/
define('SH_TEMPLATE_PATH',SH_ROOT_PATH.'templates/');
/**
* Constant for the site/ folder
*/
define('SH_SITES_FOLDER',SH_ROOT_FOLDER.'sites/');
/**
* Constant for the site/ folder - Without the path to shopsailors
*/
define('SH_SITES_PATH',SH_ROOT_PATH.'sites/');
/**
* Constant for the site/[site_name]/ folder
*/
define('SH_SITE_FOLDER',SH_SITES_FOLDER.SH_SITE);
/**
* Constant for the site/[site_name]/ folder - Without the path to shopsailors
*/
define('SH_SITE_PATH',SH_SITES_PATH.SH_SITE);
/**
* Constant for the user's sh_params/ folder
*/
define('SH_SITEPARAMS_FOLDER',SH_SITE_FOLDER.'sh_params/');
/**
* Constant for the cache/[site]/ folder
*/
define('SH_CACHE_FOLDER',SH_ROOT_FOLDER.'cache/'.SH_SITE);
/**
* Constant for the fonts/ folder (into the templates/ folder)
*/
define('SH_FONTS_FOLDER',SH_TEMPLATE_FOLDER.'fonts/');
/**
* Constant for the fonts/ folder (into the templates/ folder) - Without the path to shopsailors
*/
define('SH_FONTS_PATH',SH_TEMPLATE_PATH.'fonts/');
/**
* Constant for the temp/ folder
*/
define('SH_TEMP_FOLDER',SH_ROOT_FOLDER.'temporary/');
//------------------------------- IMAGES -------------------------------------\\
/**
* Constant for the shared images folder.<br />
* Shared images are seen as if they were in /images/shared, but are in
* /images/ instead.
*/
define('SH_SHAREDIMAGES_FOLDER',SH_ROOT_FOLDER.'images/');
/**
* Constant for the shared images folder - Without the path to shopsailors.<br />
* Shared images are seen as if they were in /images/shared, but are in
* /images/ instead.
*/
define('SH_SHAREDIMAGES_PATH',SH_ROOT_PATH.'images/shared/');
/**
* Constant for the user's images folder.<br />
* The user's images are seen to be in the /images/site/ folder, but are in
* SH_SITE_FOLDER/sh_images/ instead.
*/
define('SH_IMAGES_FOLDER',SH_SITE_FOLDER.'sh_images/');
/**
* Constant for the user's images folder - Without the path to shopsailors.<br />
* The user's images are seen to be in the /images/site/ folder, but are in
* SH_SITE_FOLDER/sh_images/ instead.
*/
define('SH_IMAGES_PATH',SH_ROOT_PATH.'images/site/');
/**
* Constant for the user's logo files.
*/
define('SH_LOGO_FOLDER',SH_IMAGES_FOLDER.'logo/');
/**
* Constant for the user's logo files - Without the path to shopsailors.
*/
define('SH_LOGO_PATH',SH_IMAGES_PATH.'logo/');
/**
* Path translation constant to /images/shared/
*/
define('SH_IMAGES_SHARED','/images/shared/');
/**
* Path translation constant to /images/site/
*/
define('SH_IMAGES_SITE','/images/site/');
/**
* Path translation constant to /images/template/global/
*/
define('SH_IMAGES_TEMPLATE_GLOBAL','/images/template/global/');
/**
* Path translation constant to /images/template/variation/
*/
define('SH_IMAGES_TEMPLATE_VARIATION','/images/template/variation/');
/**
* Constant for the generated/ folder (images that were generated automatically)
*/
define('SH_GENERATEDIMAGES_FOLDER',SH_IMAGES_FOLDER.'generated/');
/**
* Constant for the generated/ folder (images that were generated automatically)
* - Without the path to shopsailors
*/
define('SH_GENERATEDIMAGES_PATH',SH_IMAGES_PATH.'generated/');
/**
* Constant for the folder in which are put the temporary images
*/
define('SH_TEMPIMAGES_FOLDER',SH_IMAGES_FOLDER.'temp/');
/**
* Constant for the folder in which are put the temporary images
*/
define('SH_TEMPIMAGES_PATH','/images/temp/');