Project

General

Profile

« Previous | Next » 

Revision 944

Added by Matthias almost 16 years ago

added skinable Admin Interface

View differences:

index.php
36 36
require_once(WB_PATH.'/framework/functions-utf8.php');
37 37

  
38 38
// Create new template object
39
$template = new Template(ADMIN_PATH.'/settings');
40
$template->set_file('page', 'template.html');
39
$template = new Template(THEME_PATH.'/templates');
40
$template->set_file('page', 'settings.htt');
41 41
$template->set_block('page', 'main_block', 'main');
42 42

  
43 43
// Query current settings in the db, then loop through them and print them
......
126 126
									'PAGE_SPACER' => PAGE_SPACER,
127 127
									'WB_PATH' => WB_PATH,
128 128
									'WB_URL' => WB_URL,
129
									'THEME_URL' => THEME_URL,
129 130
									'ADMIN_PATH' => ADMIN_PATH,
130 131
									'ADMIN_URL' => ADMIN_URL,
131 132
									'DATABASE_TYPE' => DB_TYPE,
......
232 233

  
233 234
// Insert templates
234 235
$template->set_block('main_block', 'template_list_block', 'template_list');
235
$result = $database->query("SELECT * FROM ".TABLE_PREFIX."addons WHERE type = 'template' order by name");
236
$result = $database->query("SELECT * FROM ".TABLE_PREFIX."addons WHERE type = 'template' AND function != 'theme' order by name");
236 237
if($result->numRows() > 0) {
237 238
	while($addon = $result->fetchRow()) {
238 239
		$template->set_var('FILE', $addon['directory']);
......
243 244
	}
244 245
}
245 246

  
247
// Insert backend theme
248
$template->set_block('main_block', 'theme_list_block', 'theme_list');
249
$result = $database->query("SELECT * FROM ".TABLE_PREFIX."addons WHERE type = 'template' AND function = 'theme' order by name");
250
if($result->numRows() > 0) {
251
	while($addon = $result->fetchRow()) {
252
		$template->set_var('FILE', $addon['directory']);
253
		$template->set_var('NAME', $addon['name']);
254
		if(($addon['directory'] == DEFAULT_THEME) ? $selected = ' selected' : $selected = '');
255
		$template->set_var('SELECTED', $selected);
256
		$template->parse('theme_list', 'theme_list_block', true);
257
	}
258
}
259

  
246 260
// Insert WYSIWYG modules
247 261
$template->set_block('main_block', 'editor_list_block', 'editor_list');
248 262
$file='none';  
......
546 560
								'TEXT_DATE_FORMAT' => $TEXT['DATE_FORMAT'],
547 561
								'TEXT_TIME_FORMAT' => $TEXT['TIME_FORMAT'],
548 562
								'TEXT_TEMPLATE' => $TEXT['TEMPLATE'],
563
								'TEXT_THEME' => $TEXT['THEME'],
549 564
								'TEXT_WYSIWYG_EDITOR' => $TEXT['WYSIWYG_EDITOR'],
550 565
								'TEXT_PAGE_LEVEL_LIMIT' => $TEXT['PAGE_LEVEL_LIMIT'],
551 566
								'TEXT_INTRO_PAGE' => $TEXT['INTRO_PAGE'],

Also available in: Unified diff