forked from yakamara/redaxo_xform
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfig.inc.php
65 lines (52 loc) · 2.91 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
<?php
/**
* XForm
* @author jan.kristinus[at]redaxo[dot]org Jan Kristinus
* @author <a href="http://www.yakamara.de">www.yakamara.de</a>
*/
$mypage = 'xform';
$REX['ADDON']['name'][$mypage] = 'XForm';
$REX['ADDON']['perm'][$mypage] = 'xform[]';
$REX['ADDON']['version'][$mypage] = '4.10-dev';
$REX['ADDON']['author'][$mypage] = 'Jan Kristinus';
$REX['ADDON']['supportpage'][$mypage] = 'www.yakamara.de/tag/xform/';
$REX['PERM'][] = 'xform[]';
if (empty($REX['ADDON']['xform']['classpaths']['value']) or !is_array($REX['ADDON']['xform']['classpaths']['value'])) {
$REX['ADDON']['xform']['classpaths']['value'] = array();
}
if (empty($REX['ADDON']['xform']['classpaths']['action']) or !is_array($REX['ADDON']['xform']['classpaths']['action'])) {
$REX['ADDON']['xform']['classpaths']['action'] = array();
}
if (empty($REX['ADDON']['xform']['classpaths']['validate']) or !is_array($REX['ADDON']['xform']['classpaths']['validate'])) {
$REX['ADDON']['xform']['classpaths']['validate'] = array();
}
$REX['ADDON']['xform']['classpaths']['value'][] = $REX['INCLUDE_PATH'] . '/addons/xform/classes/value/';
$REX['ADDON']['xform']['classpaths']['validate'][] = $REX['INCLUDE_PATH'] . '/addons/xform/classes/validate/';
$REX['ADDON']['xform']['classpaths']['action'][] = $REX['INCLUDE_PATH'] . '/addons/xform/classes/action/';
$REX['ADDON']['xform']['templatepaths'][] = $REX['INCLUDE_PATH'] . '/addons/xform/templates/';
rex_register_extension('ADDONS_INCLUDED', function () {
global $REX;
$REX['ADDON']['xform']['templatepaths'][] = rex_path::addonData('xform', 'templates/');
}, array(), REX_EXTENSION_EARLY);
include $REX['INCLUDE_PATH'] . '/addons/' . $mypage . '/classes/basic/class.rex_radio.inc.php';
include $REX['INCLUDE_PATH'] . '/addons/' . $mypage . '/classes/basic/class.rex_xform_list.inc.php';
include $REX['INCLUDE_PATH'] . '/addons/' . $mypage . '/classes/basic/class.rex_xform.inc.php';
if ($REX['REDAXO'] && $REX['USER']) {
$I18N->appendFile($REX['INCLUDE_PATH'] . '/addons/' . $mypage . '/lang/');
$REX['ADDON'][$mypage]['SUBPAGES'] = array();
$REX['ADDON'][$mypage]['SUBPAGES'][] = array( '' , $I18N->msg('xform_overview'));
if ($REX['USER']->isAdmin()) {
$REX['ADDON'][$mypage]['SUBPAGES'][] = array('description' , $I18N->msg('xform_description'));
}
function rex_xform_css($params)
{
global $REX;
$params['subject'] .= "\n " . '<link rel="stylesheet" type="text/css" href="../files/addons/xform/xform.css" media="screen, projection, print" />';
$params['subject'] .= "\n " . '<script src="../files/addons/xform/manager.js" type="text/javascript"></script>';
if ($REX['REDAXO']) {
$params['subject'] .= "\n " . '<link rel="stylesheet" type="text/css" href="../files/addons/xform/manager.css" media="screen, projection, print" />';
}
return $params['subject'];
}
rex_register_extension('PAGE_HEADER', 'rex_xform_css');
}