-
Notifications
You must be signed in to change notification settings - Fork 3
/
config.inc.php
84 lines (67 loc) · 3.3 KB
/
config.inc.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
<?php
// init addon
$REX['ADDON']['name']['website_manager'] = 'Website Manager';
$REX['ADDON']['page']['website_manager'] = 'website_manager';
$REX['ADDON']['version']['website_manager'] = '1.3.0';
$REX['ADDON']['author']['website_manager'] = "RexDude";
$REX['ADDON']['supportpage']['website_manager'] = 'forum.redaxo.de';
$REX['ADDON']['perm']['website_manager'] = 'website_manager[]';
// permissions
$REX['PERM'][] = 'website_manager[]';
// front and backend includes
require_once($REX['INCLUDE_PATH'] . '/addons/website_manager/classes/class.rex_website_manager_utils.inc.php');
if ($REX['REDAXO'] && !$REX['SETUP']) {
// backend includes
require_once($REX['INCLUDE_PATH'] . '/addons/website_manager/classes/class.klogger.inc.php');
require_once($REX['INCLUDE_PATH'] . '/addons/website_manager/settings.inc.php');
// add lang file
$I18N->appendFile($REX['INCLUDE_PATH'] . '/addons/website_manager/lang/');
// check for existence of website manager object
if (isset($REX['WEBSITE_MANAGER'])) {
// used for addon uninstall to stop user from uninstallig when wm codeline ist still in master.inc.php
$REX['WEBSITE_MANAGER_DO_UNINSTALL'] = false;
// add subpages
$REX['ADDON']['website_manager']['SUBPAGES'] = array(
array('', $I18N->msg('website_manager_websites'))
);
if (OOPlugin::isAvailable('website_manager', 'themes')) {
array_push($REX['ADDON']['website_manager']['SUBPAGES'], array('themes', $I18N->msg('website_manager_themes')));
}
array_push($REX['ADDON']['website_manager']['SUBPAGES'],
array('tools', $I18N->msg('website_manager_tools')),
array('options', $I18N->msg('website_manager_options')),
array('setup', $I18N->msg('website_manager_setup')),
array('help', $I18N->msg('website_manager_help'))
);
} else {
// this is only neccesary until user has put this code line in master.inc.php
require_once($REX['INCLUDE_PATH'] . '/addons/website_manager/generated/init.inc.php');
// used for addon uninstall to stop user from uninstallig when wm codeline ist still in master.inc.php
$REX['WEBSITE_MANAGER_DO_UNINSTALL'] = true;
// add only setup subpage
$REX['ADDON']['website_manager']['SUBPAGES'] = array(
array('', $I18N->msg('website_manager_setup'))
);
}
if (rex_request('page') != '') { // login
// check permissions (has to be done here because $REX['USER'] is not availabe in master.inc.php)
$REX['WEBSITE_MANAGER']->checkPermissions();
// add css/js to page header
rex_register_extension('PAGE_HEADER', 'rex_website_manager_utils::appendToPageHeader');
if (rex_request('install') != '1') { // this shoudn't go off when addon gets installed
// add website select and other stuff
rex_register_extension('OUTPUT_FILTER', 'rex_website_manager_utils::addToOutputFilter');
}
// frontend link in meta menu
if ($REX['WEBSITE_MANAGER_SETTINGS']['show_metamenu_frontend_link']) {
rex_register_extension('META_NAVI', 'rex_website_manager_utils::addFrontendLinkToMetaMenu');
}
// fix article preview link
rex_register_extension('PAGE_CONTENT_MENU', 'rex_website_manager_utils::fixArticlePreviewLink');
// fix clang
rex_register_extension('CLANG_ADDED', 'rex_website_manager::fixClang');
rex_register_extension('CLANG_DELETED', 'rex_website_manager::fixClang');
}
// init sortable rex list with prio switch
rex_website_manager_utils::initPrioSwitch();
}