Created
March 1, 2014 23:09
-
-
Save Elsensee/9299023 to your computer and use it in GitHub Desktop.
Proposed patch for ticket 9873
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* | |
* ucp [English] | |
* | |
* @package language | |
* @version $Id$ | |
* @copyright (c) 2005 phpBB Group | |
* @license http://opensource.org/licenses/gpl-license.php GNU Public License | |
* | |
*/ | |
/** | |
* DO NOT CHANGE | |
*/ | |
if (!defined('IN_PHPBB')) | |
{ | |
exit; | |
} | |
if (empty($lang) || !is_array($lang)) | |
{ | |
$lang = array(); | |
} | |
// DEVELOPERS PLEASE NOTE | |
// | |
// All language files should use UTF-8 as their encoding and the files must not contain a BOM. | |
// | |
// Placeholders can now contain order information, e.g. instead of | |
// 'Page %s of %s' you can (and should) write 'Page %1$s of %2$s', this allows | |
// translators to re-order the output of data while ensuring it remains correct | |
// | |
// You do not need this where single placeholders are used, e.g. 'Message %d' is fine | |
// equally where a string contains only two placeholders which are used to wrap text | |
// in a url you again do not need to specify an order e.g., 'Click %sHERE%s' is fine | |
// Privacy policy and T&C | |
$lang = array_merge($lang, array( | |
'TERMS_OF_USE_CONTENT' => 'By accessing “%1$s” (hereinafter “we”, “us”, “our”, “%1$s”, “%2$s”), you agree to be legally bound by the following terms. If you do not agree to be legally bound by all of the following terms then please do not access and/or use “%1$s”. We may change these at any time and we’ll do our utmost in informing you, though it would be prudent to review this regularly yourself as your continued usage of “%1$s” after changes mean you agree to be legally bound by these terms as they are updated and/or amended.<br /> | |
<br /> | |
Our forums are powered by phpBB (hereinafter “they”, “them”, “their”, “phpBB software”, “www.phpbb.com”, “phpBB Group”, “phpBB Teams”) which is a bulletin board solution released under the “<a href="http://opensource.org/licenses/gpl-license.php">General Public License</a>” (hereinafter “GPL”) and can be downloaded from <a href="https://www.phpbb.com/">www.phpbb.com</a>. The phpBB software only facilitates internet based discussions, the phpBB Group are not responsible for what we allow and/or disallow as permissible content and/or conduct. For further information about phpBB, please see: <a href="https://www.phpbb.com/">https://www.phpbb.com/</a>.<br /> | |
<br /> | |
You agree not to post any abusive, obscene, vulgar, slanderous, hateful, threatening, sexually-orientated or any other material that may violate any laws be it of your country, the country where “%1$s” is hosted or International Law. Doing so may lead to you being immediately and permanently banned, with notification of your Internet Service Provider if deemed required by us. The IP address of all posts are recorded to aid in enforcing these conditions. You agree that “%1$s” have the right to remove, edit, move or close any topic at any time should we see fit. As a user you agree to any information you have entered to being stored in a database. While this information will not be disclosed to any third party without your consent, neither “%1$s” nor phpBB shall be held responsible for any hacking attempt that may lead to the data being compromised. | |
', | |
'PRIVACY_POLICY' => 'This policy explains in detail how “%1$s” along with its affiliated companies (hereinafter “we”, “us”, “our”, “%1$s”, “%2$s”) and phpBB (hereinafter “they”, “them”, “their”, “phpBB software”, “www.phpbb.com”, “phpBB Group”, “phpBB Teams”) use any information collected during any session of usage by you (hereinafter “your information”).<br /> | |
<br /> | |
Your information is collected via two ways. Firstly, by browsing “%1$s” will cause the phpBB software to create a number of cookies, which are small text files that are downloaded on to your computer’s web browser temporary files. The first two cookies just contain a user identifier (hereinafter “user-id”) and an anonymous session identifier (hereinafter “session-id”), automatically assigned to you by the phpBB software. A third cookie will be created once you have browsed topics within “%1$s” and is used to store which topics have been read, thereby improving your user experience.<br /> | |
<br /> | |
We may also create cookies external to the phpBB software whilst browsing “%1$s”, though these are outside the scope of this document which is intended to only cover the pages created by the phpBB software. The second way in which we collect your information is by what you submit to us. This can be, and is not limited to: posting as an anonymous user (hereinafter “anonymous posts”), registering on “%1$s” (hereinafter “your account”) and posts submitted by you after registration and whilst logged in (hereinafter “your posts”).<br /> | |
<br /> | |
Your account will at a bare minimum contain a uniquely identifiable name (hereinafter “your user name”), a personal password used for logging into your account (hereinafter “your password”) and a personal, valid e-mail address (hereinafter “your e-mail”). Your information for your account at “%1$s” is protected by data-protection laws applicable in the country that hosts us. Any information beyond your user name, your password, and your e-mail address required by “%1$s” during the registration process is either mandatory or optional, at the discretion of “%1$s”. In all cases, you have the option of what information in your account is publicly displayed. Furthermore, within your account, you have the option to opt-in or opt-out of automatically generated e-mails from the phpBB software.<br /> | |
<br /> | |
Your password is ciphered (a one-way hash) so that it is secure. However, it is recommended that you do not reuse the same password across a number of different websites. Your password is the means of accessing your account at “%1$s”, so please guard it carefully and under no circumstance will anyone affiliated with “%1$s”, phpBB or another 3rd party, legitimately ask you for your password. Should you forget your password for your account, you can use the “I forgot my password” feature provided by the phpBB software. This process will ask you to submit your user name and your e-mail, then the phpBB software will generate a new password to reclaim your account.<br /> | |
', | |
)); | |
// Common language entries | |
$lang = array_merge($lang, array( | |
'ACCOUNT_ACTIVE' => 'Your account has now been activated. Thank you for registering.', | |
'ACCOUNT_ACTIVE_ADMIN' => 'The account has now been activated.', | |
'ACCOUNT_ACTIVE_PROFILE' => 'Your account has now been successfully reactivated.', | |
'ACCOUNT_ADDED' => 'Thank you for registering, your account has been created. You may now login with your username and password.', | |
'ACCOUNT_COPPA' => 'Your account has been created but has to be approved, please check your e-mail for details.', | |
'ACCOUNT_EMAIL_CHANGED' => 'Your account has been updated. However, this board requires account reactivation on e-mail changes. An activation key has been sent to the new e-mail address you provided. Please check your e-mail for further information.', | |
'ACCOUNT_EMAIL_CHANGED_ADMIN' => 'Your account has been updated. However, this board requires account reactivation by the administrators on e-mail changes. An e-mail has been sent to them and you will be informed when your account has been reactivated.', | |
'ACCOUNT_INACTIVE' => 'Your account has been created. However, this board requires account activation, an activation key has been sent to the e-mail address you provided. Please check your e-mail for further information.', | |
'ACCOUNT_INACTIVE_ADMIN' => 'Your account has been created. However, this board requires account activation by the administrator group. An e-mail has been sent to them and you will be informed when your account has been activated.', | |
'ACTIVATION_EMAIL_SENT' => 'The activation e-mail has been sent to your e-mail address.', | |
'ACTIVATION_EMAIL_SENT_ADMIN' => 'The activation e-mail has been sent to the administrators e-mail addresses.', | |
'ADD' => 'Add', | |
'ADD_BCC' => 'Add [BCC]', | |
'ADD_FOES' => 'Add new foes', | |
'ADD_FOES_EXPLAIN' => 'You may enter several usernames each on a different line.', | |
'ADD_FOLDER' => 'Add folder', | |
'ADD_FRIENDS' => 'Add new friends', | |
'ADD_FRIENDS_EXPLAIN' => 'You may enter several usernames each on a different line.', | |
'ADD_NEW_RULE' => 'Add new rule', | |
'ADD_RULE' => 'Add rule', | |
'ADD_TO' => 'Add [To]', | |
'ADD_USERS_UCP_EXPLAIN' => 'Here you can add new users to the group. You may select whether this group becomes the new default for the selected users. Please enter each username on a separate line.', | |
'ADMIN_EMAIL' => 'Administrators can e-mail me information', | |
'AGREE' => 'I agree to these terms', | |
'ALLOW_PM' => 'Allow users to send you private messages', | |
'ALLOW_PM_EXPLAIN' => 'Note that administrators and moderators will always be able to send you messages.', | |
'ALREADY_ACTIVATED' => 'You have already activated your account.', | |
'ATTACHMENTS_EXPLAIN' => 'This is a list of attachments you have made in posts to this board.', | |
'ATTACHMENTS_DELETED' => 'Attachments successfully deleted.', | |
'ATTACHMENT_DELETED' => 'Attachment successfully deleted.', | |
'AVATAR_CATEGORY' => 'Category', | |
'AVATAR_EXPLAIN' => 'Maximum dimensions; width: %1$d pixels, height: %2$d pixels, file size: %3$.2f KiB.', | |
'AVATAR_FEATURES_DISABLED' => 'The avatar functionality is currently disabled.', | |
'AVATAR_GALLERY' => 'Local gallery', | |
'AVATAR_GENERAL_UPLOAD_ERROR' => 'Could not upload avatar to %s.', | |
'AVATAR_NOT_ALLOWED' => 'Your avatar cannot be displayed because avatars have been disallowed.', | |
'AVATAR_PAGE' => 'Page', | |
'AVATAR_TYPE_NOT_ALLOWED' => 'Your current avatar cannot be displayed because its type has been disallowed.', | |
'BACK_TO_DRAFTS' => 'Back to saved drafts', | |
'BACK_TO_LOGIN' => 'Back to login screen', | |
'BIRTHDAY' => 'Birthday', | |
'BIRTHDAY_EXPLAIN' => 'Setting a year will list your age when it is your birthday.', | |
'BOARD_DATE_FORMAT' => 'My date format', | |
'BOARD_DATE_FORMAT_EXPLAIN' => 'The syntax used is identical to the PHP <a href="http://www.php.net/date">date()</a> function.', | |
'BOARD_DST' => 'Summer Time/<abbr title="Daylight Saving Time">DST</abbr> is in effect', | |
'BOARD_LANGUAGE' => 'My language', | |
'BOARD_STYLE' => 'My board style', | |
'BOARD_TIMEZONE' => 'My timezone', | |
'BOOKMARKS' => 'Bookmarks', | |
'BOOKMARKS_EXPLAIN' => 'You can bookmark topics for future reference. Select the checkbox for any bookmark you wish to delete, then press the <em>Remove marked bookmarks</em> button.', | |
'BOOKMARKS_DISABLED' => 'Bookmarks are disabled on this board.', | |
'BOOKMARKS_REMOVED' => 'Bookmarks removed successfully.', | |
'CANNOT_EDIT_MESSAGE_TIME' => 'You can no longer edit or delete that message.', | |
'CANNOT_MOVE_TO_SAME_FOLDER'=> 'Messages cannot be moved to the folder you want to remove.', | |
'CANNOT_MOVE_FROM_SPECIAL' => 'Messages cannot be moved from the outbox.', | |
'CANNOT_RENAME_FOLDER' => 'This folder cannot be renamed.', | |
'CANNOT_REMOVE_FOLDER' => 'This folder cannot be removed.', | |
'CHANGE_DEFAULT_GROUP' => 'Change default group', | |
'CHANGE_PASSWORD' => 'Change password', | |
'CLICK_GOTO_FOLDER' => '%1$sGo to your “%3$s” folder%2$s', | |
'CLICK_RETURN_FOLDER' => '%1$sReturn to your “%3$s” folder%2$s', | |
'CONFIRMATION' => 'Confirmation of registration', | |
'CONFIRM_CHANGES' => 'Confirm changes', | |
'CONFIRM_EMAIL' => 'Confirm e-mail address', | |
'CONFIRM_EMAIL_EXPLAIN' => 'You only need to specify this if you are changing your e-mail address.', | |
'CONFIRM_EXPLAIN' => 'To prevent automated registrations the board requires you to enter a confirmation code. The code is displayed in the image you should see below. If you are visually impaired or cannot otherwise read this code please contact the %sBoard Administrator%s.', | |
'VC_REFRESH' => 'Refresh confirmation code', | |
'VC_REFRESH_EXPLAIN' => 'If you cannot read the code you can request a new one by clicking the button.', | |
'CONFIRM_PASSWORD' => 'Confirm password', | |
'CONFIRM_PASSWORD_EXPLAIN' => 'You only need to confirm your password if you changed it above.', | |
/////////////////////////////////////////////////////////////////////////////////////// | |
'CONTACT_VIA_FORM' => 'Users can contact me via board’s e-mail form', | |
//////////////////////////////////////////////////////////////////////////////////////// | |
'COPPA_BIRTHDAY' => 'To continue with the registration procedure please tell us when you were born.', | |
'COPPA_COMPLIANCE' => 'COPPA compliance', | |
'COPPA_EXPLAIN' => 'Please note that clicking submit will create your account. However it cannot be activated until a parent or guardian approves your registration. You will be emailed a copy of the necessary form with details of where to send it.', | |
'CREATE_FOLDER' => 'Add folder…', | |
'CURRENT_IMAGE' => 'Current image', | |
'CURRENT_PASSWORD' => 'Current password', | |
'CURRENT_PASSWORD_EXPLAIN' => 'You must enter your current password if you wish to alter your email address or username.', | |
'CURRENT_CHANGE_PASSWORD_EXPLAIN' => 'To change your password, your email address, or your username, you must enter your current password.', | |
'CUR_PASSWORD_EMPTY' => 'You did not enter your current password.', | |
'CUR_PASSWORD_ERROR' => 'The current password you entered is incorrect.', | |
'CUSTOM_DATEFORMAT' => 'Custom…', | |
'DEFAULT_ACTION' => 'Default action', | |
'DEFAULT_ACTION_EXPLAIN' => 'This action will be triggered if none of the above is applicable.', | |
'DEFAULT_ADD_SIG' => 'Attach my signature by default', | |
'DEFAULT_BBCODE' => 'Enable BBCode by default', | |
'DEFAULT_NOTIFY' => 'Notify me upon replies by default', | |
'DEFAULT_SMILIES' => 'Enable smilies by default', | |
'DEFINED_RULES' => 'Defined rules', | |
'DELETED_TOPIC' => 'Topic has been removed.', | |
'DELETE_ATTACHMENT' => 'Delete attachment', | |
'DELETE_ATTACHMENTS' => 'Delete attachments', | |
'DELETE_ATTACHMENT_CONFIRM' => 'Are you sure you want to delete this attachment?', | |
'DELETE_ATTACHMENTS_CONFIRM'=> 'Are you sure you want to delete these attachments?', | |
'DELETE_AVATAR' => 'Delete image', | |
'DELETE_COOKIES_CONFIRM' => 'Are you sure you want to delete all cookies set by this board?', | |
'DELETE_MARKED_PM' => 'Delete marked messages', | |
'DELETE_MARKED_PM_CONFIRM' => 'Are you sure you want to delete all marked messages?', | |
'DELETE_OLDEST_MESSAGES' => 'Delete oldest messages', | |
'DELETE_MESSAGE' => 'Delete message', | |
'DELETE_MESSAGE_CONFIRM' => 'Are you sure you want to delete this private message?', | |
'DELETE_MESSAGES_IN_FOLDER' => 'Delete all messages within removed folder', | |
'DELETE_RULE' => 'Delete rule', | |
'DELETE_RULE_CONFIRM' => 'Are you sure you want to delete this rule?', | |
'DEMOTE_SELECTED' => 'Demote selected', | |
'DISABLE_CENSORS' => 'Enable word censoring', | |
'DISPLAY_GALLERY' => 'Display gallery', | |
'DOMAIN_NO_MX_RECORD_EMAIL' => 'The entered e-mail domain has no valid MX record.', | |
'DOWNLOADS' => 'Downloads', | |
'DRAFTS_DELETED' => 'All selected drafts were successfully deleted.', | |
'DRAFTS_EXPLAIN' => 'Here you can view, edit and delete your saved drafts.', | |
'DRAFT_UPDATED' => 'Draft successfully updated.', | |
'EDIT_DRAFT_EXPLAIN' => 'Here you are able to edit your draft. Drafts do not contain attachment and poll information.', | |
'EMAIL_BANNED_EMAIL' => 'The e-mail address you entered is not allowed to be used.', | |
'EMAIL_REMIND' => 'This must be the e-mail address associated with your account. If you have not changed this via your user control panel then it is the e-mail address you registered your account with.', | |
'EMAIL_TAKEN_EMAIL' => 'The entered e-mail address is already in use.', | |
'EMPTY_DRAFT' => 'You must enter a message to submit your changes.', | |
'EMPTY_DRAFT_TITLE' => 'You must enter a draft title.', | |
'EXPORT_AS_XML' => 'Export as XML', | |
'EXPORT_AS_CSV' => 'Export as CSV', | |
'EXPORT_AS_CSV_EXCEL' => 'Export as CSV (Excel)', | |
'EXPORT_AS_TXT' => 'Export as TXT', | |
'EXPORT_AS_MSG' => 'Export as MSG', | |
'EXPORT_FOLDER' => 'Export this view', | |
'FIELD_REQUIRED' => 'The field “%s” must be completed.', | |
'FIELD_TOO_SHORT' => 'The field “%1$s” is too short, a minimum of %2$d characters is required.', | |
'FIELD_TOO_LONG' => 'The field “%1$s” is too long, a maximum of %2$d characters is allowed.', | |
'FIELD_TOO_SMALL' => 'The value of “%1$s” is too small, a minimum value of %2$d is required.', | |
'FIELD_TOO_LARGE' => 'The value of “%1$s” is too large, a maximum value of %2$d is allowed.', | |
'FIELD_INVALID_CHARS_NUMBERS_ONLY' => 'The field “%s” has invalid characters, only numbers are allowed.', | |
'FIELD_INVALID_CHARS_ALPHA_ONLY' => 'The field “%s” has invalid characters, only alphanumeric characters are allowed.', | |
'FIELD_INVALID_CHARS_SPACERS_ONLY' => 'The field “%s” has invalid characters, only alphanumeric, space or -+_[] characters are allowed.', | |
'FIELD_INVALID_DATE' => 'The field “%s” has an invalid date.', | |
'FIELD_INVALID_VALUE' => 'The field “%s” has an invalid value.', | |
'FOE_MESSAGE' => 'Message from foe', | |
'FOES_EXPLAIN' => 'Foes are users which will be ignored by default. Posts by these users will not be fully visible. Personal messages from foes are still permitted. Please note that you cannot ignore moderators or administrators.', | |
'FOES_UPDATED' => 'Your foes list has been updated successfully.', | |
'FOLDER_ADDED' => 'Folder successfully added.', | |
'FOLDER_MESSAGE_STATUS' => '%1$d from %2$d messages stored', | |
'FOLDER_NAME_EMPTY' => 'You must enter a name for this folder.', | |
'FOLDER_NAME_EXIST' => 'Folder <strong>%s</strong> already exists.', | |
'FOLDER_OPTIONS' => 'Folder options', | |
'FOLDER_RENAMED' => 'Folder successfully renamed.', | |
'FOLDER_REMOVED' => 'Folder successfully removed.', | |
'FOLDER_STATUS_MSG' => 'Folder is %1$d%% full (%2$d from %3$d messages stored)', | |
'FORWARD_PM' => 'Forward PM', | |
'FORCE_PASSWORD_EXPLAIN' => 'Before you may continue browsing the board you are required to change your password.', | |
'FRIEND_MESSAGE' => 'Message from friend', | |
'FRIENDS' => 'Friends', | |
'FRIENDS_EXPLAIN' => 'Friends enable you quick access to members you communicate with frequently. If the template has relevant support any posts made by a friend may be highlighted.', | |
'FRIENDS_OFFLINE' => 'Offline', | |
'FRIENDS_ONLINE' => 'Online', | |
'FRIENDS_UPDATED' => 'Your friends list has been updated successfully.', | |
'FULL_FOLDER_OPTION_CHANGED'=> 'The action to take when a folder is full has been changed successfully.', | |
'FWD_ORIGINAL_MESSAGE' => '-------- Original Message --------', | |
'FWD_SUBJECT' => 'Subject: %s', | |
'FWD_DATE' => 'Date: %s', | |
'FWD_FROM' => 'From: %s', | |
'FWD_TO' => 'To: %s', | |
'GLOBAL_ANNOUNCEMENT' => 'Global announcement', | |
'HIDE_ONLINE' => 'Hide my online status', | |
'HIDE_ONLINE_EXPLAIN' => 'Changing this setting won’t become effective until your next visit to the board.', | |
'HOLD_NEW_MESSAGES' => 'Do not accept new messages (New messages will be held back until enough space is available)', | |
'HOLD_NEW_MESSAGES_SHORT' => 'New messages will be held back', | |
'IF_FOLDER_FULL' => 'If folder is full', | |
'IMPORTANT_NEWS' => 'Important announcements', | |
'INVALID_USER_BIRTHDAY' => 'The entered birthday is not a valid date.', | |
'INVALID_CHARS_USERNAME' => 'The username contains forbidden characters.', | |
'INVALID_CHARS_NEW_PASSWORD'=> 'The password does not contain the required characters.', | |
'ITEMS_REQUIRED' => 'The items marked with * are required profile fields and need to be filled out.', | |
'JOIN_SELECTED' => 'Join selected', | |
'LANGUAGE' => 'Language', | |
'LINK_REMOTE_AVATAR' => 'Link off-site', | |
'LINK_REMOTE_AVATAR_EXPLAIN'=> 'Enter the URL of the location containing the avatar image you wish to link to.', | |
'LINK_REMOTE_SIZE' => 'Avatar dimensions', | |
'LINK_REMOTE_SIZE_EXPLAIN' => 'Specify the width and height of the avatar, leave blank to attempt automatic verification.', | |
'LOGIN_EXPLAIN_UCP' => 'Please login in order to access the User Control Panel.', | |
'LOGIN_REDIRECT' => 'You have been successfully logged in.', | |
'LOGOUT_FAILED' => 'You were not logged out, as the request did not match your session. Please contact the board administrator if you continue to experience problems.', | |
'LOGOUT_REDIRECT' => 'You have been successfully logged out.', | |
'MARK_IMPORTANT' => 'Mark/Unmark as important', | |
'MARKED_MESSAGE' => 'Marked message', | |
'MAX_FOLDER_REACHED' => 'Maximum number of allowed user defined folders reached.', | |
'MESSAGE_BY_AUTHOR' => 'by', | |
'MESSAGE_COLOURS' => 'Message colours', | |
'MESSAGE_DELETED' => 'Message successfully deleted.', | |
'MESSAGE_EDITED' => 'Message successfully edited.', | |
'MESSAGE_HISTORY' => 'Message history', | |
'MESSAGE_REMOVED_FROM_OUTBOX' => 'This message was deleted by its author.', | |
'MESSAGE_SENT_ON' => 'on', | |
'MESSAGE_STORED' => 'This message has been sent successfully.', | |
'MESSAGE_TO' => 'To', | |
'MESSAGES_DELETED' => 'Messages successfully deleted', | |
'MOVE_DELETED_MESSAGES_TO' => 'Move messages from removed folder to', | |
'MOVE_DOWN' => 'Move down', | |
'MOVE_MARKED_TO_FOLDER' => 'Move marked to %s', | |
'MOVE_PM_ERROR' => 'An error occurred while moving the messages to the new folder, only %1d from %2d messages were moved.', | |
'MOVE_TO_FOLDER' => 'Move to folder', | |
'MOVE_UP' => 'Move up', | |
'NEW_EMAIL_CONFIRM_EMPTY' => 'You did not enter a confirm e-mail address.', | |
'NEW_EMAIL_ERROR' => 'The e-mail addresses you entered do not match.', | |
'NEW_FOLDER_NAME' => 'New folder name', | |
'NEW_PASSWORD' => 'New password', | |
'NEW_PASSWORD_CONFIRM_EMPTY' => 'You did not enter a confirm password.', | |
'NEW_PASSWORD_ERROR' => 'The passwords you entered do not match.', | |
'NOTIFY_METHOD' => 'Notification method', | |
'NOTIFY_METHOD_BOTH' => 'Both', | |
'NOTIFY_METHOD_EMAIL' => 'E-mail only', | |
'NOTIFY_METHOD_EXPLAIN' => 'Method for sending messages sent via this board.', | |
'NOTIFY_METHOD_IM' => 'Jabber only', | |
'NOTIFY_ON_PM' => 'Notify me on new private messages', | |
'NOT_ADDED_FRIENDS_ANONYMOUS' => 'You cannot add the anonymous user to your friends list.', | |
'NOT_ADDED_FRIENDS_BOTS' => 'You cannot add bots to your friends list.', | |
'NOT_ADDED_FRIENDS_FOES' => 'You cannot add users to your friends list who are on your foes list.', | |
'NOT_ADDED_FRIENDS_SELF' => 'You cannot add yourself to the friends list.', | |
'NOT_ADDED_FOES_MOD_ADMIN' => 'You cannot add administrators and moderators to your foes list.', | |
'NOT_ADDED_FOES_ANONYMOUS' => 'You cannot add the anonymous user to your foes list.', | |
'NOT_ADDED_FOES_BOTS' => 'You cannot add bots to your foes list.', | |
'NOT_ADDED_FOES_FRIENDS' => 'You cannot add users to your foes list who are on your friends list.', | |
'NOT_ADDED_FOES_SELF' => 'You cannot add yourself to the foes list.', | |
'NOT_AGREE' => 'I do not agree to these terms', | |
'NOT_ENOUGH_SPACE_FOLDER' => 'The destination folder “%s” seems to be full. The requested action has not been taken.', | |
'NOT_MOVED_MESSAGE' => 'You have 1 private message currently on hold because of full folder.', | |
'NOT_MOVED_MESSAGES' => 'You have %d private messages currently on hold because of full folder.', | |
'NO_ACTION_MODE' => 'No message action specified.', | |
'NO_AUTHOR' => 'No author defined for this message', | |
'NO_AVATAR_CATEGORY' => 'None', | |
'NO_AUTH_DELETE_MESSAGE' => 'You are not authorised to delete private messages.', | |
'NO_AUTH_EDIT_MESSAGE' => 'You are not authorised to edit private messages.', | |
'NO_AUTH_FORWARD_MESSAGE' => 'You are not authorised to forward private messages.', | |
'NO_AUTH_GROUP_MESSAGE' => 'You are not authorised to send private messages to groups.', | |
'NO_AUTH_PASSWORD_REMINDER' => 'You are not authorised to request a new password.', | |
'NO_AUTH_READ_HOLD_MESSAGE' => 'You are not authorised to read private messages that are on hold.', | |
'NO_AUTH_READ_MESSAGE' => 'You are not authorised to read private messages.', | |
'NO_AUTH_READ_REMOVED_MESSAGE' => 'You are not able to read this message because it was removed by the author.', | |
'NO_AUTH_SEND_MESSAGE' => 'You are not authorised to send private messages.', | |
'NO_AUTH_SIGNATURE' => 'You are not authorised to define a signature.', | |
'NO_BCC_RECIPIENT' => 'None', | |
'NO_BOOKMARKS' => 'You have no bookmarks.', | |
'NO_BOOKMARKS_SELECTED' => 'You have selected no bookmarks.', | |
'NO_EDIT_READ_MESSAGE' => 'Private message cannot be edited because it has already been read.', | |
'NO_EMAIL_USER' => 'The e-mail/username information submitted could not be found.', | |
'NO_FOES' => 'No foes currently defined', | |
'NO_FRIENDS' => 'No friends currently defined', | |
'NO_FRIENDS_OFFLINE' => 'No friends offline', | |
'NO_FRIENDS_ONLINE' => 'No friends online', | |
'NO_GROUP_SELECTED' => 'No group specified.', | |
'NO_IMPORTANT_NEWS' => 'No important announcements present.', | |
'NO_MESSAGE' => 'Private message could not be found.', | |
'NO_NEW_FOLDER_NAME' => 'You have to specify a new folder name.', | |
'NO_NEWER_PM' => 'No newer messages.', | |
'NO_OLDER_PM' => 'No older messages.', | |
'NO_PASSWORD_SUPPLIED' => 'You cannot login without a password.', | |
'NO_RECIPIENT' => 'No recipient defined.', | |
'NO_RULES_DEFINED' => 'No rules defined.', | |
'NO_SAVED_DRAFTS' => 'No drafts saved.', | |
'NO_TO_RECIPIENT' => 'None', | |
'NO_WATCHED_FORUMS' => 'You are not subscribed to any forums.', | |
'NO_WATCHED_SELECTED' => 'You have not selected any subscribed topics or forums.', | |
'NO_WATCHED_TOPICS' => 'You are not subscribed to any topics.', | |
'PASS_TYPE_ALPHA_EXPLAIN' => 'Password must be between %1$d and %2$d characters long, must contain letters in mixed case and must contain numbers.', | |
'PASS_TYPE_ANY_EXPLAIN' => 'Must be between %1$d and %2$d characters.', | |
'PASS_TYPE_CASE_EXPLAIN' => 'Password must be between %1$d and %2$d characters long and must contain letters in mixed case.', | |
'PASS_TYPE_SYMBOL_EXPLAIN' => 'Password must be between %1$d and %2$d characters long, must contain letters in mixed case, must contain numbers and must contain symbols.', | |
'PASSWORD' => 'Password', | |
'PASSWORD_ACTIVATED' => 'Your new password has been activated.', | |
'PASSWORD_UPDATED' => 'A new password was sent to your registered e-mail address.', | |
'PERMISSIONS_RESTORED' => 'Successfully restored original permissions.', | |
'PERMISSIONS_TRANSFERRED' => 'Successfully transferred permissions from <strong>%s</strong>, you are now able to browse the board with this user’s permissions.<br />Please note that admin permissions were not transferred. You are able to revert to your permission set at any time.', | |
'PM_DISABLED' => 'Private messaging has been disabled on this board.', | |
'PM_FROM' => 'From', | |
'PM_FROM_REMOVED_AUTHOR' => 'This message was sent by a user no longer registered.', | |
'PM_ICON' => 'PM icon', | |
'PM_INBOX' => 'Inbox', | |
'PM_NO_USERS' => 'The requested users to be added do not exist.', | |
'PM_OUTBOX' => 'Outbox', | |
'PM_SENTBOX' => 'Sent messages', | |
'PM_SUBJECT' => 'Message subject', | |
'PM_TO' => 'Send to', | |
'PM_USERS_REMOVED_NO_PM' => 'Some users couldn’t be added as they have disabled private message receipt.', | |
'POPUP_ON_PM' => 'Pop up window on new private message', | |
'POST_EDIT_PM' => 'Edit message', | |
'POST_FORWARD_PM' => 'Forward message', | |
'POST_NEW_PM' => 'Compose message', | |
'POST_PM_LOCKED' => 'Private messaging is locked.', | |
'POST_PM_POST' => 'Quote post', | |
'POST_QUOTE_PM' => 'Quote message', | |
'POST_REPLY_PM' => 'Reply to message', | |
'PRINT_PM' => 'Print view', | |
'PREFERENCES_UPDATED' => 'Your preferences have been updated.', | |
'PROFILE_INFO_NOTICE' => 'Please note that this information may be viewable to other members. Be careful when including any personal details. Any fields marked with a * must be completed.', | |
'PROFILE_UPDATED' => 'Your profile has been updated.', | |
'RECIPIENT' => 'Recipient', | |
'RECIPIENTS' => 'Recipients', | |
'REGISTRATION' => 'Registration', | |
'RELEASE_MESSAGES' => '%sRelease all on-hold messages%s… they will be re-sorted into the appropriate folder if enough space is made available.', | |
'REMOVE_ADDRESS' => 'Remove address', | |
'REMOVE_SELECTED_BOOKMARKS' => 'Remove selected bookmarks', | |
'REMOVE_SELECTED_BOOKMARKS_CONFIRM' => 'Are you sure you want to delete all selected bookmarks?', | |
'REMOVE_BOOKMARK_MARKED' => 'Remove marked bookmarks', | |
'REMOVE_FOLDER' => 'Remove folder', | |
'REMOVE_FOLDER_CONFIRM' => 'Are you sure you want to remove this folder?', | |
'RENAME' => 'Rename', | |
'RENAME_FOLDER' => 'Rename folder', | |
'REPLIED_MESSAGE' => 'Replied to message', | |
'REPLY_TO_ALL' => 'Reply to sender and all recipients.', | |
'REPORT_PM' => 'Report private message', | |
'RESIGN_SELECTED' => 'Resign selected', | |
'RETURN_FOLDER' => '%1$sReturn to previous folder%2$s', | |
'RETURN_UCP' => '%sReturn to the User Control Panel%s', | |
'RULE_ADDED' => 'Rule successfully added.', | |
'RULE_ALREADY_DEFINED' => 'This rule was defined previously.', | |
'RULE_DELETED' => 'Rule successfully removed.', | |
'RULE_LIMIT_REACHED' => 'You cannot add more PM rules. You have reached the maximum number of rules.', | |
'RULE_NOT_DEFINED' => 'Rule not correctly specified.', | |
'RULE_REMOVED_MESSAGE' => 'One private message had been removed due to private message filters.', | |
'RULE_REMOVED_MESSAGES' => '%d private messages were removed due to private message filters.', | |
'SAME_PASSWORD_ERROR' => 'The new password you entered is the same as your current password.', | |
'SEARCH_YOUR_POSTS' => 'Show your posts', | |
'SEND_PASSWORD' => 'Send password', | |
'SENT_AT' => 'Sent', // Used before dates in private messages | |
////////////////////////////////////////////////////////////////////////////////////// | |
'SHOW_EMAIL' => 'Show my e-mail address to other users', | |
/////////////////////////////////////////////////////////////////////////////////////// | |
'SIGNATURE_EXPLAIN' => 'This is a block of text that can be added to posts you make. There is a %d character limit.', | |
'SIGNATURE_PREVIEW' => 'Your signature will appear like this in posts', | |
'SIGNATURE_TOO_LONG' => 'Your signature is too long.', | |
'SORT' => 'Sort', | |
'SORT_COMMENT' => 'File comment', | |
'SORT_DOWNLOADS' => 'Downloads', | |
'SORT_EXTENSION' => 'Extension', | |
'SORT_FILENAME' => 'Filename', | |
'SORT_POST_TIME' => 'Post time', | |
'SORT_SIZE' => 'File size', | |
'TIMEZONE' => 'Timezone', | |
'TO' => 'To', | |
'TOO_MANY_RECIPIENTS' => 'You tried to send a private message to too many recipients.', | |
'TOO_MANY_REGISTERS' => 'You have exceeded the maximum number of registration attempts for this session. Please try again later.', | |
'UCP' => 'User Control Panel', | |
'UCP_ACTIVATE' => 'Activate account', | |
'UCP_ADMIN_ACTIVATE' => 'Please note that you will need to enter a valid e-mail address before your account is activated. The administrator will review your account and if approved you will receive an e-mail at the address you specified.', | |
'UCP_AIM' => 'AOL Instant Messenger', | |
'UCP_ATTACHMENTS' => 'Attachments', | |
'UCP_COPPA_BEFORE' => 'Before %s', | |
'UCP_COPPA_ON_AFTER' => 'On or after %s', | |
'UCP_EMAIL_ACTIVATE' => 'Please note that you will need to enter a valid e-mail address before your account is activated. You will receive an e-mail at the address you provide that contains an account activation link.', | |
'UCP_ICQ' => 'ICQ number', | |
'UCP_JABBER' => 'Jabber address', | |
'UCP_MAIN' => 'Overview', | |
'UCP_MAIN_ATTACHMENTS' => 'Manage attachments', | |
'UCP_MAIN_BOOKMARKS' => 'Manage bookmarks', | |
'UCP_MAIN_DRAFTS' => 'Manage drafts', | |
'UCP_MAIN_FRONT' => 'Front page', | |
'UCP_MAIN_SUBSCRIBED' => 'Manage subscriptions', | |
'UCP_MSNM' => 'WL/MSN Messenger', | |
'UCP_NO_ATTACHMENTS' => 'You have posted no files.', | |
'UCP_PREFS' => 'Board preferences', | |
'UCP_PREFS_PERSONAL' => 'Edit global settings', | |
'UCP_PREFS_POST' => 'Edit posting defaults', | |
'UCP_PREFS_VIEW' => 'Edit display options', | |
'UCP_PM' => 'Private messages', | |
'UCP_PM_COMPOSE' => 'Compose message', | |
'UCP_PM_DRAFTS' => 'Manage PM drafts', | |
'UCP_PM_OPTIONS' => 'Rules, folders & settings', | |
'UCP_PM_POPUP' => 'Private messages', | |
'UCP_PM_POPUP_TITLE' => 'Private message popup', | |
'UCP_PM_UNREAD' => 'Unread messages', | |
'UCP_PM_VIEW' => 'View messages', | |
'UCP_PROFILE' => 'Profile', | |
'UCP_PROFILE_AVATAR' => 'Edit avatar', | |
'UCP_PROFILE_PROFILE_INFO' => 'Edit profile', | |
'UCP_PROFILE_REG_DETAILS' => 'Edit account settings', | |
'UCP_PROFILE_SIGNATURE' => 'Edit signature', | |
'UCP_USERGROUPS' => 'Usergroups', | |
'UCP_USERGROUPS_MEMBER' => 'Edit memberships', | |
'UCP_USERGROUPS_MANAGE' => 'Manage groups', | |
'UCP_REGISTER_DISABLE' => 'Creating a new account is currently not possible.', | |
'UCP_REMIND' => 'Send password', | |
'UCP_RESEND' => 'Send activation e-mail', | |
'UCP_WELCOME' => 'Welcome to the User Control Panel. From here you can monitor, view and update your profile, preferences, subscribed forums and topics. You can also send messages to other users (if permitted). Please ensure you read any announcements before continuing.', | |
'UCP_YIM' => 'Yahoo Messenger', | |
'UCP_ZEBRA' => 'Friends & Foes', | |
'UCP_ZEBRA_FOES' => 'Manage foes', | |
'UCP_ZEBRA_FRIENDS' => 'Manage friends', | |
'UNDISCLOSED_RECIPIENT' => 'Undisclosed Recipient', | |
'UNKNOWN_FOLDER' => 'Unknown folder', | |
'UNWATCH_MARKED' => 'Unwatch marked', | |
'UPLOAD_AVATAR_FILE' => 'Upload from your machine', | |
'UPLOAD_AVATAR_URL' => 'Upload from a URL', | |
'UPLOAD_AVATAR_URL_EXPLAIN' => 'Enter the URL of the location containing the image. The image will be copied to this site.', | |
'USERNAME_ALPHA_ONLY_EXPLAIN' => 'Username must be between %1$d and %2$d chars long and use only alphanumeric characters.', | |
'USERNAME_ALPHA_SPACERS_EXPLAIN'=> 'Username must be between %1$d and %2$d chars long and use alphanumeric, space or -+_[] characters.', | |
'USERNAME_ASCII_EXPLAIN' => 'Username must be between %1$d and %2$d chars long and use only ASCII characters, so no special symbols.', | |
'USERNAME_LETTER_NUM_EXPLAIN' => 'Username must be between %1$d and %2$d chars long and use only letter or number characters.', | |
'USERNAME_LETTER_NUM_SPACERS_EXPLAIN'=> 'Username must be between %1$d and %2$d chars long and use letter, number, space or -+_[] characters.', | |
'USERNAME_CHARS_ANY_EXPLAIN' => 'Length must be between %1$d and %2$d characters.', | |
'USERNAME_TAKEN_USERNAME' => 'The username you entered is already in use, please select an alternative.', | |
'USERNAME_DISALLOWED_USERNAME' => 'The username you entered has been disallowed or contains a disallowed word. Please choose a different name.', | |
'USER_NOT_FOUND_OR_INACTIVE' => 'The usernames you specified could either not be found or are not activated users.', | |
'VIEW_AVATARS' => 'Display avatars', | |
'VIEW_EDIT' => 'View/Edit', | |
'VIEW_FLASH' => 'Display Flash animations', | |
'VIEW_IMAGES' => 'Display images within posts', | |
'VIEW_NEXT_HISTORY' => 'Next PM in history', | |
'VIEW_NEXT_PM' => 'Next PM', | |
'VIEW_PM' => 'View message', | |
'VIEW_PM_INFO' => 'Message details', | |
'VIEW_PM_MESSAGE' => '1 message', | |
'VIEW_PM_MESSAGES' => '%d messages', | |
'VIEW_PREVIOUS_HISTORY' => 'Previous PM in history', | |
'VIEW_PREVIOUS_PM' => 'Previous PM', | |
'VIEW_SIGS' => 'Display signatures', | |
'VIEW_SMILIES' => 'Display smilies as images', | |
'VIEW_TOPICS_DAYS' => 'Display topics from previous days', | |
'VIEW_TOPICS_DIR' => 'Display topic order direction', | |
'VIEW_TOPICS_KEY' => 'Display topics ordering by', | |
'VIEW_POSTS_DAYS' => 'Display posts from previous days', | |
'VIEW_POSTS_DIR' => 'Display post order direction', | |
'VIEW_POSTS_KEY' => 'Display posts ordering by', | |
'WATCHED_EXPLAIN' => 'Below is a list of forums and topics you are subscribed to. You will be notified of new posts in either. To unsubscribe mark the forum or topic and then press the <em>Unwatch marked</em> button.', | |
'WATCHED_FORUMS' => 'Watched forums', | |
'WATCHED_TOPICS' => 'Watched topics', | |
'WRONG_ACTIVATION' => 'The activation key you supplied does not match any in the database.', | |
'YOUR_DETAILS' => 'Your activity', | |
'YOUR_FOES' => 'Your foes', | |
'YOUR_FOES_EXPLAIN' => 'To remove usernames select them and click submit.', | |
'YOUR_FRIENDS' => 'Your friends', | |
'YOUR_FRIENDS_EXPLAIN' => 'To remove usernames select them and click submit.', | |
'YOUR_WARNINGS' => 'Your warning level', | |
'PM_ACTION' => array( | |
'PLACE_INTO_FOLDER' => 'Place into folder', | |
'MARK_AS_READ' => 'Mark as read', | |
'MARK_AS_IMPORTANT' => 'Mark message', | |
'DELETE_MESSAGE' => 'Delete message' | |
), | |
'PM_CHECK' => array( | |
'SUBJECT' => 'Subject', | |
'SENDER' => 'Sender', | |
'MESSAGE' => 'Message', | |
'STATUS' => 'Message status', | |
'TO' => 'Sent To' | |
), | |
'PM_RULE' => array( | |
'IS_LIKE' => 'is like', | |
'IS_NOT_LIKE' => 'is not like', | |
'IS' => 'is', | |
'IS_NOT' => 'is not', | |
'BEGINS_WITH' => 'begins with', | |
'ENDS_WITH' => 'ends with', | |
'IS_FRIEND' => 'is friend', | |
'IS_FOE' => 'is foe', | |
'IS_USER' => 'is user', | |
'IS_GROUP' => 'is in usergroup', | |
'ANSWERED' => 'answered', | |
'FORWARDED' => 'forwarded', | |
'TO_GROUP' => 'to my default usergroup', | |
'TO_ME' => 'to me' | |
), | |
'GROUPS_EXPLAIN' => 'Usergroups enable board admins to better administer users. By default you will be placed in a specific group, this is your default group. This group defines how you may appear to other users, for example your username colouration, avatar, rank, etc. Depending on whether the administrator allows it you may be allowed to change your default group. You may also be placed in or allowed to join other groups. Some groups may give you additional permissions to view content or increase your capabilities in other areas.', | |
'GROUP_LEADER' => 'Leaderships', | |
'GROUP_MEMBER' => 'Memberships', | |
'GROUP_PENDING' => 'Pending memberships', | |
'GROUP_NONMEMBER' => 'Non-memberships', | |
'GROUP_DETAILS' => 'Group details', | |
'NO_LEADER' => 'No group leaderships', | |
'NO_MEMBER' => 'No group memberships', | |
'NO_PENDING' => 'No pending memberships', | |
'NO_NONMEMBER' => 'No non-member groups', | |
)); | |
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* | |
* @package ucp | |
* @version $Id$ | |
* @copyright (c) 2005 phpBB Group | |
* @license http://opensource.org/licenses/gpl-license.php GNU Public License | |
* | |
*/ | |
/** | |
* @ignore | |
*/ | |
if (!defined('IN_PHPBB')) | |
{ | |
exit; | |
} | |
/** | |
* ucp_prefs | |
* Changing user preferences | |
* @package ucp | |
*/ | |
class ucp_prefs | |
{ | |
var $u_action; | |
function main($id, $mode) | |
{ | |
global $config, $db, $user, $auth, $template, $phpbb_root_path, $phpEx; | |
$submit = (isset($_POST['submit'])) ? true : false; | |
$error = $data = array(); | |
$s_hidden_fields = ''; | |
switch ($mode) | |
{ | |
case 'personal': | |
add_form_key('ucp_prefs_personal'); | |
$data = array( | |
'notifymethod' => request_var('notifymethod', $user->data['user_notify_type']), | |
'dateformat' => request_var('dateformat', $user->data['user_dateformat'], true), | |
'lang' => basename(request_var('lang', $user->data['user_lang'])), | |
'style' => request_var('style', (int) $user->data['user_style']), | |
'tz' => request_var('tz', (float) $user->data['user_timezone']), | |
'dst' => request_var('dst', (bool) $user->data['user_dst']), | |
//////////////////////////////////////////////////////////////////////////////////////////// | |
'contactform' => request_var('contactform', (bool) $user->data['user_allow_contactform']), | |
//////////////////////////////////////////////////////////////////////////////////////////// | |
'viewemail' => request_var('viewemail', (bool) $user->data['user_allow_viewemail']), | |
'massemail' => request_var('massemail', (bool) $user->data['user_allow_massemail']), | |
'hideonline' => request_var('hideonline', (bool) !$user->data['user_allow_viewonline']), | |
'notifypm' => request_var('notifypm', (bool) $user->data['user_notify_pm']), | |
'popuppm' => request_var('popuppm', (bool) $user->optionget('popuppm')), | |
'allowpm' => request_var('allowpm', (bool) $user->data['user_allow_pm']), | |
); | |
if ($data['notifymethod'] == NOTIFY_IM && (!$config['jab_enable'] || !$user->data['user_jabber'] || !@extension_loaded('xml'))) | |
{ | |
// Jabber isnt enabled, or no jabber field filled in. Update the users table to be sure its correct. | |
$data['notifymethod'] = NOTIFY_BOTH; | |
} | |
if ($submit) | |
{ | |
if ($config['override_user_style']) | |
{ | |
$data['style'] = (int) $config['default_style']; | |
} | |
else if (!phpbb_style_is_active($data['style'])) | |
{ | |
$data['style'] = (int) $user->data['user_style']; | |
} | |
$error = validate_data($data, array( | |
'dateformat' => array('string', false, 1, 30), | |
'lang' => array('language_iso_name'), | |
'tz' => array('num', false, -14, 14), | |
)); | |
if (!check_form_key('ucp_prefs_personal')) | |
{ | |
$error[] = 'FORM_INVALID'; | |
} | |
if (!sizeof($error)) | |
{ | |
$user->optionset('popuppm', $data['popuppm']); | |
$sql_ary = array( | |
'user_allow_pm' => $data['allowpm'], | |
///////////////////////////////////////////////////////////////////////////////// | |
'user_allow_contactform'=> $data['contactform'], | |
//////////////////////////////////////////////////////////////////////////////// | |
'user_allow_viewemail' => $data['viewemail'], | |
'user_allow_massemail' => $data['massemail'], | |
'user_allow_viewonline' => ($auth->acl_get('u_hideonline')) ? !$data['hideonline'] : $user->data['user_allow_viewonline'], | |
'user_notify_type' => $data['notifymethod'], | |
'user_notify_pm' => $data['notifypm'], | |
'user_options' => $user->data['user_options'], | |
'user_dst' => $data['dst'], | |
'user_dateformat' => $data['dateformat'], | |
'user_lang' => $data['lang'], | |
'user_timezone' => $data['tz'], | |
'user_style' => $data['style'], | |
); | |
$sql = 'UPDATE ' . USERS_TABLE . ' | |
SET ' . $db->sql_build_array('UPDATE', $sql_ary) . ' | |
WHERE user_id = ' . $user->data['user_id']; | |
$db->sql_query($sql); | |
meta_refresh(3, $this->u_action); | |
$message = $user->lang['PREFERENCES_UPDATED'] . '<br /><br />' . sprintf($user->lang['RETURN_UCP'], '<a href="' . $this->u_action . '">', '</a>'); | |
trigger_error($message); | |
} | |
// Replace "error" strings with their real, localised form | |
$error = preg_replace('#^([A-Z_]+)$#e', "(!empty(\$user->lang['\\1'])) ? \$user->lang['\\1'] : '\\1'", $error); | |
} | |
$dateformat_options = ''; | |
foreach ($user->lang['dateformats'] as $format => $null) | |
{ | |
$dateformat_options .= '<option value="' . $format . '"' . (($format == $data['dateformat']) ? ' selected="selected"' : '') . '>'; | |
$dateformat_options .= $user->format_date(time(), $format, false) . ((strpos($format, '|') !== false) ? $user->lang['VARIANT_DATE_SEPARATOR'] . $user->format_date(time(), $format, true) : ''); | |
$dateformat_options .= '</option>'; | |
} | |
$s_custom = false; | |
$dateformat_options .= '<option value="custom"'; | |
if (!isset($user->lang['dateformats'][$data['dateformat']])) | |
{ | |
$dateformat_options .= ' selected="selected"'; | |
$s_custom = true; | |
} | |
$dateformat_options .= '>' . $user->lang['CUSTOM_DATEFORMAT'] . '</option>'; | |
// check if there are any user-selectable languages | |
$sql = 'SELECT COUNT(lang_id) as languages_count | |
FROM ' . LANG_TABLE; | |
$result = $db->sql_query($sql); | |
if ($db->sql_fetchfield('languages_count') > 1) | |
{ | |
$s_more_languages = true; | |
} | |
else | |
{ | |
$s_more_languages = false; | |
} | |
$db->sql_freeresult($result); | |
// check if there are any user-selectable styles | |
$sql = 'SELECT COUNT(style_id) as styles_count | |
FROM ' . STYLES_TABLE . ' | |
WHERE style_active = 1'; | |
$result = $db->sql_query($sql); | |
if ($db->sql_fetchfield('styles_count') > 1) | |
{ | |
$s_more_styles = true; | |
} | |
else | |
{ | |
$s_more_styles = false; | |
} | |
$db->sql_freeresult($result); | |
$template->assign_vars(array( | |
'ERROR' => (sizeof($error)) ? implode('<br />', $error) : '', | |
'S_NOTIFY_EMAIL' => ($data['notifymethod'] == NOTIFY_EMAIL) ? true : false, | |
'S_NOTIFY_IM' => ($data['notifymethod'] == NOTIFY_IM) ? true : false, | |
'S_NOTIFY_BOTH' => ($data['notifymethod'] == NOTIFY_BOTH) ? true : false, | |
////////////////////////////////////////////////////////////////////////////////////// | |
'S_CAN_CONTACT_FORM' => $data['contactform'], | |
/////////////////////////////////////////////////////////////////////////////////////// | |
'S_VIEW_EMAIL' => $data['viewemail'], | |
'S_MASS_EMAIL' => $data['massemail'], | |
'S_ALLOW_PM' => $data['allowpm'], | |
'S_HIDE_ONLINE' => $data['hideonline'], | |
'S_NOTIFY_PM' => $data['notifypm'], | |
'S_POPUP_PM' => $data['popuppm'], | |
'S_DST' => $data['dst'], | |
'DATE_FORMAT' => $data['dateformat'], | |
'A_DATE_FORMAT' => addslashes($data['dateformat']), | |
'S_DATEFORMAT_OPTIONS' => $dateformat_options, | |
'S_CUSTOM_DATEFORMAT' => $s_custom, | |
'DEFAULT_DATEFORMAT' => $config['default_dateformat'], | |
'A_DEFAULT_DATEFORMAT' => addslashes($config['default_dateformat']), | |
'S_MORE_LANGUAGES' => $s_more_languages, | |
'S_MORE_STYLES' => $s_more_styles, | |
'S_LANG_OPTIONS' => language_select($data['lang']), | |
'S_STYLE_OPTIONS' => ($config['override_user_style']) ? '' : style_select($data['style']), | |
'S_TZ_OPTIONS' => tz_select($data['tz'], true), | |
'S_CAN_HIDE_ONLINE' => ($auth->acl_get('u_hideonline')) ? true : false, | |
'S_SELECT_NOTIFY' => ($config['jab_enable'] && $user->data['user_jabber'] && @extension_loaded('xml')) ? true : false) | |
); | |
break; | |
case 'view': | |
add_form_key('ucp_prefs_view'); | |
$data = array( | |
'topic_sk' => request_var('topic_sk', (!empty($user->data['user_topic_sortby_type'])) ? $user->data['user_topic_sortby_type'] : 't'), | |
'topic_sd' => request_var('topic_sd', (!empty($user->data['user_topic_sortby_dir'])) ? $user->data['user_topic_sortby_dir'] : 'd'), | |
'topic_st' => request_var('topic_st', (!empty($user->data['user_topic_show_days'])) ? $user->data['user_topic_show_days'] : 0), | |
'post_sk' => request_var('post_sk', (!empty($user->data['user_post_sortby_type'])) ? $user->data['user_post_sortby_type'] : 't'), | |
'post_sd' => request_var('post_sd', (!empty($user->data['user_post_sortby_dir'])) ? $user->data['user_post_sortby_dir'] : 'a'), | |
'post_st' => request_var('post_st', (!empty($user->data['user_post_show_days'])) ? $user->data['user_post_show_days'] : 0), | |
'images' => request_var('images', (bool) $user->optionget('viewimg')), | |
'flash' => request_var('flash', (bool) $user->optionget('viewflash')), | |
'smilies' => request_var('smilies', (bool) $user->optionget('viewsmilies')), | |
'sigs' => request_var('sigs', (bool) $user->optionget('viewsigs')), | |
'avatars' => request_var('avatars', (bool) $user->optionget('viewavatars')), | |
'wordcensor' => request_var('wordcensor', (bool) $user->optionget('viewcensors')), | |
); | |
if ($submit) | |
{ | |
$error = validate_data($data, array( | |
'topic_sk' => array('string', false, 1, 1), | |
'topic_sd' => array('string', false, 1, 1), | |
'post_sk' => array('string', false, 1, 1), | |
'post_sd' => array('string', false, 1, 1), | |
)); | |
if (!check_form_key('ucp_prefs_view')) | |
{ | |
$error[] = 'FORM_INVALID'; | |
} | |
if (!sizeof($error)) | |
{ | |
$user->optionset('viewimg', $data['images']); | |
$user->optionset('viewflash', $data['flash']); | |
$user->optionset('viewsmilies', $data['smilies']); | |
$user->optionset('viewsigs', $data['sigs']); | |
$user->optionset('viewavatars', $data['avatars']); | |
if ($auth->acl_get('u_chgcensors')) | |
{ | |
$user->optionset('viewcensors', $data['wordcensor']); | |
} | |
$sql_ary = array( | |
'user_options' => $user->data['user_options'], | |
'user_topic_sortby_type' => $data['topic_sk'], | |
'user_post_sortby_type' => $data['post_sk'], | |
'user_topic_sortby_dir' => $data['topic_sd'], | |
'user_post_sortby_dir' => $data['post_sd'], | |
'user_topic_show_days' => $data['topic_st'], | |
'user_post_show_days' => $data['post_st'], | |
); | |
$sql = 'UPDATE ' . USERS_TABLE . ' | |
SET ' . $db->sql_build_array('UPDATE', $sql_ary) . ' | |
WHERE user_id = ' . $user->data['user_id']; | |
$db->sql_query($sql); | |
meta_refresh(3, $this->u_action); | |
$message = $user->lang['PREFERENCES_UPDATED'] . '<br /><br />' . sprintf($user->lang['RETURN_UCP'], '<a href="' . $this->u_action . '">', '</a>'); | |
trigger_error($message); | |
} | |
// Replace "error" strings with their real, localised form | |
$error = preg_replace('#^([A-Z_]+)$#e', "(!empty(\$user->lang['\\1'])) ? \$user->lang['\\1'] : '\\1'", $error); | |
} | |
$sort_dir_text = array('a' => $user->lang['ASCENDING'], 'd' => $user->lang['DESCENDING']); | |
// Topic ordering options | |
$limit_topic_days = array(0 => $user->lang['ALL_TOPICS'], 1 => $user->lang['1_DAY'], 7 => $user->lang['7_DAYS'], 14 => $user->lang['2_WEEKS'], 30 => $user->lang['1_MONTH'], 90 => $user->lang['3_MONTHS'], 180 => $user->lang['6_MONTHS'], 365 => $user->lang['1_YEAR']); | |
$sort_by_topic_text = array('a' => $user->lang['AUTHOR'], 't' => $user->lang['POST_TIME'], 'r' => $user->lang['REPLIES'], 's' => $user->lang['SUBJECT'], 'v' => $user->lang['VIEWS']); | |
$sort_by_topic_sql = array('a' => 't.topic_first_poster_name', 't' => 't.topic_last_post_time', 'r' => 't.topic_replies', 's' => 't.topic_title', 'v' => 't.topic_views'); | |
// Post ordering options | |
$limit_post_days = array(0 => $user->lang['ALL_POSTS'], 1 => $user->lang['1_DAY'], 7 => $user->lang['7_DAYS'], 14 => $user->lang['2_WEEKS'], 30 => $user->lang['1_MONTH'], 90 => $user->lang['3_MONTHS'], 180 => $user->lang['6_MONTHS'], 365 => $user->lang['1_YEAR']); | |
$sort_by_post_text = array('a' => $user->lang['AUTHOR'], 't' => $user->lang['POST_TIME'], 's' => $user->lang['SUBJECT']); | |
$sort_by_post_sql = array('a' => 'u.username_clean', 't' => 'p.post_id', 's' => 'p.post_subject'); | |
$_options = array('topic', 'post'); | |
foreach ($_options as $sort_option) | |
{ | |
${'s_limit_' . $sort_option . '_days'} = '<select name="' . $sort_option . '_st">'; | |
foreach (${'limit_' . $sort_option . '_days'} as $day => $text) | |
{ | |
$selected = ($data[$sort_option . '_st'] == $day) ? ' selected="selected"' : ''; | |
${'s_limit_' . $sort_option . '_days'} .= '<option value="' . $day . '"' . $selected . '>' . $text . '</option>'; | |
} | |
${'s_limit_' . $sort_option . '_days'} .= '</select>'; | |
${'s_sort_' . $sort_option . '_key'} = '<select name="' . $sort_option . '_sk">'; | |
foreach (${'sort_by_' . $sort_option . '_text'} as $key => $text) | |
{ | |
$selected = ($data[$sort_option . '_sk'] == $key) ? ' selected="selected"' : ''; | |
${'s_sort_' . $sort_option . '_key'} .= '<option value="' . $key . '"' . $selected . '>' . $text . '</option>'; | |
} | |
${'s_sort_' . $sort_option . '_key'} .= '</select>'; | |
${'s_sort_' . $sort_option . '_dir'} = '<select name="' . $sort_option . '_sd">'; | |
foreach ($sort_dir_text as $key => $value) | |
{ | |
$selected = ($data[$sort_option . '_sd'] == $key) ? ' selected="selected"' : ''; | |
${'s_sort_' . $sort_option . '_dir'} .= '<option value="' . $key . '"' . $selected . '>' . $value . '</option>'; | |
} | |
${'s_sort_' . $sort_option . '_dir'} .= '</select>'; | |
} | |
$template->assign_vars(array( | |
'ERROR' => (sizeof($error)) ? implode('<br />', $error) : '', | |
'S_IMAGES' => $data['images'], | |
'S_FLASH' => $data['flash'], | |
'S_SMILIES' => $data['smilies'], | |
'S_SIGS' => $data['sigs'], | |
'S_AVATARS' => $data['avatars'], | |
'S_DISABLE_CENSORS' => $data['wordcensor'], | |
'S_CHANGE_CENSORS' => ($auth->acl_get('u_chgcensors') && $config['allow_nocensors']) ? true : false, | |
'S_TOPIC_SORT_DAYS' => $s_limit_topic_days, | |
'S_TOPIC_SORT_KEY' => $s_sort_topic_key, | |
'S_TOPIC_SORT_DIR' => $s_sort_topic_dir, | |
'S_POST_SORT_DAYS' => $s_limit_post_days, | |
'S_POST_SORT_KEY' => $s_sort_post_key, | |
'S_POST_SORT_DIR' => $s_sort_post_dir) | |
); | |
break; | |
case 'post': | |
$data = array( | |
'bbcode' => request_var('bbcode', $user->optionget('bbcode')), | |
'smilies' => request_var('smilies', $user->optionget('smilies')), | |
'sig' => request_var('sig', $user->optionget('attachsig')), | |
'notify' => request_var('notify', (bool) $user->data['user_notify']), | |
); | |
add_form_key('ucp_prefs_post'); | |
if ($submit) | |
{ | |
if (check_form_key('ucp_prefs_post')) | |
{ | |
$user->optionset('bbcode', $data['bbcode']); | |
$user->optionset('smilies', $data['smilies']); | |
$user->optionset('attachsig', $data['sig']); | |
$sql_ary = array( | |
'user_options' => $user->data['user_options'], | |
'user_notify' => $data['notify'], | |
); | |
$sql = 'UPDATE ' . USERS_TABLE . ' | |
SET ' . $db->sql_build_array('UPDATE', $sql_ary) . ' | |
WHERE user_id = ' . $user->data['user_id']; | |
$db->sql_query($sql); | |
$msg = $user->lang['PREFERENCES_UPDATED']; | |
} | |
else | |
{ | |
$msg = $user->lang['FORM_INVALID']; | |
} | |
meta_refresh(3, $this->u_action); | |
$message = $msg . '<br /><br />' . sprintf($user->lang['RETURN_UCP'], '<a href="' . $this->u_action . '">', '</a>'); | |
trigger_error($message); | |
} | |
$template->assign_vars(array( | |
'S_BBCODE' => $data['bbcode'], | |
'S_SMILIES' => $data['smilies'], | |
'S_SIG' => $data['sig'], | |
'S_NOTIFY' => $data['notify']) | |
); | |
break; | |
} | |
$template->assign_vars(array( | |
'L_TITLE' => $user->lang['UCP_PREFS_' . strtoupper($mode)], | |
'S_HIDDEN_FIELDS' => $s_hidden_fields, | |
'S_UCP_ACTION' => $this->u_action) | |
); | |
$this->tpl_name = 'ucp_prefs_' . $mode; | |
$this->page_title = 'UCP_PREFS_' . strtoupper($mode); | |
} | |
} | |
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- INCLUDE ucp_header.html --> | |
<form id="ucp" method="post" action="{S_UCP_ACTION}"{S_FORM_ENCTYPE}> | |
<h2>{L_TITLE}</h2> | |
<div class="panel"> | |
<div class="inner"><span class="corners-top"><span></span></span> | |
<fieldset> | |
<!-- IF ERROR --><p class="error">{ERROR}</p><!-- ENDIF --> | |
<!-----------------------------------------------------------------------------> | |
<dl> | |
<dt><label for="contactform0">{L_CONTACT_VIA_FORM}:</label></dt> | |
<dd> | |
<label for="contactform1"><input type="radio" name="contactform" id="contactform1" value="1"<!-- IF S_CAN_CONTACT_FORM --> checked="checked"<!-- ENDIF --> /> {L_YES}</label> | |
<label for="contactform0"><input type="radio" name="contactform" id="contactform0" value="0"<!-- IF not S_CAN_CONTACT_FORM --> checked="checked"<!-- ENDIF --> /> {L_NO}</label> | |
</dd> | |
</dl> | |
<!------------------------------------------------------------------------------> | |
<dl> | |
<dt><label for="viewemail0">{L_SHOW_EMAIL}:</label></dt> | |
<dd> | |
<label for="viewemail1"><input type="radio" name="viewemail" id="viewemail1" value="1"<!-- IF S_VIEW_EMAIL --> checked="checked"<!-- ENDIF --> /> {L_YES}</label> | |
<label for="viewemail0"><input type="radio" name="viewemail" id="viewemail0" value="0"<!-- IF not S_VIEW_EMAIL --> checked="checked"<!-- ENDIF --> /> {L_NO}</label> | |
</dd> | |
</dl> | |
<dl> | |
<dt><label for="massemail1">{L_ADMIN_EMAIL}:</label></dt> | |
<dd> | |
<label for="massemail1"><input type="radio" name="massemail" id="massemail1" value="1"<!-- IF S_MASS_EMAIL --> checked="checked"<!-- ENDIF --> /> {L_YES}</label> | |
<label for="massemail0"><input type="radio" name="massemail" id="massemail0" value="0"<!-- IF not S_MASS_EMAIL --> checked="checked"<!-- ENDIF --> /> {L_NO}</label> | |
</dd> | |
</dl> | |
<dl> | |
<dt><label for="allowpm1">{L_ALLOW_PM}:</label><br /><span>{L_ALLOW_PM_EXPLAIN}</span></dt> | |
<dd> | |
<label for="allowpm1"><input type="radio" name="allowpm" id="allowpm1" value="1"<!-- IF S_ALLOW_PM --> checked="checked"<!-- ENDIF --> /> {L_YES}</label> | |
<label for="allowpm0"><input type="radio" name="allowpm" id="allowpm0" value="0"<!-- IF not S_ALLOW_PM --> checked="checked"<!-- ENDIF --> /> {L_NO}</label> | |
</dd> | |
</dl> | |
<!-- IF S_CAN_HIDE_ONLINE --> | |
<dl> | |
<dt><label for="hideonline0">{L_HIDE_ONLINE}:</label><br /><span>{L_HIDE_ONLINE_EXPLAIN}</span></dt> | |
<dd> | |
<label for="hideonline1"><input type="radio" name="hideonline" id="hideonline1" value="1"<!-- IF S_HIDE_ONLINE --> checked="checked"<!-- ENDIF --> /> {L_YES}</label> | |
<label for="hideonline0"><input type="radio" name="hideonline" id="hideonline0" value="0"<!-- IF not S_HIDE_ONLINE --> checked="checked"<!-- ENDIF --> /> {L_NO}</label> | |
</dd> | |
</dl> | |
<!-- ENDIF --> | |
<!-- IF S_SELECT_NOTIFY --> | |
<dl> | |
<dt><label for="notifymethod0">{L_NOTIFY_METHOD}:</label></dt> | |
<dd> | |
<label for="notifymethod0"><input type="radio" name="notifymethod" id="notifymethod0" value="0"<!-- IF S_NOTIFY_EMAIL --> checked="checked"<!-- ENDIF --> /> {L_NOTIFY_METHOD_EMAIL}</label> | |
<label for="notifymethod1"><input type="radio" name="notifymethod" id="notifymethod1" value="1"<!-- IF S_NOTIFY_IM --> checked="checked"<!-- ENDIF --> /> {L_NOTIFY_METHOD_IM}</label> | |
<label for="notifymethod2"><input type="radio" name="notifymethod" id="notifymethod2" value="2"<!-- IF S_NOTIFY_BOTH --> checked="checked"<!-- ENDIF --> /> {L_NOTIFY_METHOD_BOTH}</label> | |
</dd> | |
</dl> | |
<!-- ENDIF --> | |
<dl> | |
<dt><label for="notifypm1">{L_NOTIFY_ON_PM}:</label></dt> | |
<dd> | |
<label for="notifypm1"><input type="radio" name="notifypm" id="notifypm1" value="1"<!-- IF S_NOTIFY_PM --> checked="checked"<!-- ENDIF --> /> {L_YES}</label> | |
<label for="notifypm0"><input type="radio" name="notifypm" id="notifypm0" value="0"<!-- IF not S_NOTIFY_PM --> checked="checked"<!-- ENDIF --> /> {L_NO}</label> | |
</dd> | |
</dl> | |
<dl> | |
<dt><label for="popuppm0">{L_POPUP_ON_PM}:</label></dt> | |
<dd> | |
<label for="popuppm1"><input type="radio" name="popuppm" id="popuppm1" value="1"<!-- IF S_POPUP_PM --> checked="checked"<!-- ENDIF --> /> {L_YES}</label> | |
<label for="popuppm0"><input type="radio" name="popuppm" id="popuppm0" value="0"<!-- IF not S_POPUP_PM --> checked="checked"<!-- ENDIF --> /> {L_NO}</label> | |
</dd> | |
</dl> | |
<!-- IF S_MORE_LANGUAGES --> | |
<dl> | |
<dt><label for="lang">{L_BOARD_LANGUAGE}:</label></dt> | |
<dd><select name="lang" id="lang">{S_LANG_OPTIONS}</select></dd> | |
</dl> | |
<!-- ENDIF --> | |
<!-- IF S_STYLE_OPTIONS and S_MORE_STYLES --> | |
<dl> | |
<dt><label for="style">{L_BOARD_STYLE}:</label></dt> | |
<dd><select name="style" id="style">{S_STYLE_OPTIONS}</select></dd> | |
</dl> | |
<!-- ENDIF --> | |
<dl> | |
<dt><label for="timezone">{L_BOARD_TIMEZONE}:</label></dt> | |
<dd><select name="tz" id="timezone" class="autowidth">{S_TZ_OPTIONS}</select></dd> | |
</dl> | |
<dl> | |
<dt><label for="dst1">{L_BOARD_DST}:</label></dt> | |
<dd> | |
<label for="dst1"><input type="radio" name="dst" id="dst1" value="1"<!-- IF S_DST --> checked="checked"<!-- ENDIF --> /> {L_YES}</label> | |
<label for="dst0"><input type="radio" name="dst" id="dst0" value="0"<!-- IF not S_DST --> checked="checked"<!-- ENDIF --> /> {L_NO}</label> | |
</dd> | |
</dl> | |
<dl> | |
<dt><label for="dateformat">{L_BOARD_DATE_FORMAT}:</label><br /><span>{L_BOARD_DATE_FORMAT_EXPLAIN}</span></dt> | |
<dd> | |
<select name="dateoptions" id="dateoptions" onchange="if(this.value=='custom'){dE('custom_date',1);}else{dE('custom_date',-1);} if (this.value == 'custom') { document.getElementById('dateformat').value = default_dateformat; } else { document.getElementById('dateformat').value = this.value; }"> | |
{S_DATEFORMAT_OPTIONS} | |
</select> | |
</dd> | |
<dd id="custom_date" style="display:none;"><input type="text" name="dateformat" id="dateformat" value="{DATE_FORMAT}" maxlength="30" class="inputbox narrow" style="margin-top: 3px;" /></dd> | |
</dl> | |
</fieldset> | |
<span class="corners-bottom"><span></span></span></div> | |
</div> | |
<fieldset class="submit-buttons"> | |
{S_HIDDEN_FIELDS}<input type="reset" value="{L_RESET}" name="reset" class="button2" /> | |
<input type="submit" name="submit" value="{L_SUBMIT}" class="button1" /> | |
{S_FORM_TOKEN} | |
</fieldset> | |
</form> | |
<script type="text/javascript"> | |
// <![CDATA[ | |
var date_format = '{A_DATE_FORMAT}'; | |
var default_dateformat = '{A_DEFAULT_DATEFORMAT}'; | |
function customDates() | |
{ | |
var e = document.getElementById('dateoptions'); | |
e.selectedIndex = e.length - 1; | |
// Loop and match date_format in menu | |
for (var i = 0; i < e.length; i++) | |
{ | |
if (e.options[i].value == date_format) | |
{ | |
e.selectedIndex = i; | |
break; | |
} | |
} | |
// Show/hide custom field | |
if (e.selectedIndex == e.length - 1) | |
{ | |
dE('custom_date',1); | |
} | |
else | |
{ | |
dE('custom_date',-1); | |
} | |
} | |
customDates(); | |
// ]]> | |
</script> | |
<!-- INCLUDE ucp_footer.html --> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment