Project

General

Profile

« Previous | Next » 

Revision 119

Added by stefan about 19 years ago

Implemented new module type 'tool'. Added setting section 'Tools' (advanced). Removed possibility to set permissions for all module types other than 'page'.

View differences:

trunk/wb/languages/EN.php
103 103
$HEADING['DEFAULT_SETTINGS'] = 'Default Settings';
104 104
$HEADING['SEARCH_SETTINGS'] = 'Search Settings';
105 105
$HEADING['FILESYSTEM_SETTINGS'] = 'Filesystem Settings';
106
$HEADING['SERVER_SETTINGS'] = 'Server Settings';
107
$HEADING['ADMINISTRATION_TOOLS'] = 'Administration Tools';
106 108

  
107 109
$HEADING['MODIFY_DELETE_USER'] = 'Modify/Delete User';
108 110
$HEADING['ADD_USER'] = 'Add User';
trunk/wb/admin/groups/groups.php
90 90
			if($file != "." AND $file != ".." AND $file != ".svn" AND is_dir(WB_PATH."/modules/$file") AND file_exists(WB_PATH."/modules/$file/info.php")) {
91 91
				// Include the modules info file
92 92
				require(WB_PATH.'/modules/'.$file.'/info.php');
93
				$template->set_var('VALUE', $file);
94
				$template->set_var('NAME', $module_name);
95
				if(!is_numeric(array_search($file, $module_permissions))) {
96
					$template->set_var('CHECKED', 'checked');
97
				} else {
98
					$template->set_var('CHECKED', '');
93
				if ($module_type=='page') {
94
					$template->set_var('VALUE', $file);
95
					$template->set_var('NAME', $module_name);
96
					if(!is_numeric(array_search($file, $module_permissions))) {
97
						$template->set_var('CHECKED', 'checked');
98
					} else {
99
						$template->set_var('CHECKED', '');
100
					}
101
					$template->parse('module_list', 'module_list_block', true);
99 102
				}
100
				$template->parse('module_list', 'module_list_block', true);
101 103
			}
102 104
		}
103 105
	}
trunk/wb/admin/groups/index.php
125 125
		if($file != '.' AND $file != '..' AND $file != '.svn' AND is_dir(WB_PATH."/modules/$file") AND file_exists(WB_PATH."/modules/$file/info.php")) {
126 126
			// Include the modules info file
127 127
			require(WB_PATH.'/modules/'.$file.'/info.php');
128
			$template->set_var('VALUE', $file);
129
			$template->set_var('NAME', $module_name);
130
			$template->parse('module_list', 'module_list_block', true);
128
			if ($module_type=='page') {
129
				$template->set_var('VALUE', $file);
130
				$template->set_var('NAME', $module_name);
131
				$template->parse('module_list', 'module_list_block', true);
132
			}
131 133
		}
132 134
	}
133 135
}
trunk/wb/admin/settings/index.php
124 124
						 );
125 125

  
126 126
// Insert groups into signup list
127
$template->set_block('main_block', 'group_list_block', 'group_list');
128
$results = $database->query("SELECT group_id, name FROM ".TABLE_PREFIX."groups WHERE group_id != '1'");
127
$template->set_block('main_block', 'tool_list_block', 'tool_list');
128
$results = $database->query("SELECT * FROM ".TABLE_PREFIX."modules WHERE type = 'tool'");
129
$tool_list_empty=true;
129 130
if($results->numRows() > 0) {
130
	while($group = $results->fetchRow()) {
131
		$template->set_var('ID', $group['group_id']);
132
		$template->set_var('NAME', $group['name']);
133
		if(FRONTEND_SIGNUP == $group['group_id']) {
134
			$template->set_var('SELECTED', 'selected');
135
		} else {
136
			$template->set_var('SELECTED', '');
137
		}
138
		$template->parse('group_list', 'group_list_block', true);
131
	while($tool = $results->fetchRow()) {
132
		$template->set_var('LINK', '<a href="'.ADMIN_URL.'/settings/tool.php?tool='.$tool['directory'].'">'.$tool['name'].'</a>');
139 133
	}
140 134
} else {
141
	$template->set_var('ID', 'disabled');
142
	$template->set_var('NAME', $MESSAGE['GROUPS']['NO_GROUPS_FOUND']);
143
	$template->parse('group_list', 'group_list_block', true);
135
	$template->set_var('LINK', $TEXT['NONE_FOUND']);
144 136
}
137
$template->parse('tool_list', 'tool_list_block', true);
145 138

  
139

  
146 140
// Insert language values
147 141
$template->set_block('main_block', 'language_list_block', 'language_list');
148 142
if($handle = opendir(WB_PATH.'/languages/')) {
......
466 460
// Insert Server Email value into template
467 461
$template->set_var('SERVER_EMAIL', SERVER_EMAIL);
468 462

  
463
// Insert groups into signup list
464
$template->set_block('main_block', 'tool_list_block', 'tool_list');
465
$results = $database->query("SELECT group_id, name FROM ".TABLE_PREFIX."groups WHERE group_id != '1'");
466
if($results->numRows() > 0) {
467
	while($group = $results->fetchRow()) {
468
		$template->set_var('ID', $group['group_id']);
469
		$template->set_var('NAME', $group['name']);
470
		if(FRONTEND_SIGNUP == $group['group_id']) {
471
			$template->set_var('SELECTED', 'selected');
472
		} else {
473
			$template->set_var('SELECTED', '');
474
		}
475
		$template->parse('group_list', 'group_list_block', true);
476
	}
477
} else {
478
	$template->set_var('ID', 'disabled');
479
	$template->set_var('NAME', $MESSAGE['GROUPS']['NO_GROUPS_FOUND']);
480
	$template->parse('group_list', 'group_list_block', true);
481
}
482

  
469 483
// Insert language headings
470 484
$template->set_var(array(
471 485
								'HEADING_GENERAL_SETTINGS' => $HEADING['GENERAL_SETTINGS'],
472 486
								'HEADING_DEFAULT_SETTINGS' => $HEADING['DEFAULT_SETTINGS'],
473 487
								'HEADING_SEARCH_SETTINGS' => $HEADING['SEARCH_SETTINGS'],
474
								'HEADING_FILESYSTEM_SETTINGS' => $HEADING['FILESYSTEM_SETTINGS']
488
								'HEADING_SERVER_SETTINGS' => $HEADING['SERVER_SETTINGS'],
489
								'HEADING_ADMINISTRATION_TOOLS' => $HEADING['ADMINISTRATION_TOOLS']
475 490
								)
476 491
						);
477 492
// Insert language text and messages
trunk/wb/admin/settings/template.html
572 572
		<input type="text" name="app_name" value="{APP_NAME}" />
573 573
	</td>
574 574
</tr>
575
<tr class="advanced">
576
	<td colspan="3" style="padding-top: 10px;">
577
		<h2>{HEADING_ADMINISTRATION_TOOLS}</h2>
578
	</td>
579
</tr>
580
<tr class="advanced">
581
	<td>
582
		<!-- BEGIN tool_list_block -->
583
			{LINK} 
584
		<!-- END tool_list_block -->
585
		{TOOL_LIST}
586
	</td>
587
	<td>
588
		&nbsp;
589
	</td>
590
	<td>&nbsp;</td>
591
</tr>
575 592
<tr>
576 593
	<td>&nbsp;</td>
577 594
	<td>

Also available in: Unified diff