Project

General

Profile

« Previous | Next » 

Revision 1529

Added by Dietmar almost 13 years ago

add new backend theme handling (Tks to Stefek)

View differences:

index.php
3 3
 *
4 4
 * @category        admin
5 5
 * @package         languages
6
 * @author          WebsiteBaker Project
7
 * @copyright       2004-2009, Ryan Djurovich
6
 * @author          Ryan Djurovich, WebsiteBaker Project
8 7
 * @copyright       2009-2011, Website Baker Org. e.V.
9 8
 * @link            http://www.websitebaker2.org/
10 9
 * @license         http://www.gnu.org/licenses/gpl.html
......
22 21
require_once(WB_PATH.'/framework/class.admin.php');
23 22
$admin = new admin('Addons', 'languages');
24 23

  
25
// Setup template object
26
$template = new Template(THEME_PATH.'/templates');
24
// Setup template object, parse vars to it, then parse it
25
$ThemePath = realpath(WB_PATH.$admin->correct_theme_source('languages.htt'));
26
// Create new template object
27
$template = new Template($ThemePath);
28
// $template->debug = true;
27 29
$template->set_file('page', 'languages.htt');
28 30
$template->set_block('page', 'main_block', 'main');
29 31

  
......
51 53

  
52 54
// Insert language headings
53 55
$template->set_var(array(
54
								'HEADING_INSTALL_LANGUAGE' => $HEADING['INSTALL_LANGUAGE'],
55
								'HEADING_UNINSTALL_LANGUAGE' => $HEADING['UNINSTALL_LANGUAGE'],
56
								'HEADING_LANGUAGE_DETAILS' => $HEADING['LANGUAGE_DETAILS']
57
								)
58
						);
56
				'HEADING_INSTALL_LANGUAGE' => $HEADING['INSTALL_LANGUAGE'],
57
				'HEADING_UNINSTALL_LANGUAGE' => $HEADING['UNINSTALL_LANGUAGE'],
58
				'HEADING_LANGUAGE_DETAILS' => $HEADING['LANGUAGE_DETAILS']
59
			)
60
		);
59 61
// insert urls
60 62
$template->set_var(array(
61
					'ADMIN_URL' => ADMIN_URL,
62
					'WB_URL' => WB_URL,
63
					'THEME_URL' => THEME_URL,
64
					'FTAN' => $admin->getFTAN()
65
				)
66
			);
63
				'ADMIN_URL' => ADMIN_URL,
64
				'WB_URL' => WB_URL,
65
				'THEME_URL' => THEME_URL,
66
				'FTAN' => $admin->getFTAN()
67
			)
68
		);
67 69
// Insert language text and messages
68 70
$template->set_var(array(
69 71
	'URL_MODULES' => $admin->get_permission('modules') ?
70 72
		'<a href="' . ADMIN_URL . '/modules/index.php">' . $MENU['MODULES'] . '</a>' : '',
71
	'URL_ADVANCED' => $admin->get_permission('admintools') ?
72
		'<a href="' . ADMIN_URL . '/modules/index.php?advanced">' . $TEXT['ADVANCED'] . '</a>' : '',
73
	'URL_ADVANCED' => '&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;',
73 74
	'URL_TEMPLATES' => $admin->get_permission('templates') ?
74 75
		'<a href="' . ADMIN_URL . '/templates/index.php">' . $MENU['TEMPLATES'] . '</a>' : '',
75 76
	'TEXT_INSTALL' => $TEXT['INSTALL'],

Also available in: Unified diff