From 2c1987d5b3e5ee4119802630874e0eae39338931 Mon Sep 17 00:00:00 2001 From: Max Kremmel Date: Sun, 30 Apr 2006 17:43:37 +0000 Subject: rename some user settings in liberty_content_prefs --- BitUser.php | 20 +++++++++---------- lookup_user_inc.php | 6 +++--- modules/mod_online_users.tpl | 4 ++-- modules/mod_who_is_there.tpl | 4 ++-- preferences.php | 40 +++++++++++++++++--------------------- templates/register.tpl | 8 ++++---- templates/user_information_inc.tpl | 8 ++++---- templates/user_preferences.tpl | 34 ++++++++++++++++---------------- 8 files changed, 60 insertions(+), 64 deletions(-) diff --git a/BitUser.php b/BitUser.php index 3a0973a..de3d252 100644 --- a/BitUser.php +++ b/BitUser.php @@ -1,6 +1,6 @@ - * @version $Revision: 1.64 $ + * @version $Revision: 1.65 $ * @package users * @subpackage BitUser */ @@ -142,9 +142,9 @@ class BitUser extends LibertyAttachable { unset( $this->mInfo['password'] ); unset( $this->mInfo['hash'] ); $this->loadPreferences(); - if( $this->getPreference( 'country' ) ) { - $this->setPreference( 'flag', $this->getPreference( 'country' ) ); - $this->setPreference( 'country', str_replace( '_', ' ', $this->getPreference( 'country' ) ) ); + if( $this->getPreference( 'users_country' ) ) { + $this->setPreference( 'flag', $this->getPreference( 'users_country' ) ); + $this->setPreference( 'users_country', str_replace( '_', ' ', $this->getPreference( 'users_country' ) ) ); } if( $pFull ) { $this->mInfo['real_name'] = trim($this->mInfo['real_name']); @@ -166,14 +166,14 @@ class BitUser extends LibertyAttachable { function defaults() { global $gBitSystem; - if( !$this->getPreference( 'user_information' ) ) { $this->setPreference( 'user_information', 'public' ); } + if( !$this->getPreference( 'users_information' ) ) { $this->setPreference( 'users_information', 'public' ); } if( !$this->getPreference( 'messages_allow_messages' ) ) { $this->setPreference( 'messages_allow_messages', 'y' ); } if( !$this->getPreference( 'site_display_timezone' ) ) { $server_time = new BitDate(); $this->setPreference( 'site_display_timezone', $server_time->display_offset ); } - if( !$this->getPreference( 'userbreadCrumb' ) ) { - $this->setPreference( 'userbreadCrumb', $gBitSystem->getConfig('userbreadCrumb',4) ); + if( !$this->getPreference( 'users_bread_crumb' ) ) { + $this->setPreference( 'users_bread_crumb', $gBitSystem->getConfig('users_bread_crumb',4) ); } if( !$this->getPreference( 'bitlanguage' ) ) { global $gBitLanguage; @@ -1175,7 +1175,7 @@ echo "userAuthPresent: $userAuthPresent
"; $result = $this->mDb->query($query, array( time() - 3600 ) ); $ret = array(); while ($res = $result->fetchRow()) { - $res['user_information'] = $this->getPreference( 'user_information', 'public', $res['user_id'] ); + $res['users_information'] = $this->getPreference( 'users_information', 'public', $res['user_id'] ); $ret[] = $res; } return $ret; diff --git a/lookup_user_inc.php b/lookup_user_inc.php index c1e6527..4c3e3b6 100644 --- a/lookup_user_inc.php +++ b/lookup_user_inc.php @@ -1,6 +1,6 @@ isAdmin()) { - if( $gQueryUser->getPreference( 'user_information' ) == 'private') { + if( $gQueryUser->getPreference( 'users_information' ) == 'private') { $gBitSystem->fatalError( tra("The user has choosen to make his information private") ); die; } diff --git a/modules/mod_online_users.tpl b/modules/mod_online_users.tpl index fe45163..017d367 100644 --- a/modules/mod_online_users.tpl +++ b/modules/mod_online_users.tpl @@ -1,4 +1,4 @@ -{* $Header: /cvsroot/bitweaver/_bit_users/modules/mod_online_users.tpl,v 1.3 2005/08/24 20:59:13 squareing Exp $ *} +{* $Header: /cvsroot/bitweaver/_bit_users/modules/mod_online_users.tpl,v 1.4 2006/04/30 17:43:37 squareing Exp $ *} {strip} {bitmodule title="$moduleTitle" name="online_users"} {if $logged_users > 1} @@ -8,7 +8,7 @@ {/if}
    {section name=ix loop=$online_users} - {if $online_users[ix].user_information ne 'public'}{assign var=nolink value=1}{else}{assign var=nolink value=0}{/if} + {if $online_users[ix].users_information ne 'public'}{assign var=nolink value=1}{else}{assign var=nolink value=0}{/if}
  1. {displayname hash=$online_users[ix] nolink=$nolink}
  2. {/section}
diff --git a/modules/mod_who_is_there.tpl b/modules/mod_who_is_there.tpl index c47184d..f2f14e1 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.6 2006/04/11 13:10:19 squareing Exp $ *} +{* $Header: /cvsroot/bitweaver/_bit_users/modules/mod_who_is_there.tpl,v 1.7 2006/04/30 17:43:37 squareing Exp $ *} {bitmodule title="$moduleTitle" name="who_is_there"}
{if $logged_users eq 0} @@ -16,7 +16,7 @@ {if $user and $gBitSystem->isFeatureActive( 'feature_messages' ) and $gBitUser->hasPermission( 'p_messages_send' )} {biticon ipackage="users" iname="send_msg_small" iexplain="send message"} {/if} - {if $online_users[ix].user_information eq 'public'} + {if $online_users[ix].users_information eq 'public'} {math equation="x - y" x=$smarty.now y=$online_users[ix].timestamp assign=idle} {$online_users[ix].user}
{else} diff --git a/preferences.php b/preferences.php index a805c22..ec2f878 100644 --- a/preferences.php +++ b/preferences.php @@ -1,6 +1,6 @@ change_user_email($userwatch,$_REQUEST["email"]); if (isset($_REQUEST["real_name"])) $editUser->store( $_REQUEST ); - if (isset($_REQUEST["userbreadCrumb"])) - $editUser->storePreference( 'userbreadCrumb', $_REQUEST["userbreadCrumb"], 'users'); - if (isset($_REQUEST["homePage"])) - $editUser->storePreference( 'homePage', $_REQUEST["homePage"], 'users'); + if (isset($_REQUEST["users_bread_crumb"])) + $editUser->storePreference( 'users_bread_crumb', $_REQUEST["users_bread_crumb"], 'users'); + if (isset($_REQUEST["users_homepage"])) + $editUser->storePreference( 'users_homepage', $_REQUEST["users_homepage"], 'users'); if (isset($users_change_language) && $users_change_language == 'y') { if (isset($_REQUEST["language"])) { $editUser->storePreference( 'bitlanguage', $_REQUEST["language"], 'languages'); @@ -90,14 +90,14 @@ if (isset($_REQUEST["prefs"])) { $editUser->storePreference( 'site_display_timezone', $_REQUEST['site_display_timezone'], 'users'); $gBitSmarty->assign_by_ref('site_display_timezone', $_REQUEST['site_display_timezone'], 'users'); } - $editUser->storePreference( 'country', $_REQUEST["country"], 'users' ); - $editUser->storePreference( 'user_information', $_REQUEST['user_information'], 'users'); - if (isset($_REQUEST['user_dbl']) && $_REQUEST['user_dbl'] == 'on') { - $editUser->storePreference( 'user_dbl', 'y', 'users'); - $gBitSmarty->assign('user_dbl', 'y'); + $editUser->storePreference( 'users_country', $_REQUEST["users_country"], 'users' ); + $editUser->storePreference( 'users_information', $_REQUEST['users_information'], 'users'); + if (isset($_REQUEST['users_double_click']) && $_REQUEST['users_double_click'] == 'on') { + $editUser->storePreference( 'users_double_click', 'y', 'users'); + $gBitSmarty->assign('users_double_click', 'y'); } else { - $editUser->storePreference( 'user_dbl', 'n', 'users'); - $gBitSmarty->assign('user_dbl', 'n'); + $editUser->storePreference( 'users_double_click', 'n', 'users'); + $gBitSmarty->assign('users_double_click', 'n'); } if( isset( $customFields ) && is_array( $customFields ) ) { foreach( $customFields as $f ) { @@ -152,9 +152,9 @@ if (isset($_REQUEST["chgpswd"])) { } } if (isset($_REQUEST['messprefs'])) { - $editUser->storePreference( 'mess_max_records', $_REQUEST['mess_max_records'], 'users' ); - $editUser->storePreference( 'minPrio', $_REQUEST['minPrio'], 'users' ); - $editUser->storePreference( 'message_alert', !empty( $_REQUEST['message_alert'] ) ? 'y' : 'n', 'users' ); + $editUser->storePreference( 'messages_max_records', $_REQUEST['messages_max_records'], 'users' ); + $editUser->storePreference( 'messages_min_priority', $_REQUEST['messages_min_priority'], 'users' ); + $editUser->storePreference( 'messages_alert', !empty( $_REQUEST['messages_alert'] ) ? 'y' : 'n', 'users' ); $editUser->storePreference( 'messages_allow_messages', !empty( $_REQUEST['messages_allow_messages'] ) ? 'y' : 'n', 'users' ); } @@ -186,8 +186,8 @@ closedir ($h); sort ($flags); $gBitSmarty->assign('flags', $flags); -$editUser->mInfo['userbreadCrumb'] = $editUser->getPreference( 'userbreadCrumb', $gBitSystem->getConfig('userbreadCrumb', 4) ); -$editUser->mInfo['homePage'] = $editUser->getPreference( 'homePage', ''); +$editUser->mInfo['users_bread_crumb'] = $editUser->getPreference( 'users_bread_crumb', $gBitSystem->getConfig('users_bread_crumb', 4) ); +$editUser->mInfo['users_homepage'] = $editUser->getPreference( 'users_homepage', ''); $gBitSmarty->assign( 'editUser', $editUser->mInfo ); @@ -200,10 +200,6 @@ $scramblingMethods = array("n", "strtr", "unicode", "x"); // email_isPublic util $gBitSmarty->assign_by_ref('scramblingMethods', $scramblingMethods); $scramblingEmails = array(tra("no"), scrambleEmail($editUser->mInfo['email'], 'strtr'), scrambleEmail($editUser->mInfo['email'], 'unicode')."-".tra("unicode"), scrambleEmail($editUser->mInfo['email'], 'x')); $gBitSmarty->assign_by_ref('scramblingEmails', $scramblingEmails); -$user_information = $editUser->getPreference( 'user_information', 'public'); -$gBitSmarty->assign('user_information', $user_information); -$user_dbl = $editUser->getPreference( 'user_dbl', 'y'); -$gBitSmarty->assign('user_dbl', $user_dbl); //$timezone_options = $gBitSystem->get_timezone_list(true); //$gBitSmarty->assign_by_ref('timezone_options',$timezone_options); //$server_time = new Date(); diff --git a/templates/register.tpl b/templates/register.tpl index d5bf7bc..1cfe5ba 100644 --- a/templates/register.tpl +++ b/templates/register.tpl @@ -97,9 +97,9 @@ {legend legend="Optional Details"} {if $gBitSystem->isFeatureActive( 'reg_homepage' )}
- {formlabel label="HomePage" for="homePage"} + {formlabel label="HomePage" for="users_homepage"} {forminput} - + {formhelp note="If you have a personal or professional homepage, enter it here."} {/forminput}
@@ -109,11 +109,11 @@
{formlabel label="Country" for="country"} {forminput} - + {/section} {/sortlinks} diff --git a/templates/user_information_inc.tpl b/templates/user_information_inc.tpl index 8a5e0c4..aac5e11 100644 --- a/templates/user_information_inc.tpl +++ b/templates/user_information_inc.tpl @@ -1,6 +1,6 @@ -{* $Header: /cvsroot/bitweaver/_bit_users/templates/user_information_inc.tpl,v 1.12 2006/04/19 15:26:09 spiderr Exp $ *} +{* $Header: /cvsroot/bitweaver/_bit_users/templates/user_information_inc.tpl,v 1.13 2006/04/30 17:43:37 squareing Exp $ *} {strip} -{if $userData->getPreference('user_information') eq 'public' or $gBitUser->mUserId eq $userData->mUserId} +{if $userData->getPreference('users_information') eq 'public' or $gBitUser->mUserId eq $userData->mUserId}
{formlabel label="Login"} {forminput} @@ -19,11 +19,11 @@ {/forminput}
- {if $userData->getPreference('country')} + {if $userData->getPreference('users_country')}
{formlabel label="Country"} {forminput} - {biticon ipackage="users" ipath="flags/" iname=$userData->getPreference('flag') iexplain=$userData->getPreference('flag')} {$userData->getPreference('country')} + {biticon ipackage="users" ipath="flags/" iname=$userData->getPreference('flag') iexplain=$userData->getPreference('flag')} {$userData->getPreference('users_country')} {/forminput}
diff --git a/templates/user_preferences.tpl b/templates/user_preferences.tpl index 58af199..6b61a92 100644 --- a/templates/user_preferences.tpl +++ b/templates/user_preferences.tpl @@ -59,7 +59,7 @@ {formlabel label="Country" for="country"} {forminput} {if $userPrefs.flag}{biticon iforce=icon ipackage="users" ipath="flags/" iname="`$userPrefs.flag`" iexplain="`$userPrefs.flag`"}{/if} -
- {formlabel label="Use double-click to edit pages" for="user_dbl"} + {formlabel label="Use double-click to edit pages" for="users_double_click"} {forminput} - + {formhelp note="Enabling this feature will allow you to double click on any wiki page and it will automatically take you to the edit page. Note that this does not work in all browsers."} {/forminput}
-- cgit v1.3