summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMax Kremmel <xing@synapse.plus.com>2006-01-10 21:17:06 +0000
committerMax Kremmel <xing@synapse.plus.com>2006-01-10 21:17:06 +0000
commitd6c4867b7332b43482105587ac9943803fe1e3ec (patch)
treebb78f6ec9b9c8fe924a27e6f2fc994509df34b94
parent611ae914ccb3b3c316ac9871d1edf5990c04bf7b (diff)
downloadusers-d6c4867b7332b43482105587ac9943803fe1e3ec.tar.gz
users-d6c4867b7332b43482105587ac9943803fe1e3ec.tar.bz2
users-d6c4867b7332b43482105587ac9943803fe1e3ec.zip
merge recent changes into HEAD
-rw-r--r--BitPermUser.php23
-rw-r--r--BitUser.php39
-rw-r--r--admin/edit_group.php50
-rw-r--r--admin/schema_inc.php6
-rw-r--r--admin/unassigned_perms.php48
-rw-r--r--admin/upgrade_inc.php9
-rw-r--r--icons/bookmarks.pngbin0 -> 480 bytes
-rw-r--r--icons/groups.pngbin0 -> 440 bytes
-rw-r--r--icons/tasks.pngbin0 -> 804 bytes
-rw-r--r--preferences.php10
-rw-r--r--templates/admin_group_edit.tpl47
-rw-r--r--templates/admin_groups_list.tpl4
-rw-r--r--templates/admin_login.tpl2
-rw-r--r--templates/admin_unassigned_perms.tpl48
-rw-r--r--templates/center_user_wiki_page.tpl4
-rw-r--r--templates/menu_users.tpl121
-rw-r--r--templates/my_bitweaver.tpl4
-rw-r--r--templates/my_bitweaver_bar.tpl74
-rw-r--r--templates/my_group_edit.tpl4
-rw-r--r--templates/my_groups_list.tpl2
-rw-r--r--templates/user_preferences.tpl132
21 files changed, 400 insertions, 227 deletions
diff --git a/BitPermUser.php b/BitPermUser.php
index 2019890..dc77be1 100644
--- a/BitPermUser.php
+++ b/BitPermUser.php
@@ -1,6 +1,6 @@
<?php
/**
- * $Header: /cvsroot/bitweaver/_bit_users/BitPermUser.php,v 1.11 2005/12/26 12:27:13 squareing Exp $
+ * $Header: /cvsroot/bitweaver/_bit_users/BitPermUser.php,v 1.12 2006/01/10 21:17:04 squareing Exp $
*
* Lib for user administration, groups and permissions
* This lib uses pear so the constructor requieres
@@ -12,7 +12,7 @@
* All Rights Reserved. See copyright.txt for details and a complete list of authors.
* Licensed under the GNU LESSER GENERAL PUBLIC LICENSE. See license.txt for details
*
- * $Id: BitPermUser.php,v 1.11 2005/12/26 12:27:13 squareing Exp $
+ * $Id: BitPermUser.php,v 1.12 2006/01/10 21:17:04 squareing Exp $
* @package users
*/
@@ -25,7 +25,7 @@ require_once( USERS_PKG_PATH.'BitUser.php' );
* Class that holds all information for a given user
*
* @author spider <spider@steelsun.com>
- * @version $Revision: 1.11 $
+ * @version $Revision: 1.12 $
* @package users
* @subpackage BitPermUser
*/
@@ -544,6 +544,15 @@ class BitPermUser extends BitUser {
}
+ function getUnassignedPerms() {
+ $query = "SELECT up.`perm_name` AS `hash_key`, up.*
+ FROM `".BIT_DB_PREFIX."users_permissions` up
+ LEFT JOIN `".BIT_DB_PREFIX."users_grouppermissions` ugp ON( up.`perm_name` = ugp.`perm_name` )
+ WHERE ugp.`group_id` IS NULL
+ ORDER BY `package`, `perm_name` ASC";
+ return( $this->mDb->getAssoc( $query ) );
+ }
+
// If the request has a ticket, some form action is being processed, and we need to validate we have a matched ticket to avoid XSS
function isAdmin( $pCheckTicket=FALSE ) {
$ret = FALSE;
@@ -757,13 +766,11 @@ class BitPermUser extends BitUser {
function assignPermissionToGroup( $perm, $pGroupId ) {
$gBitCache = new BitCache();
$gBitCache->removeCached("allperms");
- $query = "delete from `".BIT_DB_PREFIX."users_grouppermissions` where `group_id` = ?
- and `perm_name` = ?";
+ $query = "DELETE FROM `".BIT_DB_PREFIX."users_grouppermissions` WHERE `group_id` = ? AND `perm_name` = ?";
$result = $this->mDb->query($query, array($pGroupId, $perm));
- $query = "insert into `".BIT_DB_PREFIX."users_grouppermissions`(`group_id`, `perm_name`)
- values(?, ?)";
+ $query = "INSERT INTO `".BIT_DB_PREFIX."users_grouppermissions`(`group_id`, `perm_name`) VALUES(?, ?)";
$result = $this->mDb->query($query, array($pGroupId, $perm));
- return true;
+ return TRUE;
}
diff --git a/BitUser.php b/BitUser.php
index 3c589cd..e3063bd 100644
--- a/BitUser.php
+++ b/BitUser.php
@@ -1,6 +1,6 @@
<?php
/**
- * $Header: /cvsroot/bitweaver/_bit_users/BitUser.php,v 1.20 2005/12/26 12:27:13 squareing Exp $
+ * $Header: /cvsroot/bitweaver/_bit_users/BitUser.php,v 1.21 2006/01/10 21:17:04 squareing Exp $
*
* Lib for user administration, groups and permissions
* This lib uses pear so the constructor requieres
@@ -12,7 +12,7 @@
* All Rights Reserved. See copyright.txt for details and a complete list of authors.
* Licensed under the GNU LESSER GENERAL PUBLIC LICENSE. See license.txt for details
*
- * $Id: BitUser.php,v 1.20 2005/12/26 12:27:13 squareing Exp $
+ * $Id: BitUser.php,v 1.21 2006/01/10 21:17:04 squareing Exp $
* @package users
*/
@@ -41,7 +41,7 @@ define("ACCOUNT_DISABLED", -6);
* Class that holds all information for a given user
*
* @author spider <spider@steelsun.com>
- * @version $Revision: 1.20 $
+ * @version $Revision: 1.21 $
* @package users
* @subpackage BitUser
*/
@@ -63,7 +63,7 @@ class BitUser extends LibertyAttachable {
* Constructor - will automatically load all relevant data if passed a user string
*
* @access public
-* @author Christian Fower<spider@viovio.com>
+* @author Christian Fowler <spider@viovio.com>
* @return returnString
*/
function BitUser( $pUserId=NULL, $pContentId=NULL ) {
@@ -399,19 +399,19 @@ class BitUser extends LibertyAttachable {
return( count( $this->mErrors ) == 0 );
}
- function get_SMTP_response ( &$pConnect ) {
+ function get_SMTP_response ( &$pConnect ) {
- $Out = "";
- while (1) {
- $work = fgets ( $pConnect, 1024 );
- $Out .= $work;
- if (!preg_match('/^\d\d\d-/',$work)) {
- break;
+ $Out = "";
+ while (1) {
+ $work = fgets ( $pConnect, 1024 );
+ $Out .= $work;
+ if (!preg_match('/^\d\d\d-/',$work)) {
+ break;
+ }
}
- }
-
- return $Out;
- }
+
+ return $Out;
+ }
function verifyEmail( $pEmail, $pValidate = FALSE ) {
@@ -667,13 +667,13 @@ if ($gDebug) echo "Run : QUIT<br>";
function login( $pLogin, $pPassword, $pChallenge=NULL, $pResponse=NULL ) {
global $gBitSystem, $user_cookie_site;
$isvalid = false;
-
+
// Make sure cookies are enabled
if ( !isset($_COOKIE[BIT_SESSION_NAME]) ) {
$url = USERS_PKG_URL.'login.php?error=' . urlencode(tra('no cookie found, please enable cookies and try again.'));
return ( $url );
}
-
+
// Verify user is valid
$validate_result = $this->validate($pLogin, $pPassword, $pChallenge, $pResponse);
if( $validate_result ) {
@@ -1557,7 +1557,10 @@ echo "userAuthPresent: $userAuthPresent<br>";
}
if( $pUseLink ) {
- $ret = '<a class="username" title="'.tra( 'Visit the userpage of' ).': '.$displayName.'" href="'.BitUser::getDisplayUrl( $iHomepage ).'">'.$displayName.'</a>';
+ $ret = '<a class="username" title="'.tra( 'Visit the userpage of' ).': '.$displayName
+ .'" href="'.BitUser::getDisplayUrl( $iHomepage ).'">'
+ . ((isset($pHash['link_label'])) ? ($pHash['link_label']) : ($displayName))
+ .'</a>';
} else {
$ret = $displayName;
}
diff --git a/admin/edit_group.php b/admin/edit_group.php
index d22d9eb..891c424 100644
--- a/admin/edit_group.php
+++ b/admin/edit_group.php
@@ -1,18 +1,18 @@
<?php
-// $Header: /cvsroot/bitweaver/_bit_users/admin/edit_group.php,v 1.6 2005/12/26 12:27:13 squareing Exp $
+// $Header: /cvsroot/bitweaver/_bit_users/admin/edit_group.php,v 1.7 2006/01/10 21:17:05 squareing Exp $
// Copyright (c) 2002-2003, Luis Argerich, Garland Foster, Eduardo Polidor, et. al.
// All Rights Reserved. See copyright.txt for details and a complete list of authors.
// Licensed under the GNU LESSER GENERAL PUBLIC LICENSE. See license.txt for details.
// Initialization
require_once( '../../bit_setup_inc.php' );
-
// PERMISSIONS: NEEDS admin
$gBitSystem->verifyPermission( 'bit_p_admin' );
$successMsg = NULL;
$errorMsg = NULL;
+$gBitUser->getUnassignedPerms();
// We need to scan for defaults
global $gBitInstaller;
$gBitInstaller = &$gBitSystem;
@@ -24,6 +24,16 @@ if( count( $_GET ) > 2 || count( $_POST ) > 2 ) {
if( !empty( $_REQUEST['group_id'] ) ) {
$allPerms = $gBitUser->getGroupPermissions( NULL, NULL, NULL, !empty( $_REQUEST['sort_mode'] ) ? $_REQUEST['sort_mode'] : NULL );
+
+ // get all the included permissions as well
+ $includes = array();
+ $gBitUser->getIncludedGroups( $_REQUEST['group_id'], $includes );
+ foreach( $includes as $gid => $name ) {
+ foreach( $gBitUser->getGroupPermissions( $gid ) as $p ) {
+ $incPerms[$p['perm_name']]['group_id'] = $gid;
+ $incPerms[$p['perm_name']]['group_name'] = $name;
+ }
+ }
}
$gBitSmarty->assign( 'package',isset( $_REQUEST['package'] ) ? $_REQUEST['package'] : 'all' );
@@ -31,10 +41,10 @@ $gBitSmarty->assign( 'package',isset( $_REQUEST['package'] ) ? $_REQUEST['packag
if( !empty( $_REQUEST["cancel"] ) ) {
header( 'Location: '.USERS_PKG_URL.'admin/edit_group.php' );
die;
-} elseif( isset($_REQUEST["batch_assign"] ) ) {
+} elseif( isset( $_REQUEST["batch_assign"] ) ) {
$groupInfo = $gBitUser->getGroupInfo( $_REQUEST['batch_assign'] );
if( isset( $_REQUEST["confirm"] ) ) {
-$gBitUser->batchAssignUsersToGroup( $_REQUEST['batch_assign'] );
+ $gBitUser->batchAssignUsersToGroup( $_REQUEST['batch_assign'] );
} else {
$gBitSystem->setBrowserTitle( tra( 'Confirm Batch Group Assignment' ) );
$formHash['batch_assign'] = $_REQUEST["batch_assign"];
@@ -52,7 +62,7 @@ $gBitUser->batchAssignUsersToGroup( $_REQUEST['batch_assign'] );
$groupMembers = $gBitUser->get_group_users( $_REQUEST["members"] );
$gBitSmarty->assign_by_ref( 'groupMembers', $groupMembers );
$mid = "bitpackage:users/group_list_members.tpl";
- $gBitSystem->setBrowserTitle( tra( 'Group Members' ).': '.$groupInfo['group_name'] );
+ $gBitSystem->setBrowserTitle( tra( 'Group Members' ).': '.$groupInfo['group_name'] );
} elseif( isset($_REQUEST["save"] ) ) {
if( empty($_REQUEST["name"] ) ) {
$_REQUEST["name"] = $_REQUEST["olgroup"];
@@ -91,6 +101,10 @@ $gBitUser->batchAssignUsersToGroup( $_REQUEST['batch_assign'] );
}
if( isset($_REQUEST['perm'][$per]) && !isset($updatePerms[$per]) ) {
// we have an unselected perm that is now selected
+ // remove it from any inherited group ( we need to shuffle around perms in the users groups as well ) - xing
+ if( !empty( $incPerms[$per] ) ) {
+ $gBitUser->remove_permission_from_group( $per, $incPerms[$per]['group_id'] );
+ }
$gBitUser->assignPermissionToGroup($per, $_REQUEST['group_id']);
} elseif( empty($_REQUEST['perm'][$per]) && isset($updatePerms[$per]) ) {
// we have a selected perm that is now UNselected
@@ -115,12 +129,12 @@ $gBitUser->batchAssignUsersToGroup( $_REQUEST['batch_assign'] );
$successMsg = "The group ".$groupInfo['group_name']." was deleted.";
unset( $_REQUEST['group_id'] );
} else {
- $gBitSystem->setBrowserTitle( tra('Delete group') );
- $msgHash = array(
- 'confirm_item' => tra( 'Are you sure you want to remove the group?' ),
- 'warning' => tra( 'This will permentally delete the group' )." <strong>$groupInfo[group_name]</strong>",
- );
- $gBitSystem->confirmDialog( $formHash,$msgHash );
+ $gBitSystem->setBrowserTitle( tra('Delete group') );
+ $msgHash = array(
+ 'confirm_item' => tra( 'Are you sure you want to remove the group?' ),
+ 'warning' => tra( 'This will permentally delete the group' )." <strong>$groupInfo[group_name]</strong>",
+ );
+ $gBitSystem->confirmDialog( $formHash,$msgHash );
}
} elseif ($_REQUEST["action"] == 'remove') {
$gBitUser->remove_permission_from_group( $_REQUEST["permission"], $_REQUEST['group_id'] );
@@ -154,6 +168,17 @@ $inc = array();
if( empty( $mid ) ) {
if( !empty( $_REQUEST['group_id'] ) ) {
$groupInfo = $gBitUser->getGroupInfo( $_REQUEST['group_id'] );
+
+ // refresh inherited permissions list
+ $incPerms = array();
+ foreach( $includes as $gid => $name ) {
+ foreach( $gBitUser->getGroupPermissions( $gid ) as $p ) {
+ $incPerms[$p['perm_name']]['group_id'] = $gid;
+ $incPerms[$p['perm_name']]['group_name'] = $name;
+ }
+ }
+ $gBitSmarty->assign( 'incPerms', $incPerms );
+
$rs = array();
$gBitUser->getIncludedGroups( $_REQUEST['group_id'], $rs );
foreach( array_keys( $groupList["data"] ) as $groupId ) {
@@ -177,9 +202,6 @@ if( empty( $mid ) ) {
$gBitSmarty->assign('groups', $groupList['data']);
$gBitSmarty->assign('successMsg',$successMsg);
$gBitSmarty->assign('errorMsg',$errorMsg);
-// probably obsolete now
-//$gBitSmarty->assign( (!empty( $_REQUEST['tab'] ) ? $_REQUEST['tab'] : 'edit').'TabSelect', 'tdefault' );
-
// Display the template for group administration
$gBitSystem->display( $mid );
diff --git a/admin/schema_inc.php b/admin/schema_inc.php
index a827886..c7b7a7f 100644
--- a/admin/schema_inc.php
+++ b/admin/schema_inc.php
@@ -159,6 +159,12 @@ $tables = array(
CONSTRAINTS ', CONSTRAINT `users_cnxn_user_ref` FOREIGN KEY (`user_id`) REFERENCES `".BIT_DB_PREFIX."users_users` (`user_id`)'
",
+'tiki_semaphores' => "
+ sem_name C(250) PRIMARY,
+ user_id I4 NOTNULL,
+ created I8
+",
+
'tiki_user_bookmarks_folders' => "
folder_id I4 AUTO PRIMARY,
parent_id I4,
diff --git a/admin/unassigned_perms.php b/admin/unassigned_perms.php
new file mode 100644
index 0000000..72a562d
--- /dev/null
+++ b/admin/unassigned_perms.php
@@ -0,0 +1,48 @@
+<?php
+// $Header: /cvsroot/bitweaver/_bit_users/admin/Attic/unassigned_perms.php,v 1.2 2006/01/10 21:17:05 squareing Exp $
+// Initialization
+require_once( '../../bit_setup_inc.php' );
+
+$gBitSystem->verifyPermission( 'bit_p_admin' );
+$gBitSmarty->assign_by_ref( 'feedback', $feedback = array() );
+
+$listHash = array( 'sort_mode' => 'group_id_asc' );
+$groupList = $gBitUser->getAllGroups( $listHash );
+foreach( $groupList['data'] as $group ) {
+ $groupDrop[$group['group_id']] = $group['group_name'];
+}
+$gBitSmarty->assign( 'groupDrop', $groupDrop );
+
+if( !empty( $_REQUEST['assign_permissions'] ) && !empty( $_REQUEST['assign'] ) ) {
+ $feedback['success'] = tra( "The permissions were successfully added to the requested groups." );
+ foreach( $_REQUEST['assign'] as $p => $group_id ) {
+ $gBitUser->assignPermissionToGroup( $p, $group_id );
+ $assignedPerms[$p] = $groupDrop[$group_id];
+ }
+ $gBitSmarty->assign( 'assignedPerms', $assignedPerms );
+}
+
+$unassignedPerms = $gBitUser->getUnassignedPerms();
+foreach( $unassignedPerms as $key => $p ) {
+ switch( $p['level'] ) {
+ case "basic":
+ $unassignedPerms[$key]['suggestion'] = -1;
+ break;
+ case "admin":
+ $unassignedPerms[$key]['suggestion'] = 1;
+ break;
+ case "editors":
+ $unassignedPerms[$key]['suggestion'] = 2;
+ break;
+ case "registered":
+ $unassignedPerms[$key]['suggestion'] = 3;
+ break;
+ default:
+ $unassignedPerms[$key]['suggestion'] = 0;
+ break;
+ }
+}
+$gBitSmarty->assign( 'unassignedPerms', $unassignedPerms );
+
+$gBitSystem->display( "bitpackage:users/admin_unassigned_perms.tpl", tra( "Unassigned Permissions" ) );
+?>
diff --git a/admin/upgrade_inc.php b/admin/upgrade_inc.php
index 4f5a1a3..c1e2973 100644
--- a/admin/upgrade_inc.php
+++ b/admin/upgrade_inc.php
@@ -40,6 +40,8 @@ array( 'RENAMECOLUMN' => array(
'users_groups_map' => array(
'`userId`' => '`user_id` I4'
),
+ 'tiki_semaphores' => array( '`semName`' => '`sem_name` C(250)',
+ '`timestamp`' => '`created` I8' ),
'tiki_user_preferences' => array(
'`prefName`' => '`pref_name` C(40)'
),
@@ -95,6 +97,9 @@ array( 'ALTER' => array(
'portrait_attachment_id' => array( '`portrait_attachment_id`', 'I4' ), // , 'NOTNULL' ),
'logo_attachment_id' => array( '`logo_attachment_id`', 'I4' ), // , 'NOTNULL' ),
),
+ 'tiki_semaphores' => array(
+ 'user_id' => array( '`user_id`', 'I4' ), // , 'NOTNULL' ),
+ ),
'tiki_sessions' => array(
'user_id' => array( '`user_id`', 'I4' ), // , 'NOTNULL' ),
'session_id' => array( '`session_id`', 'VARCHAR(32)' ), // , 'NOTNULL' ),
@@ -184,6 +189,8 @@ array( 'QUERY' =>
// In order for all pages to upgrade, there must be at least an 'admin' and 'system' user
"INSERT INTO `".BIT_DB_PREFIX."users_users` (`real_name`, `login`, `email`, `user_id` ) VALUES ('Administrator', 'admin', 'root@localhost', ".ROOT_USER_ID.")",
"INSERT INTO `".BIT_DB_PREFIX."users_users` (`real_name`, `login`, `email` ) VALUES ('System', 'system', 'system@localhost' )",
+ "UPDATE `".BIT_DB_PREFIX."tiki_semaphores` SET `user_id`=(SELECT `user_id` FROM `".BIT_DB_PREFIX."users_users` WHERE `".BIT_DB_PREFIX."users_users`.`login`=`".BIT_DB_PREFIX."tiki_semaphores`.`user`)",
+ "UPDATE `".BIT_DB_PREFIX."tiki_semaphores` SET `user_id`=(SELECT `user_id` FROM `".BIT_DB_PREFIX."users_users` WHERE `".BIT_DB_PREFIX."users_users`.`login`=`".BIT_DB_PREFIX."tiki_semaphores`.`user`)",
"UPDATE `".BIT_DB_PREFIX."tiki_sessions` SET `user_id`=(SELECT `user_id` FROM `".BIT_DB_PREFIX."users_users` WHERE `".BIT_DB_PREFIX."users_users`.`login`=`".BIT_DB_PREFIX."tiki_sessions`.`user`)",
"UPDATE `".BIT_DB_PREFIX."tiki_user_preferences` SET `user_id`=(SELECT `user_id` FROM `".BIT_DB_PREFIX."users_users` WHERE `".BIT_DB_PREFIX."users_users`.`login`=`".BIT_DB_PREFIX."tiki_user_preferences`.`user`)",
"UPDATE `".BIT_DB_PREFIX."tiki_user_bookmarks_folders` SET `user_id`=(SELECT `user_id` FROM `".BIT_DB_PREFIX."users_users` WHERE `".BIT_DB_PREFIX."users_users`.`login`=`".BIT_DB_PREFIX."tiki_user_bookmarks_folders`.`user`)",
@@ -209,6 +216,7 @@ array( 'QUERY' =>
// STEP 4
array( 'DATADICT' => array(
array( 'DROPCOLUMN' => array(
+ 'tiki_semaphores' => array( '`user`' ),
'tiki_sessions' => array( '`user`', '`sessionId`' ),
'users_groups_map' => array( '`groupName`' ),
'users_grouppermissions' => array( '`groupName`' ),
@@ -248,6 +256,7 @@ array( 'PHP' => '
// STEP 4
array( 'DATADICT' => array(
array( 'CREATEINDEX' => array(
+ 'tiki_sema_user_idx' => array( 'tiki_semaphores', '`user_id`', array() ),
'tiki_user_prefs_idx' => array( 'tiki_user_preferences', '`user_id`', array() ),
'tiki_user_prefs_un_idx' => array( 'tiki_user_preferences', '`user_id`,`pref_name`', array( 'UNIQUE' ) ),
'users_groups_map_user_idx' => array( 'users_groups_map', '`user_id`', array() ),
diff --git a/icons/bookmarks.png b/icons/bookmarks.png
new file mode 100644
index 0000000..d0207fa
--- /dev/null
+++ b/icons/bookmarks.png
Binary files differ
diff --git a/icons/groups.png b/icons/groups.png
new file mode 100644
index 0000000..c976fbd
--- /dev/null
+++ b/icons/groups.png
Binary files differ
diff --git a/icons/tasks.png b/icons/tasks.png
new file mode 100644
index 0000000..6ecbb50
--- /dev/null
+++ b/icons/tasks.png
Binary files differ
diff --git a/preferences.php b/preferences.php
index ae2bc99..b8d3241 100644
--- a/preferences.php
+++ b/preferences.php
@@ -1,6 +1,6 @@
<?php
/**
- * $Header: /cvsroot/bitweaver/_bit_users/preferences.php,v 1.10 2005/12/26 12:27:13 squareing Exp $
+ * $Header: /cvsroot/bitweaver/_bit_users/preferences.php,v 1.11 2006/01/10 21:17:05 squareing Exp $
*
* Copyright (c) 2004 bitweaver.org
* Copyright (c) 2003 tikwiki.org
@@ -8,7 +8,7 @@
* All Rights Reserved. See copyright.txt for details and a complete list of authors.
* Licensed under the GNU LESSER GENERAL PUBLIC LICENSE. See license.txt for details
*
- * $Id: preferences.php,v 1.10 2005/12/26 12:27:13 squareing Exp $
+ * $Id: preferences.php,v 1.11 2006/01/10 21:17:05 squareing Exp $
* @package users
* @subpackage functions
*/
@@ -57,11 +57,13 @@ if( !empty( $gBitSystem->mPrefs['custom_user_fields'] ) ) {
$gBitSmarty->assign('customFields', $customFields);
}
-if( $gBitSystem->isPackageActive( 'calendar' ) and $gBitSystem->isFeatureActive('calendar_user_prefs') ) {
+if( $gBitSystem->isPackageActive( 'calendar' ) && $gBitSystem->isFeatureActive('calendar_user_prefs') ) {
include_once( CALENDAR_PKG_PATH.'admin/admin_calendar_inc.php' );
if( !empty( $_REQUEST['calendar_submit'] ) ) {
foreach( $calendarValues as $item ) {
- $editUser->storePreference( $item, $_REQUEST[$item] );
+ if( !empty( $_REQUEST[$item] ) ) {
+ $editUser->storePreference( $item, $_REQUEST[$item] );
+ }
}
}
}
diff --git a/templates/admin_group_edit.tpl b/templates/admin_group_edit.tpl
index 201052a..8d75b20 100644
--- a/templates/admin_group_edit.tpl
+++ b/templates/admin_group_edit.tpl
@@ -1,4 +1,4 @@
-{* $Header: /cvsroot/bitweaver/_bit_users/templates/admin_group_edit.tpl,v 1.2 2005/08/07 17:46:48 squareing Exp $ *}
+{* $Header: /cvsroot/bitweaver/_bit_users/templates/admin_group_edit.tpl,v 1.3 2006/01/10 21:17:05 squareing Exp $ *}
{strip}
<div class="floaticon">
@@ -123,6 +123,9 @@
<table class="data">
<tr>
<th>&nbsp;</th>
+ {if $incPerms}
+ <th><abbr title="{tr}Inherited permissions{/tr}">*</abbr></th>
+ {/if}
<th>{smartlink ititle="Name" isort="up.perm_name" group_id=$groupInfo.group_id offset=$offset package=$package}</th>
<th>{tr}Level{/tr}</th>
<th>{smartlink ititle="Package" isort=package group_id=$groupInfo.group_id offset=$offset package=$package}</th>
@@ -131,15 +134,25 @@
{foreach key=permName item=perm from=$allPerms}
{if $package eq $perm.package or $package eq 'all'}
<tr class="{cycle values="even,odd"}">
- <td><input type="checkbox" id="{$permName}" name="perm[{$permName}]"{if $groupInfo.perms.$permName} checked="checked"{/if} /></td>
+ <td><input type="checkbox" id="{$permName}" name="perm[{$permName}]" {if $groupInfo.perms.$permName} checked="checked"{/if} /></td>
+ {if $incPerms}
+ <td>
+ {if $incPerms.$permName}
+ <input type="checkbox" id="{$permName}" name="inherited[{$permName}]" checked="checked" disabled="disabled" title="{tr}Inherited from{/tr}: {$incPerms.$permName.group_name}" />
+ {/if}
+ </td>
+ {/if}
<td><label for="{$permName}">{$permName}</label></td>
- <td><select name="level[{$permName}]">{html_options output=$levels values=$levels selected=$perm.level}</select></td>
+ <td>{html_options name="level[$permName]" output=$levels values=$levels selected=$perm.level}</td>
<td>{tr}{$perm.package}{/tr}</td>
<td>{tr}{$perm.perm_desc}{/tr}</td>
</tr>
{/if}
{/foreach}
</table>
+ {if $incPerms}
+ * {formhelp note="Inherited permissions. Hover over the checkboxes to find out what group they are inherited from. Assigning them to a new level will remove them from the original group and insert them here."}
+ {/if}
</div>
<div class="row submit">
@@ -148,30 +161,34 @@
{/form}
{/jstab}
- {jstab title="Batch Assign"}
+ {jstab title="Advanced"}
{form legend="Batch assign permissions"}
<input type="hidden" name="group_id" value="{$groupInfo.group_id}" />
<input type="hidden" name="package" value="{$package|escape}" />
<div class="row">
- <select name="oper">
- <option value="assign">{tr}assign{/tr}</option>
- <option value="remove">{tr}remove{/tr}</option>
- </select>
- {tr}all permissions in level{/tr}
- <select name="level">
- {html_options output=$levels values=$levels selected=$perms[user].level}
- </select>
- {tr}to {$groupInfo.group_name}{/tr}
+ {formlabel label="Assign or Remove" for="oper"}
+ {forminput}
+ <select name="oper" id="oper">
+ <option value="assign">{tr}Assign{/tr}</option>
+ <option value="remove">{tr}Remove{/tr}</option>
+ </select>
+ <br />
+ {tr}all permissions in level{/tr}
+ <br />
+ <select name="level">
+ {html_options output=$levels values=$levels selected=$perms[user].level}
+ </select>
+ <br />
+ {tr}to / from {$groupInfo.group_name}{/tr}
+ {/forminput}
</div>
<div class="row submit">
<input type="submit" name="allper" value="{tr}Update{/tr}" />
</div>
{/form}
- {/jstab}
- {jstab title="Create Level"}
{form legend="Create a new level"}
<input type="hidden" name="group_id" value="{$groupInfo.group_id}" />
<input type="hidden" name="package" value="{$package|escape}" />
diff --git a/templates/admin_groups_list.tpl b/templates/admin_groups_list.tpl
index ae09f88..086cf9d 100644
--- a/templates/admin_groups_list.tpl
+++ b/templates/admin_groups_list.tpl
@@ -6,6 +6,8 @@
<div class="body">
{smartlink ititle="Add a new group" ipackage=users ifile="admin/edit_group.php" action=create}
+ <br />
+ {smartlink ititle="Check for Unassigned Permissions" ipackage=users ifile="admin/unassigned_perms.php"}
<div class="navbar">
<ul>
@@ -24,7 +26,7 @@
<div class="floaticon">
{smartlink ititle="Edit" ipackage="users" ifile="admin/edit_group.php" ibiticon="liberty/edit" group_id=$groupId}
{smartlink ititle="Group Members" ipackage="users" ifile="admin/edit_group.php" ibiticon="users/users" members=$groupId}
- {if $groupId ne -1}{* sorry for hardcoding, really need php define ANONYMOUS_GROUP_ID - spiderr *}
+ {if $groupId ne $smarty.const.ANONYMOUS_GROUP_ID}
{smartlink ititle="Batch assign" ipackage="users" ifile="admin/edit_group.php" ibiticon="users/batch_assign" batch_assign=$groupId}
{smartlink ititle="Remove" ipackage="users" ifile="admin/edit_group.php" ibiticon="liberty/delete" action=delete group_id=$groupId}
{/if}
diff --git a/templates/admin_login.tpl b/templates/admin_login.tpl
index 9369610..26fc067 100644
--- a/templates/admin_login.tpl
+++ b/templates/admin_login.tpl
@@ -157,7 +157,7 @@
<option value="604800" {if $remembertime eq 604800} selected="selected"{/if}>1 {tr}week{/tr}</option>
<option value="2592000" {if $remembertime eq 2592000} selected="selected"{/if}>1 {tr}month{/tr}</option>
<option value="15724800" {if $remembertime eq 15724800} selected="selected"{/if}>6 {tr}months{/tr}</option>
- <option value="2147483648" {if $remembertime eq 2147483648} selected="selected"{/if}>{tr}Forever{/tr}</option>
+ <option value="31449600" {if $remembertime eq 31449600} selected="selected"{/if}>1 {tr}year{/tr}</option>
</select>
{formhelp note=""}
{/forminput}
diff --git a/templates/admin_unassigned_perms.tpl b/templates/admin_unassigned_perms.tpl
new file mode 100644
index 0000000..cf02975
--- /dev/null
+++ b/templates/admin_unassigned_perms.tpl
@@ -0,0 +1,48 @@
+{* $Header: /cvsroot/bitweaver/_bit_users/templates/Attic/admin_unassigned_perms.tpl,v 1.2 2006/01/10 21:17:05 squareing Exp $ *}
+{strip}
+
+<div class="admin groups">
+ <div class="header">
+ <h1>{tr}Unassigned Permissions{/tr}</h1>
+ </div>
+
+ <div class="body">
+ {formfeedback hash=$feedback}
+ {if $assignedPerms}
+ <ul>
+ {foreach from=$assignedPerms key=perm item=group}
+ <li>{$perm} --&gt; {$group}</li>
+ {/foreach}
+ </ul>
+ {/if}
+
+ {if $unassignedPerms}
+ {form legend="Assign Permissions"}
+ <table class="data">
+ <caption>{tr}Unassigned Permissions{/tr}</caption>
+ <tr>
+ <th>{tr}Permission{/tr}</th>
+ <th>{tr}Package{/tr}</th>
+ <th>{tr}Default Level{/tr}</th>
+ <th style="width:1px;">{tr}Group{/tr}</th>
+ </tr>
+ {foreach from=$unassignedPerms item=perm}
+ <tr class="{cycle values="odd,even"}">
+ <td><strong>{$perm.perm_name}</strong><br />{$perm.perm_desc}</td>
+ <td>{$perm.package}</td>
+ <td>{$perm.level}</td>
+ <td>{html_options name="assign[`$perm.perm_name`]" options=$groupDrop values=$groupDrop selected=$perm.suggestion}</td>
+ </tr>
+ {/foreach}
+ </table>
+
+ <div class="row submit">
+ <input type="submit" name="assign_permissions" value="{tr}Assign Permissions{/tr}" />
+ </div>
+ {/form}
+ {else}
+ {formfeedback success="{tr}No unassigned permissions{/tr}"}
+ {/if}
+ </div><!-- end .body -->
+</div><!-- end .users -->
+{/strip}
diff --git a/templates/center_user_wiki_page.tpl b/templates/center_user_wiki_page.tpl
index 38605a3..17a47f1 100644
--- a/templates/center_user_wiki_page.tpl
+++ b/templates/center_user_wiki_page.tpl
@@ -35,6 +35,10 @@
</div>
{/if}
+ {if $gBitUser->mUserId == $gQueryUser->mUserId}
+ {include file="bitpackage:users/my_bitweaver_bar.tpl"}
+ {/if}
+
<div class="body">
{if !$parsed}
<p>
diff --git a/templates/menu_users.tpl b/templates/menu_users.tpl
index 3ddac74..0cf72cb 100644
--- a/templates/menu_users.tpl
+++ b/templates/menu_users.tpl
@@ -1,10 +1,22 @@
{strip}
<ul>
{if $gBitUser->isRegistered()}
- <li><a class="item" href="{$smarty.const.USERS_PKG_URL}my.php">{biticon ipackage=liberty iname=spacer iforce=icon} {tr}My {$gBitSystemPrefs.site_menu_title|default:$siteTitle}{/tr}</a></li>
- <li><a class="item" href="{$smarty.const.USERS_PKG_URL}index.php?home={$gBitUser->mInfo.login}">{biticon ipackage=users iname=home iexplain="Home" iforce=icon} {tr}View My Homepage{/tr}</a></li>
+ <li>
+ <a class="item" href="{$smarty.const.USERS_PKG_URL}my.php">
+ {biticon ipackage=users iname=home iexplain="My Personal Homepage" iforce=icon}{if !$icons_only} {tr}My {$gBitSystemPrefs.site_menu_title|default:$siteTitle}{/tr}{/if}
+ </a>
+ </li>
+ <li>
+ <a class="item" href="{$smarty.const.USERS_PKG_URL}index.php?home={$gBitUser->mInfo.login}">
+ {biticon ipackage=users iname=home iexplain="Home" iforce=icon}{if !$icons_only} {tr}View My Homepage{/tr}{/if}
+ </a>
+ </li>
{if $gBitSystem->isPackageActive( 'wiki' )}
- <li><a class="item" href="{$smarty.const.USERS_PKG_URL}edit_personal_page.php">{biticon ipackage=liberty iname=edit iforce=icon} {tr}Edit My Homepage{/tr}</a></li>
+ <li>
+ <a class="item" href="{$smarty.const.USERS_PKG_URL}edit_personal_page.php">
+ {biticon ipackage=liberty iname=edit iexplain="Edit My Homepage" iforce=icon}{if !$icons_only} {tr}Edit My Homepage{/tr}{/if}
+ </a>
+ </li>
{/if}
{if $gBitSystemPrefs.feature_user_layout eq 'h'}
{assign var="myLayoutConfig" value="My Homepage"}
@@ -12,51 +24,112 @@
{assign var="myLayoutConfig" value="My Site Layout"}
{/if}
{if $gBitUser->canCustomizeTheme() || $gBitUser->canCustomizeLayout() }
- <li><a class="item" href="{$smarty.const.USERS_PKG_URL}assigned_modules.php">{biticon ipackage=liberty iname=config iexplain=Configure iforce=icon} {tr}Configure {$myLayoutConfig}{/tr}</a></li>
+ <li>
+ <a class="item" href="{$smarty.const.USERS_PKG_URL}assigned_modules.php">
+ {biticon ipackage=liberty iname=config iexplain=Configure iforce=icon}{if !$icons_only} {tr}Configure {$myLayoutConfig}{/tr}{/if}
+ </a>
+ </li>
{/if}
{if $gBitSystem->isFeatureActive( 'feature_userPreferences' )}
- <li><a class="item" href="{$smarty.const.USERS_PKG_URL}preferences.php">{biticon ipackage=liberty iname=settings iexplain=Preferences iforce=icon} {tr}Preferences{/tr}</a></li>
+ <li>
+ <a class="item" href="{$smarty.const.USERS_PKG_URL}preferences.php">
+ {biticon ipackage=liberty iname=settings iexplain=Preferences iforce=icon}{if !$icons_only} {tr}Preferences{/tr}{/if}
+ </a>
+ </li>
{/if}
{if $gBitSystem->isFeatureActive( 'feature_user_bookmarks' ) and $gBitUser->hasPermission( 'bit_p_create_bookmarks' )}
- <li><a class="item" href="{$smarty.const.USERS_PKG_URL}bookmarks.php">{biticon ipackage=liberty iname=spacer iforce=icon} {tr}Bookmarks{/tr}</a></li>
- {/if}
- {if $gBitSystem->isPackageActive( 'messages' ) and $gBitUser->hasPermission( 'bit_p_messages' )}
- <li><a class="item" href="{$smarty.const.MESSU_PKG_URL}message_box.php">{biticon ipackage=liberty iname=spacer iforce=icon} {tr}Messages{/tr}</a></li>
+ <li>
+ <a class="item" href="{$smarty.const.USERS_PKG_URL}bookmarks.php">
+ {biticon ipackage=users iname=bookmarks iexplain="Links to my favourite pages" iforce=icon}{if !$icons_only} {tr}Bookmarks{/tr}{/if}
+ </a>
+ </li>
{/if}
{if $gBitSystem->isPackageActive( 'minical' )}
- <li><a class="item" href="{$smarty.const.MINICAL_PKG_URL}index.php">{biticon ipackage=liberty iname=spacer iforce=icon} {tr}Mini calendar{/tr}</a></li>
- {/if}
- {if $gBitUser->isRegistered() && $gBitSystem->isPackageActive('gatekeeper')}
- <li><a class="item" href="{$smarty.const.GATEKEEPER_PKG_URL}">{biticon ipackage=liberty iname=spacer iforce=icon} {tr}Security{/tr}</a></li>
+ <li>
+ <a class="item" href="{$smarty.const.MINICAL_PKG_URL}index.php">
+ {biticon ipackage=liberty iname=spacer iexplain="Mini Calendar" iforce=icon}{if !$icons_only} {tr}Mini calendar{/tr}{/if}
+ </a>
+ </li>
{/if}
{if $gBitSystem->isPackageActive( 'quota' )}
- <li><a class="item" href="{$smarty.const.QUOTA_PKG_URL}">{biticon ipackage=liberty iname=spacer iforce=icon} {tr}My Quota and Usage{/tr}</a></li>
+ <li>
+ <a class="item" href="{$smarty.const.QUOTA_PKG_URL}">
+ {biticon ipackage=quota iname=quota iexplain="My quota and usage" iforce=icon}{if !$icons_only} {tr}My Quota and Usage{/tr}{/if}
+ </a>
+ </li>
{/if}
{if $gBitSystem->isFeatureActive('feature_user_watches') }
- <li><a class="item" href="{$smarty.const.USERS_PKG_URL}watches.php">{biticon ipackage=users iname=watch iexplain="My Watches" iforce=icon} {tr}My watches{/tr}</a></li>
+ <li>
+ <a class="item" href="{$smarty.const.USERS_PKG_URL}watches.php">
+ {biticon ipackage=users iname=watch iexplain="My Watches" iforce=icon}{if !$icons_only} {tr}My watches{/tr}{/if}
+ </a>
+ </li>
{/if}
{if $gBitSystem->isPackageActive( 'newsreader' ) and $gBitUser->hasPermission( 'bit_p_newsreader' )}
- <li><a class="item" href="{$smarty.const.NEWSREADER_PKG_URL}index.php">{biticon ipackage=liberty iname=spacer iforce=icon} {tr}Newsreader{/tr}</a></li>
+ <li>
+ <a class="item" href="{$smarty.const.NEWSREADER_PKG_URL}index.php">
+ {biticon ipackage=liberty iname=spacer iexplain="Newsreader" iforce=icon}{if !$icons_only} {tr}Newsreader{/tr}{/if}
+ </a>
+ </li>
{/if}
{if $gBitSystem->isPackageActive( 'notepad' ) and $gBitUser->hasPermission( 'bit_p_notepad' )}
- <li><a class="item" href="{$smarty.const.NOTEPAD_PKG_URL}index.php">{biticon ipackage=liberty iname=spacer iforce=icon} {tr}Notepad{/tr}</a></li>
+ <li>
+ <a class="item" href="{$smarty.const.NOTEPAD_PKG_URL}index.php">
+ {biticon ipackage=liberty iname=spacer iexplain="Notepad" iforce=icon}{if !$icons_only} {tr}Notepad{/tr}{/if}
+ </a>
+ </li>
{/if}
{if $gBitSystem->isFeatureActive( 'feature_tasks' ) and $gBitUser->hasPermission( 'bit_p_tasks' )}
- <li><a class="item" href="{$smarty.const.USERS_PKG_URL}tasks.php">{biticon ipackage=liberty iname=spacer iforce=icon} {tr}Tasks{/tr}</a></li>
+ <li>
+ <a class="item" href="{$smarty.const.USERS_PKG_URL}tasks.php">
+ {biticon ipackage=users iname=tasks iexplain="Tasks" iforce=icon}{if !$icons_only} {tr}Tasks{/tr}{/if}
+ </a>
+ </li>
{/if}
{if $gBitSystem->isFeatureActive( 'feature_usermenu' )}
- <li><a class="item" href="{$smarty.const.USERS_PKG_URL}menu.php">{biticon ipackage=liberty iname=spacer iforce=icon} {tr}User menu{/tr}</a></li>
+ <li>
+ <a class="item" href="{$smarty.const.USERS_PKG_URL}menu.php">
+ {biticon ipackage=liberty iname=tree iexplain="User Mneu" iforce=icon}{if !$icons_only} {tr}User menu{/tr}{/if}
+ </a>
+ </li>
{/if}
{if $gBitSystem->isPackageActive( 'webmail' ) and $gBitUser->hasPermission( 'bit_p_use_webmail' )}
- <li><a class="item" href="{$smarty.const.WEBMAIL_PKG_URL}index.php">{biticon ipackage=liberty iname=spacer iforce=icon} {tr}Webmail{/tr}</a></li>
+ <li>
+ <a class="item" href="{$smarty.const.WEBMAIL_PKG_URL}index.php">
+ {biticon ipackage=liberty iname=spacer iexplain="Webmail" iforce=icon}{if !$icons_only} {tr}Webmail{/tr}{/if}
+ </a>
+ </li>
{/if}
{if $gBitSystem->isPackageActive( 'messu' )}
- <li><a class="item" href="{$smarty.const.MESSU_PKG_URL}message_box.php">{biticon ipackage=messu iname=recieve_mail iforce=icon} {tr}Message Box{/tr} {if $unreadMsgs}<strong>[ {$unreadMsgs} ]</strong>{/if}</a></li>
- <li><a class="item" href="{$smarty.const.MESSU_PKG_URL}compose.php">{biticon ipackage=messu iname=send_mail iforce=icon} {tr}Compose Message{/tr}</a></li>
+ <li>
+ <a class="item" {if $unreadMsgs}title="{tr}You have unread messages{/tr}"{/if} href="{$smarty.const.MESSU_PKG_URL}message_box.php">
+ {biticon ipackage=messu iname=recieve_mail iexplain="Send and recieve personal messages" iforce=icon}{if !$icons_only} {tr}Message Box{/tr} {/if}{if $unreadMsgs}<strong>[ {$unreadMsgs} ]</strong>{/if}
+ </a>
+ </li>
+ <li>
+ <a class="item" href="{$smarty.const.MESSU_PKG_URL}compose.php">
+ {biticon ipackage=messu iname=send_mail iexplain="Send a personal messages to a user" iforce=icon}{if !$icons_only} {tr}Compose Message{/tr}{/if}
+ </a>
+ </li>
+ {/if}
+ <li>
+ <a class="item" href="{$smarty.const.USERS_PKG_URL}my_groups.php">
+ {biticon ipackage=users iname=groups iexplain="My User Groups" iforce=icon}{if !$icons_only} {tr}My User Groups{/tr}{/if}
+ </a>
+ </li>
+ {if $gBitSystem->isPackageActive('gatekeeper')}
+ <li>
+ <a class="item" href="{$smarty.const.GATEKEEPER_PKG_URL}">
+ {biticon ipackage=liberty iname=security iexplain="Administer personal security settings" iforce=icon}{if !$icons_only} {tr}Security{/tr}{/if}
+ </a>
+ </li>
{/if}
- <li><a class="item" href="{$smarty.const.USERS_PKG_URL}my_groups.php">{biticon ipackage=liberty iname=spacer iforce=icon} {tr}My User Groups{/tr}</a></li>
{else}
- <li><a class="item" href="{$smarty.const.USERS_PKG_URL}login.php">{biticon ipackage=liberty iname=spacer iforce=icon} {tr}Login{/tr}</a></li>
+ <li>
+ <a class="item" href="{$smarty.const.USERS_PKG_URL}login.php">
+ {biticon ipackage=liberty iname=spacer iexplain="Login" iforce=icon}{if !$icons_only} {tr}Login{/tr}{/if}
+ </a>
+ </li>
{/if}
</ul>
{/strip}
diff --git a/templates/my_bitweaver.tpl b/templates/my_bitweaver.tpl
index 2340dca..6592b33 100644
--- a/templates/my_bitweaver.tpl
+++ b/templates/my_bitweaver.tpl
@@ -1,4 +1,4 @@
-{* $Header: /cvsroot/bitweaver/_bit_users/templates/my_bitweaver.tpl,v 1.1 2005/06/19 05:12:23 bitweaver Exp $ *}
+{* $Header: /cvsroot/bitweaver/_bit_users/templates/my_bitweaver.tpl,v 1.2 2006/01/10 21:17:05 squareing Exp $ *}
{strip}
<div class="floaticon">{bithelp}</div>
@@ -7,7 +7,7 @@
<h1>{tr}My {$siteTitle|default:'Site'}{/tr}</h1>
</div>
- {*include file="bitpackage:users/my_bitweaver_bar.tpl"*}
+ {include file="bitpackage:users/my_bitweaver_bar.tpl"}
<div class="body">
diff --git a/templates/my_bitweaver_bar.tpl b/templates/my_bitweaver_bar.tpl
index 8a01065..07c23e1 100644
--- a/templates/my_bitweaver_bar.tpl
+++ b/templates/my_bitweaver_bar.tpl
@@ -1,70 +1,4 @@
-{*
-<table>
-<tr>
-
-{if $user}
-<td valign="top" align="center"><a href="{$smarty.const.USERS_PKG_URL}index.php?home={$user}" title="{tr}My homepage{/tr}">
-{biticon ipackage="users" iname="my_homepage" iexplain="My homepage"}</a></td>
-{/if}
-
-<td valign="top" align="center"><a href="{$smarty.const.USERS_PKG_URL}my.php" title="{tr}MyTiki{/tr}">
-{biticon ipackage="users" iname="my_bitweaver" iexplain="MyTiki"}</a></td>
-
-{if $gBitSystem->isFeatureActive( 'feature_userPreferences' )}
-<td valign="top" align="center"><a href="{$smarty.const.USERS_PKG_URL}preferences.php" title="{tr}Preferences{/tr}">
-{biticon ipackage="users" iname="my_prefs" iexplain="Preferences"}</a></td>
-{/if}
-
-{if $gBitSystem->isFeatureActive( 'feature_messages' ) and $gBitUser->hasPermission( 'bit_p_messages' )}
-<td valign="top" align="center"><a href="{$smarty.const.MESSU_PKG_URL}message_box.php" title="{tr}Messages{/tr}">
-{biticon ipackage="users" iname="my_messages" iexplain="Messages"}<div align="center"><small>{$unreadMsgs}</small></div></a></td>
-{/if}
-
-{if $gBitSystem->isFeatureActive( 'feature_tasks' ) and $gBitUser->hasPermission( 'bit_p_tasks' )}
-<td valign="top" align="center"><a href="{$smarty.const.USERS_PKG_URL}tasks.php" title="{tr}Tasks{/tr}">
-{biticon ipackage="users" iname="my_tasks" iexplain="Tasks"}</a></td>
-{/if}
-
-{if $gBitSystem->isFeatureActive( 'feature_user_bookmarks' ) and $gBitUser->hasPermission( 'bit_p_create_bookmarks' )}
-<td valign="top" align="center"><a href="{$smarty.const.USERS_PKG_URL}bookmarks.php" title="{tr}Bookmarks{/tr}">
-{biticon ipackage="users" iname="my_bookmarks" iexplain="Bookmarks"}</a></td>
-{/if}
-
-{if $gBitSystem->isFeatureActive( 'feature_user_layout' ) and $gBitUser->hasPermission( 'bit_p_configure_modules' )}
-<td valign="top" align="center"><a href="{$smarty.const.USERS_PKG_URL}assigned_modules.php" title="{tr}Modules{/tr}">
-{biticon ipackage="users" iname="my_modules" iexplain="Modules"}</a></td>
-{/if}
-
-{if $gBitSystem->isFeatureActive( 'feature_newsreader' ) and $gBitUser->hasPermission( 'bit_p_newsreader' )}
-<td valign="top" align="center"><a href="{$smarty.const.NEWSREADER_PKG_URL}index.php" title="{tr}Newsreader{/tr}">
-{biticon ipackage="users" iname="my_news" iexplain="Newsreader"}</a></td>
-{/if}
-
-{if $gBitSystem->isFeatureActive( 'feature_webmail' ) and $gBitUser->hasPermission( 'bit_p_use_webmail' )}
-<td valign="top" align="center"><a href="{$smarty.const.WEBMAIL_PKG_URL}index.php" title="{tr}Webmail{/tr}">
-{biticon ipackage="users" iname="my_webmail" iexplain="Webmail"}</a></td>
-{/if}
-
-{if $gBitSystem->isPackageActive( 'notepad' ) and $gBitUser->hasPermission( 'bit_p_notepad' )}
-<td valign="top" align="center"><a href="{$smarty.const.NOTEPAD_PKG_URL}index.php" title="{tr}Notepad{/tr}">
-{biticon ipackage="users" iname="my_notes" iexplain="Notepad"}</a></td>
-{/if}
-
-{if $gBitSystem->isFeatureActive( 'feature_userfiles' ) and $gBitUser->hasPermission( 'bit_p_userfiles' )}
-<td valign="top" align="center"><a href="{$smarty.const.USERS_PKG_URL}files.php" title="{tr}MyFiles{/tr}">
-{biticon ipackage="users" iname="my_files" iexplain="My Files"}</a></td>
-{/if}
-
-{if $gBitSystem->isFeatureActive( 'feature_minical' )}
-<td valign="top" align="center"><a href="{$smarty.const.MINICAL_PKG_URL}index.php" title="{tr}Mini Calendar{/tr}">
-{biticon ipackage="users" iname="my_minical" iexplain="Mini Calendar"}</a></td>
-{/if}
-
-{if $gBitSystem->isFeatureActive('feature_user_watches') }
-<td valign="top" align="center"><a href="{$smarty.const.USERS_PKG_URL}watches.php" title="{tr}My watches{/tr}">
-{biticon ipackage="users" iname="my_watches" iexplain="My watches"}</a></td>
-{/if}
-
-</tr>
-</table>
-*}
+<div class="navbar">
+ {include file="bitpackage:users/menu_users.tpl" icons_only=TRUE}
+</div>
+<div class="clear"> </div>
diff --git a/templates/my_group_edit.tpl b/templates/my_group_edit.tpl
index cb8ae65..6def5d4 100644
--- a/templates/my_group_edit.tpl
+++ b/templates/my_group_edit.tpl
@@ -1,4 +1,4 @@
-{* $Header: /cvsroot/bitweaver/_bit_users/templates/my_group_edit.tpl,v 1.2 2005/08/07 17:46:48 squareing Exp $ *}
+{* $Header: /cvsroot/bitweaver/_bit_users/templates/my_group_edit.tpl,v 1.3 2006/01/10 21:17:06 squareing Exp $ *}
{strip}
<div class="floaticon">
@@ -11,6 +11,8 @@
<h1>{if $groupInfo.group_name}{tr}Administer Group{/tr}: {$groupInfo.group_name}{else}{tr}Create New Group{/tr}{/if}</h1>
</div>
+ {include file="bitpackage:users/my_bitweaver_bar.tpl"}
+
<div class="body">
{formfeedback success=$successMsg error=$errorMsg}
diff --git a/templates/my_groups_list.tpl b/templates/my_groups_list.tpl
index 4fe7065..07f044f 100644
--- a/templates/my_groups_list.tpl
+++ b/templates/my_groups_list.tpl
@@ -3,6 +3,8 @@
<h1>{tr}List of existing groups{/tr}</h1>
</div>
+ {include file="bitpackage:users/my_bitweaver_bar.tpl"}
+
<div class="body">
{formfeedback success=$successMsg error=$errorMsg}
diff --git a/templates/user_preferences.tpl b/templates/user_preferences.tpl
index ed09ba2..5b7ca57 100644
--- a/templates/user_preferences.tpl
+++ b/templates/user_preferences.tpl
@@ -152,50 +152,7 @@
<input type="submit" name="prefs" value="{tr}Change preferences{/tr}" />
</div>
{/form}
- {/jstab}
-
- {jstab title="Pictures and Icons"}
- {legend legend="Pictures and Icons"}
- <div class="row">
- {formlabel label="Pictures"}
- {forminput}
- <a href="{$smarty.const.USERS_PKG_URL}my_images.php">{tr}Upload new pictures{/tr}</a>
- {formhelp note=""}
- {/forminput}
- </div>
-
- <div class="row">
- {formlabel label="Avatar"}
- {forminput}
- {if $editUser.avatar_url}
- <img src="{$editUser.avatar_url}" />
- {/if}
- {formhelp note="Small icon used for your posts or comments."}
- {/forminput}
- </div>
-
- <div class="row">
- {formlabel label="Self Portrait"} {forminput}
- {if $editUser.portrait_url}
- <img src="{$editUser.portrait_url}" />
- {/if}
- {formhelp note="Larger picture used on your bio page."}
- {/forminput}
- </div>
- <div class="row">
- {formlabel label="Logo" for=""}
- {forminput}
- {if $editUser.logo_url}
- <img src="{$editUser.logo_url}" /><br />
- {/if}
- {formhelp note="Image used for your organization."}
- {/forminput}
- </div>
- {/legend}
- {/jstab}
-
- {jstab title="e-mail"}
{form legend="Change your email address"}
<input type="hidden" name="view_user" value="{$editUser.user_id}" />
<div class="row">
@@ -215,12 +172,10 @@
</div>
<div class="row submit">
- <input type="submit" name="chgemail" value="{tr}change email{/tr}" />
+ <input type="submit" name="chgemail" value="{tr}Change email{/tr}" />
</div>
{/form}
- {/jstab}
- {jstab title="Password"}
{form legend="Change your password"}
<input type="hidden" name="view_user" value="{$editUser.user_id}" />
@@ -253,37 +208,23 @@
</div>
<div class="row submit">
- <input type="submit" name="chgpswd" value="{tr}change password{/tr}" />
+ <input type="submit" name="chgpswd" value="{tr}Change Password{/tr}" />
</div>
{/form}
- {/jstab}
-
- {if $gBitSystem->isPackageActive( 'messu' )}
- {jstab title="User Messages"}
- {include file='bitpackage:messu/messu_preferences_inc.tpl'}
- {/jstab}
- {/if}
-
- {if $gBitSystem->isPackageActive( 'calendar' ) and $gBitSystem->isFeatureActive('calendar_user_prefs') }
- {jstab title="Calendar"}
- {include file='bitpackage:calendar/calendar_preferences_inc.tpl' settings=$userPrefs}
- {/jstab}
- {/if}
- {if $gBitSystem->isFeatureActive( 'feature_tasks' )}
- {jstab title="User Tasks"}
+ {if $gBitSystem->isFeatureActive( 'feature_tasks' )}
{form legend="User Tasks"}
<div class="row">
{formlabel label="Tasks per page" for="tasks_maxRecords"}
{forminput}
<select name="tasks_maxRecords" id="tasks_maxRecords">
- <option value="2" {if $tasks_maxRecords eq 2}selected="selected"{/if}>{tr}2{/tr}</option>
- <option value="5" {if $tasks_maxRecords eq 5}selected="selected"{/if}>{tr}5{/tr}</option>
- <option value="10" {if $tasks_maxRecords eq 10}selected="selected"{/if}>{tr}10{/tr}</option>
- <option value="20" {if $tasks_maxRecords eq 20}selected="selected"{/if}>{tr}20{/tr}</option>
- <option value="30" {if $tasks_maxRecords eq 30}selected="selected"{/if}>{tr}30{/tr}</option>
- <option value="40" {if $tasks_maxRecords eq 40}selected="selected"{/if}>{tr}40{/tr}</option>
- <option value="50" {if $tasks_maxRecords eq 50}selected="selected"{/if}>{tr}50{/tr}</option>
+ <option value="2" {if $userPrefs.tasks_maxRecords eq 2}selected="selected"{/if}>{tr}2{/tr}</option>
+ <option value="5" {if $userPrefs.tasks_maxRecords eq 5}selected="selected"{/if}>{tr}5{/tr}</option>
+ <option value="10" {if $userPrefs.tasks_maxRecords eq 10}selected="selected"{/if}>{tr}10{/tr}</option>
+ <option value="20" {if $userPrefs.tasks_maxRecords eq 20}selected="selected"{/if}>{tr}20{/tr}</option>
+ <option value="30" {if $userPrefs.tasks_maxRecords eq 30}selected="selected"{/if}>{tr}30{/tr}</option>
+ <option value="40" {if $userPrefs.tasks_maxRecords eq 40}selected="selected"{/if}>{tr}40{/tr}</option>
+ <option value="50" {if $userPrefs.tasks_maxRecords eq 50}selected="selected"{/if}>{tr}50{/tr}</option>
</select>
{formhelp note=""}
{/forminput}
@@ -301,6 +242,59 @@
<input type="submit" name="tasksprefs" value="{tr}Change preferences{/tr}" />
</div>
{/form}
+ {/if}
+ {/jstab}
+
+ {jstab title="Pictures and Icons"}
+ {legend legend="Pictures and Icons"}
+ <div class="row">
+ {formlabel label="Pictures"}
+ {forminput}
+ <a href="{$smarty.const.USERS_PKG_URL}my_images.php">{tr}Upload new pictures{/tr}</a>
+ {formhelp note=""}
+ {/forminput}
+ </div>
+
+ <div class="row">
+ {formlabel label="Avatar"}
+ {forminput}
+ {if $editUser.avatar_url}
+ <img src="{$editUser.avatar_url}" />
+ {/if}
+ {formhelp note="Small icon used for your posts or comments."}
+ {/forminput}
+ </div>
+
+ <div class="row">
+ {formlabel label="Self Portrait"} {forminput}
+ {if $editUser.portrait_url}
+ <img src="{$editUser.portrait_url}" />
+ {/if}
+ {formhelp note="Larger picture used on your bio page."}
+ {/forminput}
+ </div>
+
+ <div class="row">
+ {formlabel label="Logo" for=""}
+ {forminput}
+ {if $editUser.logo_url}
+ <img src="{$editUser.logo_url}" /><br />
+ {/if}
+ {formhelp note="Image used for your organization."}
+ {/forminput}
+ </div>
+ {/legend}
+ {/jstab}
+
+ {if $gBitSystem->isPackageActive( 'messu' )}
+ {jstab title="User Messages"}
+ {include file='bitpackage:messu/messu_preferences_inc.tpl'}
+ {/jstab}
+ {/if}
+
+ {if $gBitSystem->isPackageActive( 'calendar' ) and $gBitSystem->isFeatureActive('calendar_user_prefs') }
+ {jstab title="Calendar"}
+ {include file='bitpackage:calendar/calendar_preferences_inc.tpl' settings=$userPrefs}
{/jstab}
{/if}
{/jstabs}