Completed
Push — master ( 19e909...4acb4f )
by Michael
03:44 queued 01:58
created

GlobalsExtension::getAboutVars()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 14
Code Lines 10

Duplication

Lines 0
Ratio 0 %

Importance

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