# HG changeset patch # User Dan # Date 1194050246 14400 # Node ID e5302cb1945cb52ab422eb2164604c34f73079b0 # Parent d44492e34ab3c505d39f888467427083d6ae3ef7 Localized a good part, if not all, of the registration page and a couple other things. diff -r d44492e34ab3 -r e5302cb1945c includes/clientside/static/ajax.js --- a/includes/clientside/static/ajax.js Mon Oct 29 23:54:48 2007 -0400 +++ b/includes/clientside/static/ajax.js Fri Nov 02 20:37:26 2007 -0400 @@ -200,6 +200,9 @@ // IE <6 pseudo-compatibility if ( KILL_SWITCH ) return true; + var ns_id = strToPageID(title); + if ( ns_id[1] == 'Special' || ns_id[1] == 'Admin' ) + return false; enableUnload(); setAjaxLoading(); ajaxGet(stdAjaxPrefix+'&_mode=getpage&noheaders', function() { diff -r d44492e34ab3 -r e5302cb1945c includes/functions.php --- a/includes/functions.php Mon Oct 29 23:54:48 2007 -0400 +++ b/includes/functions.php Fri Nov 02 20:37:26 2007 -0400 @@ -432,7 +432,9 @@ $str = '0x'; foreach($nums as $n) { - $str .= (string)dechex($n); + $byte = (string)dechex($n); + if ( strlen($byte) < 2 ) + $byte = '0' . $byte; } return $str; } diff -r d44492e34ab3 -r e5302cb1945c includes/sessions.php --- a/includes/sessions.php Mon Oct 29 23:54:48 2007 -0400 +++ b/includes/sessions.php Fri Nov 02 20:37:26 2007 -0400 @@ -1324,7 +1324,10 @@ if($level > USER_LEVEL_CHPREF) { $aes = new AESCrypt(AES_BITS, AES_BLOCKSIZE); - if(!$this->user_logged_in || $this->auth_level < USER_LEVEL_MOD) return 'success'; + if(!$this->user_logged_in || $this->auth_level < USER_LEVEL_MOD) + { + return 'success'; + } // Destroy elevated privileges $keyhash = md5(strrev($this->sid_super)); $this->sql('DELETE FROM '.table_prefix.'session_keys WHERE session_key=\''.$keyhash.'\' AND user_id=\'' . $this->user_id . '\';'); diff -r d44492e34ab3 -r e5302cb1945c language/english/enano.json --- a/language/english/enano.json Mon Oct 29 23:54:48 2007 -0400 +++ b/language/english/enano.json Fri Nov 02 20:37:26 2007 -0400 @@ -38,7 +38,14 @@ sidebar: 'Default sidebar blocks and buttons', acl: 'Access control list editor', perm: 'Page actions (for ACLs)', - plural: 's' + plural: 's', + enano_about_poweredby: '
This website is powered by Enano, the lightweight and open source CMS that everyone can use. Enano is copyright © 2006-2007 Dan Fuhry. For legal information, along with a list of libraries that Enano uses, please see Legal Information.
The developers and maintainers of Enano strongly believe that software should not only be free to use, but free to be modified, distributed, and used to create derivative works. For more information about Free Software, check out the Wikipedia page or the Free Software Foundation\'s homepage.
', + enano_about_gpl: 'This program is Free Software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for details.
You should have received a copy of the GNU General Public License along with this program; if not, write to:
Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor
Boston, MA 02110-1301, USA
Alternatively, you can read it online.
', + enano_about_lbl_enanoversion: 'Enano version:', + enano_about_lbl_webserver: 'Web server:', + enano_about_lbl_serverplatform: 'Server platform:', + enano_about_lbl_phpversion: 'PHP version:', + enano_about_lbl_mysqlversion: 'MySQL version:', }, user: { login_message_short: 'Please enter your username and password to log in.', @@ -58,6 +65,7 @@ login_usecrypt_countrylist: 'The cryptography restriction applies to the following countries: Belarus, China, India, Israel, Kazakhstan, Mongolia, Pakistan, Russia, Saudi Arabia, Singapore, Tunisia, Venezuela, and Vietnam.', login_success_title: 'Login successful', login_success_body: 'You have successfully logged into the %config.site_name% site as "%username%". Redirecting to %redir_target%...', + login_success_body_mainpage: 'the main page', login_ajax_fetching_key: 'Fetching an encryption key...', login_ajax_prompt_title: 'Please enter your username and password to continue.', @@ -83,6 +91,9 @@ logout_confirm_body: 'If you log out, you will no longer be able to access your user preferences, your private messages, or certain areas of this site until you log in again.', logout_confirm_title_elev: 'Are you sure you want to de-authenticate?', logout_confirm_body_elev: 'If you de-authenticate, you will no longer be able to use the administration panel until you re-authenticate again. You may do so at any time using the Administration button on the sidebar.', + logout_err_title: 'An error occurred during the logout process.', + // Unused at this point + logout_err_not_loggedin: 'You don\'t seem to be logged in.', keepalive_info_title: 'About the keep-alive feature', keepalive_info_body: 'Keep-alive is a new Enano feature that keeps your administrative session from timing out while you are using the administration panel. This feature can be useful if you are editing a large page or doing something in the administration interface that will take longer than 15 minutes.About the Enano Content Management System | |
---|---|
This website is powered by Enano, the lightweight and open source - CMS that everyone can use. Enano is copyright © 2006-2007 Dan Fuhry. For legal information, along with a list of libraries that Enano - uses, please see Legal Information. -The developers and maintainers of Enano strongly believe that software should not only be free to use, but free to be modified, - distributed, and used to create derivative works. For more information about Free Software, check out the - Wikipedia page or - the Free Software Foundation's homepage. -This program is Free Software; you can redistribute it and/or modify it under the terms of the GNU General Public License - as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. -This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied - warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for details. -You should have received a copy of - the GNU General Public License along with this program; if not, write to: -Free Software Foundation, Inc., Alternatively, you can read it online. + | |
+ get('meta_enano_about_poweredby');
+ $subst = array(
+ 'gpl_link' => makeUrlNS('Special', 'GNU_General_Public_License')
+ );
+ echo $lang->get('meta_enano_about_gpl', $subst);
+ if ( $lang->lang_code != 'eng' ):
+ // Do not remove this block of code. Doing so is a violation of the GPL. (A copy of the GPL in other languages
+ // must be accompanied by a copy of the English GPL.)
+ ?>
+ (English)++ This website is powered by Enano, the lightweight and open source CMS that everyone can use. + Enano is copyright © 2006-2007 Dan Fuhry. For legal information, along with a list of libraries that Enano uses, please + see Legal Information. + ++ The developers and maintainers of Enano strongly believe that software should not only be free to use, but free to be modified, + distributed, and used to create derivative works. For more information about Free Software, check out the + Wikipedia page or + the Free Software Foundation's homepage. + ++ This program is Free Software; you can redistribute it and/or modify it under the terms of the GNU General Public License + as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. + ++ This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied + warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for details. + ++ You should have received a copy of + the GNU General Public License along with this program; if not, write to: + +
+ Free Software Foundation, Inc., + Alternatively, you can read it online. + + | |
@@ -417,11 +448,11 @@ |
'.$l.'
'; + echo '' . $l . '
'; $template->footer(); } function page_Special_Register() { global $db, $session, $paths, $template, $plugins; // Common objects + global $lang; // form field trackers $username = ''; @@ -484,8 +490,8 @@ if(getConfig('account_activation') == 'disable' && ( ( $session->user_level >= USER_LEVEL_ADMIN && !isset($_GET['IWannaPlayToo']) ) || $session->user_level < USER_LEVEL_ADMIN || !$session->user_logged_in )) { - $s = ($session->user_level >= USER_LEVEL_ADMIN) ? 'Oops...it seems that you are the administrator...hehe...you can also force account registration to work.
' : ''; - die_friendly('Registration disabled', 'The administrator has disabled new user registration on this site.
' . $s); + $s = ($session->user_level >= USER_LEVEL_ADMIN) ? '' . $lang->get('user_reg_err_disabled_body_adminblurb', array( 'reg_link' => makeUrl($paths->page, 'IWannaPlayToo&coppa=no', true) )) . '
' : ''; + die_friendly($lang->get('user_reg_err_disabled_title'), '' . $lang->get('user_reg_err_disabled_body') . '
' . $s); } if ( $session->user_level < USER_LEVEL_ADMIN && $session->user_logged_in ) { @@ -498,7 +504,7 @@ $captcharesult = $session->get_captcha($_POST['captchahash']); if($captcharesult != $_POST['captchacode']) { - $s = 'The confirmation code you entered was incorrect.'; + $s = $lang->get('user_reg_err_captcha'); } else { @@ -522,7 +528,7 @@ $crypt_key = $session->fetch_public_key($_POST['crypt_key']); if ( !$crypt_key ) { - $s = 'Couldn\'t look up public encryption key'; + $s = $lang->get('user_reg_err_missing_key'); } else { @@ -549,28 +555,28 @@ { case "none": default: - $str = 'You may now log in with the username and password that you created.'; + $str = $lang->get('user_reg_msg_success_activ_none', array('login_link' => makeUrlNS('Special', 'Login', false, true))); break; case "user": - $str = 'Because this site requires account activation, you have been sent an e-mail with further instructions. Please follow the instructions in that e-mail to continue your registration.'; + $str = $lang->get('user_reg_msg_success_activ_user'); break; case "admin": - $str = 'Because this site requires administrative account activation, you cannot use your account at the moment. A notice has been sent to the site administration team that will alert them that your account has been created.'; + $str = $lang->get('user_reg_msg_success_activ_admin'); break; } - die_friendly('Registration successful', 'Thank you for registering, your user account has been created. '.$str.'
'); + die_friendly($lang->get('user_reg_msg_success_title'), '' . $lang->get('user_reg_msg_success_body') . ' ' . $str . '
'); } else if ( $s == 'success' && $coppa ) { - $str = 'However, in compliance with the Childrens\' Online Privacy Protection Act, you must have your parent or legal guardian activate your account. Please ask them to check their e-mail for further information.'; - die_friendly('Registration successful', 'Thank you for registering, your user account has been created. '.$str.'
'); + $str = $lang->get('user_reg_msg_success_activ_coppa'); + die_friendly($lang->get('user_reg_msg_success_title'), '' . $lang->get('user_reg_msg_success_body') . ' ' . $str . '
'); } $username = htmlspecialchars($_POST['username']); $email = htmlspecialchars($_POST['email']); $realname = htmlspecialchars($_POST['real_name']); } $template->header(); - echo 'A user account enables you to have greater control over your browsing experience.'; + echo $lang->get('user_reg_msg_greatercontrol'); if ( getConfig('enable_coppa') != '1' || ( isset($_GET['coppa']) && in_array($_GET['coppa'], array('yes', 'no')) ) ) { @@ -582,22 +588,22 @@ $challenge = $session->dss_rand(); ?> -