summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMax Kremmel <xing@synapse.plus.com>2005-07-17 17:36:45 +0000
committerMax Kremmel <xing@synapse.plus.com>2005-07-17 17:36:45 +0000
commitbe39c920051f88f5a9da87885b4b002cccc08f84 (patch)
treeebe7910a484ef00e7d5e8b7b5cc6ac66ae2265f3
parent6cf83851fe1774ccb7403abeed738d42122998f4 (diff)
downloadusers-be39c920051f88f5a9da87885b4b002cccc08f84.tar.gz
users-be39c920051f88f5a9da87885b4b002cccc08f84.tar.bz2
users-be39c920051f88f5a9da87885b4b002cccc08f84.zip
Merge recent changes from R1 to HEAD - never doing this again.
-rw-r--r--BitPermUser.php12
-rw-r--r--BitUser.php117
-rw-r--r--admin/admin_login_inc.php21
-rw-r--r--admin/index.php3
-rw-r--r--admin/schema_inc.php9
-rw-r--r--admin/upgrade_inc.php4
-rw-r--r--edit_personal_page.php7
-rw-r--r--index.php18
-rw-r--r--modules/mod_login_box.tpl134
-rw-r--r--modules/mod_since_last_visit.php13
-rw-r--r--modules/mod_user_image_galleries.tpl4
-rw-r--r--modules/mod_user_pages.tpl6
-rw-r--r--modules/mod_user_tasks.tpl4
-rw-r--r--modules/mod_who_is_there.tpl4
-rw-r--r--my.php9
-rw-r--r--register.php34
-rw-r--r--remind_password.php10
-rw-r--r--templates/admin_login.tpl44
-rw-r--r--templates/admin_users.tpl2
-rw-r--r--templates/center_user_wiki_page.tpl82
-rw-r--r--templates/custom_home.tpl12
-rw-r--r--templates/index_list.tpl20
-rw-r--r--templates/login_inc.tpl124
-rw-r--r--templates/menu_users.tpl24
-rw-r--r--templates/my_bitweaver_bar.tpl20
-rw-r--r--templates/register.tpl77
-rw-r--r--templates/remind_password.tpl8
-rw-r--r--templates/user_assigned_modules.tpl10
-rw-r--r--templates/user_menu.tpl4
-rw-r--r--templates/user_preferences.tpl6
-rw-r--r--templates/usermenu.tpl2
-rw-r--r--templates/users_list.tpl5
-rw-r--r--templates/welcome_mail.tpl10
-rw-r--r--validate.php38
34 files changed, 440 insertions, 457 deletions
diff --git a/BitPermUser.php b/BitPermUser.php
index a5ee211..799bd14 100644
--- a/BitPermUser.php
+++ b/BitPermUser.php
@@ -1,18 +1,18 @@
<?php
/**
- * $Header: /cvsroot/bitweaver/_bit_users/BitPermUser.php,v 1.2 2005/06/28 07:46:22 spiderr Exp $
+ * $Header: /cvsroot/bitweaver/_bit_users/BitPermUser.php,v 1.3 2005/07/17 17:36:44 squareing Exp $
*
* Lib for user administration, groups and permissions
* This lib uses pear so the constructor requieres
* a pear DB object
-
+
* Copyright (c) 2004 bitweaver.org
* Copyright (c) 2003 tikwiki.org
* 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
*
- * $Id: BitPermUser.php,v 1.2 2005/06/28 07:46:22 spiderr Exp $
+ * $Id: BitPermUser.php,v 1.3 2005/07/17 17:36:44 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.2 $
+ * @version $Revision: 1.3 $
* @package users
* @subpackage BitPermUser
*/
@@ -70,7 +70,7 @@ class BitPermUser extends BitUser {
}
}
}
-
+
function store( &$pParamHash ) {
global $gBitSystem;
// keep track of newUser before calling base class
@@ -113,6 +113,8 @@ class BitPermUser extends BitUser {
$rv[$pUserId] = array();
}
$rv[$pUserId][$pGroupName] = $result[$pGroupName];
+ } else {
+ $rv[$pUserId][$pGroupName]['group_id'] = NULL;
}
}
return( $rv[$pUserId][$pGroupName]['group_id'] );
diff --git a/BitUser.php b/BitUser.php
index ba77b0e..4c367ae 100644
--- a/BitUser.php
+++ b/BitUser.php
@@ -1,18 +1,18 @@
<?php
/**
- * $Header: /cvsroot/bitweaver/_bit_users/BitUser.php,v 1.5 2005/06/29 05:43:40 spiderr Exp $
+ * $Header: /cvsroot/bitweaver/_bit_users/BitUser.php,v 1.6 2005/07/17 17:36:44 squareing Exp $
*
* Lib for user administration, groups and permissions
* This lib uses pear so the constructor requieres
* a pear DB object
-
+
* Copyright (c) 2004 bitweaver.org
* Copyright (c) 2003 tikwiki.org
* 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
*
- * $Id: BitUser.php,v 1.5 2005/06/29 05:43:40 spiderr Exp $
+ * $Id: BitUser.php,v 1.6 2005/07/17 17:36:44 squareing Exp $
* @package users
*/
@@ -40,11 +40,7 @@ define("ACCOUNT_DISABLED", -6);
* Class that holds all information for a given user
*
* @author spider <spider@steelsun.com>
-<<<<<<< BitUser.php
- * @version $Revision: 1.5 $
-=======
- * @version $Revision: 1.5 $
->>>>>>> 1.2.2.6
+ * @version $Revision: 1.6 $
* @package users
* @subpackage BitUser
*/
@@ -66,7 +62,7 @@ class BitUser extends LibertyAttachable {
* Constructor - will automatically load all relevant data if passed a user string
*
* @access public
-* @author author<author@phpshop.org>
+* @author Christian Fower<spider@viovio.com>
* @return returnString
*/
function BitUser( $pUserId=NULL, $pContentId=NULL ) {
@@ -460,6 +456,64 @@ if ($gDebug) echo "Run : QUIT<br>";
}
+/**
+* register - will handle everything necessary for registering a user and sending appropriate emails, etc.
+*
+* @access public
+* @author Christian Fowler<spider@viovio.com>
+* @return returnString
+*/
+ function register( &$pParamHash ) {
+ global $notificationlib, $smarty, $gBitSystem;
+ $ret = FALSE;
+ if( $this->store( $pParamHash ) ) {
+ require_once( KERNEL_PKG_PATH.'notification_lib.php' );
+ $ret = TRUE;
+ $emails = $notificationlib->get_mail_events('user_registers','*');
+ foreach($emails as $email) {
+ $smarty->assign('mail_user',$pParamHash['login']);
+ $smarty->assign('mail_date',date("U"));
+ $smarty->assign('mail_site',$_SERVER["SERVER_NAME"]);
+ $mail_data = $smarty->fetch('bitpackage:users/new_user_notification.tpl');
+
+ mail( $pParamHash['email'], tra('New user registration'),$mail_data,"From: ".$gBitSystem->getPreference('sender_email')."\r\nContent-type: text/plain;charset=utf-8\r\n");
+ }
+ if( !empty( $_REQUEST['CUSTOM'] ) ) {
+ foreach( $_REQUEST['CUSTOM'] as $field=>$value ) {
+ $this->storePreference( $field, $value );
+ }
+ }
+ $siteName = $gBitSystem->getPreference('siteTitle', $_SERVER['HTTP_HOST'] );
+ $smarty->assign('siteName',$_SERVER["SERVER_NAME"]);
+ $smarty->assign('mail_site',$_SERVER["SERVER_NAME"]);
+ $smarty->assign('mail_user',$pParamHash['login']);
+ if( $gBitSystem->isFeatureActive( 'validateUsers' ) ) {
+ // $apass = addslashes(substr(md5($gBitSystem->genPass()),0,25));
+ $apass = $pParamHash['user_store']['provpass'];
+ $foo = parse_url($_SERVER["REQUEST_URI"]);
+ $foo1=str_replace("register","confirm",$foo["path"]);
+ $machine = httpPrefix().$foo1;
+
+ // Send the mail
+ $smarty->assign('msg',tra('You will receive an email with information to login for the first time into this site'));
+ $smarty->assign('mail_machine',$machine);
+ $smarty->assign('mail_apass',$apass);
+ $mail_data = $smarty->fetch('bitpackage:users/user_validation_mail.tpl');
+ mail($pParamHash["email"], $siteName.' - '.tra('Your registration information'),$mail_data,"From: ".$gBitSystem->getPreference('sender_email')."\r\nContent-type: text/plain;charset=utf-8\r\n");
+ $smarty->assign('showmsg','y');
+ }
+ if( $gBitSystem->isFeatureActive( 'send_welcome_email' ) ) {
+ // Send the welcome mail
+ $smarty->assign( 'mailPassword',$pParamHash['password'] );
+ $smarty->assign( 'mailEmail',$pParamHash['email'] );
+ $mail_data = $smarty->fetch('bitpackage:users/welcome_mail.tpl');
+ mail($pParamHash["email"], tra( 'Welcome to' ).' '.$siteName,$mail_data,"From: ".$gBitSystem->getPreference('sender_email')."\r\nContent-type: text/plain;charset=utf-8\r\n");
+ }
+ }
+ return( $ret );
+ }
+
+
function store( &$pParamHash ) {
if( $this->verify( $pParamHash ) ) {
$this->mDb->StartTrans();
@@ -733,6 +787,7 @@ echo "userAuthPresent: $userAuthPresent<br>";
//echo "5<br>";
$this->update_lastlogin( $userId );
$this->mUserId = $userId;
+ $this->load();
}
//echo "6<br>";
//vd($this->mErrors);
@@ -1327,6 +1382,14 @@ echo "userAuthPresent: $userAuthPresent<br>";
}
/*shared*/
+ function expungeWatch( $event, $object ) {
+ if( $this->isValid() ) {
+ $query = "delete from `".BIT_DB_PREFIX."tiki_user_watches` where `user_id`=? and `event`=? and `object`=?";
+ $this->query( $query, array( $this->mUserId, $event, $object ) );
+ }
+ }
+
+ /*shared*/
function get_watches_events() {
$query = "select distinct `event` from `".BIT_DB_PREFIX."tiki_user_watches`";
$result = $this->query($query,array());
@@ -1338,26 +1401,29 @@ echo "userAuthPresent: $userAuthPresent<br>";
}
-
-
function getUserId() {
return( !empty( $this->mUserId ) ? $this->mUserId : ANONYMOUS_USER_ID );
}
function getDisplayUrl( $pUserName=NULL, $pMixed=NULL ) {
-// function getDisplayUrl( $pUserName=NULL ) {
if( empty( $pUserName ) && !empty( $this ) ) {
$pUserName = $this->mUsername;
}
- if( function_exists( 'override_user_url' ) ) {
- $ret = override_user_url( $pUserName );
- } else {
+ if( function_exists( 'override_user_url' ) ) {
+ $ret = override_user_url( $pUserName );
+ } else {
global $gBitSystem;
- if( $gBitSystem->isFeatureActive( 'pretty_urls' ) ) {
- $ret = USERS_PKG_URL.$pUserName;
- } else {
- $ret = USERS_PKG_URL.'index.php?home='.$pUserName;
+ $rewrite_tag = $gBitSystem->isFeatureActive( 'feature_pretty_urls_extended' ) ? 'view/':'';
+
+ if ($gBitSystem->isFeatureActive( 'pretty_urls' )
+ || $gBitSystem->isFeatureActive( 'feature_pretty_urls_extended' ) ) {
+ $ret = USERS_PKG_URL . $rewrite_tag;
+ $ret .= urlencode( $pUserName );
+ }
+ else {
+ $ret = USERS_PKG_URL . 'index.php?home=';
+ $ret .= urlencode( $pUserName );
}
}
return $ret;
@@ -1371,6 +1437,13 @@ echo "userAuthPresent: $userAuthPresent<br>";
return $this->getDisplayName( FALSE, $pHash );
}
+ /**
+* Get user information for a particular user
+*
+* @param pUseLink return the information in the form of a url that links to the users information page
+* @param pHash todo - need explanation on how to use this...
+* @return display name or link to user information page
+**/
function getDisplayName($pUseLink = FALSE, $pHash=NULL) {
global $gBitSystem;
$ret = NULL;
@@ -1425,7 +1498,7 @@ echo "userAuthPresent: $userAuthPresent<br>";
$this->query($sql, array($newRealName, $this->mUserId));
}
}
-
+
function storeLogin($newLogin) {
$newLogin = substr($newLogin,0,40);
if ($this->userExists(array('login' => $newLogin))) {
@@ -1436,10 +1509,10 @@ echo "userAuthPresent: $userAuthPresent<br>";
} else {
$this->mErrors[] = "Invalid user";
}
-
+
return (count($this->mErrors) == 0);
}
-
+
function getList( &$pParamHash ) {
if ( !isset( $pParamHash['sort_mode']) or $pParamHash['sort_mode'] == '' ) $pParamHash['sort_mode'] = 'registration_date_desc';
diff --git a/admin/admin_login_inc.php b/admin/admin_login_inc.php
index 02b96c2..8cd3907 100644
--- a/admin/admin_login_inc.php
+++ b/admin/admin_login_inc.php
@@ -1,10 +1,10 @@
<?php
-// $Header: /cvsroot/bitweaver/_bit_users/admin/admin_login_inc.php,v 1.1 2005/06/19 05:12:24 bitweaver Exp $
+// $Header: /cvsroot/bitweaver/_bit_users/admin/admin_login_inc.php,v 1.2 2005/07/17 17:36:44 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.
if (isset($_REQUEST["loginprefs"])) {
-
+
if (isset($_REQUEST["eponymousGroups"]) && $_REQUEST["eponymousGroups"] == "on") {
$gBitSystem->storePreference("eponymousGroups", 'y');
$smarty->assign('eponymousGroups', 'y');
@@ -19,6 +19,13 @@ if (isset($_REQUEST["loginprefs"])) {
$gBitSystem->storePreference("allowRegister", 'n');
$smarty->assign('allowRegister', 'n');
}
+ if (isset($_REQUEST["send_welcome_email"]) && $_REQUEST["send_welcome_email"] == "on") {
+ $gBitSystem->storePreference("send_welcome_email", 'y');
+ $smarty->assign('send_welcome_email', 'y');
+ } else {
+ $gBitSystem->storePreference("send_welcome_email", 'n');
+ $smarty->assign('send_welcome_email', 'n');
+ }
if (isset($_REQUEST["webserverauth"]) && $_REQUEST["webserverauth"] == "on") {
$gBitSystem->storePreference("webserverauth", 'y');
$smarty->assign('webserverauth', 'y');
@@ -72,13 +79,6 @@ if (isset($_REQUEST["loginprefs"])) {
$gBitSystem->storePreference("pass_chr_num", 'n');
$smarty->assign('pass_chr_num', 'n');
}
- if (isset($_REQUEST["feature_challenge"]) && $_REQUEST["feature_challenge"] == "on") {
- $gBitSystem->storePreference("feature_challenge", 'y');
- $smarty->assign('feature_challenge', 'y');
- } else {
- $gBitSystem->storePreference("feature_challenge", 'n');
- $smarty->assign('feature_challenge', 'n');
- }
if (isset($_REQUEST["feature_clear_passwords"]) && $_REQUEST["feature_clear_passwords"] == "on") {
$gBitSystem->storePreference("feature_clear_passwords", 'y');
$smarty->assign('feature_clear_passwords', 'y');
@@ -155,7 +155,7 @@ if (isset($_REQUEST["httpprefs"])) {
$smarty->assign('https_prefix', $v);
}
if (isset($_REQUEST["auth_pear"])) {
-
+
if (isset($_REQUEST["auth_create_gBitDbUser"]) && $_REQUEST["auth_create_gBitDbUser"] == "on") {
$gBitSystem->storePreference("auth_create_gBitDbUser", 'y');
$smarty->assign("auth_create_gBitDbUser", 'y');
@@ -250,7 +250,6 @@ $smarty->assign("validateUsers", $gBitSystem->getPreference("validateUsers", 'n'
$smarty->assign("validateEmail", $gBitSystem->getPreference("validateEmail", 'n'));
$smarty->assign("rnd_num_reg", $gBitSystem->getPreference("rnd_num_reg", 'n'));
$smarty->assign("pass_chr_num", $gBitSystem->getPreference("pass_chr_num", 'n'));
-$smarty->assign("feature_challenge", $gBitSystem->getPreference("feature_challenge", 'n'));
$smarty->assign("feature_clear_passwords", $gBitSystem->getPreference("feature_clear_passwords", 'n'));
$smarty->assign("forgotPass", $gBitSystem->getPreference("forgotPass", 'n'));
$smarty->assign("https_login", $gBitSystem->getPreference("https_login", 'n'));
diff --git a/admin/index.php b/admin/index.php
index 7b2546c..9039b44 100644
--- a/admin/index.php
+++ b/admin/index.php
@@ -1,5 +1,5 @@
<?php
-// $Header: /cvsroot/bitweaver/_bit_users/admin/index.php,v 1.2 2005/06/28 07:46:23 spiderr Exp $
+// $Header: /cvsroot/bitweaver/_bit_users/admin/index.php,v 1.3 2005/07/17 17:36:44 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.
@@ -144,6 +144,7 @@ foreach( $gBitUser->getDefaultGroup() as $defaultGroupId => $defaultGroupName )
$_REQUEST['max_records'] = 20;
$gBitUser->getList( $_REQUEST );
$smarty->assign_by_ref('users', $_REQUEST["data"]);
+$smarty->assign_by_ref('usercount', $_REQUEST["cant"]);
if (isset($_REQUEST["numrows"]))
$_REQUEST["control"]["numrows"] = $_REQUEST["numrows"];
else
diff --git a/admin/schema_inc.php b/admin/schema_inc.php
index 70ebb24..92d650e 100644
--- a/admin/schema_inc.php
+++ b/admin/schema_inc.php
@@ -205,7 +205,7 @@ $tables = array(
global $gBitInstaller;
foreach( array_keys( $tables ) AS $tableName ) {
- $gBitInstaller->registerSchemaTable( USERS_PKG_DIR, $tableName, $tables[$tableName], TRUE );
+ $gBitInstaller->registerSchemaTable( USERS_PKG_NAME, $tableName, $tables[$tableName], TRUE );
}
$indices = array (
@@ -227,7 +227,7 @@ $indices = array (
-$gBitInstaller->registerSchemaIndexes( USERS_PKG_DIR, $indices );
+$gBitInstaller->registerSchemaIndexes( USERS_PKG_NAME, $indices );
$gBitInstaller->registerPackageInfo( USERS_PKG_NAME, array(
'description' => "The users package contains all user information and gives you the possiblity to assign permissions to groups of users.",
@@ -242,11 +242,11 @@ $sequences = array (
'users_users_user_id_seq' => array( 'start' => 2 ),
'users_groups_id_seq' => array( 'start' => 4 )
);
-$gBitInstaller->registerSchemaSequences( USERS_PKG_DIR, $sequences );
+$gBitInstaller->registerSchemaSequences( USERS_PKG_NAME, $sequences );
// ### Default MenuOptions
$gBitInstaller->registerMenuOptions( USERS_PKG_NAME, array(
- array(42,'o','My files', USERS_PKG_DIR.'userfiles.php',95,'feature_userfiles','bit_p_userfiles','Registered')
+ array(42,'o','My files', USERS_PKG_NAME.'userfiles.php',95,'feature_userfiles','bit_p_userfiles','Registered')
) );
// ### Default Preferences
@@ -287,7 +287,6 @@ $gBitInstaller->registerPreferences( USERS_PKG_NAME, array(
array('users','useRegisterPasscode','n'),
array('users','validateUsers','n'),
array('users','validateEmail','n'),
- array('users','feature_challenge','n'),
array('users','min_pass_length','4'),
array('users','feature_clear_passwords','n'),
array('users','feature_custom_home','n'),
diff --git a/admin/upgrade_inc.php b/admin/upgrade_inc.php
index 14dfe8a..71c31b4 100644
--- a/admin/upgrade_inc.php
+++ b/admin/upgrade_inc.php
@@ -193,8 +193,8 @@ array( 'QUERY' =>
"UPDATE `".BIT_DB_PREFIX."users_groups_map` SET `group_id`=(SELECT `group_id` FROM `".BIT_DB_PREFIX."users_groups` WHERE `".BIT_DB_PREFIX."users_groups`.`group_name`=`".BIT_DB_PREFIX."users_groups_map`.`groupName`)",
"UPDATE `".BIT_DB_PREFIX."users_grouppermissions` SET `group_id`=(SELECT `group_id` FROM `".BIT_DB_PREFIX."users_groups` WHERE `".BIT_DB_PREFIX."users_groups`.`group_name`=`".BIT_DB_PREFIX."users_grouppermissions`.`groupName`)",
"UPDATE `".BIT_DB_PREFIX."users_objectpermissions` SET `group_id`=(SELECT `group_id` FROM `".BIT_DB_PREFIX."users_groups` WHERE `".BIT_DB_PREFIX."users_groups`.`group_name`=`".BIT_DB_PREFIX."users_objectpermissions`.`groupName`)",
- "UPDATE `".BIT_DB_PREFIX."users_groups_inclusion` SET `group_id`=(SELECT `group_id` FROM users_groups WHERE `group_name`=`".BIT_DB_PREFIX."users_groups_inclusion`.`groupName`)",
- "UPDATE `".BIT_DB_PREFIX."users_groups_inclusion` SET `include_group_id`=(SELECT `group_id` FROM users_groups WHERE `group_name`=`includeGroup`)",
+ "UPDATE `".BIT_DB_PREFIX."users_groups_inclusion` SET `group_id`=(SELECT `group_id` FROM `".BIT_DB_PREFIX."users_groups` WHERE `group_name`=`".BIT_DB_PREFIX."users_groups_inclusion`.`groupName`)",
+ "UPDATE `".BIT_DB_PREFIX."users_groups_inclusion` SET `include_group_id`=(SELECT `group_id` FROM `".BIT_DB_PREFIX."users_groups` WHERE `group_name`=`includeGroup`)",
"UPDATE `".BIT_DB_PREFIX."users_groups` SET `user_id`=1",
"UPDATE `".BIT_DB_PREFIX."users_groups` SET `is_default`='y' WHERE `group_name`='Registered'",
),
diff --git a/edit_personal_page.php b/edit_personal_page.php
index 934fe17..cc047af 100644
--- a/edit_personal_page.php
+++ b/edit_personal_page.php
@@ -1,6 +1,6 @@
<?php
/**
- * $Header: /cvsroot/bitweaver/_bit_users/edit_personal_page.php,v 1.2 2005/06/28 07:46:23 spiderr Exp $
+ * $Header: /cvsroot/bitweaver/_bit_users/edit_personal_page.php,v 1.3 2005/07/17 17:36:44 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: edit_personal_page.php,v 1.2 2005/06/28 07:46:23 spiderr Exp $
+ * $Id: edit_personal_page.php,v 1.3 2005/07/17 17:36:44 squareing Exp $
* @package users
* @subpackage functions
*/
@@ -18,6 +18,9 @@
*/
require_once( '../bit_setup_inc.php' );
+// include plugin help
+include_once( LIBERTY_PKG_PATH.'edit_help_inc.php' );
+
// Check if the page has changed
if (isset($_REQUEST["fSavePage"])) {
$gBitUser->store( $_REQUEST );
diff --git a/index.php b/index.php
index 37f64ce..7a42c93 100644
--- a/index.php
+++ b/index.php
@@ -1,6 +1,6 @@
<?php
/**
- * $Header: /cvsroot/bitweaver/_bit_users/index.php,v 1.3 2005/06/29 05:43:40 spiderr Exp $
+ * $Header: /cvsroot/bitweaver/_bit_users/index.php,v 1.4 2005/07/17 17:36:44 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: index.php,v 1.3 2005/06/29 05:43:40 spiderr Exp $
+ * $Id: index.php,v 1.4 2005/07/17 17:36:44 squareing Exp $
* @package users
* @subpackage functions
*/
@@ -27,7 +27,10 @@ if( !empty( $gBitSystem->mPrefs['custom_user_fields'] ) ) {
$customFields= explode( ',', $gBitSystem->mPrefs['custom_user_fields'] );
$smarty->assign('customFields', $customFields);
}
-
+$search_request = '';
+if (!empty($_REQUEST['home'])) {
+ $search_request = $_REQUEST['home'];
+ }
require_once( USERS_PKG_PATH.'lookup_user_inc.php' );
if( !empty( $_REQUEST['home'] ) ) {
$smarty->assign( 'home', $_REQUEST['home'] );
@@ -65,9 +68,11 @@ if( !empty( $_REQUEST['home'] ) ) {
}
global $gCenterPieces;
$centerDisplay = ( count( $gCenterPieces ) ? 'bitpackage:kernel/dynamic.tpl' : 'bitpackage:users/center_user_wiki_page.tpl' );
-} else {
+} elseif (empty($search_request)) {
$gQueryUser->getList( $_REQUEST );
+ $smarty->assign('search_request',$search_request);
$smarty->assign_by_ref('users', $_REQUEST["data"]);
+ $smarty->assign_by_ref('usercount', $_REQUEST["cant"]);
if (isset($_REQUEST["numrows"]))
$_REQUEST["control"]["numrows"] = $_REQUEST["numrows"];
else
@@ -76,6 +81,11 @@ if( !empty( $_REQUEST['home'] ) ) {
$smarty->assign_by_ref('control', $_REQUEST["control"]);
$centerDisplay = 'bitpackage:users/index_list.tpl';
$browserTitle = $siteTitle.' '.tra( 'Members' );
+} else {
+ $smarty->assign('msg',tra('User not found'));
+ $centerDisplay = 'bitpackage:kernel/error.tpl';
+ $browserTitle = $siteTitle.' '.tra( 'Members' );
+
}
$gBitSystem->display( $centerDisplay, $browserTitle );
diff --git a/modules/mod_login_box.tpl b/modules/mod_login_box.tpl
index d62a644..1345e15 100644
--- a/modules/mod_login_box.tpl
+++ b/modules/mod_login_box.tpl
@@ -1,104 +1,54 @@
-{* $Header: /cvsroot/bitweaver/_bit_users/modules/mod_login_box.tpl,v 1.1 2005/06/19 05:12:23 bitweaver Exp $ *}
+{* $Header: /cvsroot/bitweaver/_bit_users/modules/mod_login_box.tpl,v 1.2 2005/07/17 17:36:44 squareing Exp $ *}
+{strip}
{bitmodule title="$moduleTitle" name="login_box"}
- {if $gBitUser->IsRegistered()}
- {tr}Logged in as{/tr}: {$gBitUser->getDisplayName()}<br />
- <a href="{$gBitLoc.USERS_PKG_URL}logout.php">{tr}Logout{/tr}</a><br />
- {if $gBitUser->isAdmin()}
- {form action=$login_url}
- <label for="login-switchuser">{tr}user{/tr}:</label>
- <input type="text" name="username" id="login-switchuser" size="8" />
- <input type="submit" name="su" value="{tr}set{/tr}" />
- {/form}
- {/if}
- {else}
- <form name="loginbox" action="{$login_url}" method="post" {if $gBitSystemPrefs.feature_challenge eq 'y'}onsubmit="doChallengeResponse()"{/if}>
- {if $gBitSystemPrefs.feature_challenge eq 'y'}
- <script language="javascript" type="text/javascript" src="lib/md5.js"></script>
- {literal}
- <script language="Javascript" type="text/javascript">
- <!--
- function doChallengeResponse() {
- hashstr = document.loginbox.user.value +
- document.loginbox.pass.value +
- document.loginbox.email.value;
- str = document.loginbox.user.value +
- MD5(hashstr) +
- document.loginbox.challenge.value;
- document.loginbox.response.value = MD5(str);
- document.loginbox.pass.value='';
- /*
- document.login.password.value = "";
- document.logintrue.username.value = document.login.username.value;
- document.logintrue.response.value = MD5(str);
- document.logintrue.submit();
- */
- document.loginbox.submit();
- return false;
- }
- // -->
- </script>
- {/literal}
- <input type="hidden" name="challenge" value="{$challenge|escape}" />
- <input type="hidden" name="response" value="" />
- {/if}
-
- <div class="row">
- {forminput}
- <input type="text" name="user" alt="username" size="20" value="username" onFocus="this.value=''" />
- {/forminput}
- </div>
-
- {if $gBitSystemPrefs.feature_challenge eq 'y'}
+ {if $gBitUser->IsRegistered()}
+ {tr}Logged in as <strong>{displayname}{/tr}</strong><br />
+ <a href="{$gBitLoc.USERS_PKG_URL}logout.php">{tr}Logout{/tr}</a>
+ {else}
+ {form ipackage=users ifile='validate.php'}
<div class="row">
- {forminput}
- <input type="text" name="email" alt="email address" size="20" value="email" onFocus="this.value=''" />
- {/forminput}
+ <input type="text" name="user" alt="username" size="15" value="username" onfocus="this.value=''" />
</div>
- {/if}
-
- <div class="row">
- {forminput}
- <input type="password" name="pass" alt="password" size="20" value="password" onFocus="this.value=''" />
- {if $forgotPass eq 'y'}
- <br /><a href="`$gBitLoc.USERS_PKG_URL`remind_password.php">I forgot my password</a>
- {/if}
- {/forminput}
- </div>
- {if $rememberme ne 'disabled'}
<div class="row">
- {forminput}
- <input type="checkbox" name="rme" value="on" checked=checked/>
- {/forminput}
+ <input type="password" name="pass" alt="password" size="15" value="password" onfocus="this.value=''" />
</div>
- {/if}
- {if $http_login_url ne '' or $https_login_url ne ''}
- <div class="row">
- {forminput}
- <a href="{$http_login_url}" title="{tr}Click here to login using the default security protocol{/tr}">{tr}standard{/tr}</a> |
- <a href="{$https_login_url}" title="{tr}Click here to login using a secure protocol{/tr}">{tr}secure{/tr}</a>
- {/forminput}
+ {if $rememberme ne 'disabled'}
+ <div class="row">
+ <label><input type="checkbox" name="rme" value="on" checked=checked/> {tr}Remember Me{/tr}</label>
+ </div>
+ {/if}
+
+ {if $http_login_url ne '' or $https_login_url ne ''}
+ <div class="row">
+ <a href="{$http_login_url}" title="{tr}Click here to login using the default security protocol{/tr}">{tr}Standard{/tr}</a> |
+ <a href="{$https_login_url}" title="{tr}Click here to login using a secure protocol{/tr}">{tr}Secure{/tr}</a>
+ </div>
+ {/if}
+
+ {if $show_stay_in_ssl_mode eq 'y'}
+ <div class="row">
+ <label><input type="checkbox" name="stay_in_ssl_mode" id="stay_in_ssl_mode" {if $stay_in_ssl_mode eq 'y'}checked="checked"{/if} /> {tr}Stay in SSL mode{/tr}</label>
+ </div>
+ {else}
+ <input type="hidden" name="stay_in_ssl_mode" value="{$stay_in_ssl_mode|escape}" />
+ {/if}
+
+ <div class="row submit">
+ <input type="submit" name="login" value="{tr}Login{/tr}" />
</div>
- {/if}
- {if $show_stay_in_ssl_mode eq 'y'}
<div class="row">
- {formlabel label="stay in ssl mode" for="stay_in_ssl_mode"}
- {forminput}
- <input type="checkbox" name="stay_in_ssl_mode" id="stay_in_ssl_mode" {if $stay_in_ssl_mode eq 'y'}checked="checked"{/if} />
- {/forminput}
- </div>
- {else}
- <input type="hidden" name="stay_in_ssl_mode" value="{$stay_in_ssl_mode|escape}" />
- {/if}
+ {if $allowRegister eq 'y'}
+ <br /><a href="{$gBitLoc.USERS_PKG_URL}register.php">{tr}Register{/tr}</a>
+ {/if}
- <div class="row submit">
- <input type="submit" name="login" value="{tr}login{/tr}" />
- {if $allowRegister eq 'y'}
- <a href="{$gBitLoc.USERS_PKG_URL}register.php">{tr}register{/tr}</a>
- {/if}
- </div>
- </form>
-{/if}
+ {if $forgotPass eq 'y'}
+ <br /><a href="{$gBitLoc.USERS_PKG_URL}remind_password.php">{tr}I forgot my password{/tr}</a>
+ {/if}
+ </div>
+ {/form}
+ {/if}
{/bitmodule}
+{/strip}
diff --git a/modules/mod_since_last_visit.php b/modules/mod_since_last_visit.php
index 12640fd..73f3baa 100644
--- a/modules/mod_since_last_visit.php
+++ b/modules/mod_since_last_visit.php
@@ -1,6 +1,6 @@
<?php
/**
- * $Header: /cvsroot/bitweaver/_bit_users/modules/mod_since_last_visit.php,v 1.2 2005/06/28 07:46:24 spiderr Exp $
+ * $Header: /cvsroot/bitweaver/_bit_users/modules/mod_since_last_visit.php,v 1.3 2005/07/17 17:36:44 squareing Exp $
*
* Copyright (c) 2004 bitweaver.org
* Copyright (c) 2003 tikwiki.org
@@ -8,10 +8,13 @@
* 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: mod_since_last_visit.php,v 1.2 2005/06/28 07:46:24 spiderr Exp $
+ * $Id: mod_since_last_visit.php,v 1.3 2005/07/17 17:36:44 squareing Exp $
* @package users
* @subpackage modules
*/
-$nvi_info = $gBitSystem->get_news_from_last_visit($user);
-$smarty->assign('nvi_info', $nvi_info);
-?> \ No newline at end of file
+if( $gBitSystem->isPackageActive( 'bitforums' ) ) {
+ $nvi_info = $gBitSystem->get_news_from_last_visit($user);
+ $smarty->assign('nvi_info', $nvi_info);
+}
+
+?>
diff --git a/modules/mod_user_image_galleries.tpl b/modules/mod_user_image_galleries.tpl
index 0be7500..3487468 100644
--- a/modules/mod_user_image_galleries.tpl
+++ b/modules/mod_user_image_galleries.tpl
@@ -1,6 +1,6 @@
-{* $Header: /cvsroot/bitweaver/_bit_users/modules/Attic/mod_user_image_galleries.tpl,v 1.1 2005/06/19 05:12:23 bitweaver Exp $ *}
+{* $Header: /cvsroot/bitweaver/_bit_users/modules/Attic/mod_user_image_galleries.tpl,v 1.2 2005/07/17 17:36:44 squareing Exp $ *}
{if $user}
- {if $gBitSystemPrefs.feature_galleries eq 'y'}
+ {if $gBitSystem->isFeatureActive( 'feature_galleries' )}
{bitmodule title="$moduleTitle" name="user_image_galleries"}
<table class="module box">
{section name=ix loop=$modUserG}
diff --git a/modules/mod_user_pages.tpl b/modules/mod_user_pages.tpl
index 765f124..6e72424 100644
--- a/modules/mod_user_pages.tpl
+++ b/modules/mod_user_pages.tpl
@@ -1,6 +1,6 @@
-{* $Header: /cvsroot/bitweaver/_bit_users/modules/mod_user_pages.tpl,v 1.1 2005/06/19 05:12:23 bitweaver Exp $ *}
+{* $Header: /cvsroot/bitweaver/_bit_users/modules/mod_user_pages.tpl,v 1.2 2005/07/17 17:36:44 squareing Exp $ *}
{if $user}
- {if $gBitSystemPrefs.feature_wiki eq 'y'}
+ {if $gBitSystem->isFeatureActive( 'feature_wiki' )}
{bitmodule title="$moduleTitle" name="user_pages"}
<table class="module box">
{section name=ix loop=$modUserPages}
@@ -15,5 +15,5 @@
{/section}
</table>
{/bitmodule}
- {/if} {* $gBitSystemPrefs.feature_wiki eq 'y' *}
+ {/if} {* $gBitSystem->isFeatureActive( 'feature_wiki' ) *}
{/if} {* $user *} \ No newline at end of file
diff --git a/modules/mod_user_tasks.tpl b/modules/mod_user_tasks.tpl
index 9ad5d96..0c3b0cc 100644
--- a/modules/mod_user_tasks.tpl
+++ b/modules/mod_user_tasks.tpl
@@ -1,5 +1,5 @@
-{* $Header: /cvsroot/bitweaver/_bit_users/modules/Attic/mod_user_tasks.tpl,v 1.1 2005/06/19 05:12:23 bitweaver Exp $ *}
-{if $gBitSystemPrefs.feature_tasks eq 'y' and $user}
+{* $Header: /cvsroot/bitweaver/_bit_users/modules/Attic/mod_user_tasks.tpl,v 1.2 2005/07/17 17:36:44 squareing Exp $ *}
+{if $gBitSystem->isFeatureActive( 'feature_tasks' ) and $user}
{bitmodule title="$moduleTitle" name="user_tasks"}
{form action=$ownurl}
<input type="text" name="modTasksTitle" />
diff --git a/modules/mod_who_is_there.tpl b/modules/mod_who_is_there.tpl
index 586737e..207ebe4 100644
--- a/modules/mod_who_is_there.tpl
+++ b/modules/mod_who_is_there.tpl
@@ -1,4 +1,4 @@
-{* $Header: /cvsroot/bitweaver/_bit_users/modules/mod_who_is_there.tpl,v 1.1 2005/06/19 05:12:23 bitweaver Exp $ *}
+{* $Header: /cvsroot/bitweaver/_bit_users/modules/mod_who_is_there.tpl,v 1.2 2005/07/17 17:36:44 squareing Exp $ *}
{bitmodule title="$moduleTitle" name="who_is_there"}
<div>
{$logged_users}
@@ -9,7 +9,7 @@
{/if}
</div>
{section name=ix loop=$online_users}
- {if $user and $gBitSystemPrefs.feature_messages eq 'y' and $gBitUser->hasPermission( 'bit_p_messages' )}
+ {if $user and $gBitSystem->isFeatureActive( 'feature_messages' ) and $gBitUser->hasPermission( 'bit_p_messages' )}
<a href="{$gBitLoc.MESSU_PKG_URL}compose.php?to={$online_users[ix].user}" title="{tr}Send a message to{/tr} {$online_users[ix].user}">{biticon ipackage="users" iname="send_msg_small" iexplain="send message"}</a>
{/if}
{if $online_users[ix].user_information eq 'public'}
diff --git a/my.php b/my.php
index 91fd53a..2a9f6c7 100644
--- a/my.php
+++ b/my.php
@@ -1,6 +1,6 @@
<?php
/**
- * $Header: /cvsroot/bitweaver/_bit_users/my.php,v 1.4 2005/06/29 05:43:40 spiderr Exp $
+ * $Header: /cvsroot/bitweaver/_bit_users/my.php,v 1.5 2005/07/17 17:36:44 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: my.php,v 1.4 2005/06/29 05:43:40 spiderr Exp $
+ * $Id: my.php,v 1.5 2005/07/17 17:36:44 squareing Exp $
* @package users
* @subpackage functions
*/
@@ -38,7 +38,7 @@ if( !empty( $_REQUEST['sort_mode'] ) ) {
$max_content = $gBitSystem->mPrefs['maxRecords'];
$offset_content = !empty( $_REQUEST['offset'] ) ? $_REQUEST['offset'] : 0;
-$smarty->assign( 'page', $page = !empty( $_REQUEST['page'] ) ? $_REQUEST['page'] : 1 );
+$smarty->assign( 'curPage', $page = !empty( $_REQUEST['page'] ) ? $_REQUEST['page'] : 1 );
$offset_content = ( $page - 1 ) * $gBitSystem->mPrefs['maxRecords'];
// set the user_id to only display content viewing user
@@ -57,8 +57,7 @@ $smarty->assign( 'contentTypes', $contentTypes );
$smarty->assign( 'contentList', $contentList['data'] );
// end of content listing
-$gBitSystem->setBrowserTitle( 'My '.$gBitSystem->getPreference( 'siteTitle' ) );
-$gBitSystem->display( 'bitpackage:users/my_bitweaver.tpl');
+$gBitSystem->display( 'bitpackage:users/my_bitweaver.tpl', 'My '.$gBitSystem->getPreference( 'siteTitle' ) );
diff --git a/register.php b/register.php
index 7fe283c..797f85e 100644
--- a/register.php
+++ b/register.php
@@ -1,6 +1,6 @@
<?php
/**
- * $Header: /cvsroot/bitweaver/_bit_users/register.php,v 1.2 2005/06/28 07:46:23 spiderr Exp $
+ * $Header: /cvsroot/bitweaver/_bit_users/register.php,v 1.3 2005/07/17 17:36:44 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: register.php,v 1.2 2005/06/28 07:46:23 spiderr Exp $
+ * $Id: register.php,v 1.3 2005/07/17 17:36:44 squareing Exp $
* @package users
* @subpackage functions
*/
@@ -27,7 +27,7 @@ if( isset( $_REQUEST["register"] ) ) {
$reg = $_REQUEST['REG'];
// novalidation is set to yes if a user confirms his email is correct after tiki fails to validate it
if( $gBitSystem->isFeatureActive( 'rnd_num_reg' ) ) {
- if( (empty( $reg['novalidation'] ) || $reg['novalidation'] != 'yes')
+ if( (empty( $reg['novalidation'] ) || $reg['novalidation'] != 'yes')
&& (!isset( $_SESSION['random_number'] ) || $_SESSION['random_number']!=$reg['regcode'])) {
$errors['rnd_num_reg'] = "Wrong registration code";
}
@@ -42,35 +42,9 @@ if( isset( $_REQUEST["register"] ) ) {
if( empty( $errors ) ) {
$newUser = new BitPermUser();
- if( $newUser->store( $reg ) ) {
- $emails = $notificationlib->get_mail_events('user_registers','*');
- foreach($emails as $email) {
- $smarty->assign('mail_user',$reg['login']);
- $smarty->assign('mail_date',date("U"));
- $smarty->assign('mail_site',$_SERVER["SERVER_NAME"]);
- $mail_data = $smarty->fetch('bitpackage:users/new_user_notification.tpl');
- mail( $reg['email'], tra('New user registration'),$mail_data,"From: ".$gBitSystem->getPreference('sender_email')."\r\nContent-type: text/plain;charset=utf-8\r\n");
- }
- if( !empty( $_REQUEST['CUSTOM'] ) ) {
- foreach( $_REQUEST['CUSTOM'] as $field=>$value ) {
- $newUser->storePreference( $field, $value );
- }
- }
+ if( $newUser->register( $reg ) ) {
if( $gBitSystem->isFeatureActive( 'validateUsers' ) ) {
- // $apass = addslashes(substr(md5($gBitSystem->genPass()),0,25));
- $apass = $reg['user_store']['provpass'];
- $foo = parse_url($_SERVER["REQUEST_URI"]);
- $foo1=str_replace("register","confirm",$foo["path"]);
- $machine = httpPrefix().$foo1;
-
- // Send the mail
$smarty->assign('msg',tra('You will receive an email with information to login for the first time into this site'));
- $smarty->assign('mail_machine',$machine);
- $smarty->assign('mail_site',$_SERVER["SERVER_NAME"]);
- $smarty->assign('mail_user',$reg['login']);
- $smarty->assign('mail_apass',$apass);
- $mail_data = $smarty->fetch('bitpackage:users/user_validation_mail.tpl');
- mail($reg["email"], tra('Your Tiki information registration'),$mail_data,"From: ".$gBitSystem->getPreference('sender_email')."\r\nContent-type: text/plain;charset=utf-8\r\n");
$smarty->assign('showmsg','y');
} else {
$url = $newUser->login( $reg['login'], $reg['password'], FALSE, FALSE );
diff --git a/remind_password.php b/remind_password.php
index cc07d94..7b8cbb9 100644
--- a/remind_password.php
+++ b/remind_password.php
@@ -1,6 +1,6 @@
<?php
/**
- * $Header: /cvsroot/bitweaver/_bit_users/remind_password.php,v 1.2 2005/06/28 07:46:23 spiderr Exp $
+ * $Header: /cvsroot/bitweaver/_bit_users/remind_password.php,v 1.3 2005/07/17 17:36:44 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: remind_password.php,v 1.2 2005/06/28 07:46:23 spiderr Exp $
+ * $Id: remind_password.php,v 1.3 2005/07/17 17:36:44 squareing Exp $
* @package users
* @subpackage functions
*/
@@ -21,8 +21,10 @@ if ($forgotPass != 'y') {
$smarty->assign('msg', tra("This feature is disabled").": forgotPass");
$gBitSystem->display( 'error.tpl' );
die;
-}
-if (isset($_REQUEST["remind"])) {
+} elseif( $gBitUser->isRegistered() ) {
+ header( 'Location: '.BIT_ROOT_URL );
+ die;
+} elseif (isset($_REQUEST["remind"])) {
if( $userInfo = $gBitUser->getUserInfo( array( 'login' => $_REQUEST["username"] ) ) ) {
if ( $gBitSystem->isFeatureActive( 'feature_clear_passwords' ) && !empty($userInfo['password']) ) {
$pass = $userInfo['password'];
diff --git a/templates/admin_login.tpl b/templates/admin_login.tpl
index 8988879..e7cdc92 100644
--- a/templates/admin_login.tpl
+++ b/templates/admin_login.tpl
@@ -6,9 +6,9 @@
{formlabel label="Authentication method" for="auth_method"}
{forminput}
<select name="auth_method" id="auth_method">
- <option value="tiki" {if $auth_method eq 'tiki'} selected="selected"{/if}>{tr}Just Tiki{/tr}</option>
+ <option value="tiki" {if $auth_method eq 'tiki'} selected="selected"{/if}>{tr}Just bitweaver{/tr}</option>
<option value="ws" {if $auth_method eq 'ws'} selected="selected"{/if}>{tr}Web Server{/tr}</option>
- <option value="auth" {if $auth_method eq 'auth'} selected="selected"{/if}>{tr}Tiki and PEAR::Auth{/tr}</option>
+ <option value="auth" {if $auth_method eq 'auth'} selected="selected"{/if}>{tr}bitweaver and PEAR::Auth{/tr}</option>
</select>
{formhelp note=""}
{/forminput}
@@ -23,6 +23,14 @@
</div>
<div class="row">
+ {formlabel label="Send registration welcome email" for="send_welcome_email"}
+ {forminput}
+ <input type="checkbox" name="send_welcome_email" id="send_welcome_email" {if $gBitSystem->isFeatureActive( 'send_welcome_email' )}checked="checked"{/if}/>
+ {formhelp note="Upon successful registration, this will send the user an email with login information, including their password."}
+ {/forminput}
+ </div>
+
+ <div class="row">
{formlabel label="Create a group for each user" for="eponymousGroups"}
{forminput}
<input type="checkbox" name="eponymousGroups" id="eponymousGroups" {if $eponymousGroups eq 'y'}checked="checked"{/if}/>
@@ -46,10 +54,10 @@
{/forminput}
</div>
-{php}
-if (!function_exists("gd_info"))
- $this->assign( 'warning','PHP GD library is required for this feature (not found on your system)' );
-{/php}
+ {php}
+ if (!function_exists("gd_info"))
+ $this->assign( 'warning','PHP GD library is required for this feature (not found on your system)' );
+ {/php}
<div class="row">
{formfeedback warning=$warning}
@@ -70,12 +78,12 @@ if (!function_exists("gd_info"))
<div class="row">
{if !$gBitSystem->hasValidSenderEmail()}
- {formfeedback error="Site <a href=\"`$gBitLoc.BIT_ROOT_URL`kernel/admin/index.php?page=general\">emailer return address</a> is not valid!"}
+ {formfeedback error="Site <a href=\"`$gBitLoc.BIT_ROOT_URL`kernel/admin/index.php?page=server\">emailer return address</a> is not valid!"}
{/if}
{formlabel label="Validate email address" for="validateEmail"}
{forminput}
<input type="checkbox" name="validateEmail" id="validateEmail" {if !$gBitSystem->hasValidSenderEmail()}disabled="disabled"{elseif $validateEmail eq 'y'}checked="checked"{/if} />
- {formhelp note="This feature should be used only when you need the maximum security and should be used with discretion. If a visitor's email server is not responding, they will not be able to register. You also must have a valid sender email to use this feature (This setting can be found in Administration --&gt; Kernel --&gt; General Settings"}
+ {formhelp link="kernel/admin/index.php?page=server/General Settings" note="This feature should be used only when you need the maximum security and should be used with discretion. If a visitor's email server is not responding, they will not be able to register. You also must have a valid sender email to use this feature."}
{/forminput}
</div>
@@ -98,7 +106,7 @@ if (!function_exists("gd_info"))
<div class="row">
{formlabel label="Store plaintext passwords" for="feature_clear_passwords"}
{forminput}
- <input type="checkbox" name="feature_clear_passwords" id="feature_clear_passwords" {if $gBitSystemPrefs.feature_clear_passwords eq 'y'}checked="checked"{/if}/>
+ <input type="checkbox" name="feature_clear_passwords" id="feature_clear_passwords" {if $gBitSystem->isFeatureActive( 'feature_clear_passwords' )}checked="checked"{/if}/>
{formhelp note="Passwords will be visible in the database. If a user requests a password, their password will *not* be reset and simply emailed to them in plain text. This option is less secure, but better suited to sites with a wide variety of users."}
{/forminput}
</div>
@@ -106,21 +114,13 @@ if (!function_exists("gd_info"))
<div class="row">
{formlabel label="Password generator" for="user_password_generator"}
{forminput}
- <input type="checkbox" name="user_password_generator" id="user_password_generator" {if $gBitSystemPrefs.user_password_generator eq 'y'}checked="checked"{/if}/>
+ <input type="checkbox" name="user_password_generator" id="user_password_generator" {if $gBitSystem->isFeatureActive( 'user_password_generator' )}checked="checked"{/if}/>
{formhelp note="Display password generator on registration page that creates secure passwords."}
{/forminput}
</div>
<div class="row">
- {formlabel label="Use challenge/response authentication" for="feature_challenge"}
- {forminput}
- <input type="checkbox" name="feature_challenge" id="feature_challenge" {if $gBitSystemPrefs.feature_challenge eq 'y'}checked="checked"{/if}/>
- {formhelp note="Some javascript stuff."}
- {/forminput}
- </div>
-
- <div class="row">
- {formlabel label="Force to use characters <b>and</b> numbers in passwords" for="pass_chr_num"}
+ {formlabel label="Force to use characters <strong>and</strong> numbers in passwords" for="pass_chr_num"}
{forminput}
<input type="checkbox" name="pass_chr_num" id="pass_chr_num" {if $pass_chr_num eq 'y'}checked="checked"{/if}/>
{formhelp note=""}
@@ -138,7 +138,7 @@ if (!function_exists("gd_info"))
<div class="row">
{formlabel label="Remember me feature" for="rememberme"}
{forminput}
- <input type="checkbox" name="rememberme" id="rememberme" {if $gBitSystem->isFeatureActive('rememberme')}checked="checked"{/if}/>
+ <input type="checkbox" name="rememberme" id="rememberme" {if $gBitSystem->isFeatureActive('rememberme')}checked="checked"{/if}/>
{formhelp note="Registered users will stay logged even if they close their browser."}
{/forminput}
</div>
@@ -262,7 +262,7 @@ if (!function_exists("gd_info"))
{form legend="PEAR::Auth"}
<input type="hidden" name="page" value="{$page}" />
<div class="row">
- {formlabel label="Create user if not in Tiki" for="auth_create_gBitDbUser"}
+ {formlabel label="Create user if not in bitweaver" for="auth_create_gBitDbUser"}
{forminput}
<input type="checkbox" name="auth_create_gBitDbUser" id="auth_create_gBitDbUser" {if $auth_create_gBitDbUser eq 'y'}checked="checked"{/if} />
{formhelp note=""}
@@ -278,7 +278,7 @@ if (!function_exists("gd_info"))
</div>
<div class="row">
- {formlabel label="Just use Tiki auth for admin" for="auth_skip_admin"}
+ {formlabel label="Just use bitweaver auth for admin" for="auth_skip_admin"}
{forminput}
<input type="checkbox" name="auth_skip_admin" id="auth_skip_admin" {if $auth_skip_admin eq 'y'}checked="checked"{/if} />
{formhelp note=""}
diff --git a/templates/admin_users.tpl b/templates/admin_users.tpl
index 67e2207..a10d7b7 100644
--- a/templates/admin_users.tpl
+++ b/templates/admin_users.tpl
@@ -39,7 +39,7 @@
<select name="fTiki[feature_user_theme]" id="feature_user_theme">
<option value="n">Never</option>
<option value="h" {if $gBitSystemPrefs.feature_user_theme eq 'h'}selected="selected"{/if}>{tr}Just For Their Homepage{/tr}</option>
- <option value="y" {if $gBitSystemPrefs.feature_user_theme eq 'y'}selected="selected"{/if}>{tr}For the Entire Site{/tr}</option>
+ <option value="y" {if $gBitSystem->isFeatureActive( 'feature_user_theme' )}selected="selected"{/if}>{tr}For the Entire Site{/tr}</option>
</select>
{formhelp note="Allows users to choose their own theme." page="UserTheme"}
{/forminput}
diff --git a/templates/center_user_wiki_page.tpl b/templates/center_user_wiki_page.tpl
index 3089ee7..3f774a4 100644
--- a/templates/center_user_wiki_page.tpl
+++ b/templates/center_user_wiki_page.tpl
@@ -1,15 +1,5 @@
{strip}
<div class="display wiki user">
- {if $gBitUser->hasPermission( 'bit_p_admin_users' )}
- <div class="floaticon">
- {if $gBitUser->mUserId ne $gQueryUser->mUserId}
- {smartlink ipackage=users ifile="admin/index.php" assume_user=$userInfo.user_id ititle="Assume user identity" ibiticon="users/assume_user"}
- {else}
- {smartlink ipackage=users ifile="preferences.php" ititle="Edit your personal profile" ibiticon="liberty/edit"}
- {/if}
- </div>
- {/if}
-
<div class="header">
<h1 >{displayname hash=$userInfo nolink=true}</h1>
</div>
@@ -20,38 +10,60 @@
</div>
{/if}
- {legend legend="User Information"}
- {include file="bitpackage:users/user_information_inc.tpl" userData=$gQueryUser}
- {/legend}
+ <div class="body">
+ {jstabs}
+ {jstab title="User Page"}
+ {if $parsed}
+ {if $gBitUser->mUserId eq $gQueryUser->mUserId}
+ <div class="floaticon">
+ {smartlink ipackage=users ifile="edit_personal_page.php" ititle="Edit your personal wiki page" ibiticon="liberty/edit"}
+ </div>
+ {/if}
+
+ <div class="header">
+ <h1>{$userInfo.title}</h1>
+ </div>
+ {/if}
+
+ <div class="body">
+ <div class="content">
+ {if !$parsed}
+ <p>
+ {if $gBitUser->mUserId ne $gQueryUser->mUserId}
+ {tr}This user has not entered any information yet.{/tr}
+ {else}
+ {tr}To enter some information here, please <a href="{$gBitLoc.USERS_PKG_URL}edit_personal_page.php">edit your personal homepage</a>.{/tr}
+ {/if}
+ </p>
+ {/if}
+
+ {if $userInfo.portrait_url}
+ <img src="{$userInfo.portrait_url}" class="portrait" title="{tr}Portrait{/tr}" alt="{tr}Portrait{/tr}" />
+ {/if}
- <div class="content">
- <div class="body">
- {if $parsed}
- {if $gBitUser->mUserId eq $gQueryUser->mUserId}
+ {$parsed}
+ </div><!-- end .content -->
+ </div><!-- end .body -->
+ {/jstab}
+
+ {jstab title="User Information"}
+ {if $gBitUser->hasPermission( 'bit_p_admin_users' )}
<div class="floaticon">
- {smartlink ipackage=users ifile="edit_personal_page.php" ititle="Edit your personal wiki page" ibiticon="liberty/edit"}
+ {if $gBitUser->mUserId ne $gQueryUser->mUserId}
+ {smartlink ipackage=users ifile="admin/index.php" assume_user=$userInfo.user_id ititle="Assume user identity" ibiticon="users/assume_user"}
+ {else}
+ {smartlink ipackage=users ifile="preferences.php" ititle="Edit your personal profile" ibiticon="liberty/edit"}
+ {/if}
</div>
{/if}
<div class="header">
- <h1>{$userInfo.title}</h1>
+ <h1 >{displayname hash=$userInfo nolink=true}</h1>
</div>
- {else}
- <p>
- {if $gBitUser->mUserId ne $gQueryUser->mUserId}
- {tr}This user has not entered any information yet.{/tr}
- {else}
- {tr}To enter some information here, please <a href="{$gBitLoc.USERS_PKG_URL}edit_personal_page.php">edit your personal homepage</a>.{/tr}
- {/if}
- </p>
- {/if}
-
- {if $userInfo.portrait_url}
- <img src="{$userInfo.portrait_url}" class="portrait" title="{tr}Portrait{/tr}" alt="{tr}Portrait{/tr}" />
- {/if}
- {$parsed}
- </div><!-- end .body -->
- </div><!-- end .content -->
+ {include file="bitpackage:users/user_information_inc.tpl" userData=$gQueryUser}
+ {/jstab}
+ {/jstabs}
+ </div><!-- end .body -->
</div><!-- end .user -->
{/strip}
diff --git a/templates/custom_home.tpl b/templates/custom_home.tpl
index 304241c..385a6e9 100644
--- a/templates/custom_home.tpl
+++ b/templates/custom_home.tpl
@@ -15,10 +15,10 @@
<td style="width: 50%; vertical-align: top;">
<div class="box">
<div class="boxtitle">
- What is Tiki?
+ What is bitweaver?
</div>
<div class="boxcontent">
- Tiki is a powerful Content Management System easy to customize and
+ bitweaver is a powerful Content Management System easy to customize and
configure designed to create Portals, community sites, intranets,
and general web applications.
</div>
@@ -40,7 +40,7 @@
Download!
</div>
<div class="boxcontent">
-Our last stable release of bitweaver is 1.2 - Bonnie - you can download bitweaver from <a href="http://www.sourceforge.net/projects/tikipro/">Sourceforge</a>
+Our last stable release of bitweaver is 1.2 - Bonnie - you can download bitweaver from <a href="http://www.sourceforge.net/projects/bitweaver/">Sourceforge</a>
</div>
</div>
@@ -68,7 +68,7 @@ Some of the many features in bitweaver
<li>Chatrooms</li>
<li>FAQs</li>
<li>Polls</li>
-<li>Send and receive objects to/from other Tiki sites</li>
+<li>Send and receive objects to/from other bitweaver sites</li>
<li>Powerful permission system with users/groups for all the sections and features</li>
</ul>
</div>
@@ -76,11 +76,11 @@ Some of the many features in bitweaver
<div class="box">
<div class="boxtitle">
-Testing Tiki
+Testing bitweaver
</div>
<div class="boxcontent">
<ol>
-<li>May be you want to start reading the tiki <a href="{$gBitLoc.FAQS_PKG_URL}index.php">FAQ</a></li>
+<li>May be you want to start reading the bitweaver <a href="{$gBitLoc.FAQS_PKG_URL}index.php">FAQ</a></li>
<li>Test the wiki following this <a href="{$gBitLoc.WIKI_PKG_URL}index.php">link</a></li>
<li>Visit the <a href="{$gBitLoc.BITFORUMS_PKG_URL}index.php">forums</a>, write a topic or reply to an existing topic if you want</li>
<li>At the <a href="{$gBitLoc.IMAGEGALS_PKG_URL}index.php">images galleries</a> section you can see some images try <a href="{$gBitLoc.IMAGEGALS_PKG_URL}upload_image.php?gallery_id=2">uploading images</a> to our public gallery</li>
diff --git a/templates/index_list.tpl b/templates/index_list.tpl
index d714053..400f8ec 100644
--- a/templates/index_list.tpl
+++ b/templates/index_list.tpl
@@ -1,12 +1,16 @@
<div class="display users listing">
-<div class="header">
-<h1>{$siteTitle} {tr}Members{/tr}</h1>
-</div>
-<div class="body">
+{if $search_request ne ''}
+ <div class="header">
+ <h1>{tr}User{/tr} {$search_request} {tr}Not Found{/tr}</h1>
+ </div>
+{/if}
-{include file="bitpackage:users/users_list.tpl"}
+ <div class="header">
+ <h1>{tr}{$siteTitle} Members{/tr}</h1>
+ </div>
-</div> {* end .body *}
-
-</div> {* end .admin *}
+ <div class="body">
+ {include file="bitpackage:users/users_list.tpl"}
+ </div><!-- end .body -->
+</div><!-- end .users -->
diff --git a/templates/login_inc.tpl b/templates/login_inc.tpl
index eb9be3d..7f1d401 100644
--- a/templates/login_inc.tpl
+++ b/templates/login_inc.tpl
@@ -1,98 +1,56 @@
{strip}
-<form name="loginbox" action="{$gBitLoc.USERS_PKG_URL}validate.php" method="post" {if $gBitSystemPrefs.feature_challenge eq 'y'}onsubmit="doChallengeResponse()"{/if}>
- {if $gBitSystemPrefs.feature_challenge eq 'y'}
- {literal}
- <script language="javascript" type="text/javascript" src="lib/md5.js"></script>
- <script language="Javascript" type="text/javascript">
- <!--
- function doChallengeResponse() {
- hashstr = document.loginbox.user.value +
- document.loginbox.pass.value +
- document.loginbox.email.value;
- str = document.loginbox.user.value +
- MD5(hashstr) +
- document.loginbox.challenge.value;
- document.loginbox.response.value = MD5(str);
- document.loginbox.pass.value='';
- /*
- document.login.password.value = "";
- document.logintrue.username.value = document.login.username.value;
- document.logintrue.response.value = MD5(str);
- document.logintrue.submit();
- */
- document.loginbox.submit();
- return false;
- }
- // -->
- </script>
- {/literal}
- <input type="hidden" name="challenge" value="{$challenge|escape}" />
- <input type="hidden" name="response" value="" />
- {/if}
+{form legend="Sign in with your username or email to continue" ipackage=users ifile='validate.php'}
+ <div class="row">
+ {formfeedback error="$error"}
+ {formlabel label="Username or Email" for="user"}
+ {forminput}
+ <input type="text" name="user" id="user" size="25" />
+ {formhelp note=""}
+ {/forminput}
+ </div>
+
+ <div class="row">
+ {formlabel label="Password" for="pass"}
+ {forminput}
+ <input type="password" name="pass" id="pass" size="25" />
+ {/forminput}
+ </div>
- {legend legend="Sign in with your username or email to continue"}
+ {if $gBitSystem->isFeatureActive('rememberme')}
<div class="row">
- {formfeedback error="$error"}
- {formlabel label="Username or Email" for="user"}
+ {formlabel label="Remember me" for="rme"}
{forminput}
- <input type="text" name="user" id="user" size="25" />
+ <input type="checkbox" name="rme" id="rme" value="on" checked=checked/>
{formhelp note=""}
{/forminput}
</div>
+ {/if}
- {if $gBitSystemPrefs.feature_challenge eq 'y'}
- <div class="row">
- {formlabel label="email" for="email"}
- {forminput}
- <input type="text" name="email" id="email" size="25" />
- {formhelp note=""}
- {/forminput}
- </div>
- {/if}
-
+ {if $http_login_url ne '' or $https_login_url ne ''}
<div class="row">
- {formlabel label="Password" for="pass"}
+ {formlabel label="" for=""}
{forminput}
- <input type="password" name="pass" id="pass" size="25" />
+ <a href="{$http_login_url}" title="{tr}Click here to login using the default security protocol{/tr}">{tr}standard{/tr}</a> |
+ <a href="{$https_login_url}" title="{tr}Click here to login using a secure protocol{/tr}">{tr}secure{/tr}</a>
+ {formhelp note=""}
{/forminput}
</div>
+ {/if}
- {if $gBitSystem->isFeatureActive('rememberme')}
- <div class="row">
- {formlabel label="Remember me" for="rme"}
- {forminput}
- <input type="checkbox" name="rme" id="rme" value="on" checked=checked/>
- {formhelp note=""}
- {/forminput}
- </div>
- {/if}
-
- {if $http_login_url ne '' or $https_login_url ne ''}
- <div class="row">
- {formlabel label="" for=""}
- {forminput}
- <a href="{$http_login_url}" title="{tr}Click here to login using the default security protocol{/tr}">{tr}standard{/tr}</a> |
- <a href="{$https_login_url}" title="{tr}Click here to login using a secure protocol{/tr}">{tr}secure{/tr}</a>
- {formhelp note=""}
- {/forminput}
- </div>
- {/if}
-
- {if $show_stay_in_ssl_mode eq 'y'}
- <div class="row">
- {formlabel label="stay in ssl mode" for="stay_in_ssl_mode"}
- {forminput}
- <input type="checkbox" name="stay_in_ssl_mode" id="stay_in_ssl_mode" {if $stay_in_ssl_mode eq 'y'}checked="checked"{/if} />
- {formhelp note=""}
- {/forminput}
- </div>
- {else}
- <input type="hidden" name="stay_in_ssl_mode" value="{$stay_in_ssl_mode|escape}" />
- {/if}
-
- <div class="row submit">
- <input type="submit" name="login" value="{tr}Log in to {$siteName|default:"this site"}{/tr}" />
+ {if $show_stay_in_ssl_mode eq 'y'}
+ <div class="row">
+ {formlabel label="stay in ssl mode" for="stay_in_ssl_mode"}
+ {forminput}
+ <input type="checkbox" name="stay_in_ssl_mode" id="stay_in_ssl_mode" {if $stay_in_ssl_mode eq 'y'}checked="checked"{/if} />
+ {formhelp note=""}
+ {/forminput}
</div>
- {/legend}
-</form>
+ {else}
+ <input type="hidden" name="stay_in_ssl_mode" value="{$stay_in_ssl_mode|escape}" />
+ {/if}
+
+ <div class="row submit">
+ <input type="submit" name="login" value="{tr}Log in to {$siteName|default:"this site"}{/tr}" />
+ </div>
+{/form}
{/strip}
diff --git a/templates/menu_users.tpl b/templates/menu_users.tpl
index b6b2859..1fa272f 100644
--- a/templates/menu_users.tpl
+++ b/templates/menu_users.tpl
@@ -9,23 +9,23 @@
<li><a class="item" href="{$gBitLoc.LIBERTY_PKG_URL}list_content.php">{biticon ipackage=liberty iname=spacer iforce=icon} {tr}All available Content{/tr}</a></li>
{if $gBitSystemPrefs.feature_user_layout eq 'h'}
{assign var="myLayoutConfig" value="My Homepage"}
- {else if $gBitSystemPrefs.feature_user_layout eq 'y'}
+ {else if $gBitSystem->isFeatureActive( 'feature_user_layout' )}
{assign var="myLayoutConfig" value="My Site Layout"}
{/if}
- {if $gBitSystemPrefs.feature_user_layout eq 'y' or $gBitSystemPrefs.feature_user_layout eq 'h'
- or $gBitSystemPrefs.feature_user_theme eq 'y' || $gBitSystemPrefs.feature_user_theme eq 'h' }
+ {if $gBitSystem->isFeatureActive( 'feature_user_layout' ) or $gBitSystemPrefs.feature_user_layout eq 'h'
+ or $gBitSystem->isFeatureActive( 'feature_user_theme' ) || $gBitSystemPrefs.feature_user_theme eq 'h' }
<li><a class="item" href="{$gBitLoc.USERS_PKG_URL}assigned_modules.php">{biticon ipackage=liberty iname=config iexplain=Configure iforce=icon} {tr}Configure {$myLayoutConfig}{/tr}</a></li>
{/if}
- {if $gBitSystemPrefs.feature_userPreferences eq 'y'}
+ {if $gBitSystem->isFeatureActive( 'feature_userPreferences' )}
<li><a class="item" href="{$gBitLoc.USERS_PKG_URL}preferences.php">{biticon ipackage=liberty iname=settings iexplain=Preferences iforce=icon} {tr}Preferences{/tr}</a></li>
{/if}
- {if $gBitSystemPrefs.feature_user_bookmarks eq 'y' and $gBitUser->hasPermission( 'bit_p_create_bookmarks' )}
+ {if $gBitSystem->isFeatureActive( 'feature_user_bookmarks' ) and $gBitUser->hasPermission( 'bit_p_create_bookmarks' )}
<li><a class="item" href="{$gBitLoc.USERS_PKG_URL}bookmarks.php">{biticon ipackage=liberty iname=spacer iforce=icon} {tr}Bookmarks{/tr}</a></li>
{/if}
- {if $gBitSystemPrefs.package_messages eq 'y' and $gBitUser->hasPermission( 'bit_p_messages' )}
+ {if $gBitSystem->isPackageActive( 'messages' ) and $gBitUser->hasPermission( 'bit_p_messages' )}
<li><a class="item" href="{$gBitLoc.MESSU_PKG_URL}message_box.php">{biticon ipackage=liberty iname=spacer iforce=icon} {tr}Messages{/tr}</a></li>
{/if}
- {if $gBitSystemPrefs.package_minical eq 'y'}
+ {if $gBitSystem->isPackageActive( 'minical' )}
<li><a class="item" href="{$gBitLoc.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')}
@@ -37,19 +37,19 @@
{if $gBitSystem->isFeatureActive('feature_user_watches') }
<li><a class="item" href="{$gBitLoc.USERS_PKG_URL}watches.php">{biticon ipackage=users iname=watch iexplain="My Watches" iforce=icon} {tr}My watches{/tr}</a></li>
{/if}
- {if $gBitSystemPrefs.package_newsreader eq 'y' and $gBitUser->hasPermission( 'bit_p_newsreader' )}
+ {if $gBitSystem->isPackageActive( 'newsreader' ) and $gBitUser->hasPermission( 'bit_p_newsreader' )}
<li><a class="item" href="{$gBitLoc.NEWSREADER_PKG_URL}index.php">{biticon ipackage=liberty iname=spacer iforce=icon} {tr}Newsreader{/tr}</a></li>
{/if}
- {if $gBitSystemPrefs.package_notepad eq 'y' and $gBitUser->hasPermission( 'bit_p_notepad' )}
+ {if $gBitSystem->isPackageActive( 'notepad' ) and $gBitUser->hasPermission( 'bit_p_notepad' )}
<li><a class="item" href="{$gBitLoc.NOTEPAD_PKG_URL}index.php">{biticon ipackage=liberty iname=spacer iforce=icon} {tr}Notepad{/tr}</a></li>
{/if}
- {if $gBitSystemPrefs.feature_tasks eq 'y' and $gBitUser->hasPermission( 'bit_p_tasks' )}
+ {if $gBitSystem->isFeatureActive( 'feature_tasks' ) and $gBitUser->hasPermission( 'bit_p_tasks' )}
<li><a class="item" href="{$gBitLoc.USERS_PKG_URL}tasks.php">{biticon ipackage=liberty iname=spacer iforce=icon} {tr}Tasks{/tr}</a></li>
{/if}
- {if $gBitSystemPrefs.feature_usermenu eq 'y'}
+ {if $gBitSystem->isFeatureActive( 'feature_usermenu' )}
<li><a class="item" href="{$gBitLoc.USERS_PKG_URL}menu.php">{biticon ipackage=liberty iname=spacer iforce=icon} {tr}User menu{/tr}</a></li>
{/if}
- {if $gBitSystemPrefs.package_webmail eq 'y' and $gBitUser->hasPermission( 'bit_p_use_webmail' )}
+ {if $gBitSystem->isPackageActive( 'webmail' ) and $gBitUser->hasPermission( 'bit_p_use_webmail' )}
<li><a class="item" href="{$gBitLoc.WEBMAIL_PKG_URL}index.php">{biticon ipackage=liberty iname=spacer iforce=icon} {tr}Webmail{/tr}</a></li>
{/if}
{if $gBitSystem->isPackageActive( 'messu' )}
diff --git a/templates/my_bitweaver_bar.tpl b/templates/my_bitweaver_bar.tpl
index ac2aa65..9273525 100644
--- a/templates/my_bitweaver_bar.tpl
+++ b/templates/my_bitweaver_bar.tpl
@@ -10,52 +10,52 @@
<td valign="top" align="center"><a href="{$gBitLoc.USERS_PKG_URL}my.php" title="{tr}MyTiki{/tr}">
{biticon ipackage="users" iname="my_bitweaver" iexplain="MyTiki"}</a></td>
-{if $gBitSystemPrefs.feature_userPreferences eq 'y'}
+{if $gBitSystem->isFeatureActive( 'feature_userPreferences' )}
<td valign="top" align="center"><a href="{$gBitLoc.USERS_PKG_URL}preferences.php" title="{tr}Preferences{/tr}">
{biticon ipackage="users" iname="my_prefs" iexplain="Preferences"}</a></td>
{/if}
-{if $gBitSystemPrefs.feature_messages eq 'y' and $gBitUser->hasPermission( 'bit_p_messages' )}
+{if $gBitSystem->isFeatureActive( 'feature_messages' ) and $gBitUser->hasPermission( 'bit_p_messages' )}
<td valign="top" align="center"><a href="{$gBitLoc.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 $gBitSystemPrefs.feature_tasks eq 'y' and $gBitUser->hasPermission( 'bit_p_tasks' )}
+{if $gBitSystem->isFeatureActive( 'feature_tasks' ) and $gBitUser->hasPermission( 'bit_p_tasks' )}
<td valign="top" align="center"><a href="{$gBitLoc.USERS_PKG_URL}tasks.php" title="{tr}Tasks{/tr}">
{biticon ipackage="users" iname="my_tasks" iexplain="Tasks"}</a></td>
{/if}
-{if $gBitSystemPrefs.feature_user_bookmarks eq 'y' and $gBitUser->hasPermission( 'bit_p_create_bookmarks' )}
+{if $gBitSystem->isFeatureActive( 'feature_user_bookmarks' ) and $gBitUser->hasPermission( 'bit_p_create_bookmarks' )}
<td valign="top" align="center"><a href="{$gBitLoc.USERS_PKG_URL}bookmarks.php" title="{tr}Bookmarks{/tr}">
{biticon ipackage="users" iname="my_bookmarks" iexplain="Bookmarks"}</a></td>
{/if}
-{if $gBitSystemPrefs.feature_user_layout eq 'y' and $gBitUser->hasPermission( 'bit_p_configure_modules' )}
+{if $gBitSystem->isFeatureActive( 'feature_user_layout' ) and $gBitUser->hasPermission( 'bit_p_configure_modules' )}
<td valign="top" align="center"><a href="{$gBitLoc.USERS_PKG_URL}assigned_modules.php" title="{tr}Modules{/tr}">
{biticon ipackage="users" iname="my_modules" iexplain="Modules"}</a></td>
{/if}
-{if $gBitSystemPrefs.feature_newsreader eq 'y' and $gBitUser->hasPermission( 'bit_p_newsreader' )}
+{if $gBitSystem->isFeatureActive( 'feature_newsreader' ) and $gBitUser->hasPermission( 'bit_p_newsreader' )}
<td valign="top" align="center"><a href="{$gBitLoc.NEWSREADER_PKG_URL}index.php" title="{tr}Newsreader{/tr}">
{biticon ipackage="users" iname="my_news" iexplain="Newsreader"}</a></td>
{/if}
-{if $gBitSystemPrefs.feature_webmail eq 'y' and $gBitUser->hasPermission( 'bit_p_use_webmail' )}
+{if $gBitSystem->isFeatureActive( 'feature_webmail' ) and $gBitUser->hasPermission( 'bit_p_use_webmail' )}
<td valign="top" align="center"><a href="{$gBitLoc.WEBMAIL_PKG_URL}index.php" title="{tr}Webmail{/tr}">
{biticon ipackage="users" iname="my_webmail" iexplain="Webmail"}</a></td>
{/if}
-{if $gBitSystemPrefs.package_notepad eq 'y' and $gBitUser->hasPermission( 'bit_p_notepad' )}
+{if $gBitSystem->isPackageActive( 'notepad' ) and $gBitUser->hasPermission( 'bit_p_notepad' )}
<td valign="top" align="center"><a href="{$gBitLoc.NOTEPAD_PKG_URL}index.php" title="{tr}Notepad{/tr}">
{biticon ipackage="users" iname="my_notes" iexplain="Notepad"}</a></td>
{/if}
-{if $gBitSystemPrefs.feature_userfiles eq 'y' and $gBitUser->hasPermission( 'bit_p_userfiles' )}
+{if $gBitSystem->isFeatureActive( 'feature_userfiles' ) and $gBitUser->hasPermission( 'bit_p_userfiles' )}
<td valign="top" align="center"><a href="{$gBitLoc.USERS_PKG_URL}files.php" title="{tr}MyFiles{/tr}">
{biticon ipackage="users" iname="my_files" iexplain="My Files"}</a></td>
{/if}
-{if $gBitSystemPrefs.feature_minical eq 'y'}
+{if $gBitSystem->isFeatureActive( 'feature_minical' )}
<td valign="top" align="center"><a href="{$gBitLoc.MINICAL_PKG_URL}index.php" title="{tr}Mini Calendar{/tr}">
{biticon ipackage="users" iname="my_minical" iexplain="Mini Calendar"}</a></td>
{/if}
diff --git a/templates/register.tpl b/templates/register.tpl
index f9ff0ee..1c6b4f6 100644
--- a/templates/register.tpl
+++ b/templates/register.tpl
@@ -26,23 +26,6 @@
<input type="submit" name="REG[register]" value="{tr}register{/tr}" />
</div>
{elseif $showmsg ne 'y'}
- {if $gBitSystem->mPrefs.rnd_num_reg eq 'y'}
- <div class="row">
- {formfeedback error=$errors.rnd_num_reg}
- {formlabel label="Your registration code"}
- {forminput}
- <img src="{$gBitLoc.USERS_PKG_URL}random_num_img.php" alt="{tr}Random Image{/tr}"/>
- {/forminput}
- </div>
-
- <div class="row">
- {formlabel label="Registration code" for="regcode"}
- {forminput}
- <input type="text" maxlength="8" size="8" name="REG[regcode]" id="regcode" />
- {/forminput}
- </div>
- {/if}
-
<div class="row">
{formlabel label="Real name" for="real_name"}
{forminput}
@@ -54,7 +37,7 @@
{formfeedback error=$errors.login}
{formlabel label="Username" for="login"}
{forminput}
- <input type="text" name="REG[login]" id="login" value="{$reg.login}" />
+ <input type="text" name="REG[login]" id="login" value="{$reg.login}" /> <acronym title="{tr}Required{/tr}">*</acronym>
{formhelp note="Your username can only contain numbers, characters, and underscores."}
{/forminput}
</div>
@@ -63,7 +46,7 @@
{formfeedback error=$errors.email}
{formlabel label="Email" for="email"}
{forminput}
- <input type="text" name="REG[email]" id="email" value="{$reg.email}" />
+ <input type="text" name="REG[email]" id="email" value="{$reg.email}" /> <acronym title="{tr}Required{/tr}">*</acronym>
{/forminput}
</div>
@@ -72,7 +55,7 @@
{formfeedback error=$errors.passcode}
{formlabel label="Passcode to register<br />(not your user password)" for="passcode"}
{forminput}
- <input type="password" name="REG[passcode]" id="passcode" />
+ <input type="password" name="REG[passcode]" id="passcode" /> <acronym title="{tr}Required{/tr}">*</acronym>
{/forminput}
</div>
{/if}
@@ -86,37 +69,59 @@
{formfeedback error=$errors.password}
{formlabel label="Password" for="pass"}
{forminput}
- <input id="pass1" type="password" name="REG[password]" value="{$reg.password}" />
+ <input id="pass1" type="password" name="REG[password]" value="{$reg.password}" /> <acronym title="{tr}Required{/tr}">*</acronym>
{/forminput}
</div>
+
<div class="row">
{formlabel label="Repeat password" for="password2"}
{forminput}
- <input id="password2" type="password" name="REG[password2]" />
+ <input id="password2" type="password" name="REG[password2]" /> <acronym title="{tr}Required{/tr}">*</acronym>
{/forminput}
</div>
+
{if $gBitSystem->isFeatureActive( 'user_password_generator' )}
- <div class="row">
- {formlabel label="<a href=\"javascript:genPass('genepass','pass1','pass2');\">{tr}Generate a password{/tr}</a>" for="email"}
- {forminput}
- <input id="genepass" type="text" />
- {formhelp note="You can use this link to create a random password. Make sure you make a note of it somewhere to log in to this site in the future."}
- {/forminput}
- </div>
+ <div class="row">
+ {formlabel label="<a href=\"javascript:genPass('genepass','pass1','pass2');\">{tr}Generate a password{/tr}</a>" for="email"}
+ {forminput}
+ <input id="genepass" type="text" />
+ {formhelp note="You can use this link to create a random password. Make sure you make a note of it somewhere to log in to this site in the future."}
+ {/forminput}
+ </div>
{/if}
{/if}
{section name=f loop=$customFields}
- <div class="row">
- {formlabel label="$customFields[f]}
- {forminput}
- <input type="text" name="CUSTOM[{$customFields[f]|escape}]" />
- {/forminput}
- </div>
+ <div class="row">
+ {formlabel label="$customFields[f]}
+ {forminput}
+ <input type="text" name="CUSTOM[{$customFields[f]|escape}]" />
+ {/forminput}
+ </div>
{/section}
+ {if $gBitSystem->mPrefs.rnd_num_reg eq 'y'}
+ <hr />
+
+ <div class="row">
+ {formfeedback error=$errors.rnd_num_reg}
+ {formlabel label="Your registration code"}
+ {forminput}
+ <img src="{$gBitLoc.USERS_PKG_URL}random_num_img.php" alt="{tr}Random Image{/tr}"/>
+ {/forminput}
+ </div>
+
+ <div class="row">
+ {formlabel label="Registration code" for="regcode"}
+ {forminput}
+ <input type="text" maxlength="8" size="8" name="REG[regcode]" id="regcode" /> <acronym title="{tr}Required{/tr}">*</acronym>
+ {formhelp note="Please copy the code above into this field. This is a security feature to avoid automatic registration by bots."}
+ {/forminput}
+ </div>
+ {/if}
+
<div class="row submit">
- <input type="submit" name="register" value="{tr}register{/tr}" />
+ <input type="submit" name="register" value="{tr}Register{/tr}" />
</div>
{/if}
{/form}
diff --git a/templates/remind_password.tpl b/templates/remind_password.tpl
index 8e4a691..77cfba9 100644
--- a/templates/remind_password.tpl
+++ b/templates/remind_password.tpl
@@ -1,4 +1,7 @@
{strip}
+{if $msg.success}
+ {include file="bitpackage:users/login.tpl"}
+{else}
<div class="display login">
<div class="header">
@@ -6,9 +9,6 @@
</div>
<div class="body">
- {if $msg.success}
- {formfeedback success=$msg.success}
- {else}
{form legend="Please send me my password"}
<div class="row">
{formfeedback warning=$msg.error}
@@ -22,8 +22,8 @@
<input type="submit" name="remind" id="remind" value="{tr}Send me my password{/tr}" />
</div>
{/form}
- {/if}
</div><!-- end .body -->
</div><!-- end .login -->
+ {/if}
{/strip}
diff --git a/templates/user_assigned_modules.tpl b/templates/user_assigned_modules.tpl
index a0d24fd..1ca57db 100644
--- a/templates/user_assigned_modules.tpl
+++ b/templates/user_assigned_modules.tpl
@@ -10,7 +10,7 @@
<div class="body">
- {if $gBitSystemPrefs.feature_user_layout eq 'y' or $gBitSystemPrefs.feature_user_layout eq 'h'}
+ {if $gBitSystem->isFeatureActive( 'feature_user_layout' ) or $gBitSystemPrefs.feature_user_layout eq 'h'}
<table style="width:100%" cellpadding="5" cellspacing="0" border="0">
<caption>{tr}Your HomePage Layout{/tr}</caption>
<tr>
@@ -53,7 +53,7 @@
{/if}
{jstabs}
- {if $gBitSystemPrefs.feature_user_layout eq 'y' or $gBitSystemPrefs.feature_user_layout eq 'h' and $canassign eq 'y'}
+ {if $gBitSystem->isFeatureActive( 'feature_user_layout' ) or $gBitSystemPrefs.feature_user_layout eq 'h' and $canassign eq 'y'}
{jstab title="Assign Side Piece"}
{form legend="Assign Side Piece"}
{if $fEdit && $fAssign.name}
@@ -146,7 +146,7 @@
{/jstab}
{/if}
- {if $gBitSystemPrefs.feature_user_theme eq 'y' or $gBitSystemPrefs.feature_user_theme eq 'h'}
+ {if $gBitSystem->isFeatureActive( 'feature_user_theme' ) or $gBitSystemPrefs.feature_user_theme eq 'h'}
{jstab title="Select Theme"}
{form legend="Select Theme"}
<div class="row">
@@ -178,7 +178,7 @@
for instance, i don't know where the page heading stuff is used.
<table width="100%">
-{if $gBitSystemPrefs.feature_user_layout eq 'y' or $gBitSystemPrefs.feature_user_layout eq 'h'}
+{if $gBitSystem->isFeatureActive( 'feature_user_layout' ) or $gBitSystemPrefs.feature_user_layout eq 'h'}
{if $canassign eq 'y'}
<tr>
@@ -326,7 +326,7 @@ for instance, i don't know where the page heading stuff is used.
</form>
</td>
<td style="vertical-align:top;">
-{if $gBitSystemPrefs.feature_user_theme eq 'y' || $gBitSystemPrefs.feature_user_theme eq 'h' }
+{if $gBitSystem->isFeatureActive( 'feature_user_theme' ) || $gBitSystemPrefs.feature_user_theme eq 'h' }
<form method="POST" action="{$gBitLoc.USERS_PKG_URL}assigned_modules.php">
<table class="panel">
diff --git a/templates/user_menu.tpl b/templates/user_menu.tpl
index 1eec066..2cddb26 100644
--- a/templates/user_menu.tpl
+++ b/templates/user_menu.tpl
@@ -6,7 +6,7 @@
{if $chdata.type eq 's'}
{if $opensec eq 'y'}</div>{/if}
- {if $gBitSystemPrefs.feature_menusfolderstyle eq 'y'}
+ {if $gBitSystem->isFeatureActive( 'feature_menusfolderstyle' )}
<a class="menuhead" href="javascript:icntoggle('menu{$cname}');">{biticon ipackage=liberty iname="collapsed" name="menu`$cname`img" iexplain="folder"}
{else}
<a class="menuhead" href="javascript:toggle('menu{$cname}');">
@@ -18,7 +18,7 @@
<a class="menuoption" href="{$chdata.url|escape}">{tr}{$chdata.name}{/tr}</a>
{/if}
<script language="Javascript" type="text/javascript">
- {if $gBitSystemPrefs.feature_menusfolderstyle eq 'y'}
+ {if $gBitSystem->isFeatureActive( 'feature_menusfolderstyle' )}
setfoldericonstate('menu{$menu_info.menuId|cat:'__'|cat:$chdata.position}', '{$menu_info.type}');
{/if}
</script>
diff --git a/templates/user_preferences.tpl b/templates/user_preferences.tpl
index e956083..f483d71 100644
--- a/templates/user_preferences.tpl
+++ b/templates/user_preferences.tpl
@@ -125,7 +125,7 @@
<div class="row">
{formlabel label="HomePage" for="homePage"}
{forminput}
- <input size="54" type="text" name="homePage" id="homePage" value="{$editUser.homePage|escape}" />
+ <input size="50" type="text" name="homePage" id="homePage" value="{$editUser.homePage|escape}" />
{formhelp note=""}
{/forminput}
</div>
@@ -201,7 +201,7 @@
<div class="row">
{formlabel label="Email" for="email"}
{forminput}
- <input size="54" type="text" name="email" id="email" value="{$editUser.email|escape}" />
+ <input size="50" type="text" name="email" id="email" value="{$editUser.email|escape}" />
{formhelp note=""}
{/forminput}
</div>
@@ -316,7 +316,7 @@
{/jstab}
{/if}
- {if $gBitSystemPrefs.feature_tasks eq 'y'}
+ {if $gBitSystem->isFeatureActive( 'feature_tasks' )}
{jstab title="User Tasks"}
{form legend="User Tasks"}
<div class="row">
diff --git a/templates/usermenu.tpl b/templates/usermenu.tpl
index da86330..29acd44 100644
--- a/templates/usermenu.tpl
+++ b/templates/usermenu.tpl
@@ -2,7 +2,7 @@
<a class="pagetitle" href="{$gBitLoc.USERS_PKG_URL}menu.php">{tr}User Menu{/tr}</a><br /><br />
{include file="bitpackage:users/my_bitweaver_bar.tpl"}
<br />
-{if $gBitSystemPrefs.feature_user_bookmarks eq 'y' and $gBitUser->hasPermission( 'bit_p_create_bookmarks' )}
+{if $gBitSystem->isFeatureActive( 'feature_user_bookmarks' ) and $gBitUser->hasPermission( 'bit_p_create_bookmarks' )}
<a title="({tr}May need to refresh twice to see changes{/tr})" href="{$gBitLoc.USERS_PKG_URL}menu.php?addbk=1">{tr}Add top level bookmarks to menu{/tr}</a>
{/if}
<br /><br />
diff --git a/templates/users_list.tpl b/templates/users_list.tpl
index b28c4a5..7cf3a00 100644
--- a/templates/users_list.tpl
+++ b/templates/users_list.tpl
@@ -43,9 +43,12 @@
</li>
{/section}
</ul>
-
<div class="clear"></div>
+<p class="total small">
+ {tr}Total number of entries{/tr}: {$usercount}
+</p>
+
{pagination_c numrows=$numrows}
{minifind}
diff --git a/templates/welcome_mail.tpl b/templates/welcome_mail.tpl
new file mode 100644
index 0000000..1fcce20
--- /dev/null
+++ b/templates/welcome_mail.tpl
@@ -0,0 +1,10 @@
+{tr}Hi{/tr} {$mail_user},
+
+{tr}Weclome to {/tr}{$siteName}!
+
+{tr}To login, visit{/tr} http://{$mail_site}{$gBitLoc.USERS_PKG_URL}login.php
+
+{tr}Your login email is{/tr}: {$mailEmail}
+{tr}Your password is{/tr}: {$mailPassword}
+
+{tr}Enjoy the site!{/tr}
diff --git a/validate.php b/validate.php
index fe9b74c..9604d62 100644
--- a/validate.php
+++ b/validate.php
@@ -1,6 +1,6 @@
<?php
/**
- * $Header: /cvsroot/bitweaver/_bit_users/validate.php,v 1.2 2005/06/28 07:46:23 spiderr Exp $
+ * $Header: /cvsroot/bitweaver/_bit_users/validate.php,v 1.3 2005/07/17 17:36:44 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: validate.php,v 1.2 2005/06/28 07:46:23 spiderr Exp $
+ * $Id: validate.php,v 1.3 2005/07/17 17:36:44 squareing Exp $
* @package users
* @subpackage functions
*/
@@ -19,23 +19,6 @@ $bypass_siteclose_check = 'y';
*/
require_once( '../bit_setup_inc.php' );
global $gBitSystem;
-/*
-if (!isset($_REQUEST["login"])) {
- header("location: $HTTP_REFERER");
- die;
-}
-*/
-/* SPIDERKILL - nuked this since it seems to go off at odd times
-// Alert user if cookies are switched off
-if (ini_get('session.use_cookies') == 1) {
-vd( $_COOKIE );
- if(!isset($_COOKIE[BIT_SESSION_NAME])) {
- $url = KERNEL_PKG_URL.'error.php?error=' . urlencode(tra('You have to enable cookies to be able to login to this site'));
- header("location: $url");
- die;
- }
-}
-*/
//Remember where user is logging in from and send them back later; using session variable for those of us who use WebISO services
if( empty( $_SESSION['loginfrom'] ) ) {
@@ -60,7 +43,7 @@ if ($gBitUser->hasPermission( 'bit_p_admin' )) {
$https_mode = isset($_SERVER['HTTPS']) && strtolower($_SERVER['HTTPS']) == 'on';
$https_login_required = $gBitSystem->getPreference('https_login_required', 'n');
-if ($https_login_required == 'y' && !$https_mode) {
+if ($gBitSystem->isFeatureActive( 'https_login_required' ) && !$https_mode) {
$url = 'https://' . $https_domain;
if ($https_port != 443)
$url .= ':' . $https_port;
@@ -76,19 +59,12 @@ $pass = isset($_REQUEST['pass']) ? $_REQUEST['pass'] : false;
$challenge = isset($_REQUEST['challenge']) ? $_REQUEST['challenge'] : false;
$response = isset($_REQUEST['response']) ? $_REQUEST['response'] : false;
+// if $referer is set, login() will return the user to whence he came
$url = $gBitUser->login( $user, $pass, $challenge, $response );
-
-// if $referer is set, we return the user to whence he came
-if( !strpos( $url, 'login.php?' ) ) {
- if( isset( $_REQUEST['referer'] ) ) {
- $url = $_REQUEST['referer'];
- } elseif( !empty( $_SERVER['HTTP_REFERER'] ) ) {
- $url = $_SERVER['HTTP_REFERER'];
- } else {
- $url = BIT_ROOT_URL;
- }
+// but if we came from a login page, let's go home
+if( strpos( $url, 'login.php?' ) || strpos( $url, 'remind_password.php' ) ) {
+ $url = $gBitSystem->getDefaultPage();
}
-
header('location: ' . $url);
exit;
?>