Revision 2098
Added by darkviper almost 11 years ago
index.php | ||
---|---|---|
24 | 24 |
$template = new Template(dirname($admin->correct_theme_source('addons.htt'))); |
25 | 25 |
$template->set_file('page', 'addons.htt'); |
26 | 26 |
$template->set_block('page', 'main_block', 'main'); |
27 |
$oTrans = Translate::getInstance(); |
|
28 |
$oTrans->enableAddon('admin\\addons'); |
|
29 |
$template->set_var($oTrans->getLangArray()); |
|
27 | 30 |
|
28 | 31 |
// Insert values into the template object |
29 | 32 |
$template->set_var(array( |
30 | 33 |
'ADMIN_URL' => ADMIN_URL, |
31 | 34 |
'THEME_URL' => THEME_URL, |
32 |
'WB_URL' => WB_URL |
|
35 |
'WB_URL' => WB_URL
|
|
33 | 36 |
) |
34 | 37 |
); |
35 | 38 |
|
... | ... | |
58 | 61 |
* Insert section names and descriptions |
59 | 62 |
*/ |
60 | 63 |
$template->set_var(array( |
61 |
'ADDONS_OVERVIEW' => $MENU['ADDONS'],
|
|
62 |
'FTAN'=> $admin->getFTAN(), |
|
63 |
'MODULES' => $MENU['MODULES'],
|
|
64 |
'TEMPLATES' => $MENU['TEMPLATES'],
|
|
65 |
'LANGUAGES' => $MENU['LANGUAGES'],
|
|
66 |
'MODULES_OVERVIEW' => $OVERVIEW['MODULES'],
|
|
67 |
'TEMPLATES_OVERVIEW' => $OVERVIEW['TEMPLATES'],
|
|
68 |
'LANGUAGES_OVERVIEW' => $OVERVIEW['LANGUAGES'],
|
|
69 |
'TXT_ADMIN_SETTINGS' => $TEXT['ADMIN'] . ' ' . $TEXT['SETTINGS'],
|
|
70 |
'MESSAGE_RELOAD_ADDONS' => $MESSAGE['ADDON_RELOAD'],
|
|
71 |
'TEXT_RELOAD' => $TEXT['RELOAD'],
|
|
64 |
'ADDONS_OVERVIEW' => $oTrans->MENU_ADDONS,
|
|
65 |
'FTAN' => $admin->getFTAN(),
|
|
66 |
'MODULES' => $oTrans->MENU_MODULES,
|
|
67 |
'TEMPLATES' => $oTrans->MENU_TEMPLATES,
|
|
68 |
'LANGUAGES' => $oTrans->MENU_LANGUAGES,
|
|
69 |
'MODULES_OVERVIEW' => $oTrans->OVERVIEW_MODULES,
|
|
70 |
'TEMPLATES_OVERVIEW' => $oTrans->OVERVIEW_TEMPLATES,
|
|
71 |
'LANGUAGES_OVERVIEW' => $oTrans->OVERVIEW_LANGUAGES,
|
|
72 |
'TXT_ADMIN_SETTINGS' => $oTrans->TEXT_ADMIN . ' ' . $oTrans->TEXT_SETTINGS,
|
|
73 |
'MESSAGE_RELOAD_ADDONS' => $oTrans->MESSAGE_ADDON_RELOAD,
|
|
74 |
'TEXT_RELOAD' => $oTrans->TEXT_RELOAD,
|
|
72 | 75 |
|
73 |
'RELOAD_URL' => ADMIN_URL . '/addons/reload.php', |
|
74 |
'URL_ADVANCED' => $admin->get_permission('modules_advanced') |
|
75 |
? '<a href="' . ADMIN_URL . '/addons/index.php?advanced">' . $TEXT['ADVANCED'] . '</a>' : '',
|
|
76 |
'ADVANCED_URL' => $admin->get_permission('modules_advanced') ? ADMIN_URL . '/addons/index.php' : '', |
|
77 |
'TEXT_ADVANCED' => $TEXT['ADVANCED'],
|
|
78 |
'TEXT_EMPTY' => ' ', |
|
76 |
'RELOAD_URL' => ADMIN_URL . '/addons/reload.php',
|
|
77 |
'URL_ADVANCED' => $admin->get_permission('modules_advanced')
|
|
78 |
? '<a href="' . ADMIN_URL . '/addons/index.php?advanced">' . $oTrans->TEXT_ADVANCED . '</a>' : '',
|
|
79 |
'ADVANCED_URL' => $admin->get_permission('modules_advanced') ? ADMIN_URL . '/addons/index.php' : '',
|
|
80 |
'TEXT_ADVANCED' => $oTrans->TEXT_ADVANCED,
|
|
81 |
'TEXT_EMPTY' => ' ',
|
|
79 | 82 |
) |
80 | 83 |
); |
81 | 84 |
|
... | ... | |
88 | 91 |
// start advanced block |
89 | 92 |
if ( isset($_GET['advanced']) AND $admin->get_permission('modules_advanced') == true) { |
90 | 93 |
$template->set_var(array( |
91 |
'TXT_THEME_COPY_CURRENT' => $TEXT['THEME_COPY_CURRENT'], |
|
92 |
'TXT_THEME_NEW_NAME' => $TEXT['THEME_NEW_NAME'], |
|
93 |
'TXT_THEME_CURRENT' => $TEXT['THEME_CURRENT'], |
|
94 |
'TXT_THEME_START_COPY' => $TEXT['THEME_START_COPY'], |
|
95 |
'TXT_THEME_IMPORT_HTT' => $TEXT['THEME_IMPORT_HTT'], |
|
96 |
'TXT_THEME_SELECT_HTT' => $TEXT['THEME_SELECT_HTT'], |
|
97 |
'TXT_THEME_NOMORE_HTT' => $TEXT['THEME_NOMORE_HTT'], |
|
98 |
'TXT_THEME_START_IMPORT' => $TEXT['THEME_START_IMPORT'], |
|
99 |
'MESSAGE_THEME_COPY_CURRENT' => $MESSAGE['THEME_COPY_CURRENT'], |
|
100 |
'MESSAGE_THEME_ALREADY_EXISTS' => $MESSAGE['THEME_ALREADY_EXISTS'], |
|
101 |
'MESSAGE_THEME_INVALID_SOURCE_DESTINATION' => $MESSAGE['THEME_INVALID_SOURCE_DESTINATION'], |
|
102 |
'MESSAGE_THEME_DESTINATION_READONLY' => $MESSAGE['THEME_DESTINATION_READONLY'], |
|
103 |
'MESSAGE_THEME_IMPORT_HTT' => $MESSAGE['THEME_IMPORT_HTT'], |
|
94 |
'TXT_THEME_COPY_CURRENT' => $oTrans->TEXT_THEME_COPY_CURRENT, |
|
95 |
'TXT_THEME_NEW_NAME' => $oTrans->TEXT_THEME_NEW_NAME, |
|
96 |
'TXT_THEME_CURRENT' => $oTrans->TEXT_THEME_CURRENT, |
|
97 |
'TXT_THEME_START_COPY' => $oTrans->TEXT_THEME_START_COPY, |
|
98 |
'TXT_THEME_IMPORT_HTT' => $oTrans->TEXT_THEME_IMPORT_HTT, |
|
99 |
'TXT_THEME_SELECT_HTT' => $oTrans->TEXT_THEME_SELECT_HTT, |
|
100 |
'TXT_THEME_NOMORE_HTT' => $oTrans->TEXT_THEME_NOMORE_HTT, |
|
101 |
'TXT_THEME_START_IMPORT' => $oTrans->TEXT_THEME_START_IMPORT, |
|
104 | 102 |
) |
105 | 103 |
); |
106 | 104 |
// start copy current theme |
... | ... | |
122 | 120 |
$sOptionList .= '<option value="'.$val.'">'.$key.'</option>'."\n"; |
123 | 121 |
} |
124 | 122 |
}else { |
125 |
$sOptionList = '<option value="none">'.$TEXT['THEME_NOMORE_HTT'].'</option>'."\n";
|
|
123 |
$sOptionList = '<option value="none">'.$oTrans->TEXT_THEME_NOMORE_HTT.'</option>'."\n";
|
|
126 | 124 |
} |
127 | 125 |
$template->set_var('THEME_TEMPLATE_LIST', $sOptionList); |
128 | 126 |
// end template import |
Also available in: Unified diff
! activate class Translate for all addons in admin/ (except pages/)
! class.admin >> add translation of the current theme to Translate