forked from webdevops/TYPO3-metaseo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ext_localconf.php
106 lines (87 loc) · 4.24 KB
/
ext_localconf.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
<?php
defined('TYPO3_MODE') or exit;
$confArr = unserialize($GLOBALS['TYPO3_CONF_VARS']['EXT']['extConf']['metaseo']);
// ##############################################
// BACKEND
// ##############################################
if (TYPO3_MODE == 'BE') {
// Field validations
$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['tce']['formevals']['tx_metaseo_backend_validation_float']
= 'EXT:metaseo/Classes/Backend/Validator/ValidatorImport.php';
/*
* BackendCompliantTsfeController suppresses redirect http headers sent by TypoScriptFrontendController
* by faking default scheme for pages processed by TypoScriptFrontendController (use for Ajax requests only)
*/
if (isset($_SERVER['HTTP_X_TX_METASEO_AJAX'])) { //original header is 'X-Tx-Metaseo-Ajax' (prefixed by webserver)
$GLOBALS['TYPO3_CONF_VARS']['SYS']['Objects']
['TYPO3\\CMS\\Frontend\\Controller\\TypoScriptFrontendController'] = array(
'className' => 'Metaseo\\Metaseo\\Frontend\\Controller\\BackendCompliantTsfeController'
);
}
}
// ##############################################
// SEO
// ##############################################
$GLOBALS['TYPO3_CONF_VARS']['FE']['pageOverlayFields']
.= ',tx_metaseo_pagetitle,tx_metaseo_pagetitle_rel,tx_metaseo_pagetitle_prefix,'
. 'tx_metaseo_pagetitle_suffix,tx_metaseo_canonicalurl';
$GLOBALS['TYPO3_CONF_VARS']['FE']['addRootLineFields']
.= ',tx_metaseo_pagetitle_prefix,tx_metaseo_pagetitle_suffix,tx_metaseo_inheritance';
// Typolink post proc hook
$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['tslib/class.tslib_content.php']['typoLink_PostProc'][]
= 'Metaseo\\Metaseo\\Hook\\SitemapIndexLinkHook->hook_linkParse';
// HTTP Header extension
$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['tslib/class.tslib_fe.php']['isOutputting']['metaseo']
= 'Metaseo\\Metaseo\\Hook\\HttpHook->main';
// ##############################################
// SITEMAP
// ##############################################
// Frontend indexed
$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['tslib/class.tslib_fe.php']['pageIndexing'][]
= 'Metaseo\\Metaseo\\Hook\\SitemapIndexPageHook';
// ##############################################
// HOOKS
// ##############################################
// EXT:tt_news
if (!empty($confArr['enableIntegrationTTNews'])) {
// Metatag fetch hook
$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['tt_news']['extraItemMarkerHook']['metaseo']
= 'Metaseo\\Metaseo\\Hook\\Extension\\TtnewsExtension';
}
// EXT:news
if (!empty($confArr['enableIntegrationNews'])) {
// Metatag fetch hook
$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['news']['hooks']['listAction']['metaseo']
= 'Metaseo\\Metaseo\\Hook\\Extension\\NewsExtension->listActionHook';
$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['news']['hooks']['detailAction']['metaseo']
= 'Metaseo\\Metaseo\\Hook\\Extension\\NewsExtension->detailActionHook';
}
// ############################################################################
// CLI
// ############################################################################
$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['extbase']['commandControllers'][]
= 'Metaseo\\Metaseo\\Command\\MetaseoCommandController';
// ##############################################
// SCHEDULER
// ##############################################
// Cleanup task
$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['scheduler']['tasks']
['Metaseo\\Metaseo\\Scheduler\\Task\\GarbageCollectionTask'] = array(
'extension' => $_EXTKEY,
'title' => 'Sitemap garbage collection',
'description' => 'Cleanup old sitemap entries'
);
// Sitemap XML task
$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['scheduler']['tasks']['Metaseo\\Metaseo\\Scheduler\\Task\\SitemapXmlTask']
= array(
'extension' => $_EXTKEY,
'title' => 'Sitemap.xml builder',
'description' => 'Build sitemap xml as static file (in uploads/tx_metaseo/sitemap-xml/)'
);
// Sitemap TXT task
$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['scheduler']['tasks']['Metaseo\\Metaseo\\Scheduler\\Task\\SitemapTxtTask']
= array(
'extension' => $_EXTKEY,
'title' => 'Sitemap.txt builder',
'description' => 'Build sitemap txt as static file (in uploads/tx_metaseo/sitemap-txt/)'
);