GlobalsExtension::getName()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
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_GSOC_2017'		=> '/development/gsoc/ideas/2017/',
236
			'DEV_QA'				=> '/development/qa/',
237
			//'DEV_QA_CONTACT'		=> '/community/ucp.php?i=pm&amp;mode=compose&amp;u=' . DEV_QA_CONTACT_ID),
238
			'DEV_QA_TOOL'			=> '/development/qa/release/new',
239
			'DEV_QA_30X_BUGLIST'	=> '/bugs/phpbb3/qa.php',
240
			'DEV_WIKI'			=> 'https://wiki.phpbb.com/',
241
			'DEV_IRC_CHAT'		=> 'https://webchat.freenode.net/?channels=phpbb-dev',
242
243
			'dev_github_phpbb_master' => 'https://github.com/phpbb/phpbb/tree/master',
244
			'dev_github_phpbb_32x' => 'https://github.com/phpbb/phpbb/tree/3.2.x',
245
			'dev_github_phpbb_31x' => 'https://github.com/phpbb/phpbb/tree/3.1.x',
246
			'dev_github_phpbb_30x' => 'https://github.com/phpbb/phpbb/tree/3.0.x',
247
		);
248
249
		return $developmentVars;
250
	}
251
252
	private function getModsVars()
253
	{
254
		$modVars = array(
255
			// Bridges
256
			'BRIDGES_DB'				=> '/customise/db/bridges-24',
257
			'BRIDGES_POLICIES'	=> '/mods/bridges/',
258
259
		);
260
261
		return $modVars;
262
	}
263
264
	private function getStyleVars()
265
	{
266
		$styleVars = array(
267
			// To be removed
268
			'STYLES'							=> '/styles/',
269
			'STYLES_DB'							=> '/customise/db/styles-2',
270
271
			// Main pages
272
			'styles_create'						=> '/styles/create/',
273
			'styles_changes'					=> '/styles/changes/',
274
			'styles_installing'					=> '/styles/installing/',
275
276
			// Rules
277
			'styles_rules'						=> '/styles/rules-and-policies/',
278
			'styles_rules_submit'				=> '/styles/rules-and-policies/#a-submission-policy',
279
			'styles_rules_submit_32x'			=> '/styles/rules-and-policies/submission-policy/3.2/',
280
			'styles_rules_submit_31x'			=> '/styles/rules-and-policies/submission-policy/3.1/',
281
			'styles_rules_submit_30x'			=> '/styles/rules-and-policies/submission-policy/3.0/',
282
			'styles_rules_dev'					=> '/styles/rules-and-policies/development-rules/',
283
			'styles_rules_feedback_32x'			=> '/community/viewtopic.php?f=74&p=12931323',
284
			'styles_rules_feedback_31x'			=> '/community/viewtopic.php?f=74&p=12931323',
285
			'styles_rules_feedback_30x'			=> '/community/viewtopic.php?f=74&p=12931323', // TODO: move topic to 3.0 styles?
286
287
			// Other
288
			'styles_support'					=> '/styles/support/',
289
			'styles_team_overview'				=> '/styles/team-overview/',
290
			'styles_junior_validators'			=> '/styles/junior-validators/',
291
			'styles_demo'						=> '/styles/demo/',
292
293
			// Demo pages (handled by Titania)
294
			'styles_demo_32x'					=> '/customise/db/style/prosilver/demo/3.2',
295
			'styles_demo_31x'					=> '/customise/db/style/prosilver/demo/3.1',
296
			'styles_demo_30x'					=> '/customise/db/style/prosilver/demo/3.0',
297
298
			// Styles CDB
299
			'styles_db_path'					=> '/customise/db/styles-2',
300
			'styles_gdk_31x_commercial_fonts'	=> '/customise/db/style/prosilver_gdk_31x_commercial_fonts/',
301
			'styles_gdk_31x_free_fonts'			=> '/customise/db/style/prosilver_gdk_31x_free_fonts/',
302
			'styles_gdk_30x_commercial_fonts'	=> '/customise/db/style/prosilver_gdk_commercial_fonts/',
303
			'styles_gdk_30x_free_fonts'			=> '/customise/db/style/prosilver_gdk_free_fonts/',
304
			'styles_gdk_20x'					=> '/customise/db/style/phpbb_subsilver_gdk/',
305
306
			// Documentation resources
307
			'styles_wiki'						=> 'https://wiki.phpbb.com/Category:Styles',
308
			'styles_kb'							=> '/support/docs/en/3.1/kb/styles/',
309
			'styles_kb_31x'						=> '/support/docs/en/3.1/kb/styles/',
310
			'styles_kb_30x'						=> '/support/docs/en/3.0/kb/styles/',
311
			'styles_kb_30x_install'				=> '/support/docs/en/3.0/kb/article/how-to-install-styles-on-phpbb3/',
312
			'styles_kb_30x_create'				=> '/support/docs/en/3.0/kb/article/how-to-create-a-style-basics/',
313
			'styles_docs_31x'					=> '/support/docs/en/3.1/ug/adminguide/customise_styles/',
314
			'styles_docs_30x'					=> '/support/docs/en/3.0/ug/adminguide/styles/',
315
316
			'styles_team_members'				=> '/community/memberlist.php?mode=group&g=7332',
317
			'styles_jv_team_members'			=> '/community/memberlist.php?mode=group&g=228778',
318
319
			// Other
320
			'styles_db_my_styles'				=> '/customise/db/author/USERNAME/contributions', // TODO: this dynamic link needs the current username (used on SSP pages)
321
		);
322
323
		return $styleVars;
324
	}
325
326
	private function getSupportVars()
327
	{
328
		$supportVars = array(
329
330
			'DOCUMENTATION_3_0'	=> '/support/docs/en/3.0/ug/',
331
			'QUICK_START_3_0'		=> '/support/docs/en/3.0/ug/quickstart/',
332
			'SUPPORT_FORUMS'		=> '/support/forums/',
333
334
			'SUPPORT_IRC'				=> '/support/irc/',
335
			'SUPPORT_TUTORIALS'		=> '/support/tutorials/',
336
			'SUPPORT_TUTORIALS_2_0'	=> '/support/tutorials/2.0/',
337
			'SUPPORT_TUTORIALS_3_0'	=> '/support/tutorials/3.0/',
338
			'SUPPORT_INTL'			=> '/support/intl/',
339
			'SUPPORT_INTL_CONTACT'	=> '/community/ucp.php?i=pm&mode=compose&u=' . self::INTL_CONTACT_ID,
340
			'SUPPORT_SRT'				=> '/support/srt/',
341
			'SUPPORT_SRT_FEEDBACK'	=> '/community/viewtopic.php?f=64&amp;t=1455965',
342
			'SUPPORT_SRT_TOPIC'		=> '/community/viewtopic.php?f=46&amp;t=543515',
343
			'SUPPORT_STK'				=> '/support/stk/',
344
			'SUPPORT_STK_INSTALL'		=> '/support/stk/index.php?mode=instal',
345
			'SUPPORT_STK_SCREENS'		=> '/support/stk/screenshots.php',
346
			'SUPPORT_CODE_CHANGES'	=> '//area51.phpbb.com/code-changes/',
347
348
			'SUPPORT_DOCS'			=> '/support/docs/',
349
			'SUPPORT_DOCS_UG'			=> '/support/docs/en/3.2/ug/',
350
			'SUPPORT_DOCS_KB'			=> '/support/docs/en/3.2/kb/',
351
			'SUPPORT_DOCS_FLASH'		=> '/support/docs/flash/',
352
		);
353
354
		return $supportVars;
355
	}
356
357
	private function getExtensionVars()
358
	{
359
		$extensionVars = array(
360
			'extensions_cdb'						=> '/customise/db/extensions-36',
361
			'extensions_quickinstall'				=> '/mods/quickinstall/', //replace later
362
			'extensions_phpbb_cgs'					=> '//area51.phpbb.com/docs/31x/coding-guidelines.html',
363
364
			'extensions_rules'						=> '/extensions/rules-and-policies/',
365
			'extensions_recognised_devs'			=> '/extensions/recognised-developer/',
366
			'extensions_offical_exts'				=> '/extensions/official-extensions/',
367
			'extensions_offical_exts_team'			=> '/extensions/official-extensions/team/',
368
			'extensions_junior_validators'			=> '/extensions/junior-validators/',
369
370
			'extensions_epv'						=> '/extensions/epv/',
371
			'extensions_epv_repo'					=> 'https://github.com/phpbb/epv',
372
			'extensions_epv_bugs'					=> 'https://tracker.phpbb.com/browse/EXTTOOLS',
373
			'extensions_epv_instructions'			=> '/community/viewtopic.php?f=461&t=2239116',
374
			'extensions_installing'					=> '/extensions/installing/',
375
			'extensions_writing'					=> '/extensions/writing/',
376
			'extensions_team_overview'				=> '/extensions/team-overview/',
377
			'extensions_validation_policy'			=> '/extensions/rules-and-policies/validation-policy',
378
			'extensions_instadeny'					=> '/extensions/rules-and-policies/validation-policy#insta-deny',
379
			'extensions_repack'						=> '/extensions/rules-and-policies/validation-policy#repack',
380
			'extensions_rules_dev'					=> '/extensions/rules-and-policies/development-rules',
381
			'extensions_rules_writer'				=> '/extensions/rules-and-policies/writers-rules',
382
383
			'extensions_docs_31'					=> 'https://area51.phpbb.com/docs/dev/3.1.x/extensions/',
384
			'extensions_docs_32'					=> 'https://area51.phpbb.com/docs/dev/3.2.x/extensions/',
385
			'extensions_docs_basics'				=> 'https://area51.phpbb.com/docs/dev/3.2.x/extensions/tutorial_basics.html',
386
			'extensions_docs_key_concepts'			=> 'https://area51.phpbb.com/docs/dev/3.2.x/extensions/tutorial_key_concepts.html',
387
			'extensions_docs_modules'				=> 'https://area51.phpbb.com/docs/dev/3.2.x/extensions/tutorial_modules.html',
388
389
			'extensions_security_tracker'			=> 'https://tracker.phpbb.com/browse/EXTSEC',
390
391
			'extension_quickstart_zip'				=> '/store/quickstart_extension_1.0.0.zip',
392
			'extension_skeleton'					=> 'https://www.phpbb.com/customise/db/official_tool/ext_skeleton/',
393
394
			// Team members
395
			'extension_team_members'				=> '/community/memberlist.php?mode=group&g=7331',
396
			'extension_dev_team_members'			=> '/community/memberlist.php?mode=group&g=228787',
397
			'extension_jv_team_members'				=> '/community/memberlist.php?mode=group&g=228685',
398
		);
399
400
		return $extensionVars;
401
	}
402
403
	private function getForumVars()
404
	{
405
		$forumVars = array(
406
			'FORUM_30X_SUPPORT'	=> '/community/viewforum.php?f=46',
407
			'FORUM_PHPBBDISC'		=> '/community/viewforum.php?f=64',
408
			'FORUM_SEARCH_EVENTS'	=> '/community/search.php?keywords=%5BEVENT%5D&amp;terms=all&amp;fid%5B%5D=64&amp;sc=1&amp;sf=titleonly&amp;sr=topics&amp;sk=t&amp;sd=d&amp;st=0&amp;ch=300&amp;t=0&amp;submit=Search',
409
410
			// Styles Forum
411
			'FORUM_STYLES'				=> '/community/viewforum.php?f=77',
412
			'FORUM_STYLES_SUPPORT_30X'	=> '/community/viewforum.php?f=74',
413
			'FORUM_STYLES_SUPPORT_20X'	=> '/community/viewforum.php?f=23',
414
			'FORUM_STYLES_DEV_30X'		=> '/community/viewforum.php?f=185',
415
			'FORUM_STYLES_30X'			=> '/community/viewforum.php?f=80',
416
417
			'forum_styles_32x'		 => '/community/viewforum.php?f=471',
418
			'forum_styles_32x_support' => '/community/viewforum.php?f=591',
419
			'forum_styles_32x_dev'	 => '/community/viewforum.php?f=596',
420
			'forum_styles_31x'		 => '/community/viewforum.php?f=471',
421
			'forum_styles_31x_support' => '/community/viewforum.php?f=481',
422
			'forum_styles_31x_dev'	 => '/community/viewforum.php?f=476',
423
			'forum_styles_30x'		 => '/community/viewforum.php?f=80',
424
			'forum_styles_30x_support' => '/community/viewforum.php?f=74',
425
			'forum_styles_30x_dev'	 => '/community/viewforum.php?f=185',
426
			'forum_styles_20x'		 => '/community/viewforum.php?f=77',
427
			'forum_styles_20x_support' => '/community/viewforum.php?f=74',
428
			'forum_styles_20x_dev'	 => '/community/viewforum.php?f=23',
429
430
			// Modification Forums
431
			'FORUM_MODS'					=> '/community/viewforum.php?f=78',
432
			'FORUM_MODS_OLYMPUS'				=> '/community/viewforum.php?f=81',
433
			'FORUM_MODS_30X'				=> '/community/viewforum.php?f=81',
434
			'MODS_DEVELOPMENT_FORUM_30X'	=> '/community/viewforum.php?f=70',
435
			'MODS_DATABASE_RELEASES_30X'	=> '/community/viewforum.php?f=69',
436
			'MODS_REQUESTS_FORUM_30X'		=> '/community/viewforum.php?f=72',
437
			'MODS_WRITERS_FORUM_30X'		=> '/community/viewforum.php?f=71',
438
439
			'forum_extensions_31x'			=> '/community/viewforum.php?f=451',
440
			'forum_extensions_req'			=> '/community/viewforum.php?f=496',
441
			'forum_extensions_31x_dev'		=> '/community/viewforum.php?f=456',
442
			'forum_extensions_31x_writers'	=> '/community/viewforum.php?f=461',
443
			'extensions_writers_discussion'		 => '/community/viewforum.php?f=461',
444
445
			'FORUM_SUPPORT'				=> '/community/viewforum.php?f=46',
446
			'FORUM_STYLES_CAT'			=> '/community/viewforum.php?f=80',
447
			'FORUM_MODS_CAT'			=> '/community/viewforum.php?f=81',
448
449
			'FORUM_EVENTS'				=> '/community/viewforum.php?f=105',
450
			'FORUM_GENDISC'				=> '/community/viewforum.php?f=6',
451
452
			'U_FORUM_SUPPORT_SUB'				=> '/community/viewforum.php?f=551',
453
			'U_FORUM_STYLES_SUB'				=> '/community/viewforum.php?f=471',
454
			'U_FORUM_MODS_SUB'					=> '/community/viewforum.php?f=81',
455
			'U_FORUM_EXT_SUB'					=> '/community/viewforum.php?f=451',
456
			'U_FORUM_PHPBBDISC_SUB'				=> '/community/viewforum.php?f=64',
457
			'U_FORUM_EVENTS_SUB'				=> '/community/viewforum.php?f=105',
458
			'U_FORUM_GENDISC_SUB'				=> '/community/viewforum.php?f=6',
459
			'U_FORUM_PRIVATE_SUB'				=> '/community/viewforum.php?f=53',
460
		);
461
462
		return $forumVars;
463
	}
464
465
	private function getPeopleVars()
466
	{
467
		$peopleVars = array(
468
			'SUPPORT_TL_NAME'		=> 'Noxwizard',
469
			'SUPPORT_TL_CONTACT'	=> '/community/memberlist.php?mode=viewprofile&u=192443',
470
			'SUPPORT_DOCS_NAME'		=> 'stevemaury',
471
			'SUPPORT_DOCS_CONTACT'	=> '/community/memberlist.php?mode=viewprofile&u=280664',
472
			'styles_tl_name'		=> 'DavidIQ',
473
			'styles_tl_contact'		=> '/community/memberlist.php?mode=viewprofile&u=159755',
474
			'WEBSITE_TL_NAME'		=> 'Paul',
475
			'WEBSITE_TL_CONTACT'	=> '/community/memberlist.php?mode=viewprofile&u=153860',
476
			'ext_dev_tl_name'		=> 'VSE',
477
			'ext_dev_tl_contact'	=> '/community/memberlist.php?mode=viewprofile&u=868795',
478
			'ext_tl_name'			=> 'DavidIQ',
479
			'ext_tl_contact'		=> '/community/memberlist.php?mode=viewprofile&u=159755',
480
			'moderator_team'        => '/community/memberlist.php?mode=group&g=993',
481
		);
482
483
		return $peopleVars;
484
	}
485
486
	private function getMiscVars()
487
	{
488
		$miscVars = array(
489
			'package_version'		=> '3.2.2',
490
			'package_release_date'	=> '2018-01-07',
491
			'PACKAGE_VERSION'		=> '3.2.2',
492
			'PACKAGE_ANNOUNCE_URL'	=> '/community/viewtopic.php?f=14&t=2453381',
493
			'PACKAGE_RELEASE_DATE'	=> '2018-01-07',
494
495
			'bot'					=> false, // @TODO Set this to true for bots // Usage = 1
496
			'is_on_team'			=> false, // @TODO Set this up to use sessions management and see if they are on the team
497
498
			'ROOT_PATH'			=> '/',
499
			'THEME_PATH'			=> '/theme',
500
			'FAVICON_PATH'		=> '/assets/images/images/favicons',
501
			'YEAR'				=> date('Y'),
502
			'ON_TEAM'				=> false,
503
504
			'HOME'				=> '/',
505
506
			'CONTACT'				=> '/contact/',
507
508
			// Old KB - Remove after the conversion
509
			'KB_PHPBB_TEAM'		=> '/community/memberlist.php?mode=leaders',
510
511
			'LONDONVASION_POST'	=> '/community/viewtopic.php?f=14&amp;t=1058455',
512
			'LONDONVASION'		=> '/londonvasion/',
513
			'LIBERTYVASION'		=> '/libertyvasion/',
514
			'CHANGELOG'			=> '/support/documents.php?mode=changelog&amp;version=3',
515
			'INSTALL_DOCUMENT'	=> '/support/documents.php?mode=install&amp;version=3',
516
			'LICENSE'				=> '/downloads/license/',
517
			'OFFICIAL_TOOLS'				=> '/customise/db/official_tools-23',
518
519
			'SHOWCASE_SUGGEST'		=> '/showcase/suggest/',
520
521
			'languages_path'				=> '/languages/',
522
			'LANGUAGES_SUB'					=> '/languages/',
523
524
			'ABOUT_ADMIN'			=> '/about/team/adm/',
525
			'ABOUT_ADMIN_USERS'	=> '/about/team/adm/users.php',
526
			'ABOUT_ADMIN_TEAMS'	=> '/about/team/adm/teams.php',
527
			'ABOUT_ADMIN_LOG'		=> '/about/team/adm/log.php',
528
529
			// about history
530
			'NO_PHPBB2_2'				=> '/community/viewtopic.php?t=256072',
531
			'PHPBBCOM_NEW_WEBSITE'	=> '/community/viewtopic.php?t=543015',
532
			'FIRST_RC_30X'			=> '/community/viewtopic.php?t=615945',
533
534
			// URLS to mailing list
535
			'LISTS_SUBSCRIBE'		=> 'http://lists.phpbb.com/mailman/subscribe/phpbb-announce', // Usage = 1
536
537
			// Languages
538
			'LANGUAGES_HOWTO'	=>	'/community/viewtopic.php?f=66&amp;t=1858645',
539
540
			'COMMUNITY'			=> '/community/',
541
			'RULES'				=> '/rules/',
542
			'MODS_RULES'			=> '/mods/rules/',
543
			'GOOGLECSE'			=> '/search/',
544
			'community_search'	=> '/community/search.php',
545
			'ADVERTISE'			=> '/about/advertise/',
546
			'LANGUAGES_30X'		=> '/languages/',
547
			'LANGUAGES_20X'		=> '/languages/?type=20x',
548
549
			'HOSTING'					=> '/hosting/',
550
			'HOSTING_FROM_DOWNLOADS'	=> '/hosting/?from=downloads',
551
552
			// retired 2.0.x
553
			'RETIRED_2X'			=> '/community/viewtopic.php?f=14&amp;t=1385785',
554
555
			// URLs to news feeds
556
			'FEEDS_DEFAULT'		=> '/feeds/',
557
			'FEEDS_ATOM'			=> '/feeds/atom/',
558
559
			// Social Media sites
560
			'FACEBOOK'			=> 'http://www.facebook.com/phpBB',
561
			'TWITTER'				=> 'http://www.twitter.com/phpbb',
562
			// phpBB Demo
563
			'DEMO_30X'			=> 'http://try-phpbb.com/30x',
564
			'demo_31x'			=> 'http://try-phpbb.com/31x',
565
			'demo_32x'			=> 'http://try-phpbb.com/32x',
566
			'latest_demo'		=> 'http://try-phpbb.com/32x',
567
568
			'MANAGEMENT_TEAM'	=> '/community/memberlist.php?mode=group&g=13330',
569
		);
570
571
		return $miscVars;
572
	}
573
574
	public function getLegacyVars()
575
	{
576
		$legacyVars = array(
577
			'U_ABOUT'							=> '/about/',
578
			'U_ABOUT_FEATURES_SUB'				=> '/about/features/',
579
			'U_ABOUT_HISTORY_SUB'				=> '/about/history/',
580
			'U_ABOUT_GETINVOLVED_SUB'			=> '/get-involved/',
581
			'U_ABOUT_TEAM_SUB'					=> '/about/team/',
582
			'U_ABOUT_CONTACT_SUB'				=> '/about/contact/',
583
			'U_ABOUT_ADVERTISE_SUB'				=> '/about/advertise/',
584
			'U_ABOUT_LAUNCH_SUB'				=> '/about/launch/',
585
586
			'U_DOWNLOADS_HEADER'				=> '/downloads/?from=header',
587
			'U_DOWNLOADS_SUB'					=> '/downloads/',
588
			'U_DOWNLOADS_UPDATE_SUB'			=> '/downloads/#update',
589
			'U_STYLES_DB_SUB'					=> '/customise/db/styles-2',
590
			'U_LANGUAGES_SUB'					=> '/languages/',
591
592
			'U_CUSTOMISE'						=> '/customise/',
593
			'U_CDB_SUB'							=> '/customise/db/',
594
			'U_EXT_SUB'							=> '/extensions/',
595
			'U_EXT_DB_SUB'						=> '/customise/db/extensions-36',
596
			'U_STYLES_SUB'						=> '/styles/',
597
			'U_STYLES_DEMO_SUB'					=> '/styles/demo/3.0/',
598
599
			'U_SUPPORT_DOCS_SUB'				=> '/support/docs/',
600
			'U_SUPPORT_KB_SUB'					=> '/support/docs/en/3.1/kb/',
601
			'U_SUPPORT_IRC_SUB'					=> '/support/irc/',
602
			'U_SUPPORT_TUTORIALS_SUB'			=> '/support/tutorials/3.0/',
603
			'U_SUPPORT_FORUMS_SUB'				=> '/community/viewforum.php?f=551',
604
			'U_SUPPORT_INTL_SUB'				=> '/support/intl/',
605
606
			'U_DEVELOPMENT'						=> '/development/',
607
			'U_DEV_WIKI_SUB'					=> 'https://wiki.phpbb.com/',
608
			'U_DEV_GI_SUB'						=> '/development/get-involved/',
609
			'U_BUGS_SUB'						=> '/bugs/',
610
			'U_BUGS_PHPBB_SUB'					=> 'http://tracker.phpbb.com/',
611
			'U_SECURITY_SUB'					=> '/security/',
612
			'U_DEV_HOME_SUB'					=> '//area51.phpbb.com/',
613
			'U_DEV_GSOC_SUB'					=> '/development/gsoc',
614
615
			'U_IDEAS'							=> '/community/ideas',
616
617
			'U_FORUM_INDEX_SUB'					=> '/community/',
618
			'U_ABOUT_INDEX_SUB'					=> '/about/',
619
			'U_CUSTOMISE_INDEX_SUB'				=> '/customise/',
620
			'U_SUPPORT_INDEX_SUB'				=> '/support/',
621
			'U_DEV_INDEX_SUB'					=> '/development/',
622
623
			'U_CDB_MOD_SUPPORT'					=> '/customise/db/support/modifications-1', // TODO: remove (used in support_forums.html)
624
			'U_CDB_STYLE_SUPPORT'				=> '/customise/db/support/styles-2', // TODO: remove
625
			'U_CDB_CONVERTOR_SUPPORT'			=> '/customise/db/support/converter/', // TODO: remove (used in support_forums.html)
626
			'U_CDB_TRANSLATION_SUPPORT'			=> '/customise/db/support/translation/', // TODO: remove
627
628
			'U_DEMO'							=> '/demo/',
629
			'U_SHOWCASE'						=> '/showcase/',
630
			'U_DOWNLOADS'						=> '/downloads/',
631
			'U_OFFICIAL_TOOLS'					=> '/customise/db/official_tools-23',
632
			'U_SUPPORT'							=> '/support/',
633
			'U_BLOG'							=> '//blog.phpbb.com/',
634
			'U_COMMUNITY'						=> '/community/',
635
			'U_DEV_BOARD'						=> '//area51.phpbb.com/phpBB/',
636
			'U_HOSTING'							=> '/hosting/',
637
		);
638
639
		return $legacyVars;
640
	}
641
}
642