|
1
|
|
|
<?php |
|
2
|
|
|
/** |
|
3
|
|
|
* |
|
4
|
|
|
* @copyright (c) 2013 phpBB Group |
|
5
|
|
|
* @license http://opensource.org/licenses/gpl-3.0.php GNU General Public License v3 |
|
6
|
|
|
* @author MichaelC |
|
7
|
|
|
* |
|
8
|
|
|
*/ |
|
9
|
|
|
|
|
10
|
|
|
namespace AppBundle\Twig; |
|
11
|
|
|
|
|
12
|
|
|
class GlobalsExtension extends \Twig_Extension implements \Twig_Extension_GlobalsInterface |
|
13
|
|
|
{ |
|
14
|
|
|
|
|
15
|
|
|
const INTL_CONTACT_ID = 964015; |
|
16
|
|
|
|
|
17
|
|
|
public function getGlobals() |
|
18
|
|
|
{ |
|
19
|
|
|
// @TODO Generate URLs for routes |
|
20
|
|
|
$pathVars = $this->getPathVars(); |
|
21
|
|
|
$menuVars = $this->getMenuVars(); |
|
22
|
|
|
|
|
23
|
|
|
$aboutVars = $this->getAboutVars(); |
|
24
|
|
|
$developmentVars = $this->getDevelopmentVars(); |
|
25
|
|
|
$modVars = $this->getModsVars(); |
|
26
|
|
|
$styleVars = $this->getStyleVars(); |
|
27
|
|
|
$supportVars = $this->getSupportVars(); |
|
28
|
|
|
$extensionVars = $this->getExtensionVars(); |
|
29
|
|
|
|
|
30
|
|
|
$forumVars = $this->getForumVars(); |
|
31
|
|
|
$peopleVars = $this->getPeopleVars(); |
|
32
|
|
|
$miscVars = $this->getMiscVars(); |
|
33
|
|
|
$legacyVars = $this->getLegacyVars(); |
|
34
|
|
|
|
|
35
|
|
|
$variables = array_merge( |
|
36
|
|
|
$pathVars, |
|
37
|
|
|
$menuVars, |
|
38
|
|
|
$aboutVars, |
|
39
|
|
|
$developmentVars, |
|
40
|
|
|
$modVars, |
|
41
|
|
|
$styleVars, |
|
42
|
|
|
$supportVars, |
|
43
|
|
|
$forumVars, |
|
44
|
|
|
$peopleVars, |
|
45
|
|
|
$miscVars, |
|
46
|
|
|
$extensionVars, |
|
47
|
|
|
$legacyVars |
|
48
|
|
|
); |
|
49
|
|
|
|
|
50
|
|
|
return $variables; |
|
51
|
|
|
} |
|
52
|
|
|
|
|
53
|
|
|
|
|
54
|
|
|
public function getName() |
|
55
|
|
|
{ |
|
56
|
|
|
return 'phpbb_extension_globals'; |
|
57
|
|
|
} |
|
58
|
|
|
|
|
59
|
|
|
private function getPathVars() |
|
60
|
|
|
{ |
|
61
|
|
|
$pathVars = array( |
|
62
|
|
|
'home_path' => '/', |
|
63
|
|
|
|
|
64
|
|
|
'about_path' => '/about/', |
|
65
|
|
|
'ABOUT' => '/about/', |
|
66
|
|
|
//'ABOUT_INDEX_SUB' => '/about/', |
|
67
|
|
|
|
|
68
|
|
|
'advertise_path' => '/about/advertise/', |
|
69
|
|
|
'ABOUT_ADVERTISE' => '/about/advertise/', |
|
70
|
|
|
|
|
71
|
|
|
'release_path' => '/about/release/', |
|
72
|
|
|
|
|
73
|
|
|
'demo_path' => '/demo/', |
|
74
|
|
|
'DEMO' => '/demo/', |
|
75
|
|
|
|
|
76
|
|
|
'downloads_path' => '/downloads/', |
|
77
|
|
|
'downloads_path_32x' => '/downloads/3.2/', |
|
78
|
|
|
'downloads_path_31x' => '/downloads/3.1/', |
|
79
|
|
|
'downloads_path_30x' => '/downloads/3.0/', |
|
80
|
|
|
|
|
81
|
|
|
//'DOWNLOADS_SUB' => '/downloads/', |
|
82
|
|
|
'DOWNLOADS' => '/downloads/', |
|
83
|
|
|
'DOWNLOADS_HEADER' => '/downloads/?from=header', |
|
84
|
|
|
|
|
85
|
|
|
'cdb_path' => '/customise/db/', |
|
86
|
|
|
'CUSTOMISE' => '/customise/db/', |
|
87
|
|
|
|
|
88
|
|
|
'support_path' => '/support/', |
|
89
|
|
|
'SUPPORT' => '/support/', |
|
90
|
|
|
'support_intl_path' => '/support/intl', |
|
91
|
|
|
|
|
92
|
|
|
'development_path' => '/development/', // Usage = 3 |
|
93
|
|
|
// 'DEV_INDEX_SUB' => '/development/', |
|
94
|
|
|
'DEVELOPMENT' => '/development/', |
|
95
|
|
|
|
|
96
|
|
|
'GSOC' => '/development/gsoc/', |
|
97
|
|
|
'gsoc_path' => '/development/gsoc/', |
|
98
|
|
|
|
|
99
|
|
|
'community_path' => '/community/', |
|
100
|
|
|
'COMMUNITY' => '/community', |
|
101
|
|
|
|
|
102
|
|
|
'contact_path' => '/about/contact/', |
|
103
|
|
|
'ABOUT_CONTACT' => '/about/contact/', |
|
104
|
|
|
|
|
105
|
|
|
'get_involved_path' => '/get-involved/', // Usage = 2 |
|
106
|
|
|
// 'ABOUT_GETINVOLVED_SUB' => '/get-involved/', |
|
107
|
|
|
'DEV_GI_SUB' => '/development/get-involved/', |
|
108
|
|
|
'GET_INVOLVED' => '/get-involved/', |
|
109
|
|
|
|
|
110
|
|
|
'customise_path' => '/customise/', |
|
111
|
|
|
|
|
112
|
|
|
'mods_db_path' => '/customise/db/modifications-1', |
|
113
|
|
|
// 'MODS_DB_SUB' => '/customise/db/modifications-1', |
|
114
|
|
|
|
|
115
|
|
|
'mods_path' => '/mods/', |
|
116
|
|
|
'MODS' => '/mods/', |
|
117
|
|
|
|
|
118
|
|
|
'shop_path' => '/shop/', |
|
119
|
|
|
'SHOP' => '/shop/', |
|
120
|
|
|
|
|
121
|
|
|
'blog_link' => '//blog.phpbb.com/', |
|
122
|
|
|
'BLOG' => '//blog.phpbb.com/', |
|
123
|
|
|
|
|
124
|
|
|
'feeds_rss_path' => '/feeds/rss/', |
|
125
|
|
|
'FEEDS_RSS' => '/feeds/rss/', |
|
126
|
|
|
|
|
127
|
|
|
'kb_path' => '/support/docs/en/3.2/kb/', |
|
128
|
|
|
'KB' => '/support/docs/en/3.2/kb/', |
|
129
|
|
|
//'KB' => '/knowledgebase/', |
|
130
|
|
|
|
|
131
|
|
|
'showcase_path' => '/showcase/', |
|
132
|
|
|
'SHOWCASE' => '/showcase/', |
|
133
|
|
|
|
|
134
|
|
|
'documentation_path'=> '/support/docs/', |
|
135
|
|
|
'DOCUMENTATION' => '/support/docs/', |
|
136
|
|
|
|
|
137
|
|
|
'ideas_path' => '/community/ideas/', |
|
138
|
|
|
'IDEAS' => '/community/ideas/', |
|
139
|
|
|
|
|
140
|
|
|
'extensions_path' => '/extensions/', |
|
141
|
|
|
|
|
142
|
|
|
'styles_path' => '/styles/', |
|
143
|
|
|
); |
|
144
|
|
|
|
|
145
|
|
|
return $pathVars; |
|
146
|
|
|
} |
|
147
|
|
|
|
|
148
|
|
|
private function getMenuVars() |
|
149
|
|
|
{ |
|
150
|
|
|
$menuVars = array( |
|
151
|
|
|
// 'ABOUT_FEATURES_SUB' => '/about/features/', |
|
152
|
|
|
// 'ABOUT_HISTORY_SUB' => '/about/history/', |
|
153
|
|
|
|
|
154
|
|
|
// 'ABOUT_TEAM_SUB' => '/about/team/', |
|
155
|
|
|
//'ABOUT_CONTACT_SUB' => '/about/contact/', |
|
156
|
|
|
// 'ABOUT_ADVERTISE_SUB' => '/about/advertise/', |
|
157
|
|
|
|
|
158
|
|
|
'DOWNLOADS_UPDATE_SUB' => '/downloads/#update', |
|
159
|
|
|
|
|
160
|
|
|
// 'MODS_SUB' => '/mods/', |
|
161
|
|
|
// 'DEV_WIKI_SUB' => '//wiki.phpbb.com/', |
|
162
|
|
|
// 'STYLES_SUB' => '/styles/', |
|
163
|
|
|
// 'STYLES_DEMO_SUB' => '/styles/demo/3.0/', |
|
164
|
|
|
|
|
165
|
|
|
// 'DOCUMENTATION_SUB' => '/support/documentation/3.0/', |
|
166
|
|
|
// 'KB_SUB' => '/kb/', |
|
167
|
|
|
// 'SUPPORT_IRC_SUB' => '/support/irc/', |
|
168
|
|
|
'SUPPORT_TUTORIALS_SUB' => '/support/tutorials/3.0/', |
|
169
|
|
|
// 'SUPPORT_FORUMS_SUB' => '/support/forums/', |
|
170
|
|
|
// 'SUPPORT_INTL_SUB' => '/support/intl/', |
|
171
|
|
|
|
|
172
|
|
|
'BUGS_SUB' => '/bugs/', |
|
173
|
|
|
'BUGS_PHPBB_SUB' => 'http://tracker.phpbb.com/', |
|
174
|
|
|
'SECURITY_SUB' => '/security/', |
|
175
|
|
|
'DEV_HOME_SUB' => '//area51.phpbb.com/', |
|
176
|
|
|
|
|
177
|
|
|
'ABOUT_INDEX_SUB' => '/about/', |
|
178
|
|
|
'SUPPORT_INDEX_SUB' => '/support/', |
|
179
|
|
|
|
|
180
|
|
|
'CDB_MOD_SUPPORT' => '/customise/db/support/modifications-1', // TODO: remove (used in support_forums.html) |
|
181
|
|
|
'CDB_STYLE_SUPPORT' => '/customise/db/support/styles-2', // TODO: remove |
|
182
|
|
|
'CDB_CONVERTOR_SUPPORT' => '/customise/db/support/converter/', // TODO: remove (used in support_forums.html) |
|
183
|
|
|
'CDB_TRANSLATION_SUPPORT' => '/customise/db/support/translation/', // TODO: remove |
|
184
|
|
|
); |
|
185
|
|
|
|
|
186
|
|
|
return $menuVars; |
|
187
|
|
|
} |
|
188
|
|
|
|
|
189
|
|
|
private function getAboutVars() |
|
190
|
|
|
{ |
|
191
|
|
|
$aboutVars = array( |
|
192
|
|
|
'ABOUT_HISTORY' => '/about/history/', |
|
193
|
|
|
'ABOUT_LOGOS' => '/about/logos/', |
|
194
|
|
|
'ABOUT_MAP' => '/about/map/', |
|
195
|
|
|
'ABOUT_TEAM' => '/about/team/', |
|
196
|
|
|
'ABOUT_FEATURES' => '/about/features/', |
|
197
|
|
|
'ABOUT_COMPARE' => '/about/features/compare.php', |
|
198
|
|
|
'about_launch' => '/about/launch/', |
|
199
|
|
|
); |
|
200
|
|
|
|
|
201
|
|
|
return $aboutVars; |
|
202
|
|
|
} |
|
203
|
|
|
|
|
204
|
|
|
private function getDevelopmentVars() |
|
205
|
|
|
{ |
|
206
|
|
|
$developmentVars = array( |
|
207
|
|
|
'BUGS' => '/bugs/', |
|
208
|
|
|
'BUGS_PHPBB' => 'http://tracker.phpbb.com/', |
|
209
|
|
|
'BUGS_WEBSITE' => '/bugs/website/', |
|
210
|
|
|
'INCIDENTS' => '/incidents/', |
|
211
|
|
|
'SECURITY' => 'https://tracker.phpbb.com/secure/BrowseProjects.jspa#10020', |
|
212
|
|
|
'SECURITY_MODS' => 'https://tracker.phpbb.com/browse/EXTSEC/', |
|
213
|
|
|
'BUGS_30X' => 'http://tracker.phpbb.com/', |
|
214
|
|
|
'BUGS_DOCS' => '/bugs/docs/', |
|
215
|
|
|
'BUGS_MODTOOLS' => '/bugs/modteamtools/', |
|
216
|
|
|
'BUGS_SUPPORTTOOLS' => '/bugs/supportteamtools/', |
|
217
|
|
|
'CODE_DOCS_30X' => '//area51.phpbb.com/docs/code/', |
|
218
|
|
|
'GIT_REPOSITORY' => 'https://github.com/phpbb', |
|
219
|
|
|
'GIT_REPOSITORY_3_0' => 'https://github.com/phpbb/phpbb3', |
|
220
|
|
|
'GIT_REPOSITORY_LATEST' => 'https://github.com/phpbb/phpbb', |
|
221
|
|
|
'CODING_GUIDELINES_3_0' => '//area51.phpbb.com/docs/30x/coding-guidelines.html', |
|
222
|
|
|
'CODING_GUIDELINES' => '//area51.phpbb.com/docs/32x/coding-guidelines.html', |
|
223
|
|
|
|
|
224
|
|
|
'DEV_BOARD' => '//area51.phpbb.com/phpBB/', |
|
225
|
|
|
'DEV_HOME' => '//area51.phpbb.com/', |
|
226
|
|
|
'DEV_PROSILVER' => '/development/prosilver/', |
|
227
|
|
|
'GSOC' => '/development/gsoc/', |
|
228
|
|
|
'DEV_GSOC_IDEAS' => '/development/gsoc/ideas/', |
|
229
|
|
|
'DEV_GSOC_GUIDELINES' => '/development/gsoc/guidelines/', |
|
230
|
|
|
'DEV_GSOC_2012' => 'https://wiki.phpbb.com/GSoC/2012/Ideas', |
|
231
|
|
|
'DEV_GSOC_2013' => 'https://wiki.phpbb.com/GSoC/2013/Ideas', |
|
232
|
|
|
'DEV_GSOC_2014' => 'https://wiki.phpbb.com/GSoC/2014/Ideas', |
|
233
|
|
|
'DEV_GSOC_2015' => 'https://wiki.phpbb.com/GSoC/2015/Ideas', |
|
234
|
|
|
'DEV_GSOC_2016' => 'https://wiki.phpbb.com/GSoC/2016/Ideas', |
|
235
|
|
|
'DEV_QA' => '/development/qa/', |
|
236
|
|
|
//'DEV_QA_CONTACT' => '/community/ucp.php?i=pm&mode=compose&u=' . DEV_QA_CONTACT_ID), |
|
237
|
|
|
'DEV_QA_TOOL' => '/development/qa/release/new', |
|
238
|
|
|
'DEV_QA_30X_BUGLIST' => '/bugs/phpbb3/qa.php', |
|
239
|
|
|
'DEV_WIKI' => 'https://wiki.phpbb.com/', |
|
240
|
|
|
'DEV_IRC_CHAT' => 'https://webchat.freenode.net/?channels=phpbb-dev', |
|
241
|
|
|
|
|
242
|
|
|
'dev_github_phpbb_master' => 'https://github.com/phpbb/phpbb/tree/master', |
|
243
|
|
|
'dev_github_phpbb_32x' => 'https://github.com/phpbb/phpbb/tree/3.2.x', |
|
244
|
|
|
'dev_github_phpbb_31x' => 'https://github.com/phpbb/phpbb/tree/3.1.x', |
|
245
|
|
|
'dev_github_phpbb_30x' => 'https://github.com/phpbb/phpbb/tree/3.0.x', |
|
246
|
|
|
); |
|
247
|
|
|
|
|
248
|
|
|
return $developmentVars; |
|
249
|
|
|
} |
|
250
|
|
|
|
|
251
|
|
|
private function getModsVars() |
|
252
|
|
|
{ |
|
253
|
|
|
$modVars = array( |
|
254
|
|
|
// Bridges |
|
255
|
|
|
'BRIDGES_DB' => '/customise/db/bridges-24', |
|
256
|
|
|
'BRIDGES_POLICIES' => '/mods/bridges/', |
|
257
|
|
|
|
|
258
|
|
|
); |
|
259
|
|
|
|
|
260
|
|
|
return $modVars; |
|
261
|
|
|
} |
|
262
|
|
|
|
|
263
|
|
|
private function getStyleVars() |
|
264
|
|
|
{ |
|
265
|
|
|
$styleVars = array( |
|
266
|
|
|
// To be removed |
|
267
|
|
|
'STYLES' => '/styles/', |
|
268
|
|
|
'STYLES_DB' => '/customise/db/styles-2', |
|
269
|
|
|
|
|
270
|
|
|
// Main pages |
|
271
|
|
|
'styles_create' => '/styles/create/', |
|
272
|
|
|
'styles_changes' => '/styles/changes/', |
|
273
|
|
|
'styles_installing' => '/styles/installing/', |
|
274
|
|
|
|
|
275
|
|
|
// Rules |
|
276
|
|
|
'styles_rules' => '/styles/rules-and-policies/', |
|
277
|
|
|
'styles_rules_submit' => '/styles/rules-and-policies/#a-submission-policy', |
|
278
|
|
|
'styles_rules_submit_32x' => '/styles/rules-and-policies/submission-policy/3.2/', |
|
279
|
|
|
'styles_rules_submit_31x' => '/styles/rules-and-policies/submission-policy/3.1/', |
|
280
|
|
|
'styles_rules_submit_30x' => '/styles/rules-and-policies/submission-policy/3.0/', |
|
281
|
|
|
'styles_rules_dev' => '/styles/rules-and-policies/development-rules/', |
|
282
|
|
|
'styles_rules_feedback_32x' => '/community/viewtopic.php?f=74&p=12931323', |
|
283
|
|
|
'styles_rules_feedback_31x' => '/community/viewtopic.php?f=74&p=12931323', |
|
284
|
|
|
'styles_rules_feedback_30x' => '/community/viewtopic.php?f=74&p=12931323', // TODO: move topic to 3.0 styles? |
|
285
|
|
|
|
|
286
|
|
|
// Other |
|
287
|
|
|
'styles_support' => '/styles/support/', |
|
288
|
|
|
'styles_team_overview' => '/styles/team-overview/', |
|
289
|
|
|
'styles_junior_validators' => '/styles/junior-validators/', |
|
290
|
|
|
'styles_demo' => '/styles/demo/', |
|
291
|
|
|
|
|
292
|
|
|
// Demo pages (handled by Titania) |
|
293
|
|
|
'styles_demo_32x' => '/customise/db/style/prosilver/demo/3.2', |
|
294
|
|
|
'styles_demo_31x' => '/customise/db/style/prosilver/demo/3.1', |
|
295
|
|
|
'styles_demo_30x' => '/customise/db/style/prosilver/demo/3.0', |
|
296
|
|
|
|
|
297
|
|
|
// Styles CDB |
|
298
|
|
|
'styles_db_path' => '/customise/db/styles-2', |
|
299
|
|
|
'styles_gdk_31x_commercial_fonts' => '/customise/db/style/prosilver_gdk_31x_commercial_fonts/', |
|
300
|
|
|
'styles_gdk_31x_free_fonts' => '/customise/db/style/prosilver_gdk_31x_free_fonts/', |
|
301
|
|
|
'styles_gdk_30x_commercial_fonts' => '/customise/db/style/prosilver_gdk_commercial_fonts/', |
|
302
|
|
|
'styles_gdk_30x_free_fonts' => '/customise/db/style/prosilver_gdk_free_fonts/', |
|
303
|
|
|
'styles_gdk_20x' => '/customise/db/style/phpbb_subsilver_gdk/', |
|
304
|
|
|
|
|
305
|
|
|
// Documentation resources |
|
306
|
|
|
'styles_wiki' => 'https://wiki.phpbb.com/Category:Styles', |
|
307
|
|
|
'styles_kb' => '/support/docs/en/3.1/kb/styles/', |
|
308
|
|
|
'styles_kb_31x' => '/support/docs/en/3.1/kb/styles/', |
|
309
|
|
|
'styles_kb_30x' => '/support/docs/en/3.0/kb/styles/', |
|
310
|
|
|
'styles_kb_30x_install' => '/support/docs/en/3.0/kb/article/how-to-install-styles-on-phpbb3/', |
|
311
|
|
|
'styles_kb_30x_create' => '/support/docs/en/3.0/kb/article/how-to-create-a-style-basics/', |
|
312
|
|
|
'styles_docs_31x' => '/support/docs/en/3.1/ug/adminguide/customise_styles/', |
|
313
|
|
|
'styles_docs_30x' => '/support/docs/en/3.0/ug/adminguide/styles/', |
|
314
|
|
|
|
|
315
|
|
|
'styles_team_members' => '/community/memberlist.php?mode=group&g=7332', |
|
316
|
|
|
'styles_jv_team_members' => '/community/memberlist.php?mode=group&g=228778', |
|
317
|
|
|
|
|
318
|
|
|
// Other |
|
319
|
|
|
'styles_db_my_styles' => '/customise/db/author/USERNAME/contributions', // TODO: this dynamic link needs the current username (used on SSP pages) |
|
320
|
|
|
); |
|
321
|
|
|
|
|
322
|
|
|
return $styleVars; |
|
323
|
|
|
} |
|
324
|
|
|
|
|
325
|
|
|
private function getSupportVars() |
|
326
|
|
|
{ |
|
327
|
|
|
$supportVars = array( |
|
328
|
|
|
|
|
329
|
|
|
'DOCUMENTATION_3_0' => '/support/docs/en/3.0/ug/', |
|
330
|
|
|
'QUICK_START_3_0' => '/support/docs/en/3.0/ug/quickstart/', |
|
331
|
|
|
'SUPPORT_FORUMS' => '/support/forums/', |
|
332
|
|
|
|
|
333
|
|
|
'SUPPORT_IRC' => '/support/irc/', |
|
334
|
|
|
'SUPPORT_TUTORIALS' => '/support/tutorials/', |
|
335
|
|
|
'SUPPORT_TUTORIALS_2_0' => '/support/tutorials/2.0/', |
|
336
|
|
|
'SUPPORT_TUTORIALS_3_0' => '/support/tutorials/3.0/', |
|
337
|
|
|
'SUPPORT_INTL' => '/support/intl/', |
|
338
|
|
|
'SUPPORT_INTL_CONTACT' => '/community/ucp.php?i=pm&mode=compose&u=' . self::INTL_CONTACT_ID, |
|
339
|
|
|
'SUPPORT_SRT' => '/support/srt/', |
|
340
|
|
|
'SUPPORT_SRT_FEEDBACK' => '/community/viewtopic.php?f=64&t=1455965', |
|
341
|
|
|
'SUPPORT_SRT_TOPIC' => '/community/viewtopic.php?f=46&t=543515', |
|
342
|
|
|
'SUPPORT_STK' => '/support/stk/', |
|
343
|
|
|
'SUPPORT_STK_INSTALL' => '/support/stk/index.php?mode=instal', |
|
344
|
|
|
'SUPPORT_STK_SCREENS' => '/support/stk/screenshots.php', |
|
345
|
|
|
'SUPPORT_CODE_CHANGES' => '//area51.phpbb.com/code-changes/', |
|
346
|
|
|
|
|
347
|
|
|
'SUPPORT_DOCS' => '/support/docs/', |
|
348
|
|
|
'SUPPORT_DOCS_UG' => '/support/docs/en/3.2/ug/', |
|
349
|
|
|
'SUPPORT_DOCS_KB' => '/support/docs/en/3.2/kb/', |
|
350
|
|
|
'SUPPORT_DOCS_FLASH' => '/support/docs/flash/', |
|
351
|
|
|
); |
|
352
|
|
|
|
|
353
|
|
|
return $supportVars; |
|
354
|
|
|
} |
|
355
|
|
|
|
|
356
|
|
|
private function getExtensionVars() |
|
357
|
|
|
{ |
|
358
|
|
|
$extensionVars = array( |
|
359
|
|
|
'extensions_cdb' => '/customise/db/extensions-36', |
|
360
|
|
|
'extensions_quickinstall' => '/mods/quickinstall/', //replace later |
|
361
|
|
|
'extensions_phpbb_cgs' => '//area51.phpbb.com/docs/31x/coding-guidelines.html', |
|
362
|
|
|
|
|
363
|
|
|
'extensions_rules' => '/extensions/rules-and-policies/', |
|
364
|
|
|
'extensions_recognised_devs' => '/extensions/recognised-developer/', |
|
365
|
|
|
'extensions_offical_exts' => '/extensions/official-extensions/', |
|
366
|
|
|
'extensions_offical_exts_team' => '/extensions/official-extensions/team/', |
|
367
|
|
|
'extensions_junior_validators' => '/extensions/junior-validators/', |
|
368
|
|
|
|
|
369
|
|
|
'extensions_epv' => '/extensions/epv/', |
|
370
|
|
|
'extensions_epv_repo' => 'https://github.com/phpbb/epv', |
|
371
|
|
|
'extensions_epv_bugs' => 'https://tracker.phpbb.com/browse/EXTTOOLS', |
|
372
|
|
|
'extensions_epv_instructions' => '/community/viewtopic.php?f=461&t=2239116', |
|
373
|
|
|
'extensions_installing' => '/extensions/installing/', |
|
374
|
|
|
'extensions_writing' => '/extensions/writing/', |
|
375
|
|
|
'extensions_team_overview' => '/extensions/team-overview/', |
|
376
|
|
|
'extensions_validation_policy' => '/extensions/rules-and-policies/validation-policy', |
|
377
|
|
|
'extensions_instadeny' => '/extensions/rules-and-policies/validation-policy#insta-deny', |
|
378
|
|
|
'extensions_repack' => '/extensions/rules-and-policies/validation-policy#repack', |
|
379
|
|
|
'extensions_rules_dev' => '/extensions/rules-and-policies/development-rules', |
|
380
|
|
|
'extensions_rules_writer' => '/extensions/rules-and-policies/writers-rules', |
|
381
|
|
|
|
|
382
|
|
|
'extensions_docs_31' => 'https://area51.phpbb.com/docs/dev/3.1.x/extensions/', |
|
383
|
|
|
'extensions_docs_32' => 'https://area51.phpbb.com/docs/dev/3.2.x/extensions/', |
|
384
|
|
|
'extensions_docs_basics' => 'https://area51.phpbb.com/docs/dev/3.2.x/extensions/tutorial_basics.html', |
|
385
|
|
|
'extensions_docs_key_concepts' => 'https://area51.phpbb.com/docs/dev/3.2.x/extensions/tutorial_key_concepts.html', |
|
386
|
|
|
'extensions_docs_modules' => 'https://area51.phpbb.com/docs/dev/3.2.x/extensions/tutorial_modules.html', |
|
387
|
|
|
|
|
388
|
|
|
'extensions_security_tracker' => 'https://tracker.phpbb.com/browse/EXTSEC', |
|
389
|
|
|
|
|
390
|
|
|
'extension_quickstart_zip' => '/store/quickstart_extension_1.0.0.zip', |
|
391
|
|
|
'extension_skeleton' => 'https://www.phpbb.com/customise/db/official_tool/ext_skeleton/', |
|
392
|
|
|
|
|
393
|
|
|
// Team members |
|
394
|
|
|
'extension_team_members' => '/community/memberlist.php?mode=group&g=7331', |
|
395
|
|
|
'extension_dev_team_members' => '/community/memberlist.php?mode=group&g=228787', |
|
396
|
|
|
'extension_jv_team_members' => '/community/memberlist.php?mode=group&g=228685', |
|
397
|
|
|
); |
|
398
|
|
|
|
|
399
|
|
|
return $extensionVars; |
|
400
|
|
|
} |
|
401
|
|
|
|
|
402
|
|
|
private function getForumVars() |
|
403
|
|
|
{ |
|
404
|
|
|
$forumVars = array( |
|
405
|
|
|
'FORUM_30X_SUPPORT' => '/community/viewforum.php?f=46', |
|
406
|
|
|
'FORUM_PHPBBDISC' => '/community/viewforum.php?f=64', |
|
407
|
|
|
'FORUM_SEARCH_EVENTS' => '/community/search.php?keywords=%5BEVENT%5D&terms=all&fid%5B%5D=64&sc=1&sf=titleonly&sr=topics&sk=t&sd=d&st=0&ch=300&t=0&submit=Search', |
|
408
|
|
|
|
|
409
|
|
|
// Styles Forum |
|
410
|
|
|
'FORUM_STYLES' => '/community/viewforum.php?f=77', |
|
411
|
|
|
'FORUM_STYLES_SUPPORT_30X' => '/community/viewforum.php?f=74', |
|
412
|
|
|
'FORUM_STYLES_SUPPORT_20X' => '/community/viewforum.php?f=23', |
|
413
|
|
|
'FORUM_STYLES_DEV_30X' => '/community/viewforum.php?f=185', |
|
414
|
|
|
'FORUM_STYLES_30X' => '/community/viewforum.php?f=80', |
|
415
|
|
|
|
|
416
|
|
|
'forum_styles_32x' => '/community/viewforum.php?f=471', |
|
417
|
|
|
'forum_styles_32x_support' => '/community/viewforum.php?f=591', |
|
418
|
|
|
'forum_styles_32x_dev' => '/community/viewforum.php?f=596', |
|
419
|
|
|
'forum_styles_31x' => '/community/viewforum.php?f=471', |
|
420
|
|
|
'forum_styles_31x_support' => '/community/viewforum.php?f=481', |
|
421
|
|
|
'forum_styles_31x_dev' => '/community/viewforum.php?f=476', |
|
422
|
|
|
'forum_styles_30x' => '/community/viewforum.php?f=80', |
|
423
|
|
|
'forum_styles_30x_support' => '/community/viewforum.php?f=74', |
|
424
|
|
|
'forum_styles_30x_dev' => '/community/viewforum.php?f=185', |
|
425
|
|
|
'forum_styles_20x' => '/community/viewforum.php?f=77', |
|
426
|
|
|
'forum_styles_20x_support' => '/community/viewforum.php?f=74', |
|
427
|
|
|
'forum_styles_20x_dev' => '/community/viewforum.php?f=23', |
|
428
|
|
|
|
|
429
|
|
|
// Modification Forums |
|
430
|
|
|
'FORUM_MODS' => '/community/viewforum.php?f=78', |
|
431
|
|
|
'FORUM_MODS_OLYMPUS' => '/community/viewforum.php?f=81', |
|
432
|
|
|
'FORUM_MODS_30X' => '/community/viewforum.php?f=81', |
|
433
|
|
|
'MODS_DEVELOPMENT_FORUM_30X' => '/community/viewforum.php?f=70', |
|
434
|
|
|
'MODS_DATABASE_RELEASES_30X' => '/community/viewforum.php?f=69', |
|
435
|
|
|
'MODS_REQUESTS_FORUM_30X' => '/community/viewforum.php?f=72', |
|
436
|
|
|
'MODS_WRITERS_FORUM_30X' => '/community/viewforum.php?f=71', |
|
437
|
|
|
|
|
438
|
|
|
'forum_extensions_31x' => '/community/viewforum.php?f=451', |
|
439
|
|
|
'forum_extensions_req' => '/community/viewforum.php?f=496', |
|
440
|
|
|
'forum_extensions_31x_dev' => '/community/viewforum.php?f=456', |
|
441
|
|
|
'forum_extensions_31x_writers' => '/community/viewforum.php?f=461', |
|
442
|
|
|
'extensions_writers_discussion' => '/community/viewforum.php?f=461', |
|
443
|
|
|
|
|
444
|
|
|
'FORUM_SUPPORT' => '/community/viewforum.php?f=46', |
|
445
|
|
|
'FORUM_STYLES_CAT' => '/community/viewforum.php?f=80', |
|
446
|
|
|
'FORUM_MODS_CAT' => '/community/viewforum.php?f=81', |
|
447
|
|
|
|
|
448
|
|
|
'FORUM_EVENTS' => '/community/viewforum.php?f=105', |
|
449
|
|
|
'FORUM_GENDISC' => '/community/viewforum.php?f=6', |
|
450
|
|
|
|
|
451
|
|
|
'U_FORUM_SUPPORT_SUB' => '/community/viewforum.php?f=551', |
|
452
|
|
|
'U_FORUM_STYLES_SUB' => '/community/viewforum.php?f=471', |
|
453
|
|
|
'U_FORUM_MODS_SUB' => '/community/viewforum.php?f=81', |
|
454
|
|
|
'U_FORUM_EXT_SUB' => '/community/viewforum.php?f=451', |
|
455
|
|
|
'U_FORUM_PHPBBDISC_SUB' => '/community/viewforum.php?f=64', |
|
456
|
|
|
'U_FORUM_EVENTS_SUB' => '/community/viewforum.php?f=105', |
|
457
|
|
|
'U_FORUM_GENDISC_SUB' => '/community/viewforum.php?f=6', |
|
458
|
|
|
'U_FORUM_PRIVATE_SUB' => '/community/viewforum.php?f=53', |
|
459
|
|
|
); |
|
460
|
|
|
|
|
461
|
|
|
return $forumVars; |
|
462
|
|
|
} |
|
463
|
|
|
|
|
464
|
|
|
private function getPeopleVars() |
|
465
|
|
|
{ |
|
466
|
|
|
$peopleVars = array( |
|
467
|
|
|
'SUPPORT_TL_NAME' => 'Noxwizard', |
|
468
|
|
|
'SUPPORT_TL_CONTACT' => '/community/memberlist.php?mode=viewprofile&u=192443', |
|
469
|
|
|
'SUPPORT_DOCS_NAME' => 'stevemaury', |
|
470
|
|
|
'SUPPORT_DOCS_CONTACT' => '/community/memberlist.php?mode=viewprofile&u=280664', |
|
471
|
|
|
'styles_tl_name' => 'DavidIQ', |
|
472
|
|
|
'styles_tl_contact' => '/community/memberlist.php?mode=viewprofile&u=159755', |
|
473
|
|
|
'WEBSITE_TL_NAME' => 'Paul', |
|
474
|
|
|
'WEBSITE_TL_CONTACT' => '/community/memberlist.php?mode=viewprofile&u=153860', |
|
475
|
|
|
'ext_dev_tl_name' => 'VSE', |
|
476
|
|
|
'ext_dev_tl_contact' => '/community/memberlist.php?mode=viewprofile&u=868795', |
|
477
|
|
|
'ext_tl_name' => 'DavidIQ', |
|
478
|
|
|
'ext_tl_contact' => '/community/memberlist.php?mode=viewprofile&u=159755', |
|
479
|
|
|
'moderator_team' => '/community/memberlist.php?mode=group&g=993', |
|
480
|
|
|
); |
|
481
|
|
|
|
|
482
|
|
|
return $peopleVars; |
|
483
|
|
|
} |
|
484
|
|
|
|
|
485
|
|
|
private function getMiscVars() |
|
486
|
|
|
{ |
|
487
|
|
|
$miscVars = array( |
|
488
|
|
|
'package_version' => '3.2.1', |
|
489
|
|
|
'package_release_date' => '2017-07-16', |
|
490
|
|
|
'PACKAGE_VERSION' => '3.2.1', |
|
491
|
|
|
'PACKAGE_ANNOUNCE_URL' => '/community/viewtopic.php?f=14&t=2430926', |
|
492
|
|
|
'PACKAGE_RELEASE_DATE' => '2017-07-16', |
|
493
|
|
|
|
|
494
|
|
|
'bot' => false, // @TODO Set this to true for bots // Usage = 1 |
|
495
|
|
|
'is_on_team' => false, // @TODO Set this up to use sessions management and see if they are on the team |
|
496
|
|
|
|
|
497
|
|
|
'ROOT_PATH' => '/', |
|
498
|
|
|
'THEME_PATH' => '/theme', |
|
499
|
|
|
'FAVICON_PATH' => '/assets/images/images/favicons', |
|
500
|
|
|
'YEAR' => date('Y'), |
|
501
|
|
|
'ON_TEAM' => false, |
|
502
|
|
|
|
|
503
|
|
|
'HOME' => '/', |
|
504
|
|
|
|
|
505
|
|
|
'CONTACT' => '/contact/', |
|
506
|
|
|
|
|
507
|
|
|
// Old KB - Remove after the conversion |
|
508
|
|
|
'KB_PHPBB_TEAM' => '/community/memberlist.php?mode=leaders', |
|
509
|
|
|
|
|
510
|
|
|
'LONDONVASION_POST' => '/community/viewtopic.php?f=14&t=1058455', |
|
511
|
|
|
'LONDONVASION' => '/londonvasion/', |
|
512
|
|
|
'LIBERTYVASION' => '/libertyvasion/', |
|
513
|
|
|
'CHANGELOG' => '/support/documents.php?mode=changelog&version=3', |
|
514
|
|
|
'INSTALL_DOCUMENT' => '/support/documents.php?mode=install&version=3', |
|
515
|
|
|
'LICENSE' => '/downloads/license/', |
|
516
|
|
|
'OFFICIAL_TOOLS' => '/customise/db/official_tools-23', |
|
517
|
|
|
|
|
518
|
|
|
'SHOWCASE_SUGGEST' => '/showcase/suggest/', |
|
519
|
|
|
|
|
520
|
|
|
'languages_path' => '/languages/', |
|
521
|
|
|
'LANGUAGES_SUB' => '/languages/', |
|
522
|
|
|
|
|
523
|
|
|
'ABOUT_ADMIN' => '/about/team/adm/', |
|
524
|
|
|
'ABOUT_ADMIN_USERS' => '/about/team/adm/users.php', |
|
525
|
|
|
'ABOUT_ADMIN_TEAMS' => '/about/team/adm/teams.php', |
|
526
|
|
|
'ABOUT_ADMIN_LOG' => '/about/team/adm/log.php', |
|
527
|
|
|
|
|
528
|
|
|
// about history |
|
529
|
|
|
'NO_PHPBB2_2' => '/community/viewtopic.php?t=256072', |
|
530
|
|
|
'PHPBBCOM_NEW_WEBSITE' => '/community/viewtopic.php?t=543015', |
|
531
|
|
|
'FIRST_RC_30X' => '/community/viewtopic.php?t=615945', |
|
532
|
|
|
|
|
533
|
|
|
// URLS to mailing list |
|
534
|
|
|
'LISTS_SUBSCRIBE' => 'http://lists.phpbb.com/mailman/subscribe/phpbb-announce', // Usage = 1 |
|
535
|
|
|
|
|
536
|
|
|
// Languages |
|
537
|
|
|
'LANGUAGES_HOWTO' => '/community/viewtopic.php?f=66&t=1858645', |
|
538
|
|
|
|
|
539
|
|
|
'COMMUNITY' => '/community/', |
|
540
|
|
|
'RULES' => '/rules/', |
|
541
|
|
|
'MODS_RULES' => '/mods/rules/', |
|
542
|
|
|
'GOOGLECSE' => '/search/', |
|
543
|
|
|
'community_search' => '/community/search.php', |
|
544
|
|
|
'ADVERTISE' => '/about/advertise/', |
|
545
|
|
|
'LANGUAGES_30X' => '/languages/', |
|
546
|
|
|
'LANGUAGES_20X' => '/languages/?type=20x', |
|
547
|
|
|
|
|
548
|
|
|
'HOSTING' => '/hosting/', |
|
549
|
|
|
'HOSTING_FROM_DOWNLOADS' => '/hosting/?from=downloads', |
|
550
|
|
|
|
|
551
|
|
|
// retired 2.0.x |
|
552
|
|
|
'RETIRED_2X' => '/community/viewtopic.php?f=14&t=1385785', |
|
553
|
|
|
|
|
554
|
|
|
// URLs to news feeds |
|
555
|
|
|
'FEEDS_DEFAULT' => '/feeds/', |
|
556
|
|
|
'FEEDS_ATOM' => '/feeds/atom/', |
|
557
|
|
|
|
|
558
|
|
|
// Social Media sites |
|
559
|
|
|
'FACEBOOK' => 'http://www.facebook.com/phpBB', |
|
560
|
|
|
'TWITTER' => 'http://www.twitter.com/phpbb', |
|
561
|
|
|
// phpBB Demo |
|
562
|
|
|
'DEMO_30X' => 'http://try-phpbb.com/30x', |
|
563
|
|
|
'demo_31x' => 'http://try-phpbb.com/31x', |
|
564
|
|
|
'demo_32x' => 'http://try-phpbb.com/32x', |
|
565
|
|
|
'latest_demo' => 'http://try-phpbb.com/32x', |
|
566
|
|
|
|
|
567
|
|
|
'MANAGEMENT_TEAM' => '/community/memberlist.php?mode=group&g=13330', |
|
568
|
|
|
); |
|
569
|
|
|
|
|
570
|
|
|
return $miscVars; |
|
571
|
|
|
} |
|
572
|
|
|
|
|
573
|
|
|
public function getLegacyVars() |
|
574
|
|
|
{ |
|
575
|
|
|
$legacyVars = array( |
|
576
|
|
|
'U_ABOUT' => '/about/', |
|
577
|
|
|
'U_ABOUT_FEATURES_SUB' => '/about/features/', |
|
578
|
|
|
'U_ABOUT_HISTORY_SUB' => '/about/history/', |
|
579
|
|
|
'U_ABOUT_GETINVOLVED_SUB' => '/get-involved/', |
|
580
|
|
|
'U_ABOUT_TEAM_SUB' => '/about/team/', |
|
581
|
|
|
'U_ABOUT_CONTACT_SUB' => '/about/contact/', |
|
582
|
|
|
'U_ABOUT_ADVERTISE_SUB' => '/about/advertise/', |
|
583
|
|
|
'U_ABOUT_LAUNCH_SUB' => '/about/launch/', |
|
584
|
|
|
|
|
585
|
|
|
'U_DOWNLOADS_HEADER' => '/downloads/?from=header', |
|
586
|
|
|
'U_DOWNLOADS_SUB' => '/downloads/', |
|
587
|
|
|
'U_DOWNLOADS_UPDATE_SUB' => '/downloads/#update', |
|
588
|
|
|
'U_STYLES_DB_SUB' => '/customise/db/styles-2', |
|
589
|
|
|
'U_LANGUAGES_SUB' => '/languages/', |
|
590
|
|
|
|
|
591
|
|
|
'U_CUSTOMISE' => '/customise/', |
|
592
|
|
|
'U_CDB_SUB' => '/customise/db/', |
|
593
|
|
|
'U_EXT_SUB' => '/extensions/', |
|
594
|
|
|
'U_EXT_DB_SUB' => '/customise/db/extensions-36', |
|
595
|
|
|
'U_MODS_SUB' => '/mods/', |
|
596
|
|
|
'U_MODS_DB_SUB' => '/customise/db/modifications-1', |
|
597
|
|
|
'U_STYLES_SUB' => '/styles/', |
|
598
|
|
|
'U_STYLES_DEMO_SUB' => '/styles/demo/3.0/', |
|
599
|
|
|
|
|
600
|
|
|
'U_SUPPORT_DOCS_SUB' => '/support/docs/', |
|
601
|
|
|
'U_SUPPORT_KB_SUB' => '/support/docs/en/3.1/kb/', |
|
602
|
|
|
'U_SUPPORT_IRC_SUB' => '/support/irc/', |
|
603
|
|
|
'U_SUPPORT_TUTORIALS_SUB' => '/support/tutorials/3.0/', |
|
604
|
|
|
'U_SUPPORT_FORUMS_SUB' => '/community/viewforum.php?f=551', |
|
605
|
|
|
'U_SUPPORT_INTL_SUB' => '/support/intl/', |
|
606
|
|
|
|
|
607
|
|
|
'U_DEVELOPMENT' => '/development/', |
|
608
|
|
|
'U_DEV_WIKI_SUB' => 'https://wiki.phpbb.com/', |
|
609
|
|
|
'U_DEV_GI_SUB' => '/development/get-involved/', |
|
610
|
|
|
'U_BUGS_SUB' => '/bugs/', |
|
611
|
|
|
'U_BUGS_PHPBB_SUB' => 'http://tracker.phpbb.com/', |
|
612
|
|
|
'U_SECURITY_SUB' => '/security/', |
|
613
|
|
|
'U_DEV_HOME_SUB' => '//area51.phpbb.com/', |
|
614
|
|
|
'U_DEV_GSOC_SUB' => '/development/gsoc', |
|
615
|
|
|
|
|
616
|
|
|
'U_IDEAS' => '/community/ideas', |
|
617
|
|
|
|
|
618
|
|
|
'U_FORUM_INDEX_SUB' => '/community/', |
|
619
|
|
|
'U_ABOUT_INDEX_SUB' => '/about/', |
|
620
|
|
|
'U_CUSTOMISE_INDEX_SUB' => '/customise/', |
|
621
|
|
|
'U_SUPPORT_INDEX_SUB' => '/support/', |
|
622
|
|
|
'U_DEV_INDEX_SUB' => '/development/', |
|
623
|
|
|
|
|
624
|
|
|
'U_CDB_MOD_SUPPORT' => '/customise/db/support/modifications-1', // TODO: remove (used in support_forums.html) |
|
625
|
|
|
'U_CDB_STYLE_SUPPORT' => '/customise/db/support/styles-2', // TODO: remove |
|
626
|
|
|
'U_CDB_CONVERTOR_SUPPORT' => '/customise/db/support/converter/', // TODO: remove (used in support_forums.html) |
|
627
|
|
|
'U_CDB_TRANSLATION_SUPPORT' => '/customise/db/support/translation/', // TODO: remove |
|
628
|
|
|
|
|
629
|
|
|
'U_DEMO' => '/demo/', |
|
630
|
|
|
'U_SHOWCASE' => '/showcase/', |
|
631
|
|
|
'U_DOWNLOADS' => '/downloads/', |
|
632
|
|
|
'U_OFFICIAL_TOOLS' => '/customise/db/official_tools-23', |
|
633
|
|
|
'U_SUPPORT' => '/support/', |
|
634
|
|
|
'U_BLOG' => '//blog.phpbb.com/', |
|
635
|
|
|
'U_COMMUNITY' => '/community/', |
|
636
|
|
|
'U_DEV_BOARD' => '//area51.phpbb.com/phpBB/', |
|
637
|
|
|
'U_HOSTING' => '/hosting/', |
|
638
|
|
|
); |
|
639
|
|
|
|
|
640
|
|
|
return $legacyVars; |
|
641
|
|
|
} |
|
642
|
|
|
} |
|
643
|
|
|
|