Project

General

Profile

« Previous | Next » 

Revision 536

Added by doc over 16 years ago

Moved the admin tools from 'Settings' to the new section 'Admin-Tools'.

View differences:

trunk/CHANGELOG
12 12

  
13 13
------------------------------------- 2.7.0 -------------------------------------
14 14
13-Jan-2008 Christian Sommer
15
#	moved administration tools from Settings to the new section Admin-Tools
16

  
17
13-Jan-2008 Christian Sommer
15 18
#	this bugfix closes the ticket 529 (WB upgrades modules with identical version)	
16 19

  
17 20
13-Jan-2008 Christian Sommer
trunk/wb/install/save.php
513 513
	// Insert default data
514 514
	
515 515
	// Admin group
516
	$full_system_permissions = 'pages,pages_view,pages_add,pages_add_l0,pages_settings,pages_modify,pages_intro,pages_delete,media,media_view,media_upload,media_rename,media_delete,media_create,addons,modules,modules_view,modules_install,modules_uninstall,templates,templates_view,templates_install,templates_uninstall,languages,languages_view,languages_install,languages_uninstall,settings,settings_basic,settings_advanced,access,users,users_view,users_add,users_modify,users_delete,groups,groups_view,groups_add,groups_modify,groups_delete';
516
	$full_system_permissions = 'pages,pages_view,pages_add,pages_add_l0,pages_settings,pages_modify,pages_intro,pages_delete,media,media_view,media_upload,media_rename,media_delete,media_create,addons,modules,modules_view,modules_install,modules_uninstall,templates,templates_view,templates_install,templates_uninstall,languages,languages_view,languages_install,languages_uninstall,settings,settings_basic,settings_advanced,access,users,users_view,users_add,users_modify,users_delete,groups,groups_view,groups_add,groups_modify,groups_delete,admintools';
517 517
	$insert_admin_group = "INSERT INTO `".TABLE_PREFIX."groups` VALUES ('1', 'Administrators', '$full_system_permissions', '', '')";
518 518
	$database->query($insert_admin_group);
519 519
	// Admin user
trunk/wb/languages/EN.php
46 46
$MENU['LANGUAGES'] = 'Languages';
47 47
$MENU['PREFERENCES'] = 'Preferences';
48 48
$MENU['SETTINGS'] = 'Settings';
49
$MENU['ADMINTOOLS'] = 'Admin-Tools';
49 50
$MENU['ACCESS'] = 'Access';
50 51
$MENU['USERS'] = 'Users';
51 52
$MENU['GROUPS'] = 'Groups';
trunk/wb/admin/groups/get_permissions.php
66 66
	} else {
67 67
		$system_permissions['access'] = 0;
68 68
	}
69
		$system_permissions['users'] = $admin->get_post('users');
70
			$system_permissions['users_view'] = $system_permissions['users'];
71
			$system_permissions['users_add'] = $system_permissions['users'];
72
			$system_permissions['users_modify'] = $system_permissions['users'];
73
			$system_permissions['users_delete'] = $system_permissions['users'];
74
		$system_permissions['groups'] = $admin->get_post('groups');
75
			$system_permissions['groups_view'] = $system_permissions['groups'];
76
			$system_permissions['groups_add'] = $system_permissions['groups'];
77
			$system_permissions['groups_modify'] = $system_permissions['groups'];
78
			$system_permissions['groups_delete'] = $system_permissions['groups'];
69
	$system_permissions['users'] = $admin->get_post('users');
70
	$system_permissions['users_view'] = $system_permissions['users'];
71
	$system_permissions['users_add'] = $system_permissions['users'];
72
	$system_permissions['users_modify'] = $system_permissions['users'];
73
	$system_permissions['users_delete'] = $system_permissions['users'];
74
	$system_permissions['groups'] = $admin->get_post('groups');
75
	$system_permissions['groups_view'] = $system_permissions['groups'];
76
	$system_permissions['groups_add'] = $system_permissions['groups'];
77
	$system_permissions['groups_modify'] = $system_permissions['groups'];
78
	$system_permissions['groups_delete'] = $system_permissions['groups'];
79
	$system_permissions['admintools'] = $admin->get_post('admintools');
79 80
} else {
80 81
	// Pages
81 82
	$system_permissions['pages_view'] = $admin->get_post('pages_view');
trunk/wb/admin/groups/group_form.html
64 64
				<label for="groups">{SECTION_GROUPS}</label>
65 65
			</td>
66 66
		</tr>
67
		<tr>
68
			<td>
69
				<input type="checkbox" name="admintools" id="admintools" value="1" {admintools_checked} />
70
				<label for="admintools">{SECTION_ADMINTOOLS}</label>
71
			</td>
72
			<td>&nbsp;</td>
73
			<td>&nbsp;</td>
74
			<td>&nbsp;</td>
67 75
		</table>
68 76
		
69 77
	</td>
trunk/wb/admin/groups/groups.php
141 141
									'SECTION_SETTINGS' => $MENU['SETTINGS'],
142 142
									'SECTION_USERS' => $MENU['USERS'],
143 143
									'SECTION_GROUPS' => $MENU['GROUPS'],
144
									'SECTION_ADMINTOOLS' => $MENU['ADMINTOOLS'],
144 145
									'TEXT_VIEW' => $TEXT['VIEW'],
145 146
									'TEXT_ADD' => $TEXT['ADD'],
146 147
									'TEXT_LEVEL' => $TEXT['LEVEL'],
trunk/wb/admin/groups/index.php
164 164
								'SECTION_LANGUAGES' => $MENU['LANGUAGES'],
165 165
								'SECTION_USERS' => $MENU['USERS'],
166 166
								'SECTION_GROUPS' => $MENU['GROUPS'],
167
								'SECTION_ADMINTOOLS' => $MENU['ADMINTOOLS'],
167 168
								'TEXT_VIEW' => $TEXT['VIEW'],
168 169
								'TEXT_ADD' => $TEXT['ADD'],
169 170
								'TEXT_LEVEL' => $TEXT['LEVEL'],
trunk/wb/admin/settings/tool.php
1
<?php
2

  
3
// $Id$
4

  
5
/*
6

  
7
 Website Baker Project <http://www.websitebaker.org/>
8
 Copyright (C) 2004-2008, Ryan Djurovich
9

  
10
 Website Baker is free software; you can redistribute it and/or modify
11
 it under the terms of the GNU General Public License as published by
12
 the Free Software Foundation; either version 2 of the License, or
13
 (at your option) any later version.
14

  
15
 Website Baker is distributed in the hope that it will be useful,
16
 but WITHOUT ANY WARRANTY; without even the implied warranty of
17
 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18
 GNU General Public License for more details.
19

  
20
 You should have received a copy of the GNU General Public License
21
 along with Website Baker; if not, write to the Free Software
22
 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
23

  
24
*/
25

  
26
require('../../config.php');
27
require_once(WB_PATH.'/framework/class.admin.php');
28
require_once(WB_PATH.'/framework/functions.php');
29

  
30
if(!isset($_GET['tool'])) {
31
	header("Location: index.php?advanced=yes");
32
	exit(0);
33
}
34

  
35
// Check if tool is installed
36
$result = $database->query("SELECT * FROM ".TABLE_PREFIX."addons WHERE type = 'module' AND function = 'tool' AND directory = '".$_GET['tool']."'");
37
if($result->numRows() == 0) {
38
	header("Location: index.php?advanced=yes");
39
	exit(0);
40
}
41
$tool = $result->fetchRow();
42

  
43
$admin = new admin('Settings', 'settings_advanced');
44

  
45
?>
46
<h4 style="margin: 0; border-bottom: 1px solid #DDD; padding-bottom: 5px;">
47
	<a href="<?php echo ADMIN_URL; ?>/settings/index.php?advanced=yes"><?php echo $MENU['SETTINGS']; ?></a>
48
	->
49
	<a href="<?php echo ADMIN_URL; ?>/settings/index.php?advanced=yes#administration_tools"><?php echo $HEADING['ADMINISTRATION_TOOLS']; ?></a>
50
	->
51
	<?php echo $tool['name']; ?>
52
</h4>
53
<?php
54
require(WB_PATH.'/modules/'.$tool['directory'].'/tool.php');
55

  
56
$admin->print_footer();
57

  
58
?>
59 0

  
trunk/wb/admin/settings/index.php
123 123
								 )
124 124
						 );
125 125

  
126
// Insert tools into tool list
127
$template->set_block('main_block', 'tool_list_block', 'tool_list');
128
$results = $database->query("SELECT * FROM ".TABLE_PREFIX."addons WHERE type = 'module' AND function = 'tool'");
129
if($results->numRows() > 0) {
130
	while($tool = $results->fetchRow()) {
131
		$template->set_var('TOOL_NAME', $tool['name']);
132
		$template->set_var('TOOL_DIR', $tool['directory']);
133
		$template->set_var('TOOL_DESCRIPTION', $tool['description']);
134
		$template->parse('tool_list', 'tool_list_block', true);
135
	}
136
} else {
137
	$template->set_var('TOOL_LIST', $TEXT['NONE_FOUND']);	
138
}
139

  
140 126
// Insert language values
141 127
$template->set_block('main_block', 'language_list_block', 'language_list');
142 128
$result = $database->query("SELECT * FROM ".TABLE_PREFIX."addons WHERE type = 'language' order by directory");
trunk/wb/admin/settings/template.html
643 643
		<input type="password" name="wbmailer_smtp_password" value="{WBMAILER_SMTP_PASSWORD}" />
644 644
	</td>
645 645
</tr>
646
<tr class="advanced">
647
	<td colspan="3" style="padding-top: 10px;">
648
		<a name="administration_tools"></a>
649
		<h2>{HEADING_ADMINISTRATION_TOOLS}</h2>
650
	</td>
651
</tr>
652
<tr class="advanced">
653
	<td colspan="3">
654
		<ul style="margin: 0; padding: 0; margin-left: 20px; margin-bottom: 10px;">
655
		<!-- BEGIN tool_list_block -->
656
		<li style="padding-bottom: 5px;">
657
		<a href="{ADMIN_URL}/settings/tool.php?tool={TOOL_DIR}">{TOOL_NAME}</a>
658
		<br />{TOOL_DESCRIPTION}
659
		</li>
660
		<!-- END tool_list_block -->
661
		</ul>
662
		{TOOL_LIST}
663
	</td>
664
	<td>
665
		&nbsp;
666
	</td>
667
	<td>&nbsp;</td>
668
</tr>
669 646
<tr>
670 647
	<td>&nbsp;</td>
671 648
	<td>
trunk/wb/admin/admintools/tool.php
1
<?php
2

  
3
// $Id: tool.php 519 2007-12-23 14:37:02Z Ruebenwurzel $
4

  
5
/*
6

  
7
 Website Baker Project <http://www.websitebaker.org/>
8
 Copyright (C) 2004-2008, Ryan Djurovich
9

  
10
 Website Baker is free software; you can redistribute it and/or modify
11
 it under the terms of the GNU General Public License as published by
12
 the Free Software Foundation; either version 2 of the License, or
13
 (at your option) any later version.
14

  
15
 Website Baker is distributed in the hope that it will be useful,
16
 but WITHOUT ANY WARRANTY; without even the implied warranty of
17
 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18
 GNU General Public License for more details.
19

  
20
 You should have received a copy of the GNU General Public License
21
 along with Website Baker; if not, write to the Free Software
22
 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
23

  
24
*/
25

  
26
require('../../config.php');
27
require_once(WB_PATH.'/framework/class.admin.php');
28
require_once(WB_PATH.'/framework/functions.php');
29

  
30
$admin = new admin('admintools', 'admintools');
31

  
32
if(!isset($_GET['tool'])) {
33
	header("Location: index.php");
34
	exit(0);
35
}
36

  
37
// Check if tool is installed
38
$result = $database->query("SELECT * FROM ".TABLE_PREFIX."addons WHERE type = 'module' AND function = 'tool' AND directory = '".$_GET['tool']."'");
39
if($result->numRows() == 0) {
40
	header("Location: index.php");
41
	exit(0);
42
}
43
$tool = $result->fetchRow();
44

  
45
?>
46
<h4 style="margin: 0; border-bottom: 1px solid #DDD; padding-bottom: 5px;">
47
	<a href="<?php echo ADMIN_URL; ?>/admintools/index.php"><?php echo $HEADING['ADMINISTRATION_TOOLS']; ?></a>
48
	->
49
	<?php echo $tool['name']; ?>
50
</h4>
51
<?php
52
require(WB_PATH.'/modules/'.$tool['directory'].'/tool.php');
53

  
54
$admin->print_footer();
55

  
56
?>
trunk/wb/admin/admintools/index.php
1
<?php
2

  
3
// $Id: index.php 519 2007-12-23 14:37:02Z doc $
4

  
5
/*
6

  
7
 Website Baker Project <http://www.websitebaker.org/>
8
 Copyright (C) 2004-2008, Ryan Djurovich
9

  
10
 Website Baker is free software; you can redistribute it and/or modify
11
 it under the terms of the GNU General Public License as published by
12
 the Free Software Foundation; either version 2 of the License, or
13
 (at your option) any later version.
14

  
15
 Website Baker is distributed in the hope that it will be useful,
16
 but WITHOUT ANY WARRANTY; without even the implied warranty of
17
 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18
 GNU General Public License for more details.
19

  
20
 You should have received a copy of the GNU General Public License
21
 along with Website Baker; if not, write to the Free Software
22
 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
23

  
24
*/
25

  
26
require('../../config.php');
27
require_once(WB_PATH.'/framework/class.admin.php');
28
$admin = new admin('admintools', 'admintools');
29

  
30
// Include the WB functions file
31
require_once(WB_PATH.'/framework/functions.php');
32

  
33
// Create new template object
34
$template = new Template(ADMIN_PATH.'/admintools');
35
$template->set_file('page', 'template.html');
36
$template->set_block('page', 'main_block', 'main');
37

  
38
// Insert required template variables
39
$template->set_var('ADMIN_URL', ADMIN_URL);
40
$template->set_var('HEADING_ADMINISTRATION_TOOLS', $HEADING['ADMINISTRATION_TOOLS']);
41

  
42
// Insert tools into tool list
43
$template->set_block('main_block', 'tool_list_block', 'tool_list');
44
$results = $database->query("SELECT * FROM ".TABLE_PREFIX."addons WHERE type = 'module' AND function = 'tool'");
45
if($results->numRows() > 0) {
46
	while($tool = $results->fetchRow()) {
47
		$template->set_var('TOOL_NAME', $tool['name']);
48
		$template->set_var('TOOL_DIR', $tool['directory']);
49
		$template->set_var('TOOL_DESCRIPTION', $tool['description']);
50
		$template->parse('tool_list', 'tool_list_block', true);
51
	}
52
} else {
53
	$template->set_var('TOOL_LIST', $TEXT['NONE_FOUND']);	
54
}
55

  
56
// Parse template objects output
57
$template->parse('main', 'main_block', false);
58
$template->pparse('output', 'page');
59

  
60
$admin->print_footer();
61

  
62
?>
trunk/wb/admin/admintools/template.html
1
</div><!-- BEGIN main_block -->
2

  
3
<style>
4
.tool_table td {
5
	vertical-align: top;
6
	text-align: left;
7
}
8
</style>
9

  
10
<form name="admin_tools" action="save.php" method="post">
11

  
12
<table cellpadding="3" cellspacing="0" border="0" align="center" width="100%" class="tool_table">
13

  
14
<tr class="advanced">
15
	<td colspan="3" style="padding-top: 10px;">
16
		<a name="administration_tools"></a>
17
		<h2>{HEADING_ADMINISTRATION_TOOLS}</h2>
18
	</td>
19
</tr>
20
<tr>
21
	<td colspan="3">
22
		<ul style="margin: 0; padding: 0; margin-left: 20px; margin-bottom: 10px;">
23
		<!-- BEGIN tool_list_block -->
24
		<li style="padding-bottom: 5px;">
25
		<a href="{ADMIN_URL}/admintools/tool.php?tool={TOOL_DIR}">{TOOL_NAME}</a>
26
		<br />{TOOL_DESCRIPTION}
27
		</li>
28
		<!-- END tool_list_block -->
29
		</ul>
30
		{TOOL_LIST}
31
	</td>
32
	<td>
33
		&nbsp;
34
	</td>
35
	<td>&nbsp;</td>
36
</tr>
37
</table>
38

  
39
</form>
40

  
41

  
42

  
43
<!-- END main_block -->
trunk/wb/framework/class.admin.php
127 127
					array(ADMIN_URL.'/addons/index.php', '', $MENU['ADDONS'], 'addons', 1),
128 128
					array(ADMIN_URL.'/preferences/index.php', '', $MENU['PREFERENCES'], 'preferences', 0),
129 129
					array(ADMIN_URL.'/settings/index.php', '', $MENU['SETTINGS'], 'settings', 1),
130
					array(ADMIN_URL.'/admintools/index.php', '', $MENU['ADMINTOOLS'], 'admintools', 1),
130 131
					array(ADMIN_URL.'/access/index.php', '', $MENU['ACCESS'], 'access', 1),
131 132
					array('http://www.websitebaker.org/help/'.WB_VERSION, '_blank', $MENU['HELP'], 'help', 0),
132 133
					array($view_url, '_blank', $MENU['VIEW'], 'view', 0),

Also available in: Unified diff