diff --git a/phpBB/adm/images/arrow_left.gif b/phpBB/adm/images/arrow_left.gif new file mode 100644 index 0000000000..076a5596f1 Binary files /dev/null and b/phpBB/adm/images/arrow_left.gif differ diff --git a/phpBB/adm/images/arrow_right.gif b/phpBB/adm/images/arrow_right.gif new file mode 100644 index 0000000000..c5827a401f Binary files /dev/null and b/phpBB/adm/images/arrow_right.gif differ diff --git a/phpBB/adm/images/arrow_up.gif b/phpBB/adm/images/arrow_up.gif new file mode 100644 index 0000000000..38b5a62c17 Binary files /dev/null and b/phpBB/adm/images/arrow_up.gif differ diff --git a/phpBB/adm/images/bg_button.gif b/phpBB/adm/images/bg_button.gif new file mode 100644 index 0000000000..03172ff5c6 Binary files /dev/null and b/phpBB/adm/images/bg_button.gif differ diff --git a/phpBB/adm/images/bg_header.jpg b/phpBB/adm/images/bg_header.jpg new file mode 100644 index 0000000000..5ecec5360b Binary files /dev/null and b/phpBB/adm/images/bg_header.jpg differ diff --git a/phpBB/adm/images/bg_tabs1.gif b/phpBB/adm/images/bg_tabs1.gif index 8f3802fd97..d129365661 100644 Binary files a/phpBB/adm/images/bg_tabs1.gif and b/phpBB/adm/images/bg_tabs1.gif differ diff --git a/phpBB/adm/images/bg_tabs2.gif b/phpBB/adm/images/bg_tabs2.gif index fc9c3b8fd9..0aace9b6db 100644 Binary files a/phpBB/adm/images/bg_tabs2.gif and b/phpBB/adm/images/bg_tabs2.gif differ diff --git a/phpBB/adm/images/bg_tabs_alt1.gif b/phpBB/adm/images/bg_tabs_alt1.gif new file mode 100644 index 0000000000..335a72c711 Binary files /dev/null and b/phpBB/adm/images/bg_tabs_alt1.gif differ diff --git a/phpBB/adm/images/bg_tabs_alt2.gif b/phpBB/adm/images/bg_tabs_alt2.gif new file mode 100644 index 0000000000..a2142d5432 Binary files /dev/null and b/phpBB/adm/images/bg_tabs_alt2.gif differ diff --git a/phpBB/adm/images/corners_left.gif b/phpBB/adm/images/corners_left.gif new file mode 100644 index 0000000000..bacd276495 Binary files /dev/null and b/phpBB/adm/images/corners_left.gif differ diff --git a/phpBB/adm/images/corners_left2.gif b/phpBB/adm/images/corners_left2.gif new file mode 100644 index 0000000000..206e50368d Binary files /dev/null and b/phpBB/adm/images/corners_left2.gif differ diff --git a/phpBB/adm/images/corners_right.gif b/phpBB/adm/images/corners_right.gif new file mode 100644 index 0000000000..bcb5bd7d14 Binary files /dev/null and b/phpBB/adm/images/corners_right.gif differ diff --git a/phpBB/adm/images/corners_right2.gif b/phpBB/adm/images/corners_right2.gif new file mode 100644 index 0000000000..0ba66d50b2 Binary files /dev/null and b/phpBB/adm/images/corners_right2.gif differ diff --git a/phpBB/adm/images/icon_folder.gif b/phpBB/adm/images/icon_folder.gif index 9b2bc47c67..82ceee0784 100644 Binary files a/phpBB/adm/images/icon_folder.gif and b/phpBB/adm/images/icon_folder.gif differ diff --git a/phpBB/adm/images/icon_folder_link.gif b/phpBB/adm/images/icon_folder_link.gif index d5e86d47d7..01fb1c4e1e 100644 Binary files a/phpBB/adm/images/icon_folder_link.gif and b/phpBB/adm/images/icon_folder_link.gif differ diff --git a/phpBB/adm/images/icon_folder_link_small.gif b/phpBB/adm/images/icon_folder_link_small.gif deleted file mode 100644 index babe1e03cf..0000000000 Binary files a/phpBB/adm/images/icon_folder_link_small.gif and /dev/null differ diff --git a/phpBB/adm/images/icon_folder_lock.gif b/phpBB/adm/images/icon_folder_lock.gif index 436f3d21c8..450bf28c3c 100644 Binary files a/phpBB/adm/images/icon_folder_lock.gif and b/phpBB/adm/images/icon_folder_lock.gif differ diff --git a/phpBB/adm/images/icon_folder_lock_small.gif b/phpBB/adm/images/icon_folder_lock_small.gif deleted file mode 100644 index 10eb776972..0000000000 Binary files a/phpBB/adm/images/icon_folder_lock_small.gif and /dev/null differ diff --git a/phpBB/adm/images/icon_folder_small.gif b/phpBB/adm/images/icon_folder_small.gif deleted file mode 100644 index c16bfa75d5..0000000000 Binary files a/phpBB/adm/images/icon_folder_small.gif and /dev/null differ diff --git a/phpBB/adm/images/icon_folder_sub_small.gif b/phpBB/adm/images/icon_folder_sub_small.gif deleted file mode 100644 index 355ee9c708..0000000000 Binary files a/phpBB/adm/images/icon_folder_sub_small.gif and /dev/null differ diff --git a/phpBB/adm/images/icon_subfolder.gif b/phpBB/adm/images/icon_subfolder.gif index 9179303e7f..5e97bc94ce 100644 Binary files a/phpBB/adm/images/icon_subfolder.gif and b/phpBB/adm/images/icon_subfolder.gif differ diff --git a/phpBB/adm/images/innerbox_bg.gif b/phpBB/adm/images/innerbox_bg.gif new file mode 100644 index 0000000000..460526f0ba Binary files /dev/null and b/phpBB/adm/images/innerbox_bg.gif differ diff --git a/phpBB/adm/images/phpbb_logo.gif b/phpBB/adm/images/phpbb_logo.gif index daa51daaf3..239993182b 100644 Binary files a/phpBB/adm/images/phpbb_logo.gif and b/phpBB/adm/images/phpbb_logo.gif differ diff --git a/phpBB/adm/images/progress_bar.gif b/phpBB/adm/images/progress_bar.gif index 75cf61c59e..1ae265152c 100755 Binary files a/phpBB/adm/images/progress_bar.gif and b/phpBB/adm/images/progress_bar.gif differ diff --git a/phpBB/adm/images/toggle.gif b/phpBB/adm/images/toggle.gif new file mode 100644 index 0000000000..8af6861bd1 Binary files /dev/null and b/phpBB/adm/images/toggle.gif differ diff --git a/phpBB/adm/index.php b/phpBB/adm/index.php index e441b9ff7f..78c876808b 100644 --- a/phpBB/adm/index.php +++ b/phpBB/adm/index.php @@ -10,8 +10,8 @@ /** */ -define('IN_PHPBB', 1); -define('ADMIN_START', 1); +define('IN_PHPBB', true); +define('ADMIN_START', true); define('NEED_SID', true); // Include files @@ -63,9 +63,6 @@ $template->assign_var('T_TEMPLATE_PATH', $phpbb_admin_path . 'style'); // the acp template is never stored in the database $user->theme['template_storedb'] = false; -// Force pagination seperation for admin style -$user->theme['pagination_sep'] = ''; - // Instantiate new module $module = new p_master(); @@ -253,8 +250,7 @@ function h_radio($name, &$input_ary, $input_default = false, $id = false, $key = foreach ($input_ary as $value => $title) { $selected = ($input_default !== false && $value == $input_default) ? ' checked="checked"' : ''; - $html .= ($html) ? '   ' : ''; - $html .= ' ' . $user->lang[$title]; + $html .= ''; $id_assigned = true; } @@ -302,10 +298,10 @@ function build_cfg_template($tpl_type, $key, &$new, $config_key, $vars) $tpl_type_cond = explode('_', $tpl_type[1]); $type_no = ($tpl_type_cond[0] == 'disabled' || $tpl_type_cond[0] == 'enabled') ? false : true; - $tpl_no = ' ' . (($type_no) ? $user->lang['NO'] : $user->lang['DISABLED']); - $tpl_yes = ' ' . (($type_no) ? $user->lang['YES'] : $user->lang['ENABLED']); + $tpl_no = ''; + $tpl_yes = ''; - $tpl = ($tpl_type_cond[0] == 'yes' || $tpl_type_cond[0] == 'enabled') ? $tpl_yes . '  ' . $tpl_no : $tpl_no . '  ' . $tpl_yes; + $tpl = ($tpl_type_cond[0] == 'yes' || $tpl_type_cond[0] == 'enabled') ? $tpl_yes . $tpl_no : $tpl_no . $tpl_yes; break; case 'select': @@ -486,12 +482,12 @@ function validate_config_vars($config_vars, &$cfg_array, &$error) $error[] = sprintf($user->lang['DIRECTORY_NOT_DIR'], $cfg_array[$config_name]); } - // Check if the path is writeable + // Check if the path is writable if ($config_definition['validate'] == 'wpath' || $config_definition['validate'] == 'rwpath') { - if (file_exists($phpbb_root_path . $cfg_array[$config_name]) && !is_writeable($phpbb_root_path . $cfg_array[$config_name])) + if (file_exists($phpbb_root_path . $cfg_array[$config_name]) && !@is_writable($phpbb_root_path . $cfg_array[$config_name])) { - $error[] = sprintf($user->lang['DIRECTORY_NOT_WRITEABLE'], $cfg_array[$config_name]); + $error[] = sprintf($user->lang['DIRECTORY_NOT_WRITABLE'], $cfg_array[$config_name]); } } diff --git a/phpBB/adm/style/acp_attachments.html b/phpBB/adm/style/acp_attachments.html index 04535719b4..cee60b4185 100644 --- a/phpBB/adm/style/acp_attachments.html +++ b/phpBB/adm/style/acp_attachments.html @@ -83,7 +83,8 @@

{L_EXCLUDE_ENTERED_IP}
-
{L_YES}   {L_NO}
+
+

@@ -205,7 +206,8 @@


{L_ALLOWED_FORUMS_EXPLAIN}
-
checked="checked" /> {L_ALLOW_ALL_FORUMS}   checked="checked" /> {L_ALLOW_SELECTED_FORUMS}
+
+
@@ -241,8 +243,10 @@ {groups.GROUP_NAME} -
» {L_NOT_ALLOWED_IN_PM} -
» {L_ONLY_ALLOWED_IN_PM} +
» {L_NOT_ALLOWED_IN_PM} +
» {L_ONLY_ALLOWED_IN_PM} +
» {L_NOT_ALLOWED_IN_PM_POST} +
» {L_ALLOWED_IN_PM_POST} {groups.CATEGORY}  {ICON_EDIT}  {ICON_DELETE}  @@ -304,7 +308,7 @@ - {extensions.EXTENSION} + {extensions.EXTENSION} {extensions.GROUP_OPTIONS} @@ -344,7 +348,7 @@ {orphan.REAL_FILENAME} {orphan.FILETIME} {orphan.FILESIZE} - ID: + {L_ATTACH_ID}: diff --git a/phpBB/adm/style/acp_ban.html b/phpBB/adm/style/acp_ban.html index 5f267aaa98..abc115330c 100644 --- a/phpBB/adm/style/acp_ban.html +++ b/phpBB/adm/style/acp_ban.html @@ -50,20 +50,21 @@
-
-
(YYYY-MM-DD)
+
+

{L_BAN_EXCLUDE_EXPLAIN}
-
{L_YES}   {L_NO}
+
+
-
+
-
+

@@ -88,15 +89,15 @@

-
+
-
+
-
+

diff --git a/phpBB/adm/style/acp_captcha.html b/phpBB/adm/style/acp_captcha.html index 3ffdda4eb3..b5c12f29b1 100644 --- a/phpBB/adm/style/acp_captcha.html +++ b/phpBB/adm/style/acp_captcha.html @@ -6,34 +6,63 @@

{L_ACP_VC_SETTINGS_EXPLAIN}

+
- {L_GENERAL_OPTIONS} +{L_GENERAL_OPTIONS} +

{L_VISUAL_CONFIRM_REG_EXPLAIN}
-
checked="checked" /> {L_ENABLED}    checked="checked" /> {L_DISABLED}
+
+

{L_VISUAL_CONFIRM_POST_EXPLAIN}
-
checked="checked" /> {L_ENABLED}    checked="checked" /> {L_DISABLED}
+
+

{L_CAPTCHA_GD_EXPLAIN}
-
checked="checked" /> {L_YES}   checked="checked" /> {L_NO}
+
+
-

{L_CAPTCHA_GD_NOISE_EXPLAIN}
-
checked="checked" /> {L_YES}   checked="checked" /> {L_NO}
+

{L_CAPTCHA_GD_FOREGROUND_NOISE_EXPLAIN}
+
+
+
+
+

{L_CAPTCHA_GD_X_GRID_EXPLAIN}
+
+
+
+

{L_CAPTCHA_GD_Y_GRID_EXPLAIN}
+
+
+ {L_PREVIEW} + +
+

{L_WARNING}

+

{L_CAPTCHA_PREVIEW_MSG}

+
+ +
+

{L_CAPTCHA_PREVIEW_EXPLAIN}
+
{L_PREVIEW}width="360" height="96" width="320" height="50" id="captcha_preview" />
+
+
+
{L_SUBMIT}   - +   +
diff --git a/phpBB/adm/style/acp_database.html b/phpBB/adm/style/acp_database.html index 8341d36c70..d1ac03dc7b 100644 --- a/phpBB/adm/style/acp_database.html +++ b/phpBB/adm/style/acp_database.html @@ -54,17 +54,21 @@ {L_BACKUP_OPTIONS}
-
 {L_FULL_BACKUP}   {L_STRUCTURE_ONLY}   {L_DATA_ONLY}
+
+ +
- id="method" checked="checked" type="radio" class="radio" value="{methods.TYPE}" /> {methods.TYPE} +
-
 {L_STORE_AND_DOWNLOAD}   {L_STORE_LOCAL}   {L_DOWNLOAD}
+
+ +
diff --git a/phpBB/adm/style/acp_disallow.html b/phpBB/adm/style/acp_disallow.html index 6486f66c32..5d94787f04 100644 --- a/phpBB/adm/style/acp_disallow.html +++ b/phpBB/adm/style/acp_disallow.html @@ -12,7 +12,7 @@ {L_ADD_DISALLOW_TITLE}

{L_ADD_DISALLOW_EXPLAIN}
-
+

diff --git a/phpBB/adm/style/acp_forums.html b/phpBB/adm/style/acp_forums.html index 5bbd235c04..6cc703a5a7 100644 --- a/phpBB/adm/style/acp_forums.html +++ b/phpBB/adm/style/acp_forums.html @@ -120,8 +120,8 @@

-
{L_DELETE_ALL_POSTS}
-
{L_MOVE_POSTS_TO}
+
+
@@ -130,9 +130,9 @@
-
{L_MOVE_SUBFORUMS_TO}
+
-
{L_DELETE_SUBFORUMS}
+
@@ -143,16 +143,18 @@
-
+

{L_FORUM_DESC_EXPLAIN}
-
-
checked="checked" /> {L_PARSE_BBCODE}   checked="checked" /> {L_PARSE_SMILIES}   checked="checked" /> {L_PARSE_URLS}
+
+
+ +

{L_FORUM_IMAGE_EXPLAIN}
-
+
{L_FORUM_IMAGE}
@@ -180,7 +182,8 @@ {L_GENERAL_FORUM_SETTINGS}

{L_DISPLAY_ACTIVE_TOPICS_EXPLAIN}
-
id="display_active" checked="checked" /> {L_YES}   id="display_active" checked="checked" /> {L_NO}
+
+
@@ -194,23 +197,28 @@

{L_LIST_INDEX_EXPLAIN}
-
id="display_on_index" checked="checked" /> {L_YES}   id="display_on_index" checked="checked" /> {L_NO}
+
+

{L_ENABLE_POST_REVIEW_EXPLAIN}
-
id="enable_post_review" checked="checked" /> {L_YES}   id="enable_post_review" checked="checked" /> {L_NO}
+
+

{L_ENABLE_INDEXING_EXPLAIN}
-
id="enable_indexing" checked="checked" /> {L_YES}   id="enable_indexing" checked="checked" /> {L_NO}
+
+
-
id="enable_icons" checked="checked" /> {L_YES}   id="enable_icons" checked="checked" /> {L_NO}
+
+

{L_ENABLE_RECENT_EXPLAIN}
-
id="display_recent" checked="checked" /> {L_YES}   id="display_recent" checked="checked" /> {L_NO}
+
+

{L_FORUM_TOPICS_PAGE_EXPLAIN}
@@ -222,7 +230,8 @@ {L_FORUM_PRUNE_SETTINGS}

{L_FORUM_AUTO_PRUNE_EXPLAIN}
-
id="enable_prune" checked="checked" /> {L_YES}   id="enable_prune" checked="checked" /> {L_NO}
+
+

{L_AUTO_PRUNE_FREQ_EXPLAIN}
@@ -238,15 +247,18 @@

{L_PRUNE_OLD_POLLS_EXPLAIN}
-
id="prune_old_polls" checked="checked" /> {L_YES}   id="prune_old_polls" checked="checked" /> {L_NO}
+
+
-
id="prune_announce" checked="checked" /> {L_YES}   id="prune_announce" checked="checked" /> {L_NO}
+
+
-
id="prune_sticky" checked="checked" /> {L_YES}   id="prune_sticky" checked="checked" /> {L_NO}
+
+
@@ -256,15 +268,17 @@ {L_GENERAL_FORUM_SETTINGS}

{L_LIST_INDEX_EXPLAIN}
-
id="link_display_on_index" checked="checked" /> {L_YES}   id="link_display_on_index" checked="checked" /> {L_NO}
+
+

{L_FORUM_LINK_EXPLAIN}
-
+

{L_FORUM_LINK_TRACK_EXPLAIN}
-
id="forum_link_track" checked="checked" /> {L_YES}   id="forum_link_track" checked="checked" /> {L_NO}
+
+
@@ -274,7 +288,7 @@ {L_FORUM_RULES}

{L_FORUM_RULES_LINK_EXPLAIN}
-
+
@@ -285,7 +299,9 @@

{L_FORUM_RULES_EXPLAIN}
-
checked="checked" /> {L_PARSE_BBCODE}   checked="checked" /> {L_PARSE_SMILIES}   checked="checked" /> {L_PARSE_URLS}
+
+ +
@@ -319,23 +335,23 @@ {L_FORUM_DELETE}
-
{FORUM_NAME}
+
{FORUM_NAME}
-
{L_DELETE_ALL_POSTS}
+
-
{L_MOVE_POSTS_TO}
+
-
{L_DELETE_SUBFORUMS}
+
-
{L_MOVE_SUBFORUMS_TO}
+
@@ -413,12 +429,12 @@ - {forums.FOLDER_IMAGE} + {forums.FOLDER_IMAGE}
{forums.FORUM_IMAGE}
{forums.FORUM_NAME}{forums.FORUM_NAME}
{forums.FORUM_DESCRIPTION} -

{L_TOPICS}: {forums.FORUM_TOPICS} / {L_POSTS}: {forums.FORUM_POSTS} +

{L_TOPICS}: {forums.FORUM_TOPICS} / {L_POSTS}: {forums.FORUM_POSTS} diff --git a/phpBB/adm/style/acp_groups.html b/phpBB/adm/style/acp_groups.html index 0ff4afd1ad..3bdeaeaad0 100644 --- a/phpBB/adm/style/acp_groups.html +++ b/phpBB/adm/style/acp_groups.html @@ -23,21 +23,23 @@ {L_GROUP_DETAILS}
for="group_name">{L_GROUP_NAME}:
-
{GROUP_NAME}
+
{GROUP_NAME}
-
checked="checked" /> {L_PARSE_BBCODE}   checked="checked" /> {L_PARSE_SMILIES}   checked="checked" /> {L_PARSE_URLS}
+
+ +

{L_GROUP_TYPE_EXPLAIN}
- {L_GROUP_OPEN}   - {L_GROUP_REQUEST}   - {L_GROUP_CLOSED}   - {L_GROUP_HIDDEN} + + + +
@@ -65,7 +67,7 @@
-
+

{L_GROUP_RECEIVE_PM_EXPLAIN}
@@ -87,7 +89,7 @@

{L_AVATAR_EXPLAIN}
{AVATAR_IMAGE}
-
 {L_DELETE_AVATAR}
+
@@ -106,7 +108,7 @@

{L_LINK_REMOTE_SIZE_EXPLAIN}
-
px X px
+
px X px
@@ -182,7 +184,7 @@ - {L_GROUP_LEAD} + {L_GROUP_LEAD} @@ -198,12 +200,12 @@ - {L_GROUP_APPROVED} + {L_GROUP_APPROVED} - {L_GROUP_PENDING} + {L_GROUP_PENDING} @@ -241,11 +243,13 @@ {L_ADD_USERS}
-
{L_YES}   {L_NO}
+
+

{L_USER_GROUP_DEFAULT_EXPLAIN}
-
{L_YES}   {L_NO}
+
+

{L_USERNAMES_EXPLAIN}
diff --git a/phpBB/adm/style/acp_icons.html b/phpBB/adm/style/acp_icons.html index 302324240d..81f56cc299 100644 --- a/phpBB/adm/style/acp_icons.html +++ b/phpBB/adm/style/acp_icons.html @@ -4,6 +4,43 @@ + + + + « {L_BACK}

{L_TITLE}

@@ -20,6 +57,7 @@ {L_CONFIG} + {L_URL} {L_LOCATION} @@ -45,11 +83,11 @@ [{items.IMG}] - - + + - - + + @@ -64,6 +102,27 @@ + + + {L_ADD_SMILEY_CODE} + + + + + + + + + + + + + + + + {L_NO_ICONS} + + @@ -71,6 +130,7 @@  

+ @@ -97,7 +157,9 @@

{L_CURRENT_EXPLAIN}
-
{L_KEEP_ALL}    {L_REPLACE_MATCHES}    {L_DELETE_ALL} 
+
+ +

diff --git a/phpBB/adm/style/acp_jabber.html b/phpBB/adm/style/acp_jabber.html index 5ff54491a3..03992364dd 100644 --- a/phpBB/adm/style/acp_jabber.html +++ b/phpBB/adm/style/acp_jabber.html @@ -19,7 +19,8 @@ {L_ACP_JABBER_SETTINGS}


{L_JAB_ENABLE_EXPLAIN}
-
checked="checked" /> {L_ENABLED}    checked="checked" /> {L_DISABLED}
+
+

{L_JAB_SERVER_EXPLAIN}
@@ -46,11 +47,11 @@
-

+ + +

  -

-
diff --git a/phpBB/adm/style/acp_language.html b/phpBB/adm/style/acp_language.html index 21f7347d3d..d15f722e98 100644 --- a/phpBB/adm/style/acp_language.html +++ b/phpBB/adm/style/acp_language.html @@ -116,16 +116,16 @@   -


+

 
 

+ - + @@ -156,9 +156,6 @@ {TPL} - - - diff --git a/phpBB/adm/style/acp_main.html b/phpBB/adm/style/acp_main.html index 41d00a3b41..80c7f09d6e 100644 --- a/phpBB/adm/style/acp_main.html +++ b/phpBB/adm/style/acp_main.html @@ -35,67 +35,107 @@ - + - + - + - + - + - + - + - + - + - + - + - + - + - + - +
  {L_UPLOAD_METHOD}:  {buttons.VALUE} 
  
{L_NUMBER_POSTS}: {TOTAL_POSTS}{TOTAL_POSTS} {L_POSTS_PER_DAY}: {POSTS_PER_DAY}{POSTS_PER_DAY}
{L_NUMBER_TOPICS}: {TOTAL_TOPICS}{TOTAL_TOPICS} {L_TOPICS_PER_DAY}: {TOPICS_PER_DAY}{TOPICS_PER_DAY}
{L_NUMBER_USERS}: {TOTAL_USERS}{TOTAL_USERS} {L_USERS_PER_DAY}: {USERS_PER_DAY}{USERS_PER_DAY}
{L_NUMBER_FILES}: {TOTAL_FILES}{TOTAL_FILES} {L_FILES_PER_DAY}: {FILES_PER_DAY}{FILES_PER_DAY}
{L_BOARD_STARTED}: {START_DATE}{START_DATE} {L_AVATAR_DIR_SIZE}: {AVATAR_DIR_SIZE}{AVATAR_DIR_SIZE}
{L_DATABASE_SIZE}: {DBSIZE}{DBSIZE} {L_UPLOAD_DIR_SIZE}: {UPLOAD_DIR_SIZE}{UPLOAD_DIR_SIZE}
{L_DATABASE_SERVER_INFO}: {DATABASE_INFO}{DATABASE_INFO} {L_GZIP_COMPRESSION}: {GZIP_COMPRESSION}{GZIP_COMPRESSION}
    {L_NUMBER_ORPHAN}: {TOTAL_ORPHAN}{TOTAL_ORPHAN}
-
-
- +
+ {L_STATISTIC_RESYNC_OPTIONS} - -
- +
+
+

 
+
+
+
+ +
+
+

 
+
+
+
+ +
+
+

{L_RESYNC_STATS_EXPLAIN}
+
+
+
+ +
+
+

{L_RESYNC_POSTCOUNTS_EXPLAIN}
+
+
+
+ +
+
+

{L_RESYNC_POST_MARKING_EXPLAIN}
+
+
+
+ + +
+
+

{L_PURGE_CACHE_EXPLAIN}
+
+
+
+ +
@@ -103,6 +143,8 @@

{L_ADMIN_LOG_INDEX_EXPLAIN}

+
» {L_VIEW_ADMIN_LOG}
+ @@ -126,7 +168,6 @@

-
» {L_VIEW_ADMIN_LOG}
diff --git a/phpBB/adm/style/acp_modules.html b/phpBB/adm/style/acp_modules.html index ecc8fe4c61..d241119fb6 100644 --- a/phpBB/adm/style/acp_modules.html +++ b/phpBB/adm/style/acp_modules.html @@ -75,7 +75,7 @@

{L_MODULE_LANGNAME_EXPLAIN}
-
+
@@ -89,13 +89,13 @@
-
+
style="display: none;">

{L_MODULE_DISPLAYED_EXPLAIN}
-
+

@@ -147,7 +147,7 @@ - {modules.MODULE_IMAGE} + {modules.MODULE_IMAGE} {modules.MODULE_TITLE} [{L_HIDDEN_MODULE}]  {L_DISABLE}{L_ENABLE}  diff --git a/phpBB/adm/style/acp_permission_roles.html b/phpBB/adm/style/acp_permission_roles.html index 222e1265bf..83256ff78d 100644 --- a/phpBB/adm/style/acp_permission_roles.html +++ b/phpBB/adm/style/acp_permission_roles.html @@ -64,56 +64,52 @@

{L_ACL_TYPE}

-
- {L_ALL_YES}{L_ALL_NEVER}{L_ALL_NO} -
-
-
+
-
style="display: none;"> +
style="display: none;">
- - - - + + + + - - - + + + - + - - - + + + @@ -154,7 +150,7 @@ - diff --git a/phpBB/adm/style/acp_permissions.html b/phpBB/adm/style/acp_permissions.html index f5a5f78c6b..862ba6e8d2 100644 --- a/phpBB/adm/style/acp_permissions.html +++ b/phpBB/adm/style/acp_permissions.html @@ -17,7 +17,7 @@

{L_EXPLAIN}

-

{L_FORUMS}: {FORUM_NAMES}

+

{L_FORUMS}: {FORUM_NAMES}

@@ -30,13 +30,14 @@
-
  {L_ALL_FORUMS}
+
- -
+

{S_HIDDEN_FIELDS} +

+
@@ -52,11 +53,12 @@
- -
+

{S_HIDDEN_FIELDS} +

+
@@ -71,15 +73,15 @@ {L_LOOK_UP_USER}
-
+
[ {L_FIND_USERNAME} ]
-
 {L_SELECT_ANONYMOUS}
+
- -
+

{S_HIDDEN_FIELDS} +

@@ -94,11 +96,12 @@
- -
+

{S_HIDDEN_FIELDS} +

+
@@ -106,7 +109,7 @@
- +

{L_USERS}

@@ -117,7 +120,7 @@ {L_MANAGE_USERS}
-
  {L_ALL_USERS}
+
@@ -129,13 +132,13 @@
- +
{L_ADD_USERS}

{L_USERNAMES_EXPLAIN}

-
 {L_SELECT_ANONYMOUS}
+
@@ -162,7 +165,7 @@ {L_MANAGE_GROUPS}
-
  {L_ALL_GROUPS}
+
@@ -223,7 +226,7 @@
[ {L_FIND_USERNAME} ]
-
 {L_SELECT_ANONYMOUS}
+
@@ -287,7 +290,7 @@

{L_ACL_VIEW_EXPLAIN}

- » {L_PERMISSION_TYPE} + » {L_PERMISSION_TYPE}
@@ -303,7 +306,7 @@
- » {L_PERMISSION_TYPE} + » {L_PERMISSION_TYPE}
@@ -325,11 +328,11 @@ - + {S_HIDDEN_FIELDS} @@ -339,7 +342,7 @@
- +


diff --git a/phpBB/adm/style/acp_profile.html b/phpBB/adm/style/acp_profile.html index 9db33f54b2..5c3d0077b6 100644 --- a/phpBB/adm/style/acp_profile.html +++ b/phpBB/adm/style/acp_profile.html @@ -25,7 +25,7 @@ {L_TITLE}

{L_FIELD_TYPE_EXPLAIN}
-
{FIELD_TYPE}
+
{FIELD_TYPE}
@@ -35,12 +35,13 @@

{L_FIELD_IDENT_EXPLAIN}
-
+

{L_DISPLAY_PROFILE_FIELD_EXPLAIN}
-
checked="checked" /> {L_YES} checked="checked" /> {L_NO}
+
+
@@ -74,7 +75,7 @@ {L_LANG_SPECIFIC}
-
+

{L_FIELD_DESCRIPTION_EXPLAIN}
@@ -83,7 +84,7 @@

{L_DEFAULT_VALUE_EXPLAIN}
-
+
@@ -212,7 +213,7 @@
- +
diff --git a/phpBB/adm/style/acp_prune_forums.html b/phpBB/adm/style/acp_prune_forums.html index 00710ccb4f..ad8d987a02 100644 --- a/phpBB/adm/style/acp_prune_forums.html +++ b/phpBB/adm/style/acp_prune_forums.html @@ -41,8 +41,11 @@
{L_SELECT_FORUM} +

{L_LOOK_UP_FORUMS_EXPLAIN}

-
+
+
+

@@ -78,15 +81,18 @@


{L_PRUNE_OLD_POLLS_EXPLAIN}
-
{L_YES}   {L_NO}
+
+
-
{L_YES}   {L_NO}
+
+
-
{L_YES}   {L_NO}
+
+

diff --git a/phpBB/adm/style/acp_prune_users.html b/phpBB/adm/style/acp_prune_users.html index 0db10e3ae4..1300ddffb2 100644 --- a/phpBB/adm/style/acp_prune_users.html +++ b/phpBB/adm/style/acp_prune_users.html @@ -37,11 +37,13 @@


{L_DELETE_USER_POSTS_EXPLAIN}
-
{L_YES}   {L_NO}
+
+

{L_DEACTIVATE_DELETE_EXPLAIN}
-
{L_DELETE_USERS}   {L_DEACTIVATE}
+
+

diff --git a/phpBB/adm/style/acp_ranks.html b/phpBB/adm/style/acp_ranks.html index e316c35b2a..a8d496e257 100644 --- a/phpBB/adm/style/acp_ranks.html +++ b/phpBB/adm/style/acp_ranks.html @@ -35,7 +35,8 @@

-
checked="checked" />{L_YES}    checked="checked" /> {L_NO}
+
+
- + @@ -532,9 +384,10 @@ | {L_PREVIEW} + - + @@ -543,7 +396,7 @@ - colspan="2">{uninstalled.NAME}
{L_COPYRIGHT}: {uninstalled.COPYRIGHT} + colspan="2">{uninstalled.NAME}
{L_COPYRIGHT}: {uninstalled.COPYRIGHT}
@@ -605,7 +458,8 @@

{L_LOCATION_EXPLAIN}
-
id="store_db" checked="checked" />  {L_STORE_FILESYSTEM}   id="store_db" checked="checked" />  {L_STORE_DATABASE}
+
+
@@ -615,12 +469,14 @@ {L_OPTIONS}
-
id="style_active" checked="checked" />  {L_YES}   id="style_active" checked="checked" />  {L_NO}
+
+
-
  {L_YES}    {L_NO}
+
+
diff --git a/phpBB/adm/style/acp_update.html b/phpBB/adm/style/acp_update.html index 06672f39ae..eb4dbbdef4 100644 --- a/phpBB/adm/style/acp_update.html +++ b/phpBB/adm/style/acp_update.html @@ -22,11 +22,11 @@
-
{CURRENT_VERSION}
+
{CURRENT_VERSION}
-
{LATEST_VERSION}
+
{LATEST_VERSION}
diff --git a/phpBB/adm/style/acp_users.html b/phpBB/adm/style/acp_users.html index d44832b9b7..eda5a416f4 100644 --- a/phpBB/adm/style/acp_users.html +++ b/phpBB/adm/style/acp_users.html @@ -14,9 +14,9 @@ {L_SELECT_USER}
-
+
[ {L_FIND_USERNAME} ]
-
 {L_SELECT_ANONYMOUS}
+

@@ -54,7 +54,7 @@ « {L_BACK} -

{L_USER_ADMIN}

+

{L_USER_ADMIN} :: {MANAGED_USERNAME}

{L_USER_ADMIN_EXPLAIN}

@@ -77,449 +77,23 @@ - - -
- {L_ACP_USER_OVERVIEW} -
-

{L_NAME_CHARS_EXPLAIN}
-
-
[ {L_USE_PERMISSIONS} ]
-
- -
-
-
{USER_INACTIVE_REASON}
-
- -
-
-
{USER_REGISTERED}
-
- -
-
-
{REGISTERED_IP}
-
[ {L_WHOIS} ]
-
- -
-
-
{USER_LASTACTIVE}
-
-
-
-
{USER_POSTS}
-
-
-
-
{USER_WARNINGS}
-
-
-

{L_FOUNDER_EXPLAIN}
-
id="user_founder" checked="checked" disabled="disabled" /> {L_YES}  id="user_founder" checked="checked" disabled="disabled" /> {L_NO} 
-
-
-
-
-
-
-

{L_CONFIRM_EMAIL_EXPLAIN}
-
-
-
-

{L_CHANGE_PASSWORD_EXPLAIN}
-
-
-
-

{L_CONFIRM_PASSWORD_EXPLAIN}
-
-
- -
- -
- {L_USER_TOOLS} -
-
-
-
- -
-

{L_DELETE_USER_EXPLAIN}
-
-
-
- - -
- -
- -
- - + - - - - - - - -
{L_ACL_SETTING}{L_ACL_YES}{L_ACL_NO}{L_ACL_NEVER}{L_ACL_YES}{L_ACL_NO}{L_ACL_NEVER}
{auth.mask.PERMISSION}{auth.mask.PERMISSION}
{roles.ROLE_NAME} + {roles.ROLE_NAME}
{roles.ROLE_DESCRIPTION}
{L_VIEW_ASSIGNED_ITEMS}{L_VIEW_ASSIGNED_ITEMS}
{L_INSTALLED}{L_INSTALLED}
{L_UNINSTALLED}{L_UNINSTALLED}
{L_INSTALL}
- - - - - - - - - - - - - - - - - - - - - -
{L_REPORT_BY}{L_IP}{L_TIME}{L_FEEDBACK}{L_MARK}
{log.USERNAME}{log.IP}{log.DATE} - {log.ACTION} -
» [ {log.DATA} ] -
- -
-

{L_NO_ENTRIES}

-
- - -
- {L_DISPLAY_LOG}:  {S_LIMIT_DAYS} {L_SORT_BY}: {S_SORT_KEY} {S_SORT_DIR} - -
-
- - - - - -
-   - -

{L_MARK_ALL}{L_UNMARK_ALL}

-
- - -

{L_ADD_FEEDBACK}

- -

{L_ADD_FEEDBACK_EXPLAIN}

- -
- {L_ACP_USER_FEEDBACK} -
-
-
-
- -
- -
- - + -
- -
- {L_USER_PROFILE} -
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-

{L_BIRTHDAY_EXPLAIN}
-
{L_DAY}: {L_MONTH}: {L_YEAR}:
-
-
- - -
- {L_USER_CUSTOM_PROFILE_FIELDS} - -
-

{profile_fields.LANG_EXPLAIN}
-
{profile_fields.FIELD}
- -
{profile_fields.ERROR}
- -
- -
- - -
- -
- -
+ -
- -
- {L_UCP_PREFS_PERSONAL} -
-
-
id="viewemail" checked="checked" />  {L_YES}   id="viewemail" checked="checked" />  {L_NO}
-
-
-
-
id="massemail" checked="checked" />  {L_YES}   id="massemail" checked="checked" />  {L_NO}
-
-
-

{L_ALLOW_PM_EXPLAIN}
-
id="allowpm" checked="checked" />  {L_YES}   id="allowpm" checked="checked" />  {L_NO}
-
-
-
-
id="hideonline" checked="checked" />  {L_YES}   id="hideonline" checked="checked" />  {L_NO}
-
-
-

{L_NOTIFY_METHOD_EXPLAIN}
-
id="notifymethod" checked="checked" />  {L_NOTIFY_METHOD_EMAIL}   id="notifymethod" checked="checked" disabled="disabled" />  {L_NOTIFY_METHOD_IM}   id="notifymethod" checked="checked" />  {L_NOTIFY_METHOD_BOTH}
-
-
-
-
id="notifypm" checked="checked" />  {L_YES}   id="notifypm" checked="checked" />  {L_NO}
-
-
-
-
id="popuppm" checked="checked" />  {L_YES}   id="popuppm" checked="checked" />{L_NO}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
id="dst" checked="checked" />  {L_YES}   id="dst" checked="checked" />  {L_NO}
-
-
-

{L_BOARD_DATE_FORMAT_EXPLAIN}
-
-
style="display:none;">
-
-
- -
- {L_UCP_PREFS_POST} -
-
-
id="bbcode" checked="checked" />  {L_YES}   id="bbcode" checked="checked" />  {L_NO}
-
-
-
-
id="smilies" checked="checked" />  {L_YES}   id="smilies" checked="checked" />  {L_NO}
-
-
-
-
id="sig" checked="checked" />  {L_YES}   id="sig" checked="checked" />  {L_NO}
-
-
-
-
id="notify" checked="checked" />  {L_YES}   id="notify" checked="checked" />  {L_NO}
-
-
- -
- {L_UCP_PREFS_VIEW} -
-
-
id="view_images" checked="checked" />  {L_YES}   id="view_images" checked="checked" />  {L_NO}
-
-
-
-
id="view_flash" checked="checked" />  {L_YES}   id="view_flash" checked="checked" />  {L_NO}
-
-
-
-
id="view_smilies" checked="checked" />  {L_YES}   id="view_smilies" checked="checked" />  {L_NO}
-
-
-
-
id="view_sigs" checked="checked" />  {L_YES}   id="view_sigss" checked="checked" />  {L_NO}
-
-
-
-
id="view_avatars" checked="checked" />  {L_YES}   id="view_avatars" checked="checked" />  {L_NO}
-
-
-
-
id="view_wordcensor" checked="checked" />  {L_YES}   id="view_wordcensor" checked="checked" />  {L_NO}
-
-
-
-
{S_TOPIC_SORT_DAYS}
-
-
-
-
{S_TOPIC_SORT_KEY}
-
-
-
-
{S_TOPIC_SORT_DIR}
-
-
-
-
{S_POST_SORT_DAYS}
-
-
-
-
{S_POST_SORT_KEY}
-
-
-
-
{S_POST_SORT_DIR}
-
-
- -
- -
- -
+ -
enctype="multipart/form-data"> - -
- {L_ACP_USER_AVATAR} -
-

{L_AVATAR_EXPLAIN}
-
{AVATAR_IMAGE}
-
 {L_DELETE_AVATAR}
-
- - -
-
-
-
-
-

{L_UPLOAD_AVATAR_URL_EXPLAIN}
-
-
- - -
-

{L_LINK_REMOTE_AVATAR_EXPLAIN}
-
-
-
-

{L_LINK_REMOTE_SIZE_EXPLAIN}
-
px X px
-
- - -
-
-
-
- - -
- -
- {L_AVATAR_GALLERY} -
-
-
 
-
-
- - - - - - - - - - - - - -
{avatar_row.avatar_column.AVATAR_NAME}
-
-
- -
- -
- - -
- -
- -
- - + @@ -541,112 +115,7 @@ - - - -
- - -
- {L_ADMIN_SIG_PREVIEW} -

{SIGNATURE_PREVIEW}

-
- - -
- {L_SIGNATURE} -

{L_SIGNATURE_EXPLAIN}

-
- - - - - - - - - - - - - - - - - - - {L_FONT_SIZE}: - -

- - onmouseover="helpline('cb_{custom_tags.BBCODE_ID}')" /> - - - -
-

-
- -
- -   {L_DISABLE_BBCODE}   - - -   {L_DISABLE_SMILIES}   - - -   {L_DISABLE_MAGIC_URL}   - -

{L_OPTIONS}: {BBCODE_STATUS} :: {IMG_STATUS} :: {FLASH_STATUS} :: {URL_STATUS} :: {SMILIES_STATUS} -
-
- -
-   - -
- -
+ @@ -657,22 +126,25 @@ - {group.GROUP_TYPE} + {group.GROUP_TYPE} - {group.GROUP_NAME} - {L_GROUP_DEFAULT}{L_GROUP_DEFAULT} - {group.L_DEMOTE_PROMOTE} - {L_GROUP_DELETE} + {group.GROUP_NAME} + {L_GROUP_DEFAULT}{L_GROUP_DEFAULT} + {group.L_DEMOTE_PROMOTE}  + {L_GROUP_DELETE} + -
- {L_USER_GROUP_ADD}: -
+ +
+ {L_USER_GROUP_ADD}: +
+ @@ -701,7 +173,7 @@ - {attach.REAL_FILENAME}
{L_PM}: {L_TOPIC}: {attach.TOPIC_TITLE} + {attach.REAL_FILENAME}
{L_PM}: {L_TOPIC}: {attach.TOPIC_TITLE} {attach.POST_TIME} {attach.SIZE} {attach.DOWNLOAD_COUNT} @@ -749,7 +221,7 @@ -
+
 
diff --git a/phpBB/adm/style/acp_users_avatar.html b/phpBB/adm/style/acp_users_avatar.html new file mode 100644 index 0000000000..c2590ebca0 --- /dev/null +++ b/phpBB/adm/style/acp_users_avatar.html @@ -0,0 +1,75 @@ +
enctype="multipart/form-data"> + +
+ {L_ACP_USER_AVATAR} +
+

{L_AVATAR_EXPLAIN}
+
{AVATAR_IMAGE}
+
+
+ + +
+
+
+
+
+

{L_UPLOAD_AVATAR_URL_EXPLAIN}
+
+
+ + +
+

{L_LINK_REMOTE_AVATAR_EXPLAIN}
+
+
+
+

{L_LINK_REMOTE_SIZE_EXPLAIN}
+
px X px
+
+ + +
+
+
+
+ + +
+ +
+ {L_AVATAR_GALLERY} +
+
+
 
+
+
+ + + + + + + + + + + + + +
{avatar_row.avatar_column.AVATAR_NAME}
+
+
+ +
+ +
+ + + + +
+ +
+ +
\ No newline at end of file diff --git a/phpBB/adm/style/acp_users_feedback.html b/phpBB/adm/style/acp_users_feedback.html new file mode 100644 index 0000000000..0f64888170 --- /dev/null +++ b/phpBB/adm/style/acp_users_feedback.html @@ -0,0 +1,76 @@ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
{L_REPORT_BY}{L_IP}{L_TIME}{L_FEEDBACK}{L_MARK}
{log.USERNAME}{log.IP}{log.DATE} + {log.ACTION} +
» [ {log.DATA} ] +
+ +
+

{L_NO_ENTRIES}

+
+ + +
+ {L_DISPLAY_LOG}:  {S_LIMIT_DAYS} {L_SORT_BY}: {S_SORT_KEY} {S_SORT_DIR} + +
+
+ + + + + +
+   + +

{L_MARK_ALL}{L_UNMARK_ALL}

+
+ + +

{L_ADD_FEEDBACK}

+ +

{L_ADD_FEEDBACK_EXPLAIN}

+ +
+ {L_ACP_USER_FEEDBACK} +
+
+
+
+ +
+ +
+ +
\ No newline at end of file diff --git a/phpBB/adm/style/acp_users_overview.html b/phpBB/adm/style/acp_users_overview.html new file mode 100644 index 0000000000..9f8ed9648a --- /dev/null +++ b/phpBB/adm/style/acp_users_overview.html @@ -0,0 +1,143 @@ +
+ +
+ {L_ACP_USER_OVERVIEW} +
+

{L_NAME_CHARS_EXPLAIN}
+
+
[ {L_USE_PERMISSIONS} ]
+
+ +
+
+
{USER_INACTIVE_REASON}
+
+ +
+
+
{USER_REGISTERED}
+
+ +
+
+
{REGISTERED_IP}
+
[ {L_WHOIS} ]
+
+ +
+
+
{USER_LASTACTIVE}
+
+
+
+
{USER_POSTS}
+
+
+
+
{USER_WARNINGS}
+
+
+

{L_FOUNDER_EXPLAIN}
+
+
+
+
+
+
+
+
+

{L_CONFIRM_EMAIL_EXPLAIN}
+
+
+
+

{L_CHANGE_PASSWORD_EXPLAIN}
+
+
+
+

{L_CONFIRM_PASSWORD_EXPLAIN}
+
+
+ +

+ + +

+ +
+ +
+ + + + + +
+ +
+ {L_USER_TOOLS} +
+
+
+
+ + +
+

{L_DELETE_USER_EXPLAIN}
+
+
+
+ + +

+ +

+ +
+ +
+ + diff --git a/phpBB/adm/style/acp_users_prefs.html b/phpBB/adm/style/acp_users_prefs.html new file mode 100644 index 0000000000..99e82ea0db --- /dev/null +++ b/phpBB/adm/style/acp_users_prefs.html @@ -0,0 +1,151 @@ +
+ +
+ {L_UCP_PREFS_PERSONAL} +
+
+
+
+
+
+
+
+
+
+
+

{L_ALLOW_PM_EXPLAIN}
+
+
+
+
+
+
+
+
+
+

{L_NOTIFY_METHOD_EXPLAIN}
+
+ +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+

{L_BOARD_DATE_FORMAT_EXPLAIN}
+
+
style="display:none;">
+
+
+ +
+ {L_UCP_PREFS_POST} +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ +
+ {L_UCP_PREFS_VIEW} +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
{S_TOPIC_SORT_DAYS}
+
+
+
+
{S_TOPIC_SORT_KEY}
+
+
+
+
{S_TOPIC_SORT_DIR}
+
+
+
+
{S_POST_SORT_DAYS}
+
+
+
+
{S_POST_SORT_KEY}
+
+
+
+
{S_POST_SORT_DIR}
+
+
+ +
+ +
+ +
\ No newline at end of file diff --git a/phpBB/adm/style/acp_users_profile.html b/phpBB/adm/style/acp_users_profile.html new file mode 100644 index 0000000000..69edb1159b --- /dev/null +++ b/phpBB/adm/style/acp_users_profile.html @@ -0,0 +1,66 @@ +
+ +
+ {L_USER_PROFILE} +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+

{L_BIRTHDAY_EXPLAIN}
+
{L_DAY}: {L_MONTH}: {L_YEAR}:
+
+
+ + +
+ {L_USER_CUSTOM_PROFILE_FIELDS} + +
+

{profile_fields.LANG_EXPLAIN}
+
{profile_fields.FIELD}
+ +
{profile_fields.ERROR}
+ +
+ +
+ + +
+ +
+ +
\ No newline at end of file diff --git a/phpBB/adm/style/acp_users_signature.html b/phpBB/adm/style/acp_users_signature.html new file mode 100644 index 0000000000..b45e61295e --- /dev/null +++ b/phpBB/adm/style/acp_users_signature.html @@ -0,0 +1,114 @@ + + + +
+ + +
+ {L_ADMIN_SIG_PREVIEW} +

{SIGNATURE_PREVIEW}

+
+ + +
+ {L_SIGNATURE} +

{L_SIGNATURE_EXPLAIN}

+ +
+ + + + + + + + + + + + + + + + + + + {L_FONT_SIZE}: + +

+ + onmouseover="helpline('cb_{custom_tags.BBCODE_ID}')" /> + + + +
+ +

+ +
+
+
+
+
+ + + + + + + + + +
+
{L_OPTIONS}: {BBCODE_STATUS} :: {IMG_STATUS} :: {FLASH_STATUS} :: {URL_STATUS} :: {SMILIES_STATUS}
+
+
+ +
+   + +
+ +
\ No newline at end of file diff --git a/phpBB/adm/style/admin.css b/phpBB/adm/style/admin.css index 3f655663a0..458cae5d97 100644 --- a/phpBB/adm/style/admin.css +++ b/phpBB/adm/style/admin.css @@ -1,33 +1,45 @@ /* phpBB 3.0 Admin Style Sheet - ------------------------------------------------------------------------ - Original author: subBlue ( http://www.subBlue.com/ ) - Copyright 2006 phpBB Group ( http://www.phpbb.com/ ) - ------------------------------------------------------------------------ + ------------------------------------------------------------------------ + Original author: subBlue ( http://www.subblue.com/ ) + Copyright 2007 phpBB Group ( http://www.phpbb.com/ ) + ------------------------------------------------------------------------ */ - /* General markup styles ---------------------------------------- */ * { /* Reset browsers default margin, padding and font sizes */ margin: 0; padding: 0; + font-size: 100%; +} + +body, div, p, th, td, li, dd { + font-size: x-small; + voice-family: "\"}\""; + voice-family: inherit; + font-size: small +} + +html>body, html>div, html>p, html>th, html>td, html>li, html>dd { + font-size: small } html { - font-size: 100%; + color: #536482; + background: #DBD7D1; + /* Always show a scrollbar for short pages - stops the jump when the scrollbar appears. non-ie browsers */ height: 100%; margin-bottom: 1px; - background-color: #E4EDF0; } body { /* Text-Sizing with ems: http://www.clagnut.com/blog/348/ */ font-family: "Lucida Grande", Verdana, Helvetica, Arial, sans-serif; color: #536482; - background: #E4EDF0 url("../images/bg_header.gif") 0 0 repeat-x; - font-size: 62.5%; /* This sets the default font size to be equivalent to 10px */ - margin: 0; + background: #DBD7D1; + font-size: 62.5%; /* This sets the default font size to be equivalent to 10px */ + margin: 10px 15px; } img { @@ -35,15 +47,17 @@ img { } h1 { - font: bold 1.8em "Lucida Grande", 'Trebuchet MS', Verdana, sans-serif; - text-decoration: none; + font-family: "Trebuchet MS", Helvetica, sans-serif; + font-size: 1.70em; + font-weight: normal; color: #333333; } h2, caption { - font: bold 1.2em "Lucida Grande", Arial, Helvetica, sans-serif; - text-decoration: none; - line-height: 120%; + font-family: "Trebuchet MS", Helvetica, sans-serif; + font-size: 1.40em; + font-weight: normal; + color: #115098; text-align: left; margin-top: 25px; } @@ -53,16 +67,17 @@ h2, caption { } h3, h4 { - font: bold 1.2em "Lucida Grande", Arial, Helvetica, sans-serif; + font-family: "Trebuchet MS", Helvetica, sans-serif; + font-size: 1.20em; text-decoration: none; - line-height: 120%; + line-height: 1.20em; margin-top: 25px; } p { margin-bottom: 0.7em; - line-height: 1.4em; - font-size: 1.1em; + line-height: 1.40em; + font-size: 0.90em; } ul { @@ -76,74 +91,88 @@ ul { hr { border: 0 none; - border-top: 1px solid #999999; + border-top: 1px dashed #999999; margin-bottom: 5px; padding-bottom: 5px; height: 1px; } .small { - font-size: 1em; + font-size: 0.85em; } - /* General links */ -a:link, a:active, a:visited { - color: #006699; - text-decoration: none; +a:link, a:visited { + color: #105289; + text-decoration: none; } -a:hover { - color: #DD6900; - text-decoration: underline; +a:hover { + color: #BC2A4D; + text-decoration: underline; } +a:active { + color: #368AD2; + text-decoration: none; +} /* Main blocks ---------------------------------------- */ #wrap { - padding: 0 20px 15px 20px; + padding: 0 0 15px 0; min-width: 615px; } #page-header { + clear: both; text-align: right; - background: url("../images/phpbb_logo.gif") 0 0 no-repeat; - height: 84px; + background: url("../images/phpbb_logo.gif") top left no-repeat; + height: 49px; + font-size: 0.85em; + margin-bottom: 10px; } .rtl #page-header { text-align: left; + background: url("../images/phpbb_logo.gif") top right no-repeat; } #page-header h1 { - font-family: "Lucida Grande", Verdana, Arial, Helvetica, sans-serif; - font-size: 1.5em; - font-weight: normal; - padding-top: 15px; + color: #767676; + font-family: "Trebuchet MS",Helvetica,sans-serif; + font-size: 1.70em; + padding-top: 10px; } #page-header p { - font-size: 1.1em; + font-size: 1.00em; +} + +#page-header p#skip { + display: none; } #page-body { clear: both; + min-width: 700px; } #page-footer { clear: both; - font-size: 1em; + font-size: 0.75em; text-align: center; } #content { - padding: 30px 10px 10px 10px; + padding: 30px 10px 10px; + position: relative; } #content h1 { - line-height: 1.2em; - margin-bottom: 0px; + color: #115098; + line-height: 1.2em; + margin-bottom: 0; } #main { @@ -162,14 +191,19 @@ a:hover { height: 350px; } +.simple-page-body { + padding: 0; + padding-right: 10px; + min-width: 0; +} /* Tabbed menu - Based on: http://www.alistapart.com/articles/slidingdoors2/ + Based on: http://www.alistapart.com/articles/slidingdoors2/ ----------------------------------------*/ #tabs { line-height: normal; margin: 0 0 -6px 7px; - min-width: 570px; + min-width: 600px; } .rtl #tabs { @@ -186,38 +220,37 @@ a:hover { display: inline; margin: 0; padding: 0; - font-size: 1em; + font-size: 0.85em; font-weight: bold; } #tabs a { float: left; - background:url("../images/bg_tabs1.gif") no-repeat 0% -35px; + background:url("../images/bg_tabs1.gif") no-repeat 0% -34px; margin: 0 1px 0 0; - padding: 0 0 0 6px; + padding: 0 0 0 7px; text-decoration: none; position: relative; } .rtl #tabs a { float: right; - margin: 0 0 0 1px; - padding: 0 6px 0 0; } #tabs a span { float: left; display: block; - background: url("../images/bg_tabs2.gif") no-repeat 100% -35px; - padding: 7px 12px 6px 6px; - color: #536482; + background: url("../images/bg_tabs2.gif") no-repeat 100% -34px; + padding: 7px 10px 4px 4px; + color: #767676; white-space: nowrap; + font-family: Arial, Helvetica, sans-serif; text-transform: uppercase; + font-weight: bold; } .rtl #tabs a span { - float: left; - padding: 7px 6px 6px 12px; + float: right; } /* Commented Backslash Hack hides rule from IE5-Mac \*/ @@ -225,72 +258,137 @@ a:hover { /* End hack */ #tabs a:hover span { - color: #DD6900; + color: #BC2A4D; } #tabs #activetab a { - background-position: 0 0px; - border-bottom: 1px solid #FFFFFF; + background-position: 0 0; + border-bottom: 1px solid #DCDEE2; } #tabs #activetab a span { - background-position: 100% 0px; - padding-bottom: 7px; - color: #333333; + background-position: 100% 0; + padding-bottom: 5px; + color: #23649F; } #tabs a:hover { - background-position: 0 -70px; + background-position: 0 -69px; } #tabs a:hover span { - background-position:100% -70px; + background-position: 100% -69px; } #tabs #activetab a:hover span { - color: #333333; + color: #115098; } /* Main Panel ---------------------------------------- */ -.panel { +#acp { margin: 4px 0; + padding: 3px 1px; + min-width: 550px; background-color: #FFFFFF; - border: solid 1px #A9B8C2; + border: 1px #999999 solid; +} + +.panel { + background: #F3F3F3 url("../images/innerbox_bg.gif") repeat-x top; + padding: 0; } span.corners-top, span.corners-bottom, span.corners-top span, span.corners-bottom span { - display: none; + font-size: 1px; + line-height: 1px; + display: block; + height: 5px; + background-repeat: no-repeat; } +span.corners-top { + background-image: url("../images/corners_left.gif"); + background-position: 0 0; + margin: -4px -2px 0; +} + +span.corners-top span { + background-image: url("../images/corners_right.gif"); + background-position: 100% 0; +} + +span.corners-bottom { + background-image: url("../images/corners_left.gif"); + background-position: 0 100%; + margin: 0 -2px -4px; + clear: both; +} + +span.corners-bottom span { + background-image: url("../images/corners_right.gif"); + background-position: 100% 100%; +} + +/* WinIE tweaks \*/ +* html span.corners-top, * html span.corners-bottom { background-image: url("../images/corners_left.gif"); } +* html span.corners-top span, * html span.corners-bottom span { background-image: url("../images/corners_right.gif"); } +/* End tweaks */ /* Sub-navigation Menu ---------------------------------------- */ + +/* Toggle */ +#toggle { + padding: 5px; + width: 5%; + height: 100px; + position: absolute; + left: 15%; + top: 28px; + margin-left: 2px; +} + +#toggle-handle { + display: block; + width: 18px; + height: 19px; + float: right; + background-image: url(../images/toggle.gif); +} + +/* Menu */ #menu { float: left; width: 20%; - font-size: 100%; + font-size: 1.00em; padding: 0; + border-right: 1px solid #CCCFD3; } .rtl #menu { float: right; + border: none; + border-left: 1px solid #CCCFD3; } #menu p { - font-size: 1em; + font-size: 0.85em; } #menu ul { list-style: none; margin: 0; + padding: 0; } /* Default list state */ #menu li { - font-size: 1em; + padding: 0; + margin: 0; + font-size: 0.85em; font-weight: bold; display: inline; } @@ -298,197 +396,332 @@ span.corners-top span, span.corners-bottom span { /* Link styles for the sub-section links */ #menu li span { display: block; - padding: 3px 2px 3px 10px; + padding: 3px 3px 3px 8px; + margin: 1px 0; text-decoration: none; font-weight: normal; - color: #006699; - font-weight: bold; - background-color: #ECECEC; - border-top: 1px solid #FFFFFF; + color: #138ECB; } -#menu li a:hover span, #menu li#activemenu span, #menu li a:hover { +.rtl #menu li span { + padding: 3px 8px 3px 3px; +} + +#menu li a:hover, #menu li a:hover span { text-decoration: none; - background-color: #FFA34F; - color: #FFFFFF; + background-color: #FFFFFF; + + color: #BC2A4D; } -#menu li span.completed { - text-decoration: none; - background-color: #B9DBB3; - color: #006699; -} - -#menu li.header { - display: block; - padding: 5px; - font-size: 0.9em; - font-family: "Lucida Grande", Verdana; - color: #FFA34F; - font-weight: bold; - background: #006699 url("../images/cellpic3.gif") 0 0 repeat-x; - margin-top: 5px; - text-transform: uppercase; +#menu li a:active, #menu li a:active span { + color: #F632A0; } #menu li#activemenu a span { text-decoration: none; font-weight: bold; - color: #000; - background-color: #DADFE4; + color: #1180B7; + background: transparent url("../images/arrow_right.gif") 0% 50% no-repeat; } -#menu li#activemenu a:hover span { +.rtl #menu li#activemenu a span { + background: transparent url("../images/arrow_left.gif") 100% 50% no-repeat; +} + +#menu li#activemenu a:hover span, #menu li#activemenu span { text-decoration: none; - color: #000; + font-weight: bold; + color: #BC2A4D; + background: #FFFFFF url("../images/arrow_right.gif") 1% 50% no-repeat; } +.rtl #menu li#activemenu a:hover span, .rtl #menu li#activemenu span { + background: #FFFFFF url("../images/arrow_left.gif") 99% 50% no-repeat; +} + +#menu li a:active, #menu li a:active span, #menu li#activemenu a:active span { + color: #F632A0; +} + +#menu li span.completed { + text-decoration: none; + padding: 3px 3px 3px 12px; + background: url("../images/arrow_down.gif") 1% 50% no-repeat; +} + +.rtl #menu li span.completed { + text-decoration: none; + padding: 3px 12px 3px 3px; + background: url("../images/arrow_down.gif") 99% 50% no-repeat; +} + +#menu li.header { + font-family: Tahoma, Helvetica, sans-serif; + display: block; + font-weight: bold; + color: #115098; + border-bottom: 1px solid #327AA5; + padding: 4px 0 2px; + margin-top: 15px; + text-transform: uppercase; + font-size: 0.75em; +} /* Table styles ---------------------------------------- */ table { width: 100%; - /*background-color: #ACBBC6;*/ + border: 1px solid #CCCFD3; + background-color: #FFFFFF; + padding: 1px; } -th, td { - font-family: "Lucida Grande", Verdana, Arial, Helvetica, sans-serif; - font-size: 1.1em; +th { + padding: 3px 4px; + color: #FFFFFF; + background: #70AED3 url("../images/gradient2b.gif") bottom left repeat-x; + border-top: 1px solid #6DACD2; + border-bottom: 1px solid #327AA5; text-align: left; + font-size: 0.75em; + text-transform: uppercase; +} + +td { + text-align: left; + font-size: 0.85em; + padding: 4px; + line-height: 1.20em; } .rtl th, .rtl td { text-align: right; } -th { - padding: 6px 4px; - color: #FFA34F; - font-weight: bold; - background: #006699 url("../images/cellpic3.gif") 0 0 repeat-x; - white-space: nowrap; -} - -td { - padding: 4px; - line-height: 1.2em; -} - -.row1 { background-color: #EFEFEF;} -.row2 { background-color: #DEE3E7;} -.row3 { background-color: #D1D7DC;} -.row4 { background-color: #E4E8EB;} -.col1 { background-color: #DEE3E7;} -.col2 { background-color: #EFEFEF;} - -.spacer { - background-color: #D1D7DC; - height: 1px; - line-height: 1px; -} - table.type2 { border: none; background: none; padding: 0; - width: 0; } table.type2 th { background: none; border-top: none; text-align: center; - color: #FFA34F; + color: #115098; padding: 2px 0; } table.type2 td { padding: 0; + font-size: 1em; } +table.type2 td.name { + padding: 2px; + vertical-align: middle; +} + +table.type3 { + float: right; + width: 300px; + border: none; + background-color: transparent; + padding: 0; +} + +.rtl table.type3 { + float: left; +} + +table.type3 thead th { + background-color: transparent; + border-top: none; + text-align: center; + color: #115098; + padding: 0 3px; + font-size: 0.85em; + font-weight: normal; + text-transform: none; +} + +table.type3 tbody th { + border-top: none; + text-align: left; + text-transform: none; + padding: 0; + border: none; + font-size: 0.90em; + font-weight: normal; + width: 100%; +} + +.rtl table.type3 tbody th { + text-align: right; +} + +table.type3 td { + text-align: center; + padding: 1px; +} + +th.name { + text-align: left; + width: auto; +} + +.rtl th.name { + text-align: right; +} + +td.name { + text-align: left; + font-weight: bold; +} + +.rtl td.name { + text-align: right; +} + +.entry { + text-align: left; + font-weight: normal; +} + +.rtl .entry { + text-align: right; +} + +.row1 { background-color: #F9F9F9; } +.row2 { background-color: #DCEBFE; } +.row3 { background-color: #DBDFE2; } +.row4 { background-color: #E4E8EB; } +.col1 { background-color: #DCEBFE; } +.col2 { background-color: #F9F9F9; } + +.spacer { + background-color: #DBDFE2; + height: 1px; + line-height: 1px; +} /* General form styles ----------------------------------------*/ fieldset { - background-color: #DDD; - padding: 10px; margin: 15px 0; - border-right: 1px solid #AFAEAA; - border-bottom: 1px solid #AFAEAA; - border-left: 1px solid #D5D5C8; - border-top: 1px solid #D5D5C8; - background-color: #ECECEC; + padding: 10px; + border-top: 1px solid #D7D7D7; + border-right: 1px solid #CCCCCC; + border-bottom: 1px solid #CCCCCC; + border-left: 1px solid #D7D7D7; + background-color: #FFFFFF; position: relative; } .rtl fieldset { - border-right: 1px solid #D5D5C8; - border-bottom: 1px solid #AFAEAA; - border-left: 1px solid #AFAEAA; - border-top: 1px solid #D5D5C8; + border-top: 1px solid #D7D7D7; + border-right: 1px solid #D7D7D7; + border-bottom: 1px solid #CCCCCC; + border-left: 1px solid #CCCCCC; } -legend { - position: absolute; - top: -0.5em; - font-size: 1.1em; - color:#006699; - font-family: "Lucida Grande",Arial,Verdana,Sans-serif; - font-weight: bold; - line-height: 100%; - text-transform: uppercase; +* html fieldset { + padding: 0 10px 5px 10px; } fieldset p { - font-size: 1.1em; + font-size: 0.85em; } -input { - font-family: "Lucida Grande", Verdana, Helvetica, Arial, sans-serif; - font-size: 100%; +legend { + padding: 1px 0; + font-family: Tahoma,arial,Verdana,Sans-serif; + font-size: .9em; + font-weight: bold; + color: #115098; + margin-top: -.4em; + position: relative; + text-transform: none; + line-height: 1.2em; + top: 0; + vertical-align: middle; +} + +/* Hide from macIE \*/ +legend { top: -1.2em; } +/* end */ + +* html legend { + margin: 0 0 -10px -7px; + line-height: 1em; + font-size: .85em; +} + +/* Holly hack, .rtl comes after html */ +* html .rtl legend { + margin: 0; + margin-right: -7px; +} + +input, textarea { + font-family: Verdana, Helvetica, Arial, sans-serif; + font-size: 0.90em; font-weight: normal; - background-color: #FAFAFA; + cursor: text; + vertical-align: middle; + padding: 2px; + color: #111111; border-left: 1px solid #AFAEAA; border-top: 1px solid #AFAEAA; border-right: 1px solid #D5D5C8; border-bottom: 1px solid #D5D5C8; - color: #333333; - padding: 2px; - cursor: text; - vertical-align: middle; + background-color: #E3DFD8; } -.rtl input { +.rtl input, .rtl textarea { border-left: 1px solid #D5D5C8; border-top: 1px solid #AFAEAA; border-right: 1px solid #AFAEAA; border-bottom: 1px solid #D5D5C8; } +input:hover, textarea:hover { + border-left: 1px solid #AFAEAA; + border-top: 1px solid #AFAEAA; + border-right: 1px solid #AFAEAA; + border-bottom: 1px solid #AFAEAA; + background-color: #E9E9E2; +} + input.langvalue, textarea.langvalue { width: 90%; } -select { - font-family: "Lucida Grande", Verdana, Helvetica, Arial, sans-serif; - font-size: 100%; +optgroup, select { + font-family: Verdana, Helvetica, Arial, sans-serif; + font-size: 0.85em; font-weight: normal; font-style: normal; - cursor: default; + cursor: pointer; vertical-align: middle; width: auto; - border: 1px solid #666666; - padding: 1px; - background-color: #FAFAFA; + color: #000; } optgroup { + font-size: 1.00em; font-weight: bold; } option { padding: 0 1em 0 0; + color: #000; +} + +option.disabled-option { + color: #aaa; } .rtl option { @@ -496,33 +729,23 @@ option { } .sep { - color: black; + font-weight: bold; +} + +.username-coloured { font-weight: bold; } textarea { - font-family: "Lucida Grande", Verdana, Helvetica, Arial, sans-serif; - font-size: 100%; + font-family: Verdana, Helvetica, Arial, sans-serif; + font-size: 0.85em; width: 60%; padding: 2px; - background-color: #FAFAFA; - border-left: 1px solid #AFAEAA; - border-top: 1px solid #AFAEAA; - border-right: 1px solid #D5D5C8; - border-bottom: 1px solid #D5D5C8; - cursor: text; -} - -.rtl textarea { - border-left: 1px solid #D5D5C8; - border-top: 1px solid #AFAEAA; - border-right: 1px solid #AFAEAA; - border-bottom: 1px solid #D5D5C8; } label { cursor: pointer; - font-size: 1.1em; + font-size: 0.85em; padding: 0 5px 0 0; } @@ -531,7 +754,7 @@ label { } label input { - font-size: 100%; + font-size: 1.00em; vertical-align: middle; } @@ -545,7 +768,6 @@ fieldset.quick, p.quick { border: none; background-color: transparent; text-align: right; - font-size: 1.1em; } .rtl fieldset.quick, .rtl p.quick { @@ -557,7 +779,6 @@ fieldset.quick legend { } fieldset.tabulated { -/* background-color: #DADFE4;*/ background: none; margin: 0; padding: 0; @@ -574,7 +795,6 @@ fieldset.nobg { padding: 0; border: none; background-color: transparent; - font-size: 1.1em; } fieldset.display-options { @@ -583,11 +803,11 @@ fieldset.display-options { border: none; background-color: transparent; text-align: center; - font-size: 1.1em; + font-size: 0.75em; } fieldset.display-options select, fieldset.display-options input, fieldset.display-options label { - font-size: 100%; + font-size: 1.00em; vertical-align: middle; } @@ -602,12 +822,12 @@ select#full_folder_action { width: 95%; } - /* Definition list layout for forms - Other general def. list properties defined in prosilver_main.css + Other general def. list properties defined in prosilver_main.css ---------------------------------------- */ dl { - font-family: "Lucida Grande", Verdana, Helvetica, Arial, sans-serif; + font-family: Verdana, Helvetica, Arial, sans-serif; + font-size: 1.00em; } dt { @@ -619,7 +839,7 @@ dt { float: right; } -dd { color: #000;} +dd { color: #666666;} dd + dd { padding-top: 5px;} dt span { padding: 0 5px 0 0;} .rtl dt span { padding: 0 0 0 5px;} @@ -627,9 +847,10 @@ dt span { padding: 0 5px 0 0;} dt .explain { font-style: italic;} dt label { - font-size: 100%; + font-size: 1.00em; text-align: left; font-weight: bold; + color: #4A5A73; } .rtl dt label { @@ -637,8 +858,10 @@ dt label { } dd label { + font-size: 1.00em; white-space: nowrap; margin: 0 10px 0 0; + color: #4A5A73; } .rtl dd label { @@ -647,62 +870,63 @@ dd label { html>body dd label input { vertical-align: text-bottom;} /* Tweak for Moz to align checkboxes/radio buttons nicely */ -dd input, +dd input { + font-size: 1.00em; + max-width: 100%; +} + dd select { + font-size: 100%; + width: auto; max-width: 100%; } dd textarea { - width: 100%; -} - -input.radio, input.perm_cb { - width: auto !important; - background-color: transparent; - border: none; - cursor: default; + font-size: 0.90em; + width: 90%; } dd select { width: auto; - font-size: 100%; + font-size: 1.00em; } fieldset dl { margin-bottom: 10px; - font-size: 1.1em; + font-size: 0.85em; } fieldset dt { width: 45%; text-align: left; border: none; - border-right: 1px solid #CCC; + border-right: 1px solid #CCCCCC; padding-top: 3px; } .rtl fieldset dt { text-align: right; border: none; - border-left: 1px solid #CCC; + border-left: 1px solid #CCCCCC; } fieldset dd { margin: 0 0 0 45%; padding: 0 0 0 5px; border: none; - border-left: 1px solid #CCC; + border-left: 1px solid #CCCCCC; vertical-align: top; + font-size: 1.00em; } .rtl fieldset dd { margin: 0 45% 0 0; padding: 0 5px 0 0; border: none; - border-right: 1px solid #CCC; + border-right: 1px solid #CCCCCC; } -dd.full { +dd.full, .rtl dd.full { margin: 0; border: 0; padding: 0; @@ -712,20 +936,30 @@ dd.full { } /* Hover highlights for form rows */ +fieldset dl:hover dt, fieldset dl:hover dd { + border-color: #666666; +} + fieldset dl:hover dt label { color: #000000; } -input:focus, textarea:focus { - color: #000000; +fieldset dl dd label:hover { + color: #BC2A4D; } +input:focus, textarea:focus { + border: 1px solid #BC2A4D; + background-color: #E9E9E2; + color: #BC2A4D; +} /* Submit button fieldset or paragraph ---------------------------------------- */ fieldset.submit-buttons { text-align: center; - background-color: #DADFE4; + border: none; + background-color: transparent; margin: 0; padding: 4px; margin-top: -1px; @@ -746,44 +980,14 @@ fieldset.submit-buttons legend { display: none; } - /* Input field styles ---------------------------------------- */ -.inputbox { - border-left: 1px solid #AFAEAA; - border-top: 1px solid #AFAEAA; - border-right: 1px solid #D5D5C8; - border-bottom: 1px solid #D5D5C8; - background-color: #E3DFD8; - color: #111111; - font-size: 100%; - padding:2px; - cursor: text; - width: 75%; -} -.rtl .inputbox { - border-left: 1px solid #D5D5C8; - border-top: 1px solid #AFAEAA; - border-right: 1px solid #AFAEAA; - border-bottom: 1px solid #D5D5C8; -} - -select.inputbox { - cursor: pointer; - padding: 0; - width: auto; -} - -.inputbox:hover { - border: 1px solid #AFAEAA; - background-color: #E9E9E2; -} - -.inputbox:focus { - border: 1px solid #BC2A4D; - background-color: #E9E9E2; - color: #BC2A4D; +input.radio, input.permissions-checkbox { + width: auto !important; + background-color: transparent; + border: none; + cursor: default; } input.full, @@ -798,75 +1002,25 @@ input.tiny { width: 10%;} input.autowidth { width: auto !important;} .box2 .inputbox { background-color: #E9E9E9;} - -/* Pagination ----------------------------------------- */ -.pagination { - height: 1%; /* IE tweak (holly hack) */ - width: auto; - text-align: right; - margin-top: 5px; - font-size: 1em; - padding-bottom: 2px; -} - -.rtl .pagination { - text-align: left; -} - -.pagination strong, -.pagination b { - font-weight: normal; -} - -.pagination span strong { - padding: 0 2px; - margin: 0 2px; - font-weight: normal; - color: #FFFFFF; - background: #069; - border: 1px solid #069; -} - -.pagination span a, .pagination span a:link, .pagination span a:visited, .pagination span a:active { - font-weight: normal; - text-decoration: none; - color: #5C758C; - margin: 0 2px; - padding: 0 2px; - background: #ECEDEE; - border: 1px solid #B4BAC0; -} - -.pagination span a:hover { - border-color: #069; - background: #069; - color: #FFF; - text-decoration: none; -} - -.pagination img { - vertical-align: middle; -} - - /* Form button styles ---------------------------------------- */ -a.button1, input.button1, input.button3, -a.button2, input.button2 { +a.button1, input.button1, input.button3, +a.button2, input.button2 { width: auto !important; padding: 1px 3px 0 3px; font-family: "Lucida Grande", Verdana, Helvetica, Arial, sans-serif; color: #000; - background-color: #EFEFEF; + font-size: 0.85em; + background: #EFEFEF url("../images/bg_button.gif") repeat-x top; cursor: pointer; } a.button1, input.button1 { font-weight: bold; - border: 1px solid #666666; + border: 1px solid #666666; } +/* Alternative button */ a.button2, input.button2 { border: 1px solid #666666; } @@ -879,53 +1033,128 @@ a.button2, a.button2:link, a.button2:visited, a.button2:active { padding: 4px 8px; } +/* Hover states */ +a.button1:hover, input.button1:hover, +a.button2:hover, input.button2:hover { + border: 1px solid #BC2A4D; + background: #EFEFEF url("../images/bg_button.gif") repeat bottom; + color: #BC2A4D; +} + input.disabled { font-weight: normal; - color: #666; + color: #666666; } -/* Action Highlighting +/* Pagination ---------------------------------------- */ -.success { - color: #282 !important; +.pagination { + height: 1%; /* IE tweak (holly hack) */ + width: auto; + text-align: right; + margin-top: 5px; + font-size: 0.85em; + padding-bottom: 2px; } -.error { - color: #BC2A4D !important; +.rtl .pagination { + text-align: left; } -.successbox, .errorbox { - padding: 10px; - margin: 20px 0; - color: #1F5B13; - text-align: center; +.pagination strong, +.pagination b { + font-weight: normal; } -.successbox { - background-color: #B9DBB3; +.pagination span.page-sep { + display:none; } -.errorbox { - background-color: #ECD7DA; - color: #990000; +.pagination span strong { + padding: 0 2px; + margin: 0 2px; + font-weight: normal; + font-size: 0.85em; + color: #FFFFFF; + background: #4692BF; + border: 1px solid #4692BF; } -.successbox h3, .errorbox h3 { - font-weight: bold; - font-size: 1.4em; - margin-bottom: 0.5em; +.pagination span a, .pagination span a:link, .pagination span a:visited, .pagination span a:active { + font-weight: normal; + font-size: 0.85em; + text-decoration: none; + color: #5C758C; + margin: 0 2px; + padding: 0 2px; + background: #ECEDEE; + border: 1px solid #B4BAC0; } -.successbox p, .errorbox p { - font-size: 1.1em; - margin-bottom: 0; -} - -.successbox a, .errorbox a { - font-weight: bold; +.pagination span a:hover { + border-color: #368AD2; + background: #368AD2; + color: #FFFFFF; text-decoration: none; } +.pagination img { + vertical-align: middle; +} + + +/* Action Highlighting +---------------------------------------- */ +.successbox, .errorbox { + padding: 8px; + margin: 10px 0; + color: #FFFFFF; + text-align: center; +} + +.success { + color: #228822; +} + +.error { + color: #BC2A4D; +} + +.successbox { + background-color: #228822; +} + +.errorbox { + background-color: #BC2A4D; +} + +* html .errorbox, * html .successbox { height: 1%; } /* Pixel shift fix for IE */ + +.successbox h3, .errorbox h3 { + color: #FFFFFF; + margin: 0 0 0.5em; + font-size: 1.10em; + font-family: "Lucida Grande",Verdana,Helvetica,Arial,sans-serif; +} + +.successbox p, .errorbox p { + color: #FFFFFF; + font-size: 0.85em; + margin-bottom: 0; +} + +.errorbox a:link, .errorbox a:active, .errorbox a:visited, +.successbox a:link, .successbox a:active, .successbox a:visited { + color: #DBD7D1; + text-decoration: underline; + font-weight: bold; +} + +.errorbox a:hover, .successbox a:hover { + color: #FFFFFF; + text-decoration: none; + font-weight: bold; +} /* Special cases for the error page */ #errorpage #page-header a { @@ -954,17 +1183,19 @@ input.disabled { width: 200px; color: #000; text-align: center; + border: 1px solid #AAA; } .tooltip span.top { background: #EFEFEF; font-weight: bold; + padding: 2px; } .tooltip span.bottom { padding: 5px; - color: #000; - background: #fff; + color: #000000; + background: #FFFFFF; } /* @@ -979,7 +1210,7 @@ input.disabled { } /* Nice method for clearing floated blocks without having to insert any extra markup - From http://www.positioniseverything.net/easyclearing.html */ + From http://www.positioniseverything.net/easyclearing.html */ .clearfix:after, #tabs:after, .row:after, #content:after, fieldset dl:after, #page-body:after { content: "."; display: block; @@ -999,11 +1230,11 @@ input.disabled { .sourcenum { color: gray; font-family: Monaco, 'Courier New', monospace; - font-size: 125%; + font-size: 1.25em; font-weight: bold; - line-height: 120%; + line-height: 1.20em; text-align: right; - padding: 0px; + padding: 0; } .rtl .sourcenum { @@ -1012,9 +1243,9 @@ input.disabled { .source { font-family: Monaco, 'Courier New', monospace; - font-size: 125%; - line-height: 120%; - padding: 0px; + font-size: 1.25em; + line-height: 1.20em; + padding: 0; } .syntaxbg { @@ -1044,66 +1275,67 @@ input.disabled { /* Permission interface ---------------------------------------- */ -fieldset.perm legend { +fieldset.permissions legend { text-transform: none; } -fieldset.perm legend input{ + +fieldset.permissions legend input{ height: 1.1em; } /* Permission sections */ -fieldset.perm .perm_simple { +fieldset.permissions .permissions-simple { text-align: left; padding-top: 3px; } -.rtl fieldset.perm .perm_simple { +.rtl fieldset.permissions .permissions-simple { text-align: right; } -fieldset.perm .perm_advanced { +fieldset.permissions .permissions-advanced { padding: 10px 0 0 5px; vertical-align: top; clear: right; } -.rtl fieldset.perm .perm_advanced { +.rtl fieldset.permissions .permissions-advanced { padding: 10px 5px 0 0; clear: left; } -fieldset.perm .perm_switch { +fieldset.permissions .permissions-switch { float: right; - font-size: 1.1em; } -.rtl fieldset.perm .perm_switch { +.rtl fieldset.permissions .permissions-switch { float: left; } -.perm_switch a { +.permissions-switch a { text-decoration: underline; + font-size: 0.90em; } /* Tabbed menu */ -.perm_cat { +.permissions-category { line-height: normal; - margin: 0 0 0 7px; + margin: 0 0 -1px 7px; min-width: 570px; - font-size: 1em; + font-size: 0.85em; } -.rtl .perm_cat { - margin: 0 7px 0 0; +.rtl .permissions-category { + margin: 0 7px -1px 0; } -.perm_cat ul { +.permissions-category ul { margin: 0; padding: 0; list-style: none; } -.perm_cat li { +.permissions-category li { display: inline; margin: 0; padding: 0; @@ -1111,71 +1343,68 @@ fieldset.perm .perm_switch { font-weight: bold; } -.perm_cat a { +.permissions-category a { float: left; - background: url("../images/bg_tabs1.gif") no-repeat 0% -35px; + background: url("../images/bg_tabs_alt1.gif") no-repeat 0% -35px; margin: 0 1px 0 0; padding: 0 0 0 6px; text-decoration: none; position: relative; } -.rtl .perm_cat a { +.rtl .permissions-category a { float: right; - margin: 0 0 0 1px; - padding: 0 6px 0 0; } -.perm_cat a span.tabbg { +.permissions-category a span.tabbg { float: left; display: block; - background: url("../images/bg_tabs2.gif") no-repeat 100% -35px; + background: url("../images/bg_tabs_alt2.gif") no-repeat 100% -35px; padding: 7px 12px 6px 6px; color: #536482; white-space: nowrap; } -.rtl .perm_cat a span.tabbg { - float: left; - padding: 7px 6px 6px 12px; +.rtl .permissions-category a span.tabbg { + float: right; } /* Commented Backslash Hack hides rule from IE5-Mac \*/ -.perm_cat a span.tabbg, .rtl .perm_cat a span.tabbg { float: none;} +.permissions-category a span.tabbg, .rtl .permissions-category a span.tabbg { float: none;} /* End hack */ -.perm_cat a:hover span.tabbg { +.permissions-category a:hover span.tabbg { color: #DD6900; } -.perm_cat .activetab a { - background-position: 0 0px; +.permissions-category .activetab a { + background-position: 0 0; } -.perm_cat .activetab a span.tabbg { - background-position: 100% 0px; +.permissions-category .activetab a span.tabbg { + background-position: 100% 0; padding-bottom: 7px; color: #333333; } -.perm_cat a:hover { +.permissions-category a:hover { background-position: 0 -70px; } -.perm_cat a:hover span.tabbg { +.permissions-category a:hover span.tabbg { background-position: 100% -70px; } -.perm_cat .activetab a:hover span.tabbg { +.permissions-category .activetab a:hover span.tabbg { color: #333333; - background-position: 100% 0px; + background-position: 100% 0; } -.perm_cat .activetab a:hover { - background-position: 0 0px; +.permissions-category .activetab a:hover { + background-position: 0 0; } -.perm_cat a span.colour { +.permissions-category a span.colour { border: 1px solid #536482; display: block; float: left; @@ -1184,74 +1413,74 @@ fieldset.perm .perm_switch { margin: 0 5px 0 0; } -.rtl .perm_cat a span.colour { +/* Most browsers will have to live with a left aligned icon in RTL mode, as (currently) only Firefox 3.0 Alpha 3 renders it correctly without destroying it +.rtl .permissions-category a span.colour { float: right; margin: 0 0 0 5px; } +*/ -.perm_cat .activetab span.colour { +.permissions-category .activetab span.colour { border-color: #333333; } -.perm_cat a:hover span.colour { +.permissions-category a:hover span.colour { border-color: #DD6900; } -.perm_cat .activetab a:hover span.colour { +.permissions-category .activetab a:hover span.colour { border-color: #333333; } /* Permission preset colours */ -.perm_preset_yes span.colour, +.permissions-preset-yes span.colour, .yes { background-color: #86F786; } -.perm_preset_custom span.colour { +.permissions-preset-custom span.colour { background-color: #B2BBDD; } -.perm_preset_never span.colour { +.permissions-preset-never span.colour { background-color: #DD0000; } -.perm_preset_no span.colour, +.permissions-preset-no span.colour, .never { background-color: #EFB0B2; } -/* Pemrission panel +/* Permission panel ---------------------------------------- */ -.perm_panel { +.permissions-panel { float: left; - background-color: #FFF; + background-color: #CADCEB; width: 100%; - border: 1px solid #A9B8C2; - margin-top: -1px; } -.rtl .perm_panel { +.rtl .permissions-panel { float: right; } -.perm_panel span.corners-top { +.permissions-panel span.corners-top { background-image: url("../images/corners_left2.gif"); } -.perm_panel span.corners-top span { +.permissions-panel span.corners-top span { background-image: url("../images/corners_right2.gif"); } -.perm_panel span.corners-bottom { +.permissions-panel span.corners-bottom { background-image: url("../images/corners_left2.gif"); } -.perm_panel span.corners-bottom span { +.permissions-panel span.corners-bottom span { background-image: url("../images/corners_right2.gif"); } -.perm_panel span.corners-top, .perm_panel span.corners-bottom, -.perm_panel span.corners-top span, .perm_panel span.corners-bottom span { +.permissions-panel span.corners-top, .permissions-panel span.corners-bottom, +.permissions-panel span.corners-top span, .permissions-panel span.corners-bottom span { font-size: 1px; line-height: 1px; display: block; @@ -1259,88 +1488,107 @@ fieldset.perm .perm_switch { background-repeat: no-repeat; } -.perm_panel span.corners-top { +.permissions-panel span.corners-top { background-image: url("../images/corners_left2.gif"); background-position: 0 0; margin: 0 0; } -.perm_panel span.corners-top span { +.permissions-panel span.corners-top span { background-image: url("../images/corners_right2.gif"); background-position: 100% 0; } -.perm_panel span.corners-bottom { +.permissions-panel span.corners-bottom { background-image: url("../images/corners_left2.gif"); background-position: 0 100%; margin: 0 0; clear: both; } -.perm_panel span.corners-bottom span { +.permissions-panel span.corners-bottom span { background-image: url("../images/corners_right2.gif"); background-position: 100% 100%; } /* Permission table ---------------------------------------- */ -.perm_panel .tablewrap { +.permissions-panel .tablewrap { margin: 0 10px; } -.perm_panel table { +.permissions-panel table { width: 100%; } -.perm_panel th { +.permissions-panel th { text-transform: none; } -.perm_panel th.value { +.permissions-panel th.value { text-align: center; } -.perm_panel th.name { +.permissions-panel th.name { text-align: left; width: auto; text-transform: none; } -.rtl .perm_panel th.name { +.rtl .permissions-panel th.name { text-align: right; } -.perm_panel th.permission_name { +.permissions-panel th.permissions-name { border: none; color: #536482; font-weight: normal; } -.perm_panel th.permission_name a.trace { +.permissions-panel th.permissions-name a.trace { display: inline; } -.perm_panel th.row3 { +.permissions-panel th.row3 { background-image: none; - background-color: #D1D7DC; + background-color: #D1D7DC; + color: #536482; + border: none; } -.perm_panel th.row4 { +.permissions-panel th.row4 { background-image: none; - background-color: #E4E8EB; + background-color: #E4E8EB; + color: #536482; + border: none; } -.perm_panel th a:link, .perm_panel th a:hover, .perm_panel th a:visited { +.permissions-panel th a:link, .permissions-panel th a:hover, .permissions-panel th a:visited { display: block; - color: #FFA34F; + color: #FFFFFF; text-decoration: underline; } -.perm_panel td { - padding: 0; - text-align: center; +.permissions-panel td.permissions-yes label:hover { + background-color: #86F786; } -.perm_panel td label { - display: block; +.permissions-panel td.permissions-no label:hover { + background-color: #EFB0B2; +} + +.permissions-panel td.permissions-never label:hover { + background-color: #DD0000; +} + +.permissions-panel td { + padding: 0; + text-align: center; + width: 10%; +} + +.permissions-panel td label { + display: block; + margin: 0; + padding: 0; } diff --git a/phpBB/adm/style/colour_swatch.html b/phpBB/adm/style/colour_swatch.html index e7d7d03f14..f52f3217c5 100644 --- a/phpBB/adm/style/colour_swatch.html +++ b/phpBB/adm/style/colour_swatch.html @@ -1,5 +1,5 @@ - + diff --git a/phpBB/adm/style/confirm_body.html b/phpBB/adm/style/confirm_body.html index 6c1894e748..2fbb1a60d7 100644 --- a/phpBB/adm/style/confirm_body.html +++ b/phpBB/adm/style/confirm_body.html @@ -3,7 +3,7 @@
-

{MESSAGE_TITLE}

+

{MESSAGE_TITLE}

{MESSAGE_TEXT}

{S_HIDDEN_FIELDS} diff --git a/phpBB/adm/style/confirm_body_prune.html b/phpBB/adm/style/confirm_body_prune.html new file mode 100644 index 0000000000..9481386231 --- /dev/null +++ b/phpBB/adm/style/confirm_body_prune.html @@ -0,0 +1,30 @@ + + + + +
+

{MESSAGE_TITLE}

+

{MESSAGE_TEXT}

+ + {S_HIDDEN_FIELDS} + +
+   + +
+ +

{L_PRUNE_USERS_LIST}

+

{L_PRUNE_USERS_LIST_DEACTIVATE}

{L_PRUNE_USERS_LIST_DELETE}

+ +
+ + » {users.USERNAME} [{L_USER_ADMIN}]
+ + +

+ +
+ + + + diff --git a/phpBB/adm/style/custom_profile_fields.html b/phpBB/adm/style/custom_profile_fields.html index 884f2059aa..1aba162d00 100644 --- a/phpBB/adm/style/custom_profile_fields.html +++ b/phpBB/adm/style/custom_profile_fields.html @@ -15,7 +15,7 @@ - {bool.options.VALUE}    + checked="checked" /> diff --git a/phpBB/adm/style/editor.js b/phpBB/adm/style/editor.js index 2ef2853ed3..e82b9d5d62 100644 --- a/phpBB/adm/style/editor.js +++ b/phpBB/adm/style/editor.js @@ -32,11 +32,22 @@ function helpline(help) */ function initInsertions() { - var textarea = document.forms[form_name].elements[text_name]; - textarea.focus(); + var doc; + if(document.forms[form_name]) + { + doc = document; + } + else + { + doc = opener.document; + } + + var textarea = doc.forms[form_name].elements[text_name]; if (is_ie && typeof(baseHeight) != 'number') { - baseHeight = document.selection.createRange().duplicate().boundingHeight; + textarea.focus(); + baseHeight = doc.selection.createRange().duplicate().boundingHeight; + document.body.focus(); } } @@ -44,11 +55,13 @@ function initInsertions() * bbstyle */ function bbstyle(bbnumber) -{ +{ if (bbnumber != -1) { bbfontstyle(bbtags[bbnumber], bbtags[bbnumber+1]); - } else { + } + else + { insert_text('[*]'); document.forms[form_name].elements[text_name].focus(); } @@ -62,6 +75,7 @@ function bbfontstyle(bbopen, bbclose) theSelection = false; var textarea = document.forms[form_name].elements[text_name]; + textarea.focus(); if ((clientVer >= 4) && is_ie && is_win) @@ -85,9 +99,10 @@ function bbfontstyle(bbopen, bbclose) theSelection = ''; return; } - + //The new position for the cursor after adding the bbcode - var new_pos = getCaretPosition(textarea).start + bbopen.length; + var caret_pos = getCaretPosition(textarea).start; + var new_pos = caret_pos + bbopen.length; // Open tag insert_text(bbopen + bbclose); @@ -103,12 +118,12 @@ function bbfontstyle(bbopen, bbclose) else if (document.selection) { var range = textarea.createTextRange(); - range.move("character", new_pos); + range.move("character", new_pos); range.select(); - storeCaret(document.forms[form_name].elements[text_name]); + storeCaret(textarea); } - document.forms[form_name].elements[text_name].focus(); + textarea.focus(); return; } @@ -119,18 +134,20 @@ function insert_text(text, spaces, popup) { var textarea; - if (!popup) + if (!popup) { textarea = document.forms[form_name].elements[text_name]; - } else + } + else { textarea = opener.document.forms[form_name].elements[text_name]; } - if (spaces) + + if (spaces) { text = ' ' + text + ' '; } - + if (!isNaN(textarea.selectionStart)) { var sel_start = textarea.selectionStart; @@ -147,17 +164,21 @@ function insert_text(text, spaces, popup) { textarea.focus(); storeCaret(textarea); - } + } var caret_pos = textarea.caretPos; caret_pos.text = caret_pos.text.charAt(caret_pos.text.length - 1) == ' ' ? caret_pos.text + text + ' ' : caret_pos.text + text; } - else { textarea.value = textarea.value + text; } - document.forms[form_name].elements[text_name].focus(); + + if (!popup) + { + textarea.focus(); + } + } /** @@ -280,6 +301,7 @@ function colorPalette(dir, width, height) { var r = 0, g = 0, b = 0; var numberList = new Array(6); + var color = ''; numberList[0] = '00'; numberList[1] = '40'; @@ -287,7 +309,7 @@ function colorPalette(dir, width, height) numberList[3] = 'BF'; numberList[4] = 'FF'; - document.writeln(''); + document.writeln('
'); for (r = 0; r < 5; r++) { @@ -344,13 +366,13 @@ function getCaretPosition(txtarea) var caretPos = new caretPosition(); // simple Gecko/Opera way - if(txtarea.selectionStart || txtarea.selectionStart == 0) + if (txtarea.selectionStart || txtarea.selectionStart == 0) { caretPos.start = txtarea.selectionStart; caretPos.end = txtarea.selectionEnd; } // dirty and slow IE way - else if(document.selection) + else if (document.selection) { // get current selection var range = document.selection.createRange(); @@ -362,15 +384,15 @@ function getCaretPosition(txtarea) // calculate selection start point by moving beginning of range_all to beginning of range var sel_start; for (sel_start = 0; range_all.compareEndPoints('StartToStart', range) < 0; sel_start++) - { + { range_all.moveStart('character', 1); } - + txtarea.sel_start = sel_start; - + // we ignore the end value for IE, this is already dirty enough and we don't need it caretPos.start = txtarea.sel_start; - caretPos.end = txtarea.sel_start; + caretPos.end = txtarea.sel_start; } return caretPos; diff --git a/phpBB/adm/style/install_convert.html b/phpBB/adm/style/install_convert.html index 068a8f230e..b17ea838d2 100755 --- a/phpBB/adm/style/install_convert.html +++ b/phpBB/adm/style/install_convert.html @@ -11,8 +11,16 @@

{TITLE}

+

{BODY}

+ +
+

{ERROR_TITLE}

+

{ERROR_MSG}

+
+ +
@@ -78,7 +86,7 @@
-
{checks.TITLE}:
{checks.TITLE_EXPLAIN}
+

{checks.TITLE_EXPLAIN}
{checks.RESULT}
diff --git a/phpBB/adm/style/install_footer.html b/phpBB/adm/style/install_footer.html index dd249d9259..e73324dc1f 100755 --- a/phpBB/adm/style/install_footer.html +++ b/phpBB/adm/style/install_footer.html @@ -3,6 +3,7 @@ + diff --git a/phpBB/adm/style/install_header.html b/phpBB/adm/style/install_header.html index 3b1d36776e..a5545aad26 100755 --- a/phpBB/adm/style/install_header.html +++ b/phpBB/adm/style/install_header.html @@ -13,16 +13,18 @@ - +
@@ -35,7 +37,8 @@
- + +
diff --git a/phpBB/adm/style/install_install.html b/phpBB/adm/style/install_install.html index 075d026d95..79006fba69 100755 --- a/phpBB/adm/style/install_install.html +++ b/phpBB/adm/style/install_install.html @@ -1,6 +1,6 @@ -
+

{TITLE}

{BODY}

@@ -68,7 +68,7 @@
{L_SUBMIT} {S_HIDDEN} - +
diff --git a/phpBB/adm/style/install_update.html b/phpBB/adm/style/install_update.html index a948ceb3fc..dd6e615df2 100644 --- a/phpBB/adm/style/install_update.html +++ b/phpBB/adm/style/install_update.html @@ -62,11 +62,11 @@
-
{CURRENT_VERSION}
+
{CURRENT_VERSION}
-
{LATEST_VERSION}
+
{LATEST_VERSION}
@@ -101,7 +101,7 @@

{L_PERFORM_DATABASE_UPDATE_EXPLAIN}

- » {L_RUN_DATABASE_SCRIPT} « + » {L_RUN_DATABASE_SCRIPT} «



@@ -187,25 +187,25 @@
[ {files.L_SHOW_DIFF} ]{L_BINARY_FILE}
-
  {L_DO_NOT_UPDATE}
+
-
  {L_MERGE_NO_MERGE_NEW_OPTION}
-
[{L_SHOW_DIFF_FINAL}]
+
+
[{L_SHOW_DIFF_FINAL}] 
-
  {L_MERGE_NO_MERGE_MOD_OPTION}
-
[{L_SHOW_DIFF_FINAL}]
+
+
[{L_SHOW_DIFF_FINAL}] 
-
  {L_MERGE_NEW_FILE_OPTION}
+
[{L_SHOW_DIFF_FINAL}]
-
  {L_MERGE_MOD_FILE_OPTION}
+
[{L_SHOW_DIFF_FINAL}]
@@ -312,7 +312,7 @@ {L_FTP_SETTINGS}
-
{UPLOAD_METHOD}
+
{UPLOAD_METHOD}
diff --git a/phpBB/adm/style/install_update_diff.html b/phpBB/adm/style/install_update_diff.html index 58b9aa833f..2fd8142279 100644 --- a/phpBB/adm/style/install_update_diff.html +++ b/phpBB/adm/style/install_update_diff.html @@ -215,6 +215,7 @@ table.hrdiff caption span {
+

{L_SKIP}

@@ -225,6 +226,7 @@ table.hrdiff caption span {
+
@@ -238,6 +240,7 @@ table.hrdiff caption span {
+
diff --git a/phpBB/adm/style/overall_footer.html b/phpBB/adm/style/overall_footer.html index 79ec3240fd..1185df44bb 100644 --- a/phpBB/adm/style/overall_footer.html +++ b/phpBB/adm/style/overall_footer.html @@ -3,12 +3,13 @@
+ - Powered by phpBB {VERSION} © 2006 phpBB Group + Powered by phpBB {VERSION} © 2000, 2002, 2005, 2007 phpBB Group
{TRANSLATION_INFO} diff --git a/phpBB/adm/style/overall_header.html b/phpBB/adm/style/overall_header.html index ea1faef222..d75d89ab13 100644 --- a/phpBB/adm/style/overall_header.html +++ b/phpBB/adm/style/overall_header.html @@ -18,6 +18,9 @@ var on_page = '{ON_PAGE}'; var per_page = '{PER_PAGE}'; var base_url = '{BASE_URL}'; +var menu_state = 'shown'; + + /** * Jump to page */ @@ -83,7 +86,7 @@ function marklist(id, name, state) */ function trace(link) { - window.open(link.replace(/&/g, '&'), '_trace', 'height=515, resizable=yes, scrollbars=yes, width=680'); + window.open(link.replace(/&/g, '&'), '_trace', 'height=515, resizable=yes, scrollbars=yes, width=750'); return false; } @@ -109,15 +112,55 @@ function swatch(field) return false; } +/** +* Hiding/Showing the side menu +*/ +function switch_menu() +{ + var menu = document.getElementById('menu'); + var main = document.getElementById('main'); + var toggle = document.getElementById('toggle'); + var handle = document.getElementById('toggle-handle'); + + switch (menu_state) + { + // hide + case 'shown': + main.style.width = '93%'; + menu_state = 'hidden'; + menu.style.display = 'none'; + toggle.style.left = '0'; + toggle.style.width = '20px'; + handle.style.backgroundImage = 'url(images/toggle.gif)'; + handle.style.backgroundPosition = '100% 50%'; + handle.style.backgroundRepeat = 'no-repeat'; + break; + + // show + case 'hidden': + main.style.width = '76%'; + menu_state = 'shown'; + menu.style.display = 'block'; + toggle.style.left = '15%'; + toggle.style.width = '5%'; + handle.style.backgroundImage = 'url(images/toggle.gif)'; + handle.style.backgroundPosition = '0% 50%'; + handle.style.backgroundRepeat = 'no-repeat'; + break; + } +} + //--> +
@@ -128,12 +171,17 @@ function swatch(field)
- + +
+ +
+
+
{L_AVAILABLE_CONVERTORS}
- - - + + + - + - - + + - - - + + + - + class="yes" class="never"> - - - + + +
{L_ACL_SETTING} {L_ACL_YES}{L_ACL_NEVER}{L_ACL_YES}{L_ACL_NEVER} {L_ACL_YES}{L_ACL_NO}{L_ACL_NEVER}{L_ACL_YES}{L_ACL_NO}{L_ACL_NEVER}
{L_TRACE_SETTING} {p_mask.f_mask.category.mask.PERMISSION}{L_TRACE_SETTING} {p_mask.f_mask.category.mask.PERMISSION}
+

{L_APPLY_PERMISSIONS_EXPLAIN}

-

{L_MARK_ALL}{L_UNMARK_ALL}

+ +

{L_MARK_ALL}{L_UNMARK_ALL}

+
+ +
diff --git a/phpBB/adm/style/permissions.js b/phpBB/adm/style/permissions.js index eb84e40435..adc8995c23 100644 --- a/phpBB/adm/style/permissions.js +++ b/phpBB/adm/style/permissions.js @@ -4,7 +4,7 @@ */ function display_checkboxes(status) { - var form = document.getElementById('set_permissions'); + var form = document.getElementById('set-permissions'); var cb = document.getElementsByTagName('input'); var display; @@ -21,7 +21,7 @@ function display_checkboxes(status) for (var i = 0; i < cb.length; i++ ) { - if (cb[i].className == 'perm_cb') + if (cb[i].className == 'permissions-checkbox') { cb[i].style.display = display; } @@ -67,7 +67,7 @@ function toggle_opacity(block_id) { * except_id = id of the element not to hide */ function reset_opacity(status, except_id) { - var perm = document.getElementById('set_permissions'); + var perm = document.getElementById('set-permissions'); var fs = perm.getElementsByTagName('fieldset'); var opacity = 5; @@ -90,7 +90,7 @@ function reset_opacity(status, except_id) { } //reset checkboxes too - marklist('set_permissions', 'inherit', !status); + marklist('set-permissions', 'inherit', !status); } @@ -132,7 +132,7 @@ function set_colours(id, init, quick) if (typeof(quick) != 'undefined') { - tab.className = 'perm_preset_' + quick + ' activetab'; + tab.className = 'permissions-preset-' + quick + ' activetab'; return; } @@ -168,11 +168,11 @@ function set_colours(id, init, quick) if (init) { - tab.className = 'perm_preset_' + colour; + tab.className = 'permissions-preset-' + colour; } else { - tab.className = 'perm_preset_' + colour + ' activetab'; + tab.className = 'permissions-preset-' + colour + ' activetab'; } } @@ -188,7 +188,7 @@ function init_colours(block_id) for (var i = 0; i < panels.length; i++) { - if(panels[i].className == 'perm_panel') + if(panels[i].className == 'permissions-panel') { set_colours(panels[i].id.replace(/options/, ''), true); } diff --git a/phpBB/adm/style/simple_footer.html b/phpBB/adm/style/simple_footer.html index 9b422332a2..e9e51fc108 100644 --- a/phpBB/adm/style/simple_footer.html +++ b/phpBB/adm/style/simple_footer.html @@ -5,7 +5,7 @@ -
Powered by phpBB {VERSION} © 2006 phpBB Group +
Powered by phpBB {VERSION} © 2000, 2002, 2005, 2007 phpBB Group
{TRANSLATION_INFO} diff --git a/phpBB/adm/style/simple_header.html b/phpBB/adm/style/simple_header.html index ca24f3891b..882026a1c1 100644 --- a/phpBB/adm/style/simple_header.html +++ b/phpBB/adm/style/simple_header.html @@ -101,4 +101,4 @@ function swatch(field) -
+
diff --git a/phpBB/adm/style/viewsource.html b/phpBB/adm/style/viewsource.html index da374037e8..7f0fde239c 100644 --- a/phpBB/adm/style/viewsource.html +++ b/phpBB/adm/style/viewsource.html @@ -1,7 +1,7 @@ - +
- +

{FILENAME}

@@ -16,5 +16,6 @@
- +
+
\ No newline at end of file diff --git a/phpBB/cache/.htaccess b/phpBB/cache/.htaccess index c39181686f..aa5afc1640 100644 --- a/phpBB/cache/.htaccess +++ b/phpBB/cache/.htaccess @@ -1,4 +1,4 @@ - -Order Allow,Deny -Deny from All - \ No newline at end of file + + Order Allow,Deny + Deny from All + \ No newline at end of file diff --git a/phpBB/cache/index.htm b/phpBB/cache/index.htm new file mode 100644 index 0000000000..ee1f723a7d --- /dev/null +++ b/phpBB/cache/index.htm @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/phpBB/common.php b/phpBB/common.php index 2d1d67c3fc..3ee931e95d 100644 --- a/phpBB/common.php +++ b/phpBB/common.php @@ -191,7 +191,7 @@ $cache = new cache(); $db = new $sql_db(); // Connect to DB -$db->sql_connect($dbhost, $dbuser, $dbpasswd, $dbname, $dbport, false); +$db->sql_connect($dbhost, $dbuser, $dbpasswd, $dbname, $dbport, false, false); // We do not need this any longer, unset for safety purposes unset($dbpasswd); diff --git a/phpBB/develop/add_permissions.php b/phpBB/develop/add_permissions.php index d83702f5ad..035c23f49c 100644 --- a/phpBB/develop/add_permissions.php +++ b/phpBB/develop/add_permissions.php @@ -227,7 +227,7 @@ foreach ($prefixes as $prefix) $sql = 'UPDATE ' . USERS_TABLE . " SET user_permissions = ''"; $db->sql_query($sql); -$cache->destroy('acl_options'); +$cache->destroy('_acl_options'); echo "

Done

\n"; diff --git a/phpBB/develop/adjust_avatars.php b/phpBB/develop/adjust_avatars.php new file mode 100755 index 0000000000..81599e694b --- /dev/null +++ b/phpBB/develop/adjust_avatars.php @@ -0,0 +1,147 @@ +session_begin(); +$auth->acl($user->data); +$user->setup(); + +$echos = 0; + +if (!isset($config['avatar_salt'])) +{ + $cache->purge(); + if (!isset($config['avatar_salt'])) + { + die('database not up to date'); + } + die('database not up to date'); +} + +// let's start with the users using a group_avatar. +$sql = 'SELECT group_id, group_avatar + FROM ' . GROUPS_TABLE . ' + WHERE group_avatar_type = ' . AVATAR_UPLOAD; + +// We'll skip these, so remember them +$group_avatars = array(); + +echo '
Updating groups' . "\n"; + +$result = $db->sql_query($sql); + +while ($row = $db->sql_fetchrow($result)) +{ + $new_avatar_name = adjust_avatar($row['group_avatar'], 'g' . $row['group_id']); + $group_avatars[] = $new_avatar_name; + + // failure is probably due to the avatar name already being adjusted + if ($new_avatar_name !== false) + { + $sql = 'UPDATE ' . USERS_TABLE . " + SET user_avatar = '" . $db->sql_escape($new_avatar_name) . "' + WHERE user_avatar = '" . $db->sql_escape($row['group_avatar']) . "' + AND user_avatar_type = " . AVATAR_UPLOAD; + $db->sql_query($sql); + + $sql = 'UPDATE ' . GROUPS_TABLE . " + SET group_avatar = '" . $db->sql_escape($new_avatar_name) . "' + WHERE group_id = {$row['group_id']}"; + $db->sql_query($sql); + } + else + { + echo '
Failed updating group ' . $row['group_id'] . "\n"; + } + + if ($echos > 200) + { + echo '
' . "\n"; + $echos = 0; + } + + echo '.'; + $echos++; + + flush(); +} +$db->sql_freeresult($result); + +$sql = 'SELECT user_id, username, user_avatar, user_avatar_type + FROM ' . USERS_TABLE . ' + WHERE user_avatar_type = ' . AVATAR_UPLOAD . ' + AND ' . $db->sql_in_set('user_avatar', $group_avatars, true, true); +$result = $db->sql_query($sql); + +echo '
Updating users' . "\n"; + +while ($row = $db->sql_fetchrow($result)) +{ + $new_avatar_name = adjust_avatar($row['user_avatar'], $row['user_id']); + + // failure is probably due to the avatar name already being adjusted + if ($new_avatar_name !== false) + { + $sql = 'UPDATE ' . USERS_TABLE . " + SET user_avatar = '" . $db->sql_escape($new_avatar_name) . "' + WHERE user_id = {$row['user_id']}"; + $db->sql_query($sql); + } + else + { + // nuke this avatar + $sql = 'UPDATE ' . USERS_TABLE . " + SET user_avatar = '', user_avatar_type = 0 + WHERE user_id = {$row['user_id']}"; + $db->sql_query($sql); + echo '
Failed updating user ' . $row['user_id'] . "\n"; + } + + if ($echos > 200) + { + echo '
' . "\n"; + $echos = 0; + } + + echo '.'; + $echos++; + + flush(); +} + +$db->sql_freeresult($result); + +echo 'FINISHED'; + +// Done +$db->sql_close(); + +function adjust_avatar($old_name, $midfix) +{ + global $config, $phpbb_root_path; + + $avatar_path = $phpbb_root_path . $config['avatar_path']; + $extension = strtolower(substr(strrchr($old_name, '.'), 1)); + $new_name = $config['avatar_salt'] . '_' . $midfix . '.' . $extension; + + if (@file_exists($avatar_path . '/' . $old_name) && @is_writable($avatar_path . '/' . $old_name) && @is_writable($avatar_path . '/' . $new_name)) + { + @rename($avatar_path . '/' . $old_name, $avatar_path . '/' . $new_name); + return $midfix . '.' . $extension; + } + return false; +} + +?> \ No newline at end of file diff --git a/phpBB/develop/adjust_magic_urls.php b/phpBB/develop/adjust_magic_urls.php new file mode 100644 index 0000000000..1430a47a12 --- /dev/null +++ b/phpBB/develop/adjust_magic_urls.php @@ -0,0 +1,126 @@ +session_begin(); +$auth->acl($user->data); +$user->setup(); + +$echos = 0; + +$replace = array( + 'sql_freeresult($result); + + +// Now adjust posts +$sql = 'SELECT post_id, post_text + FROM ' . POSTS_TABLE; +$result = $db->sql_query($sql); + +while ($row = $db->sql_fetchrow($result)) +{ + $new_content = str_replace($replace, $with, $row['post_text']); + + if ($row['post_text'] != $new_content) + { + $sql = 'UPDATE ' . POSTS_TABLE . " SET post_text = '" . $db->sql_escape($new_content) . "' + WHERE post_id = " . $row['post_id']; + $db->sql_query($sql); + + if ($echos > 200) + { + echo '
' . "\n"; + $echos = 0; + } + + echo '.'; + $echos++; + + flush(); + } +} +$db->sql_freeresult($result); + +// Now to the private messages +$sql = 'SELECT msg_id, message_text + FROM ' . PRIVMSGS_TABLE; +$result = $db->sql_query($sql); + +while ($row = $db->sql_fetchrow($result)) +{ + $new_content = str_replace($replace, $with, $row['message_text']); + + if ($row['message_text'] != $new_content) + { + $sql = 'UPDATE ' . PRIVMSGS_TABLE . " SET bbcode_bitfield = '" . $db->sql_escape($new_content) . "' + WHERE msg_id = " . $row['msg_id']; + $db->sql_query($sql); + + if ($echos > 200) + { + echo '
' . "\n"; + $echos = 0; + } + + echo '.'; + $echos++; + + flush(); + } +} +$db->sql_freeresult($result); + +// Done +$db->sql_close(); + +?> \ No newline at end of file diff --git a/phpBB/develop/adjust_sizes.php b/phpBB/develop/adjust_sizes.php new file mode 100644 index 0000000000..7d72813056 --- /dev/null +++ b/phpBB/develop/adjust_sizes.php @@ -0,0 +1,132 @@ +session_begin(); +$auth->acl($user->data); +$user->setup(); + +$echos = 0; + +function replace_size($matches) +{ + return '[size=' . ceil(100.0 * (((double) $matches[1])/12.0)) . ':' . $matches[2] . ']'; +} + +// Adjust user signatures +$sql = 'SELECT user_id, user_sig, user_sig_bbcode_uid + FROM ' . USERS_TABLE; +$result = $db->sql_query($sql); + +while ($row = $db->sql_fetchrow($result)) +{ + $bbcode_uid = $row['user_sig_bbcode_uid']; + + // Only if a bbcode uid is present, the signature present and a size tag used... + if ($bbcode_uid && $row['user_sig'] && strpos($row['user_sig'], '[size=') !== false) + { + $row['user_sig'] = preg_replace_callback('/\[size=(\d*):(' . $bbcode_uid . ')\]/', 'replace_size', $row['user_sig']); + + $sql = 'UPDATE ' . USERS_TABLE . " SET user_sig = '" . $db->sql_escape($row['user_sig']) . "' + WHERE user_id = " . $row['user_id']; + $db->sql_query($sql); + + if ($echos > 200) + { + echo '
' . "\n"; + $echos = 0; + } + + echo '.'; + $echos++; + + flush(); + } +} +$db->sql_freeresult($result); + + +// Now adjust posts +$sql = 'SELECT post_id, post_text, bbcode_uid, enable_bbcode + FROM ' . POSTS_TABLE; +$result = $db->sql_query($sql); + +while ($row = $db->sql_fetchrow($result)) +{ + $bbcode_uid = $row['bbcode_uid']; + + // Only if a bbcode uid is present, bbcode enabled and a size tag used... + if ($row['enable_bbcode'] && $bbcode_uid && strpos($row['post_text'], '[size=') !== false) + { + $row['post_text'] = preg_replace_callback('/\[size=(\d*):' . $bbcode_uid . '\]/', 'replace_size', $row['post_text']); + + $sql = 'UPDATE ' . POSTS_TABLE . " SET post_text = '" . $db->sql_escape($row['post_text']) . "' + WHERE post_id = " . $row['post_id']; + $db->sql_query($sql); + + if ($echos > 200) + { + echo '
' . "\n"; + $echos = 0; + } + + echo '.'; + $echos++; + + flush(); + } +} +$db->sql_freeresult($result); + +// Now to the private messages +$sql = 'SELECT msg_id, message_text, bbcode_uid, enable_bbcode + FROM ' . PRIVMSGS_TABLE; +$result = $db->sql_query($sql); + +while ($row = $db->sql_fetchrow($result)) +{ + $bbcode_uid = $row['bbcode_uid']; + + // Only if a bbcode uid is present, bbcode enabled and a size tag used... + if ($row['enable_bbcode'] && $bbcode_uid && strpos($row['message_text'], '[size=') !== false) + { + $row['message_text'] = preg_replace_callback('/\[size=(\d*):' . $bbcode_uid . '\]/', 'replace_size', $row['message_text']); + + $sql = 'UPDATE ' . PRIVMSGS_TABLE . " SET message_text = '" . $db->sql_escape($row['message_text']) . "' + WHERE msg_id = " . $row['msg_id']; + $db->sql_query($sql); + + if ($echos > 200) + { + echo '
' . "\n"; + $echos = 0; + } + + echo '.'; + $echos++; + + flush(); + } +} +$db->sql_freeresult($result); + +// Done +$db->sql_close(); + +?> \ No newline at end of file diff --git a/phpBB/develop/adjust_smilies.php b/phpBB/develop/adjust_smilies.php new file mode 100644 index 0000000000..774c8834f6 --- /dev/null +++ b/phpBB/develop/adjust_smilies.php @@ -0,0 +1,130 @@ +session_begin(); +$auth->acl($user->data); +$user->setup(); + +$echos = 0; + +$replace = array( + 'sql_query($sql); + +while ($row = $db->sql_fetchrow($result)) +{ + $new_content = str_replace($replace, $with, $row['user_sig']); + + if ($new_content != $row['user_sig']) + { + $sql = 'UPDATE ' . USERS_TABLE . " SET user_sig = '" . $db->sql_escape($new_content) . "' + WHERE user_id = " . $row['user_id']; + $db->sql_query($sql); + + if ($echos > 200) + { + echo '
' . "\n"; + $echos = 0; + } + + echo '.'; + $echos++; + + flush(); + } +} +$db->sql_freeresult($result); + + +// Now adjust posts +$sql = 'SELECT post_id, post_text + FROM ' . POSTS_TABLE; +$result = $db->sql_query($sql); + +while ($row = $db->sql_fetchrow($result)) +{ + $new_content = str_replace($replace, $with, $row['post_text']); + + if ($row['post_text'] != $new_content) + { + $sql = 'UPDATE ' . POSTS_TABLE . " SET post_text = '" . $db->sql_escape($new_content) . "' + WHERE post_id = " . $row['post_id']; + $db->sql_query($sql); + + if ($echos > 200) + { + echo '
' . "\n"; + $echos = 0; + } + + echo '.'; + $echos++; + + flush(); + } +} +$db->sql_freeresult($result); + +// Now to the private messages +$sql = 'SELECT msg_id, message_text + FROM ' . PRIVMSGS_TABLE; +$result = $db->sql_query($sql); + +while ($row = $db->sql_fetchrow($result)) +{ + $new_content = str_replace($replace, $with, $row['message_text']); + + if ($row['message_text'] != $new_content) + { + $sql = 'UPDATE ' . PRIVMSGS_TABLE . " SET bbcode_bitfield = '" . $db->sql_escape($new_content) . "' + WHERE msg_id = " . $row['msg_id']; + $db->sql_query($sql); + + if ($echos > 200) + { + echo '
' . "\n"; + $echos = 0; + } + + echo '.'; + $echos++; + + flush(); + } +} +$db->sql_freeresult($result); + +// Done +$db->sql_close(); + +?> \ No newline at end of file diff --git a/phpBB/develop/create_schema_files.php b/phpBB/develop/create_schema_files.php index 0f9c36bb09..d3efdc45f2 100644 --- a/phpBB/develop/create_schema_files.php +++ b/phpBB/develop/create_schema_files.php @@ -18,9 +18,9 @@ set_time_limit(0); $schema_path = './../install/schemas/'; -if (!is_writeable($schema_path)) +if (!is_writable($schema_path)) { - die('Schema path not writeable'); + die('Schema path not writable'); } $schema_data = get_schema_struct(); @@ -60,22 +60,22 @@ $dbms_type_map = array( 'TINT:' => 'tinyint(%d)', 'USINT' => 'smallint(4) UNSIGNED', 'BOOL' => 'tinyint(1) UNSIGNED', - 'VCHAR' => 'varchar(255)', - 'VCHAR:' => 'varchar(%d)', - 'CHAR:' => 'char(%d)', - 'XSTEXT' => 'text', - 'XSTEXT_UNI'=> 'text', - 'STEXT' => 'text', - 'STEXT_UNI' => 'text', - 'TEXT' => 'text', - 'TEXT_UNI' => 'text', - 'MTEXT' => 'mediumtext', - 'MTEXT_UNI' => 'mediumtext', + 'VCHAR' => 'varbinary(255)', + 'VCHAR:' => 'varbinary(%d)', + 'CHAR:' => 'binary(%d)', + 'XSTEXT' => 'blob', + 'XSTEXT_UNI'=> 'blob', + 'STEXT' => 'blob', + 'STEXT_UNI' => 'blob', + 'TEXT' => 'blob', + 'TEXT_UNI' => 'blob', + 'MTEXT' => 'mediumblob', + 'MTEXT_UNI' => 'mediumblob', 'TIMESTAMP' => 'int(11) UNSIGNED', 'DECIMAL' => 'decimal(5,2)', - 'VCHAR_UNI' => 'text', - 'VCHAR_UNI:'=> array('varchar(%d)', 'limit' => array('mult', 3, 255, 'text')), - 'VCHAR_CI' => 'text', + 'VCHAR_UNI' => 'blob', + 'VCHAR_UNI:'=> array('varbinary(%d)', 'limit' => array('mult', 3, 255, 'blob')), + 'VCHAR_CI' => 'blob', 'VARBINARY' => 'varbinary(255)', ), @@ -230,31 +230,31 @@ foreach ($supported_dbms as $dbms) { case 'mysql_40': case 'mysql_41': - $line = "#\n# MySQL Schema for phpBB 3.x - (c) phpBB Group, 2005\n#\n# \$I" . "d: $\n#\n\n"; + $line = "#\n# \$I" . "d: $\n#\n\n"; break; case 'firebird': - $line = "#\n# Firebird Schema for phpBB 3.x - (c) phpBB Group, 2005\n#\n# \$I" . "d: $\n#\n\n"; + $line = "#\n# \$I" . "d: $\n#\n\n"; $line .= custom_data('firebird') . "\n"; break; case 'sqlite': - $line = "#\n# SQLite Schema for phpBB 3.x - (c) phpBB Group, 2005\n#\n# \$I" . "d: $\n#\n\n"; + $line = "#\n# \$I" . "d: $\n#\n\n"; $line .= "BEGIN TRANSACTION;\n\n"; break; case 'mssql': - $line = "/*\n MSSQL Schema for phpBB 3.x - (c) phpBB Group, 2005\n\n \$I" . "d: $\n\n*/\n\n"; + $line = "/*\n\n \$I" . "d: $\n\n*/\n\n"; $line .= "BEGIN TRANSACTION\nGO\n\n"; break; case 'oracle': - $line = "/*\n Oracle Schema for phpBB 3.x - (c) phpBB Group, 2005\n\n \$I" . "d: $\n\n*/\n\n"; + $line = "/*\n\n \$I" . "d: $\n\n*/\n\n"; $line .= custom_data('oracle') . "\n"; break; case 'postgres': - $line = "/*\n PostgreSQL Schema for phpBB 3.x - (c) phpBB Group, 2005\n\n \$I" . "d: $\n\n*/\n\n"; + $line = "/*\n\n \$I" . "d: $\n\n*/\n\n"; $line .= "BEGIN;\n\n"; $line .= custom_data('postgres') . "\n"; break; @@ -354,7 +354,7 @@ foreach ($supported_dbms as $dbms) { $orig_column_type = $column_data[0]; $column_type = $dbms_type_map[$dbms][$column_data[0]]; - if ($column_type == 'text') + if ($column_type == 'text' || $column_type == 'blob') { $modded_array[$column_name] = $column_type; } @@ -373,15 +373,22 @@ foreach ($supported_dbms as $dbms) $line .= "\t{$column_name} {$column_type} "; // For hexadecimal values do not use single quotes - if (!is_null($column_data[1]) && substr($column_type, -4) !== 'text') + if (!is_null($column_data[1]) && substr($column_type, -4) !== 'text' && substr($column_type, -4) !== 'blob') { $line .= (strpos($column_data[1], '0x') === 0) ? "DEFAULT {$column_data[1]} " : "DEFAULT '{$column_data[1]}' "; } $line .= 'NOT NULL'; - if (isset($column_data[2]) && $column_data[2] == 'auto_increment') + if (isset($column_data[2])) { - $line .= ' auto_increment'; + if ($column_data[2] == 'auto_increment') + { + $line .= ' auto_increment'; + } + else if ($dbms === 'mysql_41' && $column_data[2] == 'true_sort') + { + $line .= ' COLLATE utf8_unicode_ci'; + } } $line .= ",\n"; @@ -616,6 +623,7 @@ foreach ($supported_dbms as $dbms) switch ($modded_array[$col_name]) { case 'text': + case 'blob': $key_data[1][$key] = $col_name . '(255)'; break; } @@ -809,6 +817,7 @@ function get_schema_struct() 'KEYS' => array( 'group_id' => array('INDEX', 'group_id'), 'auth_opt_id' => array('INDEX', 'auth_option_id'), + 'auth_role_id' => array('INDEX', 'auth_role_id'), ), ); @@ -848,6 +857,9 @@ function get_schema_struct() 'auth_setting' => array('TINT:2', 0), ), 'PRIMARY_KEY' => array('role_id', 'auth_option_id'), + 'KEYS' => array( + 'ath_opt_id' => array('INDEX', 'auth_option_id'), + ), ); $schema_data['phpbb_acl_users'] = array( @@ -861,6 +873,7 @@ function get_schema_struct() 'KEYS' => array( 'user_id' => array('INDEX', 'user_id'), 'auth_option_id' => array('INDEX', 'auth_option_id'), + 'auth_role_id' => array('INDEX', 'auth_role_id'), ), ); @@ -908,12 +921,8 @@ function get_schema_struct() 'COLUMNS' => array( 'topic_id' => array('UINT', 0), 'user_id' => array('UINT', 0), - 'order_id' => array('UINT', 0), - ), - 'KEYS' => array( - 'order_id' => array('INDEX', 'order_id'), - 'topic_user_id' => array('INDEX', array('topic_id', 'user_id')), ), + 'PRIMARY_KEY' => array('topic_id', 'user_id'), ); $schema_data['phpbb_bots'] = array( @@ -1460,10 +1469,12 @@ function get_schema_struct() 'word_id' => array('UINT', NULL, 'auto_increment'), 'word_text' => array('VCHAR_UNI', ''), 'word_common' => array('BOOL', 0), + 'word_count' => array('UINT', 0), ), 'PRIMARY_KEY' => 'word_id', 'KEYS' => array( 'wrd_txt' => array('UNIQUE', 'word_text'), + 'wrd_cnt' => array('INDEX', 'word_count'), ), ); @@ -1474,6 +1485,7 @@ function get_schema_struct() 'title_match' => array('BOOL', 0), ), 'KEYS' => array( + 'unq_mtch' => array('UNIQUE', array('word_id', 'post_id', 'title_match')), 'word_id' => array('INDEX', 'word_id'), 'post_id' => array('INDEX', 'post_id'), ), @@ -1527,6 +1539,7 @@ function get_schema_struct() $schema_data['phpbb_smilies'] = array( 'COLUMNS' => array( 'smiley_id' => array('UINT', NULL, 'auto_increment'), + // We may want to set 'code' to VCHAR:50 or check if unicode support is possible... at the moment only ASCII characters are allowed. 'code' => array('VCHAR_UNI:50', ''), 'emotion' => array('VCHAR_UNI:50', ''), 'smiley_url' => array('VCHAR:50', ''), @@ -1611,115 +1624,6 @@ function get_schema_struct() 'imageset_name' => array('VCHAR_UNI:255', ''), 'imageset_copyright' => array('VCHAR_UNI', ''), 'imageset_path' => array('VCHAR:100', ''), - - 'site_logo' => array('VCHAR:200', ''), - 'upload_bar' => array('VCHAR:200', ''), - 'poll_left' => array('VCHAR:200', ''), - 'poll_center' => array('VCHAR:200', ''), - 'poll_right' => array('VCHAR:200', ''), - 'icon_friend' => array('VCHAR:200', ''), - 'icon_foe' => array('VCHAR:200', ''), - - 'forum_link' => array('VCHAR:200', ''), - 'forum_read' => array('VCHAR:200', ''), - 'forum_read_locked' => array('VCHAR:200', ''), - 'forum_read_subforum' => array('VCHAR:200', ''), - 'forum_unread' => array('VCHAR:200', ''), - 'forum_unread_locked' => array('VCHAR:200', ''), - 'forum_unread_subforum' => array('VCHAR:200', ''), - - 'topic_moved' => array('VCHAR:200', ''), - - 'topic_read' => array('VCHAR:200', ''), - 'topic_read_mine' => array('VCHAR:200', ''), - 'topic_read_hot' => array('VCHAR:200', ''), - 'topic_read_hot_mine' => array('VCHAR:200', ''), - 'topic_read_locked' => array('VCHAR:200', ''), - 'topic_read_locked_mine' => array('VCHAR:200', ''), - - 'topic_unread' => array('VCHAR:200', ''), - 'topic_unread_mine' => array('VCHAR:200', ''), - 'topic_unread_hot' => array('VCHAR:200', ''), - 'topic_unread_hot_mine' => array('VCHAR:200', ''), - 'topic_unread_locked' => array('VCHAR:200', ''), - 'topic_unread_locked_mine' => array('VCHAR:200', ''), - - 'sticky_read' => array('VCHAR:200', ''), - 'sticky_read_mine' => array('VCHAR:200', ''), - 'sticky_read_locked' => array('VCHAR:200', ''), - 'sticky_read_locked_mine' => array('VCHAR:200', ''), - 'sticky_unread' => array('VCHAR:200', ''), - 'sticky_unread_mine' => array('VCHAR:200', ''), - 'sticky_unread_locked' => array('VCHAR:200', ''), - 'sticky_unread_locked_mine' => array('VCHAR:200', ''), - - 'announce_read' => array('VCHAR:200', ''), - 'announce_read_mine' => array('VCHAR:200', ''), - 'announce_read_locked' => array('VCHAR:200', ''), - 'announce_read_locked_mine' => array('VCHAR:200', ''), - 'announce_unread' => array('VCHAR:200', ''), - 'announce_unread_mine' => array('VCHAR:200', ''), - 'announce_unread_locked' => array('VCHAR:200', ''), - 'announce_unread_locked_mine' => array('VCHAR:200', ''), - - 'global_read' => array('VCHAR:200', ''), - 'global_read_mine' => array('VCHAR:200', ''), - 'global_read_locked' => array('VCHAR:200', ''), - 'global_read_locked_mine' => array('VCHAR:200', ''), - 'global_unread' => array('VCHAR:200', ''), - 'global_unread_mine' => array('VCHAR:200', ''), - 'global_unread_locked' => array('VCHAR:200', ''), - 'global_unread_locked_mine' => array('VCHAR:200', ''), - - 'pm_read' => array('VCHAR:200', ''), - 'pm_unread' => array('VCHAR:200', ''), - - 'icon_contact_aim' => array('VCHAR:200', ''), - 'icon_contact_email' => array('VCHAR:200', ''), - 'icon_contact_icq' => array('VCHAR:200', ''), - 'icon_contact_jabber' => array('VCHAR:200', ''), - 'icon_contact_msnm' => array('VCHAR:200', ''), - 'icon_contact_pm' => array('VCHAR:200', ''), - 'icon_contact_yahoo' => array('VCHAR:200', ''), - 'icon_contact_www' => array('VCHAR:200', ''), - - 'icon_post_delete' => array('VCHAR:200', ''), - 'icon_post_edit' => array('VCHAR:200', ''), - 'icon_post_info' => array('VCHAR:200', ''), - 'icon_post_quote' => array('VCHAR:200', ''), - 'icon_post_report' => array('VCHAR:200', ''), - 'icon_post_target' => array('VCHAR:200', ''), - 'icon_post_target_unread' => array('VCHAR:200', ''), - - 'icon_topic_attach' => array('VCHAR:200', ''), - 'icon_topic_latest' => array('VCHAR:200', ''), - 'icon_topic_newest' => array('VCHAR:200', ''), - 'icon_topic_reported' => array('VCHAR:200', ''), - 'icon_topic_unapproved' => array('VCHAR:200', ''), - - 'icon_user_online' => array('VCHAR:200', ''), - 'icon_user_offline' => array('VCHAR:200', ''), - 'icon_user_profile' => array('VCHAR:200', ''), - 'icon_user_search' => array('VCHAR:200', ''), - 'icon_user_warn' => array('VCHAR:200', ''), - - 'button_pm_forward' => array('VCHAR:200', ''), - 'button_pm_new' => array('VCHAR:200', ''), - 'button_pm_reply' => array('VCHAR:200', ''), - 'button_topic_locked' => array('VCHAR:200', ''), - 'button_topic_new' => array('VCHAR:200', ''), - 'button_topic_reply' => array('VCHAR:200', ''), - - 'user_icon1' => array('VCHAR:200', ''), - 'user_icon2' => array('VCHAR:200', ''), - 'user_icon3' => array('VCHAR:200', ''), - 'user_icon4' => array('VCHAR:200', ''), - 'user_icon5' => array('VCHAR:200', ''), - 'user_icon6' => array('VCHAR:200', ''), - 'user_icon7' => array('VCHAR:200', ''), - 'user_icon8' => array('VCHAR:200', ''), - 'user_icon9' => array('VCHAR:200', ''), - 'user_icon10' => array('VCHAR:200', ''), ), 'PRIMARY_KEY' => 'imageset_id', 'KEYS' => array( @@ -1727,6 +1631,22 @@ function get_schema_struct() ), ); + $schema_data['phpbb_styles_imageset_data'] = array( + 'COLUMNS' => array( + 'image_id' => array('USINT', NULL, 'auto_increment'), + 'image_name' => array('VCHAR:200', ''), + 'image_filename' => array('VCHAR:200', ''), + 'image_lang' => array('VCHAR:30', ''), + 'image_height' => array('USINT', 0), + 'image_width' => array('USINT', 0), + 'imageset_id' => array('TINT:4', 0), + ), + 'PRIMARY_KEY' => 'image_id', + 'KEYS' => array( + 'i_id' => array('INDEX', 'imageset_id'), + ), + ); + $schema_data['phpbb_topics'] = array( 'COLUMNS' => array( 'topic_id' => array('UINT', NULL, 'auto_increment'), @@ -1735,7 +1655,7 @@ function get_schema_struct() 'topic_attachment' => array('BOOL', 0), 'topic_approved' => array('BOOL', 1), 'topic_reported' => array('BOOL', 0), - 'topic_title' => array('XSTEXT_UNI', ''), + 'topic_title' => array('XSTEXT_UNI', '', 'true_sort'), 'topic_poster' => array('UINT', 0), 'topic_time' => array('TIMESTAMP', 0), 'topic_time_limit' => array('TIMESTAMP', 0), @@ -1757,7 +1677,7 @@ function get_schema_struct() 'topic_moved_id' => array('UINT', 0), 'topic_bumped' => array('BOOL', 0), 'topic_bumper' => array('UINT', 0), - 'poll_title' => array('XSTEXT_UNI', ''), + 'poll_title' => array('STEXT_UNI', ''), 'poll_start' => array('TIMESTAMP', 0), 'poll_length' => array('TIMESTAMP', 0), 'poll_max_options' => array('TINT:4', 1), @@ -1770,6 +1690,7 @@ function get_schema_struct() 'forum_id_type' => array('INDEX', array('forum_id', 'topic_type')), 'last_post_time' => array('INDEX', 'topic_last_post_time'), 'topic_approved' => array('INDEX', 'topic_approved'), + 'forum_appr_last' => array('INDEX', array('forum_id', 'topic_approved', 'topic_last_post_id')), 'fid_time_moved' => array('INDEX', array('forum_id', 'topic_last_post_time', 'topic_moved_id')), ), ); @@ -1903,7 +1824,7 @@ function get_schema_struct() 'user_birthday' => array('INDEX', 'user_birthday'), 'user_email_hash' => array('INDEX', 'user_email_hash'), 'user_type' => array('INDEX', 'user_type'), - 'username_clean' => array('INDEX', 'username_clean'), + 'username_clean' => array('UNIQUE', 'username_clean'), ), ); diff --git a/phpBB/develop/create_variable_overview.php b/phpBB/develop/create_variable_overview.php index 8337004c30..3782f53e4c 100644 --- a/phpBB/develop/create_variable_overview.php +++ b/phpBB/develop/create_variable_overview.php @@ -35,7 +35,7 @@ $merge = array('gcp', 'login', 'mcp', 'memberlist', 'posting', 'ucp'); if (!is_writable($store_dir)) { - die("Directory $store_dir is not writeable!"); + die("Directory $store_dir is not writable!"); } $contents = implode('', file('../adm/subSilver.css', filesize('../adm/subSilver.css'))); diff --git a/phpBB/develop/fill.php b/phpBB/develop/fill.php index 2aee3d333f..336e510d06 100644 --- a/phpBB/develop/fill.php +++ b/phpBB/develop/fill.php @@ -10,6 +10,15 @@ // LICENCE : GPL vs2.0 [ see /docs/COPYING ] // // ------------------------------------------------------------- +// +// Security message: +// +// This script is potentially dangerous. +// Remove or comment the next line (die(".... ) to enable this script. +// Do NOT FORGET to either remove this script or disable it after you have used it. +// +die("Please read the first lines of this script for instructions on how to enable it"); + define('IN_PHPBB', true); $phpbb_root_path = './../'; diff --git a/phpBB/develop/generate_utf_casefold.php b/phpBB/develop/generate_utf_casefold.php index d9aace10ce..cb8ce489b7 100644 --- a/phpBB/develop/generate_utf_casefold.php +++ b/phpBB/develop/generate_utf_casefold.php @@ -13,6 +13,15 @@ if (php_sapi_name() != 'cli') die("This program must be run from the command line.\n"); } +// +// Security message: +// +// This script is potentially dangerous. +// Remove or comment the next line (die(".... ) to enable this script. +// Do NOT FORGET to either remove this script or disable it after you have used it. +// +die("Please read the first lines of this script for instructions on how to enable it"); + set_time_limit(0); define('IN_PHPBB', true); diff --git a/phpBB/develop/generate_utf_tables.php b/phpBB/develop/generate_utf_tables.php index ffad9106d6..ce19c2a374 100644 --- a/phpBB/develop/generate_utf_tables.php +++ b/phpBB/develop/generate_utf_tables.php @@ -13,6 +13,15 @@ if (php_sapi_name() != 'cli') die("This program must be run from the command line.\n"); } +// +// Security message: +// +// This script is potentially dangerous. +// Remove or comment the next line (die(".... ) to enable this script. +// Do NOT FORGET to either remove this script or disable it after you have used it. +// +die("Please read the first lines of this script for instructions on how to enable it"); + set_time_limit(0); define('IN_PHPBB', true); diff --git a/phpBB/develop/lang_duplicates.php b/phpBB/develop/lang_duplicates.php index 5a77c79543..5be48f69f0 100644 --- a/phpBB/develop/lang_duplicates.php +++ b/phpBB/develop/lang_duplicates.php @@ -4,6 +4,15 @@ Please read this document completely before proceeding with installation, updating or converting.

-

Please note these instructions are not fully comprehensive, a more thorough userguide will be available on the phpBB website in the near future. However, this document will walk you through the basics on installing, updating and converting the forum software.

+

This document will walk you through the basics on installing, updating and converting the forum software.

-

A basic overview of running phpBB3 can be found in the accompanying README documentation. Please ensure you read that document in addition to this! For more detailed information on using phpBB3 you should read the documentation available online.

+

A basic overview of running phpBB3 can be found in the accompanying README file. Please ensure you read that document in addition to this! For more detailed information on using, installing, updating and converting phpBB3 you should read the documentation available online.

Install

@@ -209,12 +209,12 @@ p a { @@ -237,7 +237,7 @@ p a {
  • MySQL 3.23 or above (MySQLi supported)
  • PostgreSQL 7.3+
  • SQLite 2.8.2+
  • -
  • Firebird 2.0
  • +
  • Firebird 2.0+
  • MS SQL Server 2000 or above (directly or via ODBC)
  • Oracle
  • @@ -311,7 +311,7 @@ p a {

    Administrator details

    -

    Now you have to create your administration user. This user will have full administration access and he will be the first user on your forum. All fields on this page are required. You can also set the default language of your forum on this page. In a vanilla phpBB3 installation we only include English [GB]. You can download further languages from www.phpbb.com, and add them before installing or later.

    +

    Now you have to create your administration user. This user will have full administration access and he/she will be the first user on your forum. All fields on this page are required. You can also set the default language of your forum on this page. In a vanilla phpBB3 installation we only include English. You can download further languages from www.phpbb.com, and add them before installing or later.

    Configuration file

    @@ -362,7 +362,7 @@ p a {

    This package contains a number of archives, each contains the files changed from a given release to the latest version. You should select the appropriate archive for your current version, e.g. if you currently have 3.0.0 you should select the phpBB-3.0.0_to_3.0.1.zip/tar.gz file.

    -

    The directory structure has been preserved enabling you (if you wish) to simply upload the contents of the archive to the appropriate location on your server, i.e. simply overwrite the existing files with the new versions. Do not forget that if you have installed any Mods these files will overwrite the originals possibly destroying them in the process. You will need to re-add Mods to any affected file before uploading.

    +

    The directory structure has been preserved enabling you (if you wish) to simply upload the contents of the archive to the appropriate location on your server, i.e. simply overwrite the existing files with the new versions. Do not forget that if you have installed any MODs these files will overwrite the originals possibly destroying them in the process. You will need to re-add MODs to any affected file before uploading.

    As for the other update procedures you should run install/database_update.php after you have finished updating the files. This will update your database schema and increment the version number.

    @@ -374,11 +374,11 @@ p a {
    -

    The patch file is probably the best solution for those with many Mods or other changes who do not want to re-add them back to all the changed files. To use this you will need command line access to a standard UNIX type patch application. If you do not have access to such an application but still want to use this update approach we recommend the Automatic update package explained below.

    +

    The patch file is probably the best solution for those with many Modifications (MODs) or other changes who do not want to re-add them back to all the changed files. To use this you will need command line access to a standard UNIX type patch application. If you do not have access to such an application but still want to use this update approach we recommend the Automatic update package explained below.

    A number of patch files are provided to allow you to update from previous stable releases. Select the correct patch, e.g. if your current version is 3.0.0 you need the phpBB-3.0.0_to_3.0.1.patch file. Place the correct patch in the parent directory containing the phpBB3 core files (i.e. index.php, viewforum.php, etc.). With this done you should run the following command: patch -cl -d [PHPBB DIRECTORY] -p1 < [PATCH NAME] (where PHPBB DIRECTORY is the directory name your phpBB Installation resides in, for example phpBB3, and where PATCH NAME is the relevant filename of the selected patch file). This should complete quickly, hopefully without any HUNK FAILED comments.

    -

    If you do get failures you should look at using the Changed files only package to replace the files which failed to patch, please note that you will need to manually re-add any Mods to these particular files. Alternatively if you know how you can examine the .rej files to determine what failed where and make manual adjustments to the relevant source.

    +

    If you do get failures you should look at using the Changed files only package to replace the files which failed to patch, please note that you will need to manually re-add any Modifications (MODs) to these particular files. Alternatively if you know how you can examine the .rej files to determine what failed where and make manual adjustments to the relevant source.

    You should of course delete the patch file (or files) after use. As for the other update procedures you should run install/database_update.php after you have finished updating the files. This will update your database schema and data (if appropriate) and increment the version number.

    diff --git a/phpBB/docs/README.html b/phpBB/docs/README.html index 196a0f2de4..3c77d11cc5 100644 --- a/phpBB/docs/README.html +++ b/phpBB/docs/README.html @@ -173,12 +173,12 @@ p a {
    1. Internationalisation (i18n)
    2. Styles
    3. -
    4. Mods
    5. +
    6. Modifications
  • Getting help with phpBB3
      -
    1. Userguide
    2. +
    3. Documentation
    4. Community Forums
    5. Internet Relay Chat
    @@ -200,9 +200,24 @@ p a {
    -

    Installation and update/conversion instructions can be found in the INSTALL document contained in this distribution. If you are intending to convert from a previous phpBB 2.0.x installation we highly recommend you backup any existing data before proceeding!

    +

    Installation, update and conversion instructions can be found in the INSTALL document contained in this distribution. If you are intending to convert from a previous phpBB 2.0.x installation we highly recommend you backup any existing data before proceeding!

    -

    Users of phpBB3 Beta versions cannot directly update or convert.

    +

    Users of phpBB3 Beta versions cannot directly update.

    + +

    Please note that we won't support the following installation types:

    + + +

    We give support for the following installation types:

    + +
    Top @@ -224,7 +239,7 @@ p a {

    This is the official location for all supported language sets. If you download a package from a 3rd party site you do so with the understanding that we cannot offer support. So please, do not ask for help in these cases!

    -

    Installation of these packages is straightforward, simply download the required language pack and unarchive it into the languages/ folder. Please ensure you retain the directory structure when doing this! Once uploaded go to the Admin->System->Language Packs and install the now appeared new language pack. To install the style image packs you should unarchive the file/s into the styles/subSilver/imageset directory, again you must retain the directory structure. Once installed the languages will become immediately available.

    +

    Installation of these packages is straightforward, simply download the required language pack and unarchive it into the languages/ folder. Please ensure you retain the directory structure when doing this! Once uploaded go to the Admin->System->Language Packs and install the now appeared new language pack. To install the style image packs you should unarchive the file/s into the styles/subsilver2/imageset directory, again you must retain the directory structure. Once installed the languages will become immediately available.

    If your language is not available please visit our forums where you will find a topic listing translations currently available or in preparation. This topic also gives you information should you wish to volunteer to translate a language not currently listed

    @@ -248,13 +263,13 @@ p a { Top

    - 2.iii. Mods + 2.iii. Modifications

    Although not officially supported by phpBB Group, phpBB has a thriving modification scene. These third party modifications to the standard phpBB extend its capabilities still further and can be found at:

    -

    http://www.phpbb.com/mods

    +

    http://www.phpbb.com/mods/

    Please remember that any bugs or other issues that occur after you have added any modification should NOT be reported to the bug tracker (see below). First remove the modification and see if the problem is resolved.

    @@ -270,13 +285,13 @@ p a {

    phpBB3 can seem a little daunting to new users in places, particularly with regard the permission system. The first thing you should do is check the FAQ which covers a few basic getting started questions. If you need additional help there are several places you should look.

    - 3.i. phpBB3 Userguide + 3.i. phpBB3 Documentation

    -

    A comprehensive userguide is now available online and can be accessed from the following location:

    +

    A comprehensive documentation is now available online and can be accessed from the following location:

    -

    http://www.phpbb.com/support/documentation/

    +

    http://www.phpbb.com/support/documentation/3.0/

    This covers everything from installation through setting permissions and managing users.

    @@ -314,7 +329,7 @@ p a {

    4. Status of this version

    -

    This is the third stable release of phpBB. The 3.0.x line is essentially feature frozen, point releases will see only bugs and such like fixed, though feature alterations and minor feature additions may be done. Our next major release will be phpBB 3.2 and the planning phase has begun (the unstable development version is 3.1). Please do not post questions asking when 3.2 will be available, no release date has been set.

    +

    This is the third stable release of phpBB. The 3.0.x line is essentially feature frozen, with only point releases seeing fixes for bugs and security issues, though feature alterations and minor feature additions may be done if deemed absolutely required. Our next major release will be phpBB 3.2 and the planning phase has begun (the unstable development version is 3.1). Please do not post questions asking when 3.2 will be available, no release date has been set.

    For those interested in the development of phpBB should keep an eye on the community forums to see how things are progressing:

    @@ -377,7 +392,7 @@ p a {

    6. Overview of current bug list

    -

    This list is not complete but does represent those bugs which may effect users on a wider scale. Other bugs listed in the tracker have typically been shown to be limited to certain setups or methods of installation/upgrade.

    +

    This list is not complete but does represent those bugs which may effect users on a wider scale. Other bugs listed in the tracker have typically been shown to be limited to certain setups or methods of installation, updating and/or conversions.

    @@ -626,6 +645,7 @@ class dbal + ' . $this->html_hold . ' diff --git a/phpBB/includes/db/firebird.php b/phpBB/includes/db/firebird.php index 5ce4949956..4b3a15dd8d 100644 --- a/phpBB/includes/db/firebird.php +++ b/phpBB/includes/db/firebird.php @@ -31,7 +31,7 @@ class dbal_firebird extends dbal /** * Connect to server */ - function sql_connect($sqlserver, $sqluser, $sqlpassword, $database, $port = false, $persistency = false) + function sql_connect($sqlserver, $sqluser, $sqlpassword, $database, $port = false, $persistency = false, $new_link = false) { $this->persistency = $persistency; $this->user = $sqluser; @@ -109,7 +109,80 @@ class dbal_firebird extends dbal if ($this->query_result === false) { - if (($this->query_result = @ibase_query($this->db_connect_id, $query)) === false) + $prepared = false; + // We overcome Firebird's 32767 char limit by binding vars + if (strlen($query) > 32767) + { + $array = array(); + + if (preg_match('/^(INSERT INTO[^(]+)\\(([^()]+)\\) VALUES[^(]+\\((.*?)\\)$/s', $query, $regs)) + { + if (strlen($regs[3]) > 32767) + { + preg_match_all('/\'(?:[^\']++|\'\')*+\'|\\d+/', $regs[3], $vals, PREG_PATTERN_ORDER); + + $inserts = $vals[0]; + unset($vals); + + foreach ($inserts as $key => $value) + { + if (!empty($value) && $value[0] === "'" && strlen($value) > 32769) // check to see if this thing is greater than the max + 'x2 + { + $inserts[$key] = '?'; + $array[] = str_replace("''", "'", substr($value, 1, -1)); + } + } + + $query = $regs[1] . '(' . $regs[2] . ') VALUES (' . implode(', ', $inserts) . ')'; + unset($art); + + $prepared = true; + } + } + else if (preg_match_all('/^(UPDATE ([\\w_]++)\\s+SET )(\\w+ = (?:\'(?:[^\']++|\'\')*+\'|\\d+)(?:, \\w+ = (?:\'(?:[^\']++|\'\')*+\'|\\d+))*+)\\s+(WHERE.*)$/s', $query, $data, PREG_SET_ORDER)) + { + if (strlen($data[0][3]) > 32767) + { + $update = $data[0][1]; + $where = $data[0][4]; + preg_match_all('/(\\w++) = (\'(?:[^\']++|\'\')*+\'|\\d++)/', $data[0][3], $temp, PREG_SET_ORDER); + unset($data); + + $art = array(); + foreach ($temp as $value) + { + if (!empty($value[2]) && $value[2][0] === "'" && strlen($value[2]) > 32769) // check to see if this thing is greater than the max + 'x2 + { + $array[] = str_replace("''", "'", substr($value[2], 1, -1)); + $art[] = $value[1] . '=?'; + } + else + { + $art[] = $value[1] . '=' . $value[2]; + } + } + + $query = $update . implode(', ', $art) . ' ' . $where; + unset($art); + + $prepared = true; + } + } + } + + if ($prepared) + { + $p_query = ibase_prepare($this->db_connect_id, $query); + array_unshift($array, $p_query); + $this->query_result = call_user_func_array('ibase_execute', $array); + unset($array); + + if ($this->query_result === false) + { + $this->sql_error($query); + } + } + else if (($this->query_result = @ibase_query($this->db_connect_id, $query)) === false) { $this->sql_error($query); } @@ -273,19 +346,19 @@ class dbal_firebird extends dbal if ($query_id !== false && $this->last_query_text != '') { - if ($this->query_result && preg_match('#^INSERT[\t\n ]+INTO[\t\n ]+([a-z0-9\_\-]+)#is', $this->last_query_text, $tablename)) + if ($this->query_result && preg_match('#^INSERT[\t\n ]+INTO[\t\n ]+([a-z0-9\_\-]+)#i', $this->last_query_text, $tablename)) { - $sql = "SELECT GEN_ID(" . $tablename[1] . "_gen, 0) AS new_id FROM RDB\$DATABASE"; + $sql = 'SELECT GEN_ID(' . $tablename[1] . '_gen, 0) AS new_id FROM RDB$DATABASE'; if (!($temp_q_id = @ibase_query($this->db_connect_id, $sql))) { return false; } - $temp_result = @ibase_fetch_object($temp_q_id); + $temp_result = @ibase_fetch_assoc($temp_q_id); @ibase_free_result($temp_q_id); - return ($temp_result) ? $temp_result->NEW_ID : false; + return ($temp_result) ? $temp_result['NEW_ID'] : false; } } @@ -323,7 +396,7 @@ class dbal_firebird extends dbal */ function sql_escape($msg) { - return (@ini_get('magic_quotes_sybase') == 1 || strtolower(@ini_get('magic_quotes_sybase')) == 'on') ? str_replace('\\\'', '\'', addslashes($msg)) : str_replace('\'', '\'\'', stripslashes($msg)); + return str_replace("'", "''", $msg); } /** diff --git a/phpBB/includes/db/mssql.php b/phpBB/includes/db/mssql.php index b28ea01acb..bbbe8a6de3 100644 --- a/phpBB/includes/db/mssql.php +++ b/phpBB/includes/db/mssql.php @@ -28,16 +28,16 @@ class dbal_mssql extends dbal /** * Connect to server */ - function sql_connect($sqlserver, $sqluser, $sqlpassword, $database, $port = false, $persistency = false) + function sql_connect($sqlserver, $sqluser, $sqlpassword, $database, $port = false, $persistency = false, $new_link = false) { $this->persistency = $persistency; $this->user = $sqluser; $this->server = $sqlserver . (($port) ? ':' . $port : ''); $this->dbname = $database; - ini_set('mssql.charset', 'UTF-8'); + @ini_set('mssql.charset', 'UTF-8'); - $this->db_connect_id = ($this->persistency) ? @mssql_pconnect($this->server, $this->user, $sqlpassword) : @mssql_connect($this->server, $this->user, $sqlpassword); + $this->db_connect_id = ($this->persistency) ? @mssql_pconnect($this->server, $this->user, $sqlpassword, $new_link) : @mssql_connect($this->server, $this->user, $sqlpassword, $new_link); if ($this->db_connect_id && $this->dbname != '') { @@ -86,11 +86,11 @@ class dbal_mssql extends dbal break; case 'commit': - return @mssql_query('commit', $this->db_connect_id); + return @mssql_query('COMMIT TRANSACTION', $this->db_connect_id); break; case 'rollback': - return @mssql_query('ROLLBACK', $this->db_connect_id); + return @mssql_query('ROLLBACK TRANSACTION', $this->db_connect_id); break; } @@ -258,7 +258,7 @@ class dbal_mssql extends dbal */ function sql_nextid() { - $result_id = @mssql_query('SELECT @@IDENTITY', $this->db_connect_id); + $result_id = @mssql_query('SELECT SCOPE_IDENTITY()', $this->db_connect_id); if ($result_id) { if ($row = @mssql_fetch_assoc($result_id)) @@ -313,7 +313,7 @@ class dbal_mssql extends dbal function _sql_error() { $error = array( - 'message' => @mssql_get_last_message($this->db_connect_id), + 'message' => @mssql_get_last_message(), 'code' => '' ); @@ -385,7 +385,7 @@ class dbal_mssql extends dbal if (preg_match('/^SELECT/', $explain_query)) { $html_table = false; - @mssql_query("SET SHOWPLAN_TEXT ON;", $this->db_connect_id); + @mssql_query('SET SHOWPLAN_TEXT ON;', $this->db_connect_id); if ($result = @mssql_query($explain_query, $this->db_connect_id)) { @mssql_next_result($result); @@ -394,7 +394,7 @@ class dbal_mssql extends dbal $html_table = $this->sql_report('add_select_row', $query, $html_table, $row); } } - @mssql_query("SET SHOWPLAN_TEXT OFF;", $this->db_connect_id); + @mssql_query('SET SHOWPLAN_TEXT OFF;', $this->db_connect_id); @mssql_free_result($result); if ($html_table) diff --git a/phpBB/includes/db/mssql_odbc.php b/phpBB/includes/db/mssql_odbc.php index 0b8f1e2a95..52942ac3bd 100644 --- a/phpBB/includes/db/mssql_odbc.php +++ b/phpBB/includes/db/mssql_odbc.php @@ -22,6 +22,11 @@ include_once($phpbb_root_path . 'includes/db/dbal.' . $phpEx); * Unified ODBC functions * Unified ODBC functions support any database having ODBC driver, for example Adabas D, IBM DB2, iODBC, Solid, Sybase SQL Anywhere... * Here we only support MSSQL Server 2000+ because of the provided schema +* +* @note number of bytes returned for returning data depends on odbc.defaultlrl php.ini setting. +* If it is limited to 4K for example only 4K of data is returned max, resulting in incomplete theme data for example. +* @note odbc.defaultbinmode may affect UTF8 characters +* * @package dbal */ class dbal_mssql_odbc extends dbal @@ -31,13 +36,16 @@ class dbal_mssql_odbc extends dbal /** * Connect to server */ - function sql_connect($sqlserver, $sqluser, $sqlpassword, $database, $port = false, $persistency = false) + function sql_connect($sqlserver, $sqluser, $sqlpassword, $database, $port = false, $persistency = false, $new_link = false) { $this->persistency = $persistency; $this->user = $sqluser; $this->server = $sqlserver . (($port) ? ':' . $port : ''); $this->dbname = $database; + // + // @ini_set('odbc.defaultlrl', '32M'); + $this->db_connect_id = ($this->persistency) ? @odbc_pconnect($this->server, $this->user, $sqlpassword) : @odbc_connect($this->server, $this->user, $sqlpassword); return ($this->db_connect_id) ? $this->db_connect_id : $this->sql_error(''); @@ -195,8 +203,9 @@ class dbal_mssql_odbc extends dbal /** * Fetch current row + * @note number of bytes returned depends on odbc.defaultlrl php.ini setting. If it is limited to 4K for example only 4K of data is returned max. */ - function sql_fetchrow($query_id = false) + function sql_fetchrow($query_id = false, $debug = false) { global $cache; @@ -267,7 +276,7 @@ class dbal_mssql_odbc extends dbal { if (@odbc_fetch_array($result_id)) { - $id = @odbc_result($result_id, 1); + $id = @odbc_result($result_id, 1); @odbc_free_result($result_id); return $id; } @@ -363,7 +372,7 @@ class dbal_mssql_odbc extends dbal if (preg_match('/^SELECT/', $explain_query)) { $html_table = false; - @odbc_exec($this->db_connect_id, "SET SHOWPLAN_TEXT ON;"); + @odbc_exec($this->db_connect_id, 'SET SHOWPLAN_TEXT ON;'); if ($result = @odbc_exec($this->db_connect_id, $explain_query)) { @odbc_next_result($result); @@ -372,7 +381,7 @@ class dbal_mssql_odbc extends dbal $html_table = $this->sql_report('add_select_row', $query, $html_table, $row); } } - @odbc_exec($this->db_connect_id, "SET SHOWPLAN_TEXT OFF;"); + @odbc_exec($this->db_connect_id, 'SET SHOWPLAN_TEXT OFF;'); @odbc_free_result($result); if ($html_table) diff --git a/phpBB/includes/db/mysql.php b/phpBB/includes/db/mysql.php index b750618ae6..c20e73315a 100644 --- a/phpBB/includes/db/mysql.php +++ b/phpBB/includes/db/mysql.php @@ -30,12 +30,13 @@ include_once($phpbb_root_path . 'includes/db/dbal.' . $phpEx); class dbal_mysql extends dbal { var $mysql_version; + var $multi_insert = true; /** * Connect to server * @access public */ - function sql_connect($sqlserver, $sqluser, $sqlpassword, $database, $port = false, $persistency = false) + function sql_connect($sqlserver, $sqluser, $sqlpassword, $database, $port = false, $persistency = false, $new_link = false) { $this->persistency = $persistency; $this->user = $sqluser; @@ -44,11 +45,11 @@ class dbal_mysql extends dbal $this->sql_layer = 'mysql4'; - $this->db_connect_id = ($this->persistency) ? @mysql_pconnect($this->server, $this->user, $sqlpassword) : @mysql_connect($this->server, $this->user, $sqlpassword); + $this->db_connect_id = ($this->persistency) ? @mysql_pconnect($this->server, $this->user, $sqlpassword, $new_link) : @mysql_connect($this->server, $this->user, $sqlpassword, $new_link); if ($this->db_connect_id && $this->dbname != '') { - if (@mysql_select_db($this->dbname)) + if (@mysql_select_db($this->dbname, $this->db_connect_id)) { // Determine what version we are using and if it natively supports UNICODE $this->mysql_version = mysql_get_server_info($this->db_connect_id); @@ -326,6 +327,22 @@ class dbal_mysql extends dbal */ function _sql_report($mode, $query = '') { + static $test_prof; + + // current detection method, might just switch to see the existance of INFORMATION_SCHEMA.PROFILING + if ($test_prof === null) + { + $test_prof = false; + if (strpos($this->mysql_version, 'community') !== false) + { + $ver = substr($this->mysql_version, 0, strpos($this->mysql_version, '-')); + if (version_compare($ver, '5.0.37', '>=') && version_compare($ver, '5.1', '<')) + { + $test_prof = true; + } + } + } + switch ($mode) { case 'start': @@ -344,6 +361,12 @@ class dbal_mysql extends dbal { $html_table = false; + // begin profiling + if ($test_prof) + { + @mysql_query('SET profiling = 1;', $this->db_connect_id); + } + if ($result = @mysql_query("EXPLAIN $explain_query", $this->db_connect_id)) { while ($row = @mysql_fetch_assoc($result)) @@ -357,6 +380,43 @@ class dbal_mysql extends dbal { $this->html_hold .= ''; } + + if ($test_prof) + { + $html_table = false; + + // get the last profile + if ($result = @mysql_query('SHOW PROFILE ALL;', $this->db_connect_id)) + { + $this->html_hold .= '
    '; + while ($row = @mysql_fetch_assoc($result)) + { + // make HTML safe + if (!empty($row['Source_function'])) + { + $row['Source_function'] = str_replace(array('<', '>'), array('<', '>'), $row['Source_function']); + } + + // remove unsupported features + foreach ($row as $key => $val) + { + if ($val === null) + { + unset($row[$key]); + } + } + $html_table = $this->sql_report('add_select_row', $query, $html_table, $row); + } + } + @mysql_free_result($result); + + if ($html_table) + { + $this->html_hold .= ''; + } + + @mysql_query('SET profiling = 0;', $this->db_connect_id); + } } break; diff --git a/phpBB/includes/db/mysqli.php b/phpBB/includes/db/mysqli.php index da6faa3983..6f54b5c8b3 100644 --- a/phpBB/includes/db/mysqli.php +++ b/phpBB/includes/db/mysqli.php @@ -26,10 +26,12 @@ include_once($phpbb_root_path . 'includes/db/dbal.' . $phpEx); */ class dbal_mysqli extends dbal { + var $multi_insert = true; + /** * Connect to server */ - function sql_connect($sqlserver, $sqluser, $sqlpassword, $database, $port = false, $persistency = false) + function sql_connect($sqlserver, $sqluser, $sqlpassword, $database, $port = false, $persistency = false , $new_link = false) { $this->persistency = $persistency; $this->user = $sqluser; @@ -294,6 +296,22 @@ class dbal_mysqli extends dbal */ function _sql_report($mode, $query = '') { + static $test_prof; + + // current detection method, might just switch to see the existance of INFORMATION_SCHEMA.PROFILING + if ($test_prof === null) + { + $test_prof = false; + if (strpos(mysqli_get_server_info($this->db_connect_id), 'community') !== false) + { + $ver = mysqli_get_server_version($this->db_connect_id); + if ($ver >= 50037 && $ver < 51000) + { + $test_prof = true; + } + } + } + switch ($mode) { case 'start': @@ -312,6 +330,12 @@ class dbal_mysqli extends dbal { $html_table = false; + // begin profiling + if ($test_prof) + { + @mysqli_query($this->db_connect_id, 'SET profiling = 1;'); + } + if ($result = @mysqli_query($this->db_connect_id, "EXPLAIN $explain_query")) { while ($row = @mysqli_fetch_assoc($result)) @@ -325,6 +349,43 @@ class dbal_mysqli extends dbal { $this->html_hold .= ''; } + + if ($test_prof) + { + $html_table = false; + + // get the last profile + if ($result = @mysqli_query($this->db_connect_id, 'SHOW PROFILE ALL;')) + { + $this->html_hold .= '
    '; + while ($row = @mysqli_fetch_assoc($result)) + { + // make HTML safe + if (!empty($row['Source_function'])) + { + $row['Source_function'] = str_replace(array('<', '>'), array('<', '>'), $row['Source_function']); + } + + // remove unsupported features + foreach ($row as $key => $val) + { + if ($val === null) + { + unset($row[$key]); + } + } + $html_table = $this->sql_report('add_select_row', $query, $html_table, $row); + } + } + @mysqli_free_result($result); + + if ($html_table) + { + $this->html_hold .= ''; + } + + @mysqli_query($this->db_connect_id, 'SET profiling = 0;'); + } } break; @@ -347,6 +408,7 @@ class dbal_mysqli extends dbal break; } + @mysqli_query($this->db_connect_id, "SET profiling = 0;"); } } diff --git a/phpBB/includes/db/oracle.php b/phpBB/includes/db/oracle.php index 860c7a3614..9c0491d8c8 100644 --- a/phpBB/includes/db/oracle.php +++ b/phpBB/includes/db/oracle.php @@ -29,14 +29,14 @@ class dbal_oracle extends dbal /** * Connect to server */ - function sql_connect($sqlserver, $sqluser, $sqlpassword, $database, $port = false, $persistency = false) + function sql_connect($sqlserver, $sqluser, $sqlpassword, $database, $port = false, $persistency = false, $new_link = false) { $this->persistency = $persistency; $this->user = $sqluser; $this->server = $sqlserver . (($port) ? ':' . $port : ''); $this->dbname = $database; - $this->db_connect_id = ($this->persistency) ? @ociplogon($this->user, $sqlpassword, $this->server, 'UTF8') : @ocinlogon($this->user, $sqlpassword, $this->server, 'UTF8'); + $this->db_connect_id = ($new_link) ? @ocinlogon($this->user, $sqlpassword, $this->dbname, 'UTF8') : (($this->persistency) ? @ociplogon($this->user, $sqlpassword, $this->dbname, 'UTF8') : @ocinlogon($this->user, $sqlpassword, $this->dbname, 'UTF8')); return ($this->db_connect_id) ? $this->db_connect_id : $this->sql_error(''); } @@ -110,53 +110,60 @@ class dbal_oracle extends dbal $in_transaction = true; } - $array = array(); - // We overcome Oracle's 4000 char limit by binding vars - if (preg_match('/^(INSERT INTO[^(]+)\\(([^()]+)\\) VALUES[^(]+\\(([^()]+)\\)$/', $query, $regs)) + if (strlen($query) > 4000) { - if (strlen($regs[3]) > 4000) + $array = array(); + + if (preg_match('/^(INSERT INTO[^(]+)\\(([^()]+)\\) VALUES[^(]+\\((.*?)\\)$/s', $query, $regs)) { - $cols = explode(', ', $regs[2]); - $vals = explode(', ', $regs[3]); - foreach ($vals as $key => $value) + if (strlen($regs[3]) > 4000) { - if (strlen($value) > 4002) // check to see if this thing is greater than the max + 'x2 + $cols = explode(', ', $regs[2]); + preg_match_all('/\'(?:[^\']++|\'\')*+\'|\\d+/', $regs[3], $vals, PREG_PATTERN_ORDER); + + $inserts = $vals[0]; + unset($vals); + + foreach ($inserts as $key => $value) { - $vals[$key] = ':' . strtoupper($cols[$key]); - $array[$vals[$key]] = substr($value, 1, -1); + if (!empty($value) && $value[0] === "'" && strlen($value) > 4002) // check to see if this thing is greater than the max + 'x2 + { + $inserts[$key] = ':' . strtoupper($cols[$key]); + $array[$inserts[$key]] = str_replace("''", "'", substr($value, 1, -1)); + } } + + $query = $regs[1] . '(' . $regs[2] . ') VALUES (' . implode(', ', $inserts) . ')'; + unset($art); } - $query = $regs[1] . '(' . implode(', ', $cols) . ') VALUES (' . implode(', ', $vals) . ')'; } - } - else if (preg_match('/^(UPDATE.*?)SET (.*)(\\sWHERE.*)$/s', $query, $regs)) - { - if (strlen($regs[2]) > 4000) + else if (preg_match_all('/^(UPDATE [\\w_]++\\s+SET )(\\w+ = (?:\'(?:[^\']++|\'\')*+\'|\\d+)(?:, \\w+ = (?:\'(?:[^\']++|\'\')*+\'|\\d+))*+)\\s+(WHERE.*)$/s', $query, $data, PREG_SET_ORDER)) { - $args = explode(', ', $regs[2]); - $cols = array(); - foreach ($args as $value) + if (strlen($data[0][2]) > 4000) { - $temp_array = explode('=', $value); - $cols[$temp_array[0]] = $temp_array[1]; - } + $update = $data[0][1]; + $where = $data[0][3]; + preg_match_all('/(\\w++) = (\'(?:[^\']++|\'\')*+\'|\\d++)/', $data[0][2], $temp, PREG_SET_ORDER); + unset($data); - foreach ($cols as $col => $val) - { - if (strlen($val) > 4003) // check to see if this thing is greater than the max + 'x2 + a space + $art = array(); + foreach ($temp as $value) { - $cols[$col] = ' :' . strtoupper(rtrim($col)); - $array[ltrim($cols[$col])] = substr(trim($val), 2, -1); + if (!empty($value[2]) && $value[2][0] === "'" && strlen($value[2]) > 4002) // check to see if this thing is greater than the max + 'x2 + { + $art[] = $value[1] . '=:' . strtoupper($value[1]); + $array[$value[1]] = str_replace("''", "'", substr($value[2], 1, -1)); + } + else + { + $art[] = $value[1] . '=' . $value[2]; + } } - } - $art = array(); - foreach ($cols as $col => $val) - { - $art[] = $col . '=' . $val; + $query = $update . implode(', ', $art) . ' ' . $where; + unset($art); } - $query = $regs[1] . 'SET ' . implode(', ', $art) . $regs[3]; } } diff --git a/phpBB/includes/db/postgres.php b/phpBB/includes/db/postgres.php index f2e96260ba..94bc70fa6a 100644 --- a/phpBB/includes/db/postgres.php +++ b/phpBB/includes/db/postgres.php @@ -26,11 +26,12 @@ include_once($phpbb_root_path . 'includes/db/dbal.' . $phpEx); class dbal_postgres extends dbal { var $last_query_text = ''; + var $pgsql_version; /** * Connect to server */ - function sql_connect($sqlserver, $sqluser, $sqlpassword, $database, $port = false, $persistency = false) + function sql_connect($sqlserver, $sqluser, $sqlpassword, $database, $port = false, $persistency = false, $new_link = false) { $connect_string = ''; @@ -62,17 +63,54 @@ class dbal_postgres extends dbal } } + $schema = ''; + if ($database) { $this->dbname = $database; + if (strpos($database, '.') !== false) + { + list($database, $schema) = explode('.', $database); + } $connect_string .= "dbname=$database"; } $this->persistency = $persistency; - $this->db_connect_id = ($this->persistency) ? @pg_pconnect($connect_string) : @pg_connect($connect_string); + $this->db_connect_id = ($this->persistency) ? @pg_pconnect($connect_string, $new_link) : @pg_connect($connect_string, $new_link); - return ($this->db_connect_id) ? $this->db_connect_id : $this->sql_error(''); + if ($this->db_connect_id) + { + // determine what version of PostgreSQL is running, we can be more efficient if they are running 8.2+ + if (version_compare(PHP_VERSION, '5.0.0', '>=')) + { + $this->pgsql_version = @pg_parameter_status($this->db_connect_id, 'server_version'); + } + else + { + $query_id = @pg_query($this->db_connect_id, 'SELECT VERSION()'); + $row = @pg_fetch_assoc($query_id, null); + @pg_free_result($query_id); + + if (!empty($row['version'])) + { + $this->pgsql_version = substr($row['version'], 10); + } + } + + if (!empty($this->pgsql_version) && $this->pgsql_version[0] >= '8' && $this->pgsql_version[2] >= '2') + { + $this->multi_insert = true; + } + + if ($schema !== '') + { + @pg_query($this->db_connect_id, 'SET search_path TO ' . $schema); + } + return $this->db_connect_id; + } + + return $this->sql_error(''); } /** @@ -80,20 +118,7 @@ class dbal_postgres extends dbal */ function sql_server_info() { - if (version_compare(phpversion(), '5.0.0', '>=')) - { - $version = @pg_version($this->db_connect_id); - return 'PostgreSQL' . ((!empty($version)) ? ' ' . $version['client'] : ''); - } - else - { - $query_id = @pg_query($this->db_connect_id, 'select version()'); - $row = @pg_fetch_assoc($query_id, null); - @pg_free_result($query_id); - - $version = $row['version']; - return ((!empty($version)) ? ' ' . $version : ''); - } + return 'PostgreSQL ' . $this->pgsql_version; } /** diff --git a/phpBB/includes/db/sqlite.php b/phpBB/includes/db/sqlite.php index 9f44bd6b35..8a50c546a7 100644 --- a/phpBB/includes/db/sqlite.php +++ b/phpBB/includes/db/sqlite.php @@ -28,7 +28,7 @@ class dbal_sqlite extends dbal /** * Connect to server */ - function sql_connect($sqlserver, $sqluser, $sqlpassword, $database, $port = false, $persistency = false) + function sql_connect($sqlserver, $sqluser, $sqlpassword, $database, $port = false, $persistency = false, $new_link = false) { $this->persistency = $persistency; $this->user = $sqluser; diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php index ff514e7ec5..fee5f49cc1 100644 --- a/phpBB/includes/functions.php +++ b/phpBB/includes/functions.php @@ -174,6 +174,41 @@ function unique_id($extra = 'c') return substr($val, 4, 16); } +/** +* Determine whether we are approaching the maximum execution time. Should be called once +* at the beginning of the script in which it's used. +* @return bool Either true if the maximum execution time is nearly reached, or false +* if some time is still left. +*/ +function still_on_time($extra_time = 15) +{ + static $max_execution_time, $start_time; + + $time = explode(' ', microtime()); + $current_time = $time[0] + $time[1]; + + if (empty($max_execution_time)) + { + $max_execution_time = (function_exists('ini_get')) ? (int) ini_get('max_execution_time') : (int) get_cfg_var('max_execution_time'); + + // If zero, then set to something higher to not let the user catch the ten seconds barrier. + if ($max_execution_time === 0) + { + $max_execution_time = 50 + $extra_time; + } + + $max_execution_time = min(max(10, ($max_execution_time - $extra_time)), 50); + + // For debugging purposes + // $max_execution_time = 10; + + global $starttime; + $start_time = (empty($starttime)) ? $current_time : $starttime; + } + + return (ceil($current_time - $start_time) < $max_execution_time) ? true : false; +} + /** * Generate sort selection fields */ @@ -267,7 +302,9 @@ function make_jumpbox($action, $forum_id = false, $select_all = false, $acl_list } else if ($row['left_id'] > $right + 1) { - $padding = $padding_store[$row['parent_id']]; + // Ok, if the $padding_store for this parent is empty there is something wrong. For now we will skip over it. + // @todo digging deep to find out "how" this can happen. + $padding = (isset($padding_store[$row['parent_id']])) ? $padding_store[$row['parent_id']] : $padding; } $right = $row['right_id']; @@ -729,14 +766,14 @@ function markread($mode, $forum_id = false, $topic_id = false, $post_time = 0, $ else if ($config['load_anon_lastread'] || $user->data['is_registered']) { $tracking_topics = (isset($_COOKIE[$config['cookie_name'] . '_track'])) ? ((STRIP) ? stripslashes($_COOKIE[$config['cookie_name'] . '_track']) : $_COOKIE[$config['cookie_name'] . '_track']) : ''; - $tracking_topics = ($tracking_topics) ? unserialize($tracking_topics) : array(); + $tracking_topics = ($tracking_topics) ? tracking_unserialize($tracking_topics) : array(); unset($tracking_topics['tf']); unset($tracking_topics['t']); unset($tracking_topics['f']); $tracking_topics['l'] = base_convert(time() - $config['board_startdate'], 10, 36); - $user->set_cookie('track', serialize($tracking_topics), time() + 31536000); + $user->set_cookie('track', tracking_serialize($tracking_topics), time() + 31536000); unset($tracking_topics); if ($user->data['is_registered']) @@ -806,7 +843,7 @@ function markread($mode, $forum_id = false, $topic_id = false, $post_time = 0, $ else if ($config['load_anon_lastread'] || $user->data['is_registered']) { $tracking = (isset($_COOKIE[$config['cookie_name'] . '_track'])) ? ((STRIP) ? stripslashes($_COOKIE[$config['cookie_name'] . '_track']) : $_COOKIE[$config['cookie_name'] . '_track']) : ''; - $tracking = ($tracking) ? unserialize($tracking) : array(); + $tracking = ($tracking) ? tracking_unserialize($tracking) : array(); foreach ($forum_id as $f_id) { @@ -830,7 +867,7 @@ function markread($mode, $forum_id = false, $topic_id = false, $post_time = 0, $ $tracking['f'][$f_id] = base_convert(time() - $config['board_startdate'], 10, 36); } - $user->set_cookie('track', serialize($tracking), time() + 31536000); + $user->set_cookie('track', tracking_serialize($tracking), time() + 31536000); unset($tracking); } @@ -871,7 +908,7 @@ function markread($mode, $forum_id = false, $topic_id = false, $post_time = 0, $ else if ($config['load_anon_lastread'] || $user->data['is_registered']) { $tracking = (isset($_COOKIE[$config['cookie_name'] . '_track'])) ? ((STRIP) ? stripslashes($_COOKIE[$config['cookie_name'] . '_track']) : $_COOKIE[$config['cookie_name'] . '_track']) : ''; - $tracking = ($tracking) ? unserialize($tracking) : array(); + $tracking = ($tracking) ? tracking_unserialize($tracking) : array(); $topic_id36 = base_convert($topic_id, 10, 36); @@ -924,7 +961,7 @@ function markread($mode, $forum_id = false, $topic_id = false, $post_time = 0, $ } } - $user->set_cookie('track', serialize($tracking), time() + 31536000); + $user->set_cookie('track', tracking_serialize($tracking), time() + 31536000); } return; @@ -1107,7 +1144,7 @@ function get_complete_topic_tracking($forum_id, $topic_ids, $global_announce_lis if (!isset($tracking_topics) || !sizeof($tracking_topics)) { $tracking_topics = (isset($_COOKIE[$config['cookie_name'] . '_track'])) ? ((STRIP) ? stripslashes($_COOKIE[$config['cookie_name'] . '_track']) : $_COOKIE[$config['cookie_name'] . '_track']) : ''; - $tracking_topics = ($tracking_topics) ? unserialize($tracking_topics) : array(); + $tracking_topics = ($tracking_topics) ? tracking_unserialize($tracking_topics) : array(); } if (!$user->data['is_registered']) @@ -1192,7 +1229,7 @@ function update_forum_tracking_info($forum_id, $forum_last_post_time, $f_mark_ti if (!isset($tracking_topics) || !sizeof($tracking_topics)) { $tracking_topics = (isset($_COOKIE[$config['cookie_name'] . '_track'])) ? ((STRIP) ? stripslashes($_COOKIE[$config['cookie_name'] . '_track']) : $_COOKIE[$config['cookie_name'] . '_track']) : ''; - $tracking_topics = ($tracking_topics) ? unserialize($tracking_topics) : array(); + $tracking_topics = ($tracking_topics) ? tracking_unserialize($tracking_topics) : array(); } if (!$user->data['is_registered']) @@ -1275,6 +1312,127 @@ function update_forum_tracking_info($forum_id, $forum_last_post_time, $f_mark_ti return false; } +/** +* Transform an array into a serialized format +*/ +function tracking_serialize($input) +{ + $out = ''; + foreach ($input as $key => $value) + { + if (is_array($value)) + { + $out .= $key . ':(' . tracking_serialize($value) . ');'; + } + else + { + $out .= $key . ':' . $value . ';'; + } + } + return $out; +} + +/** +* Transform a serialized array into an actual array +*/ +function tracking_unserialize($string, $max_depth = 3) +{ + $n = strlen($string); + if ($n > 10010) + { + die('Invalid data supplied'); + } + $data = $stack = array(); + $key = ''; + $mode = 0; + $level = &$data; + for ($i = 0; $i < $n; ++$i) + { + switch ($mode) + { + case 0: + switch ($string[$i]) + { + case ':': + $level[$key] = 0; + $mode = 1; + break; + case ')': + unset($level); + $level = array_pop($stack); + $mode = 3; + break; + default: + $key .= $string[$i]; + } + break; + + case 1: + switch ($string[$i]) + { + case '(': + if (sizeof($stack) >= $max_depth) + { + die('Invalid data supplied'); + } + $stack[] = &$level; + $level[$key] = array(); + $level = &$level[$key]; + $key = ''; + $mode = 0; + break; + default: + $level[$key] = $string[$i]; + $mode = 2; + break; + } + break; + + case 2: + switch ($string[$i]) + { + case ')': + unset($level); + $level = array_pop($stack); + $mode = 3; + break; + case ';': + $key = ''; + $mode = 0; + break; + default: + $level[$key] .= $string[$i]; + break; + } + break; + + case 3: + switch ($string[$i]) + { + case ')': + unset($level); + $level = array_pop($stack); + break; + case ';': + $key = ''; + $mode = 0; + break; + default: + die('Invalid data supplied'); + break; + } + break; + } + } + + if (sizeof($stack) != 0 || ($mode != 0 && $mode != 3)) + { + die('Invalid data supplied'); + } + + return $level; +} + // Pagination functions /** @@ -1297,6 +1455,8 @@ function generate_pagination($base_url, $num_items, $per_page, $start_item, $add } $on_page = floor($start_item / $per_page) + 1; + $url_delim = (strpos($base_url, '?') === false) ? '?' : '&'; + $page_string = ($on_page == 1) ? '1' : '1'; if ($total_pages > 5) @@ -1308,7 +1468,7 @@ function generate_pagination($base_url, $num_items, $per_page, $start_item, $add for ($i = $start_cnt + 1; $i < $end_cnt; $i++) { - $page_string .= ($i == $on_page) ? '' . $i . '' : '' . $i . ''; + $page_string .= ($i == $on_page) ? '' . $i . '' : '' . $i . ''; if ($i < $end_cnt - 1) { $page_string .= $seperator; @@ -1323,7 +1483,7 @@ function generate_pagination($base_url, $num_items, $per_page, $start_item, $add for ($i = 2; $i < $total_pages; $i++) { - $page_string .= ($i == $on_page) ? '' . $i . '' : '' . $i . ''; + $page_string .= ($i == $on_page) ? '' . $i . '' : '' . $i . ''; if ($i < $total_pages) { $page_string .= $seperator; @@ -1331,18 +1491,18 @@ function generate_pagination($base_url, $num_items, $per_page, $start_item, $add } } - $page_string .= ($on_page == $total_pages) ? '' . $total_pages . '' : '' . $total_pages . ''; + $page_string .= ($on_page == $total_pages) ? '' . $total_pages . '' : '' . $total_pages . ''; if ($add_prevnext_text) { if ($on_page != 1) { - $page_string = '' . $user->lang['PREVIOUS'] . '  ' . $page_string; + $page_string = '' . $user->lang['PREVIOUS'] . '  ' . $page_string; } if ($on_page != $total_pages) { - $page_string .= '  ' . $user->lang['NEXT'] . ''; + $page_string .= '  ' . $user->lang['NEXT'] . ''; } } @@ -1350,8 +1510,9 @@ function generate_pagination($base_url, $num_items, $per_page, $start_item, $add $tpl_prefix . 'BASE_URL' => $base_url, $tpl_prefix . 'PER_PAGE' => $per_page, - $tpl_prefix . 'PREVIOUS_PAGE' => ($on_page == 1) ? '' : $base_url . '&start=' . (($on_page - 2) * $per_page), - $tpl_prefix . 'NEXT_PAGE' => ($on_page == $total_pages) ? '' : $base_url . '&start=' . ($on_page * $per_page)) + $tpl_prefix . 'PREVIOUS_PAGE' => ($on_page == 1) ? '' : $base_url . "{$url_delim}start=" . (($on_page - 2) * $per_page), + $tpl_prefix . 'NEXT_PAGE' => ($on_page == $total_pages) ? '' : $base_url . "{$url_delim}start=" . ($on_page * $per_page), + $tpl_prefix . 'TOTAL_PAGES' => $total_pages) ); return $page_string; @@ -1370,7 +1531,7 @@ function on_page($num_items, $per_page, $start) $on_page = floor($start / $per_page) + 1; $template->assign_vars(array( - 'ON_PAGE' => $on_page) + 'ON_PAGE' => $on_page) ); return sprintf($user->lang['PAGE_OF'], $on_page, max(ceil($num_items / $per_page), 1)); @@ -1534,13 +1695,21 @@ function redirect($url, $return = false) // Is the uri pointing to the current directory? if ($pathinfo['dirname'] == '.') { + $url = str_replace('./', '', $url); + + // Strip / from the beginning + if ($url && substr($url, 0, 1) == '/') + { + $url = substr($url, 1); + } + if ($user->page['page_dir']) { - $url = generate_board_url() . '/' . $user->page['page_dir'] . '/' . str_replace('./', '', $url); + $url = generate_board_url() . '/' . $user->page['page_dir'] . '/' . $url; } else { - $url = generate_board_url() . '/' . str_replace('./', '', $url); + $url = generate_board_url() . '/' . $url; } } else @@ -1555,12 +1724,27 @@ function redirect($url, $return = false) $dir = str_repeat('../', sizeof($root_dirs)) . implode('/', $page_dirs); + // Strip / from the end if ($dir && substr($dir, -1, 1) == '/') { $dir = substr($dir, 0, -1); } - $url = $dir . '/' . str_replace($pathinfo['dirname'] . '/', '', $url); + // Strip / from the beginning + if ($dir && substr($dir, 0, 1) == '/') + { + $dir = substr($dir, 1); + } + + $url = str_replace($pathinfo['dirname'] . '/', '', $url); + + // Strip / from the beginning + if (substr($url, 0, 1) == '/') + { + $url = substr($url, 1); + } + + $url = $dir . '/' . $url; $url = generate_board_url() . '/' . $url; } } @@ -1585,11 +1769,11 @@ function redirect($url, $return = false) echo ''; echo ''; echo ''; - echo ''; + echo ''; echo '' . $user->lang['REDIRECT'] . ''; echo ''; echo ''; - echo '
    ' . sprintf($user->lang['URL_REDIRECT'], '', '') . '
    '; + echo '
    ' . sprintf($user->lang['URL_REDIRECT'], '', '') . '
    '; echo ''; echo ''; @@ -1705,8 +1889,9 @@ function meta_refresh($time, $url) $url = redirect($url, true); + // For XHTML compatibility we change back & to & $template->assign_vars(array( - 'META' => '') + 'META' => '') ); } @@ -1857,6 +2042,7 @@ function login_box($redirect = '', $l_explain = '', $l_success = '', $admin = fa $autologin = (!empty($_POST['autologin'])) ? true : false; $viewonline = (!empty($_POST['viewonline'])) ? 0 : 1; $admin = ($admin) ? 1 : 0; + $viewonline = ($admin) ? $user->data['session_viewonline'] : $viewonline; // Check if the supplied username is equal to the one stored within the database if re-authenticating if ($admin && utf8_clean_string($username) != utf8_clean_string($user->data['username'])) @@ -1866,6 +2052,12 @@ function login_box($redirect = '', $l_explain = '', $l_success = '', $admin = fa trigger_error('NO_AUTH_ADMIN_USER_DIFFER'); } + // do not allow empty password + if (!$password) + { + trigger_error('NO_PASSWORD_SUPPLIED'); + } + // If authentication is successful we redirect user to previous page $result = $auth->login($username, $password, $autologin, $viewonline, $admin); @@ -1893,11 +2085,29 @@ function login_box($redirect = '', $l_explain = '', $l_success = '', $admin = fa { $redirect = request_var('redirect', "{$phpbb_root_path}index.$phpEx"); $message = ($l_success) ? $l_success : $user->lang['LOGIN_REDIRECT']; - $l_redirect = ($admin) ? $user->lang['PROCEED_TO_ACP'] : (($redirect === "{$phpbb_root_path}index.$phpEx") ? $user->lang['RETURN_INDEX'] : $user->lang['RETURN_PAGE']); + $l_redirect = ($admin) ? $user->lang['PROCEED_TO_ACP'] : (($redirect === "{$phpbb_root_path}index.$phpEx" || $redirect === "index.$phpEx") ? $user->lang['RETURN_INDEX'] : $user->lang['RETURN_PAGE']); // append/replace SID (may change during the session for AOL users) $redirect = reapply_sid($redirect); + // Make sure the user is able to hide his session + if (!$viewonline) + { + $check_auth = new auth(); + $check_auth->acl($user->data); + + // Reset online status if not allowed to hide the session... + if (!$check_auth->acl_get('u_hideonline')) + { + $sql = 'UPDATE ' . SESSIONS_TABLE . ' + SET session_viewonline = 1 + WHERE session_user_id = ' . $user->data['user_id']; + $db->sql_query($sql); + } + + unset($check_auth); + } + // Special case... the user is effectively banned, but we allow founders to login if (defined('IN_CHECK_BAN') && $result['user_row']['user_type'] != USER_FOUNDER) { @@ -1953,6 +2163,16 @@ function login_box($redirect = '', $l_explain = '', $l_success = '', $admin = fa break; + case LOGIN_ERROR_PASSWORD_CONVERT: + $err = sprintf( + $user->lang[$result['error_msg']], + ($config['email_enable']) ? '' : '', + ($config['email_enable']) ? '' : '', + ($config['board_contact']) ? '' : '', + ($config['board_contact']) ? '' : '' + ); + break; + // Username, password, etc... default: $err = $user->lang[$result['error_msg']]; @@ -1962,6 +2182,7 @@ function login_box($redirect = '', $l_explain = '', $l_success = '', $admin = fa { $err = (!$config['board_contact']) ? sprintf($user->lang[$result['error_msg']], '', '') : sprintf($user->lang[$result['error_msg']], '', ''); } + break; } } @@ -1977,7 +2198,7 @@ function login_box($redirect = '', $l_explain = '', $l_success = '', $admin = fa $redirect .= ($user->page['page_dir']) ? $user->page['page_dir'] . '/' : ''; } - $redirect .= $user->page['page_name'] . (($user->page['query_string']) ? '?' . $user->page['query_string'] : ''); + $redirect .= $user->page['page_name'] . (($user->page['query_string']) ? '?' . htmlspecialchars($user->page['query_string']) : ''); } $s_hidden_fields = build_hidden_fields(array('redirect' => $redirect, 'sid' => $user->session_id)); @@ -2110,7 +2331,7 @@ function bump_topic_allowed($forum_id, $topic_bumped, $last_post_time, $topic_po } // Check bumper, only topic poster and last poster are allowed to bump - if ($topic_poster != $user->data['user_id'] && $last_topic_poster != $user->data['user_id'] && !$auth->acl_get('m_', $forum_id)) + if ($topic_poster != $user->data['user_id'] && $last_topic_poster != $user->data['user_id']) { return false; } @@ -2131,7 +2352,7 @@ function bump_topic_allowed($forum_id, $topic_bumped, $last_post_time, $topic_po function get_context($text, $words, $length = 400) { // first replace all whitespaces with single spaces - $text = preg_replace('/\s+/u', ' ', $text); + $text = preg_replace('/ +/', ' ', strtr($text, "\t\n\r\x0C ", ' '), $text); $word_indizes = array(); if (sizeof($words)) @@ -2140,12 +2361,15 @@ function get_context($text, $words, $length = 400) // find the starting indizes of all words foreach ($words as $word) { - if (preg_match('#(?:[^\w]|^)(' . $word . ')(?:[^\w]|$)#i', $text, $match)) + if ($word) { - $pos = strpos($text, $match[1]); - if ($pos !== false) + if (preg_match('#(?:[^\w]|^)(' . $word . ')(?:[^\w]|$)#i', $text, $match)) { - $word_indizes[] = $pos; + $pos = strpos($text, $match[1]); + if ($pos !== false) + { + $word_indizes[] = $pos; + } } } } @@ -2252,7 +2476,7 @@ function decode_message(&$message, $bbcode_uid = '') $message = str_replace($match, $replace, $message); $match = get_preg_expression('bbcode_htm'); - $replace = array('\1', '\2', '\1', '', ''); + $replace = array('\1', '\1', '\2', '\1', '', ''); $message = preg_replace($match, $replace, $message); } @@ -2270,7 +2494,7 @@ function strip_bbcode(&$text, $uid = '') $text = preg_replace("#\[\/?[a-z0-9\*\+\-]+(?:=.*?)?(?::[a-z])?(\:?$uid)\]#", ' ', $text); $match = get_preg_expression('bbcode_htm'); - $replace = array('\1', '\2', '\1', '', ''); + $replace = array('\1', '\1', '\2', '\1', '', ''); $text = preg_replace($match, $replace, $text); } @@ -2288,7 +2512,7 @@ function generate_text_for_display($text, $uid, $bitfield, $flags) return ''; } - $text = str_replace("\n", '
    ', censor_text($text)); + $text = censor_text($text); // Parse bbcode if bbcode uid stored and bbcode enabled if ($uid && ($flags & OPTION_FLAG_BBCODE)) @@ -2311,6 +2535,8 @@ function generate_text_for_display($text, $uid, $bitfield, $flags) $bbcode->bbcode_second_pass($text, $uid); } + $text = str_replace("\n", '
    ', $text); + $text = smiley_text($text, !($flags & OPTION_FLAG_SMILIES)); return $text; @@ -2373,6 +2599,113 @@ function generate_text_for_edit($text, $uid, $flags) ); } +/** +* A subroutine of make_clickable used with preg_replace +* It places correct HTML around an url, shortens the displayed text +* and makes sure no entities are inside URLs +*/ +function make_clickable_callback($type, $whitespace, $url, $relative_url, $class) +{ + $append = ''; + $url = htmlspecialchars_decode($url); + $relative_url = htmlspecialchars_decode($relative_url); + + // make sure no HTML entities were matched + $chars = array('<', '>', '"'); + $split = false; + foreach ($chars as $char) + { + $next_split = strpos($url, $char); + if ($next_split !== false) + { + $split = ($split !== false) ? min($split, $next_split) : $next_split; + } + } + + if ($split !== false) + { + // an HTML entity was found, so the URL has to end before it + $append = substr($url, $split) . $relative_url; + $url = substr($url, 0, $split); + $relative_url = ''; + } + else if ($relative_url) + { + // same for $relative_url + $split = false; + foreach ($chars as $char) + { + $next_split = strpos($relative_url, $char); + if ($next_split !== false) + { + $split = ($split !== false) ? min($split, $next_split) : $next_split; + } + } + + if ($split !== false) + { + $append = substr($relative_url, $split); + $relative_url = substr($relative_url, 0, $split); + } + } + + // if the last character of the url is a punctuation mark, exclude it from the url + $last_char = ($relative_url) ? $relative_url[strlen($relative_url) - 1] : $url[strlen($url) - 1]; + + switch ($last_char) + { + case '.': + case '?': + case '!': + case ':': + case ',': + $append = $last_char; + if ($relative_url) + { + $relative_url = substr($relative_url, 0, -1); + } + else + { + $url = substr($url, 0, -1); + } + } + + switch ($type) + { + case MAGIC_URL_LOCAL: + $tag = 'l'; + $relative_url = preg_replace('/[&?]sid=[0-9a-f]{32}$/', '', preg_replace('/([&?])sid=[0-9a-f]{32}&/', '$1', $relative_url)); + $url = $url . '/' . $relative_url; + $text = ($relative_url) ? $relative_url : $url . '/'; + break; + + case MAGIC_URL_FULL: + $tag = 'm'; + $text = (strlen($url) > 55) ? substr($url, 0, 39) . ' ... ' . substr($url, -10) : $url; + break; + + case MAGIC_URL_WWW: + $tag = 'w'; + $url = 'http://' . $url; + $text = (strlen($url) > 55) ? substr($url, 0, 39) . ' ... ' . substr($url, -10) : $url; + break; + + case MAGIC_URL_EMAIL: + $tag = 'e'; + $url = 'mailto:' . $url; + $text = (strlen($url) > 55) ? substr($url, 0, 39) . ' ... ' . substr($url, -10) : $url; + break; + } + + $url = htmlspecialchars($url); + $text = htmlspecialchars($text); + $append = htmlspecialchars($append); + + $html = "$whitespace$text$append"; + + return $html; +} + /** * make_clickable function * @@ -2380,7 +2713,7 @@ function generate_text_for_edit($text, $uid, $flags) * Cuts down displayed size of link if over 50 chars, turns absolute links * into relative versions when the server/script path matches the link */ -function make_clickable($text, $server_url = false) +function make_clickable($text, $server_url = false, $class = 'postlink') { if ($server_url === false) { @@ -2389,27 +2722,32 @@ function make_clickable($text, $server_url = false) static $magic_url_match; static $magic_url_replace; + static $static_class; - if (!is_array($magic_url_match)) + if (!is_array($magic_url_match) || $static_class != $class) { + $static_class = $class; + $class = ($static_class) ? ' class="' . $static_class . '"' : ''; + $local_class = ($static_class) ? ' class="' . $static_class . '-local"' : ''; + $magic_url_match = $magic_url_replace = array(); // Be sure to not let the matches cross over. ;) // relative urls for this board - $magic_url_match[] = '#(^|[\n\t (])(' . preg_quote($server_url, '#') . ')/(' . get_preg_expression('relative_url_inline') . ')#ie'; - $magic_url_replace[] = "'\$1' . preg_replace('/(&|\?)sid=[0-9a-f]{32}/', '\\\\1', '\$3') . ''"; + $magic_url_match[] = '#(^|[\n\t (>\]])(' . preg_quote($server_url, '#') . ')/(' . get_preg_expression('relative_url_inline') . ')#ie'; + $magic_url_replace[] = "make_clickable_callback(MAGIC_URL_LOCAL, '\$1', '\$2', '\$3', '$local_class')"; // matches a xxxx://aaaaa.bbb.cccc. ... - $magic_url_match[] = '#(^|[\n\t (])(' . get_preg_expression('url_inline') . ')#ie'; - $magic_url_replace[] = "'\$1' . ((strlen('\$2') > 55) ? substr(str_replace('&', '&', '\$2'), 0, 39) . ' ... ' . substr(str_replace('&', '&', '\$2'), -10) : '\$2') . ''"; + $magic_url_match[] = '#(^|[\n\t (>\]])(' . get_preg_expression('url_inline') . ')#ie'; + $magic_url_replace[] = "make_clickable_callback(MAGIC_URL_FULL, '\$1', '\$2', '', '$class')"; // matches a "www.xxxx.yyyy[/zzzz]" kinda lazy URL thing - $magic_url_match[] = '#(^|[\n\t (])(' . get_preg_expression('www_url_inline') . ')#ie'; - $magic_url_replace[] = "'\$1' . ((strlen('\$2') > 55) ? substr(str_replace('&', '&', '\$2'), 0, 39) . ' ... ' . substr(str_replace('&', '&', '\$2'), -10) : '\$2') . ''"; + $magic_url_match[] = '#(^|[\n\t (>\]])(' . get_preg_expression('www_url_inline') . ')#ie'; + $magic_url_replace[] = "make_clickable_callback(MAGIC_URL_WWW, '\$1', '\$2', '', '$class')"; // matches an email@domain type address at the start of a line, or after a space or after what might be a BBCode. - $magic_url_match[] = '/(^|[\n\t )])(' . get_preg_expression('email') . ')/ie'; - $magic_url_replace[] = "'\$1' . ((strlen('\$2') > 55) ? substr('\$2', 0, 39) . ' ... ' . substr('\$2', -10) : '\$2') . ''"; + $magic_url_match[] = '/(^|[\n\t (>\]])(' . get_preg_expression('email') . ')/ie'; + $magic_url_replace[] = "make_clickable_callback(MAGIC_URL_EMAIL, '\$1', '\$2', '', '')"; } return preg_replace($magic_url_match, $magic_url_replace, $text); @@ -2618,9 +2956,17 @@ function parse_attachments($forum_id, &$message, &$attachments, &$update_count, { if ($config['img_link_width'] || $config['img_link_height']) { - list($width, $height) = @getimagesize($filename); + $dimension = @getimagesize($filename); - $display_cat = (!$width && !$height) ? ATTACHMENT_CATEGORY_IMAGE : (($width <= $config['img_link_width'] && $height <= $config['img_link_height']) ? ATTACHMENT_CATEGORY_IMAGE : ATTACHMENT_CATEGORY_NONE); + // If the dimensions could not be determined or the image being 0x0 we display it as a link for safety purposes + if ($dimension === false || empty($dimension[0]) || empty($dimension[1])) + { + $display_cat = ATTACHMENT_CATEGORY_NONE; + } + else + { + $display_cat = ($dimension[0] <= $config['img_link_width'] && $dimension[1] <= $config['img_link_height']) ? ATTACHMENT_CATEGORY_IMAGE : ATTACHMENT_CATEGORY_NONE; + } } } else @@ -2641,16 +2987,19 @@ function parse_attachments($forum_id, &$message, &$attachments, &$update_count, $display_cat = ATTACHMENT_CATEGORY_NONE; } - $download_link = append_sid("{$phpbb_root_path}download.$phpEx", 'id=' . $attachment['attach_id'] . '&f=' . (int) $forum_id); + $download_link = append_sid("{$phpbb_root_path}download.$phpEx", 'id=' . $attachment['attach_id']); switch ($display_cat) { // Images case ATTACHMENT_CATEGORY_IMAGE: - $l_downloaded_viewed = $user->lang['VIEWED']; + $l_downloaded_viewed = 'VIEWED_COUNT'; + $inline_link = append_sid("{$phpbb_root_path}download.$phpEx", 'id=' . $attachment['attach_id']); + $download_link .= '&mode=view'; $block_array += array( 'S_IMAGE' => true, + 'U_INLINE_LINK' => $inline_link, ); $update_count[] = $attachment['attach_id']; @@ -2658,8 +3007,9 @@ function parse_attachments($forum_id, &$message, &$attachments, &$update_count, // Images, but display Thumbnail case ATTACHMENT_CATEGORY_THUMB: - $l_downloaded_viewed = $user->lang['VIEWED']; - $thumbnail_link = append_sid("{$phpbb_root_path}download.$phpEx", 'id=' . $attachment['attach_id'] . '&t=1&f=' . (int) $forum_id); + $l_downloaded_viewed = 'VIEWED_COUNT'; + $thumbnail_link = append_sid("{$phpbb_root_path}download.$phpEx", 'id=' . $attachment['attach_id'] . '&t=1'); + $download_link .= '&mode=view'; $block_array += array( 'S_THUMBNAIL' => true, @@ -2669,7 +3019,7 @@ function parse_attachments($forum_id, &$message, &$attachments, &$update_count, // Windows Media Streams case ATTACHMENT_CATEGORY_WM: - $l_downloaded_viewed = $user->lang['VIEWED']; + $l_downloaded_viewed = 'VIEWED_COUNT'; // Giving the filename directly because within the wm object all variables are in local context making it impossible // to validate against a valid session (all params can differ) @@ -2688,7 +3038,7 @@ function parse_attachments($forum_id, &$message, &$attachments, &$update_count, // Real Media Streams case ATTACHMENT_CATEGORY_RM: case ATTACHMENT_CATEGORY_QUICKTIME: - $l_downloaded_viewed = $user->lang['VIEWED']; + $l_downloaded_viewed = 'VIEWED_COUNT'; $block_array += array( 'S_RM_FILE' => ($display_cat == ATTACHMENT_CATEGORY_RM) ? true : false, @@ -2705,7 +3055,7 @@ function parse_attachments($forum_id, &$message, &$attachments, &$update_count, case ATTACHMENT_CATEGORY_FLASH: list($width, $height) = @getimagesize($filename); - $l_downloaded_viewed = $user->lang['VIEWED']; + $l_downloaded_viewed = 'VIEWED_COUNT'; $block_array += array( 'S_FLASH_FILE' => true, @@ -2718,7 +3068,7 @@ function parse_attachments($forum_id, &$message, &$attachments, &$update_count, break; default: - $l_downloaded_viewed = $user->lang['DOWNLOADED']; + $l_downloaded_viewed = 'DOWNLOAD_COUNT'; $block_array += array( 'S_FILE' => true, @@ -2726,11 +3076,10 @@ function parse_attachments($forum_id, &$message, &$attachments, &$update_count, break; } - $l_download_count = (!isset($attachment['download_count']) || $attachment['download_count'] == 0) ? $user->lang['DOWNLOAD_NONE'] : (($attachment['download_count'] == 1) ? sprintf($user->lang['DOWNLOAD_COUNT'], $attachment['download_count']) : sprintf($user->lang['DOWNLOAD_COUNTS'], $attachment['download_count'])); + $l_download_count = (!isset($attachment['download_count']) || $attachment['download_count'] == 0) ? $user->lang[$l_downloaded_viewed . '_NONE'] : (($attachment['download_count'] == 1) ? sprintf($user->lang[$l_downloaded_viewed], $attachment['download_count']) : sprintf($user->lang[$l_downloaded_viewed . 'S'], $attachment['download_count'])); $block_array += array( 'U_DOWNLOAD_LINK' => $download_link, - 'L_DOWNLOADED_VIEWED' => $l_downloaded_viewed, 'L_DOWNLOAD_COUNT' => $l_download_count ); } @@ -2975,8 +3324,15 @@ function get_backtrace() } // Strip the current directory from path - $trace['file'] = str_replace(array($path, '\\'), array('', '/'), $trace['file']); - $trace['file'] = substr($trace['file'], 1); + if (empty($trace['file'])) + { + $trace['file'] = ''; + } + else + { + $trace['file'] = str_replace(array($path, '\\'), array('', '/'), $trace['file']); + $trace['file'] = substr($trace['file'], 1); + } $args = array(); // If include/require/include_once is not called, do not show arguments - they may contain sensible information @@ -3001,7 +3357,7 @@ function get_backtrace() $output .= '
    '; $output .= 'FILE: ' . htmlspecialchars($trace['file']) . '
    '; - $output .= 'LINE: ' . $trace['line'] . '
    '; + $output .= 'LINE: ' . ((!empty($trace['line'])) ? $trace['line'] : '') . '
    '; $output .= 'CALL: ' . htmlspecialchars($trace['class'] . $trace['type'] . $trace['function']) . '(' . ((sizeof($args)) ? implode(', ', $args) : '') . ')
    '; } @@ -3025,7 +3381,8 @@ function get_preg_expression($mode) case 'bbcode_htm': return array( '#.*?#', - '#.*?#', + '#.*?#', + '#.*?#', '#data['user_id'] != ANONYMOUS && !$auth->acl_get('u_viewprofile')) + { + $profile_url = ''; + } + else + { + $profile_url = ($custom_profile_url !== false) ? $custom_profile_url : append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=viewprofile'); + $profile_url .= '&u=' . (int) $user_id; + } } else { @@ -3158,7 +3555,7 @@ function get_username_string($mode, $user_id, $username, $username_colour = '', } else if (!$profile_url && $username_colour) { - $tpl = '{USERNAME}'; + $tpl = '{USERNAME}'; } else if ($profile_url && !$username_colour) { @@ -3166,7 +3563,7 @@ function get_username_string($mode, $user_id, $username, $username_colour = '', } else if ($profile_url && $username_colour) { - $tpl = '{USERNAME}'; + $tpl = '{USERNAME}'; } return str_replace(array('{PROFILE_URL}', '{USERNAME_COLOUR}', '{USERNAME}'), array($profile_url, $username_colour, $username), $tpl); @@ -3264,43 +3661,75 @@ function msg_handler($errno, $msg_text, $errfile, $errline) echo '[phpBB Debug] PHP Notice: in file ' . $errfile . ' on line ' . $errline . ': ' . $msg_text . '
    ' . "\n"; } + return; + break; case E_USER_ERROR: + if (!empty($user) && !empty($user->lang)) + { + $msg_text = (!empty($user->lang[$msg_text])) ? $user->lang[$msg_text] : $msg_text; + $msg_title = (!isset($msg_title)) ? $user->lang['GENERAL_ERROR'] : ((!empty($user->lang[$msg_title])) ? $user->lang[$msg_title] : $msg_title); + + $l_return_index = sprintf($user->lang['RETURN_INDEX'], '', ''); + $l_notify = ''; + + if (!empty($config['board_contact'])) + { + $l_notify = '

    ' . sprintf($user->lang['NOTIFY_ADMIN_EMAIL'], $config['board_contact']) . '

    '; + } + } + else + { + $msg_title = 'General Error'; + $l_return_index = 'Return to index page'; + $l_notify = ''; + + if (!empty($config['board_contact'])) + { + $l_notify = '

    Please notify the board administrator or webmaster: ' . $config['board_contact'] . '

    '; + } + } + garbage_collection(); + // Try to not call the adm page data... + echo ''; echo ''; echo ''; echo ''; echo '' . $msg_title . ''; - echo ''; + echo ''; echo ''; echo ''; echo '
    '; echo ' '; - echo '
    '; - echo '
    '; - echo ' '; - echo '
    '; - echo '

    General Error

    '; + echo '
    '; + echo '
    '; + echo '
    '; + echo '

    ' . $msg_title . '

    '; - echo '

    ' . $msg_text . '

    '; + echo '
    ' . $msg_text . '
    '; - if (!empty($config['board_contact'])) - { - echo '

    Please notify the board administrator or webmaster: ' . $config['board_contact'] . '

    '; - } - - echo '
    '; - echo ' '; + echo $l_notify; + echo '
    '; echo '
    '; + echo '
    '; echo ' '; echo '
    '; echo ''; @@ -3368,6 +3797,10 @@ function msg_handler($errno, $msg_text, $errfile, $errline) exit; break; } + + // If we notice an error not handled here we pass this back to PHP by returning false + // This may not work for all php versions + return false; } /** @@ -3396,7 +3829,7 @@ function page_header($page_title = '', $display_online_list = true) // Generate logged in/logged out status if ($user->data['user_id'] != ANONYMOUS) { - $u_login_logout = append_sid("{$phpbb_root_path}ucp.$phpEx", 'mode=logout'); + $u_login_logout = append_sid("{$phpbb_root_path}ucp.$phpEx", 'mode=logout', true, $user->session_id); $l_login_logout = sprintf($user->lang['LOGOUT_USER'], $user->data['username']); } else @@ -3640,6 +4073,7 @@ function page_header($page_title = '', $display_online_list = true) 'PAGE_TITLE' => $page_title, 'SCRIPT_NAME' => str_replace('.' . $phpEx, '', $user->page['page_name']), 'LAST_VISIT_DATE' => sprintf($user->lang['YOU_LAST_VISIT'], $s_last_visit), + 'LAST_VISIT_YOU' => $s_last_visit, 'CURRENT_TIME' => sprintf($user->lang['CURRENT_TIME'], $user->format_date(time(), false, true)), 'TOTAL_USERS_ONLINE' => $l_online_users, 'LOGGED_IN_USER_LIST' => $online_userlist, @@ -3647,6 +4081,9 @@ function page_header($page_title = '', $display_online_list = true) 'PRIVATE_MESSAGE_INFO' => $l_privmsgs_text, 'PRIVATE_MESSAGE_INFO_UNREAD' => $l_privmsgs_text_unread, + 'S_USER_NEW_PRIVMSG' => $user->data['user_new_privmsg'], + 'S_USER_UNREAD_PRIVMSG' => $user->data['user_unread_privmsg'], + 'SID' => $SID, '_SID' => $_SID, 'SESSION_ID' => $user->session_id, @@ -3688,11 +4125,13 @@ function page_header($page_title = '', $display_online_list = true) 'S_USER_BROWSER' => (isset($user->data['session_browser'])) ? $user->data['session_browser'] : $user->lang['UNKNOWN_BROWSER'], 'S_USERNAME' => $user->data['username'], 'S_CONTENT_DIRECTION' => $user->lang['DIRECTION'], + 'S_CONTENT_FLOW_BEGIN' => ($user->lang['DIRECTION'] == 'ltr') ? 'left' : 'right', + 'S_CONTENT_FLOW_END' => ($user->lang['DIRECTION'] == 'ltr') ? 'right' : 'left', 'S_CONTENT_ENCODING' => 'UTF-8', 'S_TIMEZONE' => ($user->data['user_dst'] || ($user->data['user_id'] == ANONYMOUS && $config['board_dst'])) ? sprintf($user->lang['ALL_TIMES'], $user->lang['tz'][$tz], $user->lang['tz']['dst']) : sprintf($user->lang['ALL_TIMES'], $user->lang['tz'][$tz], ''), 'S_DISPLAY_ONLINE_LIST' => ($l_online_time) ? 1 : 0, 'S_DISPLAY_SEARCH' => (!$config['load_search']) ? 0 : (isset($auth) ? ($auth->acl_get('u_search') && $auth->acl_getf_global('f_search')) : 1), - 'S_DISPLAY_PM' => ($config['allow_privmsg'] && $user->data['is_registered']) ? 1 : 0, + 'S_DISPLAY_PM' => ($config['allow_privmsg'] && $user->data['is_registered'] && ($auth->acl_get('u_readpm') || $auth->acl_get('u_sendpm'))) ? true : false, 'S_DISPLAY_MEMBERLIST' => (isset($auth)) ? $auth->acl_get('u_viewprofile') : 0, 'S_NEW_PM' => ($s_privmsg_new) ? 1 : 0, @@ -3709,11 +4148,83 @@ function page_header($page_title = '', $display_online_list = true) 'T_UPLOAD_PATH' => "{$phpbb_root_path}{$config['upload_path']}/", 'T_STYLESHEET_LINK' => (!$user->theme['theme_storedb']) ? "{$phpbb_root_path}styles/" . $user->theme['theme_path'] . '/theme/stylesheet.css' : "{$phpbb_root_path}style.$phpEx?sid=$user->session_id&id=" . $user->theme['style_id'] . '&lang=' . $user->data['user_lang'], 'T_STYLESHEET_NAME' => $user->theme['theme_name'], - 'T_THEME_DATA' => (!$user->theme['theme_storedb']) ? '' : $user->theme['theme_data'], 'SITE_LOGO_IMG' => $user->img('site_logo')) ); + // Once used, we do not want to have the whole theme data twice in memory... + if ($user->theme['theme_storedb']) + { + // Parse Theme Data + $replace = array( + '{T_THEME_PATH}' => "{$phpbb_root_path}styles/" . $user->theme['theme_path'] . '/theme', + '{T_TEMPLATE_PATH}' => "{$phpbb_root_path}styles/" . $user->theme['template_path'] . '/template', + '{T_IMAGESET_PATH}' => "{$phpbb_root_path}styles/" . $user->theme['imageset_path'] . '/imageset', + '{T_IMAGESET_LANG_PATH}' => "{$phpbb_root_path}styles/" . $user->theme['imageset_path'] . '/imageset/' . $user->data['user_lang'], + '{T_STYLESHEET_NAME}' => $user->theme['theme_name'], + '{S_USER_LANG}' => $user->data['user_lang'] + ); + + $user->theme['theme_data'] = str_replace(array_keys($replace), array_values($replace), $user->theme['theme_data']); + + $matches = array(); + if (strpos($user->theme['theme_data'], '{IMG_') !== false) + { + preg_match_all('#\{IMG_([A-Za-z0-9_]*?)_(WIDTH|HEIGHT|SRC)\}#', $user->theme['theme_data'], $matches); + + $imgs = $find = $replace = array(); + if (isset($matches[0]) && sizeof($matches[0])) + { + foreach ($matches[1] as $i => $img) + { + $img = strtolower($img); + if (!isset($img_array[$img])) + { + continue; + } + + if (!isset($imgs[$img])) + { + $img_data = &$img_array[$img]; + $imgsrc = ($img_data['image_lang'] ? $img_data['image_lang'] . '/' : '') . $img_data['image_filename']; + $imgs[$img] = array( + 'src' => $phpbb_root_path . 'styles/' . $user->theme['imageset_path'] . '/imageset/' . $imgsrc, + 'width' => $img_data['image_width'], + 'height' => $img_data['image_height'], + ); + } + + switch ($matches[2][$i]) + { + case 'SRC': + $replace[] = $imgs[$img]['src']; + break; + + case 'WIDTH': + $replace[] = $imgs[$img]['width']; + break; + + case 'HEIGHT': + $replace[] = $imgs[$img]['height']; + break; + + default: + continue; + } + $find[] = $matches[0][$i]; + } + + if (sizeof($find)) + { + $user->theme['theme_data'] = str_replace($find, $replace, $user->theme['theme_data']); + } + } + } + + $template->assign_var('T_THEME_DATA', $user->theme['theme_data']); + $user->theme['theme_data'] = ''; + } + // application/xhtml+xml not used because of IE header('Content-type: text/html; charset=UTF-8'); diff --git a/phpBB/includes/functions_admin.php b/phpBB/includes/functions_admin.php index 8e4865fa97..97fc9ba73b 100644 --- a/phpBB/includes/functions_admin.php +++ b/phpBB/includes/functions_admin.php @@ -109,10 +109,10 @@ function make_forum_select($select_id = false, $ignore_id = false, $ignore_acl = $acl = ($ignore_acl) ? '' : (($only_acl_post) ? 'f_post' : array('f_list', 'a_forum', 'a_forumadd', 'a_forumdel')); // This query is identical to the jumpbox one - $sql = 'SELECT forum_id, parent_id, forum_name, forum_type, forum_status, left_id, right_id + $sql = 'SELECT forum_id, forum_name, parent_id, forum_type, left_id, right_id FROM ' . FORUMS_TABLE . ' ORDER BY left_id ASC'; - $result = $db->sql_query($sql); + $result = $db->sql_query($sql, 600); $right = 0; $padding_store = array('0' => ''); @@ -172,7 +172,7 @@ function make_forum_select($select_id = false, $ignore_id = false, $ignore_acl = else { $selected = (is_array($select_id)) ? ((in_array($row['forum_id'], $select_id)) ? ' selected="selected"' : '') : (($row['forum_id'] == $select_id) ? ' selected="selected"' : ''); - $forum_list .= ''; + $forum_list .= ''; } } $db->sql_freeresult($result); @@ -249,7 +249,7 @@ function get_forum_list($acl_list = 'f_list', $id_only = true, $postable_only = if (!isset($forum_rows)) { // This query is identical to the jumpbox one - $expire_time = ($no_cache) ? 0 : 120; + $expire_time = ($no_cache) ? 0 : 600; $sql = 'SELECT forum_id, forum_name, parent_id, forum_type, left_id, right_id FROM ' . FORUMS_TABLE . ' @@ -424,7 +424,7 @@ function move_topics($topic_ids, $forum_id, $auto_sync = true) if ($auto_sync) { - sync('forum', 'forum_id', $forum_ids, true); + sync('forum', 'forum_id', $forum_ids, true, true); unset($forum_ids); } } @@ -485,7 +485,7 @@ function move_posts($post_ids, $topic_id, $auto_sync = true) sync('topic_reported', 'topic_id', $topic_ids); sync('topic_attachment', 'topic_id', $topic_ids); sync('topic', 'topic_id', $topic_ids, true); - sync('forum', 'forum_id', $forum_ids, true); + sync('forum', 'forum_id', $forum_ids, true, true); } // Update posted information @@ -495,34 +495,37 @@ function move_posts($post_ids, $topic_id, $auto_sync = true) /** * Remove topic(s) */ -function delete_topics($where_type, $where_ids, $auto_sync = true) +function delete_topics($where_type, $where_ids, $auto_sync = true, $post_count_sync = true, $call_delete_posts = true) { global $db, $config; $approved_topics = 0; $forum_ids = $topic_ids = array(); - if (is_array($where_ids)) + if ($where_type === 'range') { - $where_ids = array_unique($where_ids); + $where_clause = $where_ids; } else { - $where_ids = array($where_ids); - } - - if (!sizeof($where_ids)) - { - return array('topics' => 0, 'posts' => 0); + $where_ids = (is_array($where_ids)) ? array_unique($where_ids) : array($where_ids); + + if (!sizeof($where_ids)) + { + return array('topics' => 0, 'posts' => 0); + } + + $where_clause = $db->sql_in_set($where_type, $where_ids); } + // Making sure that delete_posts does not call delete_topics again... $return = array( - 'posts' => delete_posts($where_type, $where_ids, false, true) + 'posts' => ($call_delete_posts) ? delete_posts($where_type, $where_ids, false, true, $post_count_sync, false) : 0, ); $sql = 'SELECT topic_id, forum_id, topic_approved FROM ' . TOPICS_TABLE . ' - WHERE ' . $db->sql_in_set($where_type, $where_ids); + WHERE ' . $where_clause; $result = $db->sql_query($sql); while ($row = $db->sql_fetchrow($result)) @@ -564,7 +567,7 @@ function delete_topics($where_type, $where_ids, $auto_sync = true) if ($auto_sync) { - sync('forum', 'forum_id', $forum_ids, true); + sync('forum', 'forum_id', $forum_ids, true, true); sync('topic_reported', $where_type, $where_ids); } @@ -579,30 +582,39 @@ function delete_topics($where_type, $where_ids, $auto_sync = true) /** * Remove post(s) */ -function delete_posts($where_type, $where_ids, $auto_sync = true, $posted_sync = true) +function delete_posts($where_type, $where_ids, $auto_sync = true, $posted_sync = true, $post_count_sync = true, $call_delete_topics = true) { global $db, $config, $phpbb_root_path, $phpEx; - if (is_array($where_ids)) + if ($where_type === 'range') { - $where_ids = array_unique($where_ids); + $where_clause = $where_ids; } else { - $where_ids = array($where_ids); - } + if (is_array($where_ids)) + { + $where_ids = array_unique($where_ids); + } + else + { + $where_ids = array($where_ids); + } - if (!sizeof($where_ids)) - { - return false; + if (!sizeof($where_ids)) + { + return false; + } + + $where_clause = $db->sql_in_set($where_type, array_map('intval', $where_ids)); } $approved_posts = 0; - $post_ids = $topic_ids = $forum_ids = $post_counts = array(); + $post_ids = $topic_ids = $forum_ids = $post_counts = $remove_topics = array(); $sql = 'SELECT post_id, poster_id, post_approved, post_postcount, topic_id, forum_id FROM ' . POSTS_TABLE . ' - WHERE ' . $db->sql_in_set($where_type, array_map('intval', $where_ids)); + WHERE ' . $where_clause; $result = $db->sql_query($sql); while ($row = $db->sql_fetchrow($result)) @@ -612,7 +624,7 @@ function delete_posts($where_type, $where_ids, $auto_sync = true, $posted_sync = $topic_ids[] = $row['topic_id']; $forum_ids[] = $row['forum_id']; - if ($row['post_postcount']) + if ($row['post_postcount'] && $post_count_sync) { $post_counts[$row['poster_id']] = (!empty($post_counts[$row['poster_id']])) ? $post_counts[$row['poster_id']] + 1 : 1; } @@ -642,7 +654,7 @@ function delete_posts($where_type, $where_ids, $auto_sync = true, $posted_sync = unset($table_ary); // Adjust users post counts - if (sizeof($post_counts)) + if (sizeof($post_counts) && $post_count_sync) { foreach ($post_counts as $poster_id => $substract) { @@ -653,6 +665,25 @@ function delete_posts($where_type, $where_ids, $auto_sync = true, $posted_sync = } } + // Remove topics now having no posts? + if (sizeof($topic_ids)) + { + $sql = 'SELECT topic_id + FROM ' . POSTS_TABLE . ' + WHERE ' . $db->sql_in_set('topic_id', $topic_ids) . ' + GROUP BY topic_id'; + $result = $db->sql_query($sql); + + while ($row = $db->sql_fetchrow($result)) + { + $remove_topics[] = $row['topic_id']; + } + $db->sql_freeresult($result); + + // Actually, those not within remove_topics should be removed. ;) + $remove_topics = array_diff($topic_ids, $remove_topics); + } + // Remove the message from the search index $search_type = basename($config['search_type']); @@ -687,7 +718,7 @@ function delete_posts($where_type, $where_ids, $auto_sync = true, $posted_sync = { sync('topic_reported', 'topic_id', $topic_ids); sync('topic', 'topic_id', $topic_ids, true); - sync('forum', 'forum_id', $forum_ids, true); + sync('forum', 'forum_id', $forum_ids, true, true); } if ($approved_posts) @@ -695,6 +726,12 @@ function delete_posts($where_type, $where_ids, $auto_sync = true, $posted_sync = set_config('num_posts', $config['num_posts'] - $approved_posts, true); } + // We actually remove topics now to not be inconsistent (the delete_topics function calls this function too) + if (sizeof($remove_topics) && $call_delete_topics) + { + delete_topics('topic_id', $remove_topics, $auto_sync, $post_count_sync, false); + } + return sizeof($post_ids); } @@ -954,7 +991,7 @@ function delete_topic_shadows($max_age, $forum_id = '', $auto_sync = true) if ($auto_sync) { $where_type = ($forum_id) ? 'forum_id' : ''; - sync('forum', $where_type, $forum_id, true); + sync('forum', $where_type, $forum_id, true, true); } } @@ -1069,7 +1106,7 @@ function sync($mode, $where_type = '', $where_ids = '', $resync_parents = false, $where_ids = ($where_ids) ? array((int) $where_ids) : array(); } - if ($mode == 'forum' || $mode == 'topic' || $mode == 'topic_approved') + if ($mode == 'forum' || $mode == 'topic' || $mode == 'topic_approved' || $mode == 'topic_reported' || $mode == 'post_reported') { if (!$where_type) { @@ -1315,13 +1352,13 @@ function sync($mode, $where_type = '', $where_ids = '', $resync_parents = false, $post_ids = array(); while ($row = $db->sql_fetchrow($result)) { - if (!isset($post_attachment[$row['post_id']])) + if (!isset($post_attachment[$row['post_msg_id']])) { - $post_ids[] = $row['post_id']; + $post_ids[] = $row['post_msg_id']; } else { - unset($post_attachment[$row['post_id']]); + unset($post_attachment[$row['post_msg_id']]); } } $db->sql_freeresult($result); @@ -1404,9 +1441,12 @@ function sync($mode, $where_type = '', $where_ids = '', $resync_parents = false, $forum_ids[$forum_id] = $forum_id; $forum_data[$forum_id] = $row; - $forum_data[$forum_id]['posts'] = 0; - $forum_data[$forum_id]['topics'] = 0; - $forum_data[$forum_id]['topics_real'] = 0; + if ($sync_extra) + { + $forum_data[$forum_id]['posts'] = 0; + $forum_data[$forum_id]['topics'] = 0; + $forum_data[$forum_id]['topics_real'] = 0; + } $forum_data[$forum_id]['last_post_id'] = 0; $forum_data[$forum_id]['last_post_subject'] = ''; $forum_data[$forum_id]['last_post_time'] = 0; @@ -1423,40 +1463,73 @@ function sync($mode, $where_type = '', $where_ids = '', $resync_parents = false, $forum_ids = array_values($forum_ids); - // 2: Get topic counts for each forum - $sql = 'SELECT forum_id, topic_approved, COUNT(topic_id) AS forum_topics - FROM ' . TOPICS_TABLE . ' - WHERE ' . $db->sql_in_set('forum_id', $forum_ids) . ' - GROUP BY forum_id, topic_approved'; - $result = $db->sql_query($sql); - - while ($row = $db->sql_fetchrow($result)) + // 2: Get topic counts for each forum (optional) + if ($sync_extra) { - $forum_id = (int) $row['forum_id']; - $forum_data[$forum_id]['topics_real'] += $row['forum_topics']; + $sql = 'SELECT forum_id, topic_approved, COUNT(topic_id) AS forum_topics + FROM ' . TOPICS_TABLE . ' + WHERE ' . $db->sql_in_set('forum_id', $forum_ids) . ' + GROUP BY forum_id, topic_approved'; + $result = $db->sql_query($sql); - if ($row['topic_approved']) + while ($row = $db->sql_fetchrow($result)) { - $forum_data[$forum_id]['topics'] = $row['forum_topics']; - } - } - $db->sql_freeresult($result); + $forum_id = (int) $row['forum_id']; + $forum_data[$forum_id]['topics_real'] += $row['forum_topics']; - // 3: Get post count and last_post_id for each forum + if ($row['topic_approved']) + { + $forum_data[$forum_id]['topics'] = $row['forum_topics']; + } + } + $db->sql_freeresult($result); + } + + // 3: Get post count for each forum (optional) + if ($sync_extra) + { + if (sizeof($forum_ids) == 1) + { + $sql = 'SELECT SUM(t.topic_replies + 1) AS forum_posts + FROM ' . TOPICS_TABLE . ' t + WHERE ' . $db->sql_in_set('t.forum_id', $forum_ids) . ' + AND t.topic_approved = 1'; + } + else + { + $sql = 'SELECT t.forum_id, SUM(t.topic_replies + 1) AS forum_posts + FROM ' . TOPICS_TABLE . ' t + WHERE ' . $db->sql_in_set('t.forum_id', $forum_ids) . ' + AND t.topic_approved = 1 + GROUP BY t.forum_id'; + } + + $result = $db->sql_query($sql); + + while ($row = $db->sql_fetchrow($result)) + { + $forum_id = (sizeof($forum_ids) == 1) ? (int) $forum_ids[0] : (int) $row['forum_id']; + + $forum_data[$forum_id]['posts'] = (int) $row['forum_posts']; + } + $db->sql_freeresult($result); + } + + // 4: Get last_post_id for each forum if (sizeof($forum_ids) == 1) { - $sql = 'SELECT COUNT(post_id) AS forum_posts, MAX(post_id) AS last_post_id - FROM ' . POSTS_TABLE . ' - WHERE ' . $db->sql_in_set('forum_id', $forum_ids) . ' - AND post_approved = 1'; + $sql = 'SELECT MAX(t.topic_last_post_id) as last_post_id + FROM ' . TOPICS_TABLE . ' t + WHERE ' . $db->sql_in_set('t.forum_id', $forum_ids) . ' + AND t.topic_approved = 1'; } else { - $sql = 'SELECT forum_id, COUNT(post_id) AS forum_posts, MAX(post_id) AS last_post_id - FROM ' . POSTS_TABLE . ' - WHERE ' . $db->sql_in_set('forum_id', $forum_ids) . ' - AND post_approved = 1 - GROUP BY forum_id'; + $sql = 'SELECT t.forum_id, MAX(t.topic_last_post_id) as last_post_id + FROM ' . TOPICS_TABLE . ' t + WHERE ' . $db->sql_in_set('t.forum_id', $forum_ids) . ' + AND t.topic_approved = 1 + GROUP BY t.forum_id'; } $result = $db->sql_query($sql); @@ -1465,14 +1538,13 @@ function sync($mode, $where_type = '', $where_ids = '', $resync_parents = false, { $forum_id = (sizeof($forum_ids) == 1) ? (int) $forum_ids[0] : (int) $row['forum_id']; - $forum_data[$forum_id]['posts'] = (int) $row['forum_posts']; $forum_data[$forum_id]['last_post_id'] = (int) $row['last_post_id']; $post_ids[] = $row['last_post_id']; } $db->sql_freeresult($result); - // 4: Retrieve last_post infos + // 5: Retrieve last_post infos if (sizeof($post_ids)) { $sql = 'SELECT p.post_id, p.poster_id, p.post_subject, p.post_time, p.post_username, u.username, u.user_colour @@ -1514,8 +1586,13 @@ function sync($mode, $where_type = '', $where_ids = '', $resync_parents = false, unset($post_info); } - // 5: Now do that thing - $fieldnames = array('posts', 'topics', 'topics_real', 'last_post_id', 'last_post_subject', 'last_post_time', 'last_poster_id', 'last_poster_name', 'last_poster_colour'); + // 6: Now do that thing + $fieldnames = array('last_post_id', 'last_post_subject', 'last_post_time', 'last_poster_id', 'last_poster_name', 'last_poster_colour'); + + if ($sync_extra) + { + array_push($fieldnames, 'posts', 'topics', 'topics_real'); + } foreach ($forum_data as $forum_id => $row) { @@ -1655,31 +1732,6 @@ function sync($mode, $where_type = '', $where_ids = '', $resync_parents = false, unset($delete_topics, $delete_topic_ids); } - // Make sure shadow topics do link to existing topics - if (sizeof($moved_topics)) - { - $delete_topics = array(); - - $sql = 'SELECT t1.topic_id, t1.topic_moved_id - FROM ' . TOPICS_TABLE . ' t1 - LEFT JOIN ' . TOPICS_TABLE . ' t2 ON (t2.topic_id = t1.topic_moved_id) - WHERE ' . $db->sql_in_set('t1.topic_id', $moved_topics) . ' - AND t2.topic_id IS NULL'; - $result = $db->sql_query($sql); - - while ($row = $db->sql_fetchrow($result)) - { - $delete_topics[] = $row['topic_id']; - } - $db->sql_freeresult($result); - - if (sizeof($delete_topics)) - { - delete_topics('topic_id', $delete_topics, false); - } - unset($delete_topics); - } - $sql = 'SELECT p.post_id, p.topic_id, p.post_approved, p.poster_id, p.post_subject, p.post_username, p.post_time, u.username, u.user_colour FROM ' . POSTS_TABLE . ' p, ' . USERS_TABLE . ' u WHERE ' . $db->sql_in_set('p.post_id', $post_ids) . ' @@ -1714,6 +1766,116 @@ function sync($mode, $where_type = '', $where_ids = '', $resync_parents = false, } $db->sql_freeresult($result); + // Make sure shadow topics do link to existing topics + if (sizeof($moved_topics)) + { + $delete_topics = array(); + + $sql = 'SELECT t1.topic_id, t1.topic_moved_id + FROM ' . TOPICS_TABLE . ' t1 + LEFT JOIN ' . TOPICS_TABLE . ' t2 ON (t2.topic_id = t1.topic_moved_id) + WHERE ' . $db->sql_in_set('t1.topic_id', $moved_topics) . ' + AND t2.topic_id IS NULL'; + $result = $db->sql_query($sql); + + while ($row = $db->sql_fetchrow($result)) + { + $delete_topics[] = $row['topic_id']; + } + $db->sql_freeresult($result); + + if (sizeof($delete_topics)) + { + delete_topics('topic_id', $delete_topics, false); + } + unset($delete_topics); + + // Make sure shadow topics having no last post data being updated (this only rarely happens...) + $sql = 'SELECT topic_id, topic_moved_id, topic_last_post_id, topic_first_post_id + FROM ' . TOPICS_TABLE . ' + WHERE ' . $db->sql_in_set('topic_id', $moved_topics) . ' + AND topic_last_post_time = 0'; + $result = $db->sql_query($sql); + + $shadow_topic_data = $post_ids = array(); + while ($row = $db->sql_fetchrow($result)) + { + $shadow_topic_data[$row['topic_moved_id']] = $row; + $post_ids[] = $row['topic_last_post_id']; + $post_ids[] = $row['topic_first_post_id']; + } + $db->sql_freeresult($result); + + $sync_shadow_topics = array(); + if (sizeof($post_ids)) + { + $sql = 'SELECT p.post_id, p.topic_id, p.post_approved, p.poster_id, p.post_subject, p.post_username, p.post_time, u.username, u.user_colour + FROM ' . POSTS_TABLE . ' p, ' . USERS_TABLE . ' u + WHERE ' . $db->sql_in_set('p.post_id', $post_ids) . ' + AND u.user_id = p.poster_id'; + $result = $db->sql_query($sql); + + $post_ids = array(); + while ($row = $db->sql_fetchrow($result)) + { + $topic_id = (int) $row['topic_id']; + + // Ok, there should be a shadow topic. If there isn't, then there's something wrong with the db. + // However, there's not much we can do about it. + if (!empty($shadow_topic_data[$topic_id])) + { + if ($row['post_id'] == $shadow_topic_data[$topic_id]['topic_first_post_id']) + { + $orig_topic_id = $shadow_topic_data[$topic_id]['topic_id']; + + if (!isset($sync_shadow_topics[$orig_topic_id])) + { + $sync_shadow_topics[$orig_topic_id] = array(); + } + + $sync_shadow_topics[$orig_topic_id]['topic_time'] = $row['post_time']; + $sync_shadow_topics[$orig_topic_id]['topic_poster'] = $row['poster_id']; + $sync_shadow_topics[$orig_topic_id]['topic_first_poster_name'] = ($row['poster_id'] == ANONYMOUS) ? $row['post_username'] : $row['username']; + $sync_shadow_topics[$orig_topic_id]['topic_first_poster_colour'] = $row['user_colour']; + } + + if ($row['post_id'] == $shadow_topic_data[$topic_id]['topic_last_post_id']) + { + $orig_topic_id = $shadow_topic_data[$topic_id]['topic_id']; + + if (!isset($sync_shadow_topics[$orig_topic_id])) + { + $sync_shadow_topics[$orig_topic_id] = array(); + } + + $sync_shadow_topics[$orig_topic_id]['topic_last_poster_id'] = $row['poster_id']; + $sync_shadow_topics[$orig_topic_id]['topic_last_post_subject'] = $row['post_subject']; + $sync_shadow_topics[$orig_topic_id]['topic_last_post_time'] = $row['post_time']; + $sync_shadow_topics[$orig_topic_id]['topic_last_poster_name'] = ($row['poster_id'] == ANONYMOUS) ? $row['post_username'] : $row['username']; + $sync_shadow_topics[$orig_topic_id]['topic_last_poster_colour'] = $row['user_colour']; + } + } + } + $db->sql_freeresult($result); + + $shadow_topic_data = array(); + + // Update the information we collected + if (sizeof($sync_shadow_topics)) + { + foreach ($sync_shadow_topics as $sync_topic_id => $sql_ary) + { + $sql = 'UPDATE ' . TOPICS_TABLE . ' + SET ' . $db->sql_build_array('UPDATE', $sql_ary) . ' + WHERE topic_id = ' . $sync_topic_id; + $db->sql_query($sql); + } + } + } + + unset($sync_shadow_topics, $shadow_topic_data); + } + // approved becomes unapproved, and vice-versa if (sizeof($approved_unapproved_ids)) { @@ -1791,7 +1953,7 @@ function sync($mode, $where_type = '', $where_ids = '', $resync_parents = false, // batch processing. if ($resync_parents && sizeof($resync_forums) && $where_type != 'range') { - sync('forum', 'forum_id', array_values($resync_forums), true); + sync('forum', 'forum_id', array_values($resync_forums), true, true); } break; } @@ -1871,7 +2033,7 @@ function prune($forum_id, $prune_mode, $prune_date, $prune_flags = 0, $auto_sync $topic_list = array_unique($topic_list); } - return delete_topics('topic_id', $topic_list, $auto_sync); + return delete_topics('topic_id', $topic_list, $auto_sync, false); } /** @@ -1941,36 +2103,6 @@ function remove_comments(&$output) return $output; } -/** -* remove_remarks will strip the sql comment lines out of an uploaded sql file -*/ -function remove_remarks(&$sql) -{ - $sql = preg_replace('/\n{2,}/', "\n", preg_replace('/^#.*$/m', "\n", $sql)); -} - -/** -* split_sql_file will split an uploaded sql file into single sql statements. -* Note: expects trim() to have already been run on $sql. -*/ -function split_sql_file($sql, $delimiter) -{ - $sql = str_replace("\r" , '', $sql); - $data = preg_split('/' . preg_quote($delimiter, '/') . '$/m', $sql); - - $data = array_map('trim', $data); - - // The empty case - $end_data = end($data); - - if (empty($end_data)) - { - unset($data[key($data)]); - } - - return $data; -} - /** * Cache moderators, called whenever permissions are changed via admin_permissions. Changes of username * and group names must be carried through for the moderators table @@ -1983,7 +2115,17 @@ function cache_moderators() $cache->destroy('sql', MODERATOR_CACHE_TABLE); // Clear table - $db->sql_query((($db->sql_layer != 'sqlite') ? 'TRUNCATE TABLE ' : 'DELETE FROM ') . MODERATOR_CACHE_TABLE); + switch ($db->sql_layer) + { + case 'sqlite': + case 'firebird': + $db->sql_query('DELETE FROM ' . MODERATOR_CACHE_TABLE); + break; + + default: + $db->sql_query('TRUNCATE TABLE ' . MODERATOR_CACHE_TABLE); + break; + } // We add moderators who have forum moderator permissions without an explicit ACL_NEVER setting $hold_ary = $ug_id_ary = $sql_ary = array(); @@ -2239,12 +2381,26 @@ function view_log($mode, &$log, &$log_count, $limit = 0, $offset = 0, $forum_id if (isset($user->lang[$row['log_operation']])) { $log[$i]['action'] = vsprintf($log[$i]['action'], $log_data_ary); - $log[$i]['action'] = str_replace("\n", '
    ', censor_text($log[$i]['action'])); + + // If within the admin panel we do not censor text out + if (defined('IN_ADMIN')) + { + $log[$i]['action'] = str_replace("\n", '
    ', $log[$i]['action']); + } + else + { + $log[$i]['action'] = str_replace("\n", '
    ', censor_text($log[$i]['action'])); + } } else { $log[$i]['action'] .= '
    ' . implode('', $log_data_ary); } + + /* Apply make_clickable... has to be seen if it is for good. :/ + // Seems to be not for the moment, reconsider later... + $log[$i]['action'] = make_clickable($log[$i]['action']); + */ } $i++; @@ -2348,10 +2504,98 @@ function view_log($mode, &$log, &$log_count, $limit = 0, $offset = 0, $forum_id /** * Update foes - remove moderators and administrators from foe lists... */ -function update_foes() +function update_foes($group_id = false, $user_id = false) { global $db, $auth; + // update foes for some user + if (is_array($user_id) && sizeof($user_id)) + { + $sql = 'DELETE FROM ' . ZEBRA_TABLE . ' + WHERE ' . $db->sql_in_set('zebra_id', $user_id) . ' + AND foe = 1'; + $db->sql_query($sql); + return; + } + + // update foes for some group + if (is_array($group_id) && sizeof($group_id)) + { + // Grab group settings... + $sql = $db->sql_build_query('SELECT', array( + 'SELECT' => 'a.group_id', + + 'FROM' => array( + ACL_OPTIONS_TABLE => 'ao', + ACL_GROUPS_TABLE => 'a' + ), + + 'LEFT_JOIN' => array( + array( + 'FROM' => array(ACL_ROLES_DATA_TABLE => 'r'), + 'ON' => 'a.auth_role_id = r.role_id' + ), + ), + + 'WHERE' => '(ao.auth_option_id = a.auth_option_id OR ao.auth_option_id = r.auth_option_id) + AND ' . $db->sql_in_set('a.group_id', $group_id) . " + AND ao.auth_option IN ('a_', 'm_')", + + 'GROUP_BY' => 'a.group_id' + )); + $result = $db->sql_query($sql); + + $groups = array(); + while ($row = $db->sql_fetchrow($result)) + { + $groups[] = (int) $row['group_id']; + } + $db->sql_freeresult($result); + + if (!sizeof($groups)) + { + return; + } + + switch ($db->sql_layer) + { + case 'mysqli': + case 'mysql4': + $sql = 'DELETE ' . (($db->sql_layer === 'mysqli' || version_compare($db->mysql_version, '4.1', '>=')) ? 'z.*' : ZEBRA_TABLE) . ' + FROM ' . ZEBRA_TABLE . ' z, ' . USER_GROUP_TABLE . ' ug + WHERE z.zebra_id = ug.user_id + AND z.foe = 1 + AND ' . $db->sql_in_set('ug.group_id', $groups); + $db->sql_query($sql); + break; + + default: + $sql = 'SELECT user_id + FROM ' . USER_GROUP_TABLE . ' + WHERE ' . $db->sql_in_set('group_id', $groups); + $result = $db->sql_query($sql); + + $users = array(); + while ($row = $db->sql_fetchrow($result)) + { + $users[] = (int) $row['user_id']; + } + $db->sql_freeresult($result); + + if (sizeof($users)) + { + $sql = 'DELETE FROM ' . ZEBRA_TABLE . ' + WHERE ' . $db->sql_in_set('zebra_id', $users) . ' + AND foe = 1'; + $db->sql_query($sql); + } + break; + } + + return; + } + + // update foes for everyone $perms = array(); foreach ($auth->acl_get_list(false, array('a_', 'm_'), false) as $forum_id => $forum_ary) { @@ -2464,7 +2708,6 @@ function get_database_size() case 'mysql': case 'mysql4': case 'mysqli': - $sql = 'SELECT VERSION() AS mysql_version'; $result = $db->sql_query($sql); $row = $db->sql_fetchrow($result); @@ -2503,22 +2746,28 @@ function get_database_size() $db->sql_freeresult($result); } } + break; + + case 'sqlite': + global $dbhost; + + if (file_exists($dbhost)) + { + $database_size = filesize($dbhost); + } break; case 'mssql': case 'mssql_odbc': - $sql = 'SELECT ((SUM(size) * 8.0) * 1024.0) as dbsize FROM sysfiles'; $result = $db->sql_query($sql); $database_size = ($row = $db->sql_fetchrow($result)) ? $row['dbsize'] : false; $db->sql_freeresult($result); - break; case 'postgres': - $sql = "SELECT proname FROM pg_proc WHERE proname = 'pg_database_size'"; @@ -2528,9 +2777,15 @@ function get_database_size() if ($row['proname'] == 'pg_database_size') { + $database = $db->dbname; + if (strpos($database, '.') !== false) + { + list($database, ) = explode('.', $database); + } + $sql = "SELECT oid FROM pg_database - WHERE datname = '" . $db->dbname . "'"; + WHERE datname = '$database'"; $result = $db->sql_query($sql); $row = $db->sql_fetchrow($result); $db->sql_freeresult($result); @@ -2544,7 +2799,6 @@ function get_database_size() $database_size = $row['size']; } - break; } @@ -2636,7 +2890,7 @@ function tidy_warnings() while ($row = $db->sql_fetchrow($result)) { $warning_list[] = $row['warning_id']; - $user_list[$row['user_id']] = isset($user_list[$row['user_id']]) ? $user_list[$row['user_id']]++ : 1; + $user_list[$row['user_id']] = isset($user_list[$row['user_id']]) ? ++$user_list[$row['user_id']] : 1; } $db->sql_freeresult($result); @@ -2678,7 +2932,7 @@ function add_permission_language() { global $user, $phpEx; - // First of all, our own file. + // First of all, our own file. We need to include it as the first file because it presets all relevant variables. $user->add_lang('acp/permissions_phpbb'); $files_to_add = array(); @@ -2692,7 +2946,7 @@ function add_permission_language() { while (($file = readdir($dh)) !== false) { - if (strpos($file, 'permissions_') === 0 && strpos($file, 'permissions_phpbb') === false && substr($file, -(strlen($phpEx) + 1)) === '.' . $phpEx) + if ($file !== 'permissions_phpbb.' . $phpEx && strpos($file, 'permissions_') === 0 && substr($file, -(strlen($phpEx) + 1)) === '.' . $phpEx) { $files_to_add[] = $path . substr($file, 0, -(strlen($phpEx) + 1)); } diff --git a/phpBB/includes/functions_compress.php b/phpBB/includes/functions_compress.php index 3fe2bf9a9b..d8267cf7f6 100644 --- a/phpBB/includes/functions_compress.php +++ b/phpBB/includes/functions_compress.php @@ -419,15 +419,20 @@ class compress_zip extends compress /** * Download archive */ - function download($filename) + function download($filename, $download_name = false) { global $phpbb_root_path; + if ($download_name === false) + { + $download_name = $filename; + } + $mimetype = 'application/zip'; header('Pragma: no-cache'); - header("Content-Type: $mimetype; name=\"$filename.zip\""); - header("Content-disposition: attachment; filename=$filename.zip"); + header("Content-Type: $mimetype; name=\"$download_name.zip\""); + header("Content-disposition: attachment; filename=$download_name.zip"); $fp = fopen("{$phpbb_root_path}store/$filename.zip", 'rb'); while ($buffer = fread($fp, 1024)) @@ -611,10 +616,15 @@ class compress_tar extends compress /** * Download archive */ - function download($filename) + function download($filename, $download_name = false) { global $phpbb_root_path; + if ($download_name === false) + { + $download_name = $filename; + } + switch ($this->type) { case '.tar': @@ -635,8 +645,8 @@ class compress_tar extends compress } header('Pragma: no-cache'); - header("Content-Type: $mimetype; name=\"$filename$this->type\""); - header("Content-disposition: attachment; filename=$filename$this->type"); + header("Content-Type: $mimetype; name=\"$download_name$this->type\""); + header("Content-disposition: attachment; filename=$download_name$this->type"); $fp = fopen("{$phpbb_root_path}store/$filename$this->type", 'rb'); while ($buffer = fread($fp, 1024)) diff --git a/phpBB/includes/functions_convert.php b/phpBB/includes/functions_convert.php index 14dd4c370b..22323a803a 100644 --- a/phpBB/includes/functions_convert.php +++ b/phpBB/includes/functions_convert.php @@ -17,38 +17,6 @@ define('DEFAULT_AVATAR_Y', 80); // Global functions - all functions can be used by convertors -/** -* Determine whether we are approaching the maximum execution time -*/ -function still_on_time() -{ - static $max_execution_time, $start_time; - - $time = explode(' ', microtime()); - $current_time = $time[0] + $time[1]; - - if (empty($max_execution_time)) - { - $max_execution_time = (function_exists('ini_get')) ? (int) ini_get('max_execution_time') : (int) get_cfg_var('max_execution_time'); - - // If zero, then set to something higher to not let the user catch the ten seconds barrier. - if ($max_execution_time === 0) - { - $max_execution_time = 250; - } - - $max_execution_time = min(max(10, ($max_execution_time - 15)), 250); - - // For debugging purposes - // $max_execution_time = 10; - - global $starttime; - $start_time = (empty($starttime)) ? $current_time : $starttime; - } - - return (ceil($current_time - $start_time) < $max_execution_time) ? true : false; -} - // SIMPLE FUNCTIONS /** @@ -304,11 +272,18 @@ function decode_ip($int_ip) { if (!$int_ip) { - return ''; + return $int_ip; } $hexipbang = explode('.', chunk_split($int_ip, 2, '.')); - return hexdec($hexipbang[0]). '.' . hexdec($hexipbang[1]) . '.' . hexdec($hexipbang[2]) . '.' . hexdec($hexipbang[3]); + + // Any mod changing the way ips are stored? Then we are not able to convert and enter the ip "as is" to not "destroy" anything... + if (sizeof($hexipbang) < 4) + { + return $int_ip; + } + + return hexdec($hexipbang[0]) . '.' . hexdec($hexipbang[1]) . '.' . hexdec($hexipbang[2]) . '.' . hexdec($hexipbang[3]); } /** @@ -432,7 +407,8 @@ function import_avatar_gallery($gallery_name = '', $subdirs_as_galleries = false if (is_dir($src_path)) { - copy_dir($convert->convertor['avatar_gallery_path'], path($config['avatar_gallery_path']) . $gallery_name, !$subdirs_as_galleries, false, true, $relative_path); + // Do not die on failure... safe mode restrictions may be in effect. + copy_dir($convert->convertor['avatar_gallery_path'], path($config['avatar_gallery_path']) . $gallery_name, !$subdirs_as_galleries, false, false, $relative_path); // only doing 1 level deep. (ibf 1.x) // notes: ibf has 2 tiers: directly in the avatar directory for base gallery (handled in the above statement), plus subdirs(handled below). @@ -476,7 +452,9 @@ function import_avatar_gallery($gallery_name = '', $subdirs_as_galleries = false for ($i = 0; $i < sizeof($dirlist); ++$i) { $dir = $dirlist[$i]; - copy_dir(path($convert->convertor['avatar_gallery_path'], $relative_path) . $dir, path($config['avatar_gallery_path']) . $dir, true, false, true, $relative_path); + + // Do not die on failure... safe mode restrictions may be in effect. + copy_dir(path($convert->convertor['avatar_gallery_path'], $relative_path) . $dir, path($config['avatar_gallery_path']) . $dir, true, false, false, $relative_path); } } } @@ -548,7 +526,8 @@ function _import_check($config_var, $source, $use_target) 'relative_path' => (empty($convert->convertor['source_path_absolute'])) ? true : false, ); - $target = $config[$config_var] . '/' . basename(($use_target === false) ? $source : $use_target); + // copy file will prepend $phpBB_root_path + $target = $config[$config_var] . '/' . basename(($use_target === false) ? $source : $use_target); if (!empty($convert->convertor[$config_var]) && strpos($source, $convert->convertor[$config_var]) !== 0) { @@ -651,7 +630,10 @@ function import_smiley($source, $use_target = false) return $result['target']; } -function import_avatar($source, $use_target = false) +/* +* +*/ +function import_avatar($source, $use_target = false, $user_id = false) { if (empty($source) || preg_match('#^https?:#i', $source) || preg_match('#blank\.(gif|png)$#i', $source)) { @@ -664,9 +646,15 @@ function import_avatar($source, $use_target = false) { $convert->p_master->error(sprintf($user->lang['CONV_ERROR_NO_AVATAR_PATH'], 'import_avatar()'), __LINE__, __FILE__); } - + + if ($use_target === false && $user_id !== false) + { + $use_target = $config['avatar_salt'] . '_' . $user_id . '.' . substr(strrchr($source, '.'), 1); + } + $result = _import_check('avatar_path', $source, $use_target); - return $result['target']; + + return ((!empty($user_id)) ? $user_id : $use_target) . '.' . substr(strrchr($source, '.'), 1); } /** @@ -691,7 +679,7 @@ function get_image_dim($source) if (file_exists(relative_base($source, $relative_path))) { $image = relative_base($source, $relative_path); - return getimagesize($image); + return @getimagesize($image); } return false; @@ -812,7 +800,10 @@ function get_avatar_dim($src, $axis, $func = false, $arg1 = false, $arg2 = false break; default: - return $axis ? DEFAULT_AVATAR_Y : DEFAULT_AVATAR_X; + $default_x = (defined('DEFAULT_AVATAR_X_CUSTOM')) ? DEFAULT_AVATAR_X_CUSTOM : DEFAULT_AVATAR_X; + $default_y = (defined('DEFAULT_AVATAR_Y_CUSTOM')) ? DEFAULT_AVATAR_Y_CUSTOM : DEFAULT_AVATAR_Y; + + return $axis ? $default_y : $default_x; break; } } @@ -858,7 +849,10 @@ function get_upload_avatar_dim($source, $axis) if (empty($cachedims) || empty($cachedims[0]) || empty($cachedims[1])) { - $cachedims = array(DEFAULT_AVATAR_X, DEFAULT_AVATAR_Y); + $default_x = (defined('DEFAULT_AVATAR_X_CUSTOM')) ? DEFAULT_AVATAR_X_CUSTOM : DEFAULT_AVATAR_X; + $default_y = (defined('DEFAULT_AVATAR_Y_CUSTOM')) ? DEFAULT_AVATAR_Y_CUSTOM : DEFAULT_AVATAR_Y; + + $cachedims = array($default_x, $default_y); } return $cachedims[$axis]; @@ -899,7 +893,10 @@ function get_gallery_avatar_dim($source, $axis) if (empty($avatar_cache[$orig_source]) || empty($avatar_cache[$orig_source][0]) || empty($avatar_cache[$orig_source][1])) { - $avatar_cache[$orig_source] = array(DEFAULT_AVATAR_X, DEFAULT_AVATAR_Y); + $default_x = (defined('DEFAULT_AVATAR_X_CUSTOM')) ? DEFAULT_AVATAR_X_CUSTOM : DEFAULT_AVATAR_X; + $default_y = (defined('DEFAULT_AVATAR_Y_CUSTOM')) ? DEFAULT_AVATAR_Y_CUSTOM : DEFAULT_AVATAR_Y; + + $avatar_cache[$orig_source] = array($default_x, $default_y); } return $avatar_cache[$orig_source][$axis]; @@ -910,28 +907,81 @@ function get_gallery_avatar_dim($source, $axis) * Whilst it's unlikely that remote avatars will be duplicated, it is possible so caching seems the best option * This should only be called from a post processing step due to the possibility of network timeouts */ -function get_remote_avatar_dim($src,$axis) +function get_remote_avatar_dim($src, $axis) { if (empty($src)) { return 0; } - static $avatar_cache = array(); + static $remote_avatar_cache = array(); - if (isset($avatar_cache[$src])) + // an ugly hack: we assume that the dimensions of each remote avatar are accessed exactly twice (x and y) + if (isset($remote_avatar_cache[$src])) { - return $avatar_cache[$src][$axis]; + $retval = $remote_avatar_cache[$src][$axis]; + unset($remote_avatar_cache); + return $retval; } - - $avatar_cache[$src] = getimagesize($src); - - if (empty($avatar_cache[$src]) || empty($avatar_cache[$src][0]) || empty($avatar_cache[$src][1])) + + $url_info = @parse_url($src); + if (empty($url_info['host'])) { - $avatar_cache[$src] = array(DEFAULT_AVATAR_X, DEFAULT_AVATAR_Y); + return 0; } - - return $avatar_cache[$src][$axis]; + $host = $url_info['host']; + $port = (isset($url_info['port'])) ? $url_info['port'] : 0; + $protocol = (isset($url_info['scheme'])) ? $url_info['scheme'] : 'http'; + if (empty($port)) + { + switch(strtolower($protocol)) + { + case 'ftp': + $port = 21; + break; + + case 'https': + $port = 443; + break; + + default: + $port = 80; + } + } + + $timeout = @ini_get('default_socket_timeout'); + @ini_set('default_socket_timeout', 2); + + // We're just trying to reach the server to avoid timeouts + $fp = @fsockopen($host, $port, $errno, $errstr, 1); + if ($fp) + { + $remote_avatar_cache[$src] = @getimagesize($src); + fclose($fp); + } + + $default_x = (defined('DEFAULT_AVATAR_X_CUSTOM')) ? DEFAULT_AVATAR_X_CUSTOM : DEFAULT_AVATAR_X; + $default_y = (defined('DEFAULT_AVATAR_Y_CUSTOM')) ? DEFAULT_AVATAR_Y_CUSTOM : DEFAULT_AVATAR_Y; + $default = array($default_x, $default_y); + + if (empty($remote_avatar_cache[$src]) || empty($remote_avatar_cache[$src][0]) || empty($remote_avatar_cache[$src][1])) + { + $remote_avatar_cache[$src] = $default; + } + else + { + // We trust gallery and uploaded avatars to conform to the size settings; we might have to adjust here + if ($remote_avatar_cache[$src][0] > $default_x || $remote_avatar_cache[$src][1] > $default_y) + { + $bigger = ($remote_avatar_cache[$src][0] > $remote_avatar_cache[$src][1]) ? 0 : 1; + $ratio = $default[$bigger] / $remote_avatar_cache[$src][$bigger]; + $remote_avatar_cache[$src][0] = (int)($remote_avatar_cache[$src][0] * $ratio); + $remote_avatar_cache[$src][1] = (int)($remote_avatar_cache[$src][1] * $ratio); + } + } + + @ini_set('default_socket_timeout', $timeout); + return $remote_avatar_cache[$src][$axis]; } function set_user_options() @@ -1056,9 +1106,9 @@ function add_user_group($group_id, $user_id, $group_leader=false) * @param string $group The name of the special group to add to * @param string $select_query An SQL query to retrieve the user(s) to add to the group */ -function user_group_auth($group, $select_query) +function user_group_auth($group, $select_query, $use_src_db) { - global $convert, $phpbb_root_path, $config, $user, $db; + global $convert, $phpbb_root_path, $config, $user, $db, $src_db, $same_db; if (!in_array($group, array('guests', 'registered', 'registered_coppa', 'global_moderators', 'administrators', 'bots'))) { @@ -1079,9 +1129,33 @@ function user_group_auth($group, $select_query) return; } - $sql = 'INSERT INTO ' . USER_GROUP_TABLE . ' (user_id, group_id, user_pending) - ' . str_replace('{' . strtoupper($group) . '}', $group_id . ', 0', $select_query); - $db->sql_query($sql); + if ($same_db || !$use_src_db) + { + $sql = 'INSERT INTO ' . USER_GROUP_TABLE . ' (user_id, group_id, user_pending) + ' . str_replace('{' . strtoupper($group) . '}', $group_id . ', 0', $select_query); + $db->sql_query($sql); + } + else + { + $result = $src_db->sql_query(str_replace('{' . strtoupper($group) . '}', $group_id . ', 0', $select_query)); + while ($row = $src_db->sql_fetchrow($result)) + { + // make sure it's exactly 3 ints that were returned + $data = array(); + reset($row); + for ($i = 0; $i < 3; $i++) + { + $data[] = (int) current($row); + next($row); + } + + // this might become quite a lot of INSERTS unfortunately + $sql = 'INSERT INTO ' . USER_GROUP_TABLE . ' (user_id, group_id, user_pending) + VALUES (' . implode(', ', $data) . ')'; + $db->sql_query($sql); + } + $src_db->sql_freeresult($result); + } } /** @@ -1099,14 +1173,19 @@ function get_config() return $convert_config; } - global $db, $phpbb_root_path, $config; + global $src_db, $same_db, $phpbb_root_path, $config; global $convert; if ($convert->config_schema['table_format'] != 'file') { + if ($convert->mysql_convert && $same_db) + { + $src_db->sql_query("SET NAMES 'binary'"); + } + $sql = 'SELECT * FROM ' . $convert->src_table_prefix . $convert->config_schema['table_name']; - $result = $db->sql_query($sql); - $row = $db->sql_fetchrow($result); + $result = $src_db->sql_query($sql); + $row = $src_db->sql_fetchrow($result); if (!$row) { @@ -1123,8 +1202,13 @@ function get_config() { $convert_config[$row[$key]] = $row[$val]; } - while ($row = $db->sql_fetchrow($result)); - $db->sql_freeresult($result); + while ($row = $src_db->sql_fetchrow($result)); + $src_db->sql_freeresult($result); + + if ($convert->mysql_convert && $same_db) + { + $src_db->sql_query("SET NAMES 'utf8'"); + } } else if ($convert->config_schema['table_format'] == 'file') { @@ -1143,6 +1227,10 @@ function get_config() else { $convert_config = $row; + if ($convert->mysql_convert && $same_db) + { + $src_db->sql_query("SET NAMES 'utf8'"); + } } if (!sizeof($convert_config)) @@ -1166,7 +1254,7 @@ function restore_config($schema) { if (preg_match('/(.*)\((.*)\)/', $src, $m)) { - $var = (empty($m[2])) ? '' : "'" . addslashes($convert_config[$m[2]]) . "'"; + $var = (empty($m[2]) || empty($convert_config[$m[2]])) ? "''" : "'" . addslashes($convert_config[$m[2]]) . "'"; $exec = '$config_value = ' . $m[1] . '(' . $var . ');'; eval($exec); } @@ -1198,7 +1286,7 @@ function update_folder_pm_count() $sql = 'SELECT user_id, folder_id, COUNT(msg_id) as num_messages FROM ' . PRIVMSGS_TO_TABLE . ' WHERE folder_id NOT IN (' . PRIVMSGS_NO_BOX . ', ' . PRIVMSGS_HOLD_BOX . ', ' . PRIVMSGS_INBOX . ', ' . PRIVMSGS_OUTBOX . ', ' . PRIVMSGS_SENTBOX . ') - GROUP BY folder_id'; + GROUP BY folder_id, user_id'; $result = $db->sql_query($sql); while ($row = $db->sql_fetchrow($result)) @@ -1213,6 +1301,11 @@ function update_folder_pm_count() function path($path, $path_relative = true) { + if ($path === false) + { + return ''; + } + if (substr($path, -1) != '/') { $path .= '/'; @@ -1274,7 +1367,7 @@ function get_path($src_path, $src_url, $test_file) $url_parts = explode('/', $m[2]); if (substr($src_url, -1) != '/') { - if (preg_match('/.*\.([a-z0-9]{3,4})$/i', $url_parts[count($url_parts) - 1])) + if (preg_match('/.*\.([a-z0-9]{3,4})$/i', $url_parts[sizeof($url_parts) - 1])) { $url_parts[sizeof($url_parts) - 1] = ''; } @@ -1326,7 +1419,7 @@ function get_path($src_path, $src_url, $test_file) function compare_table($tables, $tablename, &$prefixes) { - for ($i = 0; $i < sizeof($tables); ++$i) + for ($i = 0, $table_size = sizeof($tables); $i < $table_size; ++$i) { if (preg_match('/(.*)' . $tables[$i] . '$/', $tablename, $m)) { @@ -1637,7 +1730,7 @@ function add_bots() $sql = 'SELECT group_id FROM ' . GROUPS_TABLE . " WHERE group_name = 'BOTS'"; $result = $db->sql_query($sql); - $group_id = (int) $db->sql_fetchfield('group_id', 0, $result); + $group_id = (int) $db->sql_fetchfield('group_id', false, $result); $db->sql_freeresult($result); if (!$group_id) @@ -1646,11 +1739,12 @@ function add_bots() $sql = 'SELECT group_id FROM ' . GROUPS_TABLE . " WHERE group_name = 'BOTS'"; $result = $db->sql_query($sql); - $group_id = (int) $db->sql_fetchfield('group_id', 0, $result); + $group_id = (int) $db->sql_fetchfield('group_id', false, $result); $db->sql_freeresult($result); if (!$group_id) { + global $install; $install->error($user->lang['CONV_ERROR_INCONSISTENT_GROUPS'], __LINE__, __FILE__); } } @@ -1701,7 +1795,7 @@ function add_bots() 'W3C [Linkcheck]' => array('W3C-checklink/', ''), 'W3C [Validator]' => array('W3C_*Validator', ''), 'WiseNut [Bot]' => array('http://www.WISEnutbot.com', ''), - 'Yacy [Bot]' => array('yacybot', ''), + 'YaCy [Bot]' => array('yacybot', ''), 'Yahoo MMCrawler [Bot]' => array('Yahoo-MMCrawler/', ''), 'Yahoo Slurp [Bot]' => array('Yahoo! DE Slurp', ''), 'Yahoo [Bot]' => array('Yahoo! Slurp', ''), @@ -1756,8 +1850,15 @@ function update_dynamic_config() // Get latest username $sql = 'SELECT user_id, username, user_colour FROM ' . USERS_TABLE . ' - WHERE user_type IN (' . USER_NORMAL . ', ' . USER_FOUNDER . ') - ORDER BY user_id DESC'; + WHERE user_type IN (' . USER_NORMAL . ', ' . USER_FOUNDER . ')'; + + if (!empty($config['increment_user_id'])) + { + $sql .= ' AND user_id <> ' . $config['increment_user_id']; + } + + $sql .= ' ORDER BY user_id DESC'; + $result = $db->sql_query_limit($sql, 1); $row = $db->sql_fetchrow($result); $db->sql_freeresult($result); @@ -1769,8 +1870,9 @@ function update_dynamic_config() set_config('newest_user_colour', $row['user_colour'], true); } - set_config('record_online_users', 1, true); - set_config('record_online_date', time(), true); +// Also do not reset record online user/date. There will be old data or the fresh data from the schema. +// set_config('record_online_users', 1, true); +// set_config('record_online_date', time(), true); $sql = 'SELECT COUNT(post_id) AS stat FROM ' . POSTS_TABLE . ' @@ -1813,6 +1915,8 @@ function update_dynamic_config() set_config('upload_dir_size', (int) $db->sql_fetchfield('stat'), true); $db->sql_freeresult($result); + /** + * We do not resync users post counts - this can be done by the admin after conversion if wanted. $sql = 'SELECT COUNT(post_id) AS num_posts, poster_id FROM ' . POSTS_TABLE . ' WHERE post_postcount = 1 @@ -1824,6 +1928,7 @@ function update_dynamic_config() $db->sql_query('UPDATE ' . USERS_TABLE . " SET user_posts = {$row['num_posts']} WHERE user_id = {$row['poster_id']}"); } $db->sql_freeresult($result); + */ } /** @@ -1833,7 +1938,17 @@ function update_topics_posted() { global $db, $config; - $db->sql_query((($db->sql_layer != 'sqlite') ? 'TRUNCATE TABLE ' : 'DELETE FROM ') . TOPICS_POSTED_TABLE); + switch ($db->sql_layer) + { + case 'sqlite': + case 'firebird': + $db->sql_query('DELETE FROM ' . TOPICS_POSTED_TABLE); + break; + + default: + $db->sql_query('TRUNCATE TABLE ' . TOPICS_POSTED_TABLE); + break; + } // This can get really nasty... therefore we only do the last six months $get_from_time = time() - (6 * 4 * 7 * 24 * 60 * 60); @@ -1880,15 +1995,18 @@ function update_topics_posted() foreach ($topic_row as $topic_id) { $sql_ary[] = array( - 'user_id' => $user_id, - 'topic_id' => $topic_id, + 'user_id' => (int) $user_id, + 'topic_id' => (int) $topic_id, 'topic_posted' => 1, ); } } unset($posted); - $db->sql_multi_insert(TOPICS_POSTED_TABLE, $sql_ary); + if (sizeof($sql_ary)) + { + $db->sql_multi_insert(TOPICS_POSTED_TABLE, $sql_ary); + } } } @@ -1910,22 +2028,6 @@ function fix_empty_primary_groups() $db->sql_query('UPDATE ' . USERS_TABLE . ' SET group_id = ' . get_group_id('guests') . ' WHERE user_id = ' . ANONYMOUS); - $sql = 'SELECT ban_userid as user_id FROM ' . BANLIST_TABLE . ' WHERE ban_userid > 0'; - $result = $db->sql_query($sql); - - $user_ids = array(); - while ($row = $db->sql_fetchrow($result)) - { - $user_ids[] = $row['user_id']; - } - $db->sql_freeresult($result); - - if (sizeof($user_ids)) - { - $db->sql_query('UPDATE ' . USERS_TABLE . ' SET user_type = ' . USER_IGNORE . ' - WHERE user_id IN (' . implode(',', $user_ids) . ')'); - } - $sql = 'SELECT user_id FROM ' . USER_GROUP_TABLE . ' WHERE group_id = ' . get_group_id('administrators'); $result = $db->sql_query($sql); @@ -1969,6 +2071,32 @@ function fix_empty_primary_groups() $db->sql_freeresult($result); } +/** +* Cleanly remove invalid user entries after converting the users table... +*/ +function remove_invalid_users() +{ + global $convert, $db; + + // username_clean is UNIQUE + $sql = 'SELECT user_id + FROM ' . USERS_TABLE . " + WHERE username_clean = ''"; + $result = $db->sql_query($sql); + $row = $db->sql_fetchrow($result); + $db->sql_freeresult($result); + + if ($row) + { + if (!function_exists('user_delete')) + { + include($phpbb_root_path . 'includes/functions_user.' . $phpEx); + } + + user_delete('remove', $row['user_id']); + } +} + function convert_bbcode($message, $convert_size = true, $extended_bbcodes = false) { static $orig, $repl, $origx, $replx, $str_from, $str_to; @@ -2124,7 +2252,7 @@ function copy_file($src, $trg, $overwrite = false, $die_on_failure = true, $sour if (!@copy($src_path, $phpbb_root_path . $trg_path)) { - $convert->p_master->error(sprintf($user->lang['COULD_NOT_COPY'], $src_path, $phpbb_root_path . $trg), __LINE__, __FILE__, !$die_on_failure); + $convert->p_master->error(sprintf($user->lang['COULD_NOT_COPY'], $src_path, $phpbb_root_path . $trg_path), __LINE__, __FILE__, !$die_on_failure); return; } @@ -2152,7 +2280,7 @@ function copy_dir($src, $trg, $copy_subdirs = true, $overwrite = false, $die_on_ @chmod($trg_path, 0777); } - if (!is_writeable($trg_path)) + if (!@is_writable($trg_path)) { $bad_dirs[] = path($config['script_path']) . $trg; } @@ -2219,7 +2347,7 @@ function copy_dir($src, $trg, $copy_subdirs = true, $overwrite = false, $die_on_ @chmod($trg_path . $dir, 0777); } - if (!is_writeable($trg_path . $dir)) + if (!@is_writable($trg_path . $dir)) { $bad_dirs[] = $trg . $dir; $bad_dirs[] = $trg_path . $dir; diff --git a/phpBB/includes/functions_display.php b/phpBB/includes/functions_display.php index e62bf674e6..f56de24a24 100644 --- a/phpBB/includes/functions_display.php +++ b/phpBB/includes/functions_display.php @@ -18,7 +18,7 @@ function display_forums($root_data = '', $display_moderators = true, $return_mod $forum_rows = $subforums = $forum_ids = $forum_ids_moderator = $forum_moderators = $active_forum_ary = array(); $parent_id = $visible_forums = 0; - $sql_from = $lastread_select = ''; + $sql_from = ''; // Mark forums read? $mark_read = request_var('mark', ''); @@ -40,24 +40,29 @@ function display_forums($root_data = '', $display_moderators = true, $return_mod } else { - $sql_where = ' WHERE left_id > ' . $root_data['left_id'] . ' AND left_id < ' . $root_data['right_id']; + $sql_where = 'left_id > ' . $root_data['left_id'] . ' AND left_id < ' . $root_data['right_id']; } // Display list of active topics for this category? $show_active = (isset($root_data['forum_flags']) && ($root_data['forum_flags'] & FORUM_FLAG_ACTIVE_TOPICS)) ? true : false; - $sql_from = FORUMS_TABLE . ' f '; - $lastread_select = ''; + $sql_array = array( + 'SELECT' => 'f.*', + 'FROM' => array( + FORUMS_TABLE => 'f' + ), + 'LEFT_JOIN' => array(), + ); if ($config['load_db_lastread'] && $user->data['is_registered']) { - $sql_from = FORUMS_TABLE . ' f LEFT JOIN ' . FORUMS_TRACK_TABLE . ' ft ON (ft.user_id = ' . $user->data['user_id'] . ' AND ft.forum_id = f.forum_id)'; - $lastread_select = ', ft.mark_time '; + $sql_array['LEFT_JOIN'][] = array('FROM' => array(FORUMS_TRACK_TABLE => 'ft'), 'ON' => 'ft.user_id = ' . $user->data['user_id'] . ' AND ft.forum_id = f.forum_id'); + $sql_array['SELECT'] .= ', ft.mark_time'; } else if ($config['load_anon_lastread'] || $user->data['is_registered']) { $tracking_topics = (isset($_COOKIE[$config['cookie_name'] . '_track'])) ? ((STRIP) ? stripslashes($_COOKIE[$config['cookie_name'] . '_track']) : $_COOKIE[$config['cookie_name'] . '_track']) : ''; - $tracking_topics = ($tracking_topics) ? unserialize($tracking_topics) : array(); + $tracking_topics = ($tracking_topics) ? tracking_unserialize($tracking_topics) : array(); if (!$user->data['is_registered']) { @@ -65,10 +70,26 @@ function display_forums($root_data = '', $display_moderators = true, $return_mod } } - $sql = "SELECT f.* $lastread_select - FROM $sql_from - $sql_where - ORDER BY f.left_id"; + if ($show_active) + { + $sql_array['LEFT_JOIN'][] = array( + 'FROM' => array(FORUMS_ACCESS_TABLE => 'fa'), + 'ON' => "fa.forum_id = f.forum_id AND fa.session_id = '" . $db->sql_escape($user->session_id) . "'" + ); + + $sql_array['SELECT'] .= ', fa.user_id'; + } + + $sql = $db->sql_build_query('SELECT', array( + 'SELECT' => $sql_array['SELECT'], + 'FROM' => $sql_array['FROM'], + 'LEFT_JOIN' => $sql_array['LEFT_JOIN'], + + 'WHERE' => $sql_where, + + 'ORDER_BY' => 'f.left_id', + )); + $result = $db->sql_query($sql); $forum_tracking_info = array(); @@ -125,6 +146,8 @@ function display_forums($root_data = '', $display_moderators = true, $return_mod $forum_tracking_info[$forum_id] = (isset($tracking_topics['f'][$forum_id])) ? (int) (base_convert($tracking_topics['f'][$forum_id], 36, 10) + $config['board_startdate']) : $user->data['user_lastmark']; } + $row['forum_topics'] = ($auth->acl_get('m_approve', $forum_id)) ? $row['forum_topics_real'] : $row['forum_topics']; + // Display active topics from this forum? if ($show_active && $row['forum_type'] == FORUM_POST && $auth->acl_get('f_read', $forum_id) && ($row['forum_flags'] & FORUM_FLAG_ACTIVE_TOPICS)) { @@ -140,8 +163,14 @@ function display_forums($root_data = '', $display_moderators = true, $return_mod $active_forum_ary['forum_id'][] = $forum_id; $active_forum_ary['enable_icons'][] = $row['enable_icons']; - $active_forum_ary['forum_topics'] += ($auth->acl_get('m_approve', $forum_id)) ? $row['forum_topics_real'] : $row['forum_topics']; + $active_forum_ary['forum_topics'] += $row['forum_topics']; $active_forum_ary['forum_posts'] += $row['forum_posts']; + + // If this is a passworded forum we do not show active topics from it if the user is not authorised to view it... + if ($row['forum_password'] && $row['user_id'] != $user->data['user_id']) + { + $active_forum_ary['exclude_forum_id'][] = $forum_id; + } } // @@ -169,7 +198,7 @@ function display_forums($root_data = '', $display_moderators = true, $return_mod $subforums[$parent_id][$forum_id]['name'] = $row['forum_name']; $subforums[$parent_id][$forum_id]['orig_forum_last_post_time'] = $row['forum_last_post_time']; - $forum_rows[$parent_id]['forum_topics'] += ($auth->acl_get('m_approve', $forum_id)) ? $row['forum_topics_real'] : $row['forum_topics']; + $forum_rows[$parent_id]['forum_topics'] += $row['forum_topics']; // Do not list redirects in LINK Forums as Posts. if ($row['forum_type'] != FORUM_LINK) @@ -227,6 +256,8 @@ function display_forums($root_data = '', $display_moderators = true, $return_mod get_moderators($forum_moderators, $forum_ids_moderator); } + // Used to tell whatever we have to create a dummy category or not. + $last_catless = true; foreach ($forum_rows as $row) { // Empty category @@ -252,28 +283,34 @@ function display_forums($root_data = '', $display_moderators = true, $return_mod $forum_unread = (isset($forum_tracking_info[$forum_id]) && $row['orig_forum_last_post_time'] > $forum_tracking_info[$forum_id]) ? true : false; - $folder_image = $folder_alt = $subforums_list = $l_subforums = ''; + $folder_image = $folder_alt = $l_subforums = ''; + $subforums_list = array(); // Generate list of subforums if we need to if (isset($subforums[$forum_id])) { foreach ($subforums[$forum_id] as $subforum_id => $subforum_row) { - // Update unread information if needed - if (!$forum_unread) - { - $forum_unread = (isset($forum_tracking_info[$subforum_id]) && $subforum_row['orig_forum_last_post_time'] > $forum_tracking_info[$subforum_id]) ? true : false; - } + $subforum_unread = (isset($forum_tracking_info[$subforum_id]) && $subforum_row['orig_forum_last_post_time'] > $forum_tracking_info[$subforum_id]) ? true : false; if ($subforum_row['display'] && $subforum_row['name']) { - $subforums_list .= ($subforums_list == '') ? '' : ', '; - $subforums_list .= '' . $subforum_row['name'] . ''; + $subforums_list[] = array( + 'link' => append_sid("{$phpbb_root_path}viewforum.$phpEx", 'f=' . $subforum_id), + 'name' => $subforum_row['name'], + 'unread' => $subforum_unread, + ); } else { unset($subforums[$forum_id][$subforum_id]); } + + // If one subforum is unread the forum gets unread too... + if ($subforum_unread) + { + $forum_unread = true; + } } $l_subforums = (sizeof($subforums[$forum_id]) == 1) ? $user->lang['SUBFORUM'] . ': ' : $user->lang['SUBFORUMS'] . ': '; @@ -327,11 +364,21 @@ function display_forums($root_data = '', $display_moderators = true, $return_mod $l_post_click_count = ($row['forum_type'] == FORUM_LINK) ? 'CLICKS' : 'POSTS'; $post_click_count = ($row['forum_type'] != FORUM_LINK || $row['forum_flags'] & FORUM_FLAG_LINK_TRACK) ? $row['forum_posts'] : ''; + $s_subforums_list = array(); + foreach ($subforums_list as $subforum) + { + $s_subforums_list[] = '' . $subforum['name'] . ''; + } + $s_subforums_list = (string) implode(', ', $s_subforums_list); + $catless = ($row['parent_id'] == $root_data['forum_id']) ? true : false; + $template->assign_block_vars('forumrow', array( 'S_IS_CAT' => false, + 'S_NO_CAT' => $catless && !$last_catless, 'S_IS_LINK' => ($row['forum_type'] == FORUM_LINK) ? true : false, 'S_UNREAD_FORUM' => $forum_unread, 'S_LOCKED_FORUM' => ($row['forum_status'] == ITEM_LOCKED) ? true : false, + 'S_SUBFORUMS' => (sizeof($subforums_list)) ? true : false, 'FORUM_ID' => $row['forum_id'], 'FORUM_NAME' => $row['forum_name'], @@ -342,13 +389,13 @@ function display_forums($root_data = '', $display_moderators = true, $return_mod 'FORUM_FOLDER_IMG_SRC' => $user->img($folder_image, $folder_alt, false, '', 'src'), 'FORUM_IMAGE' => ($row['forum_image']) ? '' . $user->lang[$folder_alt] . '' : '', 'FORUM_IMAGE_SRC' => ($row['forum_image']) ? $phpbb_root_path . $row['forum_image'] : '', - 'SUBFORUMS' => $subforums_list, 'LAST_POST_SUBJECT' => censor_text($last_post_subject), 'LAST_POST_TIME' => $last_post_time, 'LAST_POSTER' => get_username_string('username', $row['forum_last_poster_id'], $row['forum_last_poster_name'], $row['forum_last_poster_colour']), 'LAST_POSTER_COLOUR' => get_username_string('colour', $row['forum_last_poster_id'], $row['forum_last_poster_name'], $row['forum_last_poster_colour']), 'LAST_POSTER_FULL' => get_username_string('full', $row['forum_last_poster_id'], $row['forum_last_poster_name'], $row['forum_last_poster_colour']), 'MODERATORS' => $moderators_list, + 'SUBFORUMS' => $s_subforums_list, 'L_SUBFORUM_STR' => $l_subforums, 'L_FORUM_FOLDER_ALT' => $folder_alt, @@ -358,6 +405,18 @@ function display_forums($root_data = '', $display_moderators = true, $return_mod 'U_LAST_POSTER' => get_username_string('profile', $row['forum_last_poster_id'], $row['forum_last_poster_name'], $row['forum_last_poster_colour']), 'U_LAST_POST' => $last_post_url) ); + + // Assign subforums loop for style authors + foreach ($subforums_list as $subforum) + { + $template->assign_block_vars('forumrow.subforum', array( + 'U_SUBFORUM' => $subforum['link'], + 'SUBFORUM_NAME' => $subforum['name'], + 'S_UNREAD' => $subforum['unread']) + ); + } + + $last_catless = $catless; } $template->assign_vars(array( @@ -516,9 +575,11 @@ function topic_generate_pagination($replies, $url) for ($j = 0; $j < $replies + 1; $j += $per_page) { $pagination .= '' . $times . ''; - if ($times == 1 && $total_pages > 4) + if ($times == 1 && $total_pages > 5) { $pagination .= ' ... '; + + // Display the last three pages $times = $total_pages - 3; $j += ($total_pages - 4) * $per_page; } @@ -655,7 +716,7 @@ function topic_status(&$topic_row, $replies, $unread_topic, &$folder_img, &$fold { $topic_type = $user->lang['VIEW_TOPIC_MOVED']; $folder_img = 'topic_moved'; - $folder_alt = 'VIEW_TOPIC_MOVED'; + $folder_alt = 'TOPIC_MOVED'; } else { @@ -1045,4 +1106,41 @@ function get_user_rank($user_rank, $user_posts, &$rank_title, &$rank_img, &$rank } } +/** +* Get user avatar +* +* @param string $avatar Users assigned avatar name +* @param int $avatar_type Type of avatar +* @param string $avatar_width Width of users avatar +* @param string $avatar_height Height of users avatar +* @param string $alt Optional language string for alt tag within image, can be a language key or text +* +* @return string Avatar image +*/ +function get_user_avatar($avatar, $avatar_type, $avatar_width, $avatar_height, $alt = 'USER_AVATAR') +{ + global $user, $config, $phpbb_root_path, $phpEx; + + if (empty($avatar) || !$avatar_type) + { + return ''; + } + + $avatar_img = ''; + + switch ($avatar_type) + { + case AVATAR_UPLOAD: + $avatar_img = $phpbb_root_path . "download.$phpEx?avatar="; + break; + + case AVATAR_GALLERY: + $avatar_img = $phpbb_root_path . $config['avatar_gallery_path'] . '/'; + break; + } + + $avatar_img .= $avatar; + return '' . ((!empty($user->lang[$alt])) ? $user->lang[$alt] : $alt) . ''; +} + ?> \ No newline at end of file diff --git a/phpBB/includes/functions_install.php b/phpBB/includes/functions_install.php new file mode 100644 index 0000000000..43d536e7e9 --- /dev/null +++ b/phpBB/includes/functions_install.php @@ -0,0 +1,527 @@ + array( + 'LABEL' => 'FireBird', + 'SCHEMA' => 'firebird', + 'MODULE' => 'interbase', + 'DELIM' => ';;', + 'COMMENTS' => 'remove_remarks', + 'DRIVER' => 'firebird', + 'AVAILABLE' => true, + '2.0.x' => false, + ), + 'mysqli' => array( + 'LABEL' => 'MySQL with MySQLi Extension', + 'SCHEMA' => 'mysql_41', + 'MODULE' => 'mysqli', + 'DELIM' => ';', + 'COMMENTS' => 'remove_remarks', + 'DRIVER' => 'mysqli', + 'AVAILABLE' => true, + '2.0.x' => true, + ), + 'mysql' => array( + 'LABEL' => 'MySQL', + 'SCHEMA' => 'mysql', + 'MODULE' => 'mysql', + 'DELIM' => ';', + 'COMMENTS' => 'remove_remarks', + 'DRIVER' => 'mysql', + 'AVAILABLE' => true, + '2.0.x' => true, + ), + 'mssql' => array( + 'LABEL' => 'MS SQL Server 2000+', + 'SCHEMA' => 'mssql', + 'MODULE' => 'mssql', + 'DELIM' => 'GO', + 'COMMENTS' => 'remove_comments', + 'DRIVER' => 'mssql', + 'AVAILABLE' => true, + '2.0.x' => true, + ), + 'mssql_odbc'=> array( + 'LABEL' => 'MS SQL Server [ ODBC ]', + 'SCHEMA' => 'mssql', + 'MODULE' => 'odbc', + 'DELIM' => 'GO', + 'COMMENTS' => 'remove_comments', + 'DRIVER' => 'mssql_odbc', + 'AVAILABLE' => true, + '2.0.x' => true, + ), + 'oracle' => array( + 'LABEL' => 'Oracle', + 'SCHEMA' => 'oracle', + 'MODULE' => 'oci8', + 'DELIM' => '/', + 'COMMENTS' => 'remove_comments', + 'DRIVER' => 'oracle', + 'AVAILABLE' => true, + '2.0.x' => false, + ), + 'postgres' => array( + 'LABEL' => 'PostgreSQL 7.x/8.x', + 'SCHEMA' => 'postgres', + 'MODULE' => 'pgsql', + 'DELIM' => ';', + 'COMMENTS' => 'remove_comments', + 'DRIVER' => 'postgres', + 'AVAILABLE' => true, + '2.0.x' => true, + ), + 'sqlite' => array( + 'LABEL' => 'SQLite', + 'SCHEMA' => 'sqlite', + 'MODULE' => 'sqlite', + 'DELIM' => ';', + 'COMMENTS' => 'remove_remarks', + 'DRIVER' => 'sqlite', + 'AVAILABLE' => true, + '2.0.x' => false, + ), + ); + + if ($dbms) + { + if (isset($available_dbms[$dbms])) + { + $available_dbms = array($dbms => $available_dbms[$dbms]); + } + else + { + return array(); + } + } + + // now perform some checks whether they are really available + foreach ($available_dbms as $db_name => $db_ary) + { + if ($only_20x_options && !$db_ary['2.0.x']) + { + if ($return_unavailable) + { + $available_dbms[$db_name]['AVAILABLE'] = false; + } + else + { + unset($available_dbms[$db_name]); + } + continue; + } + + $dll = $db_ary['MODULE']; + + if (!@extension_loaded($dll)) + { + if (!can_load_dll($dll)) + { + if ($return_unavailable) + { + $available_dbms[$db_name]['AVAILABLE'] = false; + } + else + { + unset($available_dbms[$db_name]); + } + continue; + } + } + $any_db_support = true; + } + + if ($return_unavailable) + { + $available_dbms['ANY_DB_SUPPORT'] = $any_db_support; + } + return $available_dbms; +} + +/** +* Generate the drop down of available database options +*/ +function dbms_select($default = '', $only_20x_options = false) +{ + $available_dbms = get_available_dbms(false, false, $only_20x_options); + $dbms_options = ''; + foreach ($available_dbms as $dbms_name => $details) + { + $selected = ($dbms_name == $default) ? ' selected="selected"' : ''; + $dbms_options .= ''; + } + return $dbms_options; +} + +/** +* Get tables of a database +*/ +function get_tables($db) +{ + switch ($db->sql_layer) + { + case 'mysql': + case 'mysql4': + case 'mysqli': + $sql = 'SHOW TABLES'; + break; + + case 'sqlite': + $sql = 'SELECT name + FROM sqlite_master + WHERE type = "table"'; + break; + + case 'mssql': + case 'mssql_odbc': + $sql = "SELECT name + FROM sysobjects + WHERE type='U'"; + break; + + case 'postgres': + $sql = 'SELECT relname + FROM pg_stat_user_tables'; + break; + + case 'firebird': + $sql = 'SELECT rdb$relation_name + FROM rdb$relations + WHERE rdb$view_source is null + AND rdb$system_flag = 0'; + break; + + case 'oracle': + $sql = 'SELECT table_name + FROM USER_TABLES'; + break; + } + + $result = $db->sql_query($sql); + + $tables = array(); + + while ($row = $db->sql_fetchrow($result)) + { + $tables[] = current($row); + } + + $db->sql_freeresult($result); + + return $tables; +} + +/** +* Used to test whether we are able to connect to the database the user has specified +* and identify any problems (eg there are already tables with the names we want to use +* @param array $dbms should be of the format of an element of the array returned by {@link get_available_dbms get_available_dbms()} +* necessary extensions should be loaded already +*/ +function connect_check_db($error_connect, &$error, $dbms, $table_prefix, $dbhost, $dbuser, $dbpasswd, $dbname, $dbport, $prefix_may_exist = false, $load_dbal = true, $unicode_check = true) +{ + global $phpbb_root_path, $phpEx, $config, $lang; + + if ($load_dbal) + { + // Include the DB layer + include($phpbb_root_path . 'includes/db/' . $dbms['DRIVER'] . '.' . $phpEx); + } + + // Instantiate it and set return on error true + $sql_db = 'dbal_' . $dbms['DRIVER']; + $db = new $sql_db(); + $db->sql_return_on_error(true); + + // Check that we actually have a database name before going any further..... + if ($dbms['DRIVER'] != 'sqlite' && $dbname === '') + { + $error[] = $lang['INST_ERR_DB_NO_NAME']; + return false; + } + + // Make sure we don't have a daft user who thinks having the SQLite database in the forum directory is a good idea + if ($dbms['DRIVER'] == 'sqlite' && stripos(phpbb_realpath($dbhost), phpbb_realpath('../')) === 0) + { + $error[] = $lang['INST_ERR_DB_FORUM_PATH']; + return false; + } + + // Check the prefix length to ensure that index names are not too long and does not contain invalid characters + switch ($dbms['DRIVER']) + { + case 'mysql': + case 'mysqli': + if (strpos($table_prefix, '-') !== false) + { + $error[] = $lang['INST_ERR_PREFIX_INVALID']; + return false; + } + + // no break; + + case 'postgres': + $prefix_length = 36; + break; + + case 'mssql': + case 'mssql_odbc': + $prefix_length = 90; + break; + + case 'sqlite': + $prefix_length = 200; + break; + + case 'firebird': + case 'oracle': + $prefix_length = 6; + break; + } + + if (strlen($table_prefix) > $prefix_length) + { + $error[] = sprintf($lang['INST_ERR_PREFIX_TOO_LONG'], $prefix_length); + return false; + } + + // Try and connect ... + if (is_array($db->sql_connect($dbhost, $dbuser, $dbpasswd, $dbname, $dbport, false, true))) + { + $db_error = $db->sql_error(); + $error[] = $lang['INST_ERR_DB_CONNECT'] . '
    ' . (($db_error['message']) ? $db_error['message'] : $lang['INST_ERR_DB_NO_ERROR']); + } + else + { + // Likely matches for an existing phpBB installation + if (!$prefix_may_exist) + { + $temp_prefix = strtolower($table_prefix); + $table_ary = array($temp_prefix . 'attachments', $temp_prefix . 'config', $temp_prefix . 'sessions', $temp_prefix . 'topics', $temp_prefix . 'users'); + + $tables = get_tables($db); + $table_intersect = array_intersect($tables, $table_ary); + + if (sizeof($table_intersect)) + { + $error[] = $lang['INST_ERR_PREFIX']; + } + } + + // Make sure that the user has selected a sensible DBAL for the DBMS actually installed + switch ($dbms['DRIVER']) + { + case 'mysqli': + if (version_compare(mysqli_get_server_info($db->db_connect_id), '4.1.3', '<')) + { + $error[] = $lang['INST_ERR_DB_NO_MYSQLI']; + } + break; + + case 'sqlite': + if (version_compare(sqlite_libversion(), '2.8.2', '<')) + { + $error[] = $lang['INST_ERR_DB_NO_SQLITE']; + } + break; + + case 'firebird': + // check the version of FB, use some hackery if we can't get access to the server info + if ($db->service_handle !== false && function_exists('ibase_server_info')) + { + $val = @ibase_server_info($db->service_handle, IBASE_SVC_SERVER_VERSION); + preg_match('#V([\d.]+)#', $val, $match); + if ($match[1] < 2) + { + $error[] = $lang['INST_ERR_DB_NO_FIREBIRD']; + } + $db_info = @ibase_db_info($db->service_handle, $dbname, IBASE_STS_HDR_PAGES); + + preg_match('/^\\s*Page size\\s*(\\d+)/m', $db_info, $regs); + $page_size = intval($regs[1]); + if ($page_size < 8192) + { + $error[] = $lang['INST_ERR_DB_NO_FIREBIRD_PS']; + } + } + else + { + $sql = "SELECT * + FROM RDB$FUNCTIONS + WHERE RDB$SYSTEM_FLAG IS NULL + AND RDB$FUNCTION_NAME = 'CHAR_LENGTH'"; + $result = $db->sql_query($sql); + $row = $db->sql_fetchrow($result); + $db->sql_freeresult($result); + + // if its a UDF, its too old + if ($row) + { + $error[] = $lang['INST_ERR_DB_NO_FIREBIRD']; + } + else + { + $sql = "SELECT FIRST 0 char_length('') + FROM RDB\$DATABASE"; + $result = $db->sql_query($sql); + if (!$result) // This can only fail if char_length is not defined + { + $error[] = $lang['INST_ERR_DB_NO_FIREBIRD']; + } + $db->sql_freeresult($result); + } + + // Setup the stuff for our random table + $char_array = array_merge(range('A', 'Z'), range('0', '9')); + $char_len = mt_rand(7, 9); + $char_array_len = sizeof($char_array) - 1; + + $final = ''; + + for ($i = 0; $i < $char_len; $i++) + { + $final .= $char_array[mt_rand(0, $char_array_len)]; + } + + // Create some random table + $sql = 'CREATE TABLE ' . $final . " ( + FIELD1 VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE, + FIELD2 INTEGER DEFAULT 0 NOT NULL);"; + $db->sql_query($sql); + + // Create an index that should fail if the page size is less than 8192 + $sql = 'CREATE INDEX ' . $final . ' ON ' . $final . '(FIELD1, FIELD2);'; + $db->sql_query($sql); + + if (ibase_errmsg() !== false) + { + $error[] = $lang['INST_ERR_DB_NO_FIREBIRD_PS']; + } + else + { + // Kill the old table + $db->sql_query('DROP TABLE ' . $final . ';'); + } + unset($final); + } + break; + + case 'oracle': + if ($unicode_check) + { + $sql = "SELECT * + FROM NLS_DATABASE_PARAMETERS + WHERE PARAMETER = 'NLS_RDBMS_VERSION' + OR PARAMETER = 'NLS_CHARACTERSET'"; + $result = $db->sql_query($sql); + + while ($row = $db->sql_fetchrow($result)) + { + $stats[$row['parameter']] = $row['value']; + } + $db->sql_freeresult($result); + + if (version_compare($stats['NLS_RDBMS_VERSION'], '9.2', '<') && $stats['NLS_CHARACTERSET'] !== 'UTF8') + { + $error[] = $lang['INST_ERR_DB_NO_ORACLE']; + } + } + break; + + case 'postgres': + if ($unicode_check) + { + $sql = "SHOW server_encoding;"; + $result = $db->sql_query($sql); + $row = $db->sql_fetchrow($result); + $db->sql_freeresult($result); + + if ($row['server_encoding'] !== 'UNICODE' && $row['server_encoding'] !== 'UTF8') + { + $error[] = $lang['INST_ERR_DB_NO_POSTGRES']; + } + } + break; + } + + } + + if ($error_connect && (!isset($error) || !sizeof($error))) + { + return true; + } + return false; +} + +/** +* remove_remarks will strip the sql comment lines out of an uploaded sql file +*/ +function remove_remarks(&$sql) +{ + $sql = preg_replace('/\n{2,}/', "\n", preg_replace('/^#.*$/m', "\n", $sql)); +} + +/** +* split_sql_file will split an uploaded sql file into single sql statements. +* Note: expects trim() to have already been run on $sql. +*/ +function split_sql_file($sql, $delimiter) +{ + $sql = str_replace("\r" , '', $sql); + $data = preg_split('/' . preg_quote($delimiter, '/') . '$/m', $sql); + + $data = array_map('trim', $data); + + // The empty case + $end_data = end($data); + + if (empty($end_data)) + { + unset($data[key($data)]); + } + + return $data; +} + +/** +* For replacing {L_*} strings with preg_replace_callback +*/ +function adjust_language_keys_callback($matches) +{ + if (!empty($matches[1])) + { + global $lang, $db; + + return (!empty($lang[$matches[1]])) ? $db->sql_escape($lang[$matches[1]]) : $db->sql_escape($matches[1]); + } +} + +?> \ No newline at end of file diff --git a/phpBB/includes/functions_jabber.php b/phpBB/includes/functions_jabber.php index b0a7e09c08..3872346bbc 100644 --- a/phpBB/includes/functions_jabber.php +++ b/phpBB/includes/functions_jabber.php @@ -20,7 +20,7 @@ * last modified: 24.03.2004 13:01:53 * * Modified by phpBB Development Team -* version: v0.4.3a1 +* version: v0.4.3 * * @package phpBB3 */ @@ -59,6 +59,9 @@ class jabber var $connector; + var $version; + var $show_version; + /** * Constructor */ @@ -73,6 +76,9 @@ class jabber $this->enable_logging = true; $this->log_array = array(); + $this->version = '1.0'; + $this->show_version = false; + $this->packet_queue = array(); $this->iq_sleep_timer = $this->delay_disconnect = 1; @@ -85,7 +91,7 @@ class jabber $this->error_codes = array( 400 => 'Bad Request', - 401 => 'Unauthorized', + 401 => 'Unauthorised', 402 => 'Payment Required', 403 => 'Forbidden', 404 => 'Not Found', @@ -113,7 +119,7 @@ class jabber if ($this->connector->open_socket($this->server, $this->port)) { $this->send_packet("\n"); - $this->send_packet("\n"); + $this->send_packet("show_version) ? " version='{$this->version}'" : '') . ">\n"); sleep(2); @@ -890,7 +896,7 @@ class jabber socket_set_blocking($this->connector->active_socket, $meta['blocked']); $this->send_packet("\n"); - $this->send_packet("\n"); + $this->send_packet("show_version) ? " version='{$this->version}'" : '') . ">\n"); sleep(2); if (!$this->_check_connected(true)) diff --git a/phpBB/includes/functions_messenger.php b/phpBB/includes/functions_messenger.php index 755a6d9116..d4052a8968 100644 --- a/phpBB/includes/functions_messenger.php +++ b/phpBB/includes/functions_messenger.php @@ -163,13 +163,12 @@ class messenger } } - if (!($fd = @fopen($tpl_file, 'r'))) + if (($data = @file_get_contents($tpl_file)) === false) { trigger_error("Failed opening template file [ $tpl_file ]", E_USER_ERROR); } - $this->tpl_msg[$template_lang . $template_file] = fread($fd, filesize($tpl_file)); - fclose($fd); + $this->tpl_msg[$template_lang . $template_file] = $data; } $this->msg = $this->tpl_msg[$template_lang . $template_file]; @@ -209,12 +208,12 @@ class messenger $match = array(); if (preg_match('#^(Subject:(.*?))$#m', $this->msg, $match)) { - $this->subject = (trim($match[2]) != '') ? trim($match[2]) : (($this->subject != '') ? $this->subject : $user->lang['NO_SUBJECT']); + $this->subject = (trim($match[2]) != '') ? trim($match[2]) : (($this->subject != '') ? $this->subject : $user->lang['NO_EMAIL_SUBJECT']); $drop_header .= '[\r\n]*?' . preg_quote($match[1], '#'); } else { - $this->subject = (($this->subject != '') ? $this->subject : $user->lang['NO_SUBJECT']); + $this->subject = (($this->subject != '') ? $this->subject : $user->lang['NO_EMAIL_SUBJECT']); } if ($drop_header) @@ -846,7 +845,7 @@ function smtpmail($addresses, $subject, $message, &$err_msg, $headers = '') // From this point onward most server response codes should be 250 // Specify who the mail is from.... - $smtp->server_send('MAIL FROM:<' . $config['board_contact'] . '>'); + $smtp->server_send('MAIL FROM:<' . $config['board_email'] . '>'); if ($err_msg = $smtp->server_parse('250', __LINE__)) { $smtp->close_session($err_msg); @@ -957,11 +956,9 @@ class smtp_class function smtp_class() { - if (defined('DEBUG')) - { - $this->backtrace = true; - $this->backtrace_log = array(); - } + // Always create a backtrace for admins to identify SMTP problems + $this->backtrace = true; + $this->backtrace_log = array(); } /** @@ -971,7 +968,7 @@ class smtp_class { if ($this->backtrace) { - $this->backtrace_log[] = htmlspecialchars($message, ENT_COMPAT, 'UTF-8'); + $this->backtrace_log[] = utf8_htmlspecialchars($message); } } diff --git a/phpBB/includes/functions_module.php b/phpBB/includes/functions_module.php index d45358327f..bbb44d4b3d 100644 --- a/phpBB/includes/functions_module.php +++ b/phpBB/includes/functions_module.php @@ -298,7 +298,7 @@ class p_master break; default: - if (!preg_match('#(?:acl_([a-z_]+)(,\$id)?)|(?:\$id)|(?:aclf_([a-z_]+))|(?:cfg_([a-z_]+))#', $token)) + if (!preg_match('#(?:acl_([a-z_]+)(,\$id)?)|(?:\$id)|(?:aclf_([a-z_]+))|(?:cfg_([a-z_]+))|(?:request_([a-z_]+))#', $token)) { $token = ''; } @@ -314,7 +314,7 @@ class p_master $forum_id = ($forum_id === false) ? $this->acl_forum_id : $forum_id; $is_auth = false; - eval('$is_auth = (int) (' . preg_replace(array('#acl_([a-z_]+)(,\$id)?#', '#\$id#', '#aclf_([a-z_]+)#', '#cfg_([a-z_]+)#'), array('(int) $auth->acl_get(\'\\1\'\\2)', '(int) $forum_id', '(int) $auth->acl_getf_global(\'\\1\')', '(int) $config[\'\\1\']'), $module_auth) . ');'); + eval('$is_auth = (int) (' . preg_replace(array('#acl_([a-z_]+)(,\$id)?#', '#\$id#', '#aclf_([a-z_]+)#', '#cfg_([a-z_]+)#', '#request_([a-z_]+)#'), array('(int) $auth->acl_get(\'\\1\'\\2)', '(int) $forum_id', '(int) $auth->acl_getf_global(\'\\1\')', '(int) $config[\'\\1\']', '!empty($_REQUEST[\'\\1\'])'), $module_auth) . ');'); return $is_auth; } @@ -464,6 +464,53 @@ class p_master } } + /** + * Appending url parameter to the currently active module. + * + * This function is called for adding specific url parameters while executing the current module. + * It is doing the same as the _module_{name}_url() function, apart from being able to be called after + * having dynamically parsed specific parameters. This allows more freedom in choosing additional parameters. + * One example can be seen in /includes/mcp/mcp_notes.php - $this->p_master->adjust_url() call. + * + * @param string $url_extra Extra url parameters, e.g.: &u=$user_id + * + */ + function adjust_url($url_extra) + { + if (empty($this->module_ary[$this->active_module_row_id])) + { + return; + } + + $row = &$this->module_ary[$this->active_module_row_id]; + + // We check for the same url_extra in $row['url_extra'] to overcome doubled additions... + if (strpos($row['url_extra'], $url_extra) === false) + { + $row['url_extra'] .= $url_extra; + } + } + + /** + * Check if a module is active + */ + function is_active($id, $mode = false) + { + // If we find a name by this id and being enabled we have our active one... + foreach ($this->module_ary as $row_id => $item_ary) + { + if (($item_ary['name'] === $id || $item_ary['id'] === (int) $id) && $item_ary['display']) + { + if ($mode === false || $mode === $item_ary['mode']) + { + return true; + } + } + } + + return false; + } + /** * Get parents */ diff --git a/phpBB/includes/functions_posting.php b/phpBB/includes/functions_posting.php index d68aa9f645..64612f4ca3 100644 --- a/phpBB/includes/functions_posting.php +++ b/phpBB/includes/functions_posting.php @@ -64,9 +64,19 @@ function generate_smilies($mode, $forum_id) ORDER BY smiley_order'; $result = $db->sql_query($sql, 3600); + $smilies = array(); while ($row = $db->sql_fetchrow($result)) { - if ($row['smiley_url'] !== $last_url) + if (empty($smilies[$row['smiley_url']])) + { + $smilies[$row['smiley_url']] = $row; + } + } + $db->sql_freeresult($result); + + if (sizeof($smilies)) + { + foreach ($smilies as $row) { $template->assign_block_vars('smiley', array( 'SMILEY_CODE' => $row['code'], @@ -77,9 +87,7 @@ function generate_smilies($mode, $forum_id) 'SMILEY_DESC' => $row['emotion']) ); } - $last_url = $row['smiley_url']; } - $db->sql_freeresult($result); if ($mode == 'inline' && $display_link) { @@ -99,8 +107,9 @@ function generate_smilies($mode, $forum_id) * Update last post information * Should be used instead of sync() if only the last post information are out of sync... faster * -* @param string $type Can be forum|topic -* @param mixed $ids topic/forum ids +* @param string $type Can be forum|topic +* @param mixed $ids topic/forum ids +* @param bool $return_update_sql true: SQL query shall be returned, false: execute SQL */ function update_post_information($type, $ids, $return_update_sql = false) { @@ -113,20 +122,33 @@ function update_post_information($type, $ids, $return_update_sql = false) $update_sql = $empty_forums = $not_empty_forums = array(); - if (sizeof($ids) == 1) + if ($type != 'topic') { - $sql = 'SELECT MAX(post_id) as last_post_id - FROM ' . POSTS_TABLE . ' - WHERE ' . $db->sql_in_set($type . '_id', $ids) . ' - AND post_approved = 1'; + $topic_join = ', ' . TOPICS_TABLE . ' t'; + $topic_condition = 'AND t.topic_id = p.topic_id AND t.topic_approved = 1'; } else { - $sql = 'SELECT ' . $type . '_id, MAX(post_id) as last_post_id - FROM ' . POSTS_TABLE . ' - WHERE ' . $db->sql_in_set($type . '_id', $ids) . " - AND post_approved = 1 - GROUP BY {$type}_id"; + $topic_join = ''; + $topic_condition = ''; + } + + if (sizeof($ids) == 1) + { + $sql = 'SELECT MAX(p.post_id) as last_post_id + FROM ' . POSTS_TABLE . " p $topic_join + WHERE " . $db->sql_in_set('p.' . $type . '_id', $ids) . " + $topic_condition + AND p.post_approved = 1"; + } + else + { + $sql = 'SELECT p.' . $type . '_id, MAX(p.post_id) as last_post_id + FROM ' . POSTS_TABLE . " p $topic_join + WHERE " . $db->sql_in_set('p.' . $type . '_id', $ids) . " + $topic_condition + AND p.post_approved = 1 + GROUP BY p.{$type}_id"; } $result = $db->sql_query($sql); @@ -311,7 +333,7 @@ function posting_gen_topic_types($forum_id, $cur_topic_type = POST_NORMAL) * Upload Attachment - filedata is generated here * Uses upload class */ -function upload_attachment($form_name, $forum_id, $local = false, $local_storage = '', $is_message = false) +function upload_attachment($form_name, $forum_id, $local = false, $local_storage = '', $is_message = false, $local_filedata = false) { global $auth, $user, $config, $db, $cache; global $phpbb_root_path, $phpEx; @@ -341,7 +363,7 @@ function upload_attachment($form_name, $forum_id, $local = false, $local_storage $extensions = $cache->obtain_attach_extensions((($is_message) ? false : (int) $forum_id)); $upload->set_allowed_extensions(array_keys($extensions['_allowed_'])); - $file = ($local) ? $upload->local_upload($local_storage) : $upload->form_upload($form_name); + $file = ($local) ? $upload->local_upload($local_storage, $local_filedata) : $upload->form_upload($form_name); if ($file->init_error) { @@ -358,7 +380,7 @@ function upload_attachment($form_name, $forum_id, $local = false, $local_storage // If this error occurs a user tried to exploit an IE Bug by renaming extensions // Since the image category is displaying content inline we need to catch this. - trigger_error($user->lang['UNABLE_GET_IMAGE_SIZE']); + trigger_error($user->lang['ATTACHED_IMAGE_NOT_IMAGE']); } // Do we have to create a thumbnail? @@ -386,7 +408,11 @@ function upload_attachment($form_name, $forum_id, $local = false, $local_storage } $file->clean_filename('unique', $user->data['user_id'] . '_'); - $file->move_file($config['upload_path']); + + // Are we uploading an image *and* this image being within the image category? Only then perform additional image checks. + $no_image = ($cat_id == ATTACHMENT_CATEGORY_IMAGE) ? false : true; + + $file->move_file($config['upload_path'], false, $no_image); if (sizeof($file->error)) { @@ -552,9 +578,16 @@ function create_thumbnail($source, $destination, $mimetype) return false; } - list($width, $height, $type, ) = @getimagesize($source); + $dimension = @getimagesize($source); - if (!$width || !$height) + if ($dimension === false) + { + return false; + } + + list($width, $height, $type, ) = $dimension; + + if (empty($width) || empty($height)) { return false; } @@ -719,7 +752,7 @@ function posting_gen_attachment_entry($attachment_data, &$filename_data) $hidden .= ''; } - $download_link = append_sid("{$phpbb_root_path}download.$phpEx", 'id=' . (int) $attach_row['attach_id'], false, ($attach_row['is_orphan']) ? $user->session_id : false); + $download_link = append_sid("{$phpbb_root_path}download.$phpEx", 'mode=view&id=' . (int) $attach_row['attach_id'], false, ($attach_row['is_orphan']) ? $user->session_id : false); $template->assign_block_vars('attach_row', array( 'FILENAME' => basename($attach_row['real_filename']), @@ -815,13 +848,20 @@ function load_drafts($topic_id = 0, $forum_id = 0, $id = 0) $link_topic = $link_forum = $link_pm = false; $insert_url = $view_url = $title = ''; - if (isset($topic_rows[$draft['topic_id']]) && $auth->acl_get('f_read', $topic_rows[$draft['topic_id']]['forum_id'])) + if (isset($topic_rows[$draft['topic_id']]) + && ( + ($topic_rows[$draft['topic_id']]['forum_id'] && $auth->acl_get('f_read', $topic_rows[$draft['topic_id']]['forum_id'])) + || + (!$topic_rows[$draft['topic_id']]['forum_id'] && $auth->acl_getf_global('f_read')) + )) { + $topic_forum_id = ($topic_rows[$draft['topic_id']]['forum_id']) ? $topic_rows[$draft['topic_id']]['forum_id'] : $forum_id; + $link_topic = true; - $view_url = append_sid("{$phpbb_root_path}viewtopic.$phpEx", 'f=' . $topic_rows[$draft['topic_id']]['forum_id'] . '&t=' . $draft['topic_id']); + $view_url = append_sid("{$phpbb_root_path}viewtopic.$phpEx", 'f=' . $topic_forum_id . '&t=' . $draft['topic_id']); $title = $topic_rows[$draft['topic_id']]['topic_title']; - $insert_url = append_sid("{$phpbb_root_path}posting.$phpEx", 'f=' . $topic_rows[$draft['topic_id']]['forum_id'] . '&t=' . $draft['topic_id'] . '&mode=reply&d=' . $draft['draft_id']); + $insert_url = append_sid("{$phpbb_root_path}posting.$phpEx", 'f=' . $topic_forum_id . '&t=' . $draft['topic_id'] . '&mode=reply&d=' . $draft['draft_id']); } else if ($draft['forum_id'] && $auth->acl_get('f_read', $draft['forum_id'])) { @@ -859,32 +899,59 @@ function load_drafts($topic_id = 0, $forum_id = 0, $id = 0) */ function topic_review($topic_id, $forum_id, $mode = 'topic_review', $cur_post_id = 0, $show_quote_button = true) { - global $user, $auth, $db, $template, $bbcode; + global $user, $auth, $db, $template, $bbcode, $cache; global $config, $phpbb_root_path, $phpEx; // Go ahead and pull all data for this topic - $sql = 'SELECT u.username, u.user_id, u.user_colour, p.* - FROM ' . POSTS_TABLE . ' p, ' . USERS_TABLE . " u + $sql = 'SELECT p.post_id + FROM ' . POSTS_TABLE . ' p' . " WHERE p.topic_id = $topic_id - AND p.poster_id = u.user_id " . ((!$auth->acl_get('m_approve', $forum_id)) ? 'AND p.post_approved = 1' : '') . ' ' . (($mode == 'post_review') ? " AND p.post_id > $cur_post_id" : '') . ' ORDER BY p.post_time DESC'; $result = $db->sql_query_limit($sql, $config['posts_per_page']); - if (!$row = $db->sql_fetchrow($result)) + $post_list = array(); + + while ($row = $db->sql_fetchrow($result)) + { + $post_list[] = $row['post_id']; + } + + $db->sql_freeresult($result); + + if (!sizeof($post_list)) { - $db->sql_freeresult($result); return false; } + $sql = $db->sql_build_query('SELECT', array( + 'SELECT' => 'u.username, u.user_id, u.user_colour, p.*', + + 'FROM' => array( + USERS_TABLE => 'u', + POSTS_TABLE => 'p', + ), + + 'WHERE' => $db->sql_in_set('p.post_id', $post_list) . ' + AND u.user_id = p.poster_id' + )); + + $result = $db->sql_query($sql); + $bbcode_bitfield = ''; - do + $rowset = array(); + $has_attachments = false; + while ($row = $db->sql_fetchrow($result)) { - $rowset[] = $row; + $rowset[$row['post_id']] = $row; $bbcode_bitfield = $bbcode_bitfield | base64_decode($row['bbcode_bitfield']); + + if ($row['post_attachment']) + { + $has_attachments = true; + } } - while ($row = $db->sql_fetchrow($result)); $db->sql_freeresult($result); // Instantiate BBCode class @@ -894,12 +961,41 @@ function topic_review($topic_id, $forum_id, $mode = 'topic_review', $cur_post_id $bbcode = new bbcode(base64_encode($bbcode_bitfield)); } - foreach ($rowset as $i => $row) + // Grab extensions + $extensions = $attachments = array(); + if ($has_attachments && $auth->acl_get('u_download') && $auth->acl_get('f_download', $forum_id)) { + $extensions = $cache->obtain_attach_extensions($forum_id); + + // Get attachments... + $sql = 'SELECT * + FROM ' . ATTACHMENTS_TABLE . ' + WHERE ' . $db->sql_in_set('post_msg_id', $post_list) . ' + AND in_message = 0 + ORDER BY filetime DESC, post_msg_id ASC'; + $result = $db->sql_query($sql); + + while ($row = $db->sql_fetchrow($result)) + { + $attachments[$row['post_msg_id']][] = $row; + } + $db->sql_freeresult($result); + } + + for ($i = 0, $end = sizeof($post_list); $i < $end; ++$i) + { + // A non-existing rowset only happens if there was no user present for the entered poster_id + // This could be a broken posts table. + if (!isset($rowset[$post_list[$i]])) + { + continue; + } + + $row =& $rowset[$post_list[$i]]; + $poster_id = $row['user_id']; $post_subject = $row['post_subject']; $message = censor_text($row['post_text']); - $message = str_replace("\n", '
    ', $message); $decoded_message = false; @@ -917,8 +1013,16 @@ function topic_review($topic_id, $forum_id, $mode = 'topic_review', $cur_post_id $bbcode->bbcode_second_pass($message, $row['bbcode_uid'], $row['bbcode_bitfield']); } + $message = str_replace("\n", '
    ', $message); + $message = smiley_text($message, !$row['enable_smilies']); + if (!empty($attachments[$row['post_id']])) + { + $update_count = array(); + parse_attachments($forum_id, $message, $attachments[$row['post_id']], $update_count); + } + $post_subject = censor_text($post_subject); $template->assign_block_vars($mode . '_row', array( @@ -927,16 +1031,30 @@ function topic_review($topic_id, $forum_id, $mode = 'topic_review', $cur_post_id 'POST_AUTHOR' => get_username_string('username', $poster_id, $row['username'], $row['user_colour'], $row['post_username']), 'U_POST_AUTHOR' => get_username_string('profile', $poster_id, $row['username'], $row['user_colour'], $row['post_username']), + 'S_HAS_ATTACHMENTS' => (!empty($attachments[$row['post_id']])) ? true : false, + 'POST_SUBJECT' => $post_subject, 'MINI_POST_IMG' => $user->img('icon_post_target', $user->lang['POST']), 'POST_DATE' => $user->format_date($row['post_time']), 'MESSAGE' => $message, 'DECODED_MESSAGE' => $decoded_message, - 'U_POST_ID' => $row['post_id'], + 'POST_ID' => $row['post_id'], 'U_MINI_POST' => append_sid("{$phpbb_root_path}viewtopic.$phpEx", 'p=' . $row['post_id']) . '#p' . $row['post_id'], 'U_MCP_DETAILS' => ($auth->acl_get('m_info', $forum_id)) ? append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=main&mode=post_details&f=' . $forum_id . '&p=' . $row['post_id'], true, $user->session_id) : '', 'POSTER_QUOTE' => ($show_quote_button && $auth->acl_get('f_reply', $forum_id)) ? addslashes(get_username_string('username', $poster_id, $row['username'], $row['user_colour'], $row['post_username'])) : '') ); + + // Display not already displayed Attachments for this post, we already parsed them. ;) + if (!empty($attachments[$row['post_id']])) + { + foreach ($attachments[$row['post_id']] as $attachment) + { + $template->assign_block_vars($mode . '_row.attachment', array( + 'DISPLAY_ATTACHMENT' => $attachment) + ); + } + } + unset($rowset[$i]); } @@ -1151,7 +1269,7 @@ function user_notification($mode, $subject, $topic_title, $forum_name, $forum_id $db->sql_query($sql); } - // Now delete the user_ids not authorized to receive notifications on this topic/forum + // Now delete the user_ids not authorised to receive notifications on this topic/forum if (!empty($delete_ids['topic'])) { $sql = 'DELETE FROM ' . TOPICS_WATCH_TABLE . " @@ -1241,6 +1359,8 @@ function delete_post($forum_id, $topic_id, $post_id, &$data) } $sql_data[TOPICS_TABLE] = 'topic_first_post_id = ' . intval($row['post_id']) . ", topic_first_poster_colour = '" . $db->sql_escape($row['user_colour']) . "', topic_first_poster_name = '" . (($row['poster_id'] == ANONYMOUS) ? $db->sql_escape($row['post_username']) : $db->sql_escape($row['username'])) . "'"; + + // Decrementing topic_replies here is fine because this case only happens if there is more than one post within the topic - basically removing one "reply" $sql_data[TOPICS_TABLE] .= ', topic_replies_real = topic_replies_real - 1' . (($data['post_approved']) ? ', topic_replies = topic_replies - 1' : ''); $next_post_id = (int) $row['post_id']; @@ -1320,8 +1440,6 @@ function delete_post($forum_id, $topic_id, $post_id, &$data) } } - $db->sql_transaction('commit'); - // Adjust posted info for this user by looking for a post by him/her within this topic... if ($post_mode != 'delete_topic' && $config['load_db_track'] && $data['poster_id'] != ANONYMOUS) { @@ -1343,6 +1461,8 @@ function delete_post($forum_id, $topic_id, $post_id, &$data) } } + $db->sql_transaction('commit'); + if ($data['post_reported'] && ($post_mode != 'delete_topic')) { sync('topic_reported', 'topic_id', array($topic_id)); @@ -1378,18 +1498,37 @@ function submit_post($mode, $subject, $username, $topic_type, &$poll, &$data, $u } else if ($mode == 'edit') { - $post_mode = ($data['topic_first_post_id'] == $data['topic_last_post_id']) ? 'edit_topic' : (($data['topic_first_post_id'] == $data['post_id']) ? 'edit_first_post' : (($data['topic_last_post_id'] == $data['post_id']) ? 'edit_last_post' : 'edit')); + $post_mode = ($data['topic_replies_real'] == 0) ? 'edit_topic' : (($data['topic_first_post_id'] == $data['post_id']) ? 'edit_first_post' : (($data['topic_last_post_id'] == $data['post_id']) ? 'edit_last_post' : 'edit')); } // First of all make sure the subject and topic title are having the correct length. - // To achive this without cutting off between special chars we convert to an array and then count the elements. + // To achieve this without cutting off between special chars we convert to an array and then count the elements. $subject = truncate_string($subject); $data['topic_title'] = truncate_string($data['topic_title']); // Collect some basic information about which tables and which rows to update/insert - $sql_data = array(); + $sql_data = $topic_row = array(); $poster_id = ($mode == 'edit') ? $data['poster_id'] : (int) $user->data['user_id']; + // Retrieve some additional information if not present + if ($mode == 'edit' && (!isset($data['post_approved']) || !isset($data['topic_approved']) || $data['post_approved'] === false || $data['topic_approved'] === false)) + { + $sql = 'SELECT p.post_approved, t.topic_type, t.topic_replies, t.topic_replies_real, t.topic_approved + FROM ' . TOPICS_TABLE . ' t, ' . POSTS_TABLE . ' p + WHERE t.topic_id = p.topic_id + AND p.post_id = ' . $data['post_id']; + $result = $db->sql_query($sql); + $topic_row = $db->sql_fetchrow($result); + $db->sql_freeresult($result); + + $data['topic_approved'] = $topic_row['topic_approved']; + $data['post_approved'] = $topic_row['post_approved']; + } + + // Start the transaction here + $db->sql_transaction('begin'); + + // Collect Information switch ($post_mode) { @@ -1421,27 +1560,33 @@ function submit_post($mode, $subject, $username, $topic_type, &$poll, &$data, $u case 'edit_first_post': case 'edit': - if (!$auth->acl_get('m_edit', $data['forum_id']) || $data['post_edit_reason']) + case 'edit_last_post': + case 'edit_topic': + + // If edit reason is given always display edit info + + // If editing last post then display no edit info + // If m_edit permission then display no edit info + // If normal edit display edit info + + // Display edit info if edit reason given or user is editing his post, which is not the last within the topic. + if ($data['post_edit_reason'] || (!$auth->acl_get('m_edit', $data['forum_id']) && ($post_mode == 'edit' || $post_mode == 'edit_first_post'))) { $sql_data[POSTS_TABLE]['sql'] = array( - 'post_edit_time' => $current_time + 'post_edit_time' => $current_time, + 'post_edit_reason' => $data['post_edit_reason'], + 'post_edit_user' => (int) $data['post_edit_user'], ); $sql_data[POSTS_TABLE]['stat'][] = 'post_edit_count = post_edit_count + 1'; } - // no break - - case 'edit_last_post': - case 'edit_topic': - - if (($post_mode == 'edit_last_post' || $post_mode == 'edit_topic') && $data['post_edit_reason']) + // If the person editing this post is different to the one having posted then we will add a log entry stating the edit + // Could be simplified by only adding to the log if the edit is not tracked - but this may confuse admins/mods + if ($user->data['user_id'] != $poster_id) { - $sql_data[POSTS_TABLE]['sql'] = array( - 'post_edit_time' => $current_time - ); - - $sql_data[POSTS_TABLE]['stat'][] = 'post_edit_count = post_edit_count + 1'; + $log_subject = ($subject) ? $subject : $data['topic_title']; + add_log('mod', $data['forum_id'], $data['topic_id'], 'LOG_POST_EDITED', $log_subject, (!empty($username)) ? $username : $user->lang['GUEST']); } if (!isset($sql_data[POSTS_TABLE]['sql'])) @@ -1453,15 +1598,13 @@ function submit_post($mode, $subject, $username, $topic_type, &$poll, &$data, $u 'forum_id' => ($topic_type == POST_GLOBAL) ? 0 : $data['forum_id'], 'poster_id' => $data['poster_id'], 'icon_id' => $data['icon_id'], - 'post_approved' => (!$auth->acl_get('f_noapprove', $data['forum_id']) && !$auth->acl_get('m_approve', $data['forum_id'])) ? 0 : 1, + 'post_approved' => (!$auth->acl_get('f_noapprove', $data['forum_id']) && !$auth->acl_get('m_approve', $data['forum_id'])) ? 0 : $data['post_approved'], 'enable_bbcode' => $data['enable_bbcode'], 'enable_smilies' => $data['enable_smilies'], 'enable_magic_url' => $data['enable_urls'], 'enable_sig' => $data['enable_sig'], 'post_username' => ($username && $data['poster_id'] == ANONYMOUS) ? $username : '', 'post_subject' => $subject, - 'post_edit_reason' => $data['post_edit_reason'], - 'post_edit_user' => (int) $data['post_edit_user'], 'post_checksum' => $data['message_md5'], 'post_attachment' => (!empty($data['attachment_data'])) ? 1 : 0, 'bbcode_bitfield' => $data['bbcode_bitfield'], @@ -1477,6 +1620,9 @@ function submit_post($mode, $subject, $username, $topic_type, &$poll, &$data, $u break; } + $post_approved = $sql_data[POSTS_TABLE]['sql']['post_approved']; + $topic_row = array(); + // And the topic ladies and gentlemen switch ($post_mode) { @@ -1519,7 +1665,8 @@ function submit_post($mode, $subject, $username, $topic_type, &$poll, &$data, $u break; case 'reply': - $sql_data[TOPICS_TABLE]['stat'][] = 'topic_replies_real = topic_replies_real + 1, topic_bumped = 0, topic_bumper = 0' . (($auth->acl_get('f_noapprove', $data['forum_id']) || $auth->acl_get('m_approve', $data['forum_id'])) ? ', topic_replies = topic_replies + 1' : ''); + $sql_data[TOPICS_TABLE]['stat'][] = 'topic_replies_real = topic_replies_real + 1, topic_bumped = 0, topic_bumper = 0' . (($auth->acl_get('f_noapprove', $data['forum_id']) || $auth->acl_get('m_approve', $data['forum_id'])) ? ', topic_replies = topic_replies + 1' : '') . ((!empty($data['attachment_data']) || (isset($data['topic_attachment']) && $data['topic_attachment'])) ? ', topic_attachment = 1' : ''); + $sql_data[USERS_TABLE]['stat'][] = "user_lastpost_time = $current_time" . (($auth->acl_get('f_postcount', $data['forum_id'])) ? ', user_posts = user_posts + 1' : ''); if (($auth->acl_get('f_noapprove', $data['forum_id']) || $auth->acl_get('m_approve', $data['forum_id'])) && $topic_type != POST_GLOBAL) @@ -1534,7 +1681,7 @@ function submit_post($mode, $subject, $username, $topic_type, &$poll, &$data, $u $sql_data[TOPICS_TABLE]['sql'] = array( 'forum_id' => ($topic_type == POST_GLOBAL) ? 0 : $data['forum_id'], 'icon_id' => $data['icon_id'], - 'topic_approved' => (!$auth->acl_get('f_noapprove', $data['forum_id']) && !$auth->acl_get('m_approve', $data['forum_id'])) ? 0 : 1, + 'topic_approved' => (!$auth->acl_get('f_noapprove', $data['forum_id']) && !$auth->acl_get('m_approve', $data['forum_id'])) ? 0 : $data['topic_approved'], 'topic_title' => $subject, 'topic_first_poster_name' => $username, 'topic_type' => $topic_type, @@ -1547,11 +1694,49 @@ function submit_post($mode, $subject, $username, $topic_type, &$poll, &$data, $u 'topic_attachment' => (!empty($data['attachment_data'])) ? 1 : (isset($data['topic_attachment']) ? $data['topic_attachment'] : 0), ); + + // Correctly set back the topic replies and forum posts... only if the topic was approved before and now gets disapproved + if (!$auth->acl_get('f_noapprove', $data['forum_id']) && !$auth->acl_get('m_approve', $data['forum_id']) && $data['topic_approved']) + { + // Do we need to grab some topic informations? + if (!sizeof($topic_row)) + { + $sql = 'SELECT topic_type, topic_replies, topic_replies_real, topic_approved + FROM ' . TOPICS_TABLE . ' + WHERE topic_id = ' . $data['topic_id']; + $result = $db->sql_query($sql); + $topic_row = $db->sql_fetchrow($result); + $db->sql_freeresult($result); + } + + // If this is the only post remaining we do not need to decrement topic_replies. + // Also do not decrement if first post - then the topic_replies will not be adjusted if approving the topic again. + + // If this is an edited topic or the first post the topic gets completely disapproved later on... + $sql_data[FORUMS_TABLE]['stat'][] = 'forum_topics = forum_topics - 1'; + $sql_data[FORUMS_TABLE]['stat'][] = 'forum_posts = forum_posts - ' . ($topic_row['topic_replies'] + 1); + + set_config('num_topics', $config['num_topics'] - 1, true); + set_config('num_posts', $config['num_posts'] - ($topic_row['topic_replies'] + 1), true); + } + + break; + + case 'edit': + case 'edit_last_post': + + // Correctly set back the topic replies and forum posts... but only if the post was approved before. + if (!$auth->acl_get('f_noapprove', $data['forum_id']) && !$auth->acl_get('m_approve', $data['forum_id']) && $data['post_approved']) + { + $sql_data[TOPICS_TABLE]['stat'][] = 'topic_replies = topic_replies - 1'; + $sql_data[FORUMS_TABLE]['stat'][] = 'forum_posts = forum_posts - 1'; + + set_config('num_posts', $config['num_posts'] - 1, true); + } + break; } - $db->sql_transaction('begin'); - // Submit new topic if ($post_mode == 'post') { @@ -1584,11 +1769,11 @@ function submit_post($mode, $subject, $username, $topic_type, &$poll, &$data, $u if ($post_mode == 'post') { $sql_data[TOPICS_TABLE]['sql'] = array( - 'topic_first_post_id' => $data['post_id'], - 'topic_last_post_id' => $data['post_id'], - 'topic_last_post_time' => $current_time, - 'topic_last_poster_id' => (int) $user->data['user_id'], - 'topic_last_poster_name'=> (!$user->data['is_registered'] && $username) ? $username : (($user->data['user_id'] != ANONYMOUS) ? $user->data['username'] : ''), + 'topic_first_post_id' => $data['post_id'], + 'topic_last_post_id' => $data['post_id'], + 'topic_last_post_time' => $current_time, + 'topic_last_poster_id' => (int) $user->data['user_id'], + 'topic_last_poster_name' => (!$user->data['is_registered'] && $username) ? $username : (($user->data['user_id'] != ANONYMOUS) ? $user->data['username'] : ''), 'topic_last_poster_colour' => (($user->data['user_id'] != ANONYMOUS) ? $user->data['user_colour'] : ''), ); } @@ -1601,22 +1786,34 @@ function submit_post($mode, $subject, $username, $topic_type, &$poll, &$data, $u // Are we globalising or unglobalising? if ($post_mode == 'edit_first_post' || $post_mode == 'edit_topic') { - $sql = 'SELECT topic_type, topic_replies_real, topic_approved - FROM ' . TOPICS_TABLE . ' - WHERE topic_id = ' . $data['topic_id']; - $result = $db->sql_query($sql); - $row = $db->sql_fetchrow($result); - $db->sql_freeresult($result); - - // globalise - if ($row['topic_type'] != POST_GLOBAL && $topic_type == POST_GLOBAL) + if (!sizeof($topic_row)) { - // Decrement topic/post count + $sql = 'SELECT topic_type, topic_replies, topic_replies_real, topic_approved, topic_last_post_id + FROM ' . TOPICS_TABLE . ' + WHERE topic_id = ' . $data['topic_id']; + $result = $db->sql_query($sql); + $topic_row = $db->sql_fetchrow($result); + $db->sql_freeresult($result); + } + + // globalise/unglobalise? + if (($topic_row['topic_type'] != POST_GLOBAL && $topic_type == POST_GLOBAL) || ($topic_row['topic_type'] == POST_GLOBAL && $topic_type != POST_GLOBAL)) + { + if (!empty($sql_data[FORUMS_TABLE]['stat']) && implode('', $sql_data[FORUMS_TABLE]['stat'])) + { + $db->sql_query('UPDATE ' . FORUMS_TABLE . ' SET ' . implode(', ', $sql_data[FORUMS_TABLE]['stat']) . ' WHERE forum_id = ' . $data['forum_id']); + } + $make_global = true; $sql_data[FORUMS_TABLE]['stat'] = array(); + } - $sql_data[FORUMS_TABLE]['stat'][] = 'forum_posts = forum_posts - ' . ($row['topic_replies_real'] + 1); - $sql_data[FORUMS_TABLE]['stat'][] = 'forum_topics_real = forum_topics_real - 1' . (($row['topic_approved']) ? ', forum_topics = forum_topics - 1' : ''); + // globalise + if ($topic_row['topic_type'] != POST_GLOBAL && $topic_type == POST_GLOBAL) + { + // Decrement topic/post count + $sql_data[FORUMS_TABLE]['stat'][] = 'forum_posts = forum_posts - ' . ($topic_row['topic_replies_real'] + 1); + $sql_data[FORUMS_TABLE]['stat'][] = 'forum_topics_real = forum_topics_real - 1' . (($topic_row['topic_approved']) ? ', forum_topics = forum_topics - 1' : ''); // Update forum_ids for all posts $sql = 'UPDATE ' . POSTS_TABLE . ' @@ -1625,14 +1822,11 @@ function submit_post($mode, $subject, $username, $topic_type, &$poll, &$data, $u $db->sql_query($sql); } // unglobalise - else if ($row['topic_type'] == POST_GLOBAL && $topic_type != POST_GLOBAL) + else if ($topic_row['topic_type'] == POST_GLOBAL && $topic_type != POST_GLOBAL) { // Increment topic/post count - $make_global = true; - $sql_data[FORUMS_TABLE]['stat'] = array(); - - $sql_data[FORUMS_TABLE]['stat'][] = 'forum_posts = forum_posts + ' . ($row['topic_replies_real'] + 1); - $sql_data[FORUMS_TABLE]['stat'][] = 'forum_topics_real = forum_topics_real + 1' . (($row['topic_approved']) ? ', forum_topics = forum_topics + 1' : ''); + $sql_data[FORUMS_TABLE]['stat'][] = 'forum_posts = forum_posts + ' . ($topic_row['topic_replies_real'] + 1); + $sql_data[FORUMS_TABLE]['stat'][] = 'forum_topics_real = forum_topics_real + 1' . (($topic_row['topic_approved']) ? ', forum_topics = forum_topics + 1' : ''); // Update forum_ids for all posts $sql = 'UPDATE ' . POSTS_TABLE . ' @@ -1667,7 +1861,8 @@ function submit_post($mode, $subject, $username, $topic_type, &$poll, &$data, $u if ($poll['poll_start'] && $mode == 'edit') { - $sql = 'SELECT * FROM ' . POLL_OPTIONS_TABLE . ' + $sql = 'SELECT * + FROM ' . POLL_OPTIONS_TABLE . ' WHERE topic_id = ' . $data['topic_id'] . ' ORDER BY poll_option_id'; $result = $db->sql_query($sql); @@ -1687,18 +1882,19 @@ function submit_post($mode, $subject, $username, $topic_type, &$poll, &$data, $u { if (empty($cur_poll_options[$i])) { + // If we add options we need to put them to the end to be able to preserve votes... $sql_insert_ary[] = array( - 'poll_option_id' => (int) $i, + 'poll_option_id' => (int) sizeof($cur_poll_options) + 1 + sizeof($sql_insert_ary), 'topic_id' => (int) $data['topic_id'], 'poll_option_text' => (string) $poll['poll_options'][$i] ); } else if ($poll['poll_options'][$i] != $cur_poll_options[$i]) { - $sql = "UPDATE " . POLL_OPTIONS_TABLE . " + $sql = 'UPDATE ' . POLL_OPTIONS_TABLE . " SET poll_option_text = '" . $db->sql_escape($poll['poll_options'][$i]) . "' - WHERE poll_option_id = " . $cur_poll_options[$i]['poll_option_id'] . " - AND topic_id = " . $data['topic_id']; + WHERE poll_option_id = " . $cur_poll_options[$i]['poll_option_id'] . ' + AND topic_id = ' . $data['topic_id']; $db->sql_query($sql); } } @@ -1713,6 +1909,13 @@ function submit_post($mode, $subject, $username, $topic_type, &$poll, &$data, $u AND topic_id = ' . $data['topic_id']; $db->sql_query($sql); } + + // If edited, we would need to reset votes (since options can be re-ordered above, you can't be sure if the change is for changing the text or adding an option + if ($mode == 'edit' && sizeof($poll['poll_options']) != sizeof($cur_poll_options)) + { + $db->sql_query('DELETE FROM ' . POLL_VOTES_TABLE . ' WHERE topic_id = ' . $data['topic_id']); + $db->sql_query('UPDATE ' . POLL_OPTIONS_TABLE . ' SET poll_option_total = 0 WHERE topic_id = ' . $data['topic_id']); + } } // Submit Attachments @@ -1793,41 +1996,209 @@ function submit_post($mode, $subject, $username, $topic_type, &$poll, &$data, $u } } - $db->sql_transaction('commit'); - - if ($post_mode == 'post' || $post_mode == 'reply' || $post_mode == 'edit_last_post') + // we need to update the last forum information + // only applicable if the topic is not global and it is approved + // we also check to make sure we are not dealing with globaling the latest topic (pretty rare but still needs to be checked) + if ($topic_type != POST_GLOBAL && !$make_global && ($post_approved || !$data['post_approved'])) { - if ($topic_type != POST_GLOBAL) + // the last post makes us update the forum table. This can happen if... + // We make a new topic + // We reply to a topic + // We edit the last post in a topic and this post is the latest in the forum (maybe) + if (($post_mode == 'post' || $post_mode == 'reply') && $post_approved) { - $update_sql = update_post_information('forum', $data['forum_id'], true); - if (sizeof($update_sql)) + $sql_data[FORUMS_TABLE]['stat'][] = 'forum_last_post_id = ' . $data['post_id']; + $sql_data[FORUMS_TABLE]['stat'][] = "forum_last_post_subject = '" . $db->sql_escape($subject) . "'"; + $sql_data[FORUMS_TABLE]['stat'][] = 'forum_last_post_time = ' . $current_time; + $sql_data[FORUMS_TABLE]['stat'][] = 'forum_last_poster_id = ' . (int) $user->data['user_id']; + $sql_data[FORUMS_TABLE]['stat'][] = "forum_last_poster_name = '" . $db->sql_escape((!$user->data['is_registered'] && $username) ? $username : (($user->data['user_id'] != ANONYMOUS) ? $user->data['username'] : '')) . "'"; + $sql_data[FORUMS_TABLE]['stat'][] = "forum_last_poster_colour = '" . (($user->data['user_id'] != ANONYMOUS) ? $db->sql_escape($user->data['user_colour']) : '') . "'"; + } + else if ($post_mode == 'edit_last_post') + { + // edit_last_post does not _necessarily_ mean that we must update the info again, + // it just means that we might have to + $sql = 'SELECT forum_last_post_id, forum_last_post_subject + FROM ' . FORUMS_TABLE . ' + WHERE forum_id = ' . (int) $data['forum_id']; + $result = $db->sql_query($sql); + $row = $db->sql_fetchrow($result); + $db->sql_freeresult($result); + + // this post is the last post in the forum, better update + if ($row['forum_last_post_id'] == $data['post_id']) { - $sql_data[FORUMS_TABLE]['stat'][] = implode(', ', $update_sql[$data['forum_id']]); + if ($post_approved && $row['forum_last_post_subject'] !== $subject) + { + // the only data that can really be changed is the post's subject + $sql_data[FORUMS_TABLE]['stat'][] = 'forum_last_post_subject = \'' . $db->sql_escape($subject) . '\''; + } + else if ($data['post_approved'] !== $post_approved) + { + // we need a fresh change of socks, everything has become invalidated + $sql = 'SELECT MAX(topic_last_post_id) as last_post_id + FROM ' . TOPICS_TABLE . ' + WHERE forum_id = ' . (int) $data['forum_id'] . ' + AND topic_approved = 1'; + $result = $db->sql_query($sql); + $row = $db->sql_fetchrow($result); + $db->sql_freeresult($result); + + // any posts left in this forum? + if (!empty($row['last_post_id'])) + { + $sql = 'SELECT p.post_id, p.post_subject, p.post_time, p.poster_id, p.post_username, u.user_id, u.username, u.user_colour + FROM ' . POSTS_TABLE . ' p, ' . USERS_TABLE . ' u + WHERE p.poster_id = u.user_id + AND p.post_id = ' . (int) $row['last_post_id']; + $result = $db->sql_query($sql); + $row = $db->sql_fetchrow($result); + $db->sql_freeresult($result); + + // salvation, a post is found! jam it into the forums table + $sql_data[FORUMS_TABLE]['stat'][] = 'forum_last_post_id = ' . (int) $row['post_id']; + $sql_data[FORUMS_TABLE]['stat'][] = "forum_last_post_subject = '" . $db->sql_escape($row['post_subject']) . "'"; + $sql_data[FORUMS_TABLE]['stat'][] = 'forum_last_post_time = ' . (int) $row['post_time']; + $sql_data[FORUMS_TABLE]['stat'][] = 'forum_last_poster_id = ' . (int) $row['poster_id']; + $sql_data[FORUMS_TABLE]['stat'][] = "forum_last_poster_name = '" . $db->sql_escape(($row['poster_id'] == ANONYMOUS) ? $row['post_username'] : $row['username']) . "'"; + $sql_data[FORUMS_TABLE]['stat'][] = "forum_last_poster_colour = '" . $db->sql_escape($row['user_colour']) . "'"; + } + else + { + // just our luck, the last topic in the forum has just been globalized... + $sql_data[FORUMS_TABLE]['stat'][] = 'forum_last_post_id = 0'; + $sql_data[FORUMS_TABLE]['stat'][] = "forum_last_post_subject = ''"; + $sql_data[FORUMS_TABLE]['stat'][] = 'forum_last_post_time = 0'; + $sql_data[FORUMS_TABLE]['stat'][] = 'forum_last_poster_id = 0'; + $sql_data[FORUMS_TABLE]['stat'][] = "forum_last_poster_name = ''"; + $sql_data[FORUMS_TABLE]['stat'][] = "forum_last_poster_colour = ''"; + } + } } } + } + else if ($make_global) + { + // somebody decided to be a party pooper, we must recalculate the whole shebang (maybe) + $sql = 'SELECT forum_last_post_id + FROM ' . FORUMS_TABLE . ' + WHERE forum_id = ' . (int) $data['forum_id']; + $result = $db->sql_query($sql); + $forum_row = $db->sql_fetchrow($result); + $db->sql_freeresult($result); - $update_sql = update_post_information('topic', $data['topic_id'], true); - if (sizeof($update_sql)) + // we made a topic global, go get new data + if ($topic_row['topic_type'] != POST_GLOBAL && $topic_type == POST_GLOBAL && $forum_row['forum_last_post_id'] == $topic_row['topic_last_post_id']) { - $sql_data[TOPICS_TABLE]['stat'][] = implode(', ', $update_sql[$data['topic_id']]); + // we need a fresh change of socks, everything has become invalidated + $sql = 'SELECT MAX(topic_last_post_id) as last_post_id + FROM ' . TOPICS_TABLE . ' + WHERE forum_id = ' . (int) $data['forum_id'] . ' + AND topic_approved = 1'; + $result = $db->sql_query($sql); + $row = $db->sql_fetchrow($result); + $db->sql_freeresult($result); + + // any posts left in this forum? + if (!empty($row['last_post_id'])) + { + $sql = 'SELECT p.post_id, p.post_subject, p.post_time, p.poster_id, p.post_username, u.user_id, u.username, u.user_colour + FROM ' . POSTS_TABLE . ' p, ' . USERS_TABLE . ' u + WHERE p.poster_id = u.user_id + AND p.post_id = ' . (int) $row['last_post_id']; + $result = $db->sql_query($sql); + $row = $db->sql_fetchrow($result); + $db->sql_freeresult($result); + + // salvation, a post is found! jam it into the forums table + $sql_data[FORUMS_TABLE]['stat'][] = 'forum_last_post_id = ' . (int) $row['post_id']; + $sql_data[FORUMS_TABLE]['stat'][] = "forum_last_post_subject = '" . $db->sql_escape($row['post_subject']) . "'"; + $sql_data[FORUMS_TABLE]['stat'][] = 'forum_last_post_time = ' . (int) $row['post_time']; + $sql_data[FORUMS_TABLE]['stat'][] = 'forum_last_poster_id = ' . (int) $row['poster_id']; + $sql_data[FORUMS_TABLE]['stat'][] = "forum_last_poster_name = '" . $db->sql_escape(($row['poster_id'] == ANONYMOUS) ? $row['post_username'] : $row['username']) . "'"; + $sql_data[FORUMS_TABLE]['stat'][] = "forum_last_poster_colour = '" . $db->sql_escape($row['user_colour']) . "'"; + } + else + { + // just our luck, the last topic in the forum has just been globalized... + $sql_data[FORUMS_TABLE]['stat'][] = 'forum_last_post_id = 0'; + $sql_data[FORUMS_TABLE]['stat'][] = "forum_last_post_subject = ''"; + $sql_data[FORUMS_TABLE]['stat'][] = 'forum_last_post_time = 0'; + $sql_data[FORUMS_TABLE]['stat'][] = 'forum_last_poster_id = 0'; + $sql_data[FORUMS_TABLE]['stat'][] = "forum_last_poster_name = ''"; + $sql_data[FORUMS_TABLE]['stat'][] = "forum_last_poster_colour = ''"; + } + } + else if ($topic_row['topic_type'] == POST_GLOBAL && $topic_type != POST_GLOBAL && $forum_row['forum_last_post_id'] < $topic_row['topic_last_post_id']) + { + // this post has a higher id, it is newer + $sql = 'SELECT p.post_id, p.post_subject, p.post_time, p.poster_id, p.post_username, u.user_id, u.username, u.user_colour + FROM ' . POSTS_TABLE . ' p, ' . USERS_TABLE . ' u + WHERE p.poster_id = u.user_id + AND p.post_id = ' . (int) $topic_row['topic_last_post_id']; + $result = $db->sql_query($sql); + $row = $db->sql_fetchrow($result); + $db->sql_freeresult($result); + + // salvation, a post is found! jam it into the forums table + $sql_data[FORUMS_TABLE]['stat'][] = 'forum_last_post_id = ' . (int) $row['post_id']; + $sql_data[FORUMS_TABLE]['stat'][] = "forum_last_post_subject = '" . $db->sql_escape($row['post_subject']) . "'"; + $sql_data[FORUMS_TABLE]['stat'][] = 'forum_last_post_time = ' . (int) $row['post_time']; + $sql_data[FORUMS_TABLE]['stat'][] = 'forum_last_poster_id = ' . (int) $row['poster_id']; + $sql_data[FORUMS_TABLE]['stat'][] = "forum_last_poster_name = '" . $db->sql_escape(($row['poster_id'] == ANONYMOUS) ? $row['post_username'] : $row['username']) . "'"; + $sql_data[FORUMS_TABLE]['stat'][] = "forum_last_poster_colour = '" . $db->sql_escape($row['user_colour']) . "'"; } } - if ($make_global) + // topic sync time! + // simply, we update if it is a reply or the last post is edited + if ($post_approved) { - $update_sql = update_post_information('forum', $data['forum_id'], true); - if (sizeof($update_sql)) + // reply requires the whole thing + if ($post_mode == 'reply') { - $sql_data[FORUMS_TABLE]['stat'][] = implode(', ', $update_sql[$data['forum_id']]); + $sql_data[TOPICS_TABLE]['stat'][] = 'topic_last_post_id = ' . (int) $data['post_id']; + $sql_data[TOPICS_TABLE]['stat'][] = 'topic_last_poster_id = ' . (int) $user->data['user_id']; + $sql_data[TOPICS_TABLE]['stat'][] = "topic_last_poster_name = '" . $db->sql_escape((!$user->data['is_registered'] && $username) ? $username : (($user->data['user_id'] != ANONYMOUS) ? $user->data['username'] : '')) . "'"; + $sql_data[TOPICS_TABLE]['stat'][] = "topic_last_poster_colour = '" . (($user->data['user_id'] != ANONYMOUS) ? $db->sql_escape($user->data['user_colour']) : '') . "'"; + $sql_data[TOPICS_TABLE]['stat'][] = "topic_last_post_subject = '" . $db->sql_escape($subject) . "'"; + $sql_data[TOPICS_TABLE]['stat'][] = 'topic_last_post_time = ' . (int) $current_time; + } + else if ($post_mode == 'edit_last_post') + { + // only the subject can be changed from edit + $sql_data[TOPICS_TABLE]['stat'][] = "topic_last_post_subject = '" . $db->sql_escape($subject) . "'"; } } - - if ($post_mode == 'edit_topic') + else if (!$data['post_approved'] && $post_mode == 'edit_last_post') { - $update_sql = update_post_information('topic', $data['topic_id'], true); - if (sizeof($update_sql)) + // like having the rug pulled from under us + $sql = 'SELECT MAX(post_id) as last_post_id + FROM ' . POSTS_TABLE . ' + WHERE topic_id = ' . (int) $data['topic_id'] . ' + AND post_approved = 1'; + $result = $db->sql_query($sql); + $row = $db->sql_fetchrow($result); + $db->sql_freeresult($result); + + // any posts left in this forum? + if (!empty($row['last_post_id'])) { - $sql_data[TOPICS_TABLE]['stat'][] = implode(', ', $update_sql[$data['topic_id']]); + $sql = 'SELECT p.post_id, p.post_subject, p.post_time, p.poster_id, p.post_username, u.user_id, u.username, u.user_colour + FROM ' . POSTS_TABLE . ' p, ' . USERS_TABLE . ' u + WHERE p.poster_id = u.user_id + AND p.post_id = ' . (int) $row['last_post_id']; + $result = $db->sql_query($sql); + $row = $db->sql_fetchrow($result); + $db->sql_freeresult($result); + + // salvation, a post is found! jam it into the forums table + $sql_data[TOPICS_TABLE]['stat'][] = 'topic_last_post_id = ' . (int) $row['post_id']; + $sql_data[TOPICS_TABLE]['stat'][] = "topic_last_post_subject = '" . $db->sql_escape($row['post_subject']) . "'"; + $sql_data[TOPICS_TABLE]['stat'][] = 'topic_last_post_time = ' . (int) $row['post_time']; + $sql_data[TOPICS_TABLE]['stat'][] = 'topic_last_poster_id = ' . (int) $row['poster_id']; + $sql_data[TOPICS_TABLE]['stat'][] = "topic_last_poster_name = '" . $db->sql_escape(($row['poster_id'] == ANONYMOUS) ? $row['post_username'] : $row['username']) . "'"; + $sql_data[TOPICS_TABLE]['stat'][] = "topic_last_poster_colour = '" . $db->sql_escape($row['user_colour']) . "'"; } } @@ -1847,15 +2218,14 @@ function submit_post($mode, $subject, $username, $topic_type, &$poll, &$data, $u } // Update forum stats - $db->sql_transaction('begin'); - $where_sql = array(POSTS_TABLE => 'post_id = ' . $data['post_id'], TOPICS_TABLE => 'topic_id = ' . $data['topic_id'], FORUMS_TABLE => 'forum_id = ' . $data['forum_id'], USERS_TABLE => 'user_id = ' . $user->data['user_id']); foreach ($sql_data as $table => $update_ary) { if (isset($update_ary['stat']) && implode('', $update_ary['stat'])) { - $db->sql_query("UPDATE $table SET " . implode(', ', $update_ary['stat']) . ' WHERE ' . $where_sql[$table]); + $sql = "UPDATE $table SET " . implode(', ', $update_ary['stat']) . ' WHERE ' . $where_sql[$table]; + $db->sql_query($sql); } } @@ -1891,8 +2261,6 @@ function submit_post($mode, $subject, $username, $topic_type, &$poll, &$data, $u $search->index($mode, $data['post_id'], $data['message'], $subject, $poster_id, ($topic_type == POST_GLOBAL) ? 0 : $data['forum_id']); } - $db->sql_transaction('commit'); - // Delete draft if post was loaded... $draft_id = request_var('draft_loaded', 0); if ($draft_id) @@ -1921,6 +2289,8 @@ function submit_post($mode, $subject, $username, $topic_type, &$poll, &$data, $u } } + $db->sql_transaction('commit'); + if ($mode == 'post' || $mode == 'reply' || $mode == 'quote') { // Mark this topic as posted to @@ -1966,15 +2336,26 @@ function submit_post($mode, $subject, $username, $topic_type, &$poll, &$data, $u user_notification($mode, $subject, $data['topic_title'], $data['forum_name'], $data['forum_id'], $data['topic_id'], $data['post_id']); } - if ($mode == 'post') + $params = $add_anchor = ''; + + if ($auth->acl_get('f_noapprove', $data['forum_id']) || $auth->acl_get('m_approve', $data['forum_id'])) { - $url = ($auth->acl_get('f_noapprove', $data['forum_id']) || $auth->acl_get('m_approve', $data['forum_id'])) ? append_sid("{$phpbb_root_path}viewtopic.$phpEx", 'f=' . $data['forum_id'] . '&t=' . $data['topic_id']) : append_sid("{$phpbb_root_path}viewforum.$phpEx", 'f=' . $data['forum_id']); + $params .= '&t=' . $data['topic_id']; + + if ($mode != 'post') + { + $params .= '&p=' . $data['post_id']; + $add_anchor = '#p' . $data['post_id']; + } } - else + else if ($mode != 'post' && $post_mode != 'edit_first_post' && $post_mode != 'edit_topic') { - $url = ($auth->acl_get('f_noapprove', $data['forum_id']) || $auth->acl_get('m_approve', $data['forum_id'])) ? append_sid("{$phpbb_root_path}viewtopic.$phpEx", "f={$data['forum_id']}&t={$data['topic_id']}&p={$data['post_id']}") . "#p{$data['post_id']}" : append_sid("{$phpbb_root_path}viewtopic.$phpEx", "f={$data['forum_id']}&t={$data['topic_id']}"); + $params .= '&t=' . $data['topic_id']; } + $url = (!$params) ? "{$phpbb_root_path}viewforum.$phpEx" : "{$phpbb_root_path}viewtopic.$phpEx"; + $url = append_sid($url, 'f=' . $data['forum_id'] . $params) . $add_anchor; + return $url; } diff --git a/phpBB/includes/functions_privmsgs.php b/phpBB/includes/functions_privmsgs.php index 7677f4ba34..7f2e3e4c12 100644 --- a/phpBB/includes/functions_privmsgs.php +++ b/phpBB/includes/functions_privmsgs.php @@ -330,6 +330,7 @@ function place_pm_into_folder(&$global_privmsgs_rules, $release = false) $action_ary = $move_into_folder = array(); + // Newly processing on-hold messages if ($release) { $sql = 'UPDATE ' . PRIVMSGS_TO_TABLE . ' @@ -337,6 +338,51 @@ function place_pm_into_folder(&$global_privmsgs_rules, $release = false) WHERE folder_id = ' . PRIVMSGS_HOLD_BOX . " AND user_id = $user_id"; $db->sql_query($sql); + + // If there are no rows affected there is something wrong with the new and unread message count. + // We try to fix this on our way down... + if (!$db->sql_affectedrows()) + { + // Update unread count + $sql = 'SELECT COUNT(msg_id) as num_messages + FROM ' . PRIVMSGS_TO_TABLE . ' + WHERE pm_unread = 1 + AND folder_id <> ' . PRIVMSGS_OUTBOX . ' + AND user_id = ' . $user_id; + $result = $db->sql_query($sql); + $num_messages = (int) $db->sql_fetchfield('num_messages'); + $db->sql_freeresult($result); + + $db->sql_query('UPDATE ' . USERS_TABLE . ' SET user_unread_privmsg = ' . $num_messages . ' WHERE user_id = ' . $user_id); + $user->data['user_unread_privmsg'] = $num_messages; + + // Update new pm count + $sql = 'SELECT COUNT(msg_id) as num_messages + FROM ' . PRIVMSGS_TO_TABLE . ' + WHERE pm_new = 1 + AND folder_id IN (' . PRIVMSGS_NO_BOX . ', ' . PRIVMSGS_HOLD_BOX . ') + AND user_id = ' . $user_id; + $result = $db->sql_query($sql); + $num_messages = (int) $db->sql_fetchfield('num_messages'); + $db->sql_freeresult($result); + + $db->sql_query('UPDATE ' . USERS_TABLE . ' SET user_new_privmsg = ' . $num_messages . ' WHERE user_id = ' . $user_id); + $user->data['user_new_privmsg'] = $num_messages; + + // Ok, here we need to repair something, other boxes than privmsgs_no_box and privmsgs_hold_box should not carry the pm_new flag. + if (!$num_messages) + { + $sql = 'UPDATE ' . PRIVMSGS_TO_TABLE . ' + SET pm_new = 0 + WHERE pm_new = 1 + AND folder_id NOT IN (' . PRIVMSGS_NO_BOX . ', ' . PRIVMSGS_HOLD_BOX . ') + AND user_id = ' . $user_id; + $db->sql_query($sql); + } + + // The function needs this value to be up-to-date + $user_new_privmsg = (int) $user->data['user_new_privmsg']; + } } // Get those messages not yet placed into any box @@ -732,7 +778,7 @@ function move_pm($user_id, $message_limit, $move_msg_ids, $dest_folder, $cur_fol if (!$row) { - trigger_error('NOT_AUTHORIZED'); + trigger_error('NOT_AUTHORISED'); } if ($row['pm_count'] + sizeof($move_msg_ids) > $message_limit) @@ -1310,6 +1356,8 @@ function submit_pm($mode, $subject, &$data, $put_in_outbox = true) } } + $db->sql_transaction('begin'); + $sql = ''; switch ($mode) @@ -1386,8 +1434,6 @@ function submit_pm($mode, $subject, &$data, $put_in_outbox = true) if ($mode != 'edit') { - $db->sql_transaction('begin'); - if ($sql) { $db->sql_query($sql); @@ -1428,8 +1474,6 @@ function submit_pm($mode, $subject, &$data, $put_in_outbox = true) 'pm_forwarded' => ($mode == 'forward') ? 1 : 0)) ); } - - $db->sql_transaction('commit'); } // Set user last post time @@ -1441,8 +1485,6 @@ function submit_pm($mode, $subject, &$data, $put_in_outbox = true) $db->sql_query($sql); } - $db->sql_transaction('begin'); - // Submit Attachments if (!empty($data['attachment_data']) && $data['msg_id'] && in_array($mode, array('post', 'reply', 'quote', 'quotepost', 'edit', 'forward'))) { @@ -1522,8 +1564,6 @@ function submit_pm($mode, $subject, &$data, $put_in_outbox = true) } } - $db->sql_transaction('commit'); - // Delete draft if post was loaded... $draft_id = request_var('draft_loaded', 0); if ($draft_id) @@ -1534,6 +1574,8 @@ function submit_pm($mode, $subject, &$data, $put_in_outbox = true) $db->sql_query($sql); } + $db->sql_transaction('commit'); + // Send Notifications if ($mode != 'edit') { diff --git a/phpBB/includes/functions_profile_fields.php b/phpBB/includes/functions_profile_fields.php index 05bea54bd7..47d3ae03a9 100644 --- a/phpBB/includes/functions_profile_fields.php +++ b/phpBB/includes/functions_profile_fields.php @@ -62,10 +62,14 @@ class custom_profile // Return templated field $tpl_snippet = $this->process_field_row('change', $row); + // Some types are multivalue, we can't give them a field_id as we would not know which to pick + $type = (int) $row['field_type']; + $template->assign_block_vars('profile_fields', array( 'LANG_NAME' => $row['lang_name'], 'LANG_EXPLAIN' => $row['lang_explain'], 'FIELD' => $tpl_snippet, + 'FIELD_ID' => ($type == 6 || ($type == 4 && $row['field_length'] == '1')) ? '' : 'pf_' . $row['field_ident'], 'S_REQUIRED' => ($row['field_required']) ? true : false) ); } @@ -989,7 +993,7 @@ class custom_profile_admin extends custom_profile ); $options = array( - 0 => array('TITLE' => $user->lang['FIELD_TYPE'], 'EXPLAIN' => $user->lang['BOOL_TYPE_EXPLAIN'], 'FIELD' => 'vars['field_length'] == 1) ? ' checked="checked"' : '') . ' />' . $user->lang['RADIO_BUTTONS'] . '   vars['field_length'] == 2) ? ' checked="checked"' : '') . ' />' . $user->lang['CHECKBOX'] . '   '), + 0 => array('TITLE' => $user->lang['FIELD_TYPE'], 'EXPLAIN' => $user->lang['BOOL_TYPE_EXPLAIN'], 'FIELD' => ''), 1 => array('TITLE' => $user->lang['DEFAULT_VALUE'], 'FIELD' => $this->process_field_row('preview', $profile_row)) ); @@ -1055,7 +1059,7 @@ class custom_profile_admin extends custom_profile $options = array( 0 => array('TITLE' => $user->lang['DEFAULT_VALUE'], 'FIELD' => $this->process_field_row('preview', $profile_row)), - 1 => array('TITLE' => $user->lang['ALWAYS_TODAY'], 'FIELD' => ' ' . $user->lang['YES'] . ' ' . $user->lang['NO']), + 1 => array('TITLE' => $user->lang['ALWAYS_TODAY'], 'FIELD' => ''), ); return $options; diff --git a/phpBB/includes/functions_template.php b/phpBB/includes/functions_template.php index 4e5b46c3f7..aacb4c6ddb 100644 --- a/phpBB/includes/functions_template.php +++ b/phpBB/includes/functions_template.php @@ -54,7 +54,7 @@ class template_compile * Load template source from file * @access private */ - function _tpl_load_file($handle) + function _tpl_load_file($handle, $store_in_db = false) { // Try and open template for read if (!file_exists($this->template->files[$handle])) @@ -66,6 +66,23 @@ class template_compile // Actually compile the code now. $this->compile_write($handle, $this->template->compiled_code[$handle]); + + // Store in database if required... + if ($store_in_db) + { + global $db, $user; + + $sql_ary = array( + 'template_id' => $user->theme['template_id'], + 'template_filename' => $this->template->filename[$handle], + 'template_included' => '', + 'template_mtime' => time(), + 'template_data' => trim(@file_get_contents($this->template->files[$handle])), + ); + + $sql = 'INSERT INTO ' . STYLES_TEMPLATE_DATA_TABLE . ' ' . $db->sql_build_array('INSERT', $sql_ary); + $db->sql_query($sql); + } } /** @@ -206,7 +223,7 @@ class template_compile for ($i = 0, $size = sizeof($text_blocks); $i < $size; $i++) { $trim_check_text = trim($text_blocks[$i]); - $template_php .= (!$no_echo) ? ((!empty($trim_check_text)) ? $text_blocks[$i] : '') . ((!empty($compile_blocks[$i])) ? $compile_blocks[$i] : '') : ((!empty($trim_check_text)) ? $text_blocks[$i] : '') . ((!empty($compile_blocks[$i])) ? $compile_blocks[$i] : ''); + $template_php .= (!$no_echo) ? (($trim_check_text != '') ? $text_blocks[$i] : '') . ((isset($compile_blocks[$i])) ? $compile_blocks[$i] : '') : (($trim_check_text != '') ? $text_blocks[$i] : '') . ((isset($compile_blocks[$i])) ? $compile_blocks[$i] : ''); } // There will be a number of occasions where we switch into and out of diff --git a/phpBB/includes/functions_transfer.php b/phpBB/includes/functions_transfer.php index 7be2e4acd6..51a7fa8bb7 100644 --- a/phpBB/includes/functions_transfer.php +++ b/phpBB/includes/functions_transfer.php @@ -32,8 +32,8 @@ class transfer { global $phpbb_root_path; - $this->file_perms = '0644'; - $this->dir_perms = '0777'; + $this->file_perms = 0644; + $this->dir_perms = 0777; // We use the store directory as temporary path to circumvent open basedir restrictions $this->tmp_path = $phpbb_root_path . 'store/'; diff --git a/phpBB/includes/functions_upload.php b/phpBB/includes/functions_upload.php index 489f3e942e..68e06765a5 100644 --- a/phpBB/includes/functions_upload.php +++ b/phpBB/includes/functions_upload.php @@ -81,7 +81,7 @@ class filespec * @param string $prefix Prefix applied to filename * @access public */ - function clean_filename($mode = 'unique', $prefix = '') + function clean_filename($mode = 'unique', $prefix = '', $user_id = '') { if ($this->init_error) { @@ -110,6 +110,12 @@ class filespec $this->realname = $prefix . md5(unique_id()); break; + case 'avatar': + $this->extension = strtolower($this->extension); + $this->realname = $prefix . $user_id . '.' . $this->extension; + + break; + case 'unique_ext': default: $this->realname = $prefix . md5(unique_id()) . '.' . $this->extension; @@ -224,7 +230,7 @@ class filespec * @param octal $chmod Permission mask for chmodding the file after a successful move * @access public */ - function move_file($destination, $overwrite = false, $chmod = 0666) + function move_file($destination, $overwrite = false, $skip_image_check = false, $chmod = 0666) { global $user, $phpbb_root_path; @@ -309,7 +315,7 @@ class filespec // Try to get real filesize from destination folder $this->filesize = (@filesize($this->destination_file)) ? @filesize($this->destination_file) : $this->filesize; - if ($this->is_image()) + if ($this->is_image() && !$skip_image_check) { $this->width = $this->height = 0; @@ -337,6 +343,12 @@ class filespec $this->error[] = sprintf($user->lang['IMAGE_FILETYPE_MISMATCH'], $types[$this->image_info[2]][0], $this->extension); } } + + // Make sure the dimensions match a valid image + if (empty($this->width) || empty($this->height)) + { + $this->error[] = $user->lang['ATTACHED_IMAGE_NOT_IMAGE']; + } } else { @@ -400,7 +412,7 @@ class fileerror extends filespec /** * File upload class -* Init class (all parameters optional and able to be set/overwritten seperatly) - scope is global and valid for all uploads +* Init class (all parameters optional and able to be set/overwritten separately) - scope is global and valid for all uploads * * @package phpBB3 */ @@ -561,7 +573,20 @@ class fileupload { $_FILES[$form_name]['name'] = basename($source_file); $_FILES[$form_name]['size'] = 0; - $_FILES[$form_name]['type'] = ''; + $mimetype = ''; + + if (function_exists('mime_content_type')) + { + $mimetype = mime_content_type($filename); + } + + // Some browsers choke on a mimetype of application/octet-stream + if (!$mimetype || $mimetype == 'application/octet-stream') + { + $mimetype = 'application/octetstream'; + } + + $_FILES[$form_name]['type'] = $mimetype; } else { @@ -660,6 +685,12 @@ class fileupload return $file; } + // Make sure $path not beginning with / + if (strpos($path, '/') === 0) + { + $path = substr($path, 1); + } + fputs($fsock, 'GET /' . $path . " HTTP/1.1\r\n"); fputs($fsock, "HOST: " . $host . "\r\n"); fputs($fsock, "Connection: close\r\n\r\n"); diff --git a/phpBB/includes/functions_user.php b/phpBB/includes/functions_user.php index 933124ce28..cab9d8bc25 100644 --- a/phpBB/includes/functions_user.php +++ b/phpBB/includes/functions_user.php @@ -11,8 +11,12 @@ /** * Obtain user_ids from usernames or vice versa. Returns false on * success else the error string +* +* @param array &$user_id_ary The user ids to check or empty if usernames used +* @param array &$username_ary The usernames to check or empty if user ids used +* @param mixed $user_type Array of user types to check, false if not restricting by user type */ -function user_get_id_name(&$user_id_ary, &$username_ary, $only_active = false) +function user_get_id_name(&$user_id_ary, &$username_ary, $user_type = false) { global $db; @@ -45,9 +49,9 @@ function user_get_id_name(&$user_id_ary, &$username_ary, $only_active = false) FROM ' . USERS_TABLE . ' WHERE ' . $db->sql_in_set($sql_where, $sql_in); - if ($only_active) + if ($user_type !== false && !empty($user_type)) { - $sql .= ' AND user_type IN (' . USER_NORMAL . ', ' . USER_FOUNDER . ')'; + $sql .= ' AND ' . $db->sql_in_set('user_type', $user_type); } $result = $db->sql_query($sql); @@ -289,6 +293,65 @@ function user_delete($mode, $user_id, $post_username = false) $db->sql_transaction('begin'); + // Before we begin, we will remove the reports the user issued. + $sql = 'SELECT r.post_id, p.topic_id + FROM ' . REPORTS_TABLE . ' r, ' . POSTS_TABLE . ' p + WHERE r.user_id = ' . $user_id . ' + AND p.post_id = r.post_id'; + $result = $db->sql_query($sql); + + $report_posts = $report_topics = array(); + while ($row = $db->sql_fetchrow($result)) + { + $report_posts[] = $row['post_id']; + $report_topics[] = $row['topic_id']; + } + $db->sql_freeresult($result); + + if (sizeof($report_posts)) + { + $report_posts = array_unique($report_posts); + $report_topics = array_unique($report_topics); + + // Get a list of topics that still contain reported posts + $sql = 'SELECT DISTINCT topic_id + FROM ' . POSTS_TABLE . ' + WHERE ' . $db->sql_in_set('topic_id', $report_topics) . ' + AND post_reported = 1 + AND ' . $db->sql_in_set('post_id', $report_posts, true); + $result = $db->sql_query($sql); + + $keep_report_topics = array(); + while ($row = $db->sql_fetchrow($result)) + { + $keep_report_topics[] = $row['topic_id']; + } + $db->sql_freeresult($result); + + if (sizeof($keep_report_topics)) + { + $report_topics = array_diff($report_topics, $keep_report_topics); + } + unset($keep_report_topics); + + // Now set the flags back + $sql = 'UPDATE ' . POSTS_TABLE . ' + SET post_reported = 0 + WHERE ' . $db->sql_in_set('post_id', $report_posts); + $db->sql_query($sql); + + if (sizeof($report_topics)) + { + $sql = 'UPDATE ' . TOPICS_TABLE . ' + SET topic_reported = 0 + WHERE ' . $db->sql_in_set('topic_id', $report_topics); + $db->sql_query($sql); + } + } + + // Remove reports + $db->sql_query('DELETE FROM ' . REPORTS_TABLE . ' WHERE user_id = ' . $user_id); + switch ($mode) { case 'retain': @@ -594,7 +657,15 @@ function user_ban($mode, $ban, $ban_len, $ban_len_other, $ban_exclude, $ban_reas else { $ban_other = explode('-', $ban_len_other); - $ban_end = max($current_time, gmmktime(0, 0, 0, $ban_other[1], $ban_other[2], $ban_other[0])); + if (sizeof($ban_other) == 3 && ((int)$ban_other[0] < 9999) && + (strlen($ban_other[0]) == 4) && (strlen($ban_other[1]) == 2) && (strlen($ban_other[2]) == 2)) + { + $ban_end = max($current_time, gmmktime(0, 0, 0, (int)$ban_other[1], (int)$ban_other[2], (int)$ban_other[0])); + } + else + { + trigger_error($user->lang['LENGTH_BAN_INVALID']); + } } } else @@ -602,12 +673,12 @@ function user_ban($mode, $ban, $ban_len, $ban_len_other, $ban_exclude, $ban_reas $ban_end = 0; } - $founder = array(); + $founder = $founder_names = array(); if (!$ban_exclude) { // Create a list of founder... - $sql = 'SELECT user_id, user_email + $sql = 'SELECT user_id, user_email, username_clean FROM ' . USERS_TABLE . ' WHERE user_type = ' . USER_FOUNDER; $result = $db->sql_query($sql); @@ -615,6 +686,7 @@ function user_ban($mode, $ban, $ban_len, $ban_len_other, $ban_exclude, $ban_reas while ($row = $db->sql_fetchrow($result)) { $founder[$row['user_id']] = $row['user_email']; + $founder_names[$row['user_id']] = $row['username_clean']; } $db->sql_freeresult($result); } @@ -641,7 +713,16 @@ function user_ban($mode, $ban, $ban_len, $ban_len_other, $ban_exclude, $ban_reas $username = trim($username); if ($username != '') { - $sql_usernames[] = utf8_clean_string($username); + $clean_name = utf8_clean_string($username); + if ($clean_name == $user->data['username_clean']) + { + trigger_error($user->lang['CANNOT_BAN_YOURSELF']); + } + if (in_array($clean_name, $founder_names)) + { + trigger_error($user->lang['CANNOT_BAN_FOUNDER']); + } + $sql_usernames[] = $clean_name; } } @@ -932,7 +1013,10 @@ function user_ban($mode, $ban, $ban_len, $ban_len_other, $ban_exclude, $ban_reas // Update log $log_entry = ($ban_exclude) ? 'LOG_BAN_EXCLUDE_' : 'LOG_BAN_'; + + // Add to moderator and admin log add_log('admin', $log_entry . strtoupper($mode), $ban_reason, $ban_list_log); + add_log('mod', 0, 0, $log_entry . strtoupper($mode), $ban_reason, $ban_list_log); return true; } @@ -998,7 +1082,9 @@ function user_unban($mode, $ban) WHERE ' . $db->sql_in_set('ban_id', $unban_sql); $db->sql_query($sql); + // Add to moderator and admin log add_log('admin', 'LOG_UNBAN_' . strtoupper($mode), $l_unban_list); + add_log('mod', 0, 0, 'LOG_UNBAN_' . strtoupper($mode), $l_unban_list); } return false; @@ -1133,13 +1219,18 @@ function validate_num($num, $optional = false, $min = 0, $max = 1E99) * * @return boolean|string Either false if validation succeeded or a string which will be used as the error message (with the variable name appended) */ -function validate_match($string, $optional = false, $match) +function validate_match($string, $optional = false, $match = '') { if (empty($string) && $optional) { return false; } + if (empty($match)) + { + return false; + } + if (!preg_match($match, $string)) { return 'WRONG_DATA'; @@ -1170,11 +1261,98 @@ function validate_username($username, $allowed_username = false) return false; } - if (!preg_match('#^' . str_replace('\\\\', '\\', $config['allow_name_chars']) . '$#ui', $username) || strpos($username, '"') !== false || strpos($username, '"') !== false) + // ... fast checks first. + if (strpos($username, '"') !== false || strpos($username, '"') !== false) { return 'INVALID_CHARS'; } + $mbstring = $pcre = false; + + // generic UTF-8 character types supported? + if (version_compare(PHP_VERSION, '5.1.0', '>=') || (version_compare(PHP_VERSION, '5.0.0-dev', '<=') && version_compare(PHP_VERSION, '4.4.0', '>='))) + { + $pcre = true; + } + else if (function_exists('mb_ereg_match')) + { + mb_regex_encoding('UTF-8'); + $mbstring = true; + } + + switch ($config['allow_name_chars']) + { + case 'USERNAME_CHARS_ANY': + $pcre = true; + $regex = '.+'; + break; + + case 'USERNAME_ALPHA_ONLY': + $pcre = true; + $regex = '[A-Za-z]+'; + break; + + case 'USERNAME_ALPHA_SPACERS': + $pcre = true; + $regex = '[A-Za-z-\]_+ ]+'; + break; + + case 'USERNAME_LETTER_NUM': + if ($pcre) + { + $regex = '[\p{Lu}\p{Ll}\p{N}]+'; + } + else if ($mbstring) + { + $regex = '[[:upper:][:lower:][:digit:]]+'; + } + else + { + $pcre = true; + $regex = '[a-zA-Z0-9]+'; + } + break; + + case 'USERNAME_LETTER_NUM_SPACERS': + if ($pcre) + { + $regex = '[-\]_+ [\p{Lu}\p{Ll}\p{N}]+'; + } + else if ($mbstring) + { + $regex = '[-\]_+ [[:upper:][:lower:][:digit:]]+'; + } + else + { + $pcre = true; + $regex = '[-\]_+ [a-zA-Z0-9]+'; + } + break; + + case 'USERNAME_ASCII': + default: + $pcre = true; + $regex = '[\x01-\x7F]+'; + break; + } + + if ($pcre) + { + if (!preg_match('#^' . $regex . '$#u', $username)) + { + return 'INVALID_CHARS'; + } + } + else if ($mbstring) + { + $matches = array(); + mb_ereg_search_init('^' . $username . '$', $regex, $matches); + if (!mb_ereg_search()) + { + return 'INVALID_CHARS'; + } + } + $sql = 'SELECT username FROM ' . USERS_TABLE . " WHERE username_clean = '" . $db->sql_escape($clean_username) . "'"; @@ -1240,20 +1418,36 @@ function validate_password($password) return false; } + $pcre = $mbstring = false; + // generic UTF-8 character types supported? if (version_compare(PHP_VERSION, '5.1.0', '>=') || (version_compare(PHP_VERSION, '5.0.0-dev', '<=') && version_compare(PHP_VERSION, '4.4.0', '>='))) { $upp = '\p{Lu}'; $low = '\p{Ll}'; + $let = '\p{L}'; $num = '\p{N}'; $sym = '[^\p{Lu}\p{Ll}\p{N}]'; + $pcre = true; + } + else if (function_exists('mb_ereg_match')) + { + mb_regex_encoding('UTF-8'); + $upp = '[[:upper:]]'; + $low = '[[:lower:]]'; + $let = '[[:lower:][:upper:]]'; + $num = '[[:digit:]]'; + $sym = '[^[:upper:][:lower:][:digit:]]'; + $mbstring = true; } else { $upp = '[A-Z]'; $low = '[a-z]'; + $let = '[a-zA-Z]'; $num = '[0-9]'; $sym = '[^A-Za-z0-9]'; + $pcre = true; } $chars = array(); @@ -1266,8 +1460,7 @@ function validate_password($password) break; case 'PASS_TYPE_ALPHA': - $chars[] = $low; - $chars[] = $upp; + $chars[] = $let; $chars[] = $num; break; @@ -1279,11 +1472,24 @@ function validate_password($password) break; } - foreach ($chars as $char) + if ($pcre) { - if (!preg_match('#' . $char . '#u', $password)) + foreach ($chars as $char) { - return 'INVALID_CHARS'; + if (!preg_match('#' . $char . '#u', $password)) + { + return 'INVALID_CHARS'; + } + } + } + else if ($mbstring) + { + foreach ($chars as $char) + { + if (!mb_ereg_match($char, $password)) + { + return 'INVALID_CHARS'; + } } } @@ -1350,6 +1556,8 @@ function validate_email($email, $allowed_email = false) return false; } + + /** * Remove avatar */ @@ -1360,15 +1568,16 @@ function avatar_delete($mode, $row) // Check if the users avatar is actually *not* a group avatar if ($mode == 'user') { - if (strpos($row['user_avatar'], 'g' . $row['group_id'] . '_') === 0 || strpos($row['user_avatar'], $row['user_id'] . '_') !== 0) + if (strpos($row['user_avatar'], 'g') === 0 || (((int)$row['user_avatar'] !== 0) && ((int)$row['user_avatar'] !== (int)$row['user_id']))) { return false; } } - - if (file_exists($phpbb_root_path . $config['avatar_path'] . '/' . basename($row[$mode . '_avatar']))) + + $filename = get_avatar_filename($row[$mode . '_avatar']); + if (file_exists($phpbb_root_path . $config['avatar_path'] . '/' . $filename)) { - @unlink($phpbb_root_path . $config['avatar_path'] . '/' . basename($row[$mode . '_avatar'])); + @unlink($phpbb_root_path . $config['avatar_path'] . '/' . $filename); return true; } @@ -1400,10 +1609,16 @@ function avatar_remote($data, &$error) return false; } + if ($image_data[0] < 2 || $image_data[1] < 2) + { + $error[] = $user->lang['AVATAR_NO_SIZE']; + return false; + } + $width = ($data['width'] && $data['height']) ? $data['width'] : $image_data[0]; $height = ($data['width'] && $data['height']) ? $data['height'] : $image_data[1]; - if (!$width || !$height) + if ($width < 2 || $height < 2) { $error[] = $user->lang['AVATAR_NO_SIZE']; return false; @@ -1467,8 +1682,9 @@ function avatar_upload($data, &$error) { $file = $upload->remote_upload($data['uploadurl']); } - - $file->clean_filename('real', $data['user_id'] . '_'); + + $prefix = $config['avatar_salt'] . '_'; + $file->clean_filename('avatar', $prefix, $data['user_id']); $destination = $config['avatar_path']; @@ -1493,7 +1709,29 @@ function avatar_upload($data, &$error) $error = array_merge($error, $file->error); } - return array(AVATAR_UPLOAD, $file->get('realname'), $file->get('width'), $file->get('height')); + return array(AVATAR_UPLOAD, $data['user_id'] . '_' . time() . '.' . $file->get('extension'), $file->get('width'), $file->get('height')); +} + +/** +* Generates avatar filename from the database entry +*/ +function get_avatar_filename($avatar_entry) +{ + global $config; + + + if ($avatar_entry[0] === 'g') + { + $avatar_group = true; + $avatar_entry = substr($avatar_entry, 1); + } + else + { + $avatar_group = false; + } + $ext = substr(strrchr($avatar_entry, '.'), 1); + $avatar_entry = intval($avatar_entry); + return $config['avatar_salt'] . '_' . (($avatar_group) ? 'g' : '') . $avatar_entry . '.' . $ext; } /** @@ -1565,6 +1803,7 @@ function avatar_gallery($category, $avatar_select, $items_per_column, $block_var } $template->assign_vars(array( + 'S_AVATARS_ENABLED' => true, 'S_IN_AVATAR_GALLERY' => true, 'S_CAT_OPTIONS' => $s_category_options) ); @@ -1593,6 +1832,60 @@ function avatar_gallery($category, $avatar_select, $items_per_column, $block_var return $avatar_list; } + +/** +* Tries to (re-)establish avatar dimensions +*/ +function avatar_get_dimensions($avatar, $avatar_type, &$error, $current_x = 0, $current_y = 0) +{ + global $config, $phpbb_root_path, $user; + + switch ($avatar_type) + { + case AVATAR_REMOTE : + break; + + case AVATAR_UPLOAD : + $avatar = $phpbb_root_path . $config['avatar_path'] . '/' . get_avatar_filename($avatar); + break; + + case AVATAR_GALLERY : + $avatar = $phpbb_root_path . $config['avatar_gallery_path'] . '/' . $avatar ; + break; + } + + // Make sure getimagesize works... + if (($image_data = @getimagesize($avatar)) === false) + { + $error[] = $user->lang['UNABLE_GET_IMAGE_SIZE']; + return false; + } + + if ($image_data[0] < 2 || $image_data[1] < 2) + { + $error[] = $user->lang['AVATAR_NO_SIZE']; + return false; + } + + // try to maintain ratio + if (!(empty($current_x) && empty($current_y))) + { + if ($current_x != 0) + { + $image_data[1] = (int) floor(($current_x / $image_data[0]) * $image_data[1]); + $image_data[1] = min($config['avatar_max_height'], $image_data[1]); + $image_data[1] = max($config['avatar_min_height'], $image_data[1]); + } + if ($current_y != 0) + { + $image_data[0] = (int) floor(($current_y / $image_data[1]) * $image_data[0]); + $image_data[0] = min($config['avatar_max_width'], $image_data[1]); + $image_data[0] = max($config['avatar_min_width'], $image_data[1]); + } + } + return array($image_data[0], $image_data[1]); +} + /** * Uploading/Changing user avatar */ @@ -1603,8 +1896,8 @@ function avatar_process_user(&$error, $custom_userdata = false) $data = array( 'uploadurl' => request_var('uploadurl', ''), 'remotelink' => request_var('remotelink', ''), - 'width' => request_var('width', ''), - 'height' => request_var('height', ''), + 'width' => request_var('width', 0), + 'height' => request_var('height', 0), ); $error = validate_data($data, array( @@ -1620,12 +1913,22 @@ function avatar_process_user(&$error, $custom_userdata = false) } $sql_ary = array(); - $data['user_id'] = ($custom_userdata === false) ? $user->data['user_id'] : $custom_userdata['user_id']; + + if ($custom_userdata === false) + { + $userdata = &$user->data; + } + else + { + $userdata = &$custom_userdata; + } + + $data['user_id'] = $userdata['user_id']; $change_avatar = ($custom_userdata === false) ? $auth->acl_get('u_chgavatar') : true; $avatar_select = basename(request_var('avatar_select', '')); // Can we upload? - $can_upload = ($config['allow_avatar_upload'] && file_exists($phpbb_root_path . $config['avatar_path']) && is_writeable($phpbb_root_path . $config['avatar_path']) && $change_avatar && (@ini_get('file_uploads') || strtolower(@ini_get('file_uploads')) == 'on')) ? true : false; + $can_upload = ($config['allow_avatar_upload'] && file_exists($phpbb_root_path . $config['avatar_path']) && @is_writable($phpbb_root_path . $config['avatar_path']) && $change_avatar && (@ini_get('file_uploads') || strtolower(@ini_get('file_uploads')) == 'on')) ? true : false; if ((!empty($_FILES['uploadfile']['name']) || $data['uploadurl']) && $can_upload) { @@ -1659,10 +1962,27 @@ function avatar_process_user(&$error, $custom_userdata = false) $sql_ary['user_avatar'] = ''; $sql_ary['user_avatar_type'] = $sql_ary['user_avatar_width'] = $sql_ary['user_avatar_height'] = 0; } - else if ($data['width'] && $data['height']) + elseif (!empty($userdata['user_avatar'])) { - // Only update the dimensions? - if ($config['avatar_max_width'] || $config['avatar_max_height']) + // Only update the dimensions + + if (empty($data['width']) || empty($data['height'])) + { + if ($dims = avatar_get_dimensions($userdata['user_avatar'], $userdata['user_avatar_type'], $error, $data['width'], $data['height'])) + { + list($guessed_x, $guessed_y) = $dims; + if (empty($data['width'])) + { + $data['width'] = $guessed_x; + } + if (empty($data['height'])) + { + $data['height'] = $guessed_y; + } + } + } + if (($config['avatar_max_width'] || $config['avatar_max_height']) && + (($data['width'] != $userdata['user_avatar_width']) || $data['height'] != $userdata['user_avatar_height'])) { if ($data['width'] > $config['avatar_max_width'] || $data['height'] > $config['avatar_max_height']) { @@ -1703,7 +2023,7 @@ function avatar_process_user(&$error, $custom_userdata = false) $userdata = ($custom_userdata === false) ? $user->data : $custom_userdata; // Delete old avatar if present - if ($userdata['user_avatar'] && $sql_ary['user_avatar'] != $userdata['user_avatar'] && $userdata['user_avatar_type'] != AVATAR_GALLERY) + if ($userdata['user_avatar'] && empty($sql_ary['user_avatar']) && $userdata['user_avatar_type'] != AVATAR_GALLERY) { avatar_delete('user', $userdata); } @@ -1745,17 +2065,18 @@ function group_create(&$group_id, $type, $name, $desc, $group_attributes, $allow // Those are group-only attributes $group_only_ary = array('group_receive_pm', 'group_legend', 'group_message_limit', 'group_founder_manage'); - // Check data - if (!utf8_strlen($name) || utf8_strlen($name) > 40) + // Check data. Limit group name length. + if (!utf8_strlen($name) || utf8_strlen($name) > 60) { $error[] = (!utf8_strlen($name)) ? $user->lang['GROUP_ERR_USERNAME'] : $user->lang['GROUP_ERR_USER_LONG']; } - - if (utf8_strlen($desc) > 255) + + $err = group_validate_groupname($group_id, $name); + if (!empty($err)) { - $error[] = $user->lang['GROUP_ERR_DESC_LONG']; + $error[] = $user->lang[$err]; } - + if (!in_array($type, array(GROUP_OPEN, GROUP_CLOSED, GROUP_HIDDEN, GROUP_SPECIAL, GROUP_FREE))) { $error[] = $user->lang['GROUP_ERR_TYPE']; @@ -1816,6 +2137,10 @@ function group_create(&$group_id, $type, $name, $desc, $group_attributes, $allow if (!$group_id) { $group_id = $db->sql_nextid(); + if (isset($sql_ary['group_avatar_type']) && $sql_ary['group_avatar_type'] == AVATAR_UPLOAD) + { + group_correct_avatar($group_id, $sql_ary['group_avatar']); + } } // Set user attributes @@ -1866,6 +2191,30 @@ function group_create(&$group_id, $type, $name, $desc, $group_attributes, $allow return (sizeof($error)) ? $error : false; } + +/** +* Changes a group avatar's filename to conform to the naming scheme +*/ +function group_correct_avatar($group_id, $old_entry) +{ + global $config, $db, $phpbb_root_path; + + $group_id = (int)$group_id; + $ext = substr(strrchr($old_entry, '.'), 1); + $old_filename = get_avatar_filename($old_entry); + $new_filename = $config['avatar_salt'] . "_g$group_id.$ext"; + $new_entry = 'g' . $group_id . '_' . substr(time(), -5) . ".$ext"; + + $avatar_path = $phpbb_root_path . $config['avatar_path']; + if (@rename($avatar_path . '/'. $old_filename, $avatar_path . '/' . $new_filename)) + { + $sql = 'UPDATE ' . GROUPS_TABLE . ' + SET group_avatar = \'' . $db->sql_escape($new_entry) . "' + WHERE group_id = $group_id"; + $db->sql_query($sql); + } +} + /** * Group Delete */ @@ -1932,7 +2281,8 @@ function group_delete($group_id, $group_name = false) add_log('admin', 'LOG_GROUP_DELETE', $group_name); - return 'GROUP_DELETED'; + // Return false - no error + return false; } /** @@ -2258,6 +2608,52 @@ function group_user_attributes($action, $group_id, $user_id_ary = false, $userna return true; } +/** +* A small version of validate_username to check for a group name's existence. To be called directly. +*/ +function group_validate_groupname($group_id, $group_name) +{ + global $config, $db; + + $group_name = utf8_clean_string($group_name); + + if (!empty($group_id)) + { + $sql = 'SELECT group_name + FROM ' . GROUPS_TABLE . ' + WHERE group_id = ' . (int) $group_id; + $result = $db->sql_query($sql); + $row = $db->sql_fetchrow($result); + $db->sql_freeresult($result); + + if (!$row) + { + return false; + } + + $allowed_groupname = utf8_clean_string($row['group_name']); + + if ($allowed_groupname == $group_name) + { + return false; + } + } + + $sql = 'SELECT group_name + FROM ' . GROUPS_TABLE . " + WHERE LOWER(group_name) = '" . $db->sql_escape(utf8_strtolower($group_name)) . "'"; + $result = $db->sql_query($sql); + $row = $db->sql_fetchrow($result); + $db->sql_freeresult($result); + + if ($row) + { + return 'GROUP_NAME_TAKEN'; + } + + return false; +} + /** * Set users default group * @@ -2306,6 +2702,12 @@ function group_set_user_default($group_id, $user_id_ary, $group_attributes = fal continue; } + // Do not update the rank if it is set to "user default" + if (strpos($attribute, 'group_rank') === 0 && !$group_attributes[$attribute]) + { + continue; + } + settype($group_attributes[$attribute], $type); $sql_ary[str_replace('group_', 'user_', $attribute)] = $group_attributes[$attribute]; } @@ -2385,7 +2787,7 @@ function get_group_name($group_id) /** * Obtain either the members of a specified group, the groups the specified user is subscribed to -* or checking if a specified user is in a specified group +* or checking if a specified user is in a specified group. This function does not return pending memberships. * * Note: Never use this more than once... first group your users/groups */ @@ -2410,7 +2812,8 @@ function group_memberships($group_id_ary = false, $user_id_ary = false, $return_ $sql = 'SELECT ug.*, u.username, u.username_clean, u.user_email FROM ' . USER_GROUP_TABLE . ' ug, ' . USERS_TABLE . ' u - WHERE ug.user_id = u.user_id AND '; + WHERE ug.user_id = u.user_id + AND ug.user_pending = 0 AND '; if ($group_id_ary) { @@ -2508,7 +2911,12 @@ function group_update_listings($group_id) if ($mod_permissions || $admin_permissions) { - update_foes(); + if (!function_exists('update_foes')) + { + global $phpbb_root_path, $phpEx; + include($phpbb_root_path . 'includes/functions_admin.' . $phpEx); + } + update_foes(array($group_id)); } } diff --git a/phpBB/includes/mcp/info/mcp_warn.php b/phpBB/includes/mcp/info/mcp_warn.php index b5bef23be6..d53f35e00d 100644 --- a/phpBB/includes/mcp/info/mcp_warn.php +++ b/phpBB/includes/mcp/info/mcp_warn.php @@ -23,7 +23,7 @@ class mcp_warn_info 'front' => array('title' => 'MCP_WARN_FRONT', 'auth' => 'aclf_m_warn', 'cat' => array('MCP_WARN')), 'list' => array('title' => 'MCP_WARN_LIST', 'auth' => 'aclf_m_warn', 'cat' => array('MCP_WARN')), 'warn_user' => array('title' => 'MCP_WARN_USER', 'auth' => 'aclf_m_warn', 'cat' => array('MCP_WARN')), - 'warn_post' => array('title' => 'MCP_WARN_POST', 'auth' => 'acl_m_warn,$id || (!$id && aclf_m_warn)', 'cat' => array('MCP_WARN')), + 'warn_post' => array('title' => 'MCP_WARN_POST', 'auth' => 'acl_m_warn && acl_f_read,$id', 'cat' => array('MCP_WARN')), ), ); } diff --git a/phpBB/includes/mcp/mcp_ban.php b/phpBB/includes/mcp/mcp_ban.php index aea2466888..c317260a2e 100644 --- a/phpBB/includes/mcp/mcp_ban.php +++ b/phpBB/includes/mcp/mcp_ban.php @@ -29,12 +29,13 @@ class mcp_ban $unbansubmit = (isset($_POST['unbansubmit'])) ? true : false; $current_time = time(); - $user->add_lang('acp/ban'); + $user->add_lang(array('acp/ban', 'acp/users')); $this->tpl_name = 'mcp_ban'; // Ban submitted? if ($bansubmit) { + // Grab the list of entries $ban = request_var('ban', ''); $ban_len = request_var('banlength', 0); @@ -42,12 +43,28 @@ class mcp_ban $ban_exclude = request_var('banexclude', 0); $ban_reason = request_var('banreason', '', true); $ban_give_reason = request_var('bangivereason', '', true); + if ($ban) { - user_ban($mode, $ban, $ban_len, $ban_len_other, $ban_exclude, $ban_reason, $ban_give_reason); + if (confirm_box(true)) + { + user_ban($mode, $ban, $ban_len, $ban_len_other, $ban_exclude, $ban_reason, $ban_give_reason); - trigger_error($user->lang['BAN_UPDATE_SUCCESSFUL'] . '

    « ' . $user->lang['BACK_TO_PREV'] . ''); + trigger_error($user->lang['BAN_UPDATE_SUCCESSFUL'] . '

    « ' . $user->lang['BACK_TO_PREV'] . ''); + } + else + { + confirm_box(false, $user->lang['CONFIRM_OPERATION'], build_hidden_fields(array( + 'mode' => $mode, + 'ban' => $ban, + 'bansubmit' => true, + 'banlength' => $ban_len, + 'banlengthother' => $ban_len_other, + 'banexclude' => $ban_exclude, + 'banreason' => $ban_reason, + 'bangivereason' => $ban_give_reason))); + } } } else if ($unbansubmit) @@ -56,9 +73,19 @@ class mcp_ban if ($ban) { - user_unban($mode, $ban); + if (confirm_box(true)) + { + user_unban($mode, $ban); - trigger_error($user->lang['BAN_UPDATE_SUCCESSFUL'] . '

    « ' . $user->lang['BACK_TO_PREV'] . ''); + trigger_error($user->lang['BAN_UPDATE_SUCCESSFUL'] . '

    « ' . $user->lang['BACK_TO_PREV'] . ''); + } + else + { + confirm_box(false, $user->lang['CONFIRM_OPERATION'], build_hidden_fields(array( + 'mode' => $mode, + 'unbansubmit' => true, + 'unban' => $ban))); + } } } diff --git a/phpBB/includes/mcp/mcp_forum.php b/phpBB/includes/mcp/mcp_forum.php index cf41df646d..4387e02739 100644 --- a/phpBB/includes/mcp/mcp_forum.php +++ b/phpBB/includes/mcp/mcp_forum.php @@ -16,30 +16,50 @@ function mcp_forum_view($id, $mode, $action, $forum_info) global $template, $db, $user, $auth, $cache, $module; global $phpEx, $phpbb_root_path, $config; - $user->add_lang('viewtopic'); + $user->add_lang(array('viewtopic', 'viewforum')); include_once($phpbb_root_path . 'includes/functions_display.' . $phpEx); - $url = append_sid("{$phpbb_root_path}mcp.$phpEx?" . extra_url()); + // merge_topic is the quickmod action, merge_topics is the mcp_forum action, and merge_select is the mcp_topic action + $merge_select = ($action == 'merge_select' || $action == 'merge_topic' || $action == 'merge_topics') ? true : false; - if ($action == 'merge_select') + if ($merge_select) { // Fixes a "bug" that makes forum_view use the same ordering as topic_view unset($_POST['sk'], $_POST['sd'], $_REQUEST['sk'], $_REQUEST['sd']); } - $forum_id = $forum_info['forum_id']; - $start = request_var('start', 0); - $topic_id_list = request_var('topic_id_list', array(0)); - $post_id_list = request_var('post_id_list', array(0)); - $topic_id = request_var('t', 0); + $forum_id = $forum_info['forum_id']; + $start = request_var('start', 0); + $topic_id_list = request_var('topic_id_list', array(0)); + $post_id_list = request_var('post_id_list', array(0)); + $source_topic_ids = array(request_var('t', 0)); + $to_topic_id = request_var('to_topic_id', 0); + + $url_extra = ''; + $url_extra .= ($forum_id) ? "&f=$forum_id" : ''; + $url_extra .= ($GLOBALS['topic_id']) ? '&t=' . $GLOBALS['topic_id'] : ''; + $url_extra .= ($GLOBALS['post_id']) ? '&p=' . $GLOBALS['post_id'] : ''; + $url_extra .= ($GLOBALS['user_id']) ? '&u=' . $GLOBALS['user_id'] : ''; + + $url = append_sid("{$phpbb_root_path}mcp.$phpEx?$url_extra"); // Resync Topics - if ($action == 'resync') + switch ($action) { - $topic_ids = request_var('topic_id_list', array(0)); + case 'resync': + $topic_ids = request_var('topic_id_list', array(0)); + mcp_resync_topics($topic_ids); + break; - mcp_resync_topics($topic_ids); + case 'merge_topics': + $source_topic_ids = $topic_id_list; + case 'merge_topic': + if ($to_topic_id) + { + merge_topics($forum_id, $source_topic_ids, $to_topic_id); + } + break; } $selected_ids = ''; @@ -50,8 +70,15 @@ function mcp_forum_view($id, $mode, $action, $forum_info) $selected_ids .= '&post_id_list[' . $num . ']=' . $post_id; } } + else if (sizeof($topic_id_list) && $action == 'merge_topics') + { + foreach ($topic_id_list as $num => $topic_id) + { + $selected_ids .= '&topic_id_list[' . $num . ']=' . $topic_id; + } + } - make_jumpbox($url . "&i=$id&action=$action&mode=$mode", $forum_id . (($action == 'merge_select') ? $selected_ids : ''), false, 'm_'); + make_jumpbox($url . "&i=$id&action=$action&mode=$mode", $forum_id . (($merge_select) ? $selected_ids : ''), false, 'm_'); $topics_per_page = ($forum_info['forum_topics_per_page']) ? $forum_info['forum_topics_per_page'] : $config['topics_per_page']; @@ -64,6 +91,7 @@ function mcp_forum_view($id, $mode, $action, $forum_info) $limit_time_sql = ($sort_days) ? 'AND t.topic_last_post_time >= ' . (time() - ($sort_days * 86400)) : ''; $template->assign_vars(array( + 'ACTION' => $action, 'FORUM_NAME' => $forum_info['forum_name'], 'FORUM_DESCRIPTION' => generate_text_for_display($forum_info['forum_desc'], $forum_info['forum_desc_uid'], $forum_info['forum_desc_bitfield'], $forum_info['forum_desc_options']), @@ -74,12 +102,13 @@ function mcp_forum_view($id, $mode, $action, $forum_info) 'S_CAN_REPORT' => $auth->acl_get('m_report', $forum_id), 'S_CAN_DELETE' => $auth->acl_get('m_delete', $forum_id), + 'S_CAN_MERGE' => $auth->acl_get('m_merge', $forum_id), 'S_CAN_MOVE' => $auth->acl_get('m_move', $forum_id), 'S_CAN_FORK' => $auth->acl_get('m_', $forum_id), 'S_CAN_LOCK' => $auth->acl_get('m_lock', $forum_id), 'S_CAN_SYNC' => $auth->acl_get('m_', $forum_id), 'S_CAN_APPROVE' => $auth->acl_get('m_approve', $forum_id), - 'S_MERGE_SELECT' => ($action == 'merge_select') ? true : false, + 'S_MERGE_SELECT' => ($merge_select) ? true : false, 'S_CAN_MAKE_NORMAL' => $auth->acl_gets('f_sticky', 'f_announce', $forum_id), 'S_CAN_MAKE_STICKY' => $auth->acl_get('f_sticky', $forum_id), 'S_CAN_MAKE_ANNOUNCE' => $auth->acl_get('f_announce', $forum_id), @@ -87,12 +116,12 @@ function mcp_forum_view($id, $mode, $action, $forum_info) 'U_VIEW_FORUM' => append_sid("{$phpbb_root_path}viewforum.$phpEx", 'f=' . $forum_id), 'U_VIEW_FORUM_LOGS' => ($auth->acl_gets('a_', 'm_', $forum_id) && $module->loaded('logs')) ? append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=logs&mode=forum_logs&f=' . $forum_id) : '', - 'S_MCP_ACTION' => $url . "&i=$id&mode=$mode&start=$start" . (($action == 'merge_select') ? $selected_ids : ''), + 'S_MCP_ACTION' => $url . "&i=$id&forum_action=$action&mode=$mode&start=$start" . (($merge_select) ? $selected_ids : ''), - 'PAGINATION' => generate_pagination($url . "&i=$id&action=$action&mode=$mode" . (($action == 'merge_select') ? $selected_ids : ''), $forum_topics, $topics_per_page, $start), + 'PAGINATION' => generate_pagination($url . "&i=$id&action=$action&mode=$mode" . (($merge_select) ? $selected_ids : ''), $forum_topics, $topics_per_page, $start), 'PAGE_NUMBER' => on_page($forum_topics, $topics_per_page, $start), - 'TOTAL' => $forum_topics) - ); + 'TOTAL_TOPICS' => ($forum_topics == 1) ? $user->lang['VIEW_FORUM_TOPIC'] : sprintf($user->lang['VIEW_FORUM_TOPICS'], $forum_topics), + )); // Grab icons $icons = $cache->obtain_icons(); @@ -111,12 +140,13 @@ function mcp_forum_view($id, $mode, $action, $forum_info) $sql = "SELECT t.*$read_tracking_select FROM " . TOPICS_TABLE . " t $read_tracking_join - WHERE (t.forum_id = $forum_id OR t.forum_id = 0) + WHERE t.forum_id IN($forum_id, 0) " . (($auth->acl_get('m_approve', $forum_id)) ? '' : 'AND t.topic_approved = 1') . " $limit_time_sql ORDER BY t.topic_type DESC, $sort_order_sql"; $result = $db->sql_query_limit($sql, $topics_per_page, $start); + $topic_list = $topic_tracking_info = array(); while ($row = $db->sql_fetchrow($result)) { $topic_rows[$row['topic_id']] = $row; @@ -124,15 +154,23 @@ function mcp_forum_view($id, $mode, $action, $forum_info) } $db->sql_freeresult($result); - $topic_tracking_info = array(); - // Get topic tracking info - if ($config['load_db_lastread']) + // If there is more than one page, but we have no topic list, then the start parameter is... erm... out of sync + if (!sizeof($topic_list) && $forum_topics && $start > 0) { - $topic_tracking_info = get_topic_tracking($forum_id, $topic_list, $topic_rows, array($forum_id => $forum_info['mark_time']), array()); + redirect($url . "&i=$id&action=$action&mode=$mode"); } - else + + // Get topic tracking info + if (sizeof($topic_list)) { - $topic_tracking_info = get_complete_topic_tracking($forum_id, $topic_list, array()); + if ($config['load_db_lastread']) + { + $topic_tracking_info = get_topic_tracking($forum_id, $topic_list, $topic_rows, array($forum_id => $forum_info['mark_time']), array()); + } + else + { + $topic_tracking_info = get_complete_topic_tracking($forum_id, $topic_list, array()); + } } foreach ($topic_rows as $topic_id => $row) @@ -204,11 +242,19 @@ function mcp_forum_view($id, $mode, $action, $forum_info) } else { + if ($action == 'merge_topic' || $action == 'merge_topics') + { + $u_select_topic = $url . "&i=$id&mode=forum_view&action=$action&to_topic_id=" . $row['topic_id'] . $selected_ids; + } + else + { + $u_select_topic = $url . "&i=$id&mode=topic_view&action=merge&to_topic_id=" . $row['topic_id'] . $selected_ids; + } $topic_row = array_merge($topic_row, array( 'U_VIEW_TOPIC' => append_sid("{$phpbb_root_path}mcp.$phpEx", "i=$id&f=$forum_id&t={$row['topic_id']}&mode=topic_view"), - 'S_SELECT_TOPIC' => ($action == 'merge_select' && $row['topic_id'] != $topic_id) ? true : false, - 'U_SELECT_TOPIC' => $url . "&i=$id&mode=topic_view&action=merge&to_topic_id=" . $row['topic_id'] . $selected_ids, + 'S_SELECT_TOPIC' => ($merge_select && !in_array($row['topic_id'], $source_topic_ids)) ? true : false, + 'U_SELECT_TOPIC' => $u_select_topic, 'U_MCP_QUEUE' => $u_mcp_queue, 'U_MCP_REPORT' => ($auth->acl_get('m_report', $forum_id)) ? append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=main&mode=topic_view&t=' . $row['topic_id'] . '&action=reports') : '', 'TOPIC_ID' => $row['topic_id'], @@ -265,4 +311,111 @@ function mcp_resync_topics($topic_ids) return; } +/** +* Merge selected topics into selected topic +*/ +function merge_topics($forum_id, $topic_ids, $to_topic_id) +{ + global $db, $template, $user, $phpEx, $phpbb_root_path, $auth; + + if (!$to_topic_id) + { + $template->assign_var('MESSAGE', $user->lang['NO_FINAL_TOPIC_SELECTED']); + return; + } + + $topic_data = get_topic_data(array($to_topic_id), 'm_merge'); + + if (!sizeof($topic_data)) + { + $template->assign_var('MESSAGE', $user->lang['NO_FINAL_TOPIC_SELECTED']); + return; + } + + $topic_data = $topic_data[$to_topic_id]; + + $post_id_list = request_var('post_id_list', array(0)); + $start = request_var('start', 0); + + if (!sizeof($post_id_list) && sizeof($topic_ids)) + { + $sql = 'SELECT post_id + FROM ' . POSTS_TABLE . ' + WHERE ' . $db->sql_in_set('topic_id', $topic_ids); + $result = $db->sql_query($sql); + + $post_id_list = array(); + while ($row = $db->sql_fetchrow($result)) + { + $post_id_list[] = $row['post_id']; + } + $db->sql_freeresult($result); + } + + if (!sizeof($post_id_list)) + { + $template->assign_var('MESSAGE', $user->lang['NO_POST_SELECTED']); + return; + } + + if (!check_ids($post_id_list, POSTS_TABLE, 'post_id', array('m_merge'))) + { + return; + } + + $redirect = request_var('redirect', build_url(array('_f_', 'quickmod'))); + + $s_hidden_fields = build_hidden_fields(array( + 'i' => 'main', + 'f' => $forum_id, + 'post_id_list' => $post_id_list, + 'to_topic_id' => $to_topic_id, + 'mode' => 'forum_view', + 'action' => 'merge_topics', + 'start' => $start, + 'redirect' => $redirect, + 'topic_id_list' => $topic_ids) + ); + $success_msg = $return_link = ''; + + if (confirm_box(true)) + { + $to_forum_id = $topic_data['forum_id']; + + move_posts($post_id_list, $to_topic_id); + add_log('mod', $to_forum_id, $to_topic_id, 'LOG_MERGE', $topic_data['topic_title']); + + // Message and return links + $success_msg = 'POSTS_MERGED_SUCCESS'; + + // If the topic no longer exist, we will update the topic watch table. + // To not let it error out on users watching both topics, we just return on an error... + $db->sql_return_on_error(true); + $db->sql_query('UPDATE ' . TOPICS_WATCH_TABLE . ' SET topic_id = ' . $to_topic_id . ' WHERE ' . $db->sql_in_set('topic_id', $topic_ids)); + $db->sql_return_on_error(false); + + $db->sql_query('DELETE FROM ' . TOPICS_WATCH_TABLE . ' WHERE ' . $db->sql_in_set('topic_id', $topic_ids)); + + // Link to the new topic + $return_link .= (($return_link) ? '

    ' : '') . sprintf($user->lang['RETURN_NEW_TOPIC'], '', ''); + } + else + { + confirm_box(false, 'MERGE_TOPICS', $s_hidden_fields); + } + + $redirect = request_var('redirect', "index.$phpEx"); + $redirect = reapply_sid($redirect); + + if (!$success_msg) + { + return; + } + else + { + meta_refresh(3, append_sid("{$phpbb_root_path}viewtopic.$phpEx", "f=$to_forum_id&t=$to_topic_id")); + trigger_error($user->lang[$success_msg] . '

    ' . $return_link); + } +} + ?> \ No newline at end of file diff --git a/phpBB/includes/mcp/mcp_front.php b/phpBB/includes/mcp/mcp_front.php index 6904d6dfd1..8bebbc71bd 100644 --- a/phpBB/includes/mcp/mcp_front.php +++ b/phpBB/includes/mcp/mcp_front.php @@ -144,13 +144,13 @@ function mcp_front_view($id, $mode, $action) $global_id = $forum_list[0]; $sql = $db->sql_build_query('SELECT', array( - 'SELECT' => 'r.report_time, p.post_id, p.post_subject, u.username, u.username_clean, u.user_colour, u.user_id, t.topic_id, t.topic_title, f.forum_id, f.forum_name', + 'SELECT' => 'r.report_time, p.post_id, p.post_subject, p.post_time, u.username, u.username_clean, u.user_colour, u.user_id, u2.username as author_name, u2.username_clean as author_name_clean, u2.user_colour as author_colour, u2.user_id as author_id, t.topic_id, t.topic_title, f.forum_id, f.forum_name', 'FROM' => array( REPORTS_TABLE => 'r', REPORTS_REASONS_TABLE => 'rr', TOPICS_TABLE => 't', - USERS_TABLE => 'u', + USERS_TABLE => array('u', 'u2'), POSTS_TABLE => 'p' ), @@ -166,6 +166,7 @@ function mcp_front_view($id, $mode, $action) AND r.reason_id = rr.reason_id AND p.topic_id = t.topic_id AND r.user_id = u.user_id + AND p.poster_id = u2.user_id AND p.forum_id IN (0, ' . implode(', ', $forum_list) . ')', 'ORDER_BY' => 'p.post_time DESC' @@ -192,11 +193,17 @@ function mcp_front_view($id, $mode, $action) 'REPORTER_COLOUR' => get_username_string('colour', $row['user_id'], $row['username'], $row['user_colour']), 'U_REPORTER' => get_username_string('profile', $row['user_id'], $row['username'], $row['user_colour']), + 'AUTHOR_FULL' => get_username_string('full', $row['author_id'], $row['author_name'], $row['author_colour']), + 'AUTHOR' => get_username_string('username', $row['author_id'], $row['author_name'], $row['author_colour']), + 'AUTHOR_COLOUR' => get_username_string('colour', $row['author_id'], $row['author_name'], $row['author_colour']), + 'U_AUTHOR' => get_username_string('profile', $row['author_id'], $row['author_name'], $row['author_colour']), + 'FORUM_NAME' => (!$global_topic) ? $row['forum_name'] : $user->lang['GLOBAL_ANNOUNCEMENT'], 'TOPIC_TITLE' => $row['topic_title'], 'SUBJECT' => ($row['post_subject']) ? $row['post_subject'] : $user->lang['NO_SUBJECT'], - 'REPORT_TIME' => $user->format_date($row['report_time'])) - ); + 'REPORT_TIME' => $user->format_date($row['report_time']), + 'POST_TIME' => $user->format_date($row['post_time']), + )); } } diff --git a/phpBB/includes/mcp/mcp_logs.php b/phpBB/includes/mcp/mcp_logs.php index 44acc10174..cec097cd8a 100755 --- a/phpBB/includes/mcp/mcp_logs.php +++ b/phpBB/includes/mcp/mcp_logs.php @@ -18,7 +18,7 @@ class mcp_logs var $u_action; var $p_master; - function mcp_main(&$p_master) + function mcp_logs(&$p_master) { $this->p_master = &$p_master; } @@ -76,16 +76,23 @@ class mcp_logs // Delete entries if requested and able if (($deletemark || $deleteall) && $auth->acl_get('a_clearlogs')) { - if ($deletemark && $marked) + if ($deletemark) { - $sql_in = array(); - foreach ($marked as $mark) + if (!sizeof($marked)) { - $sql_in[] = $mark; + $where_sql = ''; } + else + { + $sql_in = array(); + foreach ($marked as $mark) + { + $sql_in[] = $mark; + } - $where_sql = ' AND ' . $db->sql_in_set('log_id', $sql_in); - unset($sql_in); + $where_sql = ' AND ' . $db->sql_in_set('log_id', $sql_in); + unset($sql_in); + } } if ($where_sql || $deleteall) diff --git a/phpBB/includes/mcp/mcp_main.php b/phpBB/includes/mcp/mcp_main.php index e10a2f7990..687900e646 100644 --- a/phpBB/includes/mcp/mcp_main.php +++ b/phpBB/includes/mcp/mcp_main.php @@ -180,7 +180,8 @@ class mcp_main break; default: - trigger_error("Unknown mode: $mode", E_USER_ERROR); + trigger_error('NO_MODE', E_USER_ERROR); + break; } } } @@ -350,6 +351,36 @@ function change_topic_type($action, $topic_ids) AND forum_id = 0'; $db->sql_query($sql); + // Do a little forum sync stuff + $sql = 'SELECT SUM(t.topic_replies + t.topic_approved) as topic_posts, COUNT(t.topic_approved) as topics_authed + FROM ' . TOPICS_TABLE . ' t + WHERE ' . $db->sql_in_set('t.topic_id', $topic_ids); + $result = $db->sql_query($sql); + $row_data = $db->sql_fetchrow($result); + $db->sql_freeresult($result); + + $sync_sql = array(); + + if ($row_data['topic_posts']) + { + $sync_sql[$to_forum_id][] = 'forum_posts = forum_posts + ' . (int) $row_data['topic_posts']; + } + + if ($row_data['topics_authed']) + { + $sync_sql[$to_forum_id][] = 'forum_topics = forum_topics + ' . (int) $row_data['topics_authed']; + } + + $sync_sql[$to_forum_id][] = 'forum_topics_real = forum_topics_real + ' . (int) sizeof($topic_ids); + + foreach ($sync_sql as $forum_id_key => $array) + { + $sql = 'UPDATE ' . FORUMS_TABLE . ' + SET ' . implode(', ', $array) . ' + WHERE forum_id = ' . $forum_id_key; + $db->sql_query($sql); + } + sync('forum', 'forum_id', $to_forum_id); } } @@ -387,6 +418,36 @@ function change_topic_type($action, $topic_ids) WHERE ' . $db->sql_in_set('topic_id', $topic_ids); $db->sql_query($sql); + // Do a little forum sync stuff + $sql = 'SELECT SUM(t.topic_replies + t.topic_approved) as topic_posts, COUNT(t.topic_approved) as topics_authed + FROM ' . TOPICS_TABLE . ' t + WHERE ' . $db->sql_in_set('t.topic_id', $topic_ids); + $result = $db->sql_query($sql); + $row_data = $db->sql_fetchrow($result); + $db->sql_freeresult($result); + + $sync_sql = array(); + + if ($row_data['topic_posts']) + { + $sync_sql[$forum_id][] = 'forum_posts = forum_posts - ' . (int) $row_data['topic_posts']; + } + + if ($row_data['topics_authed']) + { + $sync_sql[$forum_id][] = 'forum_topics = forum_topics - ' . (int) $row_data['topics_authed']; + } + + $sync_sql[$forum_id][] = 'forum_topics_real = forum_topics_real - ' . (int) sizeof($topic_ids); + + foreach ($sync_sql as $forum_id_key => $array) + { + $sql = 'UPDATE ' . FORUMS_TABLE . ' + SET ' . implode(', ', $array) . ' + WHERE forum_id = ' . $forum_id_key; + $db->sql_query($sql); + } + sync('forum', 'forum_id', $forum_id); } } @@ -520,6 +581,45 @@ function mcp_move_topic($topic_ids) $topic_data = get_topic_data($topic_ids); $leave_shadow = (isset($_POST['move_leave_shadow'])) ? true : false; + $topics_moved = sizeof($topic_ids); + $topics_authed_moved = 0; + $forum_sync_data = array(); + + $forum_sync_data[$forum_id] = current($topic_data); + $forum_sync_data[$to_forum_id] = $forum_data; + + foreach ($topic_data as $topic_id => $topic_info) + { + if ($topic_info['topic_approved'] == '1') + { + $topics_authed_moved++; + } + } + + $db->sql_transaction('begin'); + + $sql = 'SELECT SUM(t.topic_replies + t.topic_approved) as topic_posts + FROM ' . TOPICS_TABLE . ' t + WHERE ' . $db->sql_in_set('t.topic_id', $topic_ids); + $result = $db->sql_query($sql); + $row_data = $db->sql_fetchrow($result); + $db->sql_freeresult($result); + + $sync_sql = array(); + + if ($row_data['topic_posts']) + { + $sync_sql[$forum_id][] = 'forum_posts = forum_posts - ' . (int) $row_data['topic_posts']; + $sync_sql[$to_forum_id][] = 'forum_posts = forum_posts + ' . (int) $row_data['topic_posts']; + } + + if ($topics_authed_moved) + { + $sync_sql[$to_forum_id][] = 'forum_topics = forum_topics + ' . (int) $topics_authed_moved; + } + + $sync_sql[$to_forum_id][] = 'forum_topics_real = forum_topics_real + ' . (int) $topics_moved; + // Move topics, but do not resync yet move_topics($topic_ids, $to_forum_id, false); @@ -556,12 +656,15 @@ function mcp_move_topic($topic_ids) 'topic_replies' => (int) $row['topic_replies'], 'topic_replies_real' => (int) $row['topic_replies_real'], 'topic_status' => ITEM_MOVED, - 'topic_type' => (int) $row['topic_type'], + 'topic_type' => POST_NORMAL, 'topic_first_post_id' => (int) $row['topic_first_post_id'], + 'topic_first_poster_colour'=>(string) $row['topic_first_poster_colour'], 'topic_first_poster_name'=> (string) $row['topic_first_poster_name'], 'topic_last_post_id' => (int) $row['topic_last_post_id'], 'topic_last_poster_id' => (int) $row['topic_last_poster_id'], + 'topic_last_poster_colour'=>(string) $row['topic_last_poster_colour'], 'topic_last_poster_name'=> (string) $row['topic_last_poster_name'], + 'topic_last_post_subject'=> (string) $row['topic_last_post_subject'], 'topic_last_post_time' => (int) $row['topic_last_post_time'], 'topic_last_view_time' => (int) $row['topic_last_view_time'], 'topic_moved_id' => (int) $row['topic_id'], @@ -575,14 +678,33 @@ function mcp_move_topic($topic_ids) ); $db->sql_query('INSERT INTO ' . TOPICS_TABLE . $db->sql_build_array('INSERT', $shadow)); + + $topics_authed_moved--; + $topics_moved--; } } unset($topic_data); - // Now sync forums - sync('forum', 'forum_id', $forum_ids); + $sync_sql[$forum_id][] = 'forum_topics_real = forum_topics_real - ' . (int) $topics_moved; + + if ($topics_authed_moved) + { + $sync_sql[$forum_id][] = 'forum_topics = forum_topics - ' . (int) $topics_authed_moved; + } $success_msg = (sizeof($topic_ids) == 1) ? 'TOPIC_MOVED_SUCCESS' : 'TOPICS_MOVED_SUCCESS'; + + foreach ($sync_sql as $forum_id_key => $array) + { + $sql = 'UPDATE ' . FORUMS_TABLE . ' + SET ' . implode(', ', $array) . ' + WHERE forum_id = ' . $forum_id_key; + $db->sql_query($sql); + } + + $db->sql_transaction('commit'); + + sync('forum', 'forum_id', array($forum_id, $to_forum_id)); } else { @@ -854,6 +976,7 @@ function mcp_fork_topic($topic_ids) $total_posts = 0; $new_topic_id_list = array(); + foreach ($topic_data as $topic_id => $topic_row) { $sql_ary = array( @@ -952,7 +1075,8 @@ function mcp_fork_topic($topic_ids) 'bbcode_uid' => (string) $row['bbcode_uid'], 'post_edit_time' => (int) $row['post_edit_time'], 'post_edit_count' => (int) $row['post_edit_count'], - 'post_edit_locked' => (int) $row['post_edit_locked'] + 'post_edit_locked' => (int) $row['post_edit_locked'], + 'post_postcount' => 0, ); $db->sql_query('INSERT INTO ' . POSTS_TABLE . ' ' . $db->sql_build_array('INSERT', $sql_ary)); @@ -970,9 +1094,10 @@ function mcp_fork_topic($topic_ids) AND in_message = 0"; $result = $db->sql_query($sql); + $sql_ary = array(); while ($attach_row = $db->sql_fetchrow($result)) { - $sql_ary = array( + $sql_ary[] = array( 'post_msg_id' => (int) $new_post_id, 'topic_id' => (int) $new_topic_id, 'in_message' => 0, @@ -988,16 +1113,55 @@ function mcp_fork_topic($topic_ids) 'filetime' => (int) $attach_row['filetime'], 'thumbnail' => (int) $attach_row['thumbnail'] ); - - $db->sql_query('INSERT INTO ' . ATTACHMENTS_TABLE . ' ' . $db->sql_build_array('INSERT', $sql_ary)); } $db->sql_freeresult($result); + + if (sizeof($sql_ary)) + { + $db->sql_multi_insert(ATTACHMENTS_TABLE, $sql_ary); + } } } + + $sql = 'SELECT user_id, notify_status + FROM ' . TOPICS_WATCH_TABLE . ' + WHERE topic_id = ' . $topic_id; + $result = $db->sql_query($sql); + + $sql_ary = array(); + while ($row = $db->sql_fetchrow($result)) + { + $sql_ary[] = array( + 'topic_id' => $new_topic_id, + 'user_id' => $row['user_id'], + 'notify_status' => $row['notify_status'], + ); + } + $db->sql_freeresult($result); + + if (sizeof($sql_ary)) + { + $db->sql_multi_insert(TOPICS_WATCH_TABLE, $sql_ary); + } } // Sync new topics, parent forums and board stats sync('topic', 'topic_id', $new_topic_id_list, true); + + $sync_sql = array(); + + $sync_sql[$to_forum_id][] = 'forum_posts = forum_posts + ' . $total_posts; + $sync_sql[$to_forum_id][] = 'forum_topics = forum_topics + ' . sizeof($new_topic_id_list); + $sync_sql[$to_forum_id][] = 'forum_topics_real = forum_topics_real + ' . sizeof($new_topic_id_list); + + foreach ($sync_sql as $forum_id_key => $array) + { + $sql = 'UPDATE ' . FORUMS_TABLE . ' + SET ' . implode(', ', $array) . ' + WHERE forum_id = ' . $forum_id_key; + $db->sql_query($sql); + } + sync('forum', 'forum_id', $to_forum_id, true); set_config('num_topics', $config['num_topics'] + sizeof($new_topic_id_list), true); set_config('num_posts', $config['num_posts'] + $total_posts, true); @@ -1012,7 +1176,7 @@ function mcp_fork_topic($topic_ids) else { $template->assign_vars(array( - 'S_FORUM_SELECT' => make_forum_select($to_forum_id, false, false, true, true), + 'S_FORUM_SELECT' => make_forum_select($to_forum_id, false, false, true, true, true), 'S_CAN_LEAVE_SHADOW' => false, 'ADDITIONAL_MSG' => $additional_msg) ); diff --git a/phpBB/includes/mcp/mcp_notes.php b/phpBB/includes/mcp/mcp_notes.php index 1b3c36ac22..447d000cb4 100755 --- a/phpBB/includes/mcp/mcp_notes.php +++ b/phpBB/includes/mcp/mcp_notes.php @@ -18,7 +18,7 @@ class mcp_notes var $p_master; var $u_action; - function mcp_main(&$p_master) + function mcp_notes(&$p_master) { $this->p_master = &$p_master; } @@ -91,6 +91,15 @@ class mcp_notes $user_id = $userrow['user_id']; + // Populate user id to the currently active module (this module) + // The following method is another way of adjusting module urls. It is the easy variant if we want + // to directly adjust the current module url based on data retrieved within the same module. + if (strpos($this->u_action, "&u=$user_id") === false) + { + $this->p_master->adjust_url('&u=' . $user_id); + $this->u_action .= "&u=$user_id"; + } + $deletemark = ($action == 'del_marked') ? true : false; $deleteall = ($action == 'del_all') ? true : false; $marked = request_var('marknote', array(0)); @@ -135,34 +144,21 @@ class mcp_notes add_log('user', $user_id, 'LOG_USER_GENERAL', $usernote); - $redirect = $this->u_action . '&u=' . $user_id; + $redirect = $this->u_action; meta_refresh(3, $redirect); + trigger_error($user->lang['USER_FEEDBACK_ADDED'] . '

    ' . sprintf($user->lang['RETURN_PAGE'], '', '')); } // Generate the appropriate user information for the user we are looking at - $rank_title = $rank_img = ''; -// get_user_rank($userrow['user_rank'], $userrow['user_posts'], $rank_title, $rank_img); - - $avatar_img = ''; - - if (!empty($userrow['user_avatar'])) + if (!function_exists('get_user_avatar')) { - switch ($userrow['user_avatar_type']) - { - case AVATAR_UPLOAD: - $avatar_img = $config['avatar_path'] . '/'; - break; - - case AVATAR_GALLERY: - $avatar_img = $config['avatar_gallery_path'] . '/'; - break; - } - - $avatar_img .= $userrow['user_avatar']; - $avatar_img = ''; + include($phpbb_root_path . 'includes/functions_display.' . $phpEx); } + $rank_title = $rank_img = ''; + $avatar_img = get_user_avatar($userrow['user_avatar'], $userrow['user_avatar_type'], $userrow['user_avatar_width'], $userrow['user_avatar_height']); + $limit_days = array(0 => $user->lang['ALL_ENTRIES'], 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_text = array('a' => $user->lang['SORT_USERNAME'], 'b' => $user->lang['SORT_DATE'], 'c' => $user->lang['SORT_IP'], 'd' => $user->lang['SORT_ACTION']); $sort_by_sql = array('a' => 'u.username_clean', 'b' => 'l.log_time', 'c' => 'l.log_ip', 'd' => 'l.log_operation'); @@ -195,7 +191,7 @@ class mcp_notes } $template->assign_vars(array( - 'U_POST_ACTION' => $this->u_action . '&u=' . $user_id, + 'U_POST_ACTION' => $this->u_action, 'S_CLEAR_ALLOWED' => ($auth->acl_get('a_clearlogs')) ? true : false, 'S_SELECT_SORT_DIR' => $s_sort_dir, 'S_SELECT_SORT_KEY' => $s_sort_key, @@ -204,7 +200,7 @@ class mcp_notes 'L_TITLE' => $user->lang['MCP_NOTES_USER'], 'PAGE_NUMBER' => on_page($log_count, $config['posts_per_page'], $start), - 'PAGINATION' => generate_pagination($this->u_action . "&u=$user_id&st=$st&sk=$sk&sd=$sd", $log_count, $config['posts_per_page'], $start), + 'PAGINATION' => generate_pagination($this->u_action . "&st=$st&sk=$sk&sd=$sd", $log_count, $config['posts_per_page'], $start), 'TOTAL_REPORTS' => ($log_count == 1) ? $user->lang['LIST_REPORT'] : sprintf($user->lang['LIST_REPORTS'], $log_count), 'USERNAME' => $userrow['username'], diff --git a/phpBB/includes/mcp/mcp_post.php b/phpBB/includes/mcp/mcp_post.php index 67f5472134..8dbbdba92e 100644 --- a/phpBB/includes/mcp/mcp_post.php +++ b/phpBB/includes/mcp/mcp_post.php @@ -14,7 +14,7 @@ function mcp_post_details($id, $mode, $action) { global $phpEx, $phpbb_root_path, $config; - global $template, $db, $user, $auth; + global $template, $db, $user, $auth, $cache; $user->add_lang('posting'); @@ -46,6 +46,8 @@ function mcp_post_details($id, $mode, $action) $template->assign_vars(array( 'RETURN_POST' => sprintf($user->lang['RETURN_POST'], '', ''), + 'U_RETURN_POST' => append_sid("{$phpbb_root_path}mcp.$phpEx", "i=$id&mode=$mode&p=$post_id"), + 'L_RETURN_POST' => sprintf($user->lang['RETURN_POST'], '', ''), 'WHOIS' => trim($whois)) ); @@ -90,6 +92,7 @@ function mcp_post_details($id, $mode, $action) // Set some vars $users_ary = $usernames_ary = array(); + $attachments = $extensions = array(); $post_id = $post_info['post_id']; $topic_tracking_info = array(); @@ -118,6 +121,43 @@ function mcp_post_details($id, $mode, $action) } $message = smiley_text($message); + if ($post_info['post_attachment'] && $auth->acl_get('u_download') && $auth->acl_get('f_download', $post_info['forum_id'])) + { + $extensions = $cache->obtain_attach_extensions($post_info['forum_id']); + + $sql = 'SELECT * + FROM ' . ATTACHMENTS_TABLE . ' + WHERE post_msg_id = ' . $post_id . ' + AND in_message = 0 + ORDER BY filetime DESC, post_msg_id ASC'; + $result = $db->sql_query($sql); + + while ($row = $db->sql_fetchrow($result)) + { + $attachments[] = $row; + } + $db->sql_freeresult($result); + + if (sizeof($attachments)) + { + $update_count = array(); + parse_attachments($post_info['forum_id'], $message, $attachments, $update_count); + } + + // Display not already displayed Attachments for this post, we already parsed them. ;) + if (!empty($attachments)) + { + $template->assign_var('S_HAS_ATTACHMENTS', true); + + foreach ($attachments as $attachment) + { + $template->assign_block_vars('attachment', array( + 'DISPLAY_ATTACHMENT' => $attachment) + ); + } + } + } + $template->assign_vars(array( 'U_MCP_ACTION' => "$url&i=main&quickmod=1", // Use this for mode paramaters 'U_POST_ACTION' => "$url&i=$id&mode=post_details", // Use this for action parameters @@ -139,7 +179,7 @@ function mcp_post_details($id, $mode, $action) 'U_MCP_APPROVE' => append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=queue&mode=approve_details&f=' . $post_info['forum_id'] . '&p=' . $post_id), 'U_MCP_REPORT' => append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=reports&mode=report_details&f=' . $post_info['forum_id'] . '&p=' . $post_id), 'U_MCP_USER_NOTES' => append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=notes&mode=user_notes&u=' . $post_info['user_id']), - 'U_MCP_WARN_USER' => ($auth->acl_getf_global('m_warn')) ? append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=warn&mode=warn_user&u=' . $post_info['user_id']) : '', + 'U_MCP_WARN_USER' => ($auth->acl_get('m_warn')) ? append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=warn&mode=warn_user&u=' . $post_info['user_id']) : '', 'U_VIEW_POST' => append_sid("{$phpbb_root_path}viewtopic.$phpEx", 'f=' . $post_info['forum_id'] . '&p=' . $post_info['post_id'] . '#p' . $post_info['post_id']), 'U_VIEW_TOPIC' => append_sid("{$phpbb_root_path}viewtopic.$phpEx", 'f=' . $post_info['forum_id'] . '&t=' . $post_info['topic_id']), @@ -161,9 +201,10 @@ function mcp_post_details($id, $mode, $action) 'POST_SUBJECT' => $post_info['post_subject'], 'POST_DATE' => $user->format_date($post_info['post_time']), 'POST_IP' => $post_info['poster_ip'], - 'POST_IPADDR' => @gethostbyaddr($post_info['poster_ip']), + 'POST_IPADDR' => ($auth->acl_get('m_info', $post_info['forum_id']) && request_var('lookup', '')) ? @gethostbyaddr($post_info['poster_ip']) : '', 'POST_ID' => $post_info['post_id'], + 'U_LOOKUP_IP' => ($auth->acl_get('m_info', $post_info['forum_id'])) ? "$url&i=$id&mode=$mode&lookup={$post_info['poster_ip']}#ip" : '', 'U_WHOIS' => ($auth->acl_get('m_info', $post_info['forum_id'])) ? append_sid("{$phpbb_root_path}mcp.$phpEx", "i=$id&mode=$mode&action=whois&p=$post_id&ip={$post_info['poster_ip']}") : '', )); @@ -426,7 +467,7 @@ function change_poster(&$post_info, $userdata) $to_username = $userdata['username']; // Renew post info - $post_info = get_post_data(array($post_id)); + $post_info = get_post_data(array($post_id), false, true); if (!sizeof($post_info)) { diff --git a/phpBB/includes/mcp/mcp_queue.php b/phpBB/includes/mcp/mcp_queue.php index 6378295191..1492f64c43 100644 --- a/phpBB/includes/mcp/mcp_queue.php +++ b/phpBB/includes/mcp/mcp_queue.php @@ -18,14 +18,14 @@ class mcp_queue var $p_master; var $u_action; - function mcp_main(&$p_master) + function mcp_queue(&$p_master) { $this->p_master = &$p_master; } function main($id, $mode) { - global $auth, $db, $user, $template; + global $auth, $db, $user, $template, $cache; global $config, $phpbb_root_path, $phpEx, $action; include_once($phpbb_root_path . 'includes/functions_posting.' . $phpEx); @@ -64,6 +64,8 @@ class mcp_queue { case 'approve_details': + $this->tpl_name = 'mcp_post'; + $user->add_lang('posting'); $post_id = request_var('p', 0); @@ -99,7 +101,8 @@ class mcp_queue ); } - $topic_tracking_info = array(); + $extensions = $attachments = $topic_tracking_info = array(); + // Get topic tracking info if ($config['load_db_lastread']) { @@ -125,6 +128,43 @@ class mcp_queue } $message = smiley_text($message); + if ($post_info['post_attachment'] && $auth->acl_get('u_download') && $auth->acl_get('f_download', $post_info['forum_id'])) + { + $extensions = $cache->obtain_attach_extensions($post_info['forum_id']); + + $sql = 'SELECT * + FROM ' . ATTACHMENTS_TABLE . ' + WHERE post_msg_id = ' . $post_id . ' + AND in_message = 0 + ORDER BY filetime DESC, post_msg_id ASC'; + $result = $db->sql_query($sql); + + while ($row = $db->sql_fetchrow($result)) + { + $attachments[] = $row; + } + $db->sql_freeresult($result); + + if (sizeof($attachments)) + { + $update_count = array(); + parse_attachments($post_info['forum_id'], $message, $attachments, $update_count); + } + + // Display not already displayed Attachments for this post, we already parsed them. ;) + if (!empty($attachments)) + { + $template->assign_var('S_HAS_ATTACHMENTS', true); + + foreach ($attachments as $attachment) + { + $template->assign_block_vars('attachment', array( + 'DISPLAY_ATTACHMENT' => $attachment) + ); + } + } + } + $post_url = append_sid("{$phpbb_root_path}viewtopic.$phpEx", 'f=' . $post_info['forum_id'] . '&p=' . $post_info['post_id'] . '#p' . $post_info['post_id']); $topic_url = append_sid("{$phpbb_root_path}viewtopic.$phpEx", 'f=' . $post_info['forum_id'] . '&t=' . $post_info['topic_id']); @@ -141,7 +181,7 @@ class mcp_queue 'U_MCP_APPROVE' => append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=queue&mode=approve_details&f=' . $post_info['forum_id'] . '&p=' . $post_id), 'U_MCP_REPORT' => append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=reports&mode=report_details&f=' . $post_info['forum_id'] . '&p=' . $post_id), 'U_MCP_USER_NOTES' => append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=notes&mode=user_notes&u=' . $post_info['user_id']), - 'U_MCP_WARN_USER' => ($auth->acl_getf_global('m_warn')) ? append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=warn&mode=warn_user&u=' . $post_info['user_id']) : '', + 'U_MCP_WARN_USER' => ($auth->acl_get('m_warn')) ? append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=warn&mode=warn_user&u=' . $post_info['user_id']) : '', 'U_VIEW_POST' => $post_url, 'U_VIEW_TOPIC' => $topic_url, @@ -163,16 +203,18 @@ class mcp_queue 'POST_SUBJECT' => $post_info['post_subject'], 'POST_DATE' => $user->format_date($post_info['post_time']), 'POST_IP' => $post_info['poster_ip'], - 'POST_IPADDR' => @gethostbyaddr($post_info['poster_ip']), - 'POST_ID' => $post_info['post_id']) - ); + 'POST_IPADDR' => ($auth->acl_get('m_info', $post_info['forum_id']) && request_var('lookup', '')) ? @gethostbyaddr($post_info['poster_ip']) : '', + 'POST_ID' => $post_info['post_id'], - $this->tpl_name = 'mcp_post'; + 'U_LOOKUP_IP' => ($auth->acl_get('m_info', $post_info['forum_id'])) ? append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=queue&mode=approve_details&f=' . $post_info['forum_id'] . '&p=' . $post_id . '&lookup=' . $post_info['poster_ip']) . '#ip' : '', + )); break; case 'unapproved_topics': case 'unapproved_posts': + $user->add_lang(array('viewtopic', 'viewforum')); + $topic_id = request_var('t', 0); $forum_info = array(); @@ -274,7 +316,8 @@ class mcp_queue FROM ' . POSTS_TABLE . ' p, ' . TOPICS_TABLE . ' t, ' . USERS_TABLE . ' u WHERE ' . $db->sql_in_set('p.post_id', $post_ids) . ' AND t.topic_id = p.topic_id - AND u.user_id = p.poster_id'; + AND u.user_id = p.poster_id + ORDER BY ' . $sort_order_sql; $result = $db->sql_query($sql); $post_data = $rowset = array(); @@ -351,6 +394,7 @@ class mcp_queue } $template->assign_block_vars('postrow', array( + 'U_TOPIC' => append_sid("{$phpbb_root_path}viewtopic.$phpEx", 'f=' . $row['forum_id'] . '&t=' . $row['topic_id']), 'U_VIEWFORUM' => (!$global_topic) ? append_sid("{$phpbb_root_path}viewforum.$phpEx", 'f=' . $row['forum_id']) : '', 'U_VIEWPOST' => append_sid("{$phpbb_root_path}viewtopic.$phpEx", 'f=' . $row['forum_id'] . '&p=' . $row['post_id']) . (($mode == 'unapproved_posts') ? '#p' . $row['post_id'] : ''), 'U_VIEW_DETAILS' => append_sid("{$phpbb_root_path}mcp.$phpEx", "i=queue&start=$start&mode=approve_details&f={$row['forum_id']}&p={$row['post_id']}" . (($mode == 'unapproved_topics') ? "&t={$row['topic_id']}" : '')), @@ -363,6 +407,7 @@ class mcp_queue 'POST_ID' => $row['post_id'], 'FORUM_NAME' => (!$global_topic) ? $forum_names[$row['forum_id']] : $user->lang['GLOBAL_ANNOUNCEMENT'], 'POST_SUBJECT' => $row['post_subject'], + 'TOPIC_TITLE' => $row['topic_title'], 'POST_TIME' => $user->format_date($row['post_time'])) ); } @@ -379,11 +424,11 @@ class mcp_queue 'S_MCP_ACTION' => build_url(array('t', 'f', 'sd', 'st', 'sk')), 'S_TOPICS' => ($mode == 'unapproved_posts') ? false : true, - 'PAGINATION' => generate_pagination($this->u_action . "&f=$forum_id", $total, $config['topics_per_page'], $start), + 'PAGINATION' => generate_pagination($this->u_action . "&f=$forum_id&st=$sort_days&sk=$sort_key&sd=$sort_dir", $total, $config['topics_per_page'], $start), 'PAGE_NUMBER' => on_page($total, $config['topics_per_page'], $start), 'TOPIC_ID' => $topic_id, - 'TOTAL' => $total) - ); + 'TOTAL' => ($total == 1) ? (($mode == 'unapproved_posts') ? $user->lang['VIEW_TOPIC_POST'] : $user->lang['VIEW_FORUM_TOPIC']) : sprintf((($mode == 'unapproved_posts') ? $user->lang['VIEW_TOPIC_POSTS'] : $user->lang['VIEW_FORUM_TOPICS']), $total), + )); $this->tpl_name = 'mcp_queue'; break; @@ -401,7 +446,7 @@ function approve_post($post_id_list, $id, $mode) if (!check_ids($post_id_list, POSTS_TABLE, 'post_id', array('m_approve'))) { - trigger_error('NOT_AUTHORIZED'); + trigger_error('NOT_AUTHORISED'); } $redirect = request_var('redirect', build_url(array('_f_', 'quickmod'))); @@ -425,7 +470,7 @@ function approve_post($post_id_list, $id, $mode) // If Post -> total_posts = total_posts+1, forum_posts = forum_posts+1, topic_replies = topic_replies+1 $total_topics = $total_posts = 0; - $forum_topics_posts = $topic_approve_sql = $topic_replies_sql = $post_approve_sql = $topic_id_list = $forum_id_list = array(); + $forum_topics_posts = $topic_approve_sql = $topic_replies_sql = $post_approve_sql = $topic_id_list = $forum_id_list = $approve_log = array(); $update_forum_information = false; @@ -454,8 +499,14 @@ function approve_post($post_id_list, $id, $mode) $total_topics++; $forum_topics_posts[$post_data['forum_id']]['forum_topics']++; } - $topic_approve_sql[] = $post_data['topic_id']; + + $approve_log[] = array( + 'type' => 'topic', + 'post_subject' => $post_data['post_subject'], + 'forum_id' => $post_data['forum_id'], + 'topic_id' => $post_data['topic_id'], + ); } else { @@ -464,6 +515,13 @@ function approve_post($post_id_list, $id, $mode) $topic_replies_sql[$post_data['topic_id']] = 0; } $topic_replies_sql[$post_data['topic_id']]++; + + $approve_log[] = array( + 'type' => 'post', + 'post_subject' => $post_data['post_subject'], + 'forum_id' => $post_data['forum_id'], + 'topic_id' => $post_data['topic_id'], + ); } if ($post_data['forum_id']) @@ -478,6 +536,14 @@ function approve_post($post_id_list, $id, $mode) $total_posts++; $forum_topics_posts[$post_data['forum_id']]['forum_posts']++; + + // Increment by topic_replies if we approve a topic... + // This works because we do not adjust the topic_replies when re-approving a topic after an edit. + if ($post_data['topic_first_post_id'] == $post_id && $post_data['topic_replies']) + { + $total_posts += $post_data['topic_replies']; + $forum_topics_posts[$post_data['forum_id']]['forum_posts'] += $post_data['topic_replies']; + } } $post_approve_sql[] = $post_id; @@ -505,6 +571,11 @@ function approve_post($post_id_list, $id, $mode) $db->sql_query($sql); } + foreach ($approve_log as $log_data) + { + add_log('mod', $log_data['forum_id'], $log_data['topic_id'], ($log_data['type'] == 'topic') ? 'LOG_TOPIC_APPROVED' : 'LOG_POST_APPROVED', $log_data['post_subject']); + } + if (sizeof($topic_replies_sql)) { foreach ($topic_replies_sql as $topic_id => $num_replies) @@ -600,6 +671,12 @@ function approve_post($post_id_list, $id, $mode) user_notification('reply', $post_data['post_subject'], $post_data['topic_title'], $post_data['forum_name'], $post_data['forum_id'], $post_data['topic_id'], $post_id); } } + + if (sizeof($post_id_list) == 1) + { + $post_data = $post_info[$post_id_list[0]]; + $post_url = append_sid("{$phpbb_root_path}viewtopic.$phpEx", "f={$post_data['forum_id']}&t={$post_data['topic_id']}&p={$post_data['post_id']}") . '#p' . $post_data['post_id']; + } unset($post_info); if ($total_topics) @@ -631,7 +708,15 @@ function approve_post($post_id_list, $id, $mode) else { meta_refresh(3, $redirect); - trigger_error($user->lang[$success_msg] . '

    ' . sprintf($user->lang['RETURN_PAGE'], "", '')); + + // If approving one post, also give links back to post... + $add_message = ''; + if (sizeof($post_id_list) == 1 && !empty($post_url)) + { + $add_message = '

    ' . sprintf($user->lang['RETURN_POST'], '', ''); + } + + trigger_error($user->lang[$success_msg] . '

    ' . sprintf($user->lang['RETURN_PAGE'], "", '') . $add_message); } } @@ -645,7 +730,7 @@ function disapprove_post($post_id_list, $id, $mode) if (!check_ids($post_id_list, POSTS_TABLE, 'post_id', array('m_approve'))) { - trigger_error('NOT_AUTHORIZED'); + trigger_error('NOT_AUTHORISED'); } $redirect = request_var('redirect', build_url(array('t', 'mode', '_f_', 'quickmod')) . '&mode=unapproved_topics'); @@ -694,7 +779,7 @@ function disapprove_post($post_id_list, $id, $mode) // If Post -> topic_replies_real -= 1 $num_disapproved = 0; - $forum_topics_real = $topic_id_list = $forum_id_list = $topic_replies_real_sql = $post_disapprove_sql = array(); + $forum_topics_real = $topic_id_list = $forum_id_list = $topic_replies_real_sql = $post_disapprove_sql = $disapprove_log = array(); foreach ($post_info as $post_id => $post_data) { @@ -706,6 +791,9 @@ function disapprove_post($post_id_list, $id, $mode) } // Topic or Post. ;) + /** + * @todo this probably is a different method than the one used by delete_posts, does this cause counter inconsistency? + */ if ($post_data['topic_first_post_id'] == $post_id && $post_data['topic_last_post_id'] == $post_id) { if ($post_data['forum_id']) @@ -717,6 +805,13 @@ function disapprove_post($post_id_list, $id, $mode) $forum_topics_real[$post_data['forum_id']]++; $num_disapproved++; } + + $disapprove_log[] = array( + 'type' => 'topic', + 'post_subject' => $post_data['post_subject'], + 'forum_id' => $post_data['forum_id'], + 'topic_id' => 0, // useless to log a topic id, as it will be deleted + ); } else { @@ -725,11 +820,20 @@ function disapprove_post($post_id_list, $id, $mode) $topic_replies_real_sql[$post_data['topic_id']] = 0; } $topic_replies_real_sql[$post_data['topic_id']]++; + + $disapprove_log[] = array( + 'type' => 'post', + 'post_subject' => $post_data['post_subject'], + 'forum_id' => $post_data['forum_id'], + 'topic_id' => $post_data['topic_id'], + ); } $post_disapprove_sql[] = $post_id; } + unset($post_data); + if (sizeof($forum_topics_real)) { foreach ($forum_topics_real as $forum_id => $topics_real) @@ -761,6 +865,11 @@ function disapprove_post($post_id_list, $id, $mode) // We do not check for permissions here, because the moderator allowed approval/disapproval should be allowed to delete the disapproved posts delete_posts('post_id', $post_disapprove_sql); + + foreach ($disapprove_log as $log_data) + { + add_log('mod', $log_data['forum_id'], $log_data['topic_id'], ($log_data['type'] == 'topic') ? 'LOG_TOPIC_DISAPPROVED' : 'LOG_POST_DISAPPROVED', $log_data['post_subject'], $disapprove_reason); + } } unset($post_disapprove_sql, $topic_replies_real_sql); diff --git a/phpBB/includes/mcp/mcp_reports.php b/phpBB/includes/mcp/mcp_reports.php index 78fa02cccc..c318472b7d 100755 --- a/phpBB/includes/mcp/mcp_reports.php +++ b/phpBB/includes/mcp/mcp_reports.php @@ -18,14 +18,14 @@ class mcp_reports var $p_master; var $u_action; - function mcp_main(&$p_master) + function mcp_reports(&$p_master) { $this->p_master = &$p_master; } function main($id, $mode) { - global $auth, $db, $user, $template; + global $auth, $db, $user, $template, $cache; global $config, $phpbb_root_path, $phpEx, $action; include_once($phpbb_root_path . 'includes/functions_posting.' . $phpEx); @@ -41,14 +41,14 @@ class mcp_reports case 'delete': include_once($phpbb_root_path . 'includes/functions_messenger.' . $phpEx); - $post_id_list = request_var('post_id_list', array(0)); + $report_id_list = request_var('report_id_list', array(0)); - if (!sizeof($post_id_list)) + if (!sizeof($report_id_list)) { - trigger_error('NO_POST_SELECTED'); + trigger_error('NO_REPORT_SELECTED'); } - close_report($post_id_list, $mode, $action); + close_report($report_id_list, $mode, $action); break; } @@ -64,30 +64,34 @@ class mcp_reports // closed reports are accessed by report id $report_id = request_var('r', 0); - $sql = 'SELECT r.post_id, r.user_id, r.report_closed, report_time, r.report_text, rr.reason_title, rr.reason_description, u.username, u.username_clean, u.user_colour + $sql = 'SELECT r.post_id, r.user_id, r.report_id, r.report_closed, report_time, r.report_text, rr.reason_title, rr.reason_description, u.username, u.username_clean, u.user_colour FROM ' . REPORTS_TABLE . ' r, ' . REPORTS_REASONS_TABLE . ' rr, ' . USERS_TABLE . ' u - WHERE ' . (($report_id) ? 'r.report_id = ' . $report_id : "r.post_id = $post_id AND r.report_closed = 0") . ' + WHERE ' . (($report_id) ? 'r.report_id = ' . $report_id : "r.post_id = $post_id") . ' AND rr.reason_id = r.reason_id - AND r.user_id = u.user_id'; - $result = $db->sql_query($sql); + AND r.user_id = u.user_id + ORDER BY report_closed ASC'; + $result = $db->sql_query_limit($sql, 1); $report = $db->sql_fetchrow($result); $db->sql_freeresult($result); if (!$report) { - trigger_error('NO_POST_REPORT'); + trigger_error('NO_REPORT'); } - if ($report_id) + if (!$report_id && $report['report_closed']) { - $post_id = $report['post_id']; + trigger_error('REPORT_CLOSED'); } + $post_id = $report['post_id']; + $report_id = $report['report_id']; + $post_info = get_post_data(array($post_id), 'm_report', true); if (!sizeof($post_info)) { - trigger_error('NO_POST_SELECTED'); + trigger_error('NO_REPORT_SELECTED'); } $post_info = $post_info[$post_id]; @@ -107,7 +111,7 @@ class mcp_reports ); } - $topic_tracking_info = array(); + $topic_tracking_info = $extensions = $attachments = array(); // Get topic tracking info if ($config['load_db_lastread']) { @@ -133,9 +137,46 @@ class mcp_reports } $message = smiley_text($message); + if ($post_info['post_attachment'] && $auth->acl_get('u_download') && $auth->acl_get('f_download', $post_info['forum_id'])) + { + $extensions = $cache->obtain_attach_extensions($post_info['forum_id']); + + $sql = 'SELECT * + FROM ' . ATTACHMENTS_TABLE . ' + WHERE post_msg_id = ' . $post_id . ' + AND in_message = 0 + ORDER BY filetime DESC, post_msg_id ASC'; + $result = $db->sql_query($sql); + + while ($row = $db->sql_fetchrow($result)) + { + $attachments[] = $row; + } + $db->sql_freeresult($result); + + if (sizeof($attachments)) + { + $update_count = array(); + parse_attachments($post_info['forum_id'], $message, $attachments, $update_count); + } + + // Display not already displayed Attachments for this post, we already parsed them. ;) + if (!empty($attachments)) + { + $template->assign_var('S_HAS_ATTACHMENTS', true); + + foreach ($attachments as $attachment) + { + $template->assign_block_vars('attachment', array( + 'DISPLAY_ATTACHMENT' => $attachment) + ); + } + } + } + $template->assign_vars(array( 'S_MCP_REPORT' => true, - 'S_CLOSE_ACTION' => $this->u_action . '&p=' . $post_id . 'f=' . $forum_id, + 'S_CLOSE_ACTION' => $this->u_action . '&p=' . $post_id . '&f=' . $forum_id, 'S_CAN_VIEWIP' => $auth->acl_get('m_info', $post_info['forum_id']), 'S_POST_REPORTED' => $post_info['post_reported'], 'S_POST_UNAPPROVED' => !$post_info['post_approved'], @@ -147,8 +188,8 @@ class mcp_reports 'U_MCP_REPORT' => append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=reports&mode=report_details&f=' . $post_info['forum_id'] . '&p=' . $post_id), 'U_MCP_REPORTER_NOTES' => append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=notes&mode=user_notes&u=' . $report['user_id']), 'U_MCP_USER_NOTES' => append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=notes&mode=user_notes&u=' . $post_info['user_id']), - 'U_MCP_WARN_REPORTER' => ($auth->acl_getf_global('m_warn')) ? append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=warn&mode=warn_user&u=' . $report['user_id']) : '', - 'U_MCP_WARN_USER' => ($auth->acl_getf_global('m_warn')) ? append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=warn&mode=warn_user&u=' . $post_info['user_id']) : '', + 'U_MCP_WARN_REPORTER' => ($auth->acl_get('m_warn')) ? append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=warn&mode=warn_user&u=' . $report['user_id']) : '', + 'U_MCP_WARN_USER' => ($auth->acl_get('m_warn')) ? append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=warn&mode=warn_user&u=' . $post_info['user_id']) : '', 'U_VIEW_POST' => append_sid("{$phpbb_root_path}viewtopic.$phpEx", 'f=' . $post_info['forum_id'] . '&p=' . $post_info['post_id'] . '#p' . $post_info['post_id']), 'U_VIEW_TOPIC' => append_sid("{$phpbb_root_path}viewtopic.$phpEx", 'f=' . $post_info['forum_id'] . '&t=' . $post_info['topic_id']), @@ -158,9 +199,10 @@ class mcp_reports 'RETURN_REPORTS' => sprintf($user->lang['RETURN_REPORTS'], '', ''), 'REPORTED_IMG' => $user->img('icon_topic_reported', $user->lang['POST_REPORTED']), + 'REPORT_DATE' => $user->format_date($report['report_time']), + 'REPORT_ID' => $report_id, 'REPORT_REASON_TITLE' => $reason['title'], 'REPORT_REASON_DESCRIPTION' => $reason['description'], - 'REPORT_DATE' => $user->format_date($report['report_time']), 'REPORT_TEXT' => $report['report_text'], 'POST_AUTHOR_FULL' => get_username_string('full', $post_info['user_id'], $post_info['username'], $post_info['user_colour'], $post_info['post_username']), @@ -174,12 +216,14 @@ class mcp_reports 'U_VIEW_REPORTER_PROFILE' => get_username_string('profile', $report['user_id'], $report['username'], $report['user_colour']), 'POST_PREVIEW' => $message, - 'POST_SUBJECT' => $post_info['post_subject'], + 'POST_SUBJECT' => ($post_info['post_subject']) ? $post_info['post_subject'] : $user->lang['NO_SUBJECT'], 'POST_DATE' => $user->format_date($post_info['post_time']), 'POST_IP' => $post_info['poster_ip'], - 'POST_IPADDR' => @gethostbyaddr($post_info['poster_ip']), - 'POST_ID' => $post_info['post_id']) - ); + 'POST_IPADDR' => ($auth->acl_get('m_info', $post_info['forum_id']) && request_var('lookup', '')) ? @gethostbyaddr($post_info['poster_ip']) : '', + 'POST_ID' => $post_info['post_id'], + + 'U_LOOKUP_IP' => ($auth->acl_get('m_info', $post_info['forum_id'])) ? $this->u_action . '&r=' . $report_id . '&p=' . $post_id . '&f=' . $forum_id . '&lookup=' . $post_info['poster_ip'] . '#ip' : '', + )); $this->tpl_name = 'mcp_post'; @@ -192,7 +236,7 @@ class mcp_reports $forum_info = array(); $forum_list_reports = get_forum_list('m_report', false, true); - if ($topic_id) + if ($topic_id && $forum_id) { $topic_info = get_topic_data(array($topic_id)); @@ -204,6 +248,10 @@ class mcp_reports $topic_info = $topic_info[$topic_id]; $forum_id = $topic_info['forum_id']; } + else if ($topic_id && !$forum_id) + { + $topic_id = 0; + } $forum_list = array(); @@ -300,7 +348,8 @@ class mcp_reports AND t.topic_id = p.topic_id AND r.post_id = p.post_id AND u.user_id = p.poster_id - AND ru.user_id = r.user_id'; + AND ru.user_id = r.user_id + ORDER BY ' . $sort_order_sql; $result = $db->sql_query($sql); $report_data = $rowset = array(); @@ -331,6 +380,7 @@ class mcp_reports 'POST_ID' => $row['post_id'], 'POST_SUBJECT' => $row['post_subject'], 'POST_TIME' => $user->format_date($row['post_time']), + 'REPORT_ID' => $row['report_id'], 'REPORT_TIME' => $user->format_date($row['report_time']), 'TOPIC_TITLE' => $row['topic_title']) ); @@ -349,7 +399,7 @@ class mcp_reports 'S_FORUM_OPTIONS' => $forum_options, 'S_CLOSED' => ($mode == 'reports_closed') ? true : false, - 'PAGINATION' => generate_pagination($this->u_action . "&f=$forum_id&t=$topic_id", $total, $config['topics_per_page'], $start), + 'PAGINATION' => generate_pagination($this->u_action . "&f=$forum_id&t=$topic_id&st=$sort_days&sk=$sort_key&sd=$sort_dir", $total, $config['topics_per_page'], $start), 'PAGE_NUMBER' => on_page($total, $config['topics_per_page'], $start), 'TOPIC_ID' => $topic_id, 'TOTAL' => $total, @@ -366,14 +416,26 @@ class mcp_reports /** * Closes a report */ -function close_report($post_id_list, $mode, $action) +function close_report($report_id_list, $mode, $action) { global $db, $template, $user, $config; global $phpEx, $phpbb_root_path; + $sql = 'SELECT r.post_id + FROM ' . REPORTS_TABLE . ' r + WHERE ' . $db->sql_in_set('r.report_id', $report_id_list); + $result = $db->sql_query($sql); + + $post_id_list = array(); + while ($row = $db->sql_fetchrow($result)) + { + $post_id_list[] = $row['post_id']; + } + $post_id_list = array_unique($post_id_list); + if (!check_ids($post_id_list, POSTS_TABLE, 'post_id', array('m_report'))) { - trigger_error('NOT_AUTHORIZED'); + trigger_error('NOT_AUTHORISED'); } if ($action == 'delete' && strpos($user->data['session_page'], 'mode=report_details') !== false) @@ -391,67 +453,68 @@ function close_report($post_id_list, $mode, $action) $success_msg = ''; $s_hidden_fields = build_hidden_fields(array( - 'i' => 'reports', - 'mode' => $mode, - 'post_id_list' => $post_id_list, - 'action' => $action, - 'redirect' => $redirect) + 'i' => 'reports', + 'mode' => $mode, + 'report_id_list' => $report_id_list, + 'action' => $action, + 'redirect' => $redirect) ); if (confirm_box(true)) { $post_info = get_post_data($post_id_list, 'm_report'); - $sql = 'SELECT r.post_id, r.report_closed, r.user_id, r.user_notify, u.username, u.username_clean, u.user_email, u.user_jabber, u.user_lang, u.user_notify_type + $sql = 'SELECT r.report_id, r.post_id, r.report_closed, r.user_id, r.user_notify, u.username, u.username_clean, u.user_email, u.user_jabber, u.user_lang, u.user_notify_type FROM ' . REPORTS_TABLE . ' r, ' . USERS_TABLE . ' u - WHERE ' . $db->sql_in_set('r.post_id', array_keys($post_info)) . ' + WHERE ' . $db->sql_in_set('r.report_id', $report_id_list) . ' ' . (($action == 'close') ? 'AND r.report_closed = 0' : '') . ' AND r.user_id = u.user_id'; $result = $db->sql_query($sql); - $reports = array(); + $reports = $close_report_posts = $close_report_topics = $notify_reporters = $report_id_list = array(); while ($report = $db->sql_fetchrow($result)) { - $reports[$report['post_id']] = $report; + $reports[$report['report_id']] = $report; + $report_id_list[] = $report['report_id']; + + if (!$report['report_closed']) + { + $close_report_posts[] = $report['post_id']; + $close_report_topics[] = $post_info[$report['post_id']]['topic_id']; + } + + if ($report['user_notify'] && !$report['report_closed']) + { + $notify_reporters[$report['report_id']] = &$reports[$report['report_id']]; + } } $db->sql_freeresult($result); - $close_report_posts = $close_report_topics = $notify_reporters = array(); - foreach ($post_info as $post_id => $post_data) - { - if (isset($reports[$post_id])) - { - $close_report_posts[] = $post_id; - $close_report_topics[] = $post_data['topic_id']; - - if ($reports[$post_id]['user_notify'] && !$reports[$post_id]['report_closed']) - { - $notify_reporters[$post_id] = $reports[$post_id]; - } - } - } - - if (sizeof($close_report_posts)) + if (sizeof($reports)) { + $close_report_posts = array_unique($close_report_posts); $close_report_topics = array_unique($close_report_topics); - // Get a list of topics that still contain reported posts - $sql = 'SELECT DISTINCT topic_id - FROM ' . POSTS_TABLE . ' - WHERE ' . $db->sql_in_set('topic_id', $close_report_topics) . ' - AND post_reported = 1 - AND ' . $db->sql_in_set('post_id', $close_report_posts, true); - $result = $db->sql_query($sql); - - $keep_report_topics = array(); - while ($row = $db->sql_fetchrow($result)) + if (sizeof($close_report_posts)) { - $keep_report_topics[] = $row['topic_id']; - } - $db->sql_freeresult($result); + // Get a list of topics that still contain reported posts + $sql = 'SELECT DISTINCT topic_id + FROM ' . POSTS_TABLE . ' + WHERE ' . $db->sql_in_set('topic_id', $close_report_topics) . ' + AND post_reported = 1 + AND ' . $db->sql_in_set('post_id', $close_report_posts, true); + $result = $db->sql_query($sql); - $close_report_topics = array_diff($close_report_topics, $keep_report_topics); - unset($keep_report_topics); + $keep_report_topics = array(); + while ($row = $db->sql_fetchrow($result)) + { + $keep_report_topics[] = $row['topic_id']; + } + $db->sql_freeresult($result); + + $close_report_topics = array_diff($close_report_topics, $keep_report_topics); + unset($keep_report_topics); + } $db->sql_transaction('begin'); @@ -459,44 +522,55 @@ function close_report($post_id_list, $mode, $action) { $sql = 'UPDATE ' . REPORTS_TABLE . ' SET report_closed = 1 - WHERE ' . $db->sql_in_set('post_id', $close_report_posts); + WHERE ' . $db->sql_in_set('report_id', $report_id_list); } else { $sql = 'DELETE FROM ' . REPORTS_TABLE . ' - WHERE ' . $db->sql_in_set('post_id', $close_report_posts); + WHERE ' . $db->sql_in_set('report_id', $report_id_list); } $db->sql_query($sql); - $sql = 'UPDATE ' . POSTS_TABLE . ' - SET post_reported = 0 - WHERE ' . $db->sql_in_set('post_id', $close_report_posts); - $db->sql_query($sql); - if (sizeof($close_report_topics)) + if (sizeof($close_report_posts)) { - $sql = 'UPDATE ' . TOPICS_TABLE . ' - SET topic_reported = 0 - WHERE ' . $db->sql_in_set('topic_id', $close_report_topics); + $sql = 'UPDATE ' . POSTS_TABLE . ' + SET post_reported = 0 + WHERE ' . $db->sql_in_set('post_id', $close_report_posts); $db->sql_query($sql); + + if (sizeof($close_report_topics)) + { + $sql = 'UPDATE ' . TOPICS_TABLE . ' + SET topic_reported = 0 + WHERE ' . $db->sql_in_set('topic_id', $close_report_topics); + $db->sql_query($sql); + } } $db->sql_transaction('commit'); } unset($close_report_posts, $close_report_topics); + foreach ($reports as $report) + { + add_log('mod', $post_info[$report['post_id']]['forum_id'], $post_info[$report['post_id']]['topic_id'], 'LOG_REPORT_' . strtoupper($action) . 'D', $post_info[$report['post_id']]['post_subject']); + } + $messenger = new messenger(); // Notify reporters if (sizeof($notify_reporters)) { - foreach ($notify_reporters as $post_id => $reporter) + foreach ($notify_reporters as $report_id => $reporter) { if ($reporter['user_id'] == ANONYMOUS) { continue; } + $post_id = $reporter['post_id']; + $messenger->template('report_' . $action . 'd', $reporter['user_lang']); $messenger->to($reporter['user_email'], $reporter['username']); @@ -512,15 +586,15 @@ function close_report($post_id_list, $mode, $action) $messenger->send($reporter['user_notify_type']); } } - unset($notify_reporters, $post_info); + unset($notify_reporters, $post_info, $reports); $messenger->save_queue(); - $success_msg = (sizeof($post_id_list) == 1) ? 'REPORT_' . strtoupper($action) . 'D_SUCCESS' : 'REPORTS_' . strtoupper($action) . 'D_SUCCESS'; + $success_msg = (sizeof($report_id_list) == 1) ? 'REPORT_' . strtoupper($action) . 'D_SUCCESS' : 'REPORTS_' . strtoupper($action) . 'D_SUCCESS'; } else { - confirm_box(false, $user->lang[strtoupper($action) . '_REPORT' . ((sizeof($post_id_list) == 1) ? '' : 'S') . '_CONFIRM'], $s_hidden_fields); + confirm_box(false, $user->lang[strtoupper($action) . '_REPORT' . ((sizeof($report_id_list) == 1) ? '' : 'S') . '_CONFIRM'], $s_hidden_fields); } $redirect = request_var('redirect', "index.$phpEx"); diff --git a/phpBB/includes/mcp/mcp_topic.php b/phpBB/includes/mcp/mcp_topic.php index 716b7a1529..95f8d6c71b 100644 --- a/phpBB/includes/mcp/mcp_topic.php +++ b/phpBB/includes/mcp/mcp_topic.php @@ -14,7 +14,7 @@ function mcp_topic_view($id, $mode, $action) { global $phpEx, $phpbb_root_path, $config; - global $template, $db, $user, $auth; + global $template, $db, $user, $auth, $cache; $url = append_sid("{$phpbb_root_path}mcp.$phpEx?" . extra_url()); @@ -81,7 +81,7 @@ function mcp_topic_view($id, $mode, $action) $sort_by_sql = $sort_order_sql = array(); mcp_sorting('viewtopic', $sort_days, $sort_key, $sort_dir, $sort_by_sql, $sort_order_sql, $total, $topic_info['forum_id'], $topic_id, $where_sql); - $limit_time_sql = ($sort_days) ? 'AND t.topic_last_post_time >= ' . (time() - ($sort_days * 86400)) : ''; + $limit_time_sql = ($sort_days) ? 'AND p.post_time >= ' . (time() - ($sort_days * 86400)) : ''; if ($total == -1) { @@ -99,15 +99,17 @@ function mcp_topic_view($id, $mode, $action) WHERE ' . (($action == 'reports') ? 'p.post_reported = 1 AND ' : '') . ' p.topic_id = ' . $topic_id . ' ' . ((!$auth->acl_get('m_approve', $topic_info['forum_id'])) ? ' AND p.post_approved = 1 ' : '') . ' - AND p.poster_id = u.user_id + AND p.poster_id = u.user_id ' . + $limit_time_sql . ' ORDER BY ' . $sort_order_sql; $result = $db->sql_query_limit($sql, $posts_per_page, $start); - $rowset = array(); + $rowset = $post_id_list = array(); $bbcode_bitfield = ''; while ($row = $db->sql_fetchrow($result)) { $rowset[] = $row; + $post_id_list[] = $row['post_id']; $bbcode_bitfield = $bbcode_bitfield | base64_decode($row['bbcode_bitfield']); } $db->sql_freeresult($result); @@ -132,10 +134,34 @@ function mcp_topic_view($id, $mode, $action) $topic_tracking_info = get_complete_topic_tracking($topic_info['forum_id'], $topic_id); } + $has_unapproved_posts = false; + + // Grab extensions + $extensions = $attachments = array(); + if ($topic_info['topic_attachment'] && sizeof($post_id_list)) + { + $extensions = $cache->obtain_attach_extensions($topic_info['forum_id']); + + // Get attachments... + if ($auth->acl_get('u_download') && $auth->acl_get('f_download', $topic_info['forum_id'])) + { + $sql = 'SELECT * + FROM ' . ATTACHMENTS_TABLE . ' + WHERE ' . $db->sql_in_set('post_msg_id', $post_id_list) . ' + AND in_message = 0 + ORDER BY filetime DESC, post_msg_id ASC'; + $result = $db->sql_query($sql); + + while ($row = $db->sql_fetchrow($result)) + { + $attachments[$row['post_msg_id']][] = $row; + } + $db->sql_freeresult($result); + } + } + foreach ($rowset as $i => $row) { - $has_unapproved_posts = false; - $message = $row['post_text']; $post_subject = ($row['post_subject'] != '') ? $row['post_subject'] : $topic_info['topic_title']; $message = str_replace("\n", '
    ', $message); @@ -147,6 +173,12 @@ function mcp_topic_view($id, $mode, $action) $message = smiley_text($message); + if (!empty($attachments[$row['post_id']])) + { + $update_count = array(); + parse_attachments($topic_info['forum_id'], $message, $attachments[$row['post_id']], $update_count); + } + if (!$row['post_approved']) { $has_unapproved_posts = true; @@ -171,12 +203,24 @@ function mcp_topic_view($id, $mode, $action) 'S_POST_REPORTED' => ($row['post_reported']) ? true : false, 'S_POST_UNAPPROVED' => ($row['post_approved']) ? false : true, 'S_CHECKED' => ($post_id_list && in_array(intval($row['post_id']), $post_id_list)) ? true : false, + 'S_HAS_ATTACHMENTS' => (!empty($attachments[$row['post_id']])) ? true : false, 'U_POST_DETAILS' => "$url&i=$id&p={$row['post_id']}&mode=post_details", 'U_MCP_APPROVE' => ($auth->acl_get('m_approve', $topic_info['forum_id'])) ? append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=queue&mode=approve_details&f=' . $topic_info['forum_id'] . '&p=' . $row['post_id']) : '', 'U_MCP_REPORT' => ($auth->acl_get('m_report', $topic_info['forum_id'])) ? append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=reports&mode=report_details&f=' . $topic_info['forum_id'] . '&p=' . $row['post_id']) : '') ); + // Display not already displayed Attachments for this post, we already parsed them. ;) + if (!empty($attachments[$row['post_id']])) + { + foreach ($attachments[$row['post_id']] as $attachment) + { + $template->assign_block_vars('postrow.attachment', array( + 'DISPLAY_ATTACHMENT' => $attachment) + ); + } + } + unset($rowset[$i]); } @@ -200,11 +244,11 @@ function mcp_topic_view($id, $mode, $action) else { $to_topic_info = $to_topic_info[$to_topic_id]; - } - if (!$to_topic_info['enable_icons']) - { - $s_topic_icons = false; + if (!$to_topic_info['enable_icons'] || $auth->acl_get('!f_icons', $topic_info['forum_id'])) + { + $s_topic_icons = false; + } } } } @@ -233,6 +277,7 @@ function mcp_topic_view($id, $mode, $action) 'S_CAN_REPORT' => ($auth->acl_get('m_report', $topic_info['forum_id'])) ? true : false, 'S_REPORT_VIEW' => ($action == 'reports') ? true : false, 'S_MERGE_VIEW' => ($action == 'merge') ? true : false, + 'S_SPLIT_VIEW' => ($action == 'split') ? true : false, 'S_SHOW_TOPIC_ICONS' => $s_topic_icons, 'S_TOPIC_ICON' => $icon_id, @@ -244,8 +289,8 @@ function mcp_topic_view($id, $mode, $action) 'PAGE_NUMBER' => on_page($total, $posts_per_page, $start), 'PAGINATION' => (!$posts_per_page) ? '' : generate_pagination(append_sid("{$phpbb_root_path}mcp.$phpEx", "i=$id&t={$topic_info['topic_id']}&mode=$mode&action=$action&to_topic_id=$to_topic_id&posts_per_page=$posts_per_page&st=$sort_days&sk=$sort_key&sd=$sort_dir"), $total, $posts_per_page, $start), - 'TOTAL' => $total) - ); + 'TOTAL_POSTS' => ($total == 1) ? $user->lang['VIEW_TOPIC_POST'] : sprintf($user->lang['VIEW_TOPIC_POSTS'], $total), + )); } /** @@ -402,7 +447,7 @@ function split_topic($action, $topic_id, $to_forum_id, $subject) $to_topic_id = $db->sql_nextid(); move_posts($post_id_list, $to_topic_id); - $topic_info = get_post_data(array($topic_id)); + $topic_info = get_topic_data(array($topic_id)); $topic_info = $topic_info[$topic_id]; add_log('mod', $to_forum_id, $to_topic_id, 'LOG_SPLIT_DESTINATION', $subject); @@ -504,13 +549,23 @@ function merge_posts($topic_id, $to_topic_id) FROM ' . TOPICS_TABLE . ' WHERE topic_id = ' . $topic_id; $result = $db->sql_query_limit($sql, 1); + $row = $db->sql_fetchrow($result); + $db->sql_freeresult($result); - if ($row = $db->sql_fetchrow($result)) + if ($row) { $return_link .= sprintf($user->lang['RETURN_TOPIC'], '', ''); } + else + { + // If the topic no longer exist, we will update the topic watch table. + // To not let it error out on users watching both topics, we just return on an error... + $db->sql_return_on_error(true); + $db->sql_query('UPDATE ' . TOPICS_WATCH_TABLE . ' SET topic_id = ' . $to_topic_id . ' WHERE topic_id = ' . $topic_id); + $db->sql_return_on_error(false); - $db->sql_freeresult($result); + $db->sql_query('DELETE FROM ' . TOPICS_WATCH_TABLE . ' WHERE topic_id = ' . $topic_id); + } // Link to the new topic $return_link .= (($return_link) ? '

    ' : '') . sprintf($user->lang['RETURN_NEW_TOPIC'], '', ''); diff --git a/phpBB/includes/mcp/mcp_warn.php b/phpBB/includes/mcp/mcp_warn.php index ea414d2bfd..681a066af7 100755 --- a/phpBB/includes/mcp/mcp_warn.php +++ b/phpBB/includes/mcp/mcp_warn.php @@ -18,7 +18,7 @@ class mcp_warn var $p_master; var $u_action; - function mcp_main(&$p_master) + function mcp_warn(&$p_master) { $this->p_master = &$p_master; } @@ -40,360 +40,337 @@ class mcp_warn switch ($mode) { case 'front': - mcp_warn_front_view($id, $mode); + $this->mcp_warn_front_view(); $this->tpl_name = 'mcp_warn_front'; break; case 'list': - mcp_warn_list_view($id, $mode, $action); + $this->mcp_warn_list_view($action); $this->tpl_name = 'mcp_warn_list'; break; case 'warn_post': - mcp_warn_post_view($id, $mode, $action); + $this->mcp_warn_post_view($action); $this->tpl_name = 'mcp_warn_post'; break; case 'warn_user': - mcp_warn_user_view($id, $mode, $action); + $this->mcp_warn_user_view($action); $this->tpl_name = 'mcp_warn_user'; break; } } -} -/** -* Generates the summary on the main page of the warning module -*/ -function mcp_warn_front_view($id, $mode) -{ - global $phpEx, $phpbb_root_path, $config; - global $template, $db, $user, $auth; - - $template->assign_vars(array( - 'U_FIND_USERNAME' => append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=searchuser&form=mcp&field=username&select_single=true'), - 'UA_FIND_USERNAME' => append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=searchuser&form=mcp&field=username&select_single=true', false), - 'U_POST_ACTION' => append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=warn&mode=warn_user'), - ) - ); - - // Obtain a list of the 5 naughtiest users.... - // These are the 5 users with the highest warning count - - $highest = array(); - $count = 0; - - view_warned_users($highest, $count, 5); - - foreach ($highest as $row) + /** + * Generates the summary on the main page of the warning module + */ + function mcp_warn_front_view() { - $template->assign_block_vars('highest', array( - 'U_NOTES' => append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=notes&mode=user_notes&u=' . $row['user_id']), + global $phpEx, $phpbb_root_path, $config; + global $template, $db, $user, $auth; - 'USERNAME_FULL' => get_username_string('full', $row['user_id'], $row['username'], $row['user_colour']), - 'USERNAME' => $row['username'], - 'USERNAME_COLOUR' => ($row['user_colour']) ? '#' . $row['user_colour'] : '', - 'U_USER' => append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=viewprofile&u=' . $row['user_id']), + $template->assign_vars(array( + 'U_FIND_USERNAME' => append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=searchuser&form=mcp&field=username&select_single=true'), + 'UA_FIND_USERNAME' => append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=searchuser&form=mcp&field=username&select_single=true', false), + 'U_POST_ACTION' => append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=warn&mode=warn_user'), + )); - 'WARNING_TIME' => $user->format_date($row['user_last_warning']), - 'WARNINGS' => $row['user_warnings'], - ) - ); + // Obtain a list of the 5 naughtiest users.... + // These are the 5 users with the highest warning count + $highest = array(); + $count = 0; + + view_warned_users($highest, $count, 5); + + foreach ($highest as $row) + { + $template->assign_block_vars('highest', array( + 'U_NOTES' => append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=notes&mode=user_notes&u=' . $row['user_id']), + + 'USERNAME_FULL' => get_username_string('full', $row['user_id'], $row['username'], $row['user_colour']), + 'USERNAME' => $row['username'], + 'USERNAME_COLOUR' => ($row['user_colour']) ? '#' . $row['user_colour'] : '', + 'U_USER' => append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=viewprofile&u=' . $row['user_id']), + + 'WARNING_TIME' => $user->format_date($row['user_last_warning']), + 'WARNINGS' => $row['user_warnings'], + )); + } + + // And now the 5 most recent users to get in trouble + $sql = 'SELECT u.user_id, u.username, u.username_clean, u.user_colour, u.user_warnings, w.warning_time + FROM ' . USERS_TABLE . ' u, ' . WARNINGS_TABLE . ' w + WHERE u.user_id = w.user_id + ORDER BY w.warning_time DESC'; + $result = $db->sql_query_limit($sql, 5); + + while ($row = $db->sql_fetchrow($result)) + { + $template->assign_block_vars('latest', array( + 'U_NOTES' => append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=notes&mode=user_notes&u=' . $row['user_id']), + + 'USERNAME_FULL' => get_username_string('full', $row['user_id'], $row['username'], $row['user_colour']), + 'USERNAME' => $row['username'], + 'USERNAME_COLOUR' => ($row['user_colour']) ? '#' . $row['user_colour'] : '', + 'U_USER' => append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=viewprofile&u=' . $row['user_id']), + + 'WARNING_TIME' => $user->format_date($row['warning_time']), + 'WARNINGS' => $row['user_warnings'], + )); + } + $db->sql_freeresult($result); } - // And now the 5 most recent users to get in trouble - - $sql = 'SELECT u.user_id, u.username, u.username_clean, u.user_colour, u.user_warnings, w.warning_time - FROM ' . USERS_TABLE . ' u, ' . WARNINGS_TABLE . ' w - WHERE u.user_id = w.user_id - ORDER BY w.warning_time DESC'; - $result = $db->sql_query_limit($sql, 5); - - while ($row = $db->sql_fetchrow($result)) + /** + * Lists all users with warnings + */ + function mcp_warn_list_view($action) { - $template->assign_block_vars('latest', array( - 'U_NOTES' => append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=notes&mode=user_notes&u=' . $row['user_id']), + global $phpEx, $phpbb_root_path, $config; + global $template, $db, $user, $auth; - 'USERNAME_FULL' => get_username_string('full', $row['user_id'], $row['username'], $row['user_colour']), - 'USERNAME' => $row['username'], - 'USERNAME_COLOUR' => ($row['user_colour']) ? '#' . $row['user_colour'] : '', - 'U_USER' => append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=viewprofile&u=' . $row['user_id']), + $user->add_lang('memberlist'); - 'WARNING_TIME' => $user->format_date($row['warning_time']), - 'WARNINGS' => $row['user_warnings'], - ) - ); - } - $db->sql_freeresult($result); -} + $start = request_var('start', 0); + $st = request_var('st', 0); + $sk = request_var('sk', 'b'); + $sd = request_var('sd', 'd'); -/** -* Lists all users with warnings -*/ -function mcp_warn_list_view($id, $mode, $action) -{ - global $phpEx, $phpbb_root_path, $config; - global $template, $db, $user, $auth; + $limit_days = array(0 => $user->lang['ALL_ENTRIES'], 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_text = array('a' => $user->lang['SORT_USERNAME'], 'b' => $user->lang['SORT_DATE'], 'c' => $user->lang['SORT_WARNINGS']); + $sort_by_sql = array('a' => 'username_clean', 'b' => 'user_last_warning', 'c' => 'user_warnings'); - $user->add_lang('memberlist'); + $s_limit_days = $s_sort_key = $s_sort_dir = $u_sort_param = ''; + gen_sort_selects($limit_days, $sort_by_text, $st, $sk, $sd, $s_limit_days, $s_sort_key, $s_sort_dir, $u_sort_param); - $start = request_var('start', 0); - $st = request_var('st', 0); - $sk = request_var('sk', 'b'); - $sd = request_var('sd', 'd'); + // Define where and sort sql for use in displaying logs + $sql_where = ($st) ? (time() - ($st * 86400)) : 0; + $sql_sort = $sort_by_sql[$sk] . ' ' . (($sd == 'd') ? 'DESC' : 'ASC'); - $limit_days = array(0 => $user->lang['ALL_ENTRIES'], 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_text = array('a' => $user->lang['SORT_USERNAME'], 'b' => $user->lang['SORT_DATE'], 'c' => $user->lang['SORT_WARNINGS']); - $sort_by_sql = array('a' => 'username_clean', 'b' => 'user_last_warning', 'c' => 'user_warnings'); + $users = array(); + $user_count = 0; - $s_limit_days = $s_sort_key = $s_sort_dir = $u_sort_param = ''; - gen_sort_selects($limit_days, $sort_by_text, $st, $sk, $sd, $s_limit_days, $s_sort_key, $s_sort_dir, $u_sort_param); + view_warned_users($users, $user_count, $config['topics_per_page'], $start, $sql_where, $sql_sort); - // Define where and sort sql for use in displaying logs - $sql_where = ($st) ? (time() - ($st * 86400)) : 0; - $sql_sort = $sort_by_sql[$sk] . ' ' . (($sd == 'd') ? 'DESC' : 'ASC'); + foreach ($users as $row) + { + $template->assign_block_vars('user', array( + 'U_NOTES' => append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=notes&mode=user_notes&u=' . $row['user_id']), - $users = array(); - $user_count = 0; - - view_warned_users($users, $user_count, $config['topics_per_page'], $start, $sql_where, $sql_sort); - - foreach ($users as $row) - { - $template->assign_block_vars('user', array( - 'U_NOTES' => append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=notes&mode=user_notes&u=' . $row['user_id']), - - 'USERNAME_FULL' => get_username_string('full', $row['user_id'], $row['username'], $row['user_colour']), - 'USERNAME' => $row['username'], - 'USERNAME_COLOUR' => ($row['user_colour']) ? '#' . $row['user_colour'] : '', - 'U_USER' => append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=viewprofile&u=' . $row['user_id']), + 'USERNAME_FULL' => get_username_string('full', $row['user_id'], $row['username'], $row['user_colour']), + 'USERNAME' => $row['username'], + 'USERNAME_COLOUR' => ($row['user_colour']) ? '#' . $row['user_colour'] : '', + 'U_USER' => append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=viewprofile&u=' . $row['user_id']), - 'WARNING_TIME' => $user->format_date($row['user_last_warning']), - 'WARNINGS' => $row['user_warnings'], - ) - ); - } - - $template->assign_vars(array( - 'U_POST_ACTION' => append_sid("{$phpbb_root_path}mcp.$phpEx", "i=$id&mode=$mode"), - 'S_CLEAR_ALLOWED' => ($auth->acl_get('a_clearlogs')) ? true : false, - 'S_SELECT_SORT_DIR' => $s_sort_dir, - 'S_SELECT_SORT_KEY' => $s_sort_key, - 'S_SELECT_SORT_DAYS' => $s_limit_days, - - 'PAGE_NUMBER' => on_page($user_count, $config['topics_per_page'], $start), - 'PAGINATION' => generate_pagination(append_sid("{$phpbb_root_path}mcp.$phpEx", "i=$id&mode=$mode&st=$st&sk=$sk&sd=$sd"), $user_count, $config['topics_per_page'], $start), - 'TOTAL_USERS' => ($user_count == 1) ? $user->lang['LIST_USER'] : sprintf($user->lang['LIST_USERS'], $user_count), - ) - ); - -} - -/** -* Handles warning the user when the warning is for a specific post -*/ -function mcp_warn_post_view($id, $mode, $action) -{ - global $phpEx, $phpbb_root_path, $config; - global $template, $db, $user, $auth; - - $post_id = request_var('p', 0); - $forum_id = request_var('f', 0); - $notify = (isset($_REQUEST['notify_user'])) ? true : false; - $warning = request_var('warning', '', true); - - $sql = 'SELECT u.*, p.* - FROM ' . POSTS_TABLE . ' p, ' . USERS_TABLE . " u - WHERE post_id = $post_id - AND u.user_id = p.poster_id"; - $result = $db->sql_query($sql); - $user_row = $db->sql_fetchrow($result); - $db->sql_freeresult($result); - - if (!$user_row) - { - trigger_error($user->lang['NO_POST']); - } - - // There is no point issuing a warning to ignored users (ie anonymous and bots) - if ($user_row['user_type'] == USER_IGNORE) - { - trigger_error($user->lang['CANNOT_WARN_ANONYMOUS']); - } - - // Prevent someone from warning themselves - if ($user_row['user_id'] == $user->data['user_id']) - { - trigger_error($user->lang['CANNOT_WARN_SELF']); - } - - // Check if there is already a warning for this post to prevent multiple - // warnings for the same offence - $sql = 'SELECT post_id - FROM ' . WARNINGS_TABLE . " - WHERE post_id = $post_id"; - $result = $db->sql_query($sql); - $row = $db->sql_fetchrow($result); - $db->sql_freeresult($result); - - if ($row) - { - trigger_error($user->lang['ALREADY_WARNED']); - } - - $user_id = $user_row['user_id']; - - if ($warning && $action == 'add_warning') - { - add_warning($user_row, $warning, $notify, $post_id); - - $redirect = append_sid("{$phpbb_root_path}mcp.$phpEx", "i=notes&mode=user_notes&u=$user_id"); - meta_refresh(2, $redirect); - trigger_error($user->lang['USER_WARNING_ADDED'] . '

    ' . sprintf($user->lang['RETURN_PAGE'], '', '')); - } - - // OK, they didn't submit a warning so lets build the page for them to do so - - // We want to make the message available here as a reminder - // Parse the message and subject - $message = $user_row['post_text']; - $message = str_replace("\n", '
    ', censor_text($message)); - - // Second parse bbcode here - if ($user_row['bbcode_bitfield']) - { - include_once($phpbb_root_path . 'includes/bbcode.' . $phpEx); - - $bbcode = new bbcode($user_row['bbcode_bitfield']); - $bbcode->bbcode_second_pass($message, $user_row['bbcode_uid'], $user_row['bbcode_bitfield']); - } - - // Always process smilies after parsing bbcodes - $message = smiley_text($message); - - // Generate the appropriate user information for the user we are looking at - $rank_title = $rank_img = ''; -// get_user_rank($user_row['user_rank'], $user_row['user_posts'], $rank_title, $rank_img); - - $avatar_img = ''; - - if (!empty($user_row['user_avatar'])) - { - switch ($user_row['user_avatar_type']) - { - case AVATAR_UPLOAD: - $avatar_img = $config['avatar_path'] . '/'; - break; - - case AVATAR_GALLERY: - $avatar_img = $config['avatar_gallery_path'] . '/'; - break; + 'WARNING_TIME' => $user->format_date($row['user_last_warning']), + 'WARNINGS' => $row['user_warnings'], + )); } - $avatar_img .= $user_row['user_avatar']; - $avatar_img = ''; + $template->assign_vars(array( + 'U_POST_ACTION' => $this->u_action, + 'S_CLEAR_ALLOWED' => ($auth->acl_get('a_clearlogs')) ? true : false, + 'S_SELECT_SORT_DIR' => $s_sort_dir, + 'S_SELECT_SORT_KEY' => $s_sort_key, + 'S_SELECT_SORT_DAYS' => $s_limit_days, + + 'PAGE_NUMBER' => on_page($user_count, $config['topics_per_page'], $start), + 'PAGINATION' => generate_pagination(append_sid("{$phpbb_root_path}mcp.$phpEx", "i=warn&mode=list&st=$st&sk=$sk&sd=$sd"), $user_count, $config['topics_per_page'], $start), + 'TOTAL_USERS' => ($user_count == 1) ? $user->lang['LIST_USER'] : sprintf($user->lang['LIST_USERS'], $user_count), + )); } - $template->assign_vars(array( - 'U_POST_ACTION' => append_sid("{$phpbb_root_path}mcp.$phpEx", "i=$id&mode=$mode&p=$post_id"), - - 'POST' => $message, - 'USERNAME' => $user_row['username'], - 'USER_COLOR' => (!empty($user_row['user_colour'])) ? $user_row['user_colour'] : '', - 'RANK_TITLE' => $rank_title, - 'JOINED' => $user->format_date($user_row['user_regdate']), - 'POSTS' => ($user_row['user_posts']) ? $user_row['user_posts'] : 0, - - 'AVATAR_IMG' => $avatar_img, - 'RANK_IMG' => $rank_img, - - 'L_WARNING_POST_DEFAULT' => sprintf($user->lang['WARNING_POST_DEFAULT'], generate_board_url() . "/viewtopic.$phpEx?f=$forum_id&p=$post_id"), - ) - ); -} - -/** -* Handles warning the user -*/ -function mcp_warn_user_view($id, $mode, $action) -{ - global $phpEx, $phpbb_root_path, $config, $module; - global $template, $db, $user, $auth; - - $user_id = request_var('u', 0); - $username = request_var('username', '', true); - $notify = (isset($_REQUEST['notify_user'])) ? true : false; - $warning = request_var('warning', '', true); - - $sql_where = ($user_id) ? "user_id = $user_id" : "username_clean = '" . $db->sql_escape(utf8_clean_string($username)) . "'"; - - $sql = 'SELECT * - FROM ' . USERS_TABLE . ' - WHERE ' . $sql_where; - $result = $db->sql_query($sql); - $user_row = $db->sql_fetchrow($result); - $db->sql_freeresult($result); - - if (!$user_row) + /** + * Handles warning the user when the warning is for a specific post + */ + function mcp_warn_post_view($action) { - trigger_error('NO_USER'); - } + global $phpEx, $phpbb_root_path, $config; + global $template, $db, $user, $auth; - // Prevent someone from warning themselves - if ($user_row['user_id'] == $user->data['user_id']) - { - trigger_error($user->lang['CANNOT_WARN_SELF']); - } + $post_id = request_var('p', 0); + $forum_id = request_var('f', 0); + $notify = (isset($_REQUEST['notify_user'])) ? true : false; + $warning = request_var('warning', '', true); - $user_id = $user_row['user_id']; + $sql = 'SELECT u.*, p.* + FROM ' . POSTS_TABLE . ' p, ' . USERS_TABLE . " u + WHERE post_id = $post_id + AND u.user_id = p.poster_id"; + $result = $db->sql_query($sql); + $user_row = $db->sql_fetchrow($result); + $db->sql_freeresult($result); - if ($warning && $action == 'add_warning') - { - add_warning($user_row, $warning, $notify); - - $redirect = append_sid("{$phpbb_root_path}mcp.$phpEx", "i=notes&mode=user_notes&u=$user_id"); - meta_refresh(2, $redirect); - trigger_error($user->lang['USER_WARNING_ADDED'] . '

    ' . sprintf($user->lang['RETURN_PAGE'], '', '')); - } - - // Generate the appropriate user information for the user we are looking at - $rank_title = $rank_img = ''; -// get_user_rank($user_row['user_rank'], $user_row['user_posts'], $rank_title, $rank_img); - - $avatar_img = ''; - - if (!empty($user_row['user_avatar'])) - { - switch ($user_row['user_avatar_type']) + if (!$user_row) { - case AVATAR_UPLOAD: - $avatar_img = $config['avatar_path'] . '/'; - break; - - case AVATAR_GALLERY: - $avatar_img = $config['avatar_gallery_path'] . '/'; - break; + trigger_error($user->lang['NO_POST']); } - $avatar_img .= $user_row['user_avatar']; - $avatar_img = ''; + // There is no point issuing a warning to ignored users (ie anonymous and bots) + if ($user_row['user_type'] == USER_IGNORE) + { + trigger_error($user->lang['CANNOT_WARN_ANONYMOUS']); + } + + // Prevent someone from warning themselves + if ($user_row['user_id'] == $user->data['user_id']) + { + trigger_error($user->lang['CANNOT_WARN_SELF']); + } + + // Check if there is already a warning for this post to prevent multiple + // warnings for the same offence + $sql = 'SELECT post_id + FROM ' . WARNINGS_TABLE . " + WHERE post_id = $post_id"; + $result = $db->sql_query($sql); + $row = $db->sql_fetchrow($result); + $db->sql_freeresult($result); + + if ($row) + { + trigger_error($user->lang['ALREADY_WARNED']); + } + + $user_id = $user_row['user_id']; + + if (strpos($this->u_action, "&f=$forum_id&p=$post_id") === false) + { + $this->p_master->adjust_url("&f=$forum_id&p=$post_id"); + $this->u_action .= "&f=$forum_id&p=$post_id"; + } + + if ($warning && $action == 'add_warning') + { + add_warning($user_row, $warning, $notify, $post_id); + + $redirect = append_sid("{$phpbb_root_path}mcp.$phpEx", "i=notes&mode=user_notes&u=$user_id"); + meta_refresh(2, $redirect); + trigger_error($user->lang['USER_WARNING_ADDED'] . '

    ' . sprintf($user->lang['RETURN_PAGE'], '', '')); + } + + // OK, they didn't submit a warning so lets build the page for them to do so + + // We want to make the message available here as a reminder + // Parse the message and subject + $message = $user_row['post_text']; + $message = str_replace("\n", '
    ', censor_text($message)); + + // Second parse bbcode here + if ($user_row['bbcode_bitfield']) + { + include_once($phpbb_root_path . 'includes/bbcode.' . $phpEx); + + $bbcode = new bbcode($user_row['bbcode_bitfield']); + $bbcode->bbcode_second_pass($message, $user_row['bbcode_uid'], $user_row['bbcode_bitfield']); + } + + // Always process smilies after parsing bbcodes + $message = smiley_text($message); + + // Generate the appropriate user information for the user we are looking at + if (!function_exists('get_user_avatar')) + { + include($phpbb_root_path . 'includes/functions_display.' . $phpEx); + } + + $rank_title = $rank_img = ''; + $avatar_img = get_user_avatar($user_row['user_avatar'], $user_row['user_avatar_type'], $user_row['user_avatar_width'], $user_row['user_avatar_height']); + + $template->assign_vars(array( + 'U_POST_ACTION' => $this->u_action, + + 'POST' => $message, + 'USERNAME' => $user_row['username'], + 'USER_COLOR' => (!empty($user_row['user_colour'])) ? $user_row['user_colour'] : '', + 'RANK_TITLE' => $rank_title, + 'JOINED' => $user->format_date($user_row['user_regdate']), + 'POSTS' => ($user_row['user_posts']) ? $user_row['user_posts'] : 0, + 'WARNINGS' => ($user_row['user_warnings']) ? $user_row['user_warnings'] : 0, + + 'AVATAR_IMG' => $avatar_img, + 'RANK_IMG' => $rank_img, + + 'L_WARNING_POST_DEFAULT' => sprintf($user->lang['WARNING_POST_DEFAULT'], generate_board_url() . "/viewtopic.$phpEx?f=$forum_id&p=$post_id"), + )); } - // OK, they didn't submit a warning so lets build the page for them to do so - $template->assign_vars(array( - 'U_POST_ACTION' => append_sid("{$phpbb_root_path}mcp.$phpEx", "i=$id&mode=$mode&u=$user_id"), + /** + * Handles warning the user + */ + function mcp_warn_user_view($action) + { + global $phpEx, $phpbb_root_path, $config, $module; + global $template, $db, $user, $auth; - 'USERNAME' => $user_row['username'], - 'USER_COLOR' => (!empty($user_row['user_colour'])) ? $user_row['user_colour'] : '', - 'RANK_TITLE' => $rank_title, - 'JOINED' => $user->format_date($user_row['user_regdate']), - 'POSTS' => ($user_row['user_posts']) ? $user_row['user_posts'] : 0, - 'WARNINGS' => ($user_row['user_warnings']) ? $user_row['user_warnings'] : 0, + $user_id = request_var('u', 0); + $username = request_var('username', '', true); + $notify = (isset($_REQUEST['notify_user'])) ? true : false; + $warning = request_var('warning', '', true); - 'AVATAR_IMG' => $avatar_img, - 'RANK_IMG' => $rank_img, - ) - ); + $sql_where = ($user_id) ? "user_id = $user_id" : "username_clean = '" . $db->sql_escape(utf8_clean_string($username)) . "'"; + + $sql = 'SELECT * + FROM ' . USERS_TABLE . ' + WHERE ' . $sql_where; + $result = $db->sql_query($sql); + $user_row = $db->sql_fetchrow($result); + $db->sql_freeresult($result); + + if (!$user_row) + { + trigger_error('NO_USER'); + } + + // Prevent someone from warning themselves + if ($user_row['user_id'] == $user->data['user_id']) + { + trigger_error($user->lang['CANNOT_WARN_SELF']); + } + + $user_id = $user_row['user_id']; + + if (strpos($this->u_action, "&u=$user_id") === false) + { + $this->p_master->adjust_url('&u=' . $user_id); + $this->u_action .= "&u=$user_id"; + } + + if ($warning && $action == 'add_warning') + { + add_warning($user_row, $warning, $notify); + + $redirect = append_sid("{$phpbb_root_path}mcp.$phpEx", "i=notes&mode=user_notes&u=$user_id"); + meta_refresh(2, $redirect); + trigger_error($user->lang['USER_WARNING_ADDED'] . '

    ' . sprintf($user->lang['RETURN_PAGE'], '', '')); + } + + // Generate the appropriate user information for the user we are looking at + if (!function_exists('get_user_avatar')) + { + include($phpbb_root_path . 'includes/functions_display.' . $phpEx); + } + + $rank_title = $rank_img = ''; + $avatar_img = get_user_avatar($user_row['user_avatar'], $user_row['user_avatar_type'], $user_row['user_avatar_width'], $user_row['user_avatar_height']); + + // OK, they didn't submit a warning so lets build the page for them to do so + $template->assign_vars(array( + 'U_POST_ACTION' => $this->u_action, + + 'USERNAME' => $user_row['username'], + 'USER_COLOR' => (!empty($user_row['user_colour'])) ? $user_row['user_colour'] : '', + 'RANK_TITLE' => $rank_title, + 'JOINED' => $user->format_date($user_row['user_regdate']), + 'POSTS' => ($user_row['user_posts']) ? $user_row['user_posts'] : 0, + 'WARNINGS' => ($user_row['user_warnings']) ? $user_row['user_warnings'] : 0, + + 'AVATAR_IMG' => $avatar_img, + 'RANK_IMG' => $rank_img, + )); + + return $user_id; + } } /** diff --git a/phpBB/includes/message_parser.php b/phpBB/includes/message_parser.php index e5e2240b6d..b8f00d71ee 100644 --- a/phpBB/includes/message_parser.php +++ b/phpBB/includes/message_parser.php @@ -83,7 +83,10 @@ class bbcode_firstpass extends bbcode */ function prepare_bbcodes() { - // Add newline at the end and in front of each quote block to prevent parsing errors (urls, smilies, etc.) + // Ok, seems like users instead want the no-parsing of urls, smilies, etc. after and before and within quote tags being tagged as "not a bug". + // Fine by me ;) Will ease our live... but do not come back and cry at us, we won't hear you. + + /* Add newline at the end and in front of each quote block to prevent parsing errors (urls, smilies, etc.) if (strpos($this->message, '[quote') !== false && strpos($this->message, '[/quote]') !== false) { $this->message = str_replace("\r\n", "\n", $this->message); @@ -91,6 +94,7 @@ class bbcode_firstpass extends bbcode // We strip newlines and spaces after and before quotes in quotes (trimming) and then add exactly one newline $this->message = preg_replace('#\[quote(=".*?")?\]\s*(.*?)\s*\[/quote\]#siu', '[quote\1]' . "\n" . '\2' ."\n[/quote]", $this->message); } + */ // Add other checks which needs to be placed before actually parsing anything (be it bbcodes, smilies, urls...) } @@ -113,7 +117,7 @@ class bbcode_firstpass extends bbcode 'i' => array('bbcode_id' => 2, 'regexp' => array('#\[i\](.*?)\[/i\]#ise' => "\$this->bbcode_italic('\$1')")), 'url' => array('bbcode_id' => 3, 'regexp' => array('#\[url(=(.*))?\](.*)\[/url\]#iUe' => "\$this->validate_url('\$2', '\$3')")), 'img' => array('bbcode_id' => 4, 'regexp' => array('#\[img\](https?://)([a-z0-9\-\.,\?!%\*_:;~\\&$@/=\+]+)\[/img\]#ie' => "\$this->bbcode_img('\$1\$2')")), - 'size' => array('bbcode_id' => 5, 'regexp' => array('#\[size=([\-\+]?[1-2]?[0-9])\](.*?)\[/size\]#ise' => "\$this->bbcode_size('\$1', '\$2')")), + 'size' => array('bbcode_id' => 5, 'regexp' => array('#\[size=([\-\+]?\d+)\](.*?)\[/size\]#ise' => "\$this->bbcode_size('\$1', '\$2')")), 'color' => array('bbcode_id' => 6, 'regexp' => array('!\[color=(#[0-9a-f]{6}|[a-z\-]+)\](.*?)\[/color\]!ise' => "\$this->bbcode_color('\$1', '\$2')")), 'u' => array('bbcode_id' => 7, 'regexp' => array('#\[u\](.*?)\[/u\]#ise' => "\$this->bbcode_underline('\$1')")), 'list' => array('bbcode_id' => 9, 'regexp' => array('#\[list(?:=(?:[a-z0-9]|disc|circle|square))?].*\[/list]#ise' => "\$this->bbcode_parse_list('\$0')")), @@ -200,6 +204,8 @@ class bbcode_firstpass extends bbcode if ($config['max_' . $this->mode . '_font_size'] && $config['max_' . $this->mode . '_font_size'] < $stx) { $this->warn_msg[] = sprintf($user->lang['MAX_FONT_SIZE_EXCEEDED'], $config['max_' . $this->mode . '_font_size']); + + return '[size=' . $stx . ']' . $in . '[/size]'; } return '[size=' . $stx . ':' . $this->bbcode_uid . ']' . $in . '[/size:' . $this->bbcode_uid . ']'; @@ -270,6 +276,7 @@ class bbcode_firstpass extends bbcode } $in = trim($in); + $error = false; if ($config['max_' . $this->mode . '_img_height'] || $config['max_' . $this->mode . '_img_width']) { @@ -277,23 +284,26 @@ class bbcode_firstpass extends bbcode if ($stats === false) { + $error = true; $this->warn_msg[] = $user->lang['UNABLE_GET_IMAGE_SIZE']; } else { if ($config['max_' . $this->mode . '_img_height'] && $config['max_' . $this->mode . '_img_height'] < $stats[1]) { + $error = true; $this->warn_msg[] = sprintf($user->lang['MAX_IMG_HEIGHT_EXCEEDED'], $config['max_' . $this->mode . '_img_height']); } if ($config['max_' . $this->mode . '_img_width'] && $config['max_' . $this->mode . '_img_width'] < $stats[0]) { + $error = true; $this->warn_msg[] = sprintf($user->lang['MAX_IMG_WIDTH_EXCEEDED'], $config['max_' . $this->mode . '_img_width']); } } } - if ($this->path_in_domain($in)) + if ($error || $this->path_in_domain($in)) { return '[img]' . $in . '[/img]'; } @@ -314,22 +324,25 @@ class bbcode_firstpass extends bbcode } $in = trim($in); + $error = false; // Apply the same size checks on flash files as on images if ($config['max_' . $this->mode . '_img_height'] || $config['max_' . $this->mode . '_img_width']) { if ($config['max_' . $this->mode . '_img_height'] && $config['max_' . $this->mode . '_img_height'] < $height) { + $error = true; $this->warn_msg[] = sprintf($user->lang['MAX_FLASH_HEIGHT_EXCEEDED'], $config['max_' . $this->mode . '_img_height']); } if ($config['max_' . $this->mode . '_img_width'] && $config['max_' . $this->mode . '_img_width'] < $width) { + $error = true; $this->warn_msg[] = sprintf($user->lang['MAX_FLASH_WIDTH_EXCEEDED'], $config['max_' . $this->mode . '_img_width']); } } - if ($this->path_in_domain($in)) + if ($error || $this->path_in_domain($in)) { return '[flash=' . $width . ',' . $height . ']' . $in . '[/flash]'; } @@ -350,6 +363,72 @@ class bbcode_firstpass extends bbcode return '[attachment=' . $stx . ':' . $this->bbcode_uid . ']' . trim($in) . '[/attachment:' . $this->bbcode_uid . ']'; } + /** + * Parse code text from code tag + * @private + */ + function bbcode_parse_code($stx, $code) + { + switch (strtolower($stx)) + { + case 'php': + + $remove_tags = false; + $code = str_replace(array('<', '>'), array('<', '>'), $code); + + if (!preg_match('/\<\?.*?\?\>/is', $code)) + { + $remove_tags = true; + $code = ""; + } + + $conf = array('highlight.bg', 'highlight.comment', 'highlight.default', 'highlight.html', 'highlight.keyword', 'highlight.string'); + foreach ($conf as $ini_var) + { + @ini_set($ini_var, str_replace('highlight.', 'syntax', $ini_var)); + } + + // Because highlight_string is specialcharing the text (but we already did this before), we have to reverse this in order to get correct results + $code = htmlspecialchars_decode($code); + $code = highlight_string($code, true); + + $str_from = array('', '', '','[', ']', '.', ':'); + $str_to = array('', '', '', '[', ']', '.', ':'); + + if ($remove_tags) + { + $str_from[] = '<?php '; + $str_to[] = ''; + $str_from[] = '<?php '; + $str_to[] = ''; + } + + $code = str_replace($str_from, $str_to, $code); + $code = preg_replace('#^()\n?(.*?)\n?()$#is', '$1$2$3', $code); + + if ($remove_tags) + { + $code = preg_replace('#()?\?>()#', '$1 $2', $code); + } + + $code = preg_replace('#^(.*)#s', '$2', $code); + $code = preg_replace('#(?:[\n\r\s\t]| )*$#u', '', $code); + + // remove newline at the end + if (!empty($code) && $code[strlen($code) - 1] == "\n") + { + $code = substr($code, 0, -1); + } + + return "[code=$stx:" . $this->bbcode_uid . ']' . $code . '[/code:' . $this->bbcode_uid . ']'; + break; + + default: + return '[code:' . $this->bbcode_uid . ']' . $this->bbcode_specialchars($code) . '[/code:' . $this->bbcode_uid . ']'; + break; + } + } + /** * Parse code tag * Expects the argument to start right after the opening [code] tag and to end with [/code] @@ -365,107 +444,78 @@ class bbcode_firstpass extends bbcode // Having it here saves us one preg_replace per message containing [code] blocks // Additionally, magic url parsing should go after parsing bbcodes, but for safety those are stripped out too... $htm_match = get_preg_expression('bbcode_htm'); -// $htm_match[3] = '/&#([0-9]+);/'; - unset($htm_match[3], $htm_match[4]); + unset($htm_match[4], $htm_match[5]); + $htm_replace = array('\1', '\1', '\2', '\1'); - $htm_replace = array('\1', '\2', '\1'); //, '&#\1;'); + $in = preg_replace($htm_match, $htm_replace, $in); + $out = $code_block = ''; + $open = 1; - $out = ''; - - do + while ($in) { - $pos = stripos($in, '[/code]') + 7; - $code = substr($in, 0, $pos); - $in = substr($in, $pos); - - // $code contains everything that was between code tags (including the ending tag) but we're trying to grab as much extra text as possible, as long as it does not contain open [code] tags - while ($in) - { - $pos = stripos($in, '[/code]') + 7; - $buffer = substr($in, 0, $pos); + // Determine position and tag length of next code block + preg_match('#(.*?)(\[code(?:=([a-z]+))?\])(.+)#is', $in, $buffer); + $pos = (isset($buffer[1])) ? strlen($buffer[1]) : false; + $tag_length = (isset($buffer[2])) ? strlen($buffer[2]) : false; - if (preg_match('#\[code(?:=([a-z]+))?\]#i', $buffer)) + // Determine position of ending code tag + $pos2 = stripos($in, '[/code]'); + + // Which is the next block, ending code or code block + if ($pos !== false && $pos < $pos2) + { + // Open new block + if (!$open) { - break; + $out .= substr($in, 0, $pos); + $in = substr($in, $pos); + $stx = (isset($buffer[3])) ? $buffer[3] : ''; + $code_block = ''; } else { + // Already opened block, just append to the current block + $code_block .= substr($in, 0, $pos) . ((isset($buffer[2])) ? $buffer[2] : ''); $in = substr($in, $pos); - $code .= $buffer; } + + $in = substr($in, $tag_length); + $open++; } - - $code = substr($code, 0, -7); -// $code = preg_replace('#^[\r\n]*(.*?)[\n\r\s\t]*$#s', '$1', $code); - $code = preg_replace($htm_match, $htm_replace, $code); - - switch (strtolower($stx)) + else { - case 'php': + // Close the block + if ($open == 1) + { + $code_block .= substr($in, 0, $pos2); - $remove_tags = false; - $code = str_replace(array('<', '>'), array('<', '>'), $code); + // Parse this code block + $out .= $this->bbcode_parse_code($stx, $code_block); + $code_block = ''; + $open--; + } + else if ($open) + { + // Close one open tag... add to the current code block + $code_block .= substr($in, 0, $pos2 + 7); + $open--; + } + else + { + // end code without opening code... will be always outside code block + $out .= substr($in, 0, $pos2 + 7); + } - if (!preg_match('/\<\?.*?\?\>/is', $code)) - { - $remove_tags = true; - $code = ""; - } - - $conf = array('highlight.bg', 'highlight.comment', 'highlight.default', 'highlight.html', 'highlight.keyword', 'highlight.string'); - foreach ($conf as $ini_var) - { - @ini_set($ini_var, str_replace('highlight.', 'syntax', $ini_var)); - } - - // Because highlight_string is specialcharing the text (but we already did this before), we have to reverse this in order to get correct results - $code = htmlspecialchars_decode($code); - $code = highlight_string($code, true); - - $str_from = array('', '', '','[', ']', '.', ':'); - $str_to = array('', '', '', '[', ']', '.', ':'); - - if ($remove_tags) - { - $str_from[] = '<?php '; - $str_to[] = ''; - $str_from[] = '<?php '; - $str_to[] = ''; - } - - $code = str_replace($str_from, $str_to, $code); - $code = preg_replace('#^()\n?(.*?)\n?()$#is', '$1$2$3', $code); - - if ($remove_tags) - { - $code = preg_replace('#()?\?>#', '', $code); - } - - $code = preg_replace('#^(.*)#s', '$2', $code); - $code = preg_replace('#(?:[\n\r\s\t]| )*$#u', '', $code); - - // remove newline at the end - if (!empty($code) && $code[strlen($code) - 1] == "\n") - { - $code = substr($code, 0, -1); - } - - $out .= "[code=$stx:" . $this->bbcode_uid . ']' . $code . '[/code:' . $this->bbcode_uid . ']'; - break; - - default: - $out .= '[code:' . $this->bbcode_uid . ']' . $this->bbcode_specialchars($code) . '[/code:' . $this->bbcode_uid . ']'; - break; - } - - if (preg_match('#(.*?)\[code(?:=([a-z]+))?\](.+)#is', $in, $m)) - { - $out .= $m[1]; - $stx = $m[2]; - $in = $m[3]; + $in = substr($in, $pos2 + 7); } } - while ($in); + + // if now $code_block has contents we need to parse the remaining code while removing the last closing tag to match up. + if ($code_block) + { + $code_block = substr($code_block, 0, -7); + $out .= $this->bbcode_parse_code($stx, $code_block); + } return $out; } @@ -534,7 +584,7 @@ class bbcode_firstpass extends bbcode { array_push($list_end_tags, '/list:o:' . $this->bbcode_uid); } - $out .= $buffer . ':' . $this->bbcode_uid . ']'; + $out .= 'list' . substr($buffer, 4) . ':' . $this->bbcode_uid . ']'; $tok = '['; } else @@ -645,11 +695,13 @@ class bbcode_firstpass extends bbcode $tok = '['; $buffer = ''; - // Add space at the end of the closing tag if not happened before to allow following urls/smilies to be parsed correctly + /* Add space at the end of the closing tag if not happened before to allow following urls/smilies to be parsed correctly + * Do not try to think for the user. :/ Do not parse urls/smilies if there is no space - is the same as with other bbcodes too. + * Also, we won't have any spaces within $in anyway, only adding up spaces -> #10982 if (!$in || $in[0] !== ' ') { $out .= ' '; - } + }*/ } else if (preg_match('#^quote(?:="(.*?)")?$#is', $buffer, $m)) { @@ -848,7 +900,9 @@ class bbcode_firstpass extends bbcode // Is this a link to somewhere inside this board? If so then remove the session id from the url if (strpos($url, generate_board_url()) !== false && strpos($url, 'sid=') !== false) { - $url = preg_replace('/(&|\?)sid=[0-9a-f]{32}/', '\1', $url); + $url = preg_replace('/(&|\?)sid=[0-9a-f]{32}&/', '\1', $url); + $url = preg_replace('/(&|\?)sid=[0-9a-f]{32}$/', '', $url); + $url = append_sid($url); } return ($var1) ? '[url=' . $this->bbcode_specialchars($url) . ':' . $this->bbcode_uid . ']' . $var2 . '[/url:' . $this->bbcode_uid . ']' : '[url:' . $this->bbcode_uid . ']' . $this->bbcode_specialchars($url) . '[/url:' . $this->bbcode_uid . ']'; @@ -896,6 +950,12 @@ class bbcode_firstpass extends bbcode if ($pos_domain !== false && $pos_path >= $pos_domain && $pos_ext >= $pos_path) { + // Ok, actually we allow linking to some files (this may be able to be extended in some way later...) + if (strpos($url, '/' . $check_path . '/download.' . $phpEx) !== 0) + { + return false; + } + return true; } } @@ -968,10 +1028,8 @@ class parse_message extends bbcode_firstpass // Do some general 'cleanup' first before processing message, // e.g. remove excessive newlines(?), smilies(?) - // Transform \r\n and \r into \n - // TODO: Second regex looks wrong... - $match = array('#\r\n?#', "#(\n\s+){3,}#u", '#(script|about|applet|activex|chrome):#i'); - $replace = array("\n", "\n\n", "\\1:"); + $match = array('#(script|about|applet|activex|chrome):#i'); + $replace = array("\\1:"); $this->message = preg_replace($match, $replace, trim($this->message)); // Message length check. -1 disables this check completely. @@ -1021,7 +1079,7 @@ class parse_message extends bbcode_firstpass if ($allow_magic_url) { $this->magic_url(generate_board_url()); - + if ($config['max_' . $mode . '_urls']) { $num_urls += preg_match_all('#\' . $row['emotion'] . ''; + $match[] = '#(?<=^|[\n .])' . preg_quote($row['code'], '#') . '(?![^<>]*>)#'; + $replace[] = '' . $row['code'] . ''; } $db->sql_freeresult($result); } @@ -1507,7 +1565,15 @@ class parse_message extends bbcode_firstpass } else { + if (utf8_strlen(preg_replace('#\[\/?[a-z\*\+\-]+(=[\S]+)?\]#ius', ' ', $this->message)) > 100) + { + $this->warn_msg[] = $user->lang['POLL_TITLE_TOO_LONG']; + } $poll['poll_title'] = $this->parse($poll['enable_bbcode'], ($config['allow_post_links']) ? $poll['enable_urls'] : false, $poll['enable_smilies'], $poll['img_status'], false, false, $config['allow_post_links'], false); + if (strlen($poll['poll_title']) > 255) + { + $this->warn_msg[] = $user->lang['POLL_TITLE_COMP_TOO_LONG']; + } } $this->message = $tmp_message; diff --git a/phpBB/includes/search/fulltext_mysql.php b/phpBB/includes/search/fulltext_mysql.php index 7c67b755e1..67f3258087 100644 --- a/phpBB/includes/search/fulltext_mysql.php +++ b/phpBB/includes/search/fulltext_mysql.php @@ -33,6 +33,7 @@ class fulltext_mysql extends search_backend var $search_query; var $common_words = array(); var $pcre_properties = false; + var $mbstring_regex = false; function fulltext_mysql(&$error) { @@ -45,6 +46,11 @@ class fulltext_mysql extends search_backend $this->pcre_properties = true; } + if (function_exists('mb_ereg')) + { + $this->mbstring_regex = true; + } + $error = false; } @@ -108,9 +114,6 @@ class fulltext_mysql extends search_backend { global $config; - $this->get_ignore_words(); - $this->get_synonyms(); - if ($terms == 'all') { $match = array('#\sand\s#iu', '#\sor\s#iu', '#\snot\s#iu', '#\+#', '#-#', '#\|#'); @@ -119,35 +122,82 @@ class fulltext_mysql extends search_backend $keywords = preg_replace($match, $replace, $keywords); } - $match = array(); - // New lines, carriage returns - $match[] = "#[\n\r]+#"; - // NCRs like   etc. - $match[] = '#(&|&)[\#a-z0-9]+?;#i'; - // Filter out as above - $keywords = preg_replace($match, ' ', trim($keywords)); + $split_keywords = preg_replace("#[\n\r\t]+#", ' ', trim(htmlspecialchars_decode($keywords))); // Split words - $split_keywords = preg_replace(($this->pcre_properties) ? '#([^\p{L}\p{N}\'*])#u' : '#([^\w\'*])#u', '$1$1', str_replace('\'\'', '\' \'', trim($keywords))); - $matches = array(); - preg_match_all(($this->pcre_properties) ? '#(?:[^\p{L}\p{N}*]|^)([+\-|]?(?:[\p{L}\p{N}*]+\'?)*[\p{L}\p{N}*])(?:[^\p{L}\p{N}*]|$)#u' : '#(?:[^\w*]|^)([+\-|]?(?:[\w*]+\'?)*[\w*])(?:[^\w*]|$)#u', $split_keywords, $matches); - $this->split_words = $matches[1]; - - if (sizeof($this->ignore_words)) + if ($this->pcre_properties) { - $this->common_words = array_intersect($this->split_words, $this->ignore_words); - $this->split_words = array_diff($this->split_words, $this->ignore_words); + $split_keywords = preg_replace('#([^\p{L}\p{N}\'*"()])#u', '$1$1', str_replace('\'\'', '\' \'', trim($split_keywords))); + } + else if ($this->mbstring_regex) + { + $split_keywords = mb_ereg_replace('([^\w\'*"()])', '\\1\\1', str_replace('\'\'', '\' \'', trim($split_keywords))); + } + else + { + $split_keywords = preg_replace('#([^\w\'*"()])#u', '$1$1', str_replace('\'\'', '\' \'', trim($split_keywords))); } - if (sizeof($this->replace_synonym)) + if ($this->pcre_properties) { - $this->split_words = str_replace($this->replace_synonym, $this->match_synonym, $this->split_words); + $matches = array(); + preg_match_all('#(?:[^\p{L}\p{N}*"()]|^)([+\-|]?(?:[\p{L}\p{N}*"()]+\'?)*[\p{L}\p{N}*"()])(?:[^\p{L}\p{N}*"()]|$)#u', $split_keywords, $matches); + $this->split_words = $matches[1]; } + else if ($this->mbstring_regex) + { + mb_regex_encoding('UTF-8'); + mb_ereg_search_init($split_keywords, '(?:[^\w*"()]|^)([+\-|]?(?:[\w*"()]+\'?)*[\w*"()])(?:[^\w*"()]|$)'); + + while (($word = mb_ereg_search_regs())) + { + $this->split_words[] = $word[1]; + } + } + else + { + $matches = array(); + preg_match_all('#(?:[^\w*"()]|^)([+\-|]?(?:[\w*"()]+\'?)*[\w*"()])(?:[^\w*"()]|$)#u', $split_keywords, $matches); + $this->split_words = $matches[1]; + } + + // to allow phrase search, we need to concatenate quoted words + $tmp_split_words = array(); + $phrase = ''; + foreach ($this->split_words as $word) + { + if ($phrase) + { + $phrase .= ' ' . $word; + if (strpos($word, '"') !== false && substr_count($word, '"') % 2 == 1) + { + $tmp_split_words[] = $phrase; + $phrase = ''; + } + } + else if (strpos($word, '"') !== false && substr_count($word, '"') % 2 == 1) + { + $phrase = $word; + } + else + { + $tmp_split_words[] = $word . ' '; + } + } + if ($phrase) + { + $tmp_split_words[] = $phrase; + } + + $this->split_words = $tmp_split_words; + + unset($tmp_split_words); + unset($phrase); foreach ($this->split_words as $i => $word) { - $clean_word = preg_replace('#^[+\-|]#', '', $word); + $clean_word = preg_replace('#^[+\-|"]#', '', $word); // check word length $clean_len = utf8_strlen(str_replace('*', '', $clean_word)); @@ -158,9 +208,41 @@ class fulltext_mysql extends search_backend } } - $this->search_query = implode(' ', $this->split_words); + if ($terms == 'any') + { + $this->search_query = ''; + foreach ($this->split_words as $word) + { + if ((strpos($word, '+') === 0) || (strpos($word, '-') === 0) || (strpos($word, '|') === 0)) + { + $word = substr($word, 1); + } + $this->search_query .= $word . ' '; + } + } + else + { + $this->search_query = ''; + foreach ($this->split_words as $word) + { + if ((strpos($word, '+') === 0) || (strpos($word, '-') === 0)) + { + $this->search_query .= $word . ' '; + } + else if (strpos($word, '|') === 0) + { + $this->search_query .= substr($word, 1) . ' '; + } + else + { + $this->search_query .= '+' . $word . ' '; + } + } + } - if (sizeof($this->split_words)) + $this->search_query = utf8_htmlspecialchars($this->search_query); + + if ($this->search_query) { $this->split_words = array_values($this->split_words); sort($this->split_words); @@ -176,23 +258,42 @@ class fulltext_mysql extends search_backend { global $config; - $this->get_ignore_words(); - $this->get_synonyms(); - // Split words - $text = preg_replace(($this->pcre_properties) ? '#([^\p{L}\p{N}\'*])#u' : '#([^\w\'*])#u', '$1$1', str_replace('\'\'', '\' \'', trim($text))); - $matches = array(); - preg_match_all(($this->pcre_properties) ? '#(?:[^\p{L}\p{N}*]|^)([+\-|]?(?:[\p{L}\p{N}*]+\'?)*[\p{L}\p{N}*])(?:[^\p{L}\p{N}*]|$)#u' : '#(?:[^\w*]|^)([+\-|]?(?:[\w*]+\'?)*[\w*])(?:[^\w*]|$)#u', $text, $matches); - $text = $matches[1]; - - if (sizeof($this->ignore_words)) + if ($this->pcre_properties) { - $text = array_diff($text, $this->ignore_words); + $text = preg_replace('#([^\p{L}\p{N}\'*])#u', '$1$1', str_replace('\'\'', '\' \'', trim($text))); + } + else if ($this->mbstring_regex) + { + $text = mb_ereg_replace('([^\w\'*])', '\\1\\1', str_replace('\'\'', '\' \'', trim($text))); + } + else + { + $text = preg_replace('#([^\w\'*])#u', '$1$1', str_replace('\'\'', '\' \'', trim($text))); } - if (sizeof($this->replace_synonym)) + if ($this->pcre_properties) { - $text = str_replace($this->replace_synonym, $this->match_synonym, $text); + $matches = array(); + preg_match_all('#(?:[^\p{L}\p{N}*]|^)([+\-|]?(?:[\p{L}\p{N}*]+\'?)*[\p{L}\p{N}*])(?:[^\p{L}\p{N}*]|$)#u', $text, $matches); + $text = $matches[1]; + } + else if ($this->mbstring_regex) + { + mb_regex_encoding('UTF-8'); + mb_ereg_search_init($text, '(?:[^\w*]|^)([+\-|]?(?:[\w*]+\'?)*[\w*])(?:[^\w*]|$)'); + + $text = array(); + while (($word = mb_ereg_search_regs())) + { + $text[] = $word[1]; + } + } + else + { + $matches = array(); + preg_match_all('#(?:[^\w*]|^)([+\-|]?(?:[\w*]+\'?)*[\w*])(?:[^\w*]|$)#u', $text, $matches); + $text = $matches[1]; } // remove too short or too long words @@ -210,26 +311,39 @@ class fulltext_mysql extends search_backend } /** - * Performs a search on keywords depending on display specific params. + * Performs a search on keywords depending on display specific params. You have to run split_keywords() first. * - * @param array &$id_ary passed by reference, to be filled with ids for the page specified by $start and $per_page, should be ordered - * @param int $start indicates the first index of the page - * @param int $per_page number of ids each page is supposed to contain - * @return total number of results + * @param string $type contains either posts or topics depending on what should be searched for + * @param string &$fields contains either titleonly (topic titles should be searched), msgonly (only message bodies should be searched), firstpost (only subject and body of the first post should be searched) or all (all post bodies and subjects should be searched) + * @param string &$terms is either 'all' (use query as entered, words without prefix should default to "have to be in field") or 'any' (ignore search query parts and just return all posts that contain any of the specified words) + * @param array &$sort_by_sql contains SQL code for the ORDER BY part of a query + * @param string &$sort_key is the key of $sort_by_sql for the selected sorting + * @param string &$sort_dir is either a or d representing ASC and DESC + * @param string &$sort_days specifies the maximum amount of days a post may be old + * @param array &$ex_fid_ary specifies an array of forum ids which should not be searched + * @param array &$m_approve_fid_ary specifies an array of forum ids in which the searcher is allowed to view unapproved posts + * @param int &$topic_id is set to 0 or a topic id, if it is not 0 then only posts in this topic should be searched + * @param array &$author_ary an array of author ids if the author should be ignored during the search the array is empty + * @param array &$id_ary passed by reference, to be filled with ids for the page specified by $start and $per_page, should be ordered + * @param int $start indicates the first index of the page + * @param int $per_page number of ids each page is supposed to contain + * @return boolean|int total number of results + * + * @access public */ function keyword_search($type, &$fields, &$terms, &$sort_by_sql, &$sort_key, &$sort_dir, &$sort_days, &$ex_fid_ary, &$m_approve_fid_ary, &$topic_id, &$author_ary, &$id_ary, $start, $per_page) { global $config, $db; // No keywords? No posts. - if (!sizeof($this->split_words)) + if (!$this->search_query) { return false; } // generate a search_key from all the options to identify the results $search_key = md5(implode('#', array( - implode(',', $this->split_words), + implode(', ', $this->split_words), $type, $fields, $terms, @@ -327,47 +441,9 @@ class fulltext_mysql extends search_backend $sql_where_options .= ($sort_days) ? ' AND p.post_time >= ' . (time() - ($sort_days * 86400)) : ''; $sql_where_options .= $sql_match_where; - // split the words into words that have to be included or must not be included and optional words - $words = $any_words = array(); - if ($terms == 'all') - { - foreach ($this->split_words as $id => $word) - { - if ((strpos($word, '+') === 0) || (strpos($word, '-') === 0)) - { - $words[] = $word; - } - else if (strpos($word, '|') === 0) - { - $any_words[] = substr($word, 1); - } - else - { - $words[] = '+' . $word; - } - } - } - else - { - foreach ($this->split_words as $id => $word) - { - if ((strpos($word, '+') === 0) || (strpos($word, '-') === 0) || (strpos($word, '|') === 0)) - { - $words[] = substr($word, 1); - } - else - { - $words[] = $word; - } - } - } - - // Get the ids for the current result block - $any_words = (sizeof($any_words)) ? ' +(' . implode(' ', $any_words) . ')' : ''; - $sql = "SELECT $sql_select FROM $sql_from$sql_sort_table" . POSTS_TABLE . " p - WHERE MATCH ($sql_match) AGAINST ('" . $db->sql_escape(implode(' ', $words)) . $any_words . "' IN BOOLEAN MODE) + WHERE MATCH ($sql_match) AGAINST ('" . $db->sql_escape(htmlspecialchars_decode($this->search_query)) . "' IN BOOLEAN MODE) $sql_where_options ORDER BY $sql_sort"; $result = $db->sql_query_limit($sql, $config['search_block_size'], $start); @@ -566,37 +642,8 @@ class fulltext_mysql extends search_backend $split_text = $this->split_message($message); $split_title = ($subject) ? $this->split_message($subject) : array(); - $words = array(); - if ($mode == 'edit') - { - $old_text = array(); - $old_title = array(); + $words = array_unique(array_merge($split_text, $split_title)); - $sql = 'SELECT post_text, post_subject - FROM ' . POSTS_TABLE . " - WHERE post_id = $post_id"; - $result = $db->sql_query($sql); - - if ($row = $db->sql_fetchrow($result)) - { - $old_text = $this->split_message($row['post_text']); - $old_title = $this->split_message($row['post_subject']); - } - $db->sql_freeresult($result); - - $words = array_unique(array_merge( - array_diff($split_text, $old_text), - array_diff($split_title, $old_title), - array_diff($old_text, $split_text), - array_diff($old_title, $split_title) - )); - unset($old_title); - unset($old_text); - } - else - { - $words = array_unique(array_merge($split_text, $split_title)); - } unset($split_text); unset($split_title); @@ -653,6 +700,10 @@ class fulltext_mysql extends search_backend { $alter[] = 'MODIFY post_subject varchar(100) COLLATE utf8_unicode_ci DEFAULT \'\' NOT NULL'; } + else + { + $alter[] = 'MODIFY post_subject text NOT NULL'; + } $alter[] = 'ADD FULLTEXT (post_subject)'; } @@ -662,9 +713,18 @@ class fulltext_mysql extends search_backend { $alter[] = 'MODIFY post_text mediumtext COLLATE utf8_unicode_ci NOT NULL'; } + else + { + $alter[] = 'MODIFY post_text mediumtext NOT NULL'; + } $alter[] = 'ADD FULLTEXT (post_text)'; } + if (!isset($this->stats['post_content'])) + { + $alter[] = 'ADD FULLTEXT post_content (post_subject, post_text)'; + } + if (sizeof($alter)) { $db->sql_query('ALTER TABLE ' . POSTS_TABLE . ' ' . implode(', ', $alter)); @@ -705,6 +765,11 @@ class fulltext_mysql extends search_backend $alter[] = 'DROP INDEX post_text'; } + if (isset($this->stats['post_content'])) + { + $alter[] = 'DROP INDEX post_content'; + } + if (sizeof($alter)) { $db->sql_query('ALTER TABLE ' . POSTS_TABLE . ' ' . implode(', ', $alter)); @@ -725,7 +790,7 @@ class fulltext_mysql extends search_backend $this->get_stats(); } - return (isset($this->stats['post_text']) && isset($this->stats['post_subject'])) ? true : false; + return (isset($this->stats['post_text']) && isset($this->stats['post_subject']) && isset($this->stats['post_content'])) ? true : false; } /** @@ -742,8 +807,6 @@ class fulltext_mysql extends search_backend return array( $user->lang['FULLTEXT_MYSQL_TOTAL_POSTS'] => ($this->index_created()) ? $this->stats['total_posts'] : 0, - $user->lang['FULLTEXT_MYSQL_TEXT_CARDINALITY'] => isset($this->stats['post_text']['Cardinality']) ? $this->stats['post_text']['Cardinality'] : 0, - $user->lang['FULLTEXT_MYSQL_SUBJECT_CARDINALITY'] => isset($this->stats['post_subject']['Cardinality']) ? $this->stats['post_subject']['Cardinality'] : 0, ); } @@ -768,14 +831,18 @@ class fulltext_mysql extends search_backend if ($index_type == 'FULLTEXT') { - if ($row['Column_name'] == 'post_text') + if ($row['Key_name'] == 'post_text') { $this->stats['post_text'] = $row; } - else if ($row['Column_name'] == 'post_subject') + else if ($row['Key_name'] == 'post_subject') { $this->stats['post_subject'] = $row; } + else if ($row['Key_name'] == 'post_content') + { + $this->stats['post_content'] = $row; + } } } $db->sql_freeresult($result); @@ -794,12 +861,15 @@ class fulltext_mysql extends search_backend { global $user, $config; - $tpl = '
    -

    ' . $user->lang['FULLTEXT_MYSQL_UNICODE_EXPLAIN'] . '
    +

    ' . $user->lang['FULLTEXT_MYSQL_PCRE_EXPLAIN'] . '
    ' . (($this->pcre_properties) ? $user->lang['YES'] : $user->lang['NO']) . ' (PHP ' . PHP_VERSION . ')
    +
    +

    ' . $user->lang['FULLTEXT_MYSQL_MBSTRING_EXPLAIN'] . '
    +
    ' . (($this->mbstring_regex) ? $user->lang['YES'] : $user->lang['NO']). '
    +
    '; // These are fields required in the config table diff --git a/phpBB/includes/search/fulltext_native.php b/phpBB/includes/search/fulltext_native.php index 11ca09805a..1f375c8f51 100755 --- a/phpBB/includes/search/fulltext_native.php +++ b/phpBB/includes/search/fulltext_native.php @@ -124,6 +124,7 @@ class fulltext_native extends search_backend break; case '(': $open_bracket = $i; + $space = false; break; case '|': $keywords[$i] = ' '; @@ -187,7 +188,7 @@ class fulltext_native extends search_backend preg_match_all('#([^\\s+\\-|*()]+)(?:$|[\\s+\\-|()])#u', $keywords, $exact_words); $exact_words = $exact_words[1]; - $common_ids = array(); + $common_ids = $words = array(); if (sizeof($exact_words)) { @@ -287,6 +288,14 @@ class fulltext_native extends search_backend $id_words[] = $words[$word_part]; $non_common_words[] = $word_part; } + else + { + $len = utf8_strlen($word_part); + if ($len < $this->word_length['min'] || $len > $this->word_length['max']) + { + $this->common_words[] = $word_part; + } + } } if (sizeof($id_words)) { @@ -311,7 +320,6 @@ class fulltext_native extends search_backend // else we only need one id else if (($wildcard = strpos($word, '*') !== false) || isset($words[$word])) { - if ($wildcard) { $len = utf8_strlen(str_replace('*', '', $word)); @@ -321,7 +329,7 @@ class fulltext_native extends search_backend } else { - $this->common_words[] = $row['word_text']; + $this->common_words[] = $word; } } else @@ -1092,7 +1100,7 @@ class fulltext_native extends search_backend // Get unique words from the above arrays $unique_add_words = array_unique(array_merge($words['add']['post'], $words['add']['title'])); - + // We now have unique arrays of all words to be added and removed and // individual arrays of added and removed words for text and title. What // we need to do now is add the new words (if they don't already exist) @@ -1110,22 +1118,27 @@ class fulltext_native extends search_backend $word_ids[$row['word_text']] = $row['word_id']; } $db->sql_freeresult($result); - $new_words = array_diff($unique_add_words, array_keys($word_ids)); + $db->sql_transaction('begin'); if (sizeof($new_words)) { $sql_ary = array(); foreach ($new_words as $word) { - $sql_ary[] = array('word_text' => $word); + $sql_ary[] = array('word_text' => $word, 'word_count' => 0); } - + $db->sql_return_on_error(true); $db->sql_multi_insert(SEARCH_WORDLIST_TABLE, $sql_ary); + $db->sql_return_on_error(false); } unset($new_words, $sql_ary); } + else + { + $db->sql_transaction('begin'); + } // now update the search match table, remove links to removed words and add links to new words foreach ($words['del'] as $word_in => $word_ary) @@ -1145,10 +1158,18 @@ class fulltext_native extends search_backend AND post_id = ' . intval($post_id) . " AND title_match = $title_match"; $db->sql_query($sql); + + $sql = 'UPDATE ' . SEARCH_WORDLIST_TABLE . ' + SET word_count = word_count - 1 + WHERE ' . $db->sql_in_set('word_id', $sql_in) . ' + AND word_count > 0'; + $db->sql_query($sql); + unset($sql_in); } } + $db->sql_return_on_error(true); foreach ($words['add'] as $word_in => $word_ary) { $title_match = ($word_in == 'title') ? 1 : 0; @@ -1160,8 +1181,16 @@ class fulltext_native extends search_backend FROM " . SEARCH_WORDLIST_TABLE . ' WHERE ' . $db->sql_in_set('word_text', $word_ary); $db->sql_query($sql); + + $sql = 'UPDATE ' . SEARCH_WORDLIST_TABLE . ' + SET word_count = word_count + 1 + WHERE ' . $db->sql_in_set('word_text', $word_ary); + $db->sql_query($sql); } } + $db->sql_return_on_error(false); + + $db->sql_transaction('commit'); // destroy cached search results containing any of the words removed or added $this->destroy_cache(array_unique(array_merge($words['add']['post'], $words['add']['title'], $words['del']['post'], $words['del']['title'])), array($poster_id)); @@ -1180,13 +1209,54 @@ class fulltext_native extends search_backend if (sizeof($post_ids)) { + $sql = 'SELECT w.word_id, w.word_text, m.title_match + FROM ' . SEARCH_WORDMATCH_TABLE . ' m, ' . SEARCH_WORDLIST_TABLE . ' w + WHERE ' . $db->sql_in_set('m.post_id', $post_ids) . ' + AND w.word_id = m.word_id'; + $result = $db->sql_query($sql); + + $message_word_ids = $title_word_ids = $word_texts = array(); + while ($row = $db->sql_fetchrow($result)) + { + if ($row['title_match']) + { + $title_word_ids[] = $row['word_id']; + } + else + { + $message_word_ids[] = $row['word_id']; + } + $word_texts[] = $row['word_text']; + } + $db->sql_freeresult($result); + + if (sizeof($title_word_ids)) + { + $sql = 'UPDATE ' . SEARCH_WORDLIST_TABLE . ' + SET word_count = word_count - 1 + WHERE ' . $db->sql_in_set('word_id', $title_word_ids) . ' + AND word_count > 0'; + $db->sql_query($sql); + } + + if (sizeof($message_word_ids)) + { + $sql = 'UPDATE ' . SEARCH_WORDLIST_TABLE . ' + SET word_count = word_count - 1 + WHERE ' . $db->sql_in_set('word_id', $message_word_ids) . ' + AND word_count > 0'; + $db->sql_query($sql); + } + + unset($title_word_ids); + unset($message_word_ids); + $sql = 'DELETE FROM ' . SEARCH_WORDMATCH_TABLE . ' WHERE ' . $db->sql_in_set('post_id', $post_ids); $db->sql_query($sql); } - // SEARCH_WORDLIST_TABLE will be updated by tidy() - $this->destroy_cache(array(), $author_ids); + $this->destroy_cache(array_unique($word_texts), $author_ids); } /** @@ -1212,39 +1282,32 @@ class fulltext_native extends search_backend { $common_threshold = ((double) $config['fulltext_native_common_thres']) / 100.0; // First, get the IDs of common words - $sql = 'SELECT word_id - FROM ' . SEARCH_WORDMATCH_TABLE . ' - GROUP BY word_id - HAVING COUNT(word_id) > ' . floor($config['num_posts'] * $common_threshold); + $sql = 'SELECT word_id, word_text + FROM ' . SEARCH_WORDLIST_TABLE . ' + WHERE word_count > ' . floor($config['num_posts'] * $common_threshold) . ' + OR word_common = 1'; $result = $db->sql_query($sql); $sql_in = array(); while ($row = $db->sql_fetchrow($result)) { $sql_in[] = $row['word_id']; + $destroy_cache_words[] = $row['word_text']; } $db->sql_freeresult($result); if (sizeof($sql_in)) { - // Get the text of those new common words - $sql = 'SELECT word_text - FROM ' . SEARCH_WORDLIST_TABLE . ' - WHERE ' . $db->sql_in_set('word_id', $sql_in); - $result = $db->sql_query($sql); - - while ($row = $db->sql_fetchrow($result)) - { - $destroy_cache_words[] = $row['word_text']; - } - $db->sql_freeresult($result); - // Flag the words $sql = 'UPDATE ' . SEARCH_WORDLIST_TABLE . ' SET word_common = 1 WHERE ' . $db->sql_in_set('word_id', $sql_in); $db->sql_query($sql); + // by setting search_last_gc to the new time here we make sure that if a user reloads because the + // following query takes too long, he won't run into it again + set_config('search_last_gc', time(), true); + // Delete the matches $sql = 'DELETE FROM ' . SEARCH_WORDMATCH_TABLE . ' WHERE ' . $db->sql_in_set('word_id', $sql_in); @@ -1253,8 +1316,11 @@ class fulltext_native extends search_backend unset($sql_in); } - // destroy cached search results containing any of the words that are now common or were removed - $this->destroy_cache(array_unique($destroy_cache_words)); + if (sizeof($destroy_cache_words)) + { + // destroy cached search results containing any of the words that are now common or were removed + $this->destroy_cache(array_unique($destroy_cache_words)); + } set_config('search_last_gc', time(), true); } @@ -1266,9 +1332,21 @@ class fulltext_native extends search_backend { global $db; - $db->sql_query((($db->sql_layer != 'sqlite') ? 'TRUNCATE TABLE ' : 'DELETE FROM ') . SEARCH_WORDLIST_TABLE); - $db->sql_query((($db->sql_layer != 'sqlite') ? 'TRUNCATE TABLE ' : 'DELETE FROM ') . SEARCH_WORDMATCH_TABLE); - $db->sql_query((($db->sql_layer != 'sqlite') ? 'TRUNCATE TABLE ' : 'DELETE FROM ') . SEARCH_RESULTS_TABLE); + switch ($db->sql_layer) + { + case 'sqlite': + case 'firebird': + $db->sql_query('DELETE FROM ' . SEARCH_WORDLIST_TABLE); + $db->sql_query('DELETE FROM ' . SEARCH_WORDMATCH_TABLE); + $db->sql_query('DELETE FROM ' . SEARCH_RESULTS_TABLE); + break; + + default: + $db->sql_query('TRUNCATE TABLE ' . SEARCH_WORDLIST_TABLE); + $db->sql_query('TRUNCATE TABLE ' . SEARCH_WORDMATCH_TABLE); + $db->sql_query('TRUNCATE TABLE ' . SEARCH_RESULTS_TABLE); + break; + } } /** @@ -1575,7 +1653,7 @@ class fulltext_native extends search_backend $tpl = '

    ' . $user->lang['YES_SEARCH_UPDATE_EXPLAIN'] . '
    -
     ' . $user->lang['YES'] . '   ' . $user->lang['NO'] . '
    +

    ' . $user->lang['MIN_SEARCH_CHARS_EXPLAIN'] . '
    diff --git a/phpBB/includes/session.php b/phpBB/includes/session.php index 9121a965fd..f771f71c22 100644 --- a/phpBB/includes/session.php +++ b/phpBB/includes/session.php @@ -55,7 +55,6 @@ class session if (strpos($argument, 'sid=') === 0 || strpos($argument, '_f_=') === 0) { unset($args[$key]); - break; } } @@ -86,10 +85,10 @@ class session // Current page from phpBB root (for example: adm/index.php?i=10&b=2) $page = (($page_dir) ? $page_dir . '/' : '') . $page_name . (($query_string) ? "?$query_string" : ''); - // The script path from the webroot to the current directory (for example: /phpBB2/adm/) : always prefixed with / and ends in / + // The script path from the webroot to the current directory (for example: /phpBB3/adm/) : always prefixed with / and ends in / $script_path = trim(str_replace('\\', '/', dirname($script_name))); - // The script path from the webroot to the phpBB root (for example: /phpBB2/) + // The script path from the webroot to the phpBB root (for example: /phpBB3/) $script_dirs = explode('/', $script_path); array_splice($script_dirs, -sizeof($page_dirs)); $root_script_path = implode('/', $script_dirs) . (sizeof($root_dirs) ? '/' . implode('/', $root_dirs) : ''); @@ -114,13 +113,6 @@ class session 'page' => $page ); -/* - if (!file_exists($page_name)) - { - trigger_error('You are on a page that does not exist!', E_USER_ERROR); - } -*/ - return $page_array; } @@ -145,7 +137,7 @@ class session $this->time_now = time(); $this->cookie_data = array('u' => 0, 'k' => ''); $this->update_session_page = $update_session_page; - $this->browser = (!empty($_SERVER['HTTP_USER_AGENT'])) ? (string) $_SERVER['HTTP_USER_AGENT'] : ''; + $this->browser = (!empty($_SERVER['HTTP_USER_AGENT'])) ? htmlspecialchars((string) $_SERVER['HTTP_USER_AGENT']) : ''; $this->forwarded_for = (!empty($_SERVER['HTTP_X_FORWARDED_FOR'])) ? (string) $_SERVER['HTTP_X_FORWARDED_FOR'] : ''; $this->host = (!empty($_SERVER['HTTP_HOST'])) ? (string) $_SERVER['HTTP_HOST'] : 'localhost'; $this->page = $this->extract_current_page($phpbb_root_path); @@ -168,14 +160,9 @@ class session // check IPv4 first, the IPv6 is hopefully only going to be used very seldomly if (!empty($ip) && !preg_match($ipv4, $ip) && !preg_match($ipv6, $ip)) { - if (!defined('DEBUG_EXTRA')) - { - trigger_error('Hacking attempt!'); - } - else - { - trigger_error('Invalid HTTP_X_FORWARDED_FOR header detected: ' . htmlspecialchars($this->forwarded_for)); - } + // contains invalid data, don't use the forwarded for header + $this->forwarded_for = ''; + break; } } } @@ -211,7 +198,7 @@ class session $this->load = false; // Load limit check (if applicable) - if ($config['limit_load']) + if ($config['limit_load'] || $config['limit_search_load']) { if ($load = @file_get_contents('/proc/loadavg')) { @@ -221,6 +208,7 @@ class session else { set_config('limit_load', '0'); + set_config('limit_search_load', '0'); } } @@ -241,9 +229,17 @@ class session // Validate IP length according to admin ... enforces an IP // check on bots if admin requires this // $quadcheck = ($config['ip_check_bot'] && $this->data['user_type'] & USER_BOT) ? 4 : $config['ip_check']; - - $s_ip = implode('.', array_slice(explode('.', $this->data['session_ip']), 0, $config['ip_check'])); - $u_ip = implode('.', array_slice(explode('.', $this->ip), 0, $config['ip_check'])); + + if (strpos($this->ip, ':') !== false && strpos($this->data['session_ip'], ':') !== false) + { + $s_ip = short_ipv6($this->data['session_ip'], $config['ip_check']); + $u_ip = short_ipv6($this->ip, $config['ip_check']); + } + else + { + $s_ip = implode('.', array_slice(explode('.', $this->data['session_ip']), 0, $config['ip_check'])); + $u_ip = implode('.', array_slice(explode('.', $this->ip), 0, $config['ip_check'])); + } $s_browser = ($config['browser_check']) ? strtolower(substr($this->data['session_browser'], 0, 149)) : ''; $u_browser = ($config['browser_check']) ? strtolower(substr($this->browser, 0, 149)) : ''; @@ -313,7 +309,7 @@ class session // Added logging temporarly to help debug bugs... if (defined('DEBUG_EXTRA')) { - add_log('critical', 'LOG_IP_BROWSER_FORWARDED_CHECK', $u_ip, $s_ip, $u_browser, $s_browser, $u_forwarded_for, $s_forwarded_for); + add_log('critical', 'LOG_IP_BROWSER_FORWARDED_CHECK', $u_ip, $s_ip, $u_browser, $s_browser, htmlspecialchars($u_forwarded_for), htmlspecialchars($s_forwarded_for)); } } } @@ -501,8 +497,16 @@ class session if ($this->data['is_bot'] && $bot == $this->data['user_id'] && $this->data['session_id']) { // Only assign the current session if the ip, browser and forwarded_for match... - $s_ip = implode('.', array_slice(explode('.', $this->data['session_ip']), 0, $config['ip_check'])); - $u_ip = implode('.', array_slice(explode('.', $this->ip), 0, $config['ip_check'])); + if (strpos($this->ip, ':') !== false && strpos($this->data['session_ip'], ':') !== false) + { + $s_ip = short_ipv6($this->data['session_ip'], $config['ip_check']); + $u_ip = short_ipv6($this->ip, $config['ip_check']); + } + else + { + $s_ip = implode('.', array_slice(explode('.', $this->data['session_ip']), 0, $config['ip_check'])); + $u_ip = implode('.', array_slice(explode('.', $this->ip), 0, $config['ip_check'])); + } $s_browser = ($config['browser_check']) ? strtolower(substr($this->data['session_browser'], 0, 149)) : ''; $u_browser = ($config['browser_check']) ? strtolower(substr($this->browser, 0, 149)) : ''; @@ -578,7 +582,7 @@ class session WHERE session_id = \'' . $db->sql_escape($this->session_id) . '\' AND session_user_id = ' . ANONYMOUS; - if (!$this->session_id || !$db->sql_query($sql) || !$db->sql_affectedrows()) + if (!defined('IN_ERROR_HANDLER') && (!$this->session_id || !$db->sql_query($sql) || !$db->sql_affectedrows())) { // Limit new sessions in 1 minute period (if required) if ((!isset($this->data['session_time']) || !$this->data['session_time']) && $config['active_sessions']) @@ -592,6 +596,7 @@ class session if ((int) $row['sessions'] > (int) $config['active_sessions']) { + header('HTTP/1.1 503 Service Unavailable'); trigger_error('BOARD_UNAVAILABLE'); } } @@ -926,6 +931,14 @@ class session if ($banned && !$return) { + global $template; + + // If the session is empty we need to create a valid one... + if (empty($this->session_id)) + { + $this->session_create(ANONYMOUS); + } + // Initiate environment ... since it won't be set at this stage $this->setup(); @@ -940,18 +953,28 @@ class session { global $phpEx; - // Set as a precaution to allow login_box() handling this case correctly as well as this function not being executed again. - define('IN_CHECK_BAN', 1); - $this->setup('ucp'); $this->data['is_registered'] = $this->data['is_bot'] = false; + // Set as a precaution to allow login_box() handling this case correctly as well as this function not being executed again. + define('IN_CHECK_BAN', 1); + login_box("index.$phpEx"); // The false here is needed, else the user is able to circumvent the ban. $this->session_kill(false); } + // Ok, we catch the case of an empty session id for the anonymous user... + // This can happen if the user is logging in, banned by username and the login_box() being called "again". + if (empty($this->session_id) && defined('IN_CHECK_BAN')) + { + $this->session_create(ANONYMOUS); + } + + // Because we never have a fully working session we need to embed the style + $template->assign_var('S_FORCE_EMBED_STYLE', true); + // Determine which message to output $till_date = ($ban_row['ban_end']) ? $this->format_date($ban_row['ban_end']) : ''; $message = ($ban_row['ban_end']) ? 'BOARD_BAN_TIME' : 'BOARD_BAN_PERM'; @@ -1023,6 +1046,41 @@ class session return false; } + /** + * Check if URI is blacklisted + * This should be called only where absolutly necessary, for example on the submitted website field + * This function is not in use at the moment and is only included for testing purposes, it may not work at all! + * This means it is untested at the moment and therefore commented out + * + * @param string $uri URI to check + * @return true if uri is on blacklist, else false. Only blacklist is checked (~zero FP), no grey lists + function check_uribl($uri) + { + // Normally parse_url() is not intended to parse uris + // We need to get the top-level domain name anyway... change. + $uri = parse_url($uri); + + if ($uri === false || empty($uri['host'])) + { + return false; + } + + $uri = trim($uri['host']); + + if ($uri) + { + // One problem here... the return parameter for the "windows" method is different from what + // we expect... this may render this check useless... + if (phpbb_checkdnsrr($uri . '.multi.uribl.com.', 'A') === true) + { + return true; + } + } + + return false; + } + */ + /** * Set/Update a persistent login key * @@ -1129,6 +1187,7 @@ class user extends session var $lang_name; var $lang_path; var $img_lang; + var $img_array = array(); // Able to add new option (id 7) var $keyoptions = array('viewimg' => 0, 'viewflash' => 1, 'viewsmilies' => 2, 'viewsigs' => 3, 'viewavatars' => 4, 'viewcensors' => 5, 'attachsig' => 6, 'bbcode' => 8, 'smilies' => 9, 'popuppm' => 10); @@ -1329,6 +1388,90 @@ class user extends session $this->img_lang = (file_exists($phpbb_root_path . 'styles/' . $this->theme['imageset_path'] . '/imageset/' . $this->lang_name)) ? $this->lang_name : $config['default_lang']; + $sql = 'SELECT * + FROM ' . STYLES_IMAGESET_DATA_TABLE . ' + WHERE imageset_id = ' . $this->theme['imageset_id'] . " + AND image_lang IN('" . $db->sql_escape($this->img_lang) . "', '')"; + $result = $db->sql_query($sql, 3600); + + $localised_images = false; + while ($row = $db->sql_fetchrow($result)) + { + if ($row['image_lang']) + { + $localised_images = true; + } + $this->img_array[$row['image_name']] = $row; + } + $db->sql_freeresult($result); + + // there were no localised images, try to refresh the localised imageset for the user's language + if (!$localised_images) + { + // Attention: this code ignores the image definition list from acp_styles and just takes everything + // that the config file contains + $sql_ary = array(); + + $db->sql_transaction('begin'); + + $sql = 'DELETE FROM ' . STYLES_IMAGESET_DATA_TABLE . ' + WHERE imageset_id = ' . $this->theme['imageset_id'] . ' + AND image_lang = \'' . $db->sql_escape($this->img_lang) . '\''; + $result = $db->sql_query($sql); + + if (@file_exists("{$phpbb_root_path}styles/{$this->theme['imageset_path']}/imageset/{$this->img_lang}/imageset.cfg")) + { + $cfg_data_imageset_data = parse_cfg_file("{$phpbb_root_path}styles/{$this->theme['imageset_path']}/imageset/{$this->img_lang}/imageset.cfg"); + foreach ($cfg_data_imageset_data as $image_name => $value) + { + if (strpos($value, '*') !== false) + { + if (substr($value, -1, 1) === '*') + { + list($image_filename, $image_height) = explode('*', $value); + $image_width = 0; + } + else + { + list($image_filename, $image_height, $image_width) = explode('*', $value); + } + } + else + { + $image_filename = $value; + $image_height = $image_width = 0; + } + + if (strpos($image_name, 'img_') === 0 && $image_filename) + { + $image_name = substr($image_name, 4); + $sql_ary[] = array( + 'image_name' => $image_name, + 'image_filename' => $image_filename, + 'image_height' => $image_height, + 'image_width' => $image_width, + 'imageset_id' => $this->theme['imageset_id'], + 'image_lang' => $this->img_lang, + ); + } + } + } + + $db->sql_multi_insert(STYLES_IMAGESET_DATA_TABLE, $sql_ary); + + $db->sql_transaction('commit'); + + $cache->destroy('sql', STYLES_IMAGESET_DATA_TABLE); + + add_log('admin', 'LOG_IMAGESET_REFRESHED', $this->theme['imageset_name'], $this->img_lang); + } + + // If this function got called from the error handler we are finished here. + if (defined('IN_ERROR_HANDLER')) + { + return; + } + // Disable board if the install/ directory is still present // For the brave development army we do not care about this, else we need to comment out this everytime we develop locally if (!defined('DEBUG_EXTRA') && !defined('ADMIN_START') && !defined('IN_INSTALL') && !defined('IN_LOGIN') && file_exists($phpbb_root_path . 'install')) @@ -1342,13 +1485,14 @@ class user extends session { $message = (!empty($config['board_disable_msg'])) ? $config['board_disable_msg'] : 'BOARD_DISABLE'; } - trigger_error($message); } // Is board disabled and user not an admin or moderator? if ($config['board_disable'] && !defined('IN_LOGIN') && !$auth->acl_gets('a_', 'm_') && !$auth->acl_getf_global('m_')) { + header('HTTP/1.1 503 Service Unavailable'); + $message = (!empty($config['board_disable_msg'])) ? $config['board_disable_msg'] : 'BOARD_DISABLE'; trigger_error($message); } @@ -1358,13 +1502,14 @@ class user extends session { if ($this->load > floatval($config['limit_load']) && !defined('IN_LOGIN') && !$auth->acl_gets('a_', 'm_') && !$auth->acl_getf_global('m_')) { + header('HTTP/1.1 503 Service Unavailable'); trigger_error('BOARD_UNAVAILABLE'); } } // Does the user need to change their password? If so, redirect to the // ucp profile reg_details page ... of course do not redirect if we're already in the ucp - if (!defined('IN_ADMIN') && !defined('ADMIN_START') && $config['chg_passforce'] && $this->data['is_registered'] && $this->data['user_passchg'] < time() - ($config['chg_passforce'] * 86400)) + if (!defined('IN_ADMIN') && !defined('ADMIN_START') && $config['chg_passforce'] && $this->data['is_registered'] && $auth->acl_get('u_chgpasswd') && $this->data['user_passchg'] < time() - ($config['chg_passforce'] * 86400)) { if (strpos($this->page['query_string'], 'mode=reg_details') === false && $this->page['page_name'] != "ucp.$phpEx") { @@ -1440,7 +1585,7 @@ class user extends session if (!$this->lang_path) { global $phpbb_root_path, $config; - + $this->lang_path = $phpbb_root_path . 'language/' . $config['default_lang'] . '/'; } @@ -1565,43 +1710,20 @@ class user extends session static $imgs; global $phpbb_root_path; - $img_data = &$imgs[$img . $suffix]; + $img_data = &$imgs[$img]; if (empty($img_data) || $width !== false) { - if (!isset($this->theme[$img]) || !$this->theme[$img]) + if (!isset($this->img_array[$img])) { // Do not fill the image to let designers decide what to do if the image is empty $img_data = ''; return $img_data; } - // Do not include dimensions? - if (strpos($this->theme[$img], '*') === false) - { - $imgsrc = trim($this->theme[$img]); - $width = $height = false; - } - else - { - if ($width === false) - { - list($imgsrc, $height, $width) = explode('*', $this->theme[$img]); - } - else - { - list($imgsrc, $height) = explode('*', $this->theme[$img]); - } - } - - if ($suffix !== '') - { - $imgsrc = str_replace('{SUFFIX}', $suffix, $imgsrc); - } - - $img_data['src'] = $phpbb_root_path . 'styles/' . $this->theme['imageset_path'] . '/imageset/' . str_replace('{LANG}', $this->img_lang, $imgsrc); - $img_data['width'] = $width; - $img_data['height'] = $height; + $img_data['src'] = $phpbb_root_path . 'styles/' . $this->theme['imageset_path'] . '/imageset/' . ($this->img_array[$img]['image_lang'] ? $this->img_array[$img]['image_lang'] .'/' : '') . $this->img_array[$img]['image_filename']; + $img_data['width'] = $this->img_array[$img]['image_width']; + $img_data['height'] = $this->img_array[$img]['image_height']; } $alt = (!empty($this->lang[$alt])) ? $this->lang[$alt] : $alt; diff --git a/phpBB/includes/template.php b/phpBB/includes/template.php index 259874488d..3326852ee7 100644 --- a/phpBB/includes/template.php +++ b/phpBB/includes/template.php @@ -222,44 +222,56 @@ class template if (isset($user->theme['template_storedb']) && $user->theme['template_storedb']) { - $sql = 'SELECT * FROM ' . STYLES_TEMPLATE_DATA_TABLE . ' + $sql = 'SELECT * + FROM ' . STYLES_TEMPLATE_DATA_TABLE . ' WHERE template_id = ' . $user->theme['template_id'] . " AND (template_filename = '" . $db->sql_escape($this->filename[$handle]) . "' OR template_included LIKE '%" . $db->sql_escape($this->filename[$handle]) . ":%')"; $result = $db->sql_query($sql); + $row = $db->sql_fetchrow($result); - while ($row = $db->sql_fetchrow($result)) + if ($row) { - if ($row['template_mtime'] < filemtime($phpbb_root_path . 'styles/' . $user->theme['template_path'] . '/template/' . $row['template_filename'])) + do { + if ($row['template_mtime'] < filemtime($phpbb_root_path . 'styles/' . $user->theme['template_path'] . '/template/' . $row['template_filename'])) + { + if ($row['template_filename'] == $this->filename[$handle]) + { + $compile->_tpl_load_file($handle); + } + else + { + $this->files[$row['template_filename']] = $this->root . '/' . $row['template_filename']; + $compile->_tpl_load_file($row['template_filename']); + unset($this->compiled_code[$row['template_filename']]); + unset($this->files[$row['template_filename']]); + } + } + if ($row['template_filename'] == $this->filename[$handle]) { - $compile->_tpl_load_file($handle); + $this->compiled_code[$handle] = $compile->compile(trim($row['template_data'])); + $compile->compile_write($handle, $this->compiled_code[$handle]); } else { - $this->files[$row['template_filename']] = $this->root . '/' . $row['template_filename']; - $compile->_tpl_load_file($row['template_filename']); - unset($this->compiled_code[$row['template_filename']]); - unset($this->files[$row['template_filename']]); - } - } - - if ($row['template_filename'] == $this->filename[$handle]) - { - $this->compiled_code[$handle] = $compile->compile(trim($row['template_data'])); - $compile->compile_write($handle, $this->compiled_code[$handle]); - } - else - { - // Only bother compiling if it doesn't already exist - if (!file_exists($this->cachepath . str_replace('/', '.', $row['template_filename']) . '.' . $phpEx)) - { - $this->filename[$row['template_filename']] = $row['template_filename']; - $compile->compile_write($row['template_filename'], $compile->compile(trim($row['template_data']))); - unset($this->filename[$row['template_filename']]); + // Only bother compiling if it doesn't already exist + if (!file_exists($this->cachepath . str_replace('/', '.', $row['template_filename']) . '.' . $phpEx)) + { + $this->filename[$row['template_filename']] = $row['template_filename']; + $compile->compile_write($row['template_filename'], $compile->compile(trim($row['template_data']))); + unset($this->filename[$row['template_filename']]); + } } } + while ($row = $db->sql_fetchrow($result)); + } + else + { + // Try to load from filesystem and instruct to insert into the styles table... + $compile->_tpl_load_file($handle, true); + return false; } $db->sql_freeresult($result); diff --git a/phpBB/includes/ucp/ucp_activate.php b/phpBB/includes/ucp/ucp_activate.php index e9fbe69938..6b17b28ba0 100644 --- a/phpBB/includes/ucp/ucp_activate.php +++ b/phpBB/includes/ucp/ucp_activate.php @@ -25,7 +25,7 @@ class ucp_activate $user_id = request_var('u', 0); $key = request_var('k', ''); - $sql = 'SELECT user_id, username, user_type, user_email, user_newpasswd, user_lang, user_notify_type, user_actkey + $sql = 'SELECT user_id, username, user_type, user_email, user_newpasswd, user_lang, user_notify_type, user_actkey, user_inactive_reason FROM ' . USERS_TABLE . " WHERE user_id = $user_id"; $result = $db->sql_query($sql); @@ -101,7 +101,14 @@ class ucp_activate } else { - $message = (!$update_password) ? 'ACCOUNT_ACTIVE' : 'PASSWORD_ACTIVATED'; + if (!$update_password) + { + $message = ($user_row['user_inactive_reason'] == INACTIVE_PROFILE) ? 'ACCOUNT_ACTIVE_PROFILE' : 'ACCOUNT_ACTIVE'; + } + else + { + $message = 'PASSWORD_ACTIVATED'; + } } meta_refresh(3, append_sid("{$phpbb_root_path}index.$phpEx")); diff --git a/phpBB/includes/ucp/ucp_groups.php b/phpBB/includes/ucp/ucp_groups.php index 119f496d21..99371d2024 100644 --- a/phpBB/includes/ucp/ucp_groups.php +++ b/phpBB/includes/ucp/ucp_groups.php @@ -75,7 +75,7 @@ class ucp_groups if (!$auth->acl_get('u_chggrp')) { - trigger_error($user->lang['NOT_AUTHORIZED'] . $return_page); + trigger_error($user->lang['NOT_AUTHORISED'] . $return_page); } // User needs to be member of the group in order to make it default @@ -88,7 +88,7 @@ class ucp_groups { group_user_attributes('default', $group_id, $user->data['user_id']); - add_log('user', $user->data['user_id'], 'LOG_USER_GROUP_CHANGE', sprintf($user->lang['USER_GROUP_CHANGE'], $group_row[$group_id]['group_name'], $group_row[$user->data['group_id']]['group_name'])); + add_log('user', $user->data['user_id'], 'LOG_USER_GROUP_CHANGE', sprintf($user->lang['USER_GROUP_CHANGE'], $group_row[$user->data['group_id']]['group_name'], $group_row[$group_id]['group_name'])); meta_refresh(3, $this->u_action); trigger_error($user->lang['CHANGED_DEFAULT_GROUP'] . $return_page); @@ -143,8 +143,22 @@ class ucp_groups case 'join': - if (group_memberships($group_id, $user->data['user_id'], true)) + $sql = 'SELECT ug.*, u.username, u.username_clean, u.user_email + FROM ' . USER_GROUP_TABLE . ' ug, ' . USERS_TABLE . ' u + WHERE ug.user_id = u.user_id + AND ug.group_id = ' . $group_id . ' + AND ug.user_id = ' . $user->data['user_id']; + $result = $db->sql_query($sql); + $row = $db->sql_fetchrow($result); + $db->sql_freeresult($result); + + if ($row) { + if ($row['user_pending']) + { + trigger_error($user->lang['ALREADY_IN_GROUP_PENDING'] . $return_page); + } + trigger_error($user->lang['ALREADY_IN_GROUP'] . $return_page); } @@ -297,6 +311,7 @@ class ucp_groups 'GROUP_DESC' => ($row['group_type'] <> GROUP_SPECIAL) ? generate_text_for_display($row['group_desc'], $row['group_desc_uid'], $row['group_desc_bitfield'], $row['group_desc_options']) : $user->lang['GROUP_IS_SPECIAL'], 'GROUP_SPECIAL' => ($row['group_type'] <> GROUP_SPECIAL) ? false : true, 'GROUP_STATUS' => $user->lang['GROUP_IS_' . $group_status], + 'GROUP_COLOUR' => $row['group_colour'], 'U_VIEW_GROUP' => append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=group&g=' . $row['group_id']), @@ -311,7 +326,7 @@ class ucp_groups // Hide hidden groups unless user is an admin with group privileges $sql_and = ($auth->acl_gets('a_group', 'a_groupadd', 'a_groupdel')) ? '<> ' . GROUP_SPECIAL : 'NOT IN (' . GROUP_SPECIAL . ', ' . GROUP_HIDDEN . ')'; - $sql = 'SELECT group_id, group_name, group_desc, group_desc_uid, group_desc_bitfield, group_desc_options, group_type + $sql = 'SELECT group_id, group_name, group_colour, group_desc, group_desc_uid, group_desc_bitfield, group_desc_options, group_type, group_founder_manage FROM ' . GROUPS_TABLE . ' WHERE ' . ((sizeof($group_id_ary)) ? $db->sql_in_set('group_id', $group_id_ary, true) . ' AND ' : '') . " group_type $sql_and @@ -352,6 +367,7 @@ class ucp_groups 'GROUP_CLOSED' => ($row['group_type'] <> GROUP_CLOSED || $auth->acl_gets('a_group', 'a_groupadd', 'a_groupdel')) ? false : true, 'GROUP_STATUS' => $user->lang['GROUP_IS_' . $group_status], 'S_CAN_JOIN' => ($row['group_type'] == GROUP_OPEN || $row['group_type'] == GROUP_FREE) ? true : false, + 'GROUP_COLOUR' => $row['group_colour'], 'U_VIEW_GROUP' => append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=group&g=' . $row['group_id']), @@ -391,21 +407,35 @@ class ucp_groups { trigger_error($user->lang['NO_GROUP'] . $return_page); } + + // Check if the user is allowed to manage this group if set to founder only. + if ($user->data['user_type'] != USER_FOUNDER && $group_row['group_founder_manage']) + { + trigger_error($user->lang['NOT_ALLOWED_MANAGE_GROUP'] . $return_page, E_USER_WARNING); + } } switch ($action) { case 'edit': + include($phpbb_root_path . 'includes/functions_display.' . $phpEx); + if (!$group_id) { trigger_error($user->lang['NO_GROUP'] . $return_page); } - if (!($row = group_memberships($group_id, $user->data['user_id'])) || !$row[0]['group_leader']) + if (!($row = group_memberships($group_id, $user->data['user_id']))) { trigger_error($user->lang['NOT_MEMBER_OF_GROUP'] . $return_page); } + list(, $row) = each($row); + + if (!$row['group_leader']) + { + trigger_error($user->lang['NOT_LEADER_OF_GROUP'] . $return_page); + } $file_uploads = (@ini_get('file_uploads') || strtolower(@ini_get('file_uploads')) == 'on') ? true : false; $user->add_lang(array('acp/groups', 'acp/common')); @@ -419,7 +449,7 @@ class ucp_groups $avatar_select = basename(request_var('avatar_select', '')); $category = basename(request_var('category', '')); - $can_upload = (file_exists($phpbb_root_path . $config['avatar_path']) && is_writeable($phpbb_root_path . $config['avatar_path']) && $file_uploads) ? true : false; + $can_upload = (file_exists($phpbb_root_path . $config['avatar_path']) && @is_writable($phpbb_root_path . $config['avatar_path']) && $file_uploads) ? true : false; // Did we submit? if ($update) @@ -432,10 +462,6 @@ class ucp_groups $allow_desc_urls = request_var('desc_parse_urls', false); $allow_desc_smilies = request_var('desc_parse_smilies', false); - $data['uploadurl'] = request_var('uploadurl', ''); - $data['remotelink'] = request_var('remotelink', ''); - $delete = request_var('delete', ''); - $submit_ary = array( 'colour' => request_var('group_colour', ''), 'rank' => request_var('group_rank', 0), @@ -443,11 +469,14 @@ class ucp_groups 'message_limit' => request_var('group_message_limit', 0) ); + $data['uploadurl'] = request_var('uploadurl', ''); + $data['remotelink'] = request_var('remotelink', ''); + $data['width'] = request_var('width', ''); + $data['height'] = request_var('height', ''); + $delete = request_var('delete', ''); + if (!empty($_FILES['uploadfile']['tmp_name']) || $data['uploadurl'] || $data['remotelink']) { - $data['width'] = request_var('width', ''); - $data['height'] = request_var('height', ''); - // Avatar stuff $var_ary = array( 'uploadurl' => array('string', true, 5, 255), @@ -486,8 +515,36 @@ class ucp_groups $submit_ary['avatar'] = ''; $submit_ary['avatar_type'] = $submit_ary['avatar_width'] = $submit_ary['avatar_height'] = 0; } + else if ($data['width'] && $data['height']) + { + // Only update the dimensions? + if ($config['avatar_max_width'] || $config['avatar_max_height']) + { + if ($data['width'] > $config['avatar_max_width'] || $data['height'] > $config['avatar_max_height']) + { + $error[] = sprintf($user->lang['AVATAR_WRONG_SIZE'], $config['avatar_min_width'], $config['avatar_min_height'], $config['avatar_max_width'], $config['avatar_max_height'], $data['width'], $data['height']); + } + } - if ((isset($submit_ary['avatar']) && $submit_ary['avatar'] && (!isset($group_row['group_avatar']) || $group_row['group_avatar'] != $submit_ary['avatar'])) || $delete) + if (!sizeof($error)) + { + if ($config['avatar_min_width'] || $config['avatar_min_height']) + { + if ($data['width'] < $config['avatar_min_width'] || $data['height'] < $config['avatar_min_height']) + { + $error[] = sprintf($user->lang['AVATAR_WRONG_SIZE'], $config['avatar_min_width'], $config['avatar_min_height'], $config['avatar_max_width'], $config['avatar_max_height'], $data['width'], $data['height']); + } + } + } + + if (!sizeof($error)) + { + $submit_ary['avatar_width'] = $data['width']; + $submit_ary['avatar_height'] = $data['height']; + } + } + + if ((isset($submit_ary['avatar']) && $submit_ary['avatar'] && (!isset($group_row['group_avatar']))) || $delete) { if (isset($group_row['group_avatar']) && $group_row['group_avatar']) { @@ -571,28 +628,7 @@ class ucp_groups $type_closed = ($group_type == GROUP_CLOSED) ? ' checked="checked"' : ''; $type_hidden = ($group_type == GROUP_HIDDEN) ? ' checked="checked"' : ''; - if (isset($group_row['group_avatar']) && $group_row['group_avatar']) - { - $avatar_img = ''; - - switch ($group_row['group_avatar_type']) - { - case AVATAR_UPLOAD: - $avatar_img = $phpbb_root_path . $config['avatar_path'] . '/'; - break; - - case AVATAR_GALLERY: - $avatar_img = $phpbb_root_path . $config['avatar_gallery_path'] . '/'; - break; - } - - $avatar_img .= $group_row['group_avatar']; - $avatar_img = ''; - } - else - { - $avatar_img = ''; - } + $avatar_img = (!empty($group_row['group_avatar'])) ? get_user_avatar($group_row['group_avatar'], $group_row['group_avatar_type'], $group_row['group_avatar_width'], $group_row['group_avatar_height'], 'GROUP_AVATAR') : ''; $display_gallery = (isset($_POST['display_gallery'])) ? true : false; @@ -624,10 +660,11 @@ class ucp_groups 'S_DESC_SMILIES_CHECKED'=> $group_desc_data['allow_smilies'], 'S_RANK_OPTIONS' => $rank_options, + 'AVATAR' => $avatar_img, 'AVATAR_IMAGE' => $avatar_img, 'AVATAR_MAX_FILESIZE' => $config['avatar_filesize'], - 'GROUP_AVATAR_WIDTH' => (isset($group_row['group_avatar_width'])) ? $group_row['group_avatar_width'] : '', - 'GROUP_AVATAR_HEIGHT' => (isset($group_row['group_avatar_height'])) ? $group_row['group_avatar_height'] : '', + 'AVATAR_WIDTH' => (isset($group_row['group_avatar_width'])) ? $group_row['group_avatar_width'] : '', + 'AVATAR_HEIGHT' => (isset($group_row['group_avatar_height'])) ? $group_row['group_avatar_height'] : '', 'GROUP_TYPE_FREE' => GROUP_FREE, 'GROUP_TYPE_OPEN' => GROUP_OPEN, @@ -655,29 +692,57 @@ class ucp_groups trigger_error($user->lang['NO_GROUP'] . $return_page); } - if (!($row = group_memberships($group_id, $user->data['user_id'])) || !$row[0]['group_leader']) + if (!($row = group_memberships($group_id, $user->data['user_id']))) { trigger_error($user->lang['NOT_MEMBER_OF_GROUP'] . $return_page); } + list(, $row) = each($row); + + if (!$row['group_leader']) + { + trigger_error($user->lang['NOT_LEADER_OF_GROUP'] . $return_page); + } $user->add_lang(array('acp/groups', 'acp/common')); + $start = request_var('start', 0); + + // Grab the leaders - always, on every page... + $sql = 'SELECT u.user_id, u.username, u.username_clean, u.user_regdate, u.user_posts, u.group_id, ug.group_leader, ug.user_pending + FROM ' . USERS_TABLE . ' u, ' . USER_GROUP_TABLE . " ug + WHERE ug.group_id = $group_id + AND u.user_id = ug.user_id + AND ug.group_leader = 1 + ORDER BY ug.group_leader DESC, ug.user_pending ASC, u.username_clean"; + $result = $db->sql_query($sql); + + while ($row = $db->sql_fetchrow($result)) + { + $template->assign_block_vars('leader', array( + 'USERNAME' => $row['username'], + 'U_USER_VIEW' => append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=viewprofile&u=' . $row['user_id']), + 'S_GROUP_DEFAULT' => ($row['group_id'] == $group_id) ? true : false, + 'JOINED' => ($row['user_regdate']) ? $user->format_date($row['user_regdate']) : ' - ', + 'USER_POSTS' => $row['user_posts'], + 'USER_ID' => $row['user_id']) + ); + } + $db->sql_freeresult($result); // Total number of group members (non-leaders) $sql = 'SELECT COUNT(user_id) AS total_members FROM ' . USER_GROUP_TABLE . " WHERE group_id = $group_id - AND group_leader <> 1"; + AND group_leader = 0"; $result = $db->sql_query($sql); $total_members = (int) $db->sql_fetchfield('total_members'); $db->sql_freeresult($result); - $start = request_var('start', 0); - // Grab the members $sql = 'SELECT u.user_id, u.username, u.username_clean, u.user_regdate, u.user_posts, u.group_id, ug.group_leader, ug.user_pending FROM ' . USERS_TABLE . ' u, ' . USER_GROUP_TABLE . " ug WHERE ug.group_id = $group_id AND u.user_id = ug.user_id + AND ug.group_leader = 0 ORDER BY ug.group_leader DESC, ug.user_pending ASC, u.username_clean"; $result = $db->sql_query_limit($sql, $config['topics_per_page'], $start); @@ -694,7 +759,7 @@ class ucp_groups $pending = true; } - $template->assign_block_vars($row['group_leader'] ? 'leader' : 'member', array( + $template->assign_block_vars('member', array( 'USERNAME' => $row['username'], 'U_USER_VIEW' => append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=viewprofile&u=' . $row['user_id']), 'S_GROUP_DEFAULT' => ($row['group_id'] == $group_id) ? true : false, @@ -717,7 +782,7 @@ class ucp_groups 'S_LIST' => true, 'S_ACTION_OPTIONS' => $s_action_options, 'S_ON_PAGE' => on_page($total_members, $config['topics_per_page'], $start), - 'PAGINATION' => generate_pagination($this->u_action . "&action=$action&g=$group_id", $total_members, $config['topics_per_page'], $start, true), + 'PAGINATION' => generate_pagination($this->u_action . "&action=$action&g=$group_id", $total_members, $config['topics_per_page'], $start), 'U_ACTION' => $this->u_action . "&g=$group_id", 'U_FIND_USERNAME' => append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=searchuser&form=ucp&field=usernames'), @@ -733,17 +798,23 @@ class ucp_groups trigger_error($user->lang['NO_GROUP'] . $return_page); } - if (!($row = group_memberships($group_id, $user->data['user_id'])) || !$row[0]['group_leader']) + if (!($row = group_memberships($group_id, $user->data['user_id']))) { trigger_error($user->lang['NOT_MEMBER_OF_GROUP'] . $return_page); } + list(, $row) = each($row); + + if (!$row['group_leader']) + { + trigger_error($user->lang['NOT_LEADER_OF_GROUP'] . $return_page); + } $user->add_lang('acp/groups'); // Approve, demote or promote group_user_attributes('approve', $group_id, $mark_ary, false, ($group_id) ? $group_row['group_name'] : false); - trigger_error($user->lang['USERS_APPROVED'] . $return_page); + trigger_error($user->lang['USERS_APPROVED'] . '

    ' . sprintf($user->lang['RETURN_PAGE'], '', '')); break; @@ -754,10 +825,16 @@ class ucp_groups trigger_error($user->lang['NO_GROUP'] . $return_page); } - if (!($row = group_memberships($group_id, $user->data['user_id'])) || !$row[0]['group_leader']) + if (!($row = group_memberships($group_id, $user->data['user_id']))) { trigger_error($user->lang['NOT_MEMBER_OF_GROUP'] . $return_page); } + list(, $row) = each($row); + + if (!$row['group_leader']) + { + trigger_error($user->lang['NOT_LEADER_OF_GROUP'] . $return_page); + } if (confirm_box(true)) { @@ -801,7 +878,7 @@ class ucp_groups $user->add_lang('acp/groups'); - trigger_error($user->lang['GROUP_DEFS_UPDATED'] . $return_page); + trigger_error($user->lang['GROUP_DEFS_UPDATED'] . '

    ' . sprintf($user->lang['RETURN_PAGE'], '', '')); } else { @@ -822,10 +899,16 @@ class ucp_groups $user->add_lang(array('acp/groups', 'acp/common')); - if (!($row = group_memberships($group_id, $user->data['user_id'])) || !$row[0]['group_leader']) + if (!($row = group_memberships($group_id, $user->data['user_id']))) { trigger_error($user->lang['NOT_MEMBER_OF_GROUP'] . $return_page); } + list(, $row) = each($row); + + if (!$row['group_leader']) + { + trigger_error($user->lang['NOT_LEADER_OF_GROUP'] . $return_page); + } if (confirm_box(true)) { @@ -838,10 +921,10 @@ class ucp_groups if ($error) { - trigger_error($user->lang[$error] . $return_page); + trigger_error($user->lang[$error] . '

    ' . sprintf($user->lang['RETURN_PAGE'], '', '')); } - trigger_error($user->lang['GROUP_USERS_REMOVE'] . $return_page); + trigger_error($user->lang['GROUP_USERS_REMOVE'] . '

    ' . sprintf($user->lang['RETURN_PAGE'], '', '')); } else { @@ -872,10 +955,16 @@ class ucp_groups trigger_error($user->lang['NO_USERS'] . $return_page); } - if (!($row = group_memberships($group_id, $user->data['user_id'])) || !$row[0]['group_leader']) + if (!($row = group_memberships($group_id, $user->data['user_id']))) { trigger_error($user->lang['NOT_MEMBER_OF_GROUP'] . $return_page); } + list(, $row) = each($row); + + if (!$row['group_leader']) + { + trigger_error($user->lang['NOT_LEADER_OF_GROUP'] . $return_page); + } $name_ary = array_unique(explode("\n", $name_ary)); $group_name = ($group_row['group_type'] == GROUP_SPECIAL) ? $user->lang['G_' . $group_row['group_name']] : $group_row['group_name']; @@ -888,14 +977,14 @@ class ucp_groups trigger_error($user->lang[$error] . $return_page); } - trigger_error($user->lang['GROUP_USERS_ADDED'] . $return_page); + trigger_error($user->lang['GROUP_USERS_ADDED'] . '

    ' . sprintf($user->lang['RETURN_PAGE'], '', '')); break; default: $user->add_lang('acp/common'); - $sql = 'SELECT g.group_id, g.group_name, g.group_desc, g.group_desc_uid, g.group_desc_bitfield, g.group_desc_options, g.group_type, ug.group_leader + $sql = 'SELECT g.group_id, g.group_name, g.group_colour, g.group_desc, g.group_desc_uid, g.group_desc_bitfield, g.group_desc_options, g.group_type, ug.group_leader FROM ' . GROUPS_TABLE . ' g, ' . USER_GROUP_TABLE . ' ug WHERE ug.user_id = ' . $user->data['user_id'] . ' AND g.group_id = ug.group_id @@ -910,6 +999,7 @@ class ucp_groups 'GROUP_DESC' => generate_text_for_display($value['group_desc'], $value['group_desc_uid'], $value['group_desc_bitfield'], $value['group_desc_options']), 'GROUP_TYPE' => $value['group_type'], 'GROUP_ID' => $value['group_id'], + 'GROUP_COLOUR' => $value['group_colour'], 'U_LIST' => $this->u_action . "&action=list&g={$value['group_id']}", 'U_EDIT' => $this->u_action . "&action=edit&g={$value['group_id']}") diff --git a/phpBB/includes/ucp/ucp_main.php b/phpBB/includes/ucp/ucp_main.php index 6678c362c0..f827187956 100644 --- a/phpBB/includes/ucp/ucp_main.php +++ b/phpBB/includes/ucp/ucp_main.php @@ -127,16 +127,19 @@ class ucp_main $template->assign_block_vars('topicrow', array( 'FORUM_ID' => $forum_id, 'TOPIC_ID' => $topic_id, - 'LAST_POST_SUBJECT' => $row['topic_last_post_subject'], + 'TOPIC_AUTHOR' => get_username_string('username', $row['topic_poster'], $row['topic_first_poster_name'], $row['topic_first_poster_colour']), + 'TOPIC_AUTHOR_COLOUR' => get_username_string('colour', $row['topic_poster'], $row['topic_first_poster_name'], $row['topic_first_poster_colour']), + 'TOPIC_AUTHOR_FULL' => get_username_string('full', $row['topic_poster'], $row['topic_first_poster_name'], $row['topic_first_poster_colour']), + 'FIRST_POST_TIME' => $user->format_date($row['topic_time']), + 'LAST_POST_SUBJECT' => censor_text($row['topic_last_post_subject']), 'LAST_POST_TIME' => $user->format_date($row['topic_last_post_time']), + 'LAST_VIEW_TIME' => $user->format_date($row['topic_last_view_time']), 'LAST_POST_AUTHOR' => get_username_string('username', $row['topic_last_poster_id'], $row['topic_last_poster_name'], $row['topic_last_poster_colour']), 'LAST_POST_AUTHOR_COLOUR' => get_username_string('colour', $row['topic_last_poster_id'], $row['topic_last_poster_name'], $row['topic_last_poster_colour']), 'LAST_POST_AUTHOR_FULL' => get_username_string('full', $row['topic_last_poster_id'], $row['topic_last_poster_name'], $row['topic_last_poster_colour']), 'TOPIC_TITLE' => censor_text($row['topic_title']), 'TOPIC_TYPE' => $topic_type, - 'LAST_POST_IMG' => $user->img('icon_topic_latest', 'VIEW_LATEST_POST'), - 'NEWEST_POST_IMG' => $user->img('icon_topic_newest', 'VIEW_NEWEST_POST'), 'TOPIC_FOLDER_IMG' => $user->img($folder_img, $folder_alt), 'TOPIC_FOLDER_IMG_SRC' => $user->img($folder_img, $folder_alt, false, '', 'src'), 'ATTACH_ICON_IMG' => ($auth->acl_get('u_download') && $auth->acl_get('f_download', $forum_id) && $row['topic_attachment']) ? $user->img('icon_topic_attach', '') : '', @@ -144,6 +147,7 @@ class ucp_main 'S_USER_POSTED' => (!empty($row['topic_posted']) && $row['topic_posted']) ? true : false, 'S_UNREAD' => $unread_topic, + 'U_TOPIC_AUTHOR' => get_username_string('profile', $row['topic_poster'], $row['topic_first_poster_name'], $row['topic_first_poster_colour']), 'U_LAST_POST' => append_sid("{$phpbb_root_path}viewtopic.$phpEx", "f=$g_forum_id&t=$topic_id&p=" . $row['topic_last_post_id']) . '#p' . $row['topic_last_post_id'], 'U_LAST_POST_AUTHOR' => get_username_string('profile', $row['topic_last_poster_id'], $row['topic_last_poster_name'], $row['topic_last_poster_colour']), 'U_NEWEST_POST' => append_sid("{$phpbb_root_path}viewtopic.$phpEx", "f=$g_forum_id&t=$topic_id&view=unread") . '#unread', @@ -179,8 +183,9 @@ class ucp_main // 'S_GROUP_OPTIONS' => $group_options, - 'U_SEARCH_USER' => ($auth->acl_get('u_search')) ? append_sid("{$phpbb_root_path}search.$phpEx", 'author_id=' . $user->data['user_id'] . '&sr=posts') : '') - ); + 'U_SEARCH_USER' => ($auth->acl_get('u_search')) ? append_sid("{$phpbb_root_path}search.$phpEx", 'author_id=' . $user->data['user_id'] . '&sr=posts') : '', + )); + break; case 'subscribed': @@ -226,247 +231,112 @@ class ucp_main } } - $sql_array = array( - 'SELECT' => 'f.*', - - 'FROM' => array( - FORUMS_WATCH_TABLE => 'fw', - FORUMS_TABLE => 'f' - ), - - 'WHERE' => 'fw.user_id = ' . $user->data['user_id'] . ' - AND f.forum_id = fw.forum_id', - - 'ORDER_BY' => 'left_id' - ); - - if ($config['load_db_lastread']) + if ($config['allow_forum_notify']) { - $sql_array['LEFT_JOIN'] = array( - array( - 'FROM' => array(FORUMS_TRACK_TABLE => 'ft'), - 'ON' => 'ft.user_id = ' . $user->data['user_id'] . ' AND ft.forum_id = f.forum_id' - ) + $sql_array = array( + 'SELECT' => 'f.*', + + 'FROM' => array( + FORUMS_WATCH_TABLE => 'fw', + FORUMS_TABLE => 'f' + ), + + 'WHERE' => 'fw.user_id = ' . $user->data['user_id'] . ' + AND f.forum_id = fw.forum_id', + + 'ORDER_BY' => 'left_id' ); - $sql_array['SELECT'] .= ', ft.mark_time '; - } - else - { - $tracking_topics = (isset($_COOKIE[$config['cookie_name'] . '_track'])) ? ((STRIP) ? stripslashes($_COOKIE[$config['cookie_name'] . '_track']) : $_COOKIE[$config['cookie_name'] . '_track']) : ''; - $tracking_topics = ($tracking_topics) ? unserialize($tracking_topics) : array(); - } - - $sql = $db->sql_build_query('SELECT', $sql_array); - $result = $db->sql_query($sql); - - while ($row = $db->sql_fetchrow($result)) - { - $forum_id = $row['forum_id']; - if ($config['load_db_lastread']) { - $forum_check = (!empty($row['mark_time'])) ? $row['mark_time'] : $user->data['user_lastmark']; + $sql_array['LEFT_JOIN'] = array( + array( + 'FROM' => array(FORUMS_TRACK_TABLE => 'ft'), + 'ON' => 'ft.user_id = ' . $user->data['user_id'] . ' AND ft.forum_id = f.forum_id' + ) + ); + + $sql_array['SELECT'] .= ', ft.mark_time '; } else { - $forum_check = (isset($tracking_topics['f'][$forum_id])) ? (int) (base_convert($tracking_topics['f'][$forum_id], 36, 10) + $config['board_startdate']) : $user->data['user_lastmark']; + $tracking_topics = (isset($_COOKIE[$config['cookie_name'] . '_track'])) ? ((STRIP) ? stripslashes($_COOKIE[$config['cookie_name'] . '_track']) : $_COOKIE[$config['cookie_name'] . '_track']) : ''; + $tracking_topics = ($tracking_topics) ? tracking_unserialize($tracking_topics) : array(); } - $unread_forum = ($row['forum_last_post_time'] > $forum_check) ? true : false; + $sql = $db->sql_build_query('SELECT', $sql_array); + $result = $db->sql_query($sql); - // Which folder should we display? - if ($row['forum_status'] == ITEM_LOCKED) + while ($row = $db->sql_fetchrow($result)) { - $folder_image = ($unread_forum) ? 'forum_unread_locked' : 'forum_read_locked'; - $folder_alt = 'FORUM_LOCKED'; - } - else - { - $folder_image = ($unread_forum) ? 'forum_unread' : 'forum_read'; - $folder_alt = ($unread_forum) ? 'NEW_POSTS' : 'NO_NEW_POSTS'; - } + $forum_id = $row['forum_id']; - // Create last post link information, if appropriate - if ($row['forum_last_post_id']) - { - $last_post_time = $user->format_date($row['forum_last_post_time']); - $last_post_url = append_sid("{$phpbb_root_path}viewtopic.$phpEx", "f=$forum_id&p=" . $row['forum_last_post_id']) . '#p' . $row['forum_last_post_id']; + if ($config['load_db_lastread']) + { + $forum_check = (!empty($row['mark_time'])) ? $row['mark_time'] : $user->data['user_lastmark']; + } + else + { + $forum_check = (isset($tracking_topics['f'][$forum_id])) ? (int) (base_convert($tracking_topics['f'][$forum_id], 36, 10) + $config['board_startdate']) : $user->data['user_lastmark']; + } + + $unread_forum = ($row['forum_last_post_time'] > $forum_check) ? true : false; + + // Which folder should we display? + if ($row['forum_status'] == ITEM_LOCKED) + { + $folder_image = ($unread_forum) ? 'forum_unread_locked' : 'forum_read_locked'; + $folder_alt = 'FORUM_LOCKED'; + } + else + { + $folder_image = ($unread_forum) ? 'forum_unread' : 'forum_read'; + $folder_alt = ($unread_forum) ? 'NEW_POSTS' : 'NO_NEW_POSTS'; + } + + // Create last post link information, if appropriate + if ($row['forum_last_post_id']) + { + $last_post_time = $user->format_date($row['forum_last_post_time']); + $last_post_url = append_sid("{$phpbb_root_path}viewtopic.$phpEx", "f=$forum_id&p=" . $row['forum_last_post_id']) . '#p' . $row['forum_last_post_id']; + } + else + { + $last_post_time = $last_post_url = ''; + } + + $template->assign_block_vars('forumrow', array( + 'FORUM_ID' => $forum_id, + 'FORUM_FOLDER_IMG' => $user->img($folder_image, $folder_alt), + 'FORUM_FOLDER_IMG_SRC' => $user->img($folder_image, $folder_alt, false, '', 'src'), + 'FORUM_IMAGE' => ($row['forum_image']) ? '' . $user->lang[$folder_alt] . '' : '', + 'FORUM_IMAGE_SRC' => ($row['forum_image']) ? $phpbb_root_path . $row['forum_image'] : '', + 'FORUM_NAME' => $row['forum_name'], + 'LAST_POST_SUBJECT' => $row['forum_last_post_subject'], + 'LAST_POST_TIME' => $last_post_time, + + 'LAST_POST_AUTHOR' => get_username_string('username', $row['forum_last_poster_id'], $row['forum_last_poster_name'], $row['forum_last_poster_colour']), + 'LAST_POST_AUTHOR_COLOUR' => get_username_string('colour', $row['forum_last_poster_id'], $row['forum_last_poster_name'], $row['forum_last_poster_colour']), + 'LAST_POST_AUTHOR_FULL' => get_username_string('full', $row['forum_last_poster_id'], $row['forum_last_poster_name'], $row['forum_last_poster_colour']), + 'U_LAST_POST_AUTHOR' => get_username_string('profile', $row['forum_last_poster_id'], $row['forum_last_poster_name'], $row['forum_last_poster_colour']), + + 'U_LAST_POST' => $last_post_url, + 'U_VIEWFORUM' => append_sid("{$phpbb_root_path}viewforum.$phpEx", 'f=' . $row['forum_id'])) + ); } - else - { - $last_post_time = $last_post_url = ''; - } - - $template->assign_block_vars('forumrow', array( - 'FORUM_ID' => $forum_id, - 'FORUM_FOLDER_IMG' => $user->img($folder_image, $folder_alt), - 'FORUM_FOLDER_IMG_SRC' => $user->img($folder_image, $folder_alt, false, '', 'src'), - 'FORUM_IMAGE' => ($row['forum_image']) ? '' . $user->lang[$folder_alt] . '' : '', - 'FORUM_IMAGE_SRC' => ($row['forum_image']) ? $phpbb_root_path . $row['forum_image'] : '', - 'FORUM_NAME' => $row['forum_name'], - 'LAST_POST_IMG' => $user->img('icon_topic_latest', 'VIEW_LATEST_POST'), - 'LAST_POST_SUBJECT' => $row['forum_last_post_subject'], - 'LAST_POST_TIME' => $last_post_time, - - 'LAST_POST_AUTHOR' => get_username_string('username', $row['forum_last_poster_id'], $row['forum_last_poster_name'], $row['forum_last_poster_colour']), - 'LAST_POST_AUTHOR_COLOUR' => get_username_string('colour', $row['forum_last_poster_id'], $row['forum_last_poster_name'], $row['forum_last_poster_colour']), - 'LAST_POST_AUTHOR_FULL' => get_username_string('full', $row['forum_last_poster_id'], $row['forum_last_poster_name'], $row['forum_last_poster_colour']), - 'U_LAST_POST_AUTHOR' => get_username_string('profile', $row['forum_last_poster_id'], $row['forum_last_poster_name'], $row['forum_last_poster_colour']), - - 'U_LAST_POST' => $last_post_url, - 'U_VIEWFORUM' => append_sid("{$phpbb_root_path}viewforum.$phpEx", 'f=' . $row['forum_id'])) - ); + $db->sql_freeresult($result); } - $db->sql_freeresult($result); // Subscribed Topics - $start = request_var('start', 0); - - $sql = 'SELECT COUNT(topic_id) as topics_count - FROM ' . TOPICS_WATCH_TABLE . ' - WHERE user_id = ' . $user->data['user_id']; - $result = $db->sql_query($sql); - $topics_count = (int) $db->sql_fetchfield('topics_count'); - $db->sql_freeresult($result); - - if ($topics_count) + if ($config['allow_topic_notify']) { - $template->assign_vars(array( - 'PAGINATION' => generate_pagination($this->u_action, $topics_count, $config['topics_per_page'], $start), - 'PAGE_NUMBER' => on_page($topics_count, $config['topics_per_page'], $start), - 'TOTAL_TOPICS' => ($topics_count == 1) ? $user->lang['VIEW_FORUM_TOPIC'] : sprintf($user->lang['VIEW_FORUM_TOPICS'], $topics_count)) - ); + $this->assign_topiclist('subscribed'); } - $sql_array = array( - 'SELECT' => 't.*', - - 'FROM' => array( - TOPICS_WATCH_TABLE => 'tw', - TOPICS_TABLE => 't' - ), - - 'WHERE' => 'tw.user_id = ' . $user->data['user_id'] . ' - AND t.topic_id = tw.topic_id', - - 'ORDER_BY' => 't.topic_last_post_time DESC' - ); - - if ($config['load_db_lastread']) - { - $sql_array['LEFT_JOIN'][] = array('FROM' => array(FORUMS_TRACK_TABLE => 'ft'), 'ON' => 'ft.forum_id = t.forum_id AND ft.user_id = ' . $user->data['user_id']); - $sql_array['LEFT_JOIN'][] = array('FROM' => array(TOPICS_TRACK_TABLE => 'tt'), 'ON' => 'tt.topic_id = t.topic_id AND tt.user_id = ' . $user->data['user_id']); - $sql_array['SELECT'] .= ', tt.mark_time, ft.mark_time AS forum_mark_time'; - } - - if ($config['load_db_track']) - { - $sql_array['LEFT_JOIN'][] = array('FROM' => array(TOPICS_POSTED_TABLE => 'tp'), 'ON' => 'tp.topic_id = t.topic_id AND tp.user_id = ' . $user->data['user_id']); - $sql_array['SELECT'] .= ', tp.topic_posted'; - } - - $sql = $db->sql_build_query('SELECT', $sql_array); - $result = $db->sql_query_limit($sql, $config['topics_per_page'], $start); - - $topic_list = $topic_forum_list = $global_announce_list = $rowset = array(); - while ($row = $db->sql_fetchrow($result)) - { - $topic_list[] = $row['topic_id']; - $rowset[$row['topic_id']] = $row; - - $topic_forum_list[$row['forum_id']]['forum_mark_time'] = ($config['load_db_lastread']) ? $row['forum_mark_time'] : 0; - $topic_forum_list[$row['forum_id']]['topics'][] = $row['topic_id']; - - if ($row['topic_type'] == POST_GLOBAL) - { - $global_announce_list[] = $row['topic_id']; - } - } - $db->sql_freeresult($result); - - $topic_tracking_info = array(); - if ($config['load_db_lastread']) - { - foreach ($topic_forum_list as $f_id => $topic_row) - { - $topic_tracking_info += get_topic_tracking($f_id, $topic_row['topics'], $rowset, array($f_id => $topic_row['forum_mark_time']), ($f_id == 0) ? $global_announce_list : false); - } - } - else - { - foreach ($topic_forum_list as $f_id => $topic_row) - { - $topic_tracking_info += get_complete_topic_tracking($f_id, $topic_row['topics'], $global_announce_list); - } - } - - foreach ($topic_list as $topic_id) - { - $row = &$rowset[$topic_id]; - - $forum_id = $row['forum_id']; - $topic_id = $row['topic_id']; - - $unread_topic = (isset($topic_tracking_info[$topic_id]) && $row['topic_last_post_time'] > $topic_tracking_info[$topic_id]) ? true : false; - - // Replies - $replies = ($auth->acl_get('m_approve', $forum_id)) ? $row['topic_replies_real'] : $row['topic_replies']; - - if ($row['topic_status'] == ITEM_MOVED) - { - $topic_id = $row['topic_moved_id']; - } - - // Get folder img, topic status/type related information - $folder_img = $folder_alt = $topic_type = ''; - topic_status($row, $replies, $unread_topic, $folder_img, $folder_alt, $topic_type); - - $view_topic_url = append_sid("{$phpbb_root_path}viewtopic.$phpEx", "f=$forum_id&t=$topic_id"); - - // Send vars to template - $template->assign_block_vars('topicrow', array( - 'FORUM_ID' => $forum_id, - 'TOPIC_ID' => $topic_id, - 'FIRST_POST_TIME' => $user->format_date($row['topic_time']), - 'LAST_POST_SUBJECT' => $row['topic_last_post_subject'], - 'LAST_POST_TIME' => $user->format_date($row['topic_last_post_time']), - 'LAST_VIEW_TIME' => $user->format_date($row['topic_last_view_time']), - - 'TOPIC_AUTHOR' => get_username_string('username', $row['topic_poster'], $row['topic_first_poster_name'], $row['topic_first_poster_colour']), - 'TOPIC_AUTHOR_COLOUR' => get_username_string('colour', $row['topic_poster'], $row['topic_first_poster_name'], $row['topic_first_poster_colour']), - 'TOPIC_AUTHOR_FULL' => get_username_string('full', $row['topic_poster'], $row['topic_first_poster_name'], $row['topic_first_poster_colour']), - 'U_TOPIC_AUTHOR' => get_username_string('profile', $row['topic_poster'], $row['topic_first_poster_name'], $row['topic_first_poster_colour']), - - 'LAST_POST_AUTHOR' => get_username_string('username', $row['topic_last_poster_id'], $row['topic_last_poster_name'], $row['topic_last_poster_colour']), - 'LAST_POST_AUTHOR_COLOUR' => get_username_string('colour', $row['topic_last_poster_id'], $row['topic_last_poster_name'], $row['topic_last_poster_colour']), - 'LAST_POST_AUTHOR_FULL' => get_username_string('full', $row['topic_last_poster_id'], $row['topic_last_poster_name'], $row['topic_last_poster_colour']), - 'U_LAST_POST_AUTHOR' => get_username_string('profile', $row['topic_last_poster_id'], $row['topic_last_poster_name'], $row['topic_last_poster_colour']), - - 'PAGINATION' => topic_generate_pagination($replies, append_sid("{$phpbb_root_path}viewtopic.$phpEx", 'f=' . (($row['forum_id']) ? $row['forum_id'] : $forum_id) . "&t=$topic_id")), - 'REPLIES' => $replies, - 'VIEWS' => $row['topic_views'], - 'TOPIC_TITLE' => censor_text($row['topic_title']), - 'TOPIC_TYPE' => $topic_type, - - 'LAST_POST_IMG' => $user->img('icon_topic_latest', 'VIEW_LATEST_POST'), - 'NEWEST_POST_IMG' => $user->img('icon_topic_newest', 'VIEW_NEWEST_POST'), - 'TOPIC_FOLDER_IMG' => $user->img($folder_img, $folder_alt), - 'TOPIC_FOLDER_IMG_SRC' => $user->img($folder_img, $folder_alt, false, '', 'src'), - 'TOPIC_ICON_IMG' => (!empty($icons[$row['icon_id']])) ? $icons[$row['icon_id']]['img'] : '', - 'TOPIC_ICON_IMG_WIDTH' => (!empty($icons[$row['icon_id']])) ? $icons[$row['icon_id']]['width'] : '', - 'TOPIC_ICON_IMG_HEIGHT' => (!empty($icons[$row['icon_id']])) ? $icons[$row['icon_id']]['height'] : '', - 'ATTACH_ICON_IMG' => ($auth->acl_get('u_download') && $auth->acl_get('f_download', $forum_id) && $row['topic_attachment']) ? $user->img('icon_topic_attach', $user->lang['TOTAL_ATTACHMENTS']) : '', - - 'S_TOPIC_TYPE' => $row['topic_type'], - 'S_USER_POSTED' => (!empty($row['topic_posted'])) ? true : false, - 'S_UNREAD_TOPIC' => $unread_topic, - - 'U_NEWEST_POST' => append_sid("{$phpbb_root_path}viewtopic.$phpEx", "f=$forum_id&t=$topic_id&view=unread") . '#unread', - 'U_LAST_POST' => $view_topic_url . '&p=' . $row['topic_last_post_id'] . '#p' . $row['topic_last_post_id'], - 'U_VIEW_TOPIC' => $view_topic_url) - ); - } + $template->assign_vars(array( + 'S_TOPIC_NOTIFY' => $config['allow_topic_notify'], + 'S_FORUM_NOTIFY' => $config['allow_forum_notify'], + )); break; @@ -484,31 +354,6 @@ class ucp_main $user->add_lang('viewforum'); - $move_up = request_var('move_up', 0); - $move_down = request_var('move_down', 0); - - $sql = 'SELECT MAX(order_id) as max_order_id - FROM ' . BOOKMARKS_TABLE . ' - WHERE user_id = ' . $user->data['user_id']; - $result = $db->sql_query($sql); - $max_order_id = (int) $db->sql_fetchfield('max_order_id'); - $db->sql_freeresult($result); - - if ($move_up || $move_down) - { - if (($move_up && $move_up != 1) || ($move_down && $move_down != $max_order_id)) - { - $order = ($move_up) ? $move_up : $move_down; - $order_total = $order * 2 + (($move_up) ? -1 : 1); - - $sql = 'UPDATE ' . BOOKMARKS_TABLE . " - SET order_id = $order_total - order_id - WHERE order_id IN ($order, " . (($move_up) ? $order - 1 : $order + 1) . ') - AND user_id = ' . $user->data['user_id']; - $db->sql_query($sql); - } - } - if (isset($_POST['unbookmark'])) { $s_hidden_fields = array('unbookmark' => 1); @@ -532,25 +377,6 @@ class ucp_main AND ' . $db->sql_in_set('topic_id', $topics); $db->sql_query($sql); - // Re-Order bookmarks (possible with one query? This query massaker is not really acceptable...) - $sql = 'SELECT topic_id FROM ' . BOOKMARKS_TABLE . ' - WHERE user_id = ' . $user->data['user_id'] . ' - ORDER BY order_id ASC'; - $result = $db->sql_query($sql); - - $i = 1; - while ($row = $db->sql_fetchrow($result)) - { - $sql = 'UPDATE ' . BOOKMARKS_TABLE . " - SET order_id = $i - WHERE topic_id = {$row['topic_id']} - AND user_id = {$user->data['user_id']}"; - $db->sql_query($sql); - - $i++; - } - $db->sql_freeresult($result); - meta_refresh(3, $url); $message = $user->lang['BOOKMARKS_REMOVED'] . '

    ' . sprintf($user->lang['RETURN_UCP'], '', ''); trigger_error($message); @@ -561,69 +387,7 @@ class ucp_main } } - // We grab deleted topics here too... - // NOTE: At the moment bookmarks are not removed with topics, might be useful later (not really sure how though. :D) - // But since bookmarks are sensible to the user, they should not be deleted without notice. - $sql = 'SELECT b.order_id, b.topic_id as b_topic_id, t.*, f.forum_name - FROM ' . BOOKMARKS_TABLE . ' b - LEFT JOIN ' . TOPICS_TABLE . ' t ON (b.topic_id = t.topic_id) - LEFT JOIN ' . FORUMS_TABLE . ' f ON (t.forum_id = f.forum_id) - WHERE b.user_id = ' . $user->data['user_id'] . ' - ORDER BY b.order_id ASC'; - $result = $db->sql_query($sql); - - while ($row = $db->sql_fetchrow($result)) - { - $forum_id = $row['forum_id']; - $topic_id = $row['b_topic_id']; - - $replies = ($auth->acl_get('m_approve', $forum_id)) ? $row['topic_replies_real'] : $row['topic_replies']; - - // Get folder img, topic status/type related information - $folder_img = $folder_alt = $topic_type = ''; - $unread_topic = false; - - topic_status($row, $replies, $unread_topic, $folder_img, $folder_alt, $topic_type); - $view_topic_url = append_sid("{$phpbb_root_path}viewtopic.$phpEx", "f=$forum_id&t=$topic_id"); - - $template->assign_block_vars('topicrow', array( - 'FORUM_ID' => $forum_id, - 'TOPIC_ID' => $topic_id, - 'TOPIC_TITLE' => censor_text($row['topic_title']), - 'TOPIC_TYPE' => $topic_type, - 'FORUM_NAME' => $row['forum_name'], - - 'S_DELETED_TOPIC' => (!$row['topic_id']) ? true : false, - 'S_GLOBAL_TOPIC' => (!$forum_id) ? true : false, - - 'TOPIC_AUTHOR' => get_username_string('username', $row['topic_poster'], $row['topic_first_poster_name'], $row['topic_first_poster_colour']), - 'TOPIC_AUTHOR_COLOUR' => get_username_string('colour', $row['topic_poster'], $row['topic_first_poster_name'], $row['topic_first_poster_colour']), - 'TOPIC_AUTHOR_FULL' => get_username_string('full', $row['topic_poster'], $row['topic_first_poster_name'], $row['topic_first_poster_colour']), - 'FIRST_POST_TIME' => $user->format_date($row['topic_time']), - 'LAST_POST_SUBJECT' => $row['topic_last_post_subject'], - 'LAST_POST_TIME' => $user->format_date($row['topic_last_post_time']), - 'LAST_VIEW_TIME' => $user->format_date($row['topic_last_view_time']), - 'LAST_POST_AUTHOR' => get_username_string('username', $row['topic_last_poster_id'], $row['topic_last_poster_name'], $row['topic_last_poster_colour']), - 'LAST_POST_AUTHOR_COLOUR' => get_username_string('colour', $row['topic_last_poster_id'], $row['topic_last_poster_name'], $row['topic_last_poster_colour']), - 'LAST_POST_AUTHOR_FULL' => get_username_string('full', $row['topic_last_poster_id'], $row['topic_last_poster_name'], $row['topic_last_poster_colour']), - - 'PAGINATION' => topic_generate_pagination($replies, append_sid("{$phpbb_root_path}viewtopic.$phpEx", 'f=' . (($row['forum_id']) ? $row['forum_id'] : $forum_id) . "&t=$topic_id")), - 'POSTED_AT' => $user->format_date($row['topic_time']), - - 'TOPIC_FOLDER_IMG' => $user->img($folder_img, $folder_alt), - 'TOPIC_FOLDER_IMG_SRC' => $user->img($folder_img, $folder_alt, false, '', 'src'), - 'ATTACH_ICON_IMG' => ($auth->acl_get('u_download') && $auth->acl_get('f_download', $forum_id) && $row['topic_attachment']) ? $user->img('icon_topic_attach', '') : '', - 'LAST_POST_IMG' => $user->img('icon_topic_latest', 'VIEW_LATEST_POST'), - - 'U_LAST_POST' => $view_topic_url . '&p=' . $row['topic_last_post_id'] . '#p' . $row['topic_last_post_id'], - 'U_LAST_POST_AUTHOR' => get_username_string('profile', $row['topic_last_poster_id'], $row['topic_last_poster_name'], $row['topic_last_poster_colour']), - 'U_TOPIC_AUTHOR' => get_username_string('profile', $row['topic_poster'], $row['topic_first_poster_name'], $row['topic_first_poster_colour']), - 'U_VIEW_TOPIC' => $view_topic_url, - 'U_VIEW_FORUM' => append_sid("{$phpbb_root_path}viewforum.$phpEx", 'f=' . $forum_id), - 'U_MOVE_UP' => ($row['order_id'] != 1) ? append_sid("{$phpbb_root_path}ucp.$phpEx", 'i=main&mode=bookmarks&move_up=' . $row['order_id']) : '', - 'U_MOVE_DOWN' => ($row['order_id'] != $max_order_id) ? append_sid("{$phpbb_root_path}ucp.$phpEx", 'i=main&mode=bookmarks&move_down=' . $row['order_id']) : '') - ); - } + $this->assign_topiclist('bookmarks'); break; @@ -806,13 +570,201 @@ class ucp_main 'S_DISPLAY_MARK_ALL' => ($mode == 'watched' || ($mode == 'drafts' && !isset($_GET['edit']))) ? true : false, 'S_HIDDEN_FIELDS' => (isset($s_hidden_fields)) ? $s_hidden_fields : '', - 'S_UCP_ACTION' => $this->u_action) - ); + 'S_UCP_ACTION' => $this->u_action, + + 'LAST_POST_IMG' => $user->img('icon_topic_latest', 'VIEW_LATEST_POST'), + 'NEWEST_POST_IMG' => $user->img('icon_topic_newest', 'VIEW_NEWEST_POST'), + )); // Set desired template $this->tpl_name = 'ucp_main_' . $mode; $this->page_title = 'UCP_MAIN_' . strtoupper($mode); } + + /** + * Build and assign topiclist for bookmarks/subscribed topics + */ + function assign_topiclist($mode = 'subscribed') + { + global $user, $db, $template, $config, $auth, $phpbb_root_path, $phpEx; + + $table = ($mode == 'subscribed') ? TOPICS_WATCH_TABLE : BOOKMARKS_TABLE; + $start = request_var('start', 0); + + $sql = 'SELECT COUNT(topic_id) as topics_count + FROM ' . $table . ' + WHERE user_id = ' . $user->data['user_id']; + $result = $db->sql_query($sql); + $topics_count = (int) $db->sql_fetchfield('topics_count'); + $db->sql_freeresult($result); + + if ($topics_count) + { + $template->assign_vars(array( + 'PAGINATION' => generate_pagination($this->u_action, $topics_count, $config['topics_per_page'], $start), + 'PAGE_NUMBER' => on_page($topics_count, $config['topics_per_page'], $start), + 'TOTAL_TOPICS' => ($topics_count == 1) ? $user->lang['VIEW_FORUM_TOPIC'] : sprintf($user->lang['VIEW_FORUM_TOPICS'], $topics_count)) + ); + } + + if ($mode == 'subscribed') + { + $sql_array = array( + 'SELECT' => 't.*, f.forum_name', + + 'FROM' => array( + TOPICS_WATCH_TABLE => 'tw', + TOPICS_TABLE => 't' + ), + + 'WHERE' => 'tw.user_id = ' . $user->data['user_id'] . ' + AND t.topic_id = tw.topic_id', + + 'ORDER_BY' => 't.topic_last_post_time DESC' + ); + + $sql_array['LEFT_JOIN'] = array(); + } + else + { + $sql_array = array( + 'SELECT' => 't.*, f.forum_name, b.topic_id as b_topic_id', + + 'FROM' => array( + BOOKMARKS_TABLE => 'b', + ), + + 'WHERE' => 'b.user_id = ' . $user->data['user_id'], + + 'ORDER_BY' => 't.topic_last_post_time DESC' + ); + + $sql_array['LEFT_JOIN'] = array(); + $sql_array['LEFT_JOIN'][] = array('FROM' => array(TOPICS_TABLE => 't'), 'ON' => 'b.topic_id = t.topic_id'); + } + + $sql_array['LEFT_JOIN'][] = array('FROM' => array(FORUMS_TABLE => 'f'), 'ON' => 't.forum_id = f.forum_id'); + + if ($config['load_db_lastread']) + { + $sql_array['LEFT_JOIN'][] = array('FROM' => array(FORUMS_TRACK_TABLE => 'ft'), 'ON' => 'ft.forum_id = t.forum_id AND ft.user_id = ' . $user->data['user_id']); + $sql_array['LEFT_JOIN'][] = array('FROM' => array(TOPICS_TRACK_TABLE => 'tt'), 'ON' => 'tt.topic_id = t.topic_id AND tt.user_id = ' . $user->data['user_id']); + $sql_array['SELECT'] .= ', tt.mark_time, ft.mark_time AS forum_mark_time'; + } + + if ($config['load_db_track']) + { + $sql_array['LEFT_JOIN'][] = array('FROM' => array(TOPICS_POSTED_TABLE => 'tp'), 'ON' => 'tp.topic_id = t.topic_id AND tp.user_id = ' . $user->data['user_id']); + $sql_array['SELECT'] .= ', tp.topic_posted'; + } + + $sql = $db->sql_build_query('SELECT', $sql_array); + $result = $db->sql_query_limit($sql, $config['topics_per_page'], $start); + + $topic_list = $topic_forum_list = $global_announce_list = $rowset = array(); + while ($row = $db->sql_fetchrow($result)) + { + $topic_id = (isset($row['b_topic_id'])) ? $row['b_topic_id'] : $row['topic_id']; + + $topic_list[] = $topic_id; + $rowset[$topic_id] = $row; + + $topic_forum_list[$row['forum_id']]['forum_mark_time'] = ($config['load_db_lastread']) ? $row['forum_mark_time'] : 0; + $topic_forum_list[$row['forum_id']]['topics'][] = $topic_id; + + if ($row['topic_type'] == POST_GLOBAL) + { + $global_announce_list[] = $topic_id; + } + } + $db->sql_freeresult($result); + + $topic_tracking_info = array(); + if ($config['load_db_lastread']) + { + foreach ($topic_forum_list as $f_id => $topic_row) + { + $topic_tracking_info += get_topic_tracking($f_id, $topic_row['topics'], $rowset, array($f_id => $topic_row['forum_mark_time']), ($f_id == 0) ? $global_announce_list : false); + } + } + else + { + foreach ($topic_forum_list as $f_id => $topic_row) + { + $topic_tracking_info += get_complete_topic_tracking($f_id, $topic_row['topics'], $global_announce_list); + } + } + + foreach ($topic_list as $topic_id) + { + $row = &$rowset[$topic_id]; + + $forum_id = $row['forum_id']; + $topic_id = (isset($row['b_topic_id'])) ? $row['b_topic_id'] : $row['topic_id']; + + $unread_topic = (isset($topic_tracking_info[$topic_id]) && $row['topic_last_post_time'] > $topic_tracking_info[$topic_id]) ? true : false; + + // Replies + $replies = ($auth->acl_get('m_approve', $forum_id)) ? $row['topic_replies_real'] : $row['topic_replies']; + + if ($row['topic_status'] == ITEM_MOVED && !empty($row['topic_moved_id'])) + { + $topic_id = $row['topic_moved_id']; + } + + // Get folder img, topic status/type related information + $folder_img = $folder_alt = $topic_type = ''; + topic_status($row, $replies, $unread_topic, $folder_img, $folder_alt, $topic_type); + + $view_topic_url = append_sid("{$phpbb_root_path}viewtopic.$phpEx", "f=$forum_id&t=$topic_id"); + + // Send vars to template + $template->assign_block_vars('topicrow', array( + 'FORUM_ID' => $forum_id, + 'TOPIC_ID' => $topic_id, + 'FIRST_POST_TIME' => $user->format_date($row['topic_time']), + 'LAST_POST_SUBJECT' => $row['topic_last_post_subject'], + 'LAST_POST_TIME' => $user->format_date($row['topic_last_post_time']), + 'LAST_VIEW_TIME' => $user->format_date($row['topic_last_view_time']), + + 'TOPIC_AUTHOR' => get_username_string('username', $row['topic_poster'], $row['topic_first_poster_name'], $row['topic_first_poster_colour']), + 'TOPIC_AUTHOR_COLOUR' => get_username_string('colour', $row['topic_poster'], $row['topic_first_poster_name'], $row['topic_first_poster_colour']), + 'TOPIC_AUTHOR_FULL' => get_username_string('full', $row['topic_poster'], $row['topic_first_poster_name'], $row['topic_first_poster_colour']), + 'U_TOPIC_AUTHOR' => get_username_string('profile', $row['topic_poster'], $row['topic_first_poster_name'], $row['topic_first_poster_colour']), + + 'LAST_POST_AUTHOR' => get_username_string('username', $row['topic_last_poster_id'], $row['topic_last_poster_name'], $row['topic_last_poster_colour']), + 'LAST_POST_AUTHOR_COLOUR' => get_username_string('colour', $row['topic_last_poster_id'], $row['topic_last_poster_name'], $row['topic_last_poster_colour']), + 'LAST_POST_AUTHOR_FULL' => get_username_string('full', $row['topic_last_poster_id'], $row['topic_last_poster_name'], $row['topic_last_poster_colour']), + 'U_LAST_POST_AUTHOR' => get_username_string('profile', $row['topic_last_poster_id'], $row['topic_last_poster_name'], $row['topic_last_poster_colour']), + + 'S_DELETED_TOPIC' => (!$row['topic_id']) ? true : false, + 'S_GLOBAL_TOPIC' => (!$forum_id) ? true : false, + + 'PAGINATION' => topic_generate_pagination($replies, append_sid("{$phpbb_root_path}viewtopic.$phpEx", 'f=' . (($row['forum_id']) ? $row['forum_id'] : $forum_id) . "&t=$topic_id")), + 'REPLIES' => $replies, + 'VIEWS' => $row['topic_views'], + 'TOPIC_TITLE' => censor_text($row['topic_title']), + 'TOPIC_TYPE' => $topic_type, + 'FORUM_NAME' => $row['forum_name'], + + 'TOPIC_FOLDER_IMG' => $user->img($folder_img, $folder_alt), + 'TOPIC_FOLDER_IMG_SRC' => $user->img($folder_img, $folder_alt, false, '', 'src'), + 'TOPIC_ICON_IMG' => (!empty($icons[$row['icon_id']])) ? $icons[$row['icon_id']]['img'] : '', + 'TOPIC_ICON_IMG_WIDTH' => (!empty($icons[$row['icon_id']])) ? $icons[$row['icon_id']]['width'] : '', + 'TOPIC_ICON_IMG_HEIGHT' => (!empty($icons[$row['icon_id']])) ? $icons[$row['icon_id']]['height'] : '', + 'ATTACH_ICON_IMG' => ($auth->acl_get('u_download') && $auth->acl_get('f_download', $forum_id) && $row['topic_attachment']) ? $user->img('icon_topic_attach', $user->lang['TOTAL_ATTACHMENTS']) : '', + + 'S_TOPIC_TYPE' => $row['topic_type'], + 'S_USER_POSTED' => (!empty($row['topic_posted'])) ? true : false, + 'S_UNREAD_TOPIC' => $unread_topic, + + 'U_NEWEST_POST' => append_sid("{$phpbb_root_path}viewtopic.$phpEx", "f=$forum_id&t=$topic_id&view=unread") . '#unread', + 'U_LAST_POST' => $view_topic_url . '&p=' . $row['topic_last_post_id'] . '#p' . $row['topic_last_post_id'], + 'U_VIEW_TOPIC' => $view_topic_url, + 'U_VIEW_FORUM' => append_sid("{$phpbb_root_path}viewforum.$phpEx", 'f=' . $forum_id), + )); + } + } } ?> \ No newline at end of file diff --git a/phpBB/includes/ucp/ucp_pm.php b/phpBB/includes/ucp/ucp_pm.php index b1f016e149..73bb3411cd 100644 --- a/phpBB/includes/ucp/ucp_pm.php +++ b/phpBB/includes/ucp/ucp_pm.php @@ -340,7 +340,7 @@ class ucp_pm $s_folder_options = $s_to_folder_options = ''; foreach ($folder as $f_id => $folder_ary) { - $option = '' . $folder_ary['folder_name'] . (($folder_ary['unread_messages']) ? ' [' . $folder_ary['unread_messages'] . '] ' : '') . ''; + $option = '' . $folder_ary['folder_name'] . (($folder_ary['unread_messages']) ? ' [' . $folder_ary['unread_messages'] . '] ' : '') . ''; $s_to_folder_options .= ($f_id != PRIVMSGS_OUTBOX && $f_id != PRIVMSGS_SENTBOX) ? $option : ''; $s_folder_options .= $option; diff --git a/phpBB/includes/ucp/ucp_pm_compose.php b/phpBB/includes/ucp/ucp_pm_compose.php index ce6087f424..7b740c1515 100644 --- a/phpBB/includes/ucp/ucp_pm_compose.php +++ b/phpBB/includes/ucp/ucp_pm_compose.php @@ -72,17 +72,30 @@ function compose_pm($id, $mode, $action) { if ($config['allow_mass_pm'] && $auth->acl_get('u_masspm')) { - $sql = 'SELECT group_id, group_name, group_type - FROM ' . GROUPS_TABLE . ' - WHERE group_type NOT IN (' . GROUP_HIDDEN . ', ' . GROUP_CLOSED . ') - AND group_receive_pm = 1 - ORDER BY group_type DESC'; + $sql = 'SELECT g.group_id, g.group_name, g.group_type + FROM ' . GROUPS_TABLE . ' g'; + + if (!$auth->acl_gets('a_group', 'a_groupadd', 'a_groupdel')) + { + $sql .= ' LEFT JOIN ' . USER_GROUP_TABLE . ' ug + ON ( + g.group_id = ug.group_id + AND ug.user_id = ' . $user->data['user_id'] . ' + AND ug.user_pending = 0 + ) + WHERE (g.group_type <> ' . GROUP_HIDDEN . ' OR ug.user_id = ' . $user->data['user_id'] . ')'; + } + + $sql .= ($auth->acl_gets('a_group', 'a_groupadd', 'a_groupdel')) ? ' WHERE ' : ' AND '; + + $sql .= 'g.group_receive_pm = 1 + ORDER BY g.group_type DESC, g.group_name ASC'; $result = $db->sql_query($sql); $group_options = ''; while ($row = $db->sql_fetchrow($result)) { - $group_options .= '' . (($row['group_type'] == GROUP_SPECIAL) ? $user->lang['G_' . $row['group_name']] : $row['group_name']) . ''; + $group_options .= '' . (($row['group_type'] == GROUP_SPECIAL) ? $user->lang['G_' . $row['group_name']] : $row['group_name']) . ''; } $db->sql_freeresult($result); } @@ -91,8 +104,8 @@ function compose_pm($id, $mode, $action) 'S_SHOW_PM_BOX' => true, 'S_ALLOW_MASS_PM' => ($config['allow_mass_pm'] && $auth->acl_get('u_masspm')) ? true : false, 'S_GROUP_OPTIONS' => ($config['allow_mass_pm'] && $auth->acl_get('u_masspm')) ? $group_options : '', - 'U_FIND_USERNAME' => append_sid("{$phpbb_root_path}memberlist.$phpEx", "mode=searchuser&form=post&field=username_list&select_single=$select_single"), - 'UA_FIND_USERNAME' => append_sid("{$phpbb_root_path}memberlist.$phpEx", "mode=searchuser&form=post&field=username_list&select_single=$select_single", false)) + 'U_FIND_USERNAME' => append_sid("{$phpbb_root_path}memberlist.$phpEx", "mode=searchuser&form=postform&field=username_list&select_single=$select_single"), + 'UA_FIND_USERNAME' => append_sid("{$phpbb_root_path}memberlist.$phpEx", "mode=searchuser&form=postform&field=username_list&select_single=$select_single", false)) ); } @@ -125,7 +138,7 @@ function compose_pm($id, $mode, $action) if ($action == 'quotepost') { - $sql = 'SELECT p.post_id as msg_id, p.post_text as message_text, p.poster_id as author_id, p.post_time as message_time, p.bbcode_bitfield, p.bbcode_uid, p.enable_sig, p.enable_smilies, p.enable_magic_url, t.topic_title as message_subject, u.username as quote_username + $sql = 'SELECT p.post_id as msg_id, p.forum_id, p.post_text as message_text, p.poster_id as author_id, p.post_time as message_time, p.bbcode_bitfield, p.bbcode_uid, p.enable_sig, p.enable_smilies, p.enable_magic_url, t.topic_title as message_subject, u.username as quote_username FROM ' . POSTS_TABLE . ' p, ' . TOPICS_TABLE . ' t, ' . USERS_TABLE . " u WHERE p.post_id = $msg_id AND t.topic_id = p.topic_id @@ -180,6 +193,7 @@ function compose_pm($id, $mode, $action) default: trigger_error('NO_ACTION_MODE', E_USER_ERROR); + break; } if ($action == 'forward' && (!$config['forward_pm'] || !$auth->acl_get('u_pm_forward'))) @@ -203,6 +217,14 @@ function compose_pm($id, $mode, $action) trigger_error('NO_MESSAGE'); } + if ($action == 'quotepost') + { + if (($post['forum_id'] && !$auth->acl_get('f_read', $post['forum_id'])) || (!$post['forum_id'] && !$auth->acl_getf_global('f_read'))) + { + trigger_error('NOT_AUTHORISED'); + } + } + $msg_id = (int) $post['msg_id']; $folder_id = (isset($post['folder_id'])) ? $post['folder_id'] : 0; $message_text = (isset($post['message_text'])) ? $post['message_text'] : ''; @@ -326,7 +348,7 @@ function compose_pm($id, $mode, $action) } // Handle User/Group adding/removing - handle_message_list_actions($address_list, $remove_u, $remove_g, $add_to, $add_bcc); + handle_message_list_actions($address_list, $error, $remove_u, $remove_g, $add_to, $add_bcc); // Check for too many recipients if ((!$config['allow_mass_pm'] || !$auth->acl_get('u_masspm')) && num_recipients($address_list) > 1) @@ -399,7 +421,7 @@ function compose_pm($id, $mode, $action) $subject = utf8_normalize_nfc(request_var('subject', '', true)); $subject = (!$subject && $action != 'post') ? $user->lang['NEW_MESSAGE'] : $subject; $message = utf8_normalize_nfc(request_var('message', '', true)); - + if ($subject && $message) { if (confirm_box(true)) @@ -437,6 +459,18 @@ function compose_pm($id, $mode, $action) confirm_box(false, 'SAVE_DRAFT', $s_hidden_fields); } } + else + { + if (!$subject) + { + $error[] = $user->lang['EMPTY_MESSAGE_SUBJECT']; + } + + if (!$message) + { + $error[] = $user->lang['TOO_FEW_CHARS']; + } + } unset($subject, $message); } @@ -476,7 +510,7 @@ function compose_pm($id, $mode, $action) { $subject = utf8_normalize_nfc(request_var('subject', '', true)); $message_parser->message = utf8_normalize_nfc(request_var('message', '', true)); - + $icon_id = request_var('icon', 0); $enable_bbcode = (!$bbcode_status || isset($_POST['disable_bbcode'])) ? false : true; @@ -497,9 +531,21 @@ function compose_pm($id, $mode, $action) // Parse Attachments - before checksum is calculated $message_parser->parse_attachments('fileupload', $action, 0, $submit, $preview, $refresh, true); + if (sizeof($message_parser->warn_msg) && !($remove_u || $remove_g || $add_to || $add_bcc)) + { + $error[] = implode('
    ', $message_parser->warn_msg); + $message_parser->warn_msg = array(); + } + // Parse message $message_parser->parse($enable_bbcode, ($config['allow_post_links']) ? $enable_urls : false, $enable_smilies, $img_status, $flash_status, true, $config['allow_sig_links']); + // On a refresh we do not care about message parsing errors + if (sizeof($message_parser->warn_msg) && !$refresh) + { + $error[] = implode('
    ', $message_parser->warn_msg); + } + if ($action != 'edit' && !$preview && !$refresh && $config['flood_interval'] && !$auth->acl_get('u_ignoreflood')) { // Flood check @@ -519,7 +565,7 @@ function compose_pm($id, $mode, $action) { if (!$subject) { - $error[] = $user->lang['EMPTY_SUBJECT']; + $error[] = $user->lang['EMPTY_MESSAGE_SUBJECT']; } if (!sizeof($address_list)) @@ -528,11 +574,6 @@ function compose_pm($id, $mode, $action) } } - if (sizeof($message_parser->warn_msg) && !($remove_u || $remove_g || $add_to || $add_bcc)) - { - $error[] = implode('
    ', $message_parser->warn_msg); - } - // Store message, sync counters if (!sizeof($error) && $submit) { @@ -541,7 +582,7 @@ function compose_pm($id, $mode, $action) 'from_user_id' => $user->data['user_id'], 'from_user_ip' => $user->data['user_ip'], 'from_username' => $user->data['username'], - 'reply_from_root_level' => (isset($root_level)) ? (int) $root_level : 0, + 'reply_from_root_level' => (isset($post['root_level'])) ? (int) $post['root_level'] : 0, 'reply_from_msg_id' => (int) $msg_id, 'icon_id' => (int) $icon_id, 'enable_sig' => (bool) $enable_sig, @@ -574,6 +615,7 @@ function compose_pm($id, $mode, $action) // Preview if (!sizeof($error) && $preview) { + $user->add_lang('viewtopic'); $preview_message = $message_parser->format_display($enable_bbcode, $enable_urls, $enable_smilies, false); $preview_signature = $user->data['user_sig']; @@ -635,21 +677,21 @@ function compose_pm($id, $mode, $action) $message_parser->decode_message($bbcode_uid); - if (($action == 'quote' || $action == 'quotepost') && !$preview && !$refresh) + if (($action == 'quote' || $action == 'quotepost') && !$preview && !$refresh && !$submit) { if ($action == 'quotepost') { $post_id = request_var('p', 0); if ($config['allow_post_links']) { - $message_link = "[url=" . generate_board_url() . "/viewtopic.$phpEx?p={$post_id}#p{$post_id}]{$message_subject}[/url]\n\n"; + $message_link = "[url=" . generate_board_url() . "/viewtopic.$phpEx?p={$post_id}#p{$post_id}]{$user->lang['SUBJECT']}: {$message_subject}[/url]\n\n"; } else { $message_link = $user->lang['SUBJECT'] . ': ' . $message_subject . " (" . generate_board_url() . "/viewtopic.$phpEx?p={$post_id}#p{$post_id})\n\n"; } } - else + else { $message_link = ''; } @@ -667,11 +709,11 @@ function compose_pm($id, $mode, $action) if ($config['allow_post_links']) { - $quote_username_text = '[url=' . generate_board_url() . "/memberlist.$phpEx?mode=viewprofile&u={$post['author_id']}]{$quote_username}[/url]"; + $quote_username_text = '[url=' . generate_board_url() . "/memberlist.$phpEx?mode=viewprofile&u={$post['author_id']}]{$quote_username}[/url]"; } else { - $quote_username_text = $quote_username . ' (' . generate_board_url() . "/memberlist.$phpEx?mode=viewprofile&u={$post['author_id']})"; + $quote_username_text = $quote_username . ' (' . generate_board_url() . "/memberlist.$phpEx?mode=viewprofile&u={$post['author_id']})"; } $forward_text = array(); @@ -715,16 +757,33 @@ function compose_pm($id, $mode, $action) { $sql = 'SELECT user_id as id, username as name, user_colour as colour FROM ' . USERS_TABLE . ' - WHERE ' . $db->sql_in_set('user_id', array_map('intval', array_keys($address_list['u']))); + WHERE ' . $db->sql_in_set('user_id', array_map('intval', array_keys($address_list['u']))) . ' + ORDER BY username_clean ASC'; $result['u'] = $db->sql_query($sql); } if (!empty($address_list['g'])) { - $sql = 'SELECT group_id as id, group_name as name, group_colour as colour, group_type - FROM ' . GROUPS_TABLE . ' - WHERE group_receive_pm = 1 - AND ' . $db->sql_in_set('group_id', array_map('intval', array_keys($address_list['g']))); + $sql = 'SELECT g.group_id AS id, g.group_name AS name, g.group_colour AS colour, g.group_type + FROM ' . GROUPS_TABLE . ' g'; + + if (!$auth->acl_gets('a_group', 'a_groupadd', 'a_groupdel')) + { + $sql .= ' LEFT JOIN ' . USER_GROUP_TABLE . ' ug + ON ( + g.group_id = ug.group_id + AND ug.user_id = ' . $user->data['user_id'] . ' + AND ug.user_pending = 0 + ) + WHERE (g.group_type <> ' . GROUP_HIDDEN . ' OR ug.user_id = ' . $user->data['user_id'] . ')'; + } + + $sql .= ($auth->acl_gets('a_group', 'a_groupadd', 'a_groupdel')) ? ' WHERE ' : ' AND '; + + $sql .= 'g.group_receive_pm = 1 + AND ' . $db->sql_in_set('g.group_id', array_map('intval', array_keys($address_list['g']))) . ' + ORDER BY g.group_name ASC'; + $result['g'] = $db->sql_query($sql); } @@ -740,7 +799,7 @@ function compose_pm($id, $mode, $action) { $row['name'] = ($row['group_type'] == GROUP_SPECIAL) ? $user->lang['G_' . $row['name']] : $row['name']; } - + ${$type}[$row['id']] = array('name' => $row['name'], 'colour' => $row['colour']); } $db->sql_freeresult($result[$type]); @@ -834,6 +893,7 @@ function compose_pm($id, $mode, $action) default: trigger_error('NO_ACTION_MODE', E_USER_ERROR); + break; } $s_hidden_fields = ''; @@ -858,6 +918,7 @@ function compose_pm($id, $mode, $action) 'MINI_POST_IMG' => $user->img('icon_post_target', $user->lang['PM']), 'ERROR' => (sizeof($error)) ? implode('
    ', $error) : '', + 'S_COMPOSE_PM' => true, 'S_EDIT_POST' => ($action == 'edit'), 'S_SHOW_PM_ICONS' => $s_pm_icons, 'S_BBCODE_ALLOWED' => $bbcode_status, @@ -900,22 +961,30 @@ function compose_pm($id, $mode, $action) /** * For composing messages, handle list actions */ -function handle_message_list_actions(&$address_list, $remove_u, $remove_g, $add_to, $add_bcc) +function handle_message_list_actions(&$address_list, &$error, $remove_u, $remove_g, $add_to, $add_bcc) { - global $auth, $db; + global $auth, $db, $user; // Delete User [TO/BCC] - if ($remove_u) + if ($remove_u && !empty($_REQUEST['remove_u']) && is_array($_REQUEST['remove_u'])) { $remove_user_id = array_keys($_REQUEST['remove_u']); - unset($address_list['u'][(int) $remove_user_id[0]]); + + if (isset($remove_user_id[0])) + { + unset($address_list['u'][(int) $remove_user_id[0]]); + } } // Delete Group [TO/BCC] - if ($remove_g) + if ($remove_g && !empty($_REQUEST['remove_g']) && is_array($_REQUEST['remove_g'])) { $remove_group_id = array_keys($_REQUEST['remove_g']); - unset($address_list['g'][(int) $remove_group_id[0]]); + + if (isset($remove_group_id[0])) + { + unset($address_list['g'][(int) $remove_group_id[0]]); + } } // Add User/Group [TO] @@ -949,7 +1018,13 @@ function handle_message_list_actions(&$address_list, $remove_u, $remove_g, $add_ if (sizeof($usernames)) { $user_id_ary = array(); - user_get_id_name($user_id_ary, $usernames); + user_get_id_name($user_id_ary, $usernames, array(USER_NORMAL, USER_FOUNDER, USER_INACTIVE)); + + // If there are users not existing, we will at least print a notice... + if (!sizeof($user_id_ary)) + { + $error[] = $user->lang['PM_NO_USERS']; + } } // Add Friends if specified @@ -980,11 +1055,19 @@ function handle_message_list_actions(&$address_list, $remove_u, $remove_g, $add_ AND user_allow_pm = 0'; $result = $db->sql_query($sql); + $removed = false; while ($row = $db->sql_fetchrow($result)) { + $removed = true; unset($address_list['u'][$row['user_id']]); } $db->sql_freeresult($result); + + // print a notice about users not being added who do not want to receive pms + if ($removed) + { + $error[] = $user->lang['PM_USERS_REMOVED_NO_PM']; + } } } } diff --git a/phpBB/includes/ucp/ucp_pm_options.php b/phpBB/includes/ucp/ucp_pm_options.php index db4d62f472..f242c864b6 100644 --- a/phpBB/includes/ucp/ucp_pm_options.php +++ b/phpBB/includes/ucp/ucp_pm_options.php @@ -623,7 +623,7 @@ function define_rule_option($hardcoded, $rule_option, $rule_lang, $check_ary) */ function define_cond_option($hardcoded, $cond_option, $rule_option, $global_rule_conditions) { - global $db, $template, $auth; + global $db, $template, $auth, $user; $template->assign_vars(array( 'S_COND_DEFINED' => true, @@ -706,11 +706,28 @@ function define_cond_option($hardcoded, $cond_option, $rule_option, $global_rule $rule_group_id = request_var('rule_group_id', 0); $rule_string = utf8_normalize_nfc(request_var('rule_string', '', true)); - $sql_and = ($auth->acl_gets('a_group', 'a_groupadd', 'a_groupdel')) ? '<> ' . GROUP_SPECIAL : 'NOT IN (' . GROUP_SPECIAL . ', ' . GROUP_HIDDEN . ')'; - $sql = 'SELECT group_id, group_name, group_type - FROM ' . GROUPS_TABLE . " - WHERE group_type $sql_and - ORDER BY group_type DESC, group_name"; + $sql = 'SELECT g.group_id, g.group_name, g.group_type + FROM ' . GROUPS_TABLE . ' g '; + + if (!$auth->acl_gets('a_group', 'a_groupadd', 'a_groupdel')) + { + $sql .= 'LEFT JOIN ' . USER_GROUP_TABLE . ' ug + ON ( + g.group_id = ug.group_id + AND ug.user_id = ' . $user->data['user_id'] . ' + AND ug.user_pending = 0 + ) + WHERE (ug.user_id = ' . $user->data['user_id'] . ' OR g.group_type <> ' . GROUP_HIDDEN . ') + AND'; + } + else + { + $sql .= 'WHERE'; + } + + $sql .= " (g.group_name NOT IN ('GUESTS', 'BOTS') OR g.group_type <> " . GROUP_SPECIAL . ') + ORDER BY g.group_type DESC, g.group_name ASC'; + $result = $db->sql_query($sql); $s_group_options = ''; @@ -721,8 +738,10 @@ function define_cond_option($hardcoded, $cond_option, $rule_option, $global_rule $rule_string = (($row['group_type'] == GROUP_SPECIAL) ? $user->lang['G_' . $row['group_name']] : $row['group_name']); } - $s_selected = ($row['group_id'] == $rule_group_id) ? ' selected="selected"' : ''; - $s_group_options .= ''; + $s_class = ($row['group_type'] == GROUP_SPECIAL) ? ' class="sep"' : ''; + $s_selected = ($row['group_id'] == $rule_group_id) ? ' selected="selected"' : ''; + + $s_group_options .= ''; } $db->sql_freeresult($result); diff --git a/phpBB/includes/ucp/ucp_pm_viewfolder.php b/phpBB/includes/ucp/ucp_pm_viewfolder.php index 4ce5b81fce..3c11a3ae8a 100644 --- a/phpBB/includes/ucp/ucp_pm_viewfolder.php +++ b/phpBB/includes/ucp/ucp_pm_viewfolder.php @@ -72,7 +72,7 @@ function view_folder($id, $mode, $folder_id, $folder) continue; } - $s_folder_move_options .= ''; + $s_folder_move_options .= ''; $s_folder_move_options .= sprintf($user->lang['MOVE_MARKED_TO_FOLDER'], $folder_ary['folder_name']); $s_folder_move_options .= (($folder_ary['unread_messages']) ? ' [' . $folder_ary['unread_messages'] . '] ' : '') . ''; } @@ -222,6 +222,7 @@ function view_folder($id, $mode, $folder_id, $folder) 'FOLDER' => (isset($folder[$row['folder_id']])) ? $folder[$row['folder_id']]['folder_name'] : '', 'U_FOLDER' => (isset($folder[$row['folder_id']])) ? append_sid("{$phpbb_root_path}ucp.$phpEx", 'folder=' . $row['folder_id']) : '', 'PM_ICON_IMG' => (!empty($icons[$row['icon_id']])) ? '' : '', + 'PM_ICON_URL' => (!empty($icons[$row['icon_id']])) ? $config['icons_path'] . '/' . $icons[$row['icon_id']]['img'] : '', 'FOLDER_IMG' => $user->img($folder_img, $folder_alt), 'FOLDER_IMG_SRC' => $user->img($folder_img, $folder_alt, false, '', 'src'), 'PM_IMG' => ($row_indicator) ? $user->img('pm_' . $row_indicator, '') : '', @@ -441,8 +442,19 @@ function get_pm_from($folder_id, $folder, $user_id) // PM ordering options $limit_days = array(0 => $user->lang['ALL_MESSAGES'], 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_text = array('a' => $user->lang['AUTHOR'], 't' => $user->lang['POST_TIME'], 's' => $user->lang['SUBJECT']); - $sort_by_sql = array('a' => 'u.username_clean', 't' => 'p.message_time', 's' => 'p.message_subject'); + + // No sort by Author for sentbox/outbox (already only author available) + // Also, sort by msg_id for the time - private messages are not as prone to errors as posts are. + if ($folder_id == PRIVMSGS_OUTBOX || $folder_id == PRIVMSGS_SENTBOX) + { + $sort_by_text = array('t' => $user->lang['POST_TIME'], 's' => $user->lang['SUBJECT']); + $sort_by_sql = array('t' => 'p.msg_id', 's' => 'p.message_subject'); + } + else + { + $sort_by_text = array('a' => $user->lang['AUTHOR'], 't' => $user->lang['POST_TIME'], 's' => $user->lang['SUBJECT']); + $sort_by_sql = array('a' => 'u.username_clean', 't' => 'p.msg_id', 's' => 'p.message_subject'); + } $s_limit_days = $s_sort_key = $s_sort_dir = $u_sort_param = ''; gen_sort_selects($limit_days, $sort_by_text, $sort_days, $sort_key, $sort_dir, $s_limit_days, $s_sort_key, $s_sort_dir, $u_sort_param); diff --git a/phpBB/includes/ucp/ucp_pm_viewmessage.php b/phpBB/includes/ucp/ucp_pm_viewmessage.php index 4bda60834e..aa88bfe65f 100644 --- a/phpBB/includes/ucp/ucp_pm_viewmessage.php +++ b/phpBB/includes/ucp/ucp_pm_viewmessage.php @@ -86,8 +86,6 @@ function view_message($id, $mode, $folder_id, $msg_id, $folder, $message_row) { if ($auth->acl_get('u_pm_download')) { - include($phpbb_root_path . 'includes/functions_display.' . $phpEx); - $sql = 'SELECT * FROM ' . ATTACHMENTS_TABLE . " WHERE post_msg_id = $msg_id @@ -250,9 +248,7 @@ function message_history($msg_id, $user_id, $message_row, $folder) { $sql .= " AND (p.root_level = " . $message_row['root_level'] . ' OR p.msg_id = ' . $message_row['root_level'] . ')'; } - $sql .= ' ORDER BY p.message_time '; - $sort_dir = (!empty($user->data['user_sortby_dir'])) ? $user->data['user_sortby_dir'] : 'd'; - $sql .= ($sort_dir == 'd') ? 'ASC' : 'DESC'; + $sql .= ' ORDER BY p.message_time DESC'; $result = $db->sql_query($sql); $row = $db->sql_fetchrow($result); @@ -267,7 +263,6 @@ function message_history($msg_id, $user_id, $message_row, $folder) $bbcode_bitfield = ''; $folder_url = append_sid("{$phpbb_root_path}ucp.$phpEx", 'i=pm') . '&folder='; - $title = ($sort_dir == 'd') ? $row['message_subject'] : ''; do { $folder_id = (int) $row['folder_id']; @@ -287,7 +282,7 @@ function message_history($msg_id, $user_id, $message_row, $folder) while ($row = $db->sql_fetchrow($result)); $db->sql_freeresult($result); - $title = ($sort_dir == 'a') ? $row['message_subject'] : $title; + $title = $row['message_subject']; if (sizeof($rowset) == 1) { @@ -350,7 +345,7 @@ function message_history($msg_id, $user_id, $message_row, $folder) 'S_CURRENT_MSG' => ($row['msg_id'] == $msg_id), 'S_AUTHOR_DELETED' => ($author_id == ANONYMOUS) ? true : false, - 'U_MSG_ID' => $row['msg_id'], + 'MSG_ID' => $row['msg_id'], 'U_VIEW_MESSAGE' => "$url&f=$folder_id&p=" . $row['msg_id'], 'U_QUOTE' => ($auth->acl_get('u_sendpm') && $author_id != ANONYMOUS && $author_id != $user->data['user_id']) ? "$url&mode=compose&action=quote&f=" . $folder_id . "&p=" . $row['msg_id'] : '', 'U_POST_REPLY_PM' => ($author_id != $user->data['user_id'] && $author_id != ANONYMOUS && $auth->acl_get('u_sendpm')) ? "$url&mode=compose&action=reply&f=$folder_id&p=" . $row['msg_id'] : '') @@ -393,8 +388,9 @@ function get_user_information($user_id, $user_row) $db->sql_freeresult($result); } - // Grab ranks - $ranks = $cache->obtain_ranks(); + // Some standard values + $user_row['online'] = false; + $user_row['rank_title'] = $user_row['rank_image'] = $user_row['rank_image_src'] = $user_row['email'] = ''; // Generate online information for user if ($config['load_onlinetrack']) @@ -413,61 +409,20 @@ function get_user_information($user_id, $user_row) $user_row['online'] = (time() - $update_time < $row['online_time'] && ($row['viewonline'] && $user_row['user_allow_viewonline'])) ? true : false; } } - else + + if (!function_exists('get_user_avatar')) { - $user_row['online'] = false; + include($phpbb_root_path . 'includes/functions_display.' . $phpEx); } - if ($user_row['user_avatar'] && $user->optionget('viewavatars')) - { - $avatar_img = ''; + $user_row['avatar'] = ($user->optionget('viewavatars')) ? get_user_avatar($user_row['user_avatar'], $user_row['user_avatar_type'], $user_row['user_avatar_width'], $user_row['user_avatar_height']) : ''; - switch ($user_row['user_avatar_type']) - { - case AVATAR_UPLOAD: - $avatar_img = $config['avatar_path'] . '/'; - break; - - case AVATAR_GALLERY: - $avatar_img = $config['avatar_gallery_path'] . '/'; - break; - } - - $avatar_img .= $user_row['user_avatar']; - $user_row['avatar'] = '' . $user->lang['USER_AVATAR'] . ''; - } - - $user_row['rank_title'] = $user_row['rank_image'] = ''; - - if (!empty($user_row['user_rank'])) - { - $user_row['rank_title'] = (isset($ranks['special'][$user_row['user_rank']])) ? $ranks['special'][$user_row['user_rank']]['rank_title'] : ''; - $user_row['rank_image'] = (!empty($ranks['special'][$user_row['user_rank']]['rank_image'])) ? '' . $ranks['special'][$user_row['user_rank']]['rank_title'] . '
    ' : ''; - } - else - { - if (isset($ranks['normal'])) - { - foreach ($ranks['normal'] as $rank) - { - if ($user_row['user_posts'] >= $rank['rank_min']) - { - $user_row['rank_title'] = $rank['rank_title']; - $user_row['rank_image'] = (!empty($rank['rank_image'])) ? '' . $rank['rank_title'] . '
    ' : ''; - break; - } - } - } - } + get_user_rank($user_row['user_rank'], $user_row['user_posts'], $user_row['rank_title'], $user_row['rank_image'], $user_row['rank_image_src']); if (!empty($user_row['user_allow_viewemail']) || $auth->acl_get('a_email')) { $user_row['email'] = ($config['board_email_form'] && $config['email_enable']) ? append_sid("{$phpbb_root_path}memberlist.$phpEx", "mode=email&u=$user_id") : ((($config['board_hide_emails'] && !$auth->acl_get('a_email')) || empty($user_row['user_email'])) ? '' : 'mailto:' . $user_row['user_email']); } - else - { - $user_row['email'] = ''; - } return $user_row; } diff --git a/phpBB/includes/ucp/ucp_prefs.php b/phpBB/includes/ucp/ucp_prefs.php index e57cc3ec26..9ef252b30f 100644 --- a/phpBB/includes/ucp/ucp_prefs.php +++ b/phpBB/includes/ucp/ucp_prefs.php @@ -50,7 +50,7 @@ class ucp_prefs $data['style'] = ($config['override_user_style']) ? $config['default_style'] : $data['style']; $error = validate_data($data, array( - 'dateformat' => array('string', false, 3, 30), + 'dateformat' => array('string', false, 1, 30), 'lang' => array('match', false, '#^[a-z0-9_\-]{2,}$#i'), 'tz' => array('num', false, -14, 14), )); @@ -94,7 +94,7 @@ class ucp_prefs foreach ($user->lang['dateformats'] as $format => $null) { $dateformat_options .= ''; } diff --git a/phpBB/includes/ucp/ucp_profile.php b/phpBB/includes/ucp/ucp_profile.php index e730368e20..db91c90803 100644 --- a/phpBB/includes/ucp/ucp_profile.php +++ b/phpBB/includes/ucp/ucp_profile.php @@ -116,8 +116,12 @@ class ucp_profile add_log('user', $user->data['user_id'], 'LOG_USER_UPDATE_EMAIL', $data['username'], $user->data['user_email'], $data['email']); } + $message = 'PROFILE_UPDATED'; + if ($config['email_enable'] && $data['email'] != $user->data['user_email'] && $user->data['user_type'] != USER_FOUNDER && ($config['require_activation'] == USER_ACTIVATION_SELF || $config['require_activation'] == USER_ACTIVATION_ADMIN)) { + $message = ($config['require_activation'] == USER_ACTIVATION_SELF) ? 'ACCOUNT_EMAIL_CHANGED' : 'ACCOUNT_EMAIL_CHANGED_ADMIN'; + include_once($phpbb_root_path . 'includes/functions_messenger.' . $phpEx); $server_url = generate_board_url(); @@ -184,9 +188,9 @@ class ucp_profile user_active_flip('deactivate', $user->data['user_id'], INACTIVE_PROFILE); - $sql_ary += array( - 'user_actkey' => $user_actkey, - ); + // Because we want the profile to be reactivated we set user_newpasswd to empty (else the reactivation will fail) + $sql_ary['user_actkey'] = $user_actkey; + $sql_ary['user_newpasswd'] = ''; } if (sizeof($sql_ary)) @@ -203,8 +207,21 @@ class ucp_profile user_update_name($user->data['username'], $data['username']); } - meta_refresh(3, $this->u_action); - $message = $user->lang['PROFILE_UPDATED'] . '

    ' . sprintf($user->lang['RETURN_UCP'], '', ''); + // Now, we can remove the user completely (kill the session) - NOT BEFORE!!! + if (!empty($sql_ary['user_actkey'])) + { + meta_refresh(5, append_sid($phpbb_root_path . 'index.' . $phpEx)); + $message = $user->lang[$message] . '

    ' . sprintf($user->lang['RETURN_INDEX'], '', ''); + + // Because the user gets deactivated we log him out too, killing his session + $user->session_kill(); + } + else + { + meta_refresh(3, $this->u_action); + $message = $user->lang[$message] . '

    ' . sprintf($user->lang['RETURN_UCP'], '', ''); + } + trigger_error($message); } @@ -212,8 +229,6 @@ class ucp_profile $error = preg_replace('#^([A-Z_]+)$#e', "(!empty(\$user->lang['\\1'])) ? \$user->lang['\\1'] : '\\1'", $error); } - $user_char_ary = array('.*' => 'USERNAME_CHARS_ANY', '[a-z]+' => 'USERNAME_ALPHA_ONLY', '[-\]_+ [a-z]+' => 'USERNAME_ALPHA_SPACERS', '\w+' => 'USERNAME_LETTER_NUM', '[-\]_+ [\w]+' => 'USERNAME_LETTER_NUM_SPACERS', '[\x01-\x7F]+' => 'USERNAME_ASCII'); - $template->assign_vars(array( 'ERROR' => (sizeof($error)) ? implode('
    ', $error) : '', @@ -223,10 +238,10 @@ class ucp_profile 'NEW_PASSWORD' => $data['new_password'], 'CUR_PASSWORD' => '', - 'L_USERNAME_EXPLAIN' => sprintf($user->lang[$user_char_ary[str_replace('\\\\', '\\', $config['allow_name_chars'])] . '_EXPLAIN'], $config['min_name_chars'], $config['max_name_chars']), + 'L_USERNAME_EXPLAIN' => sprintf($user->lang[$config['allow_name_chars'] . '_EXPLAIN'], $config['min_name_chars'], $config['max_name_chars']), 'L_CHANGE_PASSWORD_EXPLAIN' => sprintf($user->lang[$config['pass_complex'] . '_EXPLAIN'], $config['min_pass_chars'], $config['max_pass_chars']), - 'S_FORCE_PASSWORD' => ($config['chg_passforce'] && $user->data['user_passchg'] < time() - $config['chg_passforce']) ? true : false, + 'S_FORCE_PASSWORD' => ($auth->acl_get('u_chgpasswd') && $config['chg_passforce'] && $user->data['user_passchg'] < time() - ($config['chg_passforce'] * 86400)) ? true : false, 'S_CHANGE_USERNAME' => ($config['allow_namechange'] && $auth->acl_get('u_chgname')) ? true : false, 'S_CHANGE_EMAIL' => ($auth->acl_get('u_chgemail')) ? true : false, 'S_CHANGE_PASSWORD' => ($auth->acl_get('u_chgpasswd')) ? true : false) @@ -275,7 +290,7 @@ class ucp_profile 'msn' => array('string', true, 5, 255), 'jabber' => array( array('string', true, 5, 255), - array('match', true, '#^[a-z0-9\.\-_\+]+?@(.*?\.)*?[a-z0-9\-_]+?\.[a-z]{2,4}(/.*)?$#i')), + array('match', true, '#^[^@:\'"<>&\x00-\x1F\x7F\t\r\n]+@(.*?\.)*?[a-z0-9\-_]+?\.[a-z]{2,4}(/.*)?$#iu')), 'yim' => array('string', true, 5, 255), 'website' => array( array('string', true, 12, 255), @@ -328,12 +343,12 @@ class ucp_profile { $cp_data['user_id'] = (int) $user->data['user_id']; - $db->return_on_error = true; + $db->sql_return_on_error(true); $sql = 'INSERT INTO ' . PROFILE_FIELDS_DATA_TABLE . ' ' . $db->sql_build_array('INSERT', $cp_data); $db->sql_query($sql); - $db->return_on_error = false; + $db->sql_return_on_error(false); } } @@ -485,16 +500,18 @@ class ucp_profile // Build custom bbcodes array display_custom_bbcodes(); - + break; case 'avatar': - $display_gallery = (isset($_POST['display_gallery'])) ? true : false; + include($phpbb_root_path . 'includes/functions_display.' . $phpEx); + + $display_gallery = request_var('display_gallery', '0'); $avatar_select = basename(request_var('avatar_select', '')); $category = basename(request_var('category', '')); - $can_upload = ($config['allow_avatar_upload'] && file_exists($phpbb_root_path . $config['avatar_path']) && is_writeable($phpbb_root_path . $config['avatar_path']) && $auth->acl_get('u_chgavatar') && (@ini_get('file_uploads') || strtolower(@ini_get('file_uploads')) == 'on')) ? true : false; + $can_upload = ($config['allow_avatar_upload'] && file_exists($phpbb_root_path . $config['avatar_path']) && @is_writable($phpbb_root_path . $config['avatar_path']) && $auth->acl_get('u_chgavatar') && (@ini_get('file_uploads') || strtolower(@ini_get('file_uploads')) == 'on')) ? true : false; if ($submit) { @@ -509,31 +526,13 @@ class ucp_profile $error = preg_replace('#^([A-Z_]+)$#e', "(!empty(\$user->lang['\\1'])) ? \$user->lang['\\1'] : '\\1'", $error); } - // Generate users avatar - $avatar_img = ''; - - if ($user->data['user_avatar']) - { - switch ($user->data['user_avatar_type']) - { - case AVATAR_UPLOAD: - $avatar_img = $phpbb_root_path . $config['avatar_path'] . '/'; - break; - - case AVATAR_GALLERY: - $avatar_img = $phpbb_root_path . $config['avatar_gallery_path'] . '/'; - break; - } - - $avatar_img .= $user->data['user_avatar']; - $avatar_img = ''; - } - $template->assign_vars(array( 'ERROR' => (sizeof($error)) ? implode('
    ', $error) : '', - 'AVATAR' => $avatar_img, + 'AVATAR' => get_user_avatar($user->data['user_avatar'], $user->data['user_avatar_type'], $user->data['user_avatar_width'], $user->data['user_avatar_height']), 'AVATAR_SIZE' => $config['avatar_filesize'], - + + 'U_GALLERY' => append_sid("{$phpbb_root_path}ucp.$phpEx", 'i=profile&mode=avatar&display_gallery=1'), + 'S_FORM_ENCTYPE' => ($can_upload) ? ' enctype="multipart/form-data"' : '', 'L_AVATAR_EXPLAIN' => sprintf($user->lang['AVATAR_EXPLAIN'], $config['avatar_max_width'], $config['avatar_max_height'], round($config['avatar_filesize'] / 1024)),) @@ -545,16 +544,17 @@ class ucp_profile } else { + $avatars_enabled = ($can_upload || ($auth->acl_get('u_chgavatar') && ($config['allow_avatar_local'] || $config['allow_avatar_remote']))) ? true : false; + $template->assign_vars(array( - 'AVATAR' => $avatar_img, - 'AVATAR_SIZE' => $config['avatar_filesize'], - 'WIDTH' => request_var('width', $user->data['user_avatar_width']), - 'HEIGHT' => request_var('height', $user->data['user_avatar_height']), + 'AVATAR_WIDTH' => request_var('width', $user->data['user_avatar_width']), + 'AVATAR_HEIGHT' => request_var('height', $user->data['user_avatar_height']), + 'S_AVATARS_ENABLED' => $avatars_enabled, 'S_UPLOAD_AVATAR_FILE' => $can_upload, 'S_UPLOAD_AVATAR_URL' => $can_upload, 'S_LINK_AVATAR' => ($auth->acl_get('u_chgavatar') && $config['allow_avatar_remote']) ? true : false, - 'S_GALLERY_AVATAR' => ($auth->acl_get('u_chgavatar') && $config['allow_avatar_local']) ? true : false) + 'S_DISPLAY_GALLERY' => ($auth->acl_get('u_chgavatar') && $config['allow_avatar_local']) ? true : false) ); } diff --git a/phpBB/includes/ucp/ucp_register.php b/phpBB/includes/ucp/ucp_register.php index 9fffdff5fd..c1978f3723 100644 --- a/phpBB/includes/ucp/ucp_register.php +++ b/phpBB/includes/ucp/ucp_register.php @@ -1,10 +1,10 @@ $confirm_id) : array(); + + // If we change the language, we want to pass on some more possible parameter. + if ($change_lang) + { + // We do not include the password! + $s_hidden_fields = array_merge($s_hidden_fields, array( + 'username' => request_var('username', '', true), + 'email' => strtolower(request_var('email', '')), + 'email_confirm' => strtolower(request_var('email_confirm', '')), + 'confirm_code' => request_var('confirm_code', ''), + 'lang' => $user->lang_name, + 'tz' => request_var('tz', (float) $config['board_timezone']), + )); + } if ($coppa === false && $config['coppa_enable']) { @@ -81,7 +97,7 @@ class ucp_register 'U_COPPA_YES' => append_sid("{$phpbb_root_path}ucp.$phpEx", 'mode=register&coppa=1' . $add_lang), 'S_SHOW_COPPA' => true, - 'S_HIDDEN_FIELDS' => ($confirm_id) ? '' : '', + 'S_HIDDEN_FIELDS' => build_hidden_fields($s_hidden_fields), 'S_UCP_ACTION' => append_sid("{$phpbb_root_path}ucp.$phpEx", 'mode=register' . $add_lang)) ); } @@ -92,7 +108,7 @@ class ucp_register 'S_SHOW_COPPA' => false, 'S_REGISTRATION' => true, - 'S_HIDDEN_FIELDS' => ($confirm_id) ? '' : '', + 'S_HIDDEN_FIELDS' => build_hidden_fields($s_hidden_fields), 'S_UCP_ACTION' => append_sid("{$phpbb_root_path}ucp.$phpEx", 'mode=register' . $add_lang . $add_coppa)) ); } @@ -137,7 +153,7 @@ class ucp_register $error = validate_data($data, array( 'username' => array( array('string', false, $config['min_name_chars'], $config['max_name_chars']), - array('username')), + array('username', '')), 'new_password' => array( array('string', false, $config['min_pass_chars'], $config['max_pass_chars']), array('password')), @@ -372,7 +388,7 @@ class ucp_register $messenger->assign_vars(array( 'USERNAME' => htmlspecialchars_decode($data['username']), - 'U_USER_DETAILS' => "$server_url/memberlist.$phpEx?mode=viewprofile&u=$user_id", + 'U_USER_DETAILS' => "$server_url/memberlist.$phpEx?mode=viewprofile&u=$user_id", 'U_ACTIVATE' => "$server_url/ucp.$phpEx?mode=activate&u=$user_id&k=$user_actkey") ); @@ -387,12 +403,17 @@ class ucp_register } } - $s_hidden_fields = build_hidden_fields(array( - 'agreed' => 'true', - 'coppa' => $coppa, - 'change_lang' => 0) + $s_hidden_fields = array( + 'agreed' => 'true', + 'change_lang' => 0, ); + if ($config['coppa_enable']) + { + $s_hidden_fields['coppa'] = $coppa; + } + $s_hidden_fields = build_hidden_fields($s_hidden_fields); + $confirm_image = ''; // Visual Confirmation - Show images @@ -475,8 +496,6 @@ class ucp_register break; } - $user_char_ary = array('.*' => 'USERNAME_CHARS_ANY', '[a-z]+' => 'USERNAME_ALPHA_ONLY', '[-\]_+ [a-z]+' => 'USERNAME_ALPHA_SPACERS', '\w+' => 'USERNAME_LETTER_NUM', '[-\]_+ [\w]+' => 'USERNAME_LETTER_NUM_SPACERS', '[\x01-\x7F]+' => 'USERNAME_ASCII'); - $template->assign_vars(array( 'ERROR' => (sizeof($error)) ? implode('
    ', $error) : '', 'USERNAME' => $data['username'], @@ -488,7 +507,7 @@ class ucp_register 'L_CONFIRM_EXPLAIN' => sprintf($user->lang['CONFIRM_EXPLAIN'], '', ''), 'L_REG_COND' => $l_reg_cond, - 'L_USERNAME_EXPLAIN' => sprintf($user->lang[$user_char_ary[str_replace('\\\\', '\\', $config['allow_name_chars'])] . '_EXPLAIN'], $config['min_name_chars'], $config['max_name_chars']), + 'L_USERNAME_EXPLAIN' => sprintf($user->lang[$config['allow_name_chars'] . '_EXPLAIN'], $config['min_name_chars'], $config['max_name_chars']), 'L_PASSWORD_EXPLAIN' => sprintf($user->lang[$config['pass_complex'] . '_EXPLAIN'], $config['min_pass_chars'], $config['max_pass_chars']), 'S_LANG_OPTIONS' => language_select($data['lang']), diff --git a/phpBB/includes/ucp/ucp_remind.php b/phpBB/includes/ucp/ucp_remind.php index 0e86d5259f..cee36e4417 100644 --- a/phpBB/includes/ucp/ucp_remind.php +++ b/phpBB/includes/ucp/ucp_remind.php @@ -28,7 +28,7 @@ class ucp_remind if ($submit) { - $sql = 'SELECT user_id, username, user_email, user_jabber, user_notify_type, user_type, user_lang + $sql = 'SELECT user_id, username, user_email, user_jabber, user_notify_type, user_type, user_lang, user_inactive_reason FROM ' . USERS_TABLE . " WHERE user_email = '" . $db->sql_escape($email) . "' AND username_clean = '" . $db->sql_escape(utf8_clean_string($username)) . "'"; @@ -41,9 +41,21 @@ class ucp_remind trigger_error('NO_EMAIL_USER'); } + if ($user_row['user_type'] == USER_IGNORE) + { + trigger_error('NO_USER'); + } + if ($user_row['user_type'] == USER_INACTIVE) { - trigger_error('ACCOUNT_NOT_ACTIVATED'); + if ($user_row['user_inactive_reason'] == INACTIVE_MANUAL) + { + trigger_error('ACCOUNT_DEACTIVATED'); + } + else + { + trigger_error('ACCOUNT_NOT_ACTIVATED'); + } } $server_url = generate_board_url(); diff --git a/phpBB/includes/ucp/ucp_resend.php b/phpBB/includes/ucp/ucp_resend.php index 1eaa30ce1e..10a1b672bd 100644 --- a/phpBB/includes/ucp/ucp_resend.php +++ b/phpBB/includes/ucp/ucp_resend.php @@ -28,7 +28,7 @@ class ucp_resend if ($submit) { - $sql = 'SELECT user_id, group_id, username, user_email, user_type, user_lang, user_actkey + $sql = 'SELECT user_id, group_id, username, user_email, user_type, user_lang, user_actkey, user_inactive_reason FROM ' . USERS_TABLE . " WHERE user_email = '" . $db->sql_escape($email) . "' AND username_clean = '" . $db->sql_escape(utf8_clean_string($username)) . "'"; @@ -41,11 +41,21 @@ class ucp_resend trigger_error('NO_EMAIL_USER'); } - if (!$user_row['user_actkey']) + if ($user_row['user_type'] == USER_IGNORE) + { + trigger_error('NO_USER'); + } + + if (!$user_row['user_actkey'] && $user_row['user_type'] != USER_INACTIVE) { trigger_error('ACCOUNT_ALREADY_ACTIVATED'); } + if (!$user_row['user_actkey'] || ($user_row['user_type'] == USER_INACTIVE && $user_row['user_inactive_reason'] == INACTIVE_MANUAL)) + { + trigger_error('ACCOUNT_DEACTIVATED'); + } + // Determine coppa status on group (REGISTERED(_COPPA)) $sql = 'SELECT group_name, group_type FROM ' . GROUPS_TABLE . ' diff --git a/phpBB/includes/utf/data/recode_basic.php b/phpBB/includes/utf/data/recode_basic.php index 8950b0550b..03391c9376 100644 --- a/phpBB/includes/utf/data/recode_basic.php +++ b/phpBB/includes/utf/data/recode_basic.php @@ -929,6 +929,40 @@ function cp1251($string) return strtr($string, $transform); } +function cp1252($string) +{ + static $transform = array( + "\xC2\x80" => "\xE2\x82\xAC", + "\xC2\x82" => "\xE2\x80\x9A", + "\xC2\x83" => "\xC6\x92", + "\xC2\x84" => "\xE2\x80\x9E", + "\xC2\x85" => "\xE2\x80\xA6", + "\xC2\x86" => "\xE2\x80\xA0", + "\xC2\x87" => "\xE2\x80\xA1", + "\xC2\x88" => "\xCB\x86", + "\xC2\x89" => "\xE2\x80\xB0", + "\xC2\x8A" => "\xC5\xA0", + "\xC2\x8B" => "\xE2\x80\xB9", + "\xC2\x8C" => "\xC5\x92", + "\xC2\x8E" => "\xC5\xBD", + "\xC2\x91" => "\xE2\x80\x98", + "\xC2\x92" => "\xE2\x80\x99", + "\xC2\x93" => "\xE2\x80\x9C", + "\xC2\x94" => "\xE2\x80\x9D", + "\xC2\x95" => "\xE2\x80\xA2", + "\xC2\x96" => "\xE2\x80\x93", + "\xC2\x97" => "\xE2\x80\x94", + "\xC2\x98" => "\xCB\x9C", + "\xC2\x99" => "\xE2\x84\xA2", + "\xC2\x9A" => "\xC5\xA1", + "\xC2\x9B" => "\xE2\x80\xBA", + "\xC2\x9C" => "\xC5\x93", + "\xC2\x9E" => "\xC5\xBE", + "\xC2\x9F" => "\xC5\xB8" + ); + return strtr(utf8_encode($string), $transform); +} + function cp1254($string) { static $tranform = array( @@ -1337,4 +1371,134 @@ function cp1257($string) return strtr($string, $transform); } +function utf8_to_cp1252($string) +{ + static $transform = array( + "\xE2\x82\xAC" => "\x80", + "\xE2\x80\x9A" => "\x82", + "\xC6\x92" => "\x83", + "\xE2\x80\x9E" => "\x84", + "\xE2\x80\xA6" => "\x85", + "\xE2\x80\xA0" => "\x86", + "\xE2\x80\xA1" => "\x87", + "\xCB\x86" => "\x88", + "\xE2\x80\xB0" => "\x89", + "\xC5\xA0" => "\x8A", + "\xE2\x80\xB9" => "\x8B", + "\xC5\x92" => "\x8C", + "\xC5\xBD" => "\x8E", + "\xE2\x80\x98" => "\x91", + "\xE2\x80\x99" => "\x92", + "\xE2\x80\x9C" => "\x93", + "\xE2\x80\x9D" => "\x94", + "\xE2\x80\xA2" => "\x95", + "\xE2\x80\x93" => "\x96", + "\xE2\x80\x94" => "\x97", + "\xCB\x9C" => "\x98", + "\xE2\x84\xA2" => "\x99", + "\xC5\xA1" => "\x9A", + "\xE2\x80\xBA" => "\x9B", + "\xC5\x93" => "\x9C", + "\xC5\xBE" => "\x9E", + "\xC5\xB8" => "\x9F", + "\xC2\xA0" => "\xA0", + "\xC2\xA1" => "\xA1", + "\xC2\xA2" => "\xA2", + "\xC2\xA3" => "\xA3", + "\xC2\xA4" => "\xA4", + "\xC2\xA5" => "\xA5", + "\xC2\xA6" => "\xA6", + "\xC2\xA7" => "\xA7", + "\xC2\xA8" => "\xA8", + "\xC2\xA9" => "\xA9", + "\xC2\xAA" => "\xAA", + "\xC2\xAB" => "\xAB", + "\xC2\xAC" => "\xAC", + "\xC2\xAD" => "\xAD", + "\xC2\xAE" => "\xAE", + "\xC2\xAF" => "\xAF", + "\xC2\xB0" => "\xB0", + "\xC2\xB1" => "\xB1", + "\xC2\xB2" => "\xB2", + "\xC2\xB3" => "\xB3", + "\xC2\xB4" => "\xB4", + "\xC2\xB5" => "\xB5", + "\xC2\xB6" => "\xB6", + "\xC2\xB7" => "\xB7", + "\xC2\xB8" => "\xB8", + "\xC2\xB9" => "\xB9", + "\xC2\xBA" => "\xBA", + "\xC2\xBB" => "\xBB", + "\xC2\xBC" => "\xBC", + "\xC2\xBD" => "\xBD", + "\xC2\xBE" => "\xBE", + "\xC2\xBF" => "\xBF", + "\xC3\x80" => "\xC0", + "\xC3\x81" => "\xC1", + "\xC3\x82" => "\xC2", + "\xC3\x83" => "\xC3", + "\xC3\x84" => "\xC4", + "\xC3\x85" => "\xC5", + "\xC3\x86" => "\xC6", + "\xC3\x87" => "\xC7", + "\xC3\x88" => "\xC8", + "\xC3\x89" => "\xC9", + "\xC3\x8A" => "\xCA", + "\xC3\x8B" => "\xCB", + "\xC3\x8C" => "\xCC", + "\xC3\x8D" => "\xCD", + "\xC3\x8E" => "\xCE", + "\xC3\x8F" => "\xCF", + "\xC3\x90" => "\xD0", + "\xC3\x91" => "\xD1", + "\xC3\x92" => "\xD2", + "\xC3\x93" => "\xD3", + "\xC3\x94" => "\xD4", + "\xC3\x95" => "\xD5", + "\xC3\x96" => "\xD6", + "\xC3\x97" => "\xD7", + "\xC3\x98" => "\xD8", + "\xC3\x99" => "\xD9", + "\xC3\x9A" => "\xDA", + "\xC3\x9B" => "\xDB", + "\xC3\x9C" => "\xDC", + "\xC3\x9D" => "\xDD", + "\xC3\x9E" => "\xDE", + "\xC3\x9F" => "\xDF", + "\xC3\xA0" => "\xE0", + "\xC3\xA1" => "\xE1", + "\xC3\xA2" => "\xE2", + "\xC3\xA3" => "\xE3", + "\xC3\xA4" => "\xE4", + "\xC3\xA5" => "\xE5", + "\xC3\xA6" => "\xE6", + "\xC3\xA7" => "\xE7", + "\xC3\xA8" => "\xE8", + "\xC3\xA9" => "\xE9", + "\xC3\xAA" => "\xEA", + "\xC3\xAB" => "\xEB", + "\xC3\xAC" => "\xEC", + "\xC3\xAD" => "\xED", + "\xC3\xAE" => "\xEE", + "\xC3\xAF" => "\xEF", + "\xC3\xB0" => "\xF0", + "\xC3\xB1" => "\xF1", + "\xC3\xB2" => "\xF2", + "\xC3\xB3" => "\xF3", + "\xC3\xB4" => "\xF4", + "\xC3\xB5" => "\xF5", + "\xC3\xB6" => "\xF6", + "\xC3\xB7" => "\xF7", + "\xC3\xB8" => "\xF8", + "\xC3\xB9" => "\xF9", + "\xC3\xBA" => "\xFA", + "\xC3\xBB" => "\xFB", + "\xC3\xBC" => "\xFC", + "\xC3\xBD" => "\xFD", + "\xC3\xBE" => "\xFE", + "\xC3\xBF" => "\xFF" + ); + return strtr($string, $transform); +} + ?> \ No newline at end of file diff --git a/phpBB/includes/utf/utf_normalizer.php b/phpBB/includes/utf/utf_normalizer.php index 542c1aeeb8..c1a0fc9a7b 100644 --- a/phpBB/includes/utf/utf_normalizer.php +++ b/phpBB/includes/utf/utf_normalizer.php @@ -230,8 +230,8 @@ class utf_normalizer // Load some commonly-used tables if (!isset($utf_jamo_index, $utf_jamo_type, $utf_combining_class)) { - global $phpbb_root_path; - include($phpbb_root_path . 'includes/utf/data/utf_normalizer_common.php'); + global $phpbb_root_path, $phpEx; + include($phpbb_root_path . 'includes/utf/data/utf_normalizer_common.' . $phpEx); } // Buffer the last ASCII char before the UTF-8 stuff if applicable @@ -920,12 +920,13 @@ class utf_normalizer */ function decompose($str, $pos, $len, &$decomp_map) { - global $utf_combining_class, $phpbb_root_path; + global $utf_combining_class; // Load some commonly-used tables if (!isset($utf_combining_class)) { - include($phpbb_root_path . 'includes/utf/data/utf_normalizer_common.php'); + global $phpbb_root_path, $phpEx; + include($phpbb_root_path . 'includes/utf/data/utf_normalizer_common.' . $phpEx); } // UTF char length array diff --git a/phpBB/includes/utf/utf_tools.php b/phpBB/includes/utf/utf_tools.php index f9558c12b4..f6ed6c3ed5 100644 --- a/phpBB/includes/utf/utf_tools.php +++ b/phpBB/includes/utf/utf_tools.php @@ -6,6 +6,9 @@ * @copyright (c) 2006 phpBB Group * @license http://opensource.org/licenses/gpl-license.php GNU Public License * +* @todo make sure the replacements are called correctly +* already done: strtolower, strtoupper, ucfirst, str_split, strrpos, strlen (hopefully!), strpos, substr, htmlspecialchars +* remaining: strspn, chr, ord */ /** @@ -113,7 +116,7 @@ if (extension_loaded('mbstring')) * Notes: * - offset for mb_strrpos was added in 5.2.0, we emulate if it is lower */ - if (version_compare(phpversion(), '5.2.0', '>=')) + if (version_compare(PHP_VERSION, '5.2.0', '>=')) { /** * UTF-8 aware alternative to strrpos @@ -160,7 +163,7 @@ if (extension_loaded('mbstring')) { if (!is_int($offset)) { - trigger_error('utf8_strrpos expects parameter 3 to be long', E_USER_WARNING); + trigger_error('utf8_strrpos expects parameter 3 to be long', E_USER_ERROR); return false; } @@ -267,7 +270,7 @@ else { if (!is_int($offset)) { - trigger_error('utf8_strrpos expects parameter 3 to be long', E_USER_WARNING); + trigger_error('utf8_strrpos expects parameter 3 to be long', E_USER_ERROR); return false; } @@ -307,7 +310,7 @@ else { if (!is_int($offset)) { - trigger_error('utf8_strpos: Offset must be an integer', E_USER_ERROR); + trigger_error('utf8_strpos: Offset must be an integer', E_USER_ERROR); return false; } @@ -580,7 +583,7 @@ else $ly = (-$length) % 65535; // negative length requires ... capture everything - // except a group of -length characters + // except a group of -length characters // anchored at the tail-end of the string if ($lx) { @@ -638,8 +641,8 @@ function utf8_str_split($str, $split_len = 1) } /** -* UTF-8 aware alternative to strcspn -* Find length of initial segment not matching mask +* UTF-8 aware alternative to strspn +* Find length of initial segment matching the mask * * @author Harry Fuecks */ @@ -700,15 +703,15 @@ function utf8_recode($string, $encoding) { $encoding = strtolower($encoding); - if ($encoding == 'utf-8' || !is_string($string) || !isset($string[0])) + if ($encoding == 'utf-8' || !is_string($string) || empty($string)) { return $string; } - // start with something simple + // we force iso-8859-1 to be cp1252 if ($encoding == 'iso-8859-1') { - return utf8_encode($string); + $encoding = 'cp1252'; } // First, try iconv() @@ -716,7 +719,7 @@ function utf8_recode($string, $encoding) { $ret = @iconv($encoding, 'utf-8', $string); - if (isset($ret[0])) + if (!empty($ret)) { return $ret; } @@ -725,11 +728,28 @@ function utf8_recode($string, $encoding) // Try the mb_string extension if (function_exists('mb_convert_encoding')) { - $ret = @mb_convert_encoding($string, 'utf-8', $encoding); - - if (isset($ret[0])) + // mbstring is nasty on PHP4, we must make *sure* that we send a good encoding + switch ($encoding) { - return $ret; + case 'iso-8859-1': + case 'iso-8859-2': + case 'iso-8859-4': + case 'iso-8859-7': + case 'iso-8859-9': + case 'iso-8859-15': + case 'windows-1251': + case 'windows-1252': + case 'cp1252': + case 'shift_jis': + case 'euc-kr': + case 'big5': + case 'gb2312': + $ret = @mb_convert_encoding($string, 'utf-8', $encoding); + + if (!empty($ret)) + { + return $ret; + } } } @@ -738,7 +758,7 @@ function utf8_recode($string, $encoding) { $ret = @recode_string($encoding . '..utf-8', $string); - if (isset($ret[0])) + if (!empty($ret)) { return $ret; } @@ -790,6 +810,7 @@ function utf8_recode($string, $encoding) break; case '1250': case '1251': + case '1252': case '1254': case '1255': case '1256': @@ -912,7 +933,7 @@ function utf8_encode_ncr_callback($m) } /** -* Enter description here... +* Converts a UTF-8 char to an NCR * * @param string $chr UTF-8 char * @return integer UNICODE code point diff --git a/phpBB/index.php b/phpBB/index.php index 6d24ac8e5d..209bcfc2bd 100644 --- a/phpBB/index.php +++ b/phpBB/index.php @@ -36,23 +36,41 @@ $l_total_post_s = ($total_posts == 0) ? 'TOTAL_POSTS_ZERO' : 'TOTAL_POSTS_OTHER' $l_total_topic_s = ($total_topics == 0) ? 'TOTAL_TOPICS_ZERO' : 'TOTAL_TOPICS_OTHER'; // Grab group details for legend display -$sql = 'SELECT group_id, group_name, group_colour, group_type - FROM ' . GROUPS_TABLE . ' - WHERE group_legend = 1 - AND group_type <> ' . GROUP_HIDDEN . ' - ORDER BY group_name ASC'; +if ($auth->acl_gets('a_group', 'a_groupadd', 'a_groupdel')) +{ + $sql = 'SELECT group_id, group_name, group_colour, group_type + FROM ' . GROUPS_TABLE . ' + WHERE group_legend = 1 + ORDER BY group_name ASC'; +} +else +{ + $sql = 'SELECT g.group_id, g.group_name, g.group_colour, g.group_type + FROM ' . GROUPS_TABLE . ' g + LEFT JOIN ' . USER_GROUP_TABLE . ' ug + ON ( + g.group_id = ug.group_id + AND ug.user_id = ' . $user->data['user_id'] . ' + AND ug.user_pending = 0 + ) + WHERE g.group_legend = 1 + AND (g.group_type <> ' . GROUP_HIDDEN . ' OR ug.user_id = ' . $user->data['user_id'] . ') + ORDER BY g.group_name ASC'; +} $result = $db->sql_query($sql); $legend = ''; while ($row = $db->sql_fetchrow($result)) { + $colour_text = ($row['group_colour']) ? ' style="color:#' . $row['group_colour'] . '"' : ''; + if ($row['group_name'] == 'BOTS') { - $legend .= (($legend != '') ? ', ' : '') . '' . $user->lang['G_BOTS'] . ''; + $legend .= (($legend != '') ? ', ' : '') . '' . $user->lang['G_BOTS'] . ''; } else { - $legend .= (($legend != '') ? ', ' : '') . '' . (($row['group_type'] == GROUP_SPECIAL) ? $user->lang['G_' . $row['group_name']] : $row['group_name']) . ''; + $legend .= (($legend != '') ? ', ' : '') . '' . (($row['group_type'] == GROUP_SPECIAL) ? $user->lang['G_' . $row['group_name']] : $row['group_name']) . ''; } } $db->sql_freeresult($result); @@ -86,7 +104,7 @@ $template->assign_vars(array( 'TOTAL_POSTS' => sprintf($user->lang[$l_total_post_s], $total_posts), 'TOTAL_TOPICS' => sprintf($user->lang[$l_total_topic_s], $total_topics), 'TOTAL_USERS' => sprintf($user->lang[$l_total_user_s], $total_users), - 'NEWEST_USER' => sprintf($user->lang['NEWEST_USER'], '', $newest_user, ''), + 'NEWEST_USER' => sprintf($user->lang['NEWEST_USER'], '', $newest_user, ''), 'LEGEND' => $legend, 'BIRTHDAY_LIST' => $birthday_list, diff --git a/phpBB/install/convertors/convert_phpbb20.php b/phpBB/install/convertors/convert_phpbb20.php index 14fde80478..14ad45004d 100644 --- a/phpBB/install/convertors/convert_phpbb20.php +++ b/phpBB/install/convertors/convert_phpbb20.php @@ -22,18 +22,27 @@ if (!defined('IN_PHPBB')) exit; } +include($phpbb_root_path . 'config.' . $phpEx); +unset($dbpasswd); + /** * $convertor_data provides some basic information about this convertor which is * used on the initial list of convertors and to populate the default settings */ $convertor_data = array( 'forum_name' => 'phpBB 2.0.x', - 'version' => '0.9', + 'version' => '0.92', 'phpbb_version' => '3.0.0', 'author' => 'phpBB Group', + 'dbms' => $dbms, + 'dbhost' => $dbhost, + 'dbport' => $dbport, + 'dbuser' => $dbuser, + 'dbpasswd' => '', + 'dbname' => $dbname, 'table_prefix' => 'phpbb_', 'forum_path' => '../forums', - 'author_notes' => 'Avatars may be on a different width/height than with the old forum. This is due to dimensions being stored within phpBB3 but not within phpBB2. The default dimension was set to 80x80 for avatars where dimension settings could not be determined. You might wish to instruct your users to check their profiles after the conversion to ensure that the size is correct.', + 'author_notes' => '', ); /** @@ -94,10 +103,10 @@ $config_schema = array( 'allow_avatar_remote' => 'allow_avatar_remote', 'allow_avatar_upload' => 'allow_avatar_upload', 'board_disable' => 'board_disable', - 'sitename' => 'sitename', - 'site_desc' => 'site_desc', + 'sitename' => 'phpbb_set_encoding(sitename)', + 'site_desc' => 'phpbb_set_encoding(site_desc)', 'session_length' => 'session_length', - 'board_email_sig' => 'board_email_sig', + 'board_email_sig' => 'phpbb_set_encoding(board_email_sig)', 'posts_per_page' => 'posts_per_page', 'topics_per_page' => 'topics_per_page', 'enable_confirm' => 'enable_confirm', @@ -143,27 +152,27 @@ if (!$get_info) { // Test to see if the birthday MOD is installed on the source forum // Niels' birthday mod - if (get_config_value('birthday_required') !== false || get_config_value('bday_required') !== false) + if (get_config_value('birthday_required') !== false || get_config_value('bday_require') !== false) { define('MOD_BIRTHDAY', true); } // TerraFrost's validated birthday mod - if (get_config_value('bday_required') !== false) + if (get_config_value('bday_require') !== false) { define('MOD_BIRTHDAY_TERRA', true); } // Test to see if the attachment MOD is installed on the source forum // If it is, we will convert this data as well - $db->sql_return_on_error(true); + $src_db->sql_return_on_error(true); $sql = "SELECT config_value FROM {$convert->src_table_prefix}attachments_config WHERE config_name = 'upload_dir'"; - $result = $db->sql_query($sql); + $result = $src_db->sql_query($sql); - if ($result && $row = $db->sql_fetchrow($result)) + if ($result && $row = $src_db->sql_fetchrow($result)) { // Here the constant is defined define('MOD_ATTACHMENT', true); @@ -175,42 +184,53 @@ if (!$get_info) 'extensions', 'extension_groups' ); - - $db->sql_freeresult($result); } + $src_db->sql_freeresult($result); /** * Tests for further MODs can be included here. * Please use constants for this, prefixing them with MOD_ */ - $db->sql_return_on_error(false); + $src_db->sql_return_on_error(false); // Now let us set a temporary config variable for user id incrementing $sql = "SELECT user_id FROM {$convert->src_table_prefix}users WHERE user_id = 1"; - $result = $db->sql_query($sql); - $user_id = (int) $db->sql_fetchfield('user_id'); - $db->sql_freeresult($result); + $result = $src_db->sql_query($sql); + $user_id = (int) $src_db->sql_fetchfield('user_id'); + $src_db->sql_freeresult($result); // If there is a user id 1, we need to increment user ids. :/ if ($user_id === 1) { - set_config('increment_user_id', 1, true); + // Try to get the maximum user id possible... + $sql = "SELECT MAX(user_id) AS max_user_id + FROM {$convert->src_table_prefix}users"; + $result = $src_db->sql_query($sql); + $user_id = (int) $src_db->sql_fetchfield('max_user_id'); + $src_db->sql_freeresult($result); + + set_config('increment_user_id', ($user_id + 1), true); } else { set_config('increment_user_id', 0, true); } + // Overwrite maximum avatar width/height + @define('DEFAULT_AVATAR_X_CUSTOM', get_config_value('avatar_max_width')); + @define('DEFAULT_AVATAR_Y_CUSTOM', get_config_value('avatar_max_height')); + /** * Description on how to use the convertor framework. * * 'schema' Syntax Description * -> 'target' => Target Table. If not specified the next table will be handled * -> 'primary' => Primary Key. If this is specified then this table is processed in batches -* -> 'query_first' => Query to execute before beginning the process (if more than one then specified as array) +* -> 'query_first' => array('target' or 'src', Query to execute before beginning the process +* (if more than one then specified as array)) * -> 'function_first' => Function to execute before beginning the process (if more than one then specified as array) * (This is mostly useful if variables need to be given to the converting process) * -> 'test_file' => This is not used at the moment but should be filled with a file from the old installation @@ -276,17 +296,21 @@ if (!$get_info) // We empty some tables to have clean data available 'query_first' => array( - $convert->truncate_statement . SEARCH_RESULTS_TABLE, - $convert->truncate_statement . SEARCH_WORDLIST_TABLE, - $convert->truncate_statement . SEARCH_WORDMATCH_TABLE, - $convert->truncate_statement . LOG_TABLE, + array('target', $convert->truncate_statement . SEARCH_RESULTS_TABLE), + array('target', $convert->truncate_statement . SEARCH_WORDLIST_TABLE), + array('target', $convert->truncate_statement . SEARCH_WORDMATCH_TABLE), + array('target', $convert->truncate_statement . LOG_TABLE), ), // with this you are able to import all attachment files on the fly. For large boards this is not an option, therefore commented out by default. // Instead every file gets copied while processing the corresponding attachment entry. // if (defined("MOD_ATTACHMENT")) { import_attachment_files(); phpbb_copy_thumbnails(); } + // phpBB2 allowed some similar usernames to coexist which would have the same + // username_clean in phpBB3 which is not possible, so we'll give the admin a list + // of user ids and usernames and let him deicde what he wants to do with them 'execute_first' => ' + phpbb_check_username_collisions(); import_avatar_gallery(); if (defined("MOD_ATTACHMENT")) phpbb_import_attach_config(); phpbb_insert_forums(); @@ -313,7 +337,8 @@ if (!$get_info) array( 'target' => (defined('MOD_ATTACHMENT')) ? ATTACHMENTS_TABLE : '', 'primary' => 'attachments.attach_id', - 'query_first' => (defined('MOD_ATTACHMENT')) ? $convert->truncate_statement . ATTACHMENTS_TABLE : '', + 'query_first' => (defined('MOD_ATTACHMENT')) ? array('target', $convert->truncate_statement . ATTACHMENTS_TABLE) : '', + 'autoincrement' => 'attach_id', array('attach_id', 'attachments.attach_id', ''), array('post_msg_id', 'attachments.post_id', ''), @@ -322,7 +347,7 @@ if (!$get_info) array('is_orphan', 0, ''), array('poster_id', 'attachments.user_id_1 AS poster_id', 'phpbb_user_id'), array('physical_filename', 'attachments_desc.physical_filename', 'import_attachment'), - array('real_filename', 'attachments_desc.real_filename', ''), + array('real_filename', 'attachments_desc.real_filename', 'phpbb_set_encoding'), array('download_count', 'attachments_desc.download_count', ''), array('attach_comment', 'attachments_desc.comment', array('function1' => 'phpbb_set_encoding', 'function2' => 'utf8_htmlspecialchars')), array('extension', 'attachments_desc.extension', ''), @@ -338,6 +363,7 @@ if (!$get_info) array( 'target' => (defined('MOD_ATTACHMENT')) ? ATTACHMENTS_TABLE : '', 'primary' => 'attachments.attach_id', + 'autoincrement' => 'attach_id', array('attach_id', 'attachments.attach_id', ''), array('post_msg_id', 'attachments.privmsgs_id', ''), @@ -361,7 +387,8 @@ if (!$get_info) array( 'target' => (defined('MOD_ATTACHMENT')) ? EXTENSIONS_TABLE : '', - 'query_first' => (defined('MOD_ATTACHMENT')) ? $convert->truncate_statement . EXTENSIONS_TABLE : '', + 'query_first' => (defined('MOD_ATTACHMENT')) ? array('target', $convert->truncate_statement . EXTENSIONS_TABLE) : '', + 'autoincrement' => 'extension_id', array('extension_id', 'extensions.ext_id', ''), array('group_id', 'extensions.group_id', ''), @@ -370,7 +397,8 @@ if (!$get_info) array( 'target' => (defined('MOD_ATTACHMENT')) ? EXTENSION_GROUPS_TABLE : '', - 'query_first' => (defined('MOD_ATTACHMENT')) ? $convert->truncate_statement . EXTENSION_GROUPS_TABLE : '', + 'query_first' => (defined('MOD_ATTACHMENT')) ? array('target', $convert->truncate_statement . EXTENSION_GROUPS_TABLE) : '', + 'autoincrement' => 'group_id', array('group_id', 'extension_groups.group_id', ''), array('group_name', 'extension_groups.group_name', array('function1' => 'phpbb_set_encoding', 'function2' => 'utf8_htmlspecialchars')), @@ -385,11 +413,13 @@ if (!$get_info) array( 'target' => BANLIST_TABLE, - 'query_first' => $convert->truncate_statement . BANLIST_TABLE, + 'query_first' => array('target', $convert->truncate_statement . BANLIST_TABLE), array('ban_ip', 'banlist.ban_ip', 'decode_ban_ip'), array('ban_userid', 'banlist.ban_userid', 'phpbb_user_id'), array('ban_email', 'banlist.ban_email', ''), + array('ban_reason', '', ''), + array('ban_give_reason', '', ''), 'where' => "banlist.ban_ip NOT LIKE '%.%'", ), @@ -398,25 +428,28 @@ if (!$get_info) 'target' => BANLIST_TABLE, array('ban_ip', 'banlist.ban_ip', ''), - array('ban_userid', '0', ''), + array('ban_userid', 0, ''), array('ban_email', '', ''), + array('ban_reason', '', ''), + array('ban_give_reason', '', ''), 'where' => "banlist.ban_ip LIKE '%.%'", ), array( 'target' => DISALLOW_TABLE, - 'query_first' => $convert->truncate_statement . DISALLOW_TABLE, + 'query_first' => array('target', $convert->truncate_statement . DISALLOW_TABLE), - array('disallow_username', 'disallow.disallow_username', 'phpbb_set_encoding'), + array('disallow_username', 'disallow.disallow_username', 'phpbb_disallowed_username'), ), array( 'target' => RANKS_TABLE, - 'query_first' => $convert->truncate_statement . RANKS_TABLE, + 'query_first' => array('target', $convert->truncate_statement . RANKS_TABLE), + 'autoincrement' => 'rank_id', array('rank_id', 'ranks.rank_id', ''), - array('rank_title', 'ranks.rank_title', array('function1' => 'phpbb_set_encoding', 'function2' => 'utf8_htmlspecialchars')), + array('rank_title', 'ranks.rank_title', array('function1' => 'phpbb_set_default_encoding', 'function2' => 'utf8_htmlspecialchars')), array('rank_min', 'ranks.rank_min', array('typecast' => 'int', 'execute' => '{RESULT} = ({VALUE}[0] < 0) ? 0 : {VALUE}[0];')), array('rank_special', 'ranks.rank_special', ''), array('rank_image', 'ranks.rank_image', 'import_rank'), @@ -424,8 +457,9 @@ if (!$get_info) array( 'target' => TOPICS_TABLE, - 'query_first' => $convert->truncate_statement . TOPICS_TABLE, + 'query_first' => array('target', $convert->truncate_statement . TOPICS_TABLE), 'primary' => 'topics.topic_id', + 'autoincrement' => 'topic_id', array('topic_id', 'topics.topic_id', ''), array('forum_id', 'topics.forum_id', ''), @@ -456,6 +490,7 @@ if (!$get_info) array( 'target' => TOPICS_TABLE, 'primary' => 'topics.topic_id', + 'autoincrement' => 'topic_id', array('topic_id', 'topics.topic_id', ''), array('forum_id', 'topics.forum_id', ''), @@ -486,7 +521,7 @@ if (!$get_info) array( 'target' => TOPICS_WATCH_TABLE, 'primary' => 'topics_watch.topic_id', - 'query_first' => $convert->truncate_statement . TOPICS_WATCH_TABLE, + 'query_first' => array('target', $convert->truncate_statement . TOPICS_WATCH_TABLE), array('topic_id', 'topics_watch.topic_id', ''), array('user_id', 'topics_watch.user_id', 'phpbb_user_id'), @@ -495,7 +530,8 @@ if (!$get_info) array( 'target' => SMILIES_TABLE, - 'query_first' => $convert->truncate_statement . SMILIES_TABLE, + 'query_first' => array('target', $convert->truncate_statement . SMILIES_TABLE), + 'autoincrement' => 'smiley_id', array('smiley_id', 'smilies.smilies_id', ''), array('code', 'smilies.code', 'phpbb_set_encoding'), @@ -514,7 +550,7 @@ if (!$get_info) array( 'target' => POLL_OPTIONS_TABLE, 'primary' => 'vote_results.vote_option_id', - 'query_first' => $convert->truncate_statement . POLL_OPTIONS_TABLE, + 'query_first' => array('target', $convert->truncate_statement . POLL_OPTIONS_TABLE), array('poll_option_id', 'vote_results.vote_option_id', ''), array('topic_id', 'vote_desc.topic_id', ''), @@ -529,7 +565,7 @@ if (!$get_info) array( 'target' => POLL_VOTES_TABLE, 'primary' => 'vote_desc.topic_id', - 'query_first' => $convert->truncate_statement . POLL_VOTES_TABLE, + 'query_first' => array('target', $convert->truncate_statement . POLL_VOTES_TABLE), array('poll_option_id', 1, ''), array('topic_id', 'vote_desc.topic_id', ''), @@ -542,7 +578,8 @@ if (!$get_info) array( 'target' => WORDS_TABLE, 'primary' => 'words.word_id', - 'query_first' => $convert->truncate_statement . WORDS_TABLE, + 'query_first' => array('target', $convert->truncate_statement . WORDS_TABLE), + 'autoincrement' => 'word_id', array('word_id', 'words.word_id', ''), array('word', 'words.word', 'phpbb_set_encoding'), @@ -552,9 +589,11 @@ if (!$get_info) array( 'target' => POSTS_TABLE, 'primary' => 'posts.post_id', - 'query_first' => $convert->truncate_statement . POSTS_TABLE, + 'autoincrement' => 'post_id', + 'query_first' => array('target', $convert->truncate_statement . POSTS_TABLE), 'execute_first' => ' - $config["max_post_chars"] = 0; + $config["max_post_chars"] = -1; + $config["max_quote_depth"] = 0; ', array('post_id', 'posts.post_id', ''), @@ -595,13 +634,15 @@ if (!$get_info) array( 'target' => PRIVMSGS_TABLE, 'primary' => 'privmsgs.privmsgs_id', + 'autoincrement' => 'msg_id', 'query_first' => array( - $convert->truncate_statement . PRIVMSGS_TABLE, - $convert->truncate_statement . PRIVMSGS_RULES_TABLE, + array('target', $convert->truncate_statement . PRIVMSGS_TABLE), + array('target', $convert->truncate_statement . PRIVMSGS_RULES_TABLE), ), 'execute_first' => ' - $config["max_post_chars"] = 0; + $config["max_post_chars"] = -1; + $config["max_quote_depth"] = 0; ', array('msg_id', 'privmsgs.privmsgs_id', ''), @@ -615,7 +656,7 @@ if (!$get_info) array('enable_smilies', 'privmsgs.privmsgs_enable_smilies AS enable_smilies', ''), array('enable_magic_url', 1, ''), array('enable_sig', 'privmsgs.privmsgs_attach_sig', ''), - array('message_subject', 'privmsgs.privmsgs_subject', array('function1' => 'phpbb_set_encoding', 'function2' => 'utf8_htmlspecialchars')), + array('message_subject', 'privmsgs.privmsgs_subject', 'phpbb_set_encoding'), // Already specialchared in 2.0.x array('message_attachment', ((defined('MOD_ATTACHMENT')) ? 'privmsgs.privmsgs_attachment' : 0), ''), array('message_edit_reason', '', ''), array('message_edit_user', 0, ''), @@ -627,6 +668,7 @@ if (!$get_info) array('', 'privmsgs_text.privmsgs_bbcode_uid AS old_bbcode_uid', ''), array('bbcode_bitfield', '', 'get_bbcode_bitfield'), array('to_address', 'privmsgs.privmsgs_to_userid', 'phpbb_privmsgs_to_userid'), + array('bcc_address', '', ''), 'where' => 'privmsgs.privmsgs_id = privmsgs_text.privmsgs_text_id' ), @@ -634,7 +676,7 @@ if (!$get_info) array( 'target' => PRIVMSGS_FOLDER_TABLE, 'primary' => 'users.user_id', - 'query_first' => $convert->truncate_statement . PRIVMSGS_FOLDER_TABLE, + 'query_first' => array('target', $convert->truncate_statement . PRIVMSGS_FOLDER_TABLE), array('user_id', 'users.user_id', 'phpbb_user_id'), array('folder_name', $user->lang['CONV_SAVED_MESSAGES'], ''), @@ -647,7 +689,7 @@ if (!$get_info) array( 'target' => PRIVMSGS_TO_TABLE, 'primary' => 'privmsgs.privmsgs_id', - 'query_first' => $convert->truncate_statement . PRIVMSGS_TO_TABLE, + 'query_first' => array('target', $convert->truncate_statement . PRIVMSGS_TO_TABLE), array('msg_id', 'privmsgs.privmsgs_id', ''), array('user_id', 'privmsgs.privmsgs_to_userid', 'phpbb_user_id'), @@ -741,11 +783,13 @@ if (!$get_info) array( 'target' => GROUPS_TABLE, - 'query_first' => $convert->truncate_statement . GROUPS_TABLE, + 'autoincrement' => 'group_id', + 'query_first' => array('target', $convert->truncate_statement . GROUPS_TABLE), array('group_id', 'groups.group_id', ''), array('group_type', 'groups.group_type', 'phpbb_convert_group_type'), array('group_display', 0, ''), + array('group_legend', 0, ''), array('group_name', 'groups.group_name', 'phpbb_convert_group_name'), // phpbb_set_encoding called in phpbb_convert_group_name array('group_desc', 'groups.group_description', 'phpbb_set_encoding'), @@ -754,7 +798,7 @@ if (!$get_info) array( 'target' => USER_GROUP_TABLE, - 'query_first' => $convert->truncate_statement . USER_GROUP_TABLE, + 'query_first' => array('target', $convert->truncate_statement . USER_GROUP_TABLE), 'execute_first' => ' add_default_groups(); ', @@ -781,11 +825,16 @@ if (!$get_info) array( 'target' => USERS_TABLE, 'primary' => 'users.user_id', + 'autoincrement' => 'user_id', 'query_first' => array( - 'DELETE FROM ' . USERS_TABLE . ' WHERE user_id <> ' . ANONYMOUS, - $convert->truncate_statement . BOTS_TABLE + array('target', 'DELETE FROM ' . USERS_TABLE . ' WHERE user_id <> ' . ANONYMOUS), + array('target', $convert->truncate_statement . BOTS_TABLE) ), - + + 'execute_last' => ' + remove_invalid_users(); + ', + array('user_id', 'users.user_id', 'phpbb_user_id'), array('', 'users.user_id AS poster_id', 'phpbb_user_id'), array('user_type', 'users.user_active', 'set_user_type'), @@ -800,6 +849,7 @@ if (!$get_info) array('user_email_hash', 'users.user_email', 'gen_email_hash'), array('user_birthday', ((defined('MOD_BIRTHDAY')) ? 'users.user_birthday' : ''), 'phpbb_get_birthday'), array('user_lastvisit', 'users.user_lastvisit', ''), + array('user_lastmark', 'users.user_lastvisit', ''), array('user_lang', $config['default_lang'], ''), array('', 'users.user_lang', ''), array('user_timezone', 'users.user_timezone', ''), @@ -807,22 +857,22 @@ if (!$get_info) array('user_inactive_reason', '', 'phpbb_inactive_reason'), array('user_inactive_time', '', 'phpbb_inactive_time'), - array('user_interests', 'users.user_interests', array('function1' => 'phpbb_set_encoding', 'function2' => 'utf8_htmlspecialchars')), - array('user_occ', 'users.user_occ', array('function1' => 'phpbb_set_encoding', 'function2' => 'utf8_htmlspecialchars')), + array('user_interests', 'users.user_interests', array('function1' => 'phpbb_set_encoding')), + array('user_occ', 'users.user_occ', array('function1' => 'phpbb_set_encoding')), array('user_website', 'users.user_website', 'validate_website'), array('user_jabber', '', ''), array('user_msnm', 'users.user_msnm', ''), array('user_yim', 'users.user_yim', ''), array('user_aim', 'users.user_aim', ''), array('user_icq', 'users.user_icq', ''), - array('user_from', 'users.user_from', array('function1' => 'phpbb_set_encoding', 'function2' => 'utf8_htmlspecialchars')), + array('user_from', 'users.user_from', array('function1' => 'phpbb_set_encoding')), array('user_rank', 'users.user_rank', ''), array('user_permissions', '', ''), array('user_avatar', 'users.user_avatar', 'phpbb_import_avatar'), array('user_avatar_type', 'users.user_avatar_type', 'phpbb_avatar_type'), - array('user_avatar_width', 'users.user_avatar', 'get_avatar_width'), - array('user_avatar_height', 'users.user_avatar', 'get_avatar_height'), + array('user_avatar_width', 'users.user_avatar', 'phpbb_get_avatar_width'), + array('user_avatar_height', 'users.user_avatar', 'phpbb_get_avatar_height'), array('user_new_privmsg', 'users.user_new_privmsg', ''), array('user_unread_privmsg', 0, ''), //'users.user_unread_privmsg' @@ -835,7 +885,8 @@ if (!$get_info) array('user_allow_viewonline', 'users.user_allow_viewonline', ''), array('user_allow_viewemail', 'users.user_viewemail', ''), array('user_actkey', 'users.user_actkey', ''), - array('user_newpasswd', 'users.user_newpasswd', ''), + array('user_newpasswd', '', ''), // Users need to re-request their password... + array('user_style', $config['default_style'], ''), array('user_options', '', 'set_user_options'), array('', 'users.user_popup_pm AS popuppm', ''), diff --git a/phpBB/install/convertors/functions_phpbb20.php b/phpBB/install/convertors/functions_phpbb20.php index 05daae473b..6788ecd900 100644 --- a/phpBB/install/convertors/functions_phpbb20.php +++ b/phpBB/install/convertors/functions_phpbb20.php @@ -46,16 +46,16 @@ function phpbb_forum_flags() */ function phpbb_insert_forums() { - global $db, $convert, $user, $config; + global $db, $src_db, $same_db, $convert, $user, $config; $db->sql_query($convert->truncate_statement . FORUMS_TABLE); // Determine the highest id used within the old forums table (we add the categories after the forum ids) $sql = 'SELECT MAX(forum_id) AS max_forum_id FROM ' . $convert->src_table_prefix . 'forums'; - $result = $db->sql_query($sql); - $max_forum_id = (int) $db->sql_fetchfield('max_forum_id'); - $db->sql_freeresult($result); + $result = $src_db->sql_query($sql); + $max_forum_id = (int) $src_db->sql_fetchfield('max_forum_id'); + $src_db->sql_freeresult($result); $max_forum_id++; @@ -64,24 +64,32 @@ function phpbb_insert_forums() FROM ' . $convert->src_table_prefix . 'categories ORDER BY cat_order'; - if ($convert->mysql_convert) + if ($convert->mysql_convert && $same_db) { - $db->sql_query("SET NAMES 'binary'"); + $src_db->sql_query("SET NAMES 'binary'"); } - $result = $db->sql_query($sql); + $result = $src_db->sql_query($sql); - if ($convert->mysql_convert) + if ($convert->mysql_convert && $same_db) { - $db->sql_query("SET NAMES 'utf8'"); + $src_db->sql_query("SET NAMES 'utf8'"); + } + + switch ($db->sql_layer) + { + case 'mssql': + case 'mssql_odbc': + $db->sql_query('SET IDENTITY_INSERT ' . FORUMS_TABLE . ' ON'); + break; } $cats_added = array(); - while ($row = $db->sql_fetchrow($result)) + while ($row = $src_db->sql_fetchrow($result)) { $sql_ary = array( 'forum_id' => $max_forum_id, - 'forum_name' => ($row['cat_title']) ? htmlspecialchars(phpbb_set_encoding($row['cat_title'], false), ENT_COMPAT, 'UTF-8') : $user->lang['CATEGORY'], + 'forum_name' => ($row['cat_title']) ? htmlspecialchars(phpbb_set_default_encoding($row['cat_title']), ENT_COMPAT, 'UTF-8') : $user->lang['CATEGORY'], 'parent_id' => 0, 'forum_parents' => '', 'forum_desc' => '', @@ -105,17 +113,17 @@ function phpbb_insert_forums() $cats_added[$row['cat_id']] = $max_forum_id; $max_forum_id++; } - $db->sql_freeresult($result); + $src_db->sql_freeresult($result); // There may be installations having forums with non-existant category ids. // We try to catch them and add them to an "unknown" category instead of leaving them out. $sql = 'SELECT cat_id FROM ' . $convert->src_table_prefix . 'forums GROUP BY cat_id'; - $result = $db->sql_query($sql); + $result = $src_db->sql_query($sql); $unknown_cat_id = false; - while ($row = $db->sql_fetchrow($result)) + while ($row = $src_db->sql_fetchrow($result)) { // Catch those categories not been added before if (!isset($cats_added[$row['cat_id']])) @@ -123,7 +131,7 @@ function phpbb_insert_forums() $unknown_cat_id = true; } } - $db->sql_freeresult($result); + $src_db->sql_freeresult($result); // Is there at least one category not known? if ($unknown_cat_id === true) @@ -158,24 +166,24 @@ function phpbb_insert_forums() } // Now insert the forums - $sql = 'SELECT f.*, fp.prune_days, fp.prune_freq FROM ' . $convert->src_table_prefix . 'forums f + $sql = 'SELECT f.forum_id, f.forum_name, f.cat_id, f.forum_desc, f.forum_status, f.prune_enable, f.prune_next, fp.prune_days, fp.prune_freq FROM ' . $convert->src_table_prefix . 'forums f LEFT JOIN ' . $convert->src_table_prefix . 'forum_prune fp ON f.forum_id = fp.forum_id - GROUP BY f.forum_id + GROUP BY f.forum_id, f.forum_name, f.cat_id, f.forum_desc, f.forum_status, f.prune_enable, f.prune_next, f.forum_order, fp.prune_days, fp.prune_freq ORDER BY f.cat_id, f.forum_order'; - if ($convert->mysql_convert) + if ($convert->mysql_convert && $same_db) { - $db->sql_query("SET NAMES 'binary'"); + $src_db->sql_query("SET NAMES 'binary'"); } - $result = $db->sql_query($sql); + $result = $src_db->sql_query($sql); - if ($convert->mysql_convert) + if ($convert->mysql_convert && $same_db) { - $db->sql_query("SET NAMES 'utf8'"); + $src_db->sql_query("SET NAMES 'utf8'"); } - while ($row = $db->sql_fetchrow($result)) + while ($row = $src_db->sql_fetchrow($result)) { // Some might have forums here with an id not being "possible"... // To be somewhat friendly we "change" the category id for those to a previously created ghost category @@ -192,10 +200,10 @@ function phpbb_insert_forums() // Define the new forums sql ary $sql_ary = array( 'forum_id' => (int) $row['forum_id'], - 'forum_name' => htmlspecialchars(phpbb_set_encoding($row['forum_name'], false), ENT_COMPAT, 'UTF-8'), + 'forum_name' => htmlspecialchars(phpbb_set_default_encoding($row['forum_name']), ENT_COMPAT, 'UTF-8'), 'parent_id' => $cats_added[$row['cat_id']], 'forum_parents' => '', - 'forum_desc' => htmlspecialchars(phpbb_set_encoding($row['forum_desc'], false), ENT_COMPAT, 'UTF-8'), + 'forum_desc' => htmlspecialchars(phpbb_set_default_encoding($row['forum_desc']), ENT_COMPAT, 'UTF-8'), 'forum_type' => FORUM_POST, 'forum_status' => is_item_locked($row['forum_status']), 'enable_prune' => $row['prune_enable'], @@ -258,7 +266,15 @@ function phpbb_insert_forums() $sql = 'INSERT INTO ' . FORUMS_TABLE . ' ' . $db->sql_build_array('INSERT', $sql_ary); $db->sql_query($sql); } - $db->sql_freeresult($result); + $src_db->sql_freeresult($result); + + switch ($db->sql_layer) + { + case 'mssql': + case 'mssql_odbc': + $db->sql_query('SET IDENTITY_INSERT ' . FORUMS_TABLE . ' OFF'); + break; + } } /** @@ -326,14 +342,24 @@ function phpbb_set_encoding($text, $grab_user_lang = true) } else if (!empty($convert_row['poster_id'])) { - global $db; + global $src_db, $same_db; + + if ($convert->mysql_convert && $same_db) + { + $src_db->sql_query("SET NAMES 'binary'"); + } $sql = 'SELECT user_lang FROM ' . $convert->src_table_prefix . 'users WHERE user_id = ' . (int) $convert_row['poster_id']; - $result = $db->sql_query($sql); - $get_lang = (string) $db->sql_fetchfield('user_lang'); - $db->sql_freeresult($result); + $result = $src_db->sql_query($sql); + $get_lang = (string) $src_db->sql_fetchfield('user_lang'); + $src_db->sql_freeresult($result); + + if ($convert->mysql_convert && $same_db) + { + $src_db->sql_query("SET NAMES 'utf8'"); + } $get_lang = (!trim($get_lang)) ? trim(get_config_value('default_lang')) : trim($get_lang); } @@ -374,26 +400,29 @@ function phpbb_set_default_encoding($text) */ function phpbb_get_birthday($birthday = '') { - $birthday = (int) $birthday; - if (defined('MOD_BIRTHDAY_TERRA')) { + $birthday = (string) $birthday; + // stored as month, day, year if (!$birthday) { return ' 0- 0- 0'; } - $birthday = (string) $birthday; + // We use the original mod code to retrieve the birthday (not ideal) + preg_match('/(..)(..)(....)/', sprintf('%08d', $birthday), $birthday_parts); - $month = substr($birthday, 0, 2); - $day = substr($birthday, 2, 2); - $year = substr($birthday, -4); + $month = $birthday_parts[1]; + $day = $birthday_parts[2]; + $year = $birthday_parts[3]; return sprintf('%2d-%2d-%4d', $day, $month, $year); } else { + $birthday = (int) $birthday; + if (!$birthday || $birthday == 999999 || $birthday < 0) { return ' 0- 0- 0'; @@ -410,36 +439,43 @@ function phpbb_get_birthday($birthday = '') */ function phpbb_user_id($user_id) { - if (!$user_id) - { - return 0; - } - - if ($user_id == -1) - { - return ANONYMOUS; - } - global $config; // Increment user id if the old forum is having a user with the id 1 if (!isset($config['increment_user_id'])) { - global $db, $convert; + global $src_db, $same_db, $convert; + + if ($convert->mysql_convert && $same_db) + { + $src_db->sql_query("SET NAMES 'binary'"); + } // Now let us set a temporary config variable for user id incrementing $sql = "SELECT user_id FROM {$convert->src_table_prefix}users WHERE user_id = 1"; - $result = $db->sql_query($sql); - $id = (int) $db->sql_fetchfield('user_id'); - $db->sql_freeresult($result); + $result = $src_db->sql_query($sql); + $id = (int) $src_db->sql_fetchfield('user_id'); + $src_db->sql_freeresult($result); + + // Try to get the maximum user id possible... + $sql = "SELECT MAX(user_id) AS max_user_id + FROM {$convert->src_table_prefix}users"; + $result = $src_db->sql_query($sql); + $max_id = (int) $src_db->sql_fetchfield('max_user_id'); + $src_db->sql_freeresult($result); + + if ($convert->mysql_convert && $same_db) + { + $src_db->sql_query("SET NAMES 'utf8'"); + } // If there is a user id 1, we need to increment user ids. :/ if ($id === 1) { - set_config('increment_user_id', 1, true); - $config['increment_user_id'] = 1; + set_config('increment_user_id', ($max_id + 1), true); + $config['increment_user_id'] = $max_id + 1; } else { @@ -448,12 +484,23 @@ function phpbb_user_id($user_id) } } - if (!empty($config['increment_user_id'])) + // If the old user id is -1 in 2.0.x it is the anonymous user... + if ($user_id == -1) { - $user_id++; + return ANONYMOUS; } - return $user_id; + if (!empty($config['increment_user_id']) && $user_id == 1) + { + return $config['increment_user_id']; + } + + // A user id of 0 can happen, for example within the ban table if no user is banned... + // Within the posts and topics table this can be "dangerous" but is the fault of the user + // having mods installed (a poster id of 0 is not possible in 2.0.x). + // Therefore, we return the user id "as is". + + return (int) $user_id; } /* Copy additional table fields from old forum to new forum if user wants this (for Mod compatibility for example) @@ -468,77 +515,92 @@ function phpbb_copy_table_fields() */ function phpbb_convert_authentication($mode) { - global $db, $convert, $user, $config, $cache; + global $db, $src_db, $same_db, $convert, $user, $config, $cache; if ($mode == 'start') { $db->sql_query($convert->truncate_statement . ACL_USERS_TABLE); $db->sql_query($convert->truncate_statement . ACL_GROUPS_TABLE); - // Grab user id of first user with user_level of ADMIN + // What we will do is handling all 2.0.x admins as founder to replicate what is common in 2.0.x. + // After conversion the main admin need to make sure he is removing permissions and the founder status if wanted. + + + // Grab user ids of users with user_level of ADMIN $sql = "SELECT user_id FROM {$convert->src_table_prefix}users WHERE user_level = 1 ORDER BY user_regdate ASC"; - $result = $db->sql_query_limit($sql, 1); - $row = $db->sql_fetchrow($result); - $db->sql_freeresult($result); + $result = $src_db->sql_query($sql); - $founder_id = phpbb_user_id($row['user_id']); + while ($row = $src_db->sql_fetchrow($result)) + { + $user_id = (int) phpbb_user_id($row['user_id']); - // Set a founder admin ... we'll assume it's the first user with admin level access - $sql = 'UPDATE ' . USERS_TABLE . ' - SET user_type = ' . USER_FOUNDER . " - WHERE user_id = $founder_id"; - $db->sql_query($sql); + // Set founder admin... + $sql = 'UPDATE ' . USERS_TABLE . ' + SET user_type = ' . USER_FOUNDER . " + WHERE user_id = $user_id"; + $db->sql_query($sql); + } + $src_db->sql_freeresult($result); } // Grab forum auth information $sql = "SELECT * FROM {$convert->src_table_prefix}forums"; - $result = $db->sql_query($sql); + $result = $src_db->sql_query($sql); $forum_access = array(); - while ($row = $db->sql_fetchrow($result)) + while ($row = $src_db->sql_fetchrow($result)) { $forum_access[] = $row; } - $db->sql_freeresult($result); + $src_db->sql_freeresult($result); + if ($convert->mysql_convert && $same_db) + { + $src_db->sql_query("SET NAMES 'binary'"); + } // Grab user auth information from 2.0.x board $sql = "SELECT ug.user_id, aa.* FROM {$convert->src_table_prefix}auth_access aa, {$convert->src_table_prefix}user_group ug, {$convert->src_table_prefix}groups g WHERE g.group_id = aa.group_id AND g.group_single_user = 1 AND ug.group_id = g.group_id"; - $result = $db->sql_query($sql); + $result = $src_db->sql_query($sql); $user_access = array(); - while ($row = $db->sql_fetchrow($result)) + while ($row = $src_db->sql_fetchrow($result)) { $user_access[$row['forum_id']][] = $row; } - $db->sql_freeresult($result); + $src_db->sql_freeresult($result); // Grab group auth information $sql = "SELECT g.group_id, aa.* FROM {$convert->src_table_prefix}auth_access aa, {$convert->src_table_prefix}groups g WHERE g.group_id = aa.group_id AND g.group_single_user <> 1"; - $result = $db->sql_query($sql); + $result = $src_db->sql_query($sql); $group_access = array(); - while ($row = $db->sql_fetchrow($result)) + while ($row = $src_db->sql_fetchrow($result)) { $group_access[$row['forum_id']][] = $row; } - $db->sql_freeresult($result); + $src_db->sql_freeresult($result); + + if ($convert->mysql_convert && $same_db) + { + $src_db->sql_query("SET NAMES 'utf8'"); + } // Add Forum Access List $auth_map = array( 'auth_view' => array('f_', 'f_list'), - 'auth_read' => 'f_read', - 'auth_post' => array('f_post', 'f_bbcode', 'f_smilies', 'f_img', 'f_sigs', 'f_search', 'f_postcount'), + 'auth_read' => array('f_read', 'f_search'), + 'auth_post' => array('f_post', 'f_bbcode', 'f_smilies', 'f_img', 'f_sigs', 'f_postcount', 'f_report', 'f_subscribe', 'f_print', 'f_email'), 'auth_reply' => 'f_reply', 'auth_edit' => 'f_edit', 'auth_delete' => 'f_delete', @@ -546,7 +608,7 @@ function phpbb_convert_authentication($mode) 'auth_vote' => 'f_vote', 'auth_announce' => 'f_announce', 'auth_sticky' => 'f_sticky', - 'auth_attachments' => 'f_attach', + 'auth_attachments' => array('f_attach', 'f_download'), 'auth_download' => 'f_download', ); @@ -647,26 +709,41 @@ function phpbb_convert_authentication($mode) if ($mode == 'start') { - user_group_auth('guests', 'SELECT user_id, {GUESTS} FROM ' . USERS_TABLE . ' WHERE user_id = ' . ANONYMOUS); - user_group_auth('registered', 'SELECT user_id, {REGISTERED} FROM ' . USERS_TABLE . ' WHERE user_id <> ' . ANONYMOUS); + user_group_auth('guests', 'SELECT user_id, {GUESTS} FROM ' . USERS_TABLE . ' WHERE user_id = ' . ANONYMOUS, false); + user_group_auth('registered', 'SELECT user_id, {REGISTERED} FROM ' . USERS_TABLE . ' WHERE user_id <> ' . ANONYMOUS, false); // Selecting from old table - $auth_sql = 'SELECT '; - $auth_sql .= (!empty($config['increment_user_id'])) ? 'user_id + 1 as user_id' : 'user_id'; - $auth_sql .= ', {ADMINISTRATORS} FROM ' . $convert->src_table_prefix . 'users WHERE user_level = 1'; + if (!empty($config['increment_user_id'])) + { + $auth_sql = 'SELECT user_id, {ADMINISTRATORS} FROM ' . $convert->src_table_prefix . 'users WHERE user_level = 1 AND user_id <> 1'; + user_group_auth('administrators', $auth_sql, true); - user_group_auth('administrators', $auth_sql); + $auth_sql = 'SELECT ' . $config['increment_user_id'] . ' as user_id, {ADMINISTRATORS} FROM ' . $convert->src_table_prefix . 'users WHERE user_level = 1 AND user_id = 1'; + user_group_auth('administrators', $auth_sql, true); + } + else + { + $auth_sql = 'SELECT user_id, {ADMINISTRATORS} FROM ' . $convert->src_table_prefix . 'users WHERE user_level = 1'; + user_group_auth('administrators', $auth_sql, true); + } - // Put administrators into global moderators group too... - $auth_sql = 'SELECT '; - $auth_sql .= (!empty($config['increment_user_id'])) ? 'user_id + 1 as user_id' : 'user_id'; - $auth_sql .= ', {GLOBAL_MODERATORS} FROM ' . $convert->src_table_prefix . 'users WHERE user_level = 1'; + if (!empty($config['increment_user_id'])) + { + $auth_sql = 'SELECT user_id, {GLOBAL_MODERATORS} FROM ' . $convert->src_table_prefix . 'users WHERE user_level = 1 AND user_id <> 1'; + user_group_auth('global_moderators', $auth_sql, true); - user_group_auth('global_moderators', $auth_sql); + $auth_sql = 'SELECT ' . $config['increment_user_id'] . ' as user_id, {GLOBAL_MODERATORS} FROM ' . $convert->src_table_prefix . 'users WHERE user_level = 1 AND user_id = 1'; + user_group_auth('global_moderators', $auth_sql, true); + } + else + { + $auth_sql = 'SELECT user_id, {GLOBAL_MODERATORS} FROM ' . $convert->src_table_prefix . 'users WHERE user_level = 1'; + user_group_auth('global_moderators', $auth_sql, true); + } } else if ($mode == 'first') { - // Go through all 2.0.x forums (we saved those ids for reference) + // Go through all 2.0.x forums foreach ($forum_access as $forum) { $new_forum_id = (int) $forum['forum_id']; @@ -708,7 +785,7 @@ function phpbb_convert_authentication($mode) // no break; case 'registered_hidden': - mass_auth('group_role', $new_forum_id, 'registered', 'FORUM_LIMITED_POLLS'); + mass_auth('group_role', $new_forum_id, 'registered', 'FORUM_POLLS'); break; case 'private': @@ -738,6 +815,7 @@ function phpbb_convert_authentication($mode) // AUTH_ALL case AUTH_ALL: mass_auth('group', $new_forum_id, 'guests', $new_acl, ACL_YES); + mass_auth('group', $new_forum_id, 'bots', $new_acl, ACL_YES); mass_auth('group', $new_forum_id, 'registered', $new_acl, ACL_YES); break; @@ -817,8 +895,8 @@ function phpbb_convert_authentication($mode) mass_auth('group_role', 0, 'administrators', 'USER_FULL'); mass_auth('group_role', 0, 'global_moderators', 'USER_FULL'); - // By default all converted administrators are given standard access (the founder still have full access) - mass_auth('group_role', 0, 'administrators', 'ADMIN_STANDARD'); + // By default all converted administrators are given full access + mass_auth('group_role', 0, 'administrators', 'ADMIN_FULL'); // All registered users are assigned the standard user role mass_auth('group_role', 0, 'registered', 'USER_STANDARD'); @@ -831,25 +909,25 @@ function phpbb_convert_authentication($mode) $sql = 'SELECT user_id FROM ' . $convert->src_table_prefix . 'users WHERE user_allowavatar = 0 AND user_id > 0'; - $result = $db->sql_query($sql); + $result = $src_db->sql_query($sql); - while ($row = $db->sql_fetchrow($result)) + while ($row = $src_db->sql_fetchrow($result)) { mass_auth('user_role', 0, (int) phpbb_user_id($row['user_id']), 'USER_NOAVATAR'); } - $db->sql_freeresult($result); + $src_db->sql_freeresult($result); // And the same for those who have had their PM rights removed $sql = 'SELECT user_id FROM ' . $convert->src_table_prefix . 'users WHERE user_allow_pm = 0 AND user_id > 0'; - $result = $db->sql_query($sql); + $result = $src_db->sql_query($sql); - while ($row = $db->sql_fetchrow($result)) + while ($row = $src_db->sql_fetchrow($result)) { mass_auth('user_role', 0, (int) phpbb_user_id($row['user_id']), 'USER_NOPM'); } - $db->sql_freeresult($result); + $src_db->sql_freeresult($result); } else if ($mode == 'third') { @@ -895,6 +973,7 @@ function phpbb_convert_authentication($mode) if ($row['parent_id'] == 0) { mass_auth('group_role', $row['forum_id'], 'administrators', 'FORUM_FULL'); + mass_auth('group_role', $row['forum_id'], 'global_moderators', 'FORUM_FULL'); $parent_forums[] = $row; } else @@ -906,7 +985,7 @@ function phpbb_convert_authentication($mode) global $auth; - // Let us see if guests/registered users have access to these forums... + // Let us see which groups have access to these forums... foreach ($parent_forums as $row) { // Get the children @@ -925,12 +1004,33 @@ function phpbb_convert_authentication($mode) if (sizeof($forum_ids)) { // Now make sure the user is able to read these forums - $hold_ary = $auth->acl_group_raw_data(get_group_id('guests'), 'f_list', $forum_ids); + $hold_ary = $auth->acl_group_raw_data(false, 'f_list', $forum_ids); - if (!empty($hold_ary)) + if (empty($hold_ary)) { - mass_auth('group', $row['forum_id'], 'guests', 'f_list', ACL_YES); - mass_auth('group', $row['forum_id'], 'registered', 'f_list', ACL_YES); + continue; + } + + foreach ($hold_ary as $g_id => $f_id_ary) + { + $set_group = false; + + foreach ($f_id_ary as $f_id => $auth_ary) + { + foreach ($auth_ary as $auth_option => $setting) + { + if ($setting == ACL_YES) + { + $set_group = true; + break 2; + } + } + } + + if ($set_group) + { + mass_auth('group', $row['forum_id'], $g_id, 'f_list', ACL_YES); + } } } } @@ -981,7 +1081,7 @@ function phpbb_convert_group_name($group_name) return 'phpBB2 - ' . $group_name; } - return phpbb_set_encoding($group_name, false); + return phpbb_set_default_encoding($group_name); } /** @@ -1004,7 +1104,8 @@ function phpbb_convert_group_type($group_type) break; } - return GROUP_SPECIAL; + // Never return GROUP_SPECIAL here, because only phpBB3's default groups are allowed to have this type set. + return GROUP_HIDDEN; } /** @@ -1034,6 +1135,11 @@ function phpbb_convert_topic_type($topic_type) return POST_NORMAL; } +function phpbb_replace_size($matches) +{ + return '[size=' . min(200, ceil(100.0 * (((double) $matches[1])/12.0))) . ':' . $matches[2] . ']'; +} + /** * Reparse the message stripping out the bbcode_uid values and adding new ones and setting the bitfield * @todo What do we want to do about HTML in messages - currently it gets converted to the entities, but there may be some objections to this @@ -1051,6 +1157,12 @@ function phpbb_prepare_message($message) // Decode phpBB 2.0.x Message if (isset($convert->row['old_bbcode_uid']) && $convert->row['old_bbcode_uid'] != '') { + // Adjust size... + if (strpos($message, '[size=') !== false) + { + $message = preg_replace_callback('/\[size=(\d*):(' . $convert->row['old_bbcode_uid'] . ')\]/', 'phpbb_replace_size', $message); + } + $message = preg_replace('/\:(([a-z0-9]:)?)' . $convert->row['old_bbcode_uid'] . '/s', '', $message); } @@ -1059,6 +1171,7 @@ function phpbb_prepare_message($message) $message = preg_replace('/\[quote="(.*?)"\]/s', '[quote="\1"]', $message); } + // Already the new user id ;) $user_id = $convert->row['poster_id']; $message = str_replace('<', '<', $message); @@ -1133,21 +1246,30 @@ function phpbb_get_files_dir() return; } - global $db, $convert, $user, $config, $cache; + global $src_db, $same_db, $convert, $user, $config, $cache; + if ($convert->mysql_convert && $same_db) + { + $src_db->sql_query("SET NAMES 'binary'"); + } $sql = 'SELECT config_value AS upload_dir FROM ' . $convert->src_table_prefix . "attachments_config WHERE config_name = 'upload_dir'"; - $result = $db->sql_query($sql); - $upload_path = $db->sql_fetchfield('upload_dir'); - $db->sql_freeresult($result); + $result = $src_db->sql_query($sql); + $upload_path = $src_db->sql_fetchfield('upload_dir'); + $src_db->sql_freeresult($result); $sql = 'SELECT config_value AS ftp_upload FROM ' . $convert->src_table_prefix . "attachments_config WHERE config_name = 'allow_ftp_upload'"; - $result = $db->sql_query($sql); - $ftp_upload = (int) $db->sql_fetchfield('ftp_upload'); - $db->sql_freeresult($result); + $result = $src_db->sql_query($sql); + $ftp_upload = (int) $src_db->sql_fetchfield('ftp_upload'); + $src_db->sql_freeresult($result); + + if ($convert->mysql_convert && $same_db) + { + $src_db->sql_query("SET NAMES 'utf8'"); + } if ($ftp_upload) { @@ -1297,7 +1419,7 @@ function phpbb_import_avatar($user_avatar) else if ($convert_row['user_avatar_type'] == 1) { // Uploaded avatar - return import_avatar($user_avatar); + return import_avatar($user_avatar, false, $convert_row['user_id']); } else if ($convert_row['user_avatar_type'] == 2) { @@ -1313,6 +1435,38 @@ function phpbb_import_avatar($user_avatar) return ''; } + +/** +* Find out about the avatar's dimensions +*/ +function phpbb_get_avatar_height($user_avatar) +{ + global $convert_row; + + if (empty($convert_row['user_avatar_type'])) + { + return 0; + } + return get_avatar_height($user_avatar, 'phpbb_avatar_type', $convert_row['user_avatar_type']); +} + + +/** +* Find out about the avatar's dimensions +*/ +function phpbb_get_avatar_width($user_avatar) +{ + global $convert_row; + + if (empty($convert_row['user_avatar_type'])) + { + return 0; + } + + return get_avatar_width($user_avatar, 'phpbb_avatar_type', $convert_row['user_avatar_type']); +} + + /** * Calculate the correct to_address field for private messages */ @@ -1366,18 +1520,28 @@ function phpbb_get_savebox_id($user_id) */ function phpbb_import_attach_config() { - global $db, $convert, $config; + global $db, $src_db, $same_db, $convert, $config; + + if ($convert->mysql_convert && $same_db) + { + $src_db->sql_query("SET NAMES 'binary'"); + } $sql = 'SELECT * FROM ' . $convert->src_table_prefix . 'attachments_config'; - $result = $db->sql_query($sql); + $result = $src_db->sql_query($sql); + + if ($convert->mysql_convert && $same_db) + { + $src_db->sql_query("SET NAMES 'utf8'"); + } $attach_config = array(); - while ($row = $db->sql_fetchrow($result)) + while ($row = $src_db->sql_fetchrow($result)) { $attach_config[$row['config_name']] = $row['config_value']; } - $db->sql_freeresult($result); + $src_db->sql_freeresult($result); set_config('allow_attachments', 1); @@ -1446,4 +1610,204 @@ function phpbb_inactive_reason() return INACTIVE_REGISTER; } +/** +* Adjust 2.0.x disallowed names to 3.0.x format +*/ +function phpbb_disallowed_username($username) +{ + // Replace * with % + $username = phpbb_set_default_encoding(str_replace('*', '%', $username)); + return utf8_htmlspecialchars($username); +} + +/** +* Checks whether there are any usernames on the old board that would map to the same +* username_clean on phpBB3. Prints out a list if any exist and exits. +*/ +function phpbb_check_username_collisions() +{ + global $db, $src_db, $convert, $table_prefix, $user, $lang; + + $map_dbms = ''; + switch ($db->sql_layer) + { + case 'mysql': + $map_dbms = 'mysql_40'; + break; + + case 'mysql4': + if (version_compare($db->mysql_version, '4.1.3', '>=')) + { + $map_dbms = 'mysql_41'; + } + else + { + $map_dbms = 'mysql_40'; + } + break; + + case 'mysqli': + $map_dbms = 'mysql_41'; + break; + + case 'mssql': + case 'mssql_odbc': + $map_dbms = 'mssql'; + break; + + default: + $map_dbms = $db->sql_layer; + break; + } + + // create a temporary table in which we store the clean usernames + $drop_sql = 'DROP TABLE ' . $table_prefix . 'userconv'; + switch ($map_dbms) + { + case 'firebird': + $create_sql = 'CREATE TABLE ' . $table_prefix . 'userconv ( + user_id INTEGER NOT NULL, + username_clean VARCHAR(255) CHARACTER SET UTF8 DEFAULT \'\' NOT NULL COLLATE UNICODE + )'; + break; + + case 'mssql': + $create_sql = 'CREATE TABLE [' . $table_prefix . 'userconv] ( + [user_id] [int] NOT NULL , + [username_clean] [varchar] (255) DEFAULT (\'\') NOT NULL + )'; + break; + + case 'mysql_40': + $create_sql = 'CREATE TABLE ' . $table_prefix . 'userconv ( + user_id mediumint(8) NOT NULL, + username_clean blob NOT NULL + )'; + break; + + case 'mysql_41': + $create_sql = 'CREATE TABLE ' . $table_prefix . 'userconv ( + user_id mediumint(8) NOT NULL, + username_clean varchar(255) DEFAULT \'\' NOT NULL + ) CHARACTER SET `utf8` COLLATE `utf8_bin`'; + break; + + case 'oracle': + $create_sql = 'CREATE TABLE ' . $table_prefix . 'userconv + user_id number(8) NOT NULL, + username_clean varchar2(255) DEFAULT \'\' + )'; + break; + + case 'postgres': + $create_sql = 'CREATE TABLE ' . $table_prefix . 'userconv ( + user_id INT4 DEFAULT \'0\', + username_clean varchar_ci DEFAULT \'\' NOT NULL + )'; + break; + + case 'sqlite': + $create_sql = 'CREATE TABLE ' . $table_prefix . 'userconv ( + user_id INTEGER NOT NULL DEFAULT \'0\', + username_clean varchar(255) NOT NULL DEFAULT \'\', + )'; + break; + } + + $db->sql_return_on_error(true); + $db->sql_query($drop_sql); + $db->sql_query($create_sql); + $db->sql_return_on_error(false); + + // now select all user_ids and usernames and then convert the username (this can take quite a while!) + $sql = 'SELECT user_id, username + FROM ' . $convert->src_table_prefix . 'users'; + $result = $src_db->sql_query($sql); + + $insert_ary = array(); + $i = 0; + while ($row = $src_db->sql_fetchrow($result)) + { + $clean_name = utf8_clean_string(phpbb_set_default_encoding($row['username'])); + $insert_ary[] = array('user_id' => $row['user_id'], 'username_clean' => $clean_name); + + if ($i % 1000 == 999) + { + $db->sql_multi_insert($table_prefix . 'userconv', $insert_ary); + $insert_ary = array(); + } + $i++; + } + $src_db->sql_freeresult($result); + + if (sizeof($insert_ary)) + { + $db->sql_multi_insert($table_prefix . 'userconv', $insert_ary); + } + unset($insert_ary); + + // now find the clean version of the usernames that collide + $sql = 'SELECT username_clean + FROM ' . $table_prefix . 'userconv + GROUP BY username_clean + HAVING COUNT(user_id) > 1'; + $result = $db->sql_query($sql); + + $colliding_names = array(); + while ($row = $db->sql_fetchrow($result)) + { + $colliding_names[] = $row['username_clean']; + } + $db->sql_freeresult($result); + + // there was at least one collision, the admin will have to solve it before conversion can continue + if (sizeof($colliding_names)) + { + $sql = 'SELECT user_id, username_clean + FROM ' . $table_prefix . 'userconv + WHERE ' . $db->sql_in_set('username_clean', $colliding_names); + $result = $db->sql_query($sql); + unset($colliding_names); + + $colliding_user_ids = array(); + while ($row = $db->sql_fetchrow($result)) + { + $colliding_user_ids[(int) $row['user_id']] = $row['username_clean']; + } + $db->sql_freeresult($result); + + $sql = 'SELECT username, user_id, user_posts + FROM ' . $convert->src_table_prefix . 'users + WHERE ' . $src_db->sql_in_set('user_id', array_keys($colliding_user_ids)); + $result = $src_db->sql_query($sql); + + $colliding_users = array(); + while ($row = $db->sql_fetchrow($result)) + { + $row['user_id'] = (int) $row['user_id']; + if (isset($colliding_user_ids[$row['user_id']])) + { + $colliding_users[$colliding_user_ids[$row['user_id']]][] = $row; + } + } + $db->sql_freeresult($result); + unset($colliding_user_ids); + + $list = ''; + foreach ($colliding_users as $username_clean => $users) + { + $list .= sprintf($user->lang['COLLIDING_CLEAN_USERNAME'], $username_clean) . "
    \n"; + foreach ($users as $i => $row) + { + $list .= sprintf($user->lang['COLLIDING_USER'], $row['user_id'], phpbb_set_default_encoding($row['username']), $row['user_posts']) . "
    \n"; + } + } + + $lang['INST_ERR_FATAL'] = $user->lang['CONV_ERR_FATAL']; + $convert->p_master->error('' . $user->lang['COLLIDING_USERNAMES_FOUND'] . '

    ' . $list . '', __LINE__, __FILE__); + } + + $db->sql_query($drop_sql); +} + ?> \ No newline at end of file diff --git a/phpBB/install/database_update.php b/phpBB/install/database_update.php index 666cb1aad3..194bb5600a 100644 --- a/phpBB/install/database_update.php +++ b/phpBB/install/database_update.php @@ -8,7 +8,7 @@ * */ -$updates_to_version = '3.0.B5'; +$updates_to_version = '3.0.RC1'; if (defined('IN_PHPBB') && defined('IN_INSTALL')) { @@ -60,12 +60,26 @@ require($phpbb_root_path . 'includes/constants.' . $phpEx); require($phpbb_root_path . 'includes/db/' . $dbms . '.' . $phpEx); require($phpbb_root_path . 'includes/utf/utf_tools.' . $phpEx); +// If we are on PHP >= 6.0.0 we do not need some code +if (version_compare(PHP_VERSION, '6.0.0-dev', '>=')) +{ + /** + * @ignore + */ + define('STRIP', false); +} +else +{ + set_magic_quotes_runtime(0); + define('STRIP', (get_magic_quotes_gpc()) ? true : false); +} + $user = new user(); $cache = new cache(); $db = new $sql_db(); // Connect to DB -$db->sql_connect($dbhost, $dbuser, $dbpasswd, $dbname, $dbport, false); +$db->sql_connect($dbhost, $dbuser, $dbpasswd, $dbname, $dbport, false, false); // We do not need this any longer, unset for safety purposes unset($dbpasswd); @@ -77,10 +91,22 @@ $result = $db->sql_query($sql); $row = $db->sql_fetchrow($result); $db->sql_freeresult($result); +$language = basename(request_var('language', '')); + +if (!$language) +{ + $language = $row['config_value']; +} + +if (!file_exists($phpbb_root_path . 'language/' . $language)) +{ + die('No language found!'); +} + // And finally, load the relevant language files -include($phpbb_root_path . 'language/' . $row['config_value'] . '/common.' . $phpEx); -include($phpbb_root_path . 'language/' . $row['config_value'] . '/acp/common.' . $phpEx); -include($phpbb_root_path . 'language/' . $row['config_value'] . '/install.' . $phpEx); +include($phpbb_root_path . 'language/' . $language . '/common.' . $phpEx); +include($phpbb_root_path . 'language/' . $language . '/acp/common.' . $phpEx); +include($phpbb_root_path . 'language/' . $language . '/install.' . $phpEx); // Set PHP error handler to ours //set_error_handler('msg_handler'); @@ -125,22 +151,22 @@ $dbms_type_map = array( 'TINT:' => 'tinyint(%d)', 'USINT' => 'smallint(4) UNSIGNED', 'BOOL' => 'tinyint(1) UNSIGNED', - 'VCHAR' => 'varchar(255)', - 'VCHAR:' => 'varchar(%d)', - 'CHAR:' => 'char(%d)', - 'XSTEXT' => 'text', - 'XSTEXT_UNI'=> 'text', - 'STEXT' => 'text', - 'STEXT_UNI' => 'text', - 'TEXT' => 'text', - 'TEXT_UNI' => 'text', - 'MTEXT' => 'mediumtext', - 'MTEXT_UNI' => 'mediumtext', + 'VCHAR' => 'varbinary(255)', + 'VCHAR:' => 'varbinary(%d)', + 'CHAR:' => 'binary(%d)', + 'XSTEXT' => 'blob', + 'XSTEXT_UNI'=> 'blob', + 'STEXT' => 'blob', + 'STEXT_UNI' => 'blob', + 'TEXT' => 'blob', + 'TEXT_UNI' => 'blob', + 'MTEXT' => 'mediumblob', + 'MTEXT_UNI' => 'mediumblob', 'TIMESTAMP' => 'int(11) UNSIGNED', 'DECIMAL' => 'decimal(5,2)', - 'VCHAR_UNI' => 'text', - 'VCHAR_UNI:'=> array('varchar(%d)', 'limit' => array('mult', 3, 255, 'text')), - 'VCHAR_CI' => 'text', + 'VCHAR_UNI' => 'blob', + 'VCHAR_UNI:'=> array('varbinary(%d)', 'limit' => array('mult', 3, 255, 'blob')), + 'VCHAR_CI' => 'blob', 'VARBINARY' => 'varbinary(255)', ), @@ -285,69 +311,168 @@ $unsigned_types = array('UINT', 'UINT:', 'USINT', 'BOOL', 'TIMESTAMP'); // Only an example, but also commented out $database_update_info = array( - // Changes from 3.0.b3 to the next version - '3.0.b3' => array( + // Changes from 3.0.b5 to the next version + '3.0.b5' => array( + // Add the following columns + 'add_columns' => array( + SEARCH_WORDLIST_TABLE => array( + 'word_count' => array('UINT', 0), + ), + ), // Change the following columns... 'change_columns' => array( - BBCODES_TABLE => array( - 'bbcode_helpline' => array('VCHAR_UNI', ''), - ), - USERS_TABLE => array( - 'user_occ' => array('TEXT_UNI', ''), - ), - CONFIG_TABLE => array( - 'config_value' => array('VCHAR_UNI', ''), - ), - ), - // Add the following columns - 'add_columns' => array( - GROUPS_TABLE => array( - 'group_founder_manage' => array('BOOL', 0), - ), - USERS_TABLE => array( - 'user_pass_convert' => array('BOOL', 0), - ), - ), - ), - // Changes from 3.0.b4 to the next version - '3.0.b4' => array( - // Add the following columns - 'add_columns' => array( - CONFIRM_TABLE => array( - 'seed' => array('UINT:10', 0), + TOPICS_TABLE => array( + 'poll_title' => array('STEXT_UNI', ''), ), SESSIONS_TABLE => array( - 'session_forwarded_for' => array('VCHAR:255', 0), - ), - ), - 'change_columns' => array( - USERS_TABLE => array( - 'user_options' => array('UINT:11', 895), - ), - FORUMS_TABLE => array( - 'prune_days' => array('UINT', 0), - 'prune_viewed' => array('UINT', 0), - 'prune_freq' => array('UINT', 0), - ), - PRIVMSGS_RULES_TABLE => array( - 'rule_folder_id' => array('INT:11', 0), - ), - PRIVMSGS_TO_TABLE => array( - 'folder_id' => array('INT:11', 0), + 'session_forwarded_for' => array('VCHAR:255', ''), ), ), // Remove the following keys 'drop_keys' => array( - ZEBRA_TABLE => array( - 'user_id', - 'zebra_id', + USERS_TABLE => array( + 'username_clean', + ), + STYLES_IMAGESET_TABLE => array( + 'imgset_nm', + ), + BOOKMARKS_TABLE => array( + 'order_id', + 'topic_user_id', ), ), - // Add the following primary keys - 'add_primary_keys' => array( - ZEBRA_TABLE => array( - 'user_id', - 'zebra_id', + 'add_index' => array( + SEARCH_WORDLIST_TABLE => array( + 'wrd_cnt' => array('word_count'), + ), + ACL_GROUPS_TABLE => array( + 'auth_role_id' => array('auth_role_id'), + ), + ACL_USERS_TABLE => array( + 'auth_role_id' => array('auth_role_id'), + ), + ACL_ROLES_DATA_TABLE => array( + 'ath_opt_id' => array('auth_option_id'), + ), + TOPICS_TABLE => array( + 'forum_appr_last' => array('forum_id', 'topic_approved', 'topic_last_post_id'), + ), + ), + // Add the following unique indexes + 'add_unique_index' => array( + SEARCH_WORDMATCH_TABLE => array( + 'unq_mtch' => array('word_id', 'post_id', 'title_match'), + ), + USERS_TABLE => array( + 'username_clean' => array('username_clean'), + ), + ), + // Drop the following columns + 'drop_columns' => array( + STYLES_IMAGESET_TABLE => array( + 'site_logo', + 'upload_bar', + 'poll_left', + 'poll_center', + 'poll_right', + 'icon_friend', + 'icon_foe', + 'forum_link', + 'forum_read', + 'forum_read_locked', + 'forum_read_subforum', + 'forum_unread', + 'forum_unread_locked', + 'forum_unread_subforum', + 'topic_moved', + 'topic_read', + 'topic_read_mine', + 'topic_read_hot', + 'topic_read_hot_mine', + 'topic_read_locked', + 'topic_read_locked_mine', + 'topic_unread', + 'topic_unread_mine', + 'topic_unread_hot', + 'topic_unread_hot_mine', + 'topic_unread_locked', + 'topic_unread_locked_mine', + 'sticky_read', + 'sticky_read_mine', + 'sticky_read_locked', + 'sticky_read_locked_mine', + 'sticky_unread', + 'sticky_unread_mine', + 'sticky_unread_locked', + 'sticky_unread_locked_mine', + 'announce_read', + 'announce_read_mine', + 'announce_read_locked', + 'announce_read_locked_mine', + 'announce_unread', + 'announce_unread_mine', + 'announce_unread_locked', + 'announce_unread_locked_mine', + 'global_read', + 'global_read_mine', + 'global_read_locked', + 'global_read_locked_mine', + 'global_unread', + 'global_unread_mine', + 'global_unread_locked', + 'global_unread_locked_mine', + 'pm_read', + 'pm_unread', + 'icon_contact_aim', + 'icon_contact_email', + 'icon_contact_icq', + 'icon_contact_jabber', + 'icon_contact_msnm', + 'icon_contact_pm', + 'icon_contact_yahoo', + 'icon_contact_www', + 'icon_post_delete', + 'icon_post_edit', + 'icon_post_info', + 'icon_post_quote', + 'icon_post_report', + 'icon_post_target', + 'icon_post_target_unread', + 'icon_topic_attach', + 'icon_topic_latest', + 'icon_topic_newest', + 'icon_topic_reported', + 'icon_topic_unapproved', + 'icon_user_online', + 'icon_user_offline', + 'icon_user_profile', + 'icon_user_search', + 'icon_user_warn', + 'button_pm_forward', + 'button_pm_new', + 'button_pm_reply', + 'button_topic_locked', + 'button_topic_new', + 'button_topic_reply', + 'user_icon1', + 'user_icon2', + 'user_icon3', + 'user_icon4', + 'user_icon5', + 'user_icon6', + 'user_icon7', + 'user_icon8', + 'user_icon9', + 'user_icon10' + ), + BOOKMARKS_TABLE => array( + 'order_id', + ), + ), + // Adding primary key + 'add_primary_keys' => array( + BOOKMARKS_TABLE => array( + 'topic_id', 'user_id', ), ), ), @@ -361,6 +486,16 @@ switch ($db->sql_layer) break; case 'mysql4': + if (version_compare($db->mysql_version, '4.1.3', '>=')) + { + $map_dbms = 'mysql_41'; + } + else + { + $map_dbms = 'mysql_40'; + } + break; + case 'mysqli': $map_dbms = 'mysql_41'; break; @@ -378,6 +513,8 @@ switch ($db->sql_layer) $error_ary = array(); $errored = false; +header('Content-type: text/html; charset=UTF-8'); + ?> @@ -399,6 +536,7 @@ $errored = false;
    +
    @@ -427,8 +565,8 @@ $db->sql_freeresult($result); echo $lang['PREVIOUS_VERSION'] . ' :: ' . $config['version'] . '
    '; echo $lang['UPDATED_VERSION'] . ' :: ' . $updates_to_version . ''; -$current_version = strtolower($config['version']); -$latest_version = strtolower($updates_to_version); +$current_version = str_replace('rc', 'RC', strtolower($config['version'])); +$latest_version = str_replace('rc', 'RC', strtolower($updates_to_version)); $orig_version = $config['version']; // If the latest version and the current version are 'unequal', we will update the version_update_from, else we do not update anything. @@ -515,6 +653,18 @@ foreach ($database_update_info as $version => $schema_changes) } } + // Drop columns? + if (!empty($schema_changes['drop_columns'])) + { + foreach ($schema_changes['drop_columns'] as $table => $columns) + { + foreach ($columns as $column) + { + sql_column_remove($map_dbms, $table, $column); + } + } + } + // Add primary keys? if (!empty($schema_changes['add_primary_keys'])) { @@ -523,6 +673,30 @@ foreach ($database_update_info as $version => $schema_changes) sql_create_primary_key($map_dbms, $table, $columns); } } + + // Add unqiue indexes? + if (!empty($schema_changes['add_unique_index'])) + { + foreach ($schema_changes['add_unique_index'] as $table => $index_array) + { + foreach ($index_array as $index_name => $column) + { + sql_create_unique_index($map_dbms, $index_name, $table, $column); + } + } + } + + // Add indexes? + if (!empty($schema_changes['add_index'])) + { + foreach ($schema_changes['add_index'] as $table => $index_array) + { + foreach ($index_array as $index_name => $column) + { + sql_create_index($map_dbms, $index_name, $table, $column); + } + } + } } _write_result($no_updates, $errored, $error_ary); @@ -545,110 +719,435 @@ flush(); $no_updates = true; // some code magic -if (version_compare($current_version, '3.0.b3', '<=')) +if (version_compare($current_version, '3.0.b5', '<=')) { - // Set group_founder_manage for administrators group - $sql = 'SELECT group_id - FROM ' . GROUPS_TABLE . " - WHERE group_name = 'ADMINISTRATORS' - AND group_type = " . GROUP_SPECIAL; - $result = $db->sql_query($sql); - $group_id = (int) $db->sql_fetchfield('group_id'); - $db->sql_freeresult($result); - - if ($group_id) + switch ($map_dbms) { - $sql = 'UPDATE ' . GROUPS_TABLE . ' SET group_founder_manage = 1 WHERE group_id = ' . $group_id; - _sql($sql, $errored, $error_ary); - } + case 'sqlite': + case 'firebird': + $db->sql_query('DELETE FROM ' . STYLES_IMAGESET_TABLE); + $db->sql_query('DELETE FROM ' . STYLES_TEMPLATE_TABLE); + $db->sql_query('DELETE FROM ' . STYLES_TABLE); + $db->sql_query('DELETE FROM ' . STYLES_THEME_TABLE); - add_bots(); - - $no_updates = false; -} - -if (version_compare($current_version, '3.0.b4', '<=')) -{ - // Add config values - set_config('script_path', '/'); - set_config('forwarded_for_check', '0'); - set_config('ldap_password', ''); - set_config('ldap_user', ''); - set_config('fulltext_native_common_thres', '20'); - - // Remove config variables - $sql = 'DELETE FROM ' . CONFIG_TABLE . " WHERE config_name = 'send_encoding'"; - _sql($sql, $errored, $error_ary); - - $sql = 'SELECT user_colour - FROM ' . USERS_TABLE . ' - WHERE user_type IN (' . USER_NORMAL . ', ' . USER_FOUNDER . ') - ORDER BY user_id DESC'; - $result = $db->sql_query_limit($sql, 1); - $row = $db->sql_fetchrow($result); - $db->sql_freeresult($result); - - set_config('newest_user_colour', $row['user_colour'], true); - - switch ($config['allow_name_chars']) - { - case '[\w]+': - set_config('allow_name_chars', '[a-z]+'); +// $db->sql_query('DELETE FROM ' . STYLES_IMAGESET_DATA_TABLE); break; - case '[\w_\+\. \-\[\]]+': - set_config('allow_name_chars', '[-\]_+ [a-z]+'); + default: + $db->sql_query('TRUNCATE TABLE ' . STYLES_IMAGESET_TABLE); + $db->sql_query('TRUNCATE TABLE ' . STYLES_TEMPLATE_TABLE); + $db->sql_query('TRUNCATE TABLE ' . STYLES_TABLE); + $db->sql_query('TRUNCATE TABLE ' . STYLES_THEME_TABLE); + +// This table does not exist, as well as the constant not exist... +// $db->sql_query('TRUNCATE TABLE ' . STYLES_IMAGESET_DATA_TABLE); break; } - switch ($config['pass_complex']) + $tablename = $table_prefix . 'styles_imageset_data'; + switch ($map_dbms) { - case '.*': - set_config('pass_complex', 'PASS_TYPE_ANY'); + case 'mysql_41': + $sql_ary = array( + "CREATE TABLE $tablename ( + image_id smallint(4) UNSIGNED NOT NULL auto_increment, + image_name varchar(200) DEFAULT '' NOT NULL, + image_filename varchar(200) DEFAULT '' NOT NULL, + image_lang varchar(30) DEFAULT '' NOT NULL, + image_height smallint(4) UNSIGNED DEFAULT '0' NOT NULL, + image_width smallint(4) UNSIGNED DEFAULT '0' NOT NULL, + imageset_id tinyint(4) DEFAULT '0' NOT NULL, + PRIMARY KEY (image_id), + KEY i_id (imageset_id) + ) CHARACTER SET `utf8` COLLATE `utf8_bin`"); break; - case '[a-zA-Z]': - set_config('pass_complex', 'PASS_TYPE_CASE'); + case 'mysql_40': + $sql_ary = array( + "CREATE TABLE $tablename ( + image_id smallint(4) UNSIGNED NOT NULL auto_increment, + image_name varbinary(200) DEFAULT '' NOT NULL, + image_filename varbinary(200) DEFAULT '' NOT NULL, + image_lang varbinary(30) DEFAULT '' NOT NULL, + image_height smallint(4) UNSIGNED DEFAULT '0' NOT NULL, + image_width smallint(4) UNSIGNED DEFAULT '0' NOT NULL, + imageset_id tinyint(4) DEFAULT '0' NOT NULL, + PRIMARY KEY (image_id), + KEY i_id (imageset_id) + );"); break; - case '[a-zA-Z0-9]': - set_config('pass_complex', 'PASS_TYPE_ALPHA'); + case 'mssql': + $sql_ary = array( + "CREATE TABLE [$tablename] ( + [image_id] [int] IDENTITY (1, 1) NOT NULL , + [image_name] [varchar] (200) DEFAULT ('') NOT NULL , + [image_filename] [varchar] (200) DEFAULT ('') NOT NULL , + [image_lang] [varchar] (30) DEFAULT ('') NOT NULL , + [image_height] [int] DEFAULT (0) NOT NULL , + [image_width] [int] DEFAULT (0) NOT NULL , + [imageset_id] [int] DEFAULT (0) NOT NULL + ) ON [PRIMARY]", + + "ALTER TABLE [$tablename] WITH NOCHECK ADD + CONSTRAINT [PK_$tablename] PRIMARY KEY CLUSTERED + ( + [image_id] + ) ON [PRIMARY]", + + "CREATE INDEX [i_id] ON [$tablename]([imageset_id]) ON [PRIMARY]", + ); break; - case '[a-zA-Z\W]': - set_config('pass_complex', 'PASS_TYPE_SYMBOL'); + case 'oracle': + $sql_ary = array( + "CREATE TABLE $tablename ( + image_id number(4) NOT NULL, + image_name varchar2(200) DEFAULT '' , + image_filename varchar2(200) DEFAULT '' , + image_lang varchar2(30) DEFAULT '' , + image_height number(4) DEFAULT '0' NOT NULL, + image_width number(4) DEFAULT '0' NOT NULL, + imageset_id number(4) DEFAULT '0' NOT NULL, + CONSTRAINT pk_phpbb_styles_imageset_data PRIMARY KEY (image_id) + )", + + "CREATE INDEX {$tablename}_i_id ON $tablename (imageset_id)", + + "CREATE SEQUENCE {$tablename}_imgset_id_seq", + + "CREATE OR REPLACE TRIGGER t_$tablename + BEFORE INSERT ON $tablename + FOR EACH ROW WHEN ( + new.image_id IS NULL OR new.image_id = 0 + ) + BEGIN + SELECT {$tablename}_seq.nextval + INTO :new.image_id + FROM dual; + END", + ); + break; + + case 'postgres': + $sql_ary = array( + "CREATE SEQUENCE {$tablename}_seq;", + + "CREATE TABLE $tablename ( + image_id INT2 DEFAULT nextval('{$tablename}_seq'), + image_name varchar(200) DEFAULT '' NOT NULL, + image_filename varchar(200) DEFAULT '' NOT NULL, + image_lang varchar(30) DEFAULT '' NOT NULL, + image_height INT2 DEFAULT '0' NOT NULL CHECK (image_height >= 0), + image_width INT2 DEFAULT '0' NOT NULL CHECK (image_width >= 0), + imageset_id INT2 DEFAULT '0' NOT NULL, + PRIMARY KEY (image_id) + );", + + "CREATE INDEX {$tablename}_i_id ON $tablename (imageset_id);" + ); + break; + + case 'sqlite': + $sql_ary = array( + "CREATE TABLE $tablename ( + image_id INTEGER PRIMARY KEY NOT NULL , + image_name varchar(200) NOT NULL DEFAULT '', + image_filename varchar(200) NOT NULL DEFAULT '', + image_lang varchar(30) NOT NULL DEFAULT '', + image_height INTEGER UNSIGNED NOT NULL DEFAULT '0', + image_width INTEGER UNSIGNED NOT NULL DEFAULT '0', + imageset_id tinyint(4) NOT NULL DEFAULT '0' + );", + + "CREATE INDEX {$tablename}_i_id ON $tablename (imageset_id);" + ); + break; + + case 'firebird': + $sql_ary = array( + "CREATE TABLE $tablename ( + image_id INTEGER NOT NULL, + image_name VARCHAR(200) CHARACTER SET NONE DEFAULT '' NOT NULL, + image_filename VARCHAR(200) CHARACTER SET NONE DEFAULT '' NOT NULL, + image_lang VARCHAR(30) CHARACTER SET NONE DEFAULT '' NOT NULL, + image_height INTEGER DEFAULT 0 NOT NULL, + image_width INTEGER DEFAULT 0 NOT NULL, + imageset_id INTEGER DEFAULT 0 NOT NULL + );", + + "ALTER TABLE $tablename ADD PRIMARY KEY (image_id);", + + "CREATE INDEX {$tablename}_i_id ON $tablename(imageset_id);", + + "CREATE GENERATOR {$tablename}_gen;", + + "SET GENERATOR {$tablename}_gen TO 0;", + + "CREATE TRIGGER t_$tablename FOR $tablename + BEFORE INSERT + AS + BEGIN + NEW.image_id = GEN_ID({$tablename}_gen, 1); + END" + ); break; } - $sql = 'UPDATE ' . USERS_TABLE . ' SET user_options = 895 WHERE user_options = 893'; - _sql($sql, $errored, $error_ary); + // add the various statements + foreach ($sql_ary as $sql) + { + $db->sql_query($sql); + } - $sql = 'UPDATE ' . MODULES_TABLE . " SET module_auth = 'acl_a_board' - WHERE module_class = 'acp' AND module_mode = 'version_check' AND module_auth = 'acl_a_'"; - _sql($sql, $errored, $error_ary); + $data = "INSERT INTO phpbb_styles (style_name, style_copyright, style_active, template_id, theme_id, imageset_id) VALUES ('prosilver', '© phpBB Group', 1, 1, 1, 1); + INSERT INTO phpbb_styles (style_name, style_copyright, style_active, template_id, theme_id, imageset_id) VALUES ('subsilver2', '© phpBB Group', 1, 2, 2, 2); + INSERT INTO phpbb_styles_imageset (imageset_name, imageset_copyright, imageset_path) VALUES ('prosilver', '© phpBB Group', 'prosilver'); + INSERT INTO phpbb_styles_imageset (imageset_name, imageset_copyright, imageset_path) VALUES ('subsilver2', '© phpBB Group', 'subsilver2'); + INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('site_logo', 'site_logo.gif', '', 94, 170, 2); + INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('upload_bar', 'upload_bar.gif', '', 16, 280, 2); + INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('poll_left', 'poll_left.gif', '', 12, 4, 2); + INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('poll_center', 'poll_center.gif', '', 12, 0, 2); + INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('poll_right', 'poll_right.gif', '', 12, 4, 2); + INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('forum_link', 'forum_link.gif', '', 25, 46, 2); + INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('forum_read', 'forum_read.gif', '', 25, 46, 2); + INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('forum_read_locked', 'forum_read_locked.gif', '', 25, 46, 2); + INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('forum_read_subforum', 'forum_read_subforum.gif', '', 25, 46, 2); + INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('forum_unread', 'forum_unread.gif', '', 25, 46, 2); + INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('forum_unread_locked', 'forum_unread_locked.gif', '', 25, 46, 2); + INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('forum_unread_subforum', 'forum_unread_subforum.gif', '', 25, 46, 2); + INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('topic_moved', 'topic_moved.gif', '', 18, 19, 2); + INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('topic_read', 'topic_read.gif', '', 18, 19, 2); + INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('topic_read_mine', 'topic_read_mine.gif', '', 18, 19, 2); + INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('topic_read_hot', 'topic_read_hot.gif', '', 18, 19, 2); + INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('topic_read_hot_mine', 'topic_read_hot_mine.gif', '', 18, 19, 2); + INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('topic_read_locked', 'topic_read_locked.gif', '', 18, 19, 2); + INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('topic_read_locked_mine', 'topic_read_locked_mine.gif', '', 18, 19, 2); + INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('topic_unread', 'topic_unread.gif', '', 18, 19, 2); + INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('topic_unread_mine', 'topic_unread_mine.gif', '', 18, 19, 2); + INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('topic_unread_hot', 'topic_unread_hot.gif', '', 18, 19, 2); + INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('topic_unread_hot_mine', 'topic_unread_hot_mine.gif', '', 18, 19, 2); + INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('topic_unread_locked', 'topic_unread_locked.gif', '', 18, 19, 2); + INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('topic_unread_locked_mine', 'topic_unread_locked_mine.gif', '', 18, 19, 2); + INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('sticky_read', 'sticky_read.gif', '', 18, 19, 2); + INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('sticky_read_mine', 'sticky_read_mine.gif', '', 18, 19, 2); + INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('sticky_read_locked', 'sticky_read_locked.gif', '', 18, 19, 2); + INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('sticky_read_locked_mine', 'sticky_read_locked_mine.gif', '', 18, 19, 2); + INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('sticky_unread', 'sticky_unread.gif', '', 18, 19, 2); + INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('sticky_unread_mine', 'sticky_unread_mine.gif', '', 18, 19, 2); + INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('sticky_unread_locked', 'sticky_unread_locked.gif', '', 18, 19, 2); + INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('sticky_unread_locked_mine', 'sticky_unread_locked_mine.gif', '', 18, 19, 2); + INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('announce_read', 'announce_read.gif', '', 18, 19, 2); + INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('announce_read_mine', 'announce_read_mine.gif', '', 18, 19, 2); + INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('announce_read_locked', 'announce_read_locked.gif', '', 18, 19, 2); + INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('announce_read_locked_mine', 'announce_read_locked_mine.gif', '', 18, 19, 2); + INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('announce_unread', 'announce_unread.gif', '', 18, 19, 2); + INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('announce_unread_mine', 'announce_unread_mine.gif', '', 18, 19, 2); + INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('announce_unread_locked', 'announce_unread_locked.gif', '', 18, 19, 2); + INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('announce_unread_locked_mine', 'announce_unread_locked_mine.gif', '', 18, 19, 2); + INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('global_read', 'announce_read.gif', '', 18, 19, 2); + INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('global_read_mine', 'announce_read_mine.gif', '', 18, 19, 2); + INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('global_read_locked', 'announce_read_locked.gif', '', 18, 19, 2); + INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('global_read_locked_mine', 'announce_read_locked_mine.gif', '', 18, 19, 2); + INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('global_unread', 'announce_unread.gif', '', 18, 19, 2); + INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('global_unread_mine', 'announce_unread_mine.gif', '', 18, 19, 2); + INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('global_unread_locked', 'announce_unread_locked.gif', '', 18, 19, 2); + INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('global_unread_locked_mine', 'announce_unread_locked_mine.gif', '', 18, 19, 2); + INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('pm_read', 'topic_read.gif', '', 18, 19, 2); + INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('pm_unread', 'topic_unread.gif', '', 18, 19, 2); + INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('icon_post_target', 'icon_post_target.gif', '', 9, 12, 2); + INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('icon_post_target_unread', 'icon_post_target_unread.gif', '', 9, 12, 2); + INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('icon_topic_attach', 'icon_topic_attach.gif', '', 18, 14, 2); + INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('icon_topic_latest', 'icon_topic_latest.gif', '', 9, 18, 2); + INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('icon_topic_newest', 'icon_topic_newest.gif', '', 9, 18, 2); + INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('icon_topic_reported', 'icon_topic_reported.gif', '', 18, 19, 2); + INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('icon_topic_unapproved', 'icon_topic_unapproved.gif', '', 18, 19, 2); + INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('icon_contact_aim', 'icon_contact_aim.gif', 'en', 0, 0, 2); + INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('icon_contact_email', 'icon_contact_email.gif', 'en', 0, 0, 2); + INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('icon_contact_icq', 'icon_contact_icq.gif', 'en', 0, 0, 2); + INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('icon_contact_jabber', 'icon_contact_jabber.gif', 'en', 0, 0, 2); + INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('icon_contact_msnm', 'icon_contact_msnm.gif', 'en', 0, 0, 2); + INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('icon_contact_pm', 'icon_contact_pm.gif', 'en', 0, 0, 2); + INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('icon_contact_yahoo', 'icon_contact_yahoo.gif', 'en', 0, 0, 2); + INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('icon_contact_www', 'icon_contact_www.gif', 'en', 0, 0, 2); + INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('icon_post_delete', 'icon_post_delete.gif', 'en', 0, 0, 2); + INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('icon_post_edit', 'icon_post_edit.gif', 'en', 0, 0, 2); + INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('icon_post_info', 'icon_post_info.gif', 'en', 0, 0, 2); + INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('icon_post_quote', 'icon_post_quote.gif', 'en', 0, 0, 2); + INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('icon_post_report', 'icon_post_report.gif', 'en', 0, 0, 2); + INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('icon_user_online', 'icon_user_online.gif', 'en', 0, 0, 2); + INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('icon_user_offline', 'icon_user_offline.gif', 'en', 0, 0, 2); + INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('icon_user_profile', 'icon_user_profile.gif', 'en', 0, 0, 2); + INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('icon_user_search', 'icon_user_search.gif', 'en', 0, 0, 2); + INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('icon_user_warn', 'icon_user_warn.gif', 'en', 0, 0, 2); + INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('button_pm_new', 'button_pm_new.gif', 'en', 0, 0, 2); + INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('button_pm_reply', 'button_pm_reply.gif', 'en', 0, 0, 2); + INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('button_topic_locked', 'button_topic_locked.gif', 'en', 0, 0, 2); + INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('button_topic_new', 'button_topic_new.gif', 'en', 0, 0, 2); + INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('button_topic_reply', 'button_topic_reply.gif', 'en', 0, 0, 2); + INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('site_logo', 'site_logo.gif', '', 52, 139, 1); + INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('forum_link', 'forum_link.gif', '', 27, 27, 1); + INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('forum_read', 'forum_read.gif', '', 27, 27, 1); + INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('forum_read_locked', 'forum_read_locked.gif', '', 27, 27, 1); + INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('forum_read_subforum', 'forum_read_subforum.gif', '', 27, 27, 1); + INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('forum_unread', 'forum_unread.gif', '', 27, 27, 1); + INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('forum_unread_locked', 'forum_unread_locked.gif', '', 27, 27, 1); + INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('forum_unread_subforum', 'forum_unread_subforum.gif', '', 27, 27, 1); + INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('topic_moved', 'topic_moved.gif', '', 27, 27, 1); + INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('topic_read', 'topic_read.gif', '', 27, 27, 1); + INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('topic_read_mine', 'topic_read_mine.gif', '', 27, 27, 1); + INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('topic_read_hot', 'topic_read_hot.gif', '', 27, 27, 1); + INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('topic_read_hot_mine', 'topic_read_hot_mine.gif', '', 27, 27, 1); + INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('topic_read_locked', 'topic_read_locked.gif', '', 27, 27, 1); + INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('topic_read_locked_mine', 'topic_read_locked_mine.gif', '', 27, 27, 1); + INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('topic_unread', 'topic_unread.gif', '', 27, 27, 1); + INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('topic_unread_mine', 'topic_unread_mine.gif', '', 27, 27, 1); + INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('topic_unread_hot', 'topic_unread_hot.gif', '', 27, 27, 1); + INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('topic_unread_hot_mine', 'topic_unread_hot_mine.gif', '', 27, 27, 1); + INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('topic_unread_locked', 'topic_unread_locked.gif', '', 27, 27, 1); + INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('topic_unread_locked_mine', 'topic_unread_locked_mine.gif', '', 27, 27, 1); + INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('sticky_read', 'sticky_read.gif', '', 27, 27, 1); + INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('sticky_read_mine', 'sticky_read_mine.gif', '', 27, 27, 1); + INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('sticky_read_locked', 'sticky_read_locked.gif', '', 27, 27, 1); + INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('sticky_read_locked_mine', 'sticky_read_locked_mine.gif', '', 27, 27, 1); + INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('sticky_unread', 'sticky_unread.gif', '', 27, 27, 1); + INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('sticky_unread_mine', 'sticky_unread_mine.gif', '', 27, 27, 1); + INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('sticky_unread_locked', 'sticky_unread_locked.gif', '', 27, 27, 1); + INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('sticky_unread_locked_mine', 'sticky_unread_locked_mine.gif', '', 27, 27, 1); + INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('announce_read', 'announce_read.gif', '', 27, 27, 1); + INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('announce_read_mine', 'announce_read_mine.gif', '', 27, 27, 1); + INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('announce_read_locked', 'announce_read_locked.gif', '', 27, 27, 1); + INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('announce_read_locked_mine', 'announce_read_locked_mine.gif', '', 27, 27, 1); + INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('announce_unread', 'announce_unread.gif', '', 27, 27, 1); + INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('announce_unread_mine', 'announce_unread_mine.gif', '', 27, 27, 1); + INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('announce_unread_locked', 'announce_unread_locked.gif', '', 27, 27, 1); + INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('announce_unread_locked_mine', 'announce_unread_locked_mine.gif', '', 27, 27, 1); + INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('global_read', 'announce_read.gif', '', 27, 27, 1); + INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('global_read_mine', 'announce_read_mine.gif', '', 27, 27, 1); + INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('global_read_locked', 'announce_read_locked.gif', '', 27, 27, 1); + INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('global_read_locked_mine', 'announce_read_locked_mine.gif', '', 27, 27, 1); + INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('global_unread', 'announce_unread.gif', '', 27, 27, 1); + INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('global_unread_mine', 'announce_unread_mine.gif', '', 27, 27, 1); + INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('global_unread_locked', 'announce_unread_locked.gif', '', 27, 27, 1); + INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('global_unread_locked_mine', 'announce_unread_locked_mine.gif', '', 27, 27, 1); + INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('pm_read', 'topic_read.gif', '', 27, 27, 1); + INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('pm_unread', 'topic_unread.gif', '', 27, 27, 1); + INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('icon_back_top', 'icon_back_top.gif', '', 11, 11, 1); + INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('icon_contact_aim', 'icon_contact_aim.gif', '', 20, 20, 1); + INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('icon_contact_email', 'icon_contact_email.gif', '', 20, 20, 1); + INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('icon_contact_icq', 'icon_contact_icq.gif', '', 20, 20, 1); + INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('icon_contact_jabber', 'icon_contact_jabber.gif', '', 20, 20, 1); + INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('icon_contact_msnm', 'icon_contact_msnm.gif', '', 20, 20, 1); + INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('icon_contact_www', 'icon_contact_www.gif', '', 20, 20, 1); + INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('icon_contact_yahoo', 'icon_contact_yahoo.gif', '', 20, 20, 1); + INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('icon_post_delete', 'icon_post_delete.gif', '', 20, 20, 1); + INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('icon_post_info', 'icon_post_info.gif', '', 20, 20, 1); + INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('icon_post_report', 'icon_post_report.gif', '', 20, 20, 1); + INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('icon_post_target', 'icon_post_target.gif', '', 9, 11, 1); + INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('icon_post_target_unread', 'icon_post_target_unread.gif', '', 9, 11, 1); + INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('icon_topic_attach', 'icon_topic_attach.gif', '', 10, 7, 1); + INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('icon_topic_latest', 'icon_topic_latest.gif', '', 9, 11, 1); + INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('icon_topic_newest', 'icon_topic_newest.gif', '', 9, 11, 1); + INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('icon_topic_reported', 'icon_topic_reported.gif', '', 14, 16, 1); + INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('icon_topic_unapproved', 'icon_topic_unapproved.gif', '', 14, 16, 1); + INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('icon_user_profile', 'icon_user_profile.gif', '', 11, 11, 1); + INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('icon_user_warn', 'icon_user_warn.gif', '', 20, 20, 1); + INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('subforum_read', 'subforum_read.gif', '', 9, 11, 1); + INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('subforum_unread', 'subforum_unread.gif', '', 9, 11, 1); + INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('icon_contact_pm', 'icon_contact_pm.gif', 'en', 20, 28, 1); + INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('icon_post_edit', 'icon_post_edit.gif', 'en', 20, 42, 1); + INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('icon_post_quote', 'icon_post_quote.gif', 'en', 20, 54, 1); + INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('icon_user_online', 'icon_user_online.gif', 'en', 58, 58, 1); + INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('icon_user_offline', 'icon_user_offline.gif', 'en', 0, 0, 1); + INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('icon_user_search', 'icon_user_search.gif', 'en', 0, 0, 1); + INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('button_pm_forward', 'button_pm_forward.gif', 'en', 25, 96, 1); + INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('button_pm_new', 'button_pm_new.gif', 'en', 25, 84, 1); + INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('button_pm_reply', 'button_pm_reply.gif', 'en', 25, 96, 1); + INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('button_topic_locked', 'button_topic_locked.gif', 'en', 25, 88, 1); + INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('button_topic_new', 'button_topic_new.gif', 'en', 25, 96, 1); + INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('button_topic_reply', 'button_topic_reply.gif', 'en', 25, 96, 1);"; - // Because the email hash could have been calculated wrongly as well as the clean string function changed, - // we will update it for every user. + $data = str_replace('phpbb_', $table_prefix, $data); + $sql_ary = explode("\n", $data); - // Since this is not used in a live environment there are not much... not used in a live environment, yes! - $sql = 'SELECT user_id, user_email, username - FROM ' . USERS_TABLE; + foreach ($sql_ary as $sql) + { + $db->sql_query($sql); + } + + $user_char_ary = array('.*' => 'USERNAME_CHARS_ANY', '[a-z]+' => 'USERNAME_ALPHA_ONLY', '[-\]_+ [a-z]+' => 'USERNAME_ALPHA_SPACERS', '\w+' => 'USERNAME_LETTER_NUM', '[-\]_+ [\w]+' => 'USERNAME_LETTER_NUM_SPACERS', '[\x01-\x7F]+' => 'USERNAME_ASCII'); + + set_config('allow_name_chars', $config['allow_name_chars']); + + // sorting thang + if ($map_dbms === 'mysql_41') + { + sql_column_change($map_dbms, TOPICS_TABLE, 'topic_title', array('XSTEXT_UNI', '', 'true_sort')); + } + + if ($config['fulltext_native_common_thres'] == 20) + { + set_config('fulltext_native_common_thres', '5'); + } + + set_config('default_style', '1'); + + $sql = 'SELECT m.word_id, COUNT(m.word_id) as word_count + FROM ' . SEARCH_WORDMATCH_TABLE . ' m, ' . SEARCH_WORDLIST_TABLE . ' w + WHERE m.word_id = w.word_id + AND w.word_common = 0 + GROUP BY m.word_id + ORDER BY word_count ASC'; $result = $db->sql_query($sql); + $value = 0; + $sql_in = array(); while ($row = $db->sql_fetchrow($result)) { - $sql = 'UPDATE ' . USERS_TABLE . " - SET username_clean = '" . $db->sql_escape(utf8_clean_string($row['username'])) . "'"; - - if ($row['user_email']) + if ($value != $row['word_count'] && $value != 0 || sizeof($sql_in) > 500) { - $sql .= ', user_email_hash = ' . (crc32($row['user_email']) . strlen($row['user_email'])); + $sql = 'UPDATE ' . SEARCH_WORDLIST_TABLE . ' + SET word_count = ' . $value . ' + WHERE ' . $db->sql_in_set('word_id', $sql_in); + $db->sql_query($sql); + $sql_in = array(); } - - $sql .= ' WHERE user_id = ' . $row['user_id']; - _sql($sql, $errored, $error_ary); + $value = $row['word_count']; + $sql_in[] = $row['word_id']; } - $db->sql_freeresult($result); + + if (sizeof($sql_in)) + { + $sql = 'UPDATE ' . SEARCH_WORDLIST_TABLE . ' + SET word_count = ' . $value . ' + WHERE ' . $db->sql_in_set('word_id', $sql_in); + $db->sql_query($sql); + } + unset($sql_in); + + set_config('avatar_salt', md5(mt_rand())); + set_config('captcha_gd_x_grid', 25); + set_config('captcha_gd_y_grid', 25); + set_config('captcha_gd_foreground_noise', 1); + + $sql = 'UPDATE ' . ACL_OPTIONS_TABLE . " + SET is_local = 0 + WHERE auth_option = 'm_warn'"; + $db->sql_query($sql); + + $cache->destroy('_acl_options'); + + $sql = 'UPDATE ' . MODULES_TABLE . ' + SET module_auth = \'acl_m_warn && acl_f_read,$id\' + WHERE module_basename = \'warn\' + AND module_mode = \'warn_post\' + AND module_class = \'mcp\''; + $db->sql_query($sql); + + $cache->destroy('_modules_mcp'); + + $sql = 'UPDATE ' . USERS_TABLE . " SET user_permissions = ''"; + $db->sql_query($sql); $no_updates = false; } @@ -719,9 +1218,9 @@ else { ?> -

    +

    -

    »

    +

    ">»

    purge();
    +
    @@ -946,11 +1446,24 @@ function prepare_column_data($dbms, $column_data) $sql .= " {$column_type} "; // For hexadecimal values do not use single quotes - if (!is_null($column_data[1]) && substr($column_type, -4) !== 'text') + if (!is_null($column_data[1]) && substr($column_type, -4) !== 'text' && substr($column_type, -4) !== 'blob') { $sql .= (strpos($column_data[1], '0x') === 0) ? "DEFAULT {$column_data[1]} " : "DEFAULT '{$column_data[1]}' "; } $sql .= 'NOT NULL'; + + if (isset($column_data[2])) + { + if ($column_data[2] == 'auto_increment') + { + $sql .= ' auto_increment'; + } + else if ($dbms === 'mysql_41' && $column_data[2] == 'true_sort') + { + $sql .= ' COLLATE utf8_unicode_ci'; + } + } + break; case 'oracle': @@ -976,7 +1489,18 @@ function prepare_column_data($dbms, $column_data) break; case 'sqlite': - $sql .= ' ' . $column_type . ' NOT NULL '; +/* if (isset($column_data[2]) && $column_data[2] == 'auto_increment') + { + $sql .= ' INTEGER PRIMARY KEY'; + } + else + { + $sql .= ' ' . $column_type; + } +*/ + $sql .= ' ' . $column_type; + + $sql .= ' NOT NULL '; $sql .= (!is_null($column_data[1])) ? "DEFAULT '{$column_data[1]}'" : ''; break; } @@ -1026,12 +1550,13 @@ function sql_column_add($dbms, $table_name, $column_name, $column_data) case 'sqlite': if (version_compare(sqlite_libversion(), '3.0') == -1) { + global $db; $sql = "SELECT sql FROM sqlite_master WHERE type = 'table' AND name = '{$table_name}' ORDER BY type DESC, name;"; - $result = _sql($sql, $errored, $error_ary); + $result = $db->sql_query($sql); if (!$result) { @@ -1051,13 +1576,13 @@ function sql_column_add($dbms, $table_name, $column_name, $column_data) preg_match('#\((.*)\)#s', $row['sql'], $matches); $new_table_cols = trim($matches[1]); - $old_table_cols = preg_split('/,(?=[\\sa-z])/im', $new_table_cols); + $old_table_cols = preg_split('/,(?![\s\w]+\))/m', $new_table_cols); $column_list = array(); foreach ($old_table_cols as $declaration) { $entities = preg_split('#\s+#', trim($declaration)); - if ($entities == 'PRIMARY') + if ($entities[0] == 'PRIMARY') { continue; } @@ -1084,6 +1609,103 @@ function sql_column_add($dbms, $table_name, $column_name, $column_data) } } +/** +* Drop column +*/ +function sql_column_remove($dbms, $table_name, $column_name) +{ + global $errored, $error_ary; + + switch ($dbms) + { + case 'firebird': + $sql = 'ALTER TABLE "' . $table_name . '" DROP "' . $column_name . '"'; + _sql($sql, $errored, $error_ary); + break; + + case 'mssql': + $sql = 'ALTER TABLE [' . $table_name . '] DROP COLUMN [' . $column_name . ']'; + _sql($sql, $errored, $error_ary); + break; + + case 'mysql_40': + case 'mysql_41': + $sql = 'ALTER TABLE `' . $table_name . '` DROP COLUMN `' . $column_name . '`'; + _sql($sql, $errored, $error_ary); + break; + + case 'oracle': + $sql = 'ALTER TABLE ' . $table_name . ' DROP ' . $column_name; + _sql($sql, $errored, $error_ary); + break; + + case 'postgres': + $sql = 'ALTER TABLE ' . $table_name . ' DROP COLUMN "' . $column_name . '"'; + _sql($sql, $errored, $error_ary); + break; + + case 'sqlite': + if (version_compare(sqlite_libversion(), '3.0') == -1) + { + global $db; + $sql = "SELECT sql + FROM sqlite_master + WHERE type = 'table' + AND name = '{$table_name}' + ORDER BY type DESC, name;"; + $result = $db->sql_query($sql); + + if (!$result) + { + break; + } + + $row = $db->sql_fetchrow($result); + $db->sql_freeresult($result); + + $db->sql_transaction('begin'); + + // Create a backup table and populate it, destroy the existing one + $db->sql_query(preg_replace('#CREATE\s+TABLE\s+"?' . $table_name . '"?#i', 'CREATE TEMPORARY TABLE ' . $table_name . '_temp', $row['sql'])); + $db->sql_query('INSERT INTO ' . $table_name . '_temp SELECT * FROM ' . $table_name); + $db->sql_query('DROP TABLE ' . $table_name); + + preg_match('#\((.*)\)#s', $row['sql'], $matches); + + $new_table_cols = trim($matches[1]); + $old_table_cols = preg_split('/,(?![\s\w]+\))/m', $new_table_cols); + $column_list = array(); + + foreach ($old_table_cols as $declaration) + { + $entities = preg_split('#\s+#', trim($declaration)); + if ($entities[0] == 'PRIMARY' || $entities[0] === '$column_name') + { + continue; + } + $column_list[] = $entities[0]; + } + + $columns = implode(',', $column_list); + + $new_table_cols = $new_table_cols = preg_replace('/' . $column_name . '[^,]+(?:,|$)/m', '', $new_table_cols); + + // create a new table and fill it up. destroy the temp one + $db->sql_query('CREATE TABLE ' . $table_name . ' (' . $new_table_cols . ');'); + $db->sql_query('INSERT INTO ' . $table_name . ' (' . $columns . ') SELECT ' . $columns . ' FROM ' . $table_name . '_temp;'); + $db->sql_query('DROP TABLE ' . $table_name . '_temp'); + + $db->sql_transaction('commit'); + } + else + { + $sql = 'ALTER TABLE ' . $table_name . ' DROP COLUMN ' . $column_name; + _sql($sql, $errored, $error_ary); + } + break; + } +} + function sql_index_drop($dbms, $index_name, $table_name) { global $dbms_type_map, $db; @@ -1170,13 +1792,13 @@ function sql_create_primary_key($dbms, $table_name, $column) preg_match('#\((.*)\)#s', $row['sql'], $matches); $new_table_cols = trim($matches[1]); - $old_table_cols = preg_split('/,(?=[\\sa-z])/im', $new_table_cols); + $old_table_cols = preg_split('/,(?![\s\w]+\))/m', $new_table_cols); $column_list = array(); foreach ($old_table_cols as $declaration) { $entities = preg_split('#\s+#', trim($declaration)); - if ($entities == 'PRIMARY') + if ($entities[0] == 'PRIMARY') { continue; } @@ -1195,6 +1817,54 @@ function sql_create_primary_key($dbms, $table_name, $column) } } +function sql_create_unique_index($dbms, $index_name, $table_name, $column) +{ + global $dbms_type_map, $db; + global $errored, $error_ary; + + switch ($dbms) + { + case 'firebird': + case 'postgres': + case 'mysql_40': + case 'mysql_41': + case 'oracle': + case 'sqlite': + $sql = 'CREATE UNIQUE INDEX ' . $index_name . ' ON ' . $table_name . '(' . implode(', ', $column) . ')'; + _sql($sql, $errored, $error_ary); + break; + + case 'mssql': + $sql = 'CREATE UNIQUE INDEX ' . $index_name . ' ON ' . $table_name . '(' . implode(', ', $column) . ') ON [PRIMARY]'; + _sql($sql, $errored, $error_ary); + break; + } +} + +function sql_create_index($dbms, $index_name, $table_name, $column) +{ + global $dbms_type_map, $db; + global $errored, $error_ary; + + switch ($dbms) + { + case 'firebird': + case 'postgres': + case 'mysql_40': + case 'mysql_41': + case 'oracle': + case 'sqlite': + $sql = 'CREATE INDEX ' . $index_name . ' ON ' . $table_name . '(' . implode(', ', $column) . ')'; + _sql($sql, $errored, $error_ary); + break; + + case 'mssql': + $sql = 'CREATE INDEX ' . $index_name . ' ON ' . $table_name . '(' . implode(', ', $column) . ') ON [PRIMARY]'; + _sql($sql, $errored, $error_ary); + break; + } +} + /** * Change column type (not name!) */ @@ -1261,7 +1931,7 @@ function sql_column_change($dbms, $table_name, $column_name, $column_data) preg_match('#\((.*)\)#s', $row['sql'], $matches); $new_table_cols = trim($matches[1]); - $old_table_cols = preg_split('/,(?=[\\sa-z])/im', $new_table_cols); + $old_table_cols = preg_split('/,(?![\s\w]+\))/m', $new_table_cols); $column_list = array(); foreach ($old_table_cols as $key => $declaration) @@ -1287,179 +1957,4 @@ function sql_column_change($dbms, $table_name, $column_name, $column_data) } } -/** -* Add search robots to the database -* @ignore -*/ -function add_bots() -{ - global $db, $config, $phpbb_root_path, $phpEx; - - $sql = 'SELECT * - FROM ' . CONFIG_TABLE; - $result = $db->sql_query($sql); - - $config = array(); - while ($row = $db->sql_fetchrow($result)) - { - $config[$row['config_name']] = $row['config_value']; - } - $db->sql_freeresult($result); - - // Obtain any submitted data - $sql = 'SELECT group_id - FROM ' . GROUPS_TABLE . " - WHERE group_name = 'BOTS'"; - $result = $db->sql_query($sql); - $group_id = (int) $db->sql_fetchfield('group_id'); - $db->sql_freeresult($result); - - if (!$group_id) - { - return; - } - - // First of all, remove the old bots... - $sql = 'SELECT bot_id - FROM ' . BOTS_TABLE . " - WHERE bot_name IN ('Alexa', 'Fastcrawler', 'Googlebot', 'Inktomi')"; - $result = $db->sql_query($sql); - - $bot_ids = array(); - while ($row = $db->sql_fetchrow($result)) - { - $bot_ids[] = $row['bot_id']; - } - $db->sql_freeresult($result); - - if (sizeof($bot_ids)) - { - // We need to delete the relevant user, usergroup and bot entries ... - $sql_id = ' IN (' . implode(', ', $bot_ids) . ')'; - - $sql = 'SELECT bot_name, user_id - FROM ' . BOTS_TABLE . " - WHERE bot_id $sql_id"; - $result = $db->sql_query($sql); - - $user_id_ary = array(); - while ($row = $db->sql_fetchrow($result)) - { - $user_id_ary[] = (int) $row['user_id']; - } - $db->sql_freeresult($result); - - $sql = 'DELETE FROM ' . BOTS_TABLE . " - WHERE bot_id $sql_id"; - $db->sql_query($sql); - - $_tables = array(USERS_TABLE, USER_GROUP_TABLE); - foreach ($_tables as $table) - { - $sql = "DELETE FROM $table - WHERE " . $db->sql_in_set('user_id', $user_id_ary); - $db->sql_query($sql); - } - } - else - { - // If the old bots are missing we can safely assume the user tries to execute the database update twice and - // fiddled around... - return; - } - - if (!function_exists('user_add')) - { - include($phpbb_root_path . 'includes/functions_user.' . $phpEx); - } - - global $errored, $error_ary; - - $bot_list = array( - 'AdsBot [Google]' => array('AdsBot-Google', ''), - 'Alexa [Bot]' => array('ia_archiver', ''), - 'Alta Vista [Bot]' => array('Scooter/', ''), - 'Ask Jeeves [Bot]' => array('Ask Jeeves', ''), - 'Baidu [Spider]' => array('Baiduspider+(', ''), - 'Exabot [Bot]' => array('Exabot/', ''), - 'FAST Enterprise [Crawler]' => array('FAST Enterprise Crawler', ''), - 'FAST WebCrawler [Crawler]' => array('FAST-WebCrawler/', ''), - 'Francis [Bot]' => array('http://www.neomo.de/', ''), - 'Gigabot [Bot]' => array('Gigabot/', ''), - 'Google Adsense [Bot]' => array('Mediapartners-Google/', ''), - 'Google Desktop' => array('Google Desktop', ''), - 'Google Feedfetcher' => array('Feedfetcher-Google', ''), - 'Google [Bot]' => array('Googlebot', ''), - 'Heise IT-Markt [Crawler]' => array('heise-IT-Markt-Crawler', ''), - 'Heritrix [Crawler]' => array('heritrix/1.', ''), - 'IBM Research [Bot]' => array('ibm.com/cs/crawler', ''), - 'ICCrawler - ICjobs' => array('ICCrawler - ICjobs', ''), - 'ichiro [Crawler]' => array('ichiro/2', ''), - 'Majestic-12 [Bot]' => array('MJ12bot/', ''), - 'Metager [Bot]' => array('MetagerBot/', ''), - 'MSN NewsBlogs' => array('msnbot-NewsBlogs/', ''), - 'MSN [Bot]' => array('msnbot/', ''), - 'MSNbot Media' => array('msnbot-media/', ''), - 'NG-Search [Bot]' => array('NG-Search/', ''), - 'Nutch [Bot]' => array('http://lucene.apache.org/nutch/', ''), - 'Nutch/CVS [Bot]' => array('NutchCVS/', ''), - 'OmniExplorer [Bot]' => array('OmniExplorer_Bot/', ''), - 'Online link [Validator]' => array('online link validator', ''), - 'psbot [Picsearch]' => array('psbot/0', ''), - 'Seekport [Bot]' => array('Seekbot/', ''), - 'Sensis [Crawler]' => array('Sensis Web Crawler', ''), - 'SEO Crawler' => array('SEO search Crawler/', ''), - 'Seoma [Crawler]' => array('Seoma [SEO Crawler]', ''), - 'SEOSearch [Crawler]' => array('SEOsearch/', ''), - 'Snappy [Bot]' => array('Snappy/1.1 ( http://www.urltrends.com/ )', ''), - 'Steeler [Crawler]' => array('http://www.tkl.iis.u-tokyo.ac.jp/~crawler/', ''), - 'Synoo [Bot]' => array('SynooBot/', ''), - 'Telekom [Bot]' => array('crawleradmin.t-info@telekom.de', ''), - 'TurnitinBot [Bot]' => array('TurnitinBot/', ''), - 'Voyager [Bot]' => array('voyager/1.0', ''), - 'W3 [Sitesearch]' => array('W3 SiteSearch Crawler', ''), - 'W3C [Linkcheck]' => array('W3C-checklink/', ''), - 'W3C [Validator]' => array('W3C_*Validator', ''), - 'WiseNut [Bot]' => array('http://www.WISEnutbot.com', ''), - 'Yacy [Bot]' => array('yacybot', ''), - 'Yahoo MMCrawler [Bot]' => array('Yahoo-MMCrawler/', ''), - 'Yahoo Slurp [Bot]' => array('Yahoo! DE Slurp', ''), - 'Yahoo [Bot]' => array('Yahoo! Slurp', ''), - 'YahooSeeker [Bot]' => array('YahooSeeker/', ''), - ); - - foreach ($bot_list as $bot_name => $bot_ary) - { - $user_row = array( - 'user_type' => USER_IGNORE, - 'group_id' => $group_id, - 'username' => $bot_name, - 'user_regdate' => time(), - 'user_password' => '', - 'user_colour' => '9E8DA7', - 'user_email' => '', - 'user_lang' => $config['default_lang'], - 'user_style' => 1, - 'user_timezone' => 0, - 'user_dateformat' => $config['default_dateformat'], - 'user_allow_massemail' => 0, - ); - - $user_id = user_add($user_row); - - if ($user_id) - { - $sql = 'INSERT INTO ' . BOTS_TABLE . ' ' . $db->sql_build_array('INSERT', array( - 'bot_active' => 1, - 'bot_name' => $bot_name, - 'user_id' => $user_id, - 'bot_agent' => $bot_ary[0], - 'bot_ip' => $bot_ary[1], - )); - - _sql($sql, $errored, $error_ary); - } - } -} - ?> \ No newline at end of file diff --git a/phpBB/install/index.php b/phpBB/install/index.php index 0a8a45b771..656b6fed95 100755 --- a/phpBB/install/index.php +++ b/phpBB/install/index.php @@ -22,7 +22,7 @@ $phpEx = substr(strrchr(__FILE__, '.'), 1); error_reporting(E_ALL ^ E_NOTICE); // @todo Review this test and see if we can find out what it is which prevents PHP 4.2.x from even displaying the page with requirements on it -if (version_compare(phpversion(), '4.3.0') < 0) +if (version_compare(PHP_VERSION, '4.3.3') < 0) { die('You are running an unsupported PHP version. Please upgrade to PHP 4.3.3 or higher before trying to install phpBB 3.0'); } @@ -82,7 +82,7 @@ function deregister_globals() } // If we are on PHP >= 6.0.0 we do not need some code -if (version_compare(phpversion(), '6.0.0-dev', '>=')) +if (version_compare(PHP_VERSION, '6.0.0-dev', '>=')) { /** * @ignore @@ -102,7 +102,9 @@ else define('STRIP', (get_magic_quotes_gpc()) ? true : false); } +// Try to override some limits - maybe it helps some... @set_time_limit(0); +@ini_set('memory_limit', '128M'); // Include essential scripts require($phpbb_root_path . 'includes/functions.' . $phpEx); @@ -113,9 +115,10 @@ include($phpbb_root_path . 'includes/acm/acm_file.' . $phpEx); include($phpbb_root_path . 'includes/cache.' . $phpEx); include($phpbb_root_path . 'includes/functions_admin.' . $phpEx); include($phpbb_root_path . 'includes/utf/utf_tools.' . $phpEx); +require($phpbb_root_path . 'includes/functions_install.' . $phpEx); // Try and load an appropriate language if required -$language = request_var('language', ''); +$language = basename(request_var('language', '')); if (!empty($_SERVER['HTTP_ACCEPT_LANGUAGE']) && !$language) { @@ -168,6 +171,11 @@ if (!$language) closedir($dir); } +if (!file_exists($phpbb_root_path . 'language/' . $language)) +{ + die('No language found!'); +} + // And finally, load the relevant language files include($phpbb_root_path . 'language/' . $language . '/common.' . $phpEx); include($phpbb_root_path . 'language/' . $language . '/acp/common.' . $phpEx); @@ -186,6 +194,11 @@ $auth = new auth(); $cache = new cache(); $template = new template(); +// Set some standard variables we want to force +$config = array( + 'load_tplcompile' => '1' +); + $template->set_custom_template('../adm/style', 'admin'); $template->assign_var('T_TEMPLATE_PATH', '../adm/style'); @@ -252,6 +265,9 @@ class module $this->error('No installation modules found', __LINE__, __FILE__); } + // Order to use and count further if modules get assigned to the same position or not having an order + $max_module_order = 1000; + foreach ($module as $row) { // Check any module pre-reqs @@ -259,6 +275,13 @@ class module { } + // Module order not specified or module already assigned at this position? + if (!isset($row['module_order']) || isset($this->module_ary[$row['module_order']])) + { + $row['module_order'] = $max_module_order; + $max_module_order++; + } + $this->module_ary[$row['module_order']]['name'] = $row['module_title']; $this->module_ary[$row['module_order']]['filename'] = $row['module_filename']; $this->module_ary[$row['module_order']]['subs'] = $row['module_subs']; @@ -332,6 +355,7 @@ class module 'L_CHANGE' => $lang['CHANGE'], 'L_INSTALL_PANEL' => $lang['INSTALL_PANEL'], 'L_SELECT_LANG' => $lang['SELECT_LANG'], + 'L_SKIP' => $lang['SKIP'], 'PAGE_TITLE' => $this->get_page_title(), 'T_IMAGE_PATH' => $phpbb_root_path . 'adm/images/', @@ -530,6 +554,7 @@ class module echo ' '; echo '
    '; + echo '
    '; echo '
    '; echo ' '; echo '
    '; @@ -540,9 +565,10 @@ class module echo '
    '; echo ' '; echo '
    '; + echo '
    '; echo '
    '; echo ' '; echo '
    '; echo ''; @@ -626,14 +652,14 @@ class module break; case 'radio': - $key_yes = ($value) ? ' checked="checked"' : ''; - $key_no = (!$value) ? ' checked="checked"' : ''; + $key_yes = ($value) ? ' checked="checked" id="' . $name . '"' : ''; + $key_no = (!$value) ? ' checked="checked" id="' . $name . '"' : ''; $tpl_type_cond = explode('_', $tpl_type[1]); $type_no = ($tpl_type_cond[0] == 'disabled' || $tpl_type_cond[0] == 'enabled') ? false : true; - $tpl_no = ' ' . (($type_no) ? $lang['NO'] : $lang['DISABLED']); - $tpl_yes = ' ' . (($type_no) ? $lang['YES'] : $lang['ENABLED']); + $tpl_no = ''; + $tpl_yes = ''; $tpl = ($tpl_type_cond[0] == 'yes' || $tpl_type_cond[0] == 'enabled') ? $tpl_yes . '  ' . $tpl_no : $tpl_no . '  ' . $tpl_yes; break; diff --git a/phpBB/install/install_convert.php b/phpBB/install/install_convert.php index 256dd13b67..c0129e3c29 100644 --- a/phpBB/install/install_convert.php +++ b/phpBB/install/install_convert.php @@ -39,12 +39,19 @@ class convert var $options = array(); var $convertor_tag = ''; + var $src_dbms = ''; + var $src_dbhost = ''; + var $src_dbport = ''; + var $src_dbuser = ''; + var $src_dbpasswd = ''; + var $src_dbname = ''; var $src_table_prefix = ''; var $convertor_data = array(); var $tables = array(); var $config_schema = array(); var $convertor = array(); + var $src_truncate_statement = 'DELETE FROM '; var $truncate_statement = 'DELETE FROM '; var $fulltext_search; @@ -83,7 +90,7 @@ class install_convert extends module function main($mode, $sub) { - global $lang, $template, $phpbb_root_path, $phpEx, $cache, $config; + global $lang, $template, $phpbb_root_path, $phpEx, $cache, $config, $language, $table_prefix; global $convert; $this->tpl_name = 'install_convert'; @@ -107,7 +114,7 @@ class install_convert extends module $template->assign_vars(array( 'S_NOT_INSTALLED' => true, 'TITLE' => $lang['BOARD_NOT_INSTALLED'], - 'BODY' => sprintf($lang['BOARD_NOT_INSTALLED_EXPLAIN'], append_sid($phpbb_root_path . 'install/index.' . $phpEx, 'mode=install')), + 'BODY' => sprintf($lang['BOARD_NOT_INSTALLED_EXPLAIN'], append_sid($phpbb_root_path . 'install/index.' . $phpEx, 'mode=install&language=' . $language)), )); return; @@ -119,7 +126,7 @@ class install_convert extends module require($phpbb_root_path . 'includes/functions_convert.' . $phpEx); $db = new $sql_db(); - $db->sql_connect($dbhost, $dbuser, $dbpasswd, $dbname, $dbport, false); + $db->sql_connect($dbhost, $dbuser, $dbpasswd, $dbname, $dbport, false, true); unset($dbpasswd); // We need to fill the config to let internal functions correctly work @@ -134,7 +141,6 @@ class install_convert extends module } $db->sql_freeresult($result); - // Detect if there is already a conversion in progress at this point and offer to resume // It's quite possible that the user will get disconnected during a large conversion so they need to be able to resume it $new_conversion = request_var('new_conv', 0); @@ -142,19 +148,32 @@ class install_convert extends module if ($new_conversion) { $config['convert_progress'] = ''; - $db->sql_query('DELETE FROM ' . CONFIG_TABLE . " WHERE config_name = 'convert_progress'"); + $config['convert_db_server'] = ''; + $config['convert_db_user'] = ''; + $db->sql_query('DELETE FROM ' . CONFIG_TABLE . " + WHERE config_name = 'convert_progress' + OR config_name = 'convert_db_server' + OR config_name = 'convert_db_user'" + ); } // Let's see if there is a conversion in the works... $options = array(); - if (!empty($config['convert_progress']) && !empty($config['convert_options'])) + if (!empty($config['convert_progress']) && !empty($config['convert_db_server']) && !empty($config['convert_db_user']) && !empty($config['convert_options'])) { $options = unserialize($config['convert_progress']); - $options = array_merge($options, unserialize($config['convert_options'])); + $options = array_merge($options, unserialize($config['convert_db_server']), unserialize($config['convert_db_user']), unserialize($config['convert_options'])); } // This information should have already been checked once, but do it again for safety - if (!empty($options) && !empty($options['tag']) && isset($options['table_prefix'])) + if (!empty($options) && !empty($options['tag']) && + isset($options['dbms']) && + isset($options['dbhost']) && + isset($options['dbport']) && + isset($options['dbuser']) && + isset($options['dbpasswd']) && + isset($options['dbname']) && + isset($options['table_prefix'])) { $this->page_title = $lang['CONTINUE_CONVERT']; @@ -165,23 +184,23 @@ class install_convert extends module 'L_CONTINUE' => $lang['CONTINUE_OLD_CONVERSION'], 'S_CONTINUE' => true, - 'U_NEW_ACTION' => $this->p_master->module_url . "?mode=$mode&sub=intro&new_conv=1", - 'U_CONTINUE_ACTION' => $this->p_master->module_url . "?mode=$mode&sub=in_progress&tag={$options['tag']}{$options['step']}", + 'U_NEW_ACTION' => $this->p_master->module_url . "?mode={$this->mode}&sub=intro&new_conv=1", + 'U_CONTINUE_ACTION' => $this->p_master->module_url . "?mode={$this->mode}&sub=in_progress&tag={$options['tag']}{$options['step']}", )); return; } - $this->list_convertors($mode, $sub); + $this->list_convertors($sub); break; case 'settings': - $this->get_convert_settings($mode, $sub); + $this->get_convert_settings($sub); break; case 'in_progress': - $this->convert_data($mode, $sub); + $this->convert_data($sub); break; case 'final': @@ -191,7 +210,48 @@ class install_convert extends module 'TITLE' => $lang['CONVERT_COMPLETE'], 'BODY' => $lang['CONVERT_COMPLETE_EXPLAIN'], )); - + + // If we reached this step (conversion completed) we want to purge the cache and log the user out. + // This is for making sure the session get not screwed due to the 3.0.x users table being completely new. + $cache->purge(); + + require($phpbb_root_path . 'config.' . $phpEx); + require($phpbb_root_path . 'includes/constants.' . $phpEx); + require($phpbb_root_path . 'includes/db/' . $dbms . '.' . $phpEx); + require($phpbb_root_path . 'includes/functions_convert.' . $phpEx); + + $db = new $sql_db(); + $db->sql_connect($dbhost, $dbuser, $dbpasswd, $dbname, $dbport, false, true); + unset($dbpasswd); + + $sql = 'SELECT config_value + FROM ' . CONFIG_TABLE . ' + WHERE config_name = \'search_type\''; + $result = $db->sql_query($sql); + + if ($db->sql_fetchfield('config_value') != 'fulltext_mysql') + { + $template->assign_vars(array( + 'S_ERROR_BOX' => true, + 'ERROR_TITLE' => $lang['SEARCH_INDEX_UNCONVERTED'], + 'ERROR_MSG' => $lang['SEARCH_INDEX_UNCONVERTED_EXPLAIN'], + )); + } + + switch ($db->sql_layer) + { + case 'sqlite': + case 'firebird': + $db->sql_query('DELETE FROM ' . SESSIONS_KEYS_TABLE); + $db->sql_query('DELETE FROM ' . SESSIONS_TABLE); + break; + + default: + $db->sql_query('TRUNCATE TABLE ' . SESSIONS_KEYS_TABLE); + $db->sql_query('TRUNCATE TABLE ' . SESSIONS_TABLE); + break; + } + break; } } @@ -199,7 +259,7 @@ class install_convert extends module /** * Generate a list of all available conversion modules */ - function list_convertors($mode, $sub) + function list_convertors($sub) { global $lang, $template, $phpbb_root_path, $phpEx; @@ -232,7 +292,7 @@ class install_convert extends module while ($entry = readdir($handle)) { - if (preg_match('/^convert_([a-z0-9_]+).' . $phpEx . '/i', $entry, $m)) + if (preg_match('/^convert_([a-z0-9_]+).' . $phpEx . '$/i', $entry, $m)) { include('./convertors/' . $entry); if (isset($convertor_data)) @@ -243,6 +303,12 @@ class install_convert extends module 'tag' => $m[1], 'forum_name' => $convertor_data['forum_name'], 'version' => $convertor_data['version'], + 'dbms' => $convertor_data['dbms'], + 'dbhost' => $convertor_data['dbhost'], + 'dbport' => $convertor_data['dbport'], + 'dbuser' => $convertor_data['dbuser'], + 'dbpasswd' => $convertor_data['dbpasswd'], + 'dbname' => $convertor_data['dbname'], 'table_prefix' => $convertor_data['table_prefix'], 'author' => $convertor_data['author'] ); @@ -261,14 +327,14 @@ class install_convert extends module 'SOFTWARE' => $convertors[$index]['forum_name'], 'VERSION' => $convertors[$index]['version'], - 'U_CONVERT' => $this->p_master->module_url . "?mode=$mode&sub=settings&tag=" . $convertors[$index]['tag'], + 'U_CONVERT' => $this->p_master->module_url . "?mode={$this->mode}&sub=settings&tag=" . $convertors[$index]['tag'], )); } } /** */ - function get_convert_settings($mode, $sub) + function get_convert_settings($sub) { global $lang, $template, $db, $phpbb_root_path, $phpEx, $config, $cache; @@ -278,7 +344,7 @@ class install_convert extends module require($phpbb_root_path . 'includes/functions_convert.' . $phpEx); $db = new $sql_db(); - $db->sql_connect($dbhost, $dbuser, $dbpasswd, $dbname, $dbport, false); + $db->sql_connect($dbhost, $dbuser, $dbpasswd, $dbname, $dbport, false, true); unset($dbpasswd); $this->page_title = $lang['STAGE_SETTINGS']; @@ -320,6 +386,12 @@ class install_convert extends module $submit = (isset($_POST['submit'])) ? true : false; + $src_dbms = request_var('src_dbms', $convertor_data['dbms']); + $src_dbhost = request_var('src_dbhost', $convertor_data['dbhost']); + $src_dbport = request_var('src_dbport', $convertor_data['dbport']); + $src_dbuser = request_var('src_dbuser', $convertor_data['dbuser']); + $src_dbpasswd = request_var('src_dbpasswd', $convertor_data['dbpasswd']); + $src_dbname = request_var('src_dbname', $convertor_data['dbname']); $src_table_prefix = request_var('src_table_prefix', $convertor_data['table_prefix']); $forum_path = request_var('forum_path', $convertor_data['forum_path']); $refresh = request_var('refresh', 1); @@ -329,6 +401,9 @@ class install_convert extends module // -> We should convert old urls to the new relative urls format // $src_url = request_var('src_url', 'Not in use at the moment'); + // strip trailing slash from old forum path + $forum_path = (strlen($forum_path) && $forum_path[strlen($forum_path) - 1] == '/') ? substr($forum_path, 0, -1) : $forum_path; + $error = array(); if ($submit) { @@ -337,10 +412,22 @@ class install_convert extends module $error[] = sprintf($lang['COULD_NOT_FIND_PATH'], $forum_path); } - // The forum prefix of the old and the new forum can't be the same because the - // convertor requires all tables to be in one database. I.e. there can't be - // two tables named 'phpbb_users' - if ($src_table_prefix == $table_prefix) + $connect_test = false; + $available_dbms = get_available_dbms(false, true, true); + + if (!isset($available_dbms[$src_dbms]) || !$available_dbms[$src_dbms]['AVAILABLE']) + { + $error['db'][] = $lang['INST_ERR_NO_DB']; + $connect_test = false; + } + else + { + $src_dbpasswd = htmlspecialchars_decode($src_dbpasswd); + $connect_test = connect_check_db(true, $error, $available_dbms[$src_dbms], $src_table_prefix, $src_dbhost, $src_dbuser, $src_dbpasswd, $src_dbname, $src_dbport, true, ($src_dbms == $dbms) ? false : true, false); + } + + // The forum prefix of the old and the new forum can only be the same if two different databases are used. + if ($src_table_prefix == $table_prefix && $src_dbms == $dbms && $src_dbhost == $dbhost && $src_dbport == $dbport && $src_dbname == $dbname) { $error[] = sprintf($lang['TABLE_PREFIX_SAME'], $src_table_prefix); } @@ -348,29 +435,39 @@ class install_convert extends module // Check table prefix if (!sizeof($error)) { + // initiate database connection to old db if old and new db differ + global $src_db, $same_db; + $src_db = $same_db = false; + + if ($src_dbms != $dbms || $src_dbhost != $dbhost || $src_dbport != $dbport || $src_dbname != $dbname || $src_dbuser != $dbuser) + { + $sql_db = 'dbal_' . $src_dbms; + $src_db = new $sql_db(); + $src_db->sql_connect($src_dbhost, $src_dbuser, $src_dbpasswd, $src_dbname, $src_dbport, false, true); + $same_db = false; + } + else + { + $src_db = $db; + $same_db = true; + } + + $src_db->sql_return_on_error(true); $db->sql_return_on_error(true); // Try to select one row from the first table to see if the prefix is OK - $result = $db->sql_query_limit('SELECT * FROM ' . $src_table_prefix . $tables[0], 1); + $result = $src_db->sql_query_limit('SELECT * FROM ' . $src_table_prefix . $tables[0], 1); if (!$result) { $prefixes = array(); - if ($result = $db->sql_query('SHOW TABLES')) + + $tables_existing = get_tables($src_db); + foreach ($tables_existing as $table_name) { - while ($row = $db->sql_fetchrow($result)) - { - if (sizeof($row) > 1) - { - compare_table($tables, $row[0], $prefixes); - } - else if (list(, $tablename) = @each($row)) - { - compare_table($tables, $tablename, $prefixes); - } - } - $db->sql_freeresult($result); + compare_table($tables, $table_name, $prefixes); } + unset($tables_existing); foreach ($prefixes as $prefix => $count) { @@ -396,14 +493,28 @@ class install_convert extends module $error[] = $msg; } - $db->sql_freeresult($result); - $db->sql_return_on_error(false); + $src_db->sql_freeresult($result); + $src_db->sql_return_on_error(false); } if (!sizeof($error)) { // Save convertor Status - set_config('convert_progress', serialize(array('step' => '', 'table_prefix' => $src_table_prefix, 'tag' => $convertor_tag)), true); + set_config('convert_progress', serialize(array( + 'step' => '', + 'table_prefix' => $src_table_prefix, + 'tag' => $convertor_tag, + )), true); + set_config('convert_db_server', serialize(array( + 'dbms' => $src_dbms, + 'dbhost' => $src_dbhost, + 'dbport' => $src_dbport, + 'dbname' => $src_dbname, + )), true); + set_config('convert_db_user', serialize(array( + 'dbuser' => $src_dbuser, + 'dbpasswd' => $src_dbpasswd, + )), true); // Save options set_config('convert_options', serialize(array('forum_path' => './../' . $forum_path, 'refresh' => $refresh)), true); @@ -416,7 +527,7 @@ class install_convert extends module $template->assign_vars(array( 'L_SUBMIT' => $lang['BEGIN_CONVERT'], // 'S_HIDDEN' => $s_hidden_fields, - 'U_ACTION' => $this->p_master->module_url . "?mode=$mode&sub=in_progress&tag=$convertor_tag", + 'U_ACTION' => $this->p_master->module_url . "?mode={$this->mode}&sub=in_progress&tag=$convertor_tag", )); return; @@ -462,14 +573,14 @@ class install_convert extends module $template->assign_vars(array( 'L_SUBMIT' => $lang['BEGIN_CONVERT'], - 'U_ACTION' => $this->p_master->module_url . "?mode=$mode&sub=settings&tag=$convertor_tag", + 'U_ACTION' => $this->p_master->module_url . "?mode={$this->mode}&sub=settings&tag=$convertor_tag", )); } /** * The function which does the actual work (or dispatches it to the relevant places) */ - function convert_data($mode, $sub) + function convert_data($sub) { global $template, $user, $phpbb_root_path, $phpEx, $db, $lang, $config, $cache; global $convert, $convert_row, $message_parser, $skip_rows; @@ -480,7 +591,7 @@ class install_convert extends module require($phpbb_root_path . 'includes/functions_convert.' . $phpEx); $db = new $sql_db(); - $db->sql_connect($dbhost, $dbuser, $dbpasswd, $dbname, $dbport, false); + $db->sql_connect($dbhost, $dbuser, $dbpasswd, $dbname, $dbport, false, true); unset($dbpasswd); $sql = 'SELECT * @@ -500,24 +611,6 @@ class install_convert extends module // @todo Need to confirm that max post length in source is <= max post length in destination or there may be interesting formatting issues $config['max_post_chars'] = -1; - $convert->mysql_convert = false; - - switch ($db->sql_layer) - { - // Thanks MySQL, for silently converting... - case 'mysql': - case 'mysql4': - if (version_compare($db->mysql_version, '4.1.3', '>=')) - { - $convert->mysql_convert = true; - } - break; - - case 'mysqli': - $convert->mysql_convert = true; - break; - } - // Set up a user as well. We _should_ have enough of a database here at this point to do this // and it helps for any core code we call $user->session_begin(); @@ -533,19 +626,96 @@ class install_convert extends module if (isset($config['convert_progress'])) { $convert->options = unserialize($config['convert_progress']); - $convert->options = array_merge($convert->options, unserialize($config['convert_options'])); + $convert->options = array_merge($convert->options, unserialize($config['convert_db_server']), unserialize($config['convert_db_user']), unserialize($config['convert_options'])); } // This information should have already been checked once, but do it again for safety - if (empty($convert->options) || empty($convert->options['tag']) || !isset($convert->options['table_prefix'])) + if (empty($convert->options) || empty($convert->options['tag']) || + !isset($convert->options['dbms']) || + !isset($convert->options['dbhost']) || + !isset($convert->options['dbport']) || + !isset($convert->options['dbuser']) || + !isset($convert->options['dbpasswd']) || + !isset($convert->options['dbname']) || + !isset($convert->options['table_prefix'])) { $this->p_master->error($user->lang['NO_CONVERT_SPECIFIED'], __LINE__, __FILE__); } // Make some short variables accessible, for easier referencing $convert->convertor_tag = basename($convert->options['tag']); + $convert->src_dbms = $convert->options['dbms']; + $convert->src_dbhost = $convert->options['dbhost']; + $convert->src_dbport = $convert->options['dbport']; + $convert->src_dbuser = $convert->options['dbuser']; + $convert->src_dbpasswd = $convert->options['dbpasswd']; + $convert->src_dbname = $convert->options['dbname']; $convert->src_table_prefix = $convert->options['table_prefix']; - $convert->truncate_statement = ($db->sql_layer != 'sqlite') ? 'TRUNCATE TABLE ' : 'DELETE FROM '; + + // initiate database connection to old db if old and new db differ + global $src_db, $same_db; + $src_db = $same_db = null; + if ($convert->src_dbms != $dbms || $convert->src_dbhost != $dbhost || $convert->src_dbport != $dbport || $convert->src_dbname != $dbname || $convert->src_dbuser != $dbuser) + { + if ($convert->src_dbms != $dbms) + { + require($phpbb_root_path . 'includes/db/' . $convert->src_dbms . '.' . $phpEx); + } + $sql_db = 'dbal_' . $convert->src_dbms; + $src_db = new $sql_db(); + $src_db->sql_connect($convert->src_dbhost, $convert->src_dbuser, $convert->src_dbpasswd, $convert->src_dbname, $convert->src_dbport, false, true); + $same_db = false; + } + else + { + $src_db = $db; + $same_db = true; + } + + $convert->mysql_convert = false; + switch ($src_db->sql_layer) + { + case 'sqlite': + case 'firebird': + $convert->src_truncate_statement = 'DELETE FROM '; + break; + + // Thanks MySQL, for silently converting... + case 'mysql': + case 'mysql4': + if (version_compare($src_db->mysql_version, '4.1.3', '>=')) + { + $convert->mysql_convert = true; + } + $convert->src_truncate_statement = 'TRUNCATE TABLE '; + break; + + case 'mysqli': + $convert->mysql_convert = true; + $convert->src_truncate_statement = 'TRUNCATE TABLE '; + break; + + default: + $convert->src_truncate_statement = 'TRUNCATE TABLE '; + break; + } + + if ($convert->mysql_convert && !$same_db) + { + $src_db->sql_query("SET NAMES 'binary'"); + } + + switch ($db->sql_layer) + { + case 'sqlite': + case 'firebird': + $convert->truncate_statement = 'DELETE FROM '; + break; + + default: + $convert->truncate_statement = 'TRUNCATE TABLE '; + break; + } $get_info = false; @@ -583,7 +753,14 @@ class install_convert extends module $this->p_master->error(sprintf($user->lang['COULD_NOT_FIND_PATH'], $convert->options['forum_path']), __LINE__, __FILE__); } - $search_type = $config['search_type']; + $search_type = basename(trim($config['search_type'])); + + // For conversions we are a bit less strict and set to a search backend we know exist... + if (!file_exists($phpbb_root_path . 'includes/search/' . $search_type . '.' . $phpEx)) + { + $search_type = 'fulltext_native'; + set_config('search_type', $search_type); + } if (!file_exists($phpbb_root_path . 'includes/search/' . $search_type . '.' . $phpEx)) { @@ -604,6 +781,7 @@ class install_convert extends module $message_parser = new parse_message(); $jump = request_var('jump', 0); + $final_jump = request_var('final_jump', 0); $sync_batch = request_var('sync_batch', -1); $last_statement = request_var('last', 0); @@ -620,6 +798,12 @@ class install_convert extends module return; } + if ($final_jump) + { + $this->final_jump($final_jump); + return; + } + $current_table = request_var('current_table', 0); $old_current_table = min(-1, $current_table - 1); $skip_rows = request_var('skip_rows', 0); @@ -649,7 +833,7 @@ class install_convert extends module $this->p_master->error($user->lang['DEV_NO_TEST_FILE'], __LINE__, __FILE__); } - if (!$local_path || !is_writeable($phpbb_root_path . $local_path)) + if (!$local_path || !@is_writable($phpbb_root_path . $local_path)) { if (!$local_path) { @@ -671,7 +855,7 @@ class install_convert extends module $template->assign_vars(array( 'L_SUBMIT' => $user->lang['INSTALL_TEST'], - 'U_ACTION' => $this->p_master->module_url . "?mode=$mode&sub=in_progress&tag={$convert->convertor_tag}", + 'U_ACTION' => $this->p_master->module_url . "?mode={$this->mode}&sub=in_progress&tag={$convert->convertor_tag}", )); return; } @@ -746,19 +930,19 @@ class install_convert extends module } // Check if the tables that we need exist - $db->sql_return_on_error(true); + $src_db->sql_return_on_error(true); foreach ($tables_list as $table => $null) { $sql = 'SELECT 1 FROM ' . $table; - $_result = $db->sql_query_limit($sql, 1); + $_result = $src_db->sql_query_limit($sql, 1); if (!$_result) { $missing_tables[] = $table; } - $db->sql_freeresult($_result); + $src_db->sql_freeresult($_result); } - $db->sql_return_on_error(false); + $src_db->sql_return_on_error(false); // Throw an error if some tables are missing // We used to do some guessing here, but since we have a suggestion of possible values earlier, I don't see it adding anything here to do it again @@ -772,11 +956,13 @@ class install_convert extends module $this->p_master->error(sprintf($user->lang['TABLES_MISSING'], implode(', ', $missing_tables)) . '

    ' . $user->lang['CHECK_TABLE_PREFIX'], __LINE__, __FILE__); } - $step = '&confirm=1'; - set_config('convert_progress', serialize(array('step' => $step, 'table_prefix' => $convert->src_table_prefix, 'tag' => $convert->convertor_tag)), true); + $url = $this->save_convert_progress('&confirm=1'); + $msg = $user->lang['PRE_CONVERT_COMPLETE']; - $msg = $user->lang['PRE_CONVERT_COMPLETE'] . '

    ' . sprintf($user->lang['AUTHOR_NOTES'], $convert->convertor_data['author_notes']); - $url = $this->p_master->module_url . "?mode=$mode&sub=in_progress&tag={$convert->convertor_tag}$step"; + if ($convert->convertor_data['author_notes']) + { + $msg .= '

    ' . sprintf($user->lang['AUTHOR_NOTES'], $convert->convertor_data['author_notes']); + } $template->assign_vars(array( 'L_SUBMIT' => $user->lang['CONTINUE_CONVERT'], @@ -796,6 +982,12 @@ class install_convert extends module if (!empty($convert->config_schema)) { restore_config($convert->config_schema); + + // Override a couple of config variables for the duration + $config['max_quote_depth'] = 0; + + // @todo Need to confirm that max post length in source is <= max post length in destination or there may be interesting formatting issues + $config['max_post_chars'] = -1; } $template->assign_block_vars('checks', array( @@ -813,12 +1005,33 @@ class install_convert extends module { if (!is_array($convert->convertor['query_first'])) { - $convert->convertor['query_first'] = array($convert->convertor['query_first']); + $convert->convertor['query_first'] = array('target', array($convert->convertor['query_first'])); + } + else if (!is_array($convert->convertor['query_first'][0])) + { + $convert->convertor['query_first'] = array(array($convert->convertor['query_first'][0], $convert->convertor['query_first'][1])); } foreach ($convert->convertor['query_first'] as $query_first) { - $db->sql_query($query_first); + if ($query_first[0] == 'src') + { + if ($convert->mysql_convert && $same_db) + { + $src_db->sql_query("SET NAMES 'binary'"); + } + + $src_db->sql_query($query_first[1]); + + if ($convert->mysql_convert && $same_db) + { + $src_db->sql_query("SET NAMES 'utf8'"); + } + } + else + { + $db->sql_query($query_first[1]); + } } } @@ -862,12 +1075,41 @@ class install_convert extends module { if (!is_array($schema['query_first'])) { - $schema['query_first'] = array($schema['query_first']); + $schema['query_first'] = array('target', array($schema['query_first'])); + } + else if (!is_array($schema['query_first'][0])) + { + $schema['query_first'] = array(array($schema['query_first'][0], $schema['query_first'][1])); } foreach ($schema['query_first'] as $query_first) { - $db->sql_query($query_first); + if ($query_first[0] == 'src') + { + if ($convert->mysql_convert && $same_db) + { + $src_db->sql_query("SET NAMES 'binary'"); + } + $src_db->sql_query($query_first[1]); + if ($convert->mysql_convert && $same_db) + { + $src_db->sql_query("SET NAMES 'utf8'"); + } + } + else + { + $db->sql_query($query_first[1]); + } + } + } + + if (!empty($schema['autoincrement'])) + { + switch ($db->sql_layer) + { + case 'postgres': + $db->sql_query("SELECT SETVAL('" . $schema['target'] . "_seq',(select case when max(" . $schema['autoincrement'] . ")>0 then max(" . $schema['autoincrement'] . ")+1 else 1 end from " . $schema['target'] . '));'); + break; } } } @@ -927,7 +1169,7 @@ class install_convert extends module $counting = -1; $batch_time = 0; - while (($counting === -1 || $counting >= $convert->batch_size) && still_on_time()) + while ($counting === -1 || ($counting >= $convert->batch_size && still_on_time())) { $old_current_table = $current_table; @@ -949,17 +1191,17 @@ class install_convert extends module $mtime = explode(' ', microtime()); $batch_time = $mtime[0] + $mtime[1]; - if ($convert->mysql_convert) + if ($convert->mysql_convert && $same_db) { - $db->sql_query("SET NAMES 'binary'"); + $src_db->sql_query("SET NAMES 'binary'"); } // Take skip rows into account and only fetch batch_size amount of rows - $___result = $db->sql_query_limit($sql, $convert->batch_size, $skip_rows); + $___result = $src_db->sql_query_limit($sql, $convert->batch_size, $skip_rows); - if ($convert->mysql_convert) + if ($convert->mysql_convert && $same_db) { - $db->sql_query("SET NAMES 'utf8'"); + $src_db->sql_query("SET NAMES 'utf8'"); } // This loop processes each row @@ -967,15 +1209,26 @@ class install_convert extends module $convert->row = $convert_row = array(); - // Now handle the rows until time is over or no more rows to process... - while (still_on_time()) + if (!empty($schema['autoincrement'])) { - $convert_row = $db->sql_fetchrow($___result); + switch ($db->sql_layer) + { + case 'mssql': + case 'mssql_odbc': + $db->sql_query('SET IDENTITY_INSERT ' . $schema['target'] . ' ON'); + break; + } + } + + // Now handle the rows until time is over or no more rows to process... + while ($counting === 0 || still_on_time()) + { + $convert_row = $src_db->sql_fetchrow($___result); if (!$convert_row) { // move to the next batch or table - $db->sql_freeresult($___result); + $src_db->sql_freeresult($___result); break; } @@ -1052,7 +1305,7 @@ class install_convert extends module $skip_rows++; } - $db->sql_freeresult($___result); + $src_db->sql_freeresult($___result); // We might still have some rows waiting if (sizeof($waiting_rows)) @@ -1083,6 +1336,21 @@ class install_convert extends module $waiting_rows = array(); } + + if (!empty($schema['autoincrement'])) + { + switch ($db->sql_layer) + { + case 'mssql': + case 'mssql_odbc': + $db->sql_query('SET IDENTITY_INSERT ' . $schema['target'] . ' OFF'); + break; + + case 'postgres': + $db->sql_query("SELECT SETVAL('" . $schema['target'] . "_seq',(select case when max(" . $schema['autoincrement'] . ")>0 then max(" . $schema['autoincrement'] . ")+1 else 1 end from " . $schema['target'] . '));'); + break; + } + } } // When we reach this point, either the current table has been processed or we're running out of time. @@ -1100,18 +1368,13 @@ class install_convert extends module }*/ // Looks like we ran out of time. - $step = '&current_table=' . $current_table . '&skip_rows=' . $skip_rows; - - // Save convertor Status - set_config('convert_progress', serialize(array('step' => $step, 'table_prefix' => $convert->src_table_prefix, 'tag' => $convert->convertor_tag)), true); + $url = $this->save_convert_progress('&current_table=' . $current_table . '&skip_rows=' . $skip_rows); $current_table++; // $percentage = ($skip_rows == 0) ? 0 : floor(100 / ($total_rows / $skip_rows)); $msg = sprintf($user->lang['STEP_PERCENT_COMPLETED'], $current_table, sizeof($convert->convertor['schema'])); - $url = $this->p_master->module_url . "?mode=$mode&sub=in_progress&tag={$convert->convertor_tag}$step"; - $template->assign_vars(array( 'L_MESSAGE' => $msg, 'L_SUBMIT' => $user->lang['CONTINUE_CONVERT'], @@ -1124,13 +1387,8 @@ class install_convert extends module } // Process execute_last then we'll be done - $step = '&jump=1'; + $url = $this->save_convert_progress('&jump=1'); - // Save convertor Status - set_config('convert_progress', serialize(array('step' => $step, 'table_prefix' => $convert->src_table_prefix, 'tag' => $convert->convertor_tag)), true); - - $url = $this->p_master->module_url . "?mode=$mode&sub=in_progress&tag={$convert->convertor_tag}$step"; - $template->assign_vars(array( 'L_SUBMIT' => $user->lang['FINAL_STEP'], 'U_ACTION' => $url, @@ -1141,7 +1399,7 @@ class install_convert extends module } /** - * Sync function being executed at the very end... + * Sync function being executed at the middle, some functions need to be executed after a successful sync. */ function sync_forums($sync_batch) { @@ -1194,22 +1452,10 @@ class install_convert extends module if ($sync_batch >= $primary_max) { - $sync_batch = -1; - - $db->sql_query('DELETE FROM ' . CONFIG_TABLE . " - WHERE config_name = 'convert_progress' OR config_name = 'convert_options'"); - $db->sql_query('DELETE FROM ' . SESSIONS_TABLE); - - @unlink($phpbb_root_path . 'cache/data_global.php'); - cache_moderators(); - - // And finally, add a note to the log - add_log('admin', 'LOG_INSTALL_CONVERTED', $convert->convertor_data['forum_name'], $config['version']); - - $url = $this->p_master->module_url . "?mode={$this->mode}&sub=final"; + $url = $this->save_convert_progress('&final_jump=1'); $template->assign_vars(array( - 'L_SUBMIT' => $user->lang['FINAL_STEP'], + 'L_SUBMIT' => $user->lang['CONTINUE_CONVERT'], 'U_ACTION' => $url, )); @@ -1218,15 +1464,10 @@ class install_convert extends module } else { - $sync_batch -= $batch_size; + $sync_batch--; } - $step = '&sync_batch=' . $sync_batch; - - // Save convertor Status - set_config('convert_progress', serialize(array('step' => $step, 'table_prefix' => $convert->options['table_prefix'], 'tag' => $convert->convertor_tag)), true); - - $url = $this->p_master->module_url . "?mode=$this->mode&sub=in_progress&tag={$convert->convertor_tag}$step"; + $url = $this->save_convert_progress('&sync_batch=' . $sync_batch); $template->assign_vars(array( 'L_SUBMIT' => $user->lang['CONTINUE_CONVERT'], @@ -1238,11 +1479,110 @@ class install_convert extends module } /** - * This function marks the end of conversion (jump=1) + * Save the convertor status + */ + function save_convert_progress($step) + { + global $convert; + + // Save convertor Status + set_config('convert_progress', serialize(array( + 'step' => $step, + 'table_prefix' => $convert->src_table_prefix, + 'tag' => $convert->convertor_tag, + )), true); + + set_config('convert_db_server', serialize(array( + 'dbms' => $convert->src_dbms, + 'dbhost' => $convert->src_dbhost, + 'dbport' => $convert->src_dbport, + 'dbname' => $convert->src_dbname, + )), true); + + set_config('convert_db_user', serialize(array( + 'dbuser' => $convert->src_dbuser, + 'dbpasswd' => $convert->src_dbpasswd, + )), true); + + return $this->p_master->module_url . "?mode={$this->mode}&sub=in_progress&tag={$convert->convertor_tag}$step"; + } + + /** + * Finish conversion, the last function to be called. + */ + function finish_conversion() + { + global $db, $phpbb_root_path, $convert, $config, $user, $template; + + $db->sql_query('DELETE FROM ' . CONFIG_TABLE . " + WHERE config_name = 'convert_progress' + OR config_name = 'convert_options' + OR config_name = 'convert_db_server' + OR config_name = 'convert_db_user'"); + $db->sql_query('DELETE FROM ' . SESSIONS_TABLE); + + @unlink($phpbb_root_path . 'cache/data_global.php'); + cache_moderators(); + + // And finally, add a note to the log + add_log('admin', 'LOG_INSTALL_CONVERTED', $convert->convertor_data['forum_name'], $config['version']); + + $url = $this->p_master->module_url . "?mode={$this->mode}&sub=final"; + + $template->assign_vars(array( + 'L_SUBMIT' => $user->lang['FINAL_STEP'], + 'U_ACTION' => $url, + )); + + $this->meta_refresh($url); + return; + } + + /** + * This function marks the steps after syncing + */ + function final_jump($final_jump) + { + global $template, $user, $src_db, $same_db, $db, $phpbb_root_path, $phpEx, $config, $cache; + global $convert; + + $template->assign_block_vars('checks', array( + 'S_LEGEND' => true, + 'LEGEND' => $user->lang['PROCESS_LAST'], + )); + + if ($final_jump == 1) + { + $db->sql_return_on_error(true); + + update_topics_posted(); + + $template->assign_block_vars('checks', array( + 'TITLE' => $user->lang['UPDATE_TOPICS_POSTED'], + 'RESULT' => $user->lang['DONE'], + )); + + if ($db->sql_error_triggered) + { + $template->assign_vars(array( + 'S_ERROR_BOX' => true, + 'ERROR_TITLE' => $user->lang['UPDATE_TOPICS_POSTED'], + 'ERROR_MSG' => $user->lang['UPDATE_TOPICS_POSTED_ERR'], + )); + } + $db->sql_return_on_error(false); + + $this->finish_conversion(); + return; + } + } + + /** + * This function marks the steps before syncing (jump=1) */ function jump($jump, $last_statement) { - global $template, $user, $db, $phpbb_root_path, $phpEx, $config, $cache; + global $template, $user, $src_db, $same_db, $db, $phpbb_root_path, $phpEx, $config, $cache; global $convert; $template->assign_block_vars('checks', array( @@ -1271,14 +1611,10 @@ class install_convert extends module )); $last_statement++; - $step = '&jump=1&last=' . $last_statement; - - // Save convertor Status - set_config('convert_progress', serialize(array('step' => $step, 'table_prefix' => $convert->src_table_prefix, 'tag' => $convert->convertor_tag)), true); + $url = $this->save_convert_progress('&jump=1&last=' . $last_statement); $percentage = ($last_statement == 0) ? 0 : floor(100 / (sizeof($convert->convertor['execute_last']) / $last_statement)); $msg = sprintf($user->lang['STEP_PERCENT_COMPLETED'], $last_statement, sizeof($convert->convertor['execute_last']), $percentage); - $url = $this->p_master->module_url . "?mode={$this->mode}&sub=in_progress&tag={$convert->convertor_tag}$step"; $template->assign_vars(array( 'L_SUBMIT' => $user->lang['CONTINUE_LAST'], @@ -1296,17 +1632,39 @@ class install_convert extends module { if (!is_array($convert->convertor['query_last'])) { - $convert->convertor['query_last'] = array($convert->convertor['query_last']); + $convert->convertor['query_last'] = array('target', array($convert->convertor['query_last'])); + } + else if (!is_array($convert->convertor['query_last'][0])) + { + $convert->convertor['query_last'] = array(array($convert->convertor['query_last'][0], $convert->convertor['query_last'][1])); } foreach ($convert->convertor['query_last'] as $query_last) { - $db->sql_query($query_last); + if ($query_last[0] == 'src') + { + if ($convert->mysql_convert && $same_db) + { + $src_db->sql_query("SET NAMES 'binary'"); + } + + $src_db->sql_query($query_last[1]); + + if ($convert->mysql_convert && $same_db) + { + $src_db->sql_query("SET NAMES 'utf8'"); + } + } + else + { + $db->sql_query($query_last[1]); + } } } // Sanity check $db->sql_return_on_error(false); + $src_db->sql_return_on_error(false); fix_empty_primary_groups(); @@ -1332,12 +1690,7 @@ class install_convert extends module 'RESULT' => $user->lang['DONE'], )); - $step = '&jump=2'; - - // Save convertor Status - set_config('convert_progress', serialize(array('step' => $step, 'table_prefix' => $convert->src_table_prefix, 'tag' => $convert->convertor_tag)), true); - - $url = $this->p_master->module_url . "?mode={$this->mode}&sub=in_progress&tag={$convert->convertor_tag}$step"; + $url = $this->save_convert_progress('&jump=2'); $template->assign_vars(array( 'L_SUBMIT' => $user->lang['CONTINUE_CONVERT'], @@ -1354,7 +1707,7 @@ class install_convert extends module // TODO: sync() is likely going to bomb out on forums with a considerable amount of topics. // TODO: the sync function is able to handle FROM-TO values, we should use them here (batch processing) - sync('forum'); + sync('forum', '', '', false, true); $cache->destroy('sql', FORUMS_TABLE); $template->assign_block_vars('checks', array( @@ -1362,38 +1715,8 @@ class install_convert extends module 'RESULT' => $user->lang['DONE'], )); - $step = '&jump=3'; - - // Save convertor Status - set_config('convert_progress', serialize(array('step' => $step, 'table_prefix' => $convert->src_table_prefix, 'tag' => $convert->convertor_tag)), true); - - $url = $this->p_master->module_url . "?mode={$this->mode}&sub=in_progress&tag={$convert->convertor_tag}$step"; - - $template->assign_vars(array( - 'L_SUBMIT' => $user->lang['CONTINUE_CONVERT'], - 'U_ACTION' => $url, - )); - - $this->meta_refresh($url); - return; - } - - if ($jump == 3) - { - update_topics_posted(); - - $template->assign_block_vars('checks', array( - 'TITLE' => $user->lang['UPDATE_TOPICS_POSTED'], - 'RESULT' => $user->lang['DONE'], - )); - // Continue with synchronizing the forums... - $step = '&sync_batch=0'; - - // Save convertor Status - set_config('convert_progress', serialize(array('step' => $step, 'table_prefix' => $convert->src_table_prefix, 'tag' => $convert->convertor_tag)), true); - - $url = $this->p_master->module_url . "?mode={$this->mode}&sub=in_progress&tag={$convert->convertor_tag}$step"; + $url = $this->save_convert_progress('&sync_batch=0'); $template->assign_vars(array( 'L_SUBMIT' => $user->lang['CONTINUE_CONVERT'], @@ -1716,8 +2039,11 @@ class install_convert extends module if ($convert->options['refresh']) { - $template->assign_var('S_REFRESH', true); - meta_refresh(5, $url); + // Because we should not rely on correct settings, we simply use the relative path here directly. + $template->assign_vars(array( + 'S_REFRESH' => true, + 'META' => '') + ); } } @@ -1726,10 +2052,16 @@ class install_convert extends module */ var $convert_options = array( 'legend1' => 'SPECIFY_OPTIONS', + 'src_dbms' => array('lang' => 'DBMS', 'type' => 'select', 'options' => 'dbms_select(\'{VALUE}\', true)', 'explain' => false), + 'src_dbhost' => array('lang' => 'DB_HOST', 'type' => 'text:25:100', 'explain' => true), + 'src_dbport' => array('lang' => 'DB_PORT', 'type' => 'text:25:100', 'explain' => true), + 'src_dbname' => array('lang' => 'DB_NAME', 'type' => 'text:25:100', 'explain' => false), + 'src_dbuser' => array('lang' => 'DB_USERNAME', 'type' => 'text:25:100', 'explain' => false), + 'src_dbpasswd' => array('lang' => 'DB_PASSWORD', 'type' => 'password:25:100', 'explain' => false), 'src_table_prefix' => array('lang' => 'TABLE_PREFIX', 'type' => 'text:25:100', 'explain' => false), //'src_url' => array('lang' => 'FORUM_ADDRESS', 'type' => 'text:50:100', 'explain' => true), 'forum_path' => array('lang' => 'FORUM_PATH', 'type' => 'text:25:100', 'explain' => true), - 'refresh' => array('lang' => 'REFRESH_PAGE', 'type' => 'radio:yes_no', 'explain' => true), + 'refresh' => array('lang' => 'REFRESH_PAGE', 'type' => 'radio:yes_no', 'explain' => true), ); } diff --git a/phpBB/install/install_install.php b/phpBB/install/install_install.php index ba80f40eb2..ef04a1e3b9 100755 --- a/phpBB/install/install_install.php +++ b/phpBB/install/install_install.php @@ -100,6 +100,7 @@ class install_install extends module break; case 'final' : + $this->build_search_index($mode, $sub); $this->add_modules($mode, $sub); $this->add_language($mode, $sub); $this->add_bots($mode, $sub); @@ -128,7 +129,7 @@ class install_install extends module 'BODY' => $lang['REQUIREMENTS_EXPLAIN'], )); - $passed = array('php' => false, 'db' => false, 'files' => false, 'pcre' => false); + $passed = array('php' => false, 'db' => false, 'files' => false, 'pcre' => false, 'imagesize' => false,); // Test for basic PHP settings $template->assign_block_vars('checks', array( @@ -138,23 +139,23 @@ class install_install extends module )); // Test the minimum PHP version - $php_version = phpversion(); + $php_version = PHP_VERSION; if (version_compare($php_version, '4.3.3') < 0) { - $result = '' . $lang['NO'] . ''; + $result = '' . $lang['NO'] . ''; } else { $passed['php'] = true; // We also give feedback on whether we're running in safe mode - $result = '' . $lang['YES']; + $result = '' . $lang['YES']; if (@ini_get('safe_mode') || strtolower(@ini_get('safe_mode')) == 'on') { $result .= ', ' . $lang['PHP_SAFE_MODE']; } - $result .= ''; + $result .= ''; } $template->assign_block_vars('checks', array( @@ -168,11 +169,11 @@ class install_install extends module // Check for register_globals being enabled if (@ini_get('register_globals') == '1' || strtolower(@ini_get('register_globals')) == 'on') { - $result = '' . $lang['NO'] . ''; + $result = '' . $lang['NO'] . ''; } else { - $result = '' . $lang['YES'] . ''; + $result = '' . $lang['YES'] . ''; } $template->assign_block_vars('checks', array( @@ -183,16 +184,57 @@ class install_install extends module 'S_EXPLAIN' => true, 'S_LEGEND' => false, )); + + + // Check for url_fopen + if (@ini_get('allow_url_fopen') == '1' || strtolower(@ini_get('allow_url_fopen')) == 'on') + { + $result = '' . $lang['YES'] . ''; + } + else + { + $result = '' . $lang['NO'] . ''; + } + + $template->assign_block_vars('checks', array( + 'TITLE' => $lang['PHP_URL_FOPEN_SUPPORT'], + 'TITLE_EXPLAIN' => $lang['PHP_URL_FOPEN_SUPPORT_EXPLAIN'], + 'RESULT' => $result, + + 'S_EXPLAIN' => true, + 'S_LEGEND' => false, + )); + + + // Check for getimagesize + if (@function_exists('getimagesize')) + { + $passed['imagesize'] = true; + $result = '' . $lang['YES'] . ''; + } + else + { + $result = '' . $lang['NO'] . ''; + } + + $template->assign_block_vars('checks', array( + 'TITLE' => $lang['PHP_GETIMAGESIZE_SUPPORT'], + 'TITLE_EXPLAIN' => $lang['PHP_GETIMAGESIZE_SUPPORT_EXPLAIN'], + 'RESULT' => $result, + + 'S_EXPLAIN' => true, + 'S_LEGEND' => false, + )); // Check for PCRE UTF-8 support if (@preg_match('//u', '')) { $passed['pcre'] = true; - $result = '' . $lang['YES'] . ''; + $result = '' . $lang['YES'] . ''; } else { - $result = '' . $lang['NO'] . ''; + $result = '' . $lang['NO'] . ''; } $template->assign_block_vars('checks', array( @@ -208,7 +250,7 @@ class install_install extends module * Better not enabling and adding to the loaded extensions due to the specific requirements needed if (!@extension_loaded('mbstring')) { - $this->can_load_dll('mbstring'); + can_load_dll('mbstring'); } */ @@ -237,24 +279,24 @@ class install_install extends module case '&': if (intval($ini_val) & $mb_checks[2]) { - $result = '' . $lang['NO'] . ''; + $result = '' . $lang['NO'] . ''; $passed['mbstring'] = false; } else { - $result = '' . $lang['YES'] . ''; + $result = '' . $lang['YES'] . ''; } break; case '!=': if ($ini_val != $mb_checks[2]) { - $result = '' . $lang['NO'] . ''; + $result = '' . $lang['NO'] . ''; $passed['mbstring'] = false; } else { - $result = '' . $lang['YES'] . ''; + $result = '' . $lang['YES'] . ''; } break; } @@ -276,35 +318,32 @@ class install_install extends module 'LEGEND_EXPLAIN' => $lang['PHP_SUPPORTED_DB_EXPLAIN'], )); - $dlls_db = array(); - $passed['db'] = false; - foreach ($this->available_dbms as $db_name => $db_ary) + $available_dbms = get_available_dbms(false, true); + $passed['db'] = $available_dbms['ANY_DB_SUPPORT']; + unset($available_dbms['ANY_DB_SUPPORT']); + + foreach ($available_dbms as $db_name => $db_ary) { - $dll = $db_ary['MODULE']; - - if (!@extension_loaded($dll)) + if (!$db_ary['AVAILABLE']) { - if (!$this->can_load_dll($dll)) - { - $template->assign_block_vars('checks', array( - 'TITLE' => $lang['DLL_' . strtoupper($db_name)], - 'RESULT' => '' . $lang['UNAVAILABLE'] . '', + $template->assign_block_vars('checks', array( + 'TITLE' => $lang['DLL_' . strtoupper($db_name)], + 'RESULT' => '' . $lang['UNAVAILABLE'] . '', - 'S_EXPLAIN' => false, - 'S_LEGEND' => false, - )); - continue; - } + 'S_EXPLAIN' => false, + 'S_LEGEND' => false, + )); } + else + { + $template->assign_block_vars('checks', array( + 'TITLE' => $lang['DLL_' . strtoupper($db_name)], + 'RESULT' => '' . $lang['AVAILABLE'] . '', - $template->assign_block_vars('checks', array( - 'TITLE' => $lang['DLL_' . strtoupper($db_name)], - 'RESULT' => '' . $lang['AVAILABLE'] . '', - - 'S_EXPLAIN' => false, - 'S_LEGEND' => false, - )); - $passed['db'] = true; + 'S_EXPLAIN' => false, + 'S_LEGEND' => false, + )); + } } // Test for other modules @@ -318,11 +357,11 @@ class install_install extends module { if (!@extension_loaded($dll)) { - if (!$this->can_load_dll($dll)) + if (!can_load_dll($dll)) { $template->assign_block_vars('checks', array( 'TITLE' => $lang['DLL_' . strtoupper($dll)], - 'RESULT' => '' . $lang['UNAVAILABLE'] . '', + 'RESULT' => '' . $lang['UNAVAILABLE'] . '', 'S_EXPLAIN' => false, 'S_LEGEND' => false, @@ -333,7 +372,7 @@ class install_install extends module $template->assign_block_vars('checks', array( 'TITLE' => $lang['DLL_' . strtoupper($dll)], - 'RESULT' => '' . $lang['AVAILABLE'] . '', + 'RESULT' => '' . $lang['AVAILABLE'] . '', 'S_EXPLAIN' => false, 'S_LEGEND' => false, @@ -373,7 +412,7 @@ class install_install extends module $template->assign_block_vars('checks', array( 'TITLE' => $lang['APP_MAGICK'], - 'RESULT' => ($img_imagick) ? '' . $lang['AVAILABLE'] . ', ' . $img_imagick . '' : '' . $lang['NO_LOCATION'] . '', + 'RESULT' => ($img_imagick) ? '' . $lang['AVAILABLE'] . ', ' . $img_imagick . '' : '' . $lang['NO_LOCATION'] . '', 'S_EXPLAIN' => false, 'S_LEGEND' => false, @@ -405,14 +444,14 @@ class install_install extends module // Now really check if (file_exists($phpbb_root_path . $dir) && is_dir($phpbb_root_path . $dir)) { - if (!is_writeable($phpbb_root_path . $dir)) + if (!@is_writable($phpbb_root_path . $dir)) { @chmod($phpbb_root_path . $dir, 0777); } $exists = true; } - // Now check if it is writeable by storing a simple file + // Now check if it is writable by storing a simple file $fp = @fopen($phpbb_root_path . $dir . 'test_lock', 'wb'); if ($fp !== false) { @@ -424,8 +463,8 @@ class install_install extends module $passed['files'] = ($exists && $write && $passed['files']) ? true : false; - $exists = ($exists) ? '' . $lang['FOUND'] . '' : '' . $lang['NOT_FOUND'] . ''; - $write = ($write) ? ', ' . $lang['WRITEABLE'] . '' : (($exists) ? ', ' . $lang['UNWRITEABLE'] . '' : ''); + $exists = ($exists) ? '' . $lang['FOUND'] . '' : '' . $lang['NOT_FOUND'] . ''; + $write = ($write) ? ', ' . $lang['WRITABLE'] . '' : (($exists) ? ', ' . $lang['UNWRITABLE'] . '' : ''); $template->assign_block_vars('checks', array( 'TITLE' => $dir, @@ -450,7 +489,7 @@ class install_install extends module $write = $exists = true; if (file_exists($phpbb_root_path . $dir)) { - if (!is_writeable($phpbb_root_path . $dir)) + if (!@is_writable($phpbb_root_path . $dir)) { $write = false; } @@ -460,8 +499,8 @@ class install_install extends module $write = $exists = false; } - $exists_str = ($exists) ? '' . $lang['FOUND'] . '' : '' . $lang['NOT_FOUND'] . ''; - $write_str = ($write) ? ', ' . $lang['WRITEABLE'] . '' : (($exists) ? ', ' . $lang['UNWRITEABLE'] . '' : ''); + $exists_str = ($exists) ? '' . $lang['FOUND'] . '' : '' . $lang['NOT_FOUND'] . ''; + $write_str = ($write) ? ', ' . $lang['WRITABLE'] . '' : (($exists) ? ', ' . $lang['UNWRITABLE'] . '' : ''); $template->assign_block_vars('checks', array( 'TITLE' => $dir, @@ -475,8 +514,8 @@ class install_install extends module // And finally where do we want to go next (well today is taken isn't it :P) $s_hidden_fields = ($img_imagick) ? '' : ''; - $url = ($passed['php'] && $passed['db'] && $passed['files'] && $passed['pcre'] && $passed['mbstring']) ? $this->p_master->module_url . "?mode=$mode&sub=database&language=$language" : $this->p_master->module_url . "?mode=$mode&sub=requirements&language=$language "; - $submit = ($passed['php'] && $passed['db'] && $passed['files'] && $passed['pcre'] && $passed['mbstring']) ? $lang['INSTALL_START'] : $lang['INSTALL_TEST']; + $url = (!in_array(false, $passed)) ? $this->p_master->module_url . "?mode=$mode&sub=database&language=$language" : $this->p_master->module_url . "?mode=$mode&sub=requirements&language=$language "; + $submit = (!in_array(false, $passed)) ? $lang['INSTALL_START'] : $lang['INSTALL_TEST']; $template->assign_vars(array( @@ -502,21 +541,22 @@ class install_install extends module } $connect_test = false; + $error = array(); + $available_dbms = get_available_dbms(false, true); // Has the user opted to test the connection? if (isset($_POST['testdb'])) { - // If the module for the selected database isn't loaded, let's try and load it now - if (!@extension_loaded($this->available_dbms[$dbms]['MODULE'])) + if (!isset($available_dbms[$dbms]) || !$available_dbms[$dbms]['AVAILABLE']) { - if (!$this->can_load_dll($this->available_dbms[$dbms]['MODULE'])) - { - $error['db'][] = $lang['INST_ERR_NO_DB']; - } + $error['db'][] = $lang['INST_ERR_NO_DB']; + $connect_test = false; + } + else + { + $dbpasswd = htmlspecialchars_decode($dbpasswd); + $connect_test = connect_check_db(true, $error, $available_dbms[$dbms], $table_prefix, $dbhost, $dbuser, $dbpasswd, $dbname, $dbport); } - - $dbpasswd = htmlspecialchars_decode($dbpasswd); - $connect_test = $this->connect_check_db(true, $error, $dbms, $table_prefix, $dbhost, $dbuser, $dbpasswd, $dbname, $dbport); $template->assign_block_vars('checks', array( 'S_LEGEND' => true, @@ -528,7 +568,7 @@ class install_install extends module { $template->assign_block_vars('checks', array( 'TITLE' => $lang['DB_TEST'], - 'RESULT' => '' . $lang['SUCCESSFUL_CONNECT'] . '', + 'RESULT' => '' . $lang['SUCCESSFUL_CONNECT'] . '', 'S_EXPLAIN' => false, 'S_LEGEND' => false, @@ -538,7 +578,7 @@ class install_install extends module { $template->assign_block_vars('checks', array( 'TITLE' => $lang['DB_TEST'], - 'RESULT' => '' . implode('
    ', $error) . '
    ', + 'RESULT' => '' . implode('
    ', $error) . '
    ', 'S_EXPLAIN' => false, 'S_LEGEND' => false, @@ -550,20 +590,17 @@ class install_install extends module { // Update the list of available DBMS modules to only contain those which can be used $available_dbms_temp = array(); - foreach ($this->available_dbms as $type => $dbms_ary) + foreach ($available_dbms as $type => $dbms_ary) { - if (!@extension_loaded($dbms_ary['MODULE'])) + if (!$dbms_ary['AVAILABLE']) { - if (!$this->can_load_dll($dbms_ary['MODULE'])) - { - continue; - } + continue; } $available_dbms_temp[$type] = $dbms_ary; } - $this->available_dbms = &$available_dbms_temp; + $available_dbms = &$available_dbms_temp; // And now for the main part of this page $table_prefix = (!empty($table_prefix) ? $table_prefix : 'phpbb_'); @@ -714,7 +751,7 @@ class install_install extends module $passed = true; $template->assign_block_vars('checks', array( 'TITLE' => $lang['ADMIN_TEST'], - 'RESULT' => '' . $lang['TESTS_PASSED'] . '', + 'RESULT' => '' . $lang['TESTS_PASSED'] . '', 'S_EXPLAIN' => false, 'S_LEGEND' => false, @@ -724,7 +761,7 @@ class install_install extends module { $template->assign_block_vars('checks', array( 'TITLE' => $lang['ADMIN_TEST'], - 'RESULT' => '' . implode('
    ', $error) . '
    ', + 'RESULT' => '' . implode('
    ', $error) . '
    ', 'S_EXPLAIN' => false, 'S_LEGEND' => false, @@ -828,7 +865,8 @@ class install_install extends module // Create a list of any PHP modules we wish to have loaded $load_extensions = array(); - $check_exts = array_merge(array($this->available_dbms[$dbms]['MODULE']), $this->php_dlls_other); + $available_dbms = get_available_dbms($dbms); + $check_exts = array_merge(array($available_dbms[$dbms]['MODULE']), $this->php_dlls_other); $suffix = (defined('PHP_OS') && strpos(strtolower(PHP_OS), 'win') === 0) ? 'dll' : 'so'; @@ -836,7 +874,7 @@ class install_install extends module { if (!@extension_loaded($dll)) { - if (!$this->can_load_dll($dll)) + if (!can_load_dll($dll)) { continue; } @@ -860,7 +898,7 @@ class install_install extends module // Time to convert the data provided into a config file $config_data = "available_dbms[$dbms]['DRIVER'] . "';\n"; + $config_data .= "\$dbms = '" . $available_dbms[$dbms]['DRIVER'] . "';\n"; $config_data .= "\$dbhost = '$dbhost';\n"; $config_data .= "\$dbport = '$dbport';\n"; $config_data .= "\$dbname = '$dbname';\n"; @@ -871,12 +909,12 @@ class install_install extends module $config_data .= "\$acm_type = 'file';\n"; $config_data .= "\$load_extensions = '$load_extensions';\n\n"; $config_data .= "@define('PHPBB_INSTALLED', true);\n"; - $config_data .= "@define('DEBUG', true);\n"; // @todo Comment out when final + $config_data .= "// @define('DEBUG', true);\n"; $config_data .= "// @define('DEBUG_EXTRA', true);\n"; $config_data .= '?' . '>'; // Done this to prevent highlighting editors getting confused! // Attempt to write out the config file directly. If it works, this is the easiest way to do it ... - if ((file_exists($phpbb_root_path . 'config.' . $phpEx) && is_writeable($phpbb_root_path . 'config.' . $phpEx)) || is_writable($phpbb_root_path)) + if ((file_exists($phpbb_root_path . 'config.' . $phpEx) && is_writable($phpbb_root_path . 'config.' . $phpEx)) || is_writable($phpbb_root_path)) { // Assume it will work ... if nothing goes wrong below $written = true; @@ -1085,45 +1123,42 @@ class install_install extends module $cookie_domain = str_replace('www.', '.', $cookie_domain); } - // If we get here and the extension isn't loaded it should be safe to just go ahead and load it - if (!@extension_loaded($this->available_dbms[$dbms]['MODULE'])) - { - $this->can_load_dll($this->available_dbms[$dbms]['MODULE']); - } + // If we get here and the extension isn't loaded it should be safe to just go ahead and load it + $available_dbms = get_available_dbms($dbms); $dbpasswd = htmlspecialchars_decode($dbpasswd); // Load the appropriate database class if not already loaded - include($phpbb_root_path . 'includes/db/' . $this->available_dbms[$dbms]['DRIVER'] . '.' . $phpEx); + include($phpbb_root_path . 'includes/db/' . $available_dbms[$dbms]['DRIVER'] . '.' . $phpEx); // Instantiate the database - $sql_db = 'dbal_' . $this->available_dbms[$dbms]['DRIVER']; + $sql_db = 'dbal_' . $available_dbms[$dbms]['DRIVER']; $db = new $sql_db(); - $db->sql_connect($dbhost, $dbuser, $dbpasswd, $dbname, $dbport, false); + $db->sql_connect($dbhost, $dbuser, $dbpasswd, $dbname, $dbport, false, false); // NOTE: trigger_error does not work here. - $db->return_on_error = true; + $db->sql_return_on_error(true); // If mysql is chosen, we need to adjust the schema filename slightly to reflect the correct version. ;) if ($dbms == 'mysql') { if (version_compare($db->mysql_version, '4.1.3', '>=')) { - $this->available_dbms[$dbms]['SCHEMA'] .= '_41'; + $available_dbms[$dbms]['SCHEMA'] .= '_41'; } else { - $this->available_dbms[$dbms]['SCHEMA'] .= '_40'; + $available_dbms[$dbms]['SCHEMA'] .= '_40'; } } // Ok we have the db info go ahead and read in the relevant schema // and work on building the table - $dbms_schema = 'schemas/' . $this->available_dbms[$dbms]['SCHEMA'] . '_schema.sql'; + $dbms_schema = 'schemas/' . $available_dbms[$dbms]['SCHEMA'] . '_schema.sql'; // How should we treat this schema? - $remove_remarks = $this->available_dbms[$dbms]['COMMENTS']; - $delimiter = $this->available_dbms[$dbms]['DELIM']; + $remove_remarks = $available_dbms[$dbms]['COMMENTS']; + $delimiter = $available_dbms[$dbms]['DELIM']; $sql_query = @file_get_contents($dbms_schema); @@ -1160,8 +1195,12 @@ class install_install extends module break; } + // Change prefix $sql_query = preg_replace('#phpbb_#i', $table_prefix, $sql_query); + // Change language strings... + $sql_query = preg_replace_callback('#\{L_([A-Z0-9\-_]*)\}#s', 'adjust_language_keys_callback', $sql_query); + // Since there is only one schema file we know the comment style and are able to remove it directly with remove_remarks remove_remarks($sql_query); $sql_query = split_sql_file($sql_query, ';'); @@ -1276,7 +1315,11 @@ class install_install extends module 'UPDATE ' . $table_prefix . "config SET config_value = '" . $db->sql_escape($admin_name) . "' WHERE config_name = 'newest_username'", - + + 'UPDATE ' . $table_prefix . "config + SET config_value = '" . md5(mt_rand()) . "' + WHERE config_name = 'avatar_salt'", + 'UPDATE ' . $table_prefix . "users SET username = '" . $db->sql_escape($admin_name) . "', user_password='" . $db->sql_escape(md5($admin_pass1)) . "', user_ip = '" . $db->sql_escape($user_ip) . "', user_lang = '" . $db->sql_escape($default_lang) . "', user_email='" . $db->sql_escape($board_email1) . "', user_dateformat='" . $db->sql_escape($lang['default_dateformat']) . "', user_email_hash = " . (crc32($board_email1) . strlen($board_email1)) . ", username_clean = '" . $db->sql_escape(utf8_clean_string($admin_name)) . "' WHERE username = 'Admin'", @@ -1307,17 +1350,11 @@ class install_install extends module SET forum_last_post_time = $current_time", ); - if (!@extension_loaded('gd')) - { - $this->can_load_dll('gd'); - } - - // This is for people who have TTF and GD - if (@extension_loaded('gd') && function_exists('imagettfbbox') && function_exists('imagettftext')) + if (@extension_loaded('gd') || can_load_dll('gd')) { $sql_ary[] = 'UPDATE ' . $table_prefix . "config - SET config_value = '1' - WHERE config_name = 'captcha_gd'"; + SET config_value = '1' + WHERE config_name = 'captcha_gd'"; } // We set a (semi-)unique cookie name to bypass login issues related to the cookie name. @@ -1357,11 +1394,11 @@ class install_install extends module } /** - * Populate the module tables + * Build the search index... */ - function add_modules($mode, $sub) + function build_search_index($mode, $sub) { - global $db, $lang, $phpbb_root_path, $phpEx; + global $db, $lang, $phpbb_root_path, $phpEx, $config; // Obtain any submitted data foreach ($this->request_vars as $var) @@ -1372,21 +1409,54 @@ class install_install extends module $dbpasswd = htmlspecialchars_decode($dbpasswd); // If we get here and the extension isn't loaded it should be safe to just go ahead and load it - if (!@extension_loaded($this->available_dbms[$dbms]['MODULE'])) - { - $this->can_load_dll($this->available_dbms[$dbms]['MODULE']); - } + $available_dbms = get_available_dbms($dbms); // Load the appropriate database class if not already loaded - include($phpbb_root_path . 'includes/db/' . $this->available_dbms[$dbms]['DRIVER'] . '.' . $phpEx); + include($phpbb_root_path . 'includes/db/' . $available_dbms[$dbms]['DRIVER'] . '.' . $phpEx); // Instantiate the database - $sql_db = 'dbal_' . $this->available_dbms[$dbms]['DRIVER']; + $sql_db = 'dbal_' . $available_dbms[$dbms]['DRIVER']; $db = new $sql_db(); - $db->sql_connect($dbhost, $dbuser, $dbpasswd, $dbname, $dbport, false); + $db->sql_connect($dbhost, $dbuser, $dbpasswd, $dbname, $dbport, false, false); // NOTE: trigger_error does not work here. - $db->return_on_error = true; + $db->sql_return_on_error(true); + + include_once($phpbb_root_path . 'includes/constants.' . $phpEx); + include_once($phpbb_root_path . 'includes/search/fulltext_native.' . $phpEx); + + // Fill the config array - it is needed by those functions we call + $sql = 'SELECT * + FROM ' . CONFIG_TABLE; + $result = $db->sql_query($sql); + + $config = array(); + while ($row = $db->sql_fetchrow($result)) + { + $config[$row['config_name']] = $row['config_value']; + } + $db->sql_freeresult($result); + + $error = false; + $search = new fulltext_native($error); + + $sql = 'SELECT post_id, post_subject, post_text, poster_id, forum_id + FROM ' . POSTS_TABLE; + $result = $db->sql_query($sql); + + while ($row = $db->sql_fetchrow($result)) + { + $search->index('post', $row['post_id'], $row['post_text'], $row['post_subject'], $row['poster_id'], $row['forum_id']); + } + $db->sql_freeresult($result); + } + + /** + * Populate the module tables + */ + function add_modules($mode, $sub) + { + global $db, $lang, $phpbb_root_path, $phpEx; include_once($phpbb_root_path . 'includes/constants.' . $phpEx); include_once($phpbb_root_path . 'includes/acp/acp_modules.' . $phpEx); @@ -1425,7 +1495,7 @@ class install_install extends module $this->p_master->db_error($error['message'], $db->sql_error_sql, __LINE__, __FILE__); } - $categories[$cat_name]['id'] = $module_data['module_id']; + $categories[$cat_name]['id'] = (int) $module_data['module_id']; $categories[$cat_name]['parent_id'] = 0; // Create sub-categories... @@ -1437,7 +1507,7 @@ class install_install extends module 'module_basename' => '', 'module_enabled' => 1, 'module_display' => 1, - 'parent_id' => $categories[$cat_name]['id'], + 'parent_id' => (int) $categories[$cat_name]['id'], 'module_class' => $module_class, 'module_langname' => $level2_name, 'module_mode' => '', @@ -1453,8 +1523,8 @@ class install_install extends module $this->p_master->db_error($error['message'], $db->sql_error_sql, __LINE__, __FILE__); } - $categories[$level2_name]['id'] = $module_data['module_id']; - $categories[$level2_name]['parent_id'] = $categories[$cat_name]['id']; + $categories[$level2_name]['id'] = (int) $module_data['module_id']; + $categories[$level2_name]['parent_id'] = (int) $categories[$cat_name]['id']; } } } @@ -1476,7 +1546,7 @@ class install_install extends module 'module_basename' => $module_basename, 'module_enabled' => 1, 'module_display' => (isset($row['display'])) ? $row['display'] : 1, - 'parent_id' => $categories[$cat_name]['id'], + 'parent_id' => (int) $categories[$cat_name]['id'], 'module_class' => $module_class, 'module_langname' => $row['title'], 'module_mode' => $module_mode, @@ -1579,7 +1649,7 @@ class install_install extends module unset($module_data['left_id']); unset($module_data['right_id']); - $module_data['parent_id'] = $row2['module_id']; + $module_data['parent_id'] = (int) $row2['module_id']; $_module->update_module_data($module_data, true); @@ -1617,23 +1687,89 @@ class install_install extends module if (is_dir($path) && !is_link($path) && file_exists($path . '/iso.txt')) { - $lang_pack = file("{$phpbb_root_path}language/$path/iso.txt"); + $lang_file = file("{$phpbb_root_path}language/$path/iso.txt"); - $sql_ary = array( + $lang_pack = array( 'lang_iso' => basename($path), 'lang_dir' => basename($path), - 'lang_english_name' => trim(htmlspecialchars($lang_pack[0])), - 'lang_local_name' => trim(htmlspecialchars($lang_pack[1], ENT_COMPAT, 'UTF-8')), - 'lang_author' => trim(htmlspecialchars($lang_pack[2], ENT_COMPAT, 'UTF-8')), + 'lang_english_name' => trim(htmlspecialchars($lang_file[0])), + 'lang_local_name' => trim(htmlspecialchars($lang_file[1], ENT_COMPAT, 'UTF-8')), + 'lang_author' => trim(htmlspecialchars($lang_file[2], ENT_COMPAT, 'UTF-8')), ); - $db->sql_query('INSERT INTO ' . LANG_TABLE . ' ' . $db->sql_build_array('INSERT', $sql_ary)); + $db->sql_query('INSERT INTO ' . LANG_TABLE . ' ' . $db->sql_build_array('INSERT', $lang_pack)); if ($db->sql_error_triggered) { $error = $db->sql_error($db->sql_error_sql); $this->p_master->db_error($error['message'], $db->sql_error_sql, __LINE__, __FILE__); } + + $valid_localized = array( + 'icon_back_top', 'icon_contact_aim', 'icon_contact_email', 'icon_contact_icq', 'icon_contact_jabber', 'icon_contact_msnm', 'icon_contact_pm', 'icon_contact_yahoo', 'icon_contact_www', 'icon_post_delete', 'icon_post_edit', 'icon_post_info', 'icon_post_quote', 'icon_post_report', 'icon_user_online', 'icon_user_offline', 'icon_user_profile', 'icon_user_search', 'icon_user_warn', 'button_pm_forward', 'button_pm_new', 'button_pm_reply', 'button_topic_locked', 'button_topic_new', 'button_topic_reply', + ); + + $sql_ary = array(); + + $sql = 'SELECT * + FROM ' . STYLES_IMAGESET_TABLE; + $result = $db->sql_query($sql); + + while ($imageset_row = $db->sql_fetchrow($result)) + { + if (@file_exists("{$phpbb_root_path}styles/{$imageset_row['imageset_path']}/imageset/{$lang_pack['lang_iso']}/imageset.cfg")) + { + $cfg_data_imageset_data = parse_cfg_file("{$phpbb_root_path}styles/{$imageset_row['imageset_path']}/imageset/{$lang_pack['lang_iso']}/imageset.cfg"); + foreach ($cfg_data_imageset_data as $image_name => $value) + { + if (strpos($value, '*') !== false) + { + if (substr($value, -1, 1) === '*') + { + list($image_filename, $image_height) = explode('*', $value); + $image_width = 0; + } + else + { + list($image_filename, $image_height, $image_width) = explode('*', $value); + } + } + else + { + $image_filename = $value; + $image_height = $image_width = 0; + } + + if (strpos($image_name, 'img_') === 0 && $image_filename) + { + $image_name = substr($image_name, 4); + if (in_array($image_name, $valid_localized)) + { + $sql_ary[] = array( + 'image_name' => $image_name, + 'image_filename' => $image_filename, + 'image_height' => $image_height, + 'image_width' => $image_width, + 'imageset_id' => $imageset_row['imageset_id'], + 'image_lang' => $lang_pack['lang_iso'], + ); + } + } + } + } + } + $db->sql_freeresult($result); + + if (sizeof($sql_ary)) + { + $db->sql_multi_insert(STYLES_IMAGESET_DATA_TABLE, $sql_ary); + + if ($db->sql_error_triggered) + { + $error = $db->sql_error($db->sql_error_sql); + $this->p_master->db_error($error['message'], $db->sql_error_sql, __LINE__, __FILE__); + } + } } } closedir($dir); @@ -1679,7 +1815,7 @@ class install_install extends module if (!function_exists('user_add')) { - include_once($phpbb_root_path . 'includes/functions_user.' . $phpEx); + include($phpbb_root_path . 'includes/functions_user.' . $phpEx); } foreach ($this->bot_list as $bot_name => $bot_ary) @@ -1785,322 +1921,11 @@ class install_install extends module $template->assign_vars(array( 'TITLE' => $lang['INSTALL_CONGRATS'], - 'BODY' => sprintf($lang['INSTALL_CONGRATS_EXPLAIN'], '', ''), + 'BODY' => sprintf($lang['INSTALL_CONGRATS_EXPLAIN'], $config['version'], append_sid($phpbb_root_path . 'install/index.' . $phpEx, 'mode=convert&language=' . $language), '../docs/README.html'), 'L_SUBMIT' => $lang['INSTALL_LOGIN'], 'U_ACTION' => append_sid($phpbb_root_path . 'adm/index.' . $phpEx), )); } - - /** - * Determine if we are able to load a specified PHP module - */ - function can_load_dll($dll) - { - global $suffix; - - if (empty($suffix)) - { - $suffix = (defined('PHP_OS') && strpos(strtolower(PHP_OS), 'win') === 0) ? 'dll' : 'so'; - } - - return ((@ini_get('enable_dl') || strtolower(@ini_get('enable_dl')) == 'on') && (!@ini_get('safe_mode') || strtolower(@ini_get('safe_mode')) == 'off') && @dl($dll . ".$suffix")) ? true : false; - } - - /** - * Used to test whether we are able to connect to the database the user has specified - * and identify any problems (eg there are already tables with the names we want to use - */ - function connect_check_db($error_connect, &$error, $dbms, $table_prefix, $dbhost, $dbuser, $dbpasswd, $dbname, $dbport) - { - global $phpbb_root_path, $phpEx, $config, $lang; - - // Include the DB layer - include($phpbb_root_path . 'includes/db/' . $this->available_dbms[$dbms]['DRIVER'] . '.' . $phpEx); - - // Instantiate it and set return on error true - $sql_db = 'dbal_' . $this->available_dbms[$dbms]['DRIVER']; - $db = new $sql_db(); - $db->sql_return_on_error(true); - - // Check that we actually have a database name before going any further..... - if ($dbms != 'sqlite' && $dbname === '') - { - $error[] = $lang['INST_ERR_DB_NO_NAME']; - return false; - } - - // Make sure we don't have a daft user who thinks having the SQLite database in the forum directory is a good idea - if ($dbms == 'sqlite' && stripos(phpbb_realpath($dbhost), phpbb_realpath('../')) === 0) - { - $error[] = $lang['INST_ERR_DB_FORUM_PATH']; - return false; - } - - // Check the prefix length to ensure that index names are not too long and does not contain invalid characters - switch ($dbms) - { - case 'mysql': - case 'mysqli': - if (strpos($table_prefix, '-') !== false) - { - $error[] = $lang['INST_ERR_PREFIX_INVALID']; - return false; - } - - // no break; - - case 'postgres': - $prefix_length = 36; - break; - - case 'mssql': - case 'mssql_odbc': - $prefix_length = 90; - break; - - case 'sqlite': - $prefix_length = 200; - break; - - case 'firebird': - case 'oracle': - $prefix_length = 6; - break; - } - - if (strlen($table_prefix) > $prefix_length) - { - $error[] = sprintf($lang['INST_ERR_PREFIX_TOO_LONG'], $prefix_length); - return false; - } - - // Try and connect ... - if (is_array($db->sql_connect($dbhost, $dbuser, $dbpasswd, $dbname, $dbport, false))) - { - $db_error = $db->sql_error(); - $error[] = $lang['INST_ERR_DB_CONNECT'] . '
    ' . (($db_error['message']) ? $db_error['message'] : $lang['INST_ERR_DB_NO_ERROR']); - } - else - { - switch ($dbms) - { - case 'mysql': - case 'mysqli': - $sql = 'SHOW TABLES'; - $field = "Tables_in_{$dbname}"; - break; - - case 'sqlite': - $sql = 'SELECT name - FROM sqlite_master - WHERE type = "table"'; - $field = 'name'; - break; - - case 'mssql': - case 'mssql_odbc': - $sql = "SELECT name - FROM sysobjects - WHERE type='U'"; - $field = 'name'; - break; - - case 'postgres': - $sql = "SELECT relname - FROM pg_class - WHERE relkind = 'r' - AND relname NOT LIKE 'pg\_%'"; - $field = 'relname'; - break; - - case 'firebird': - $sql = 'SELECT rdb$relation_name - FROM rdb$relations - WHERE rdb$view_source is null - AND rdb$system_flag = 0'; - $field = 'rdb$relation_name'; - break; - - case 'oracle': - $sql = 'SELECT table_name - FROM USER_TABLES'; - $field = 'table_name'; - break; - } - $result = $db->sql_query($sql); - - if ($row = $db->sql_fetchrow($result)) - { - // Likely matches for an existing phpBB installation - $temp_prefix = strtolower($table_prefix); - $table_ary = array($temp_prefix . 'attachments', $temp_prefix . 'config', $temp_prefix . 'sessions', $temp_prefix . 'topics', $temp_prefix . 'users'); - - do - { - // All phpBB installations will at least have config else it won't work - if (in_array(strtolower($row[$field]), $table_ary)) - { - $error[] = $lang['INST_ERR_PREFIX']; - break; - } - } - while ($row = $db->sql_fetchrow($result)); - } - $db->sql_freeresult($result); - - // Make sure that the user has selected a sensible DBAL for the DBMS actually installed - switch ($dbms) - { - case 'mysqli': - if (version_compare(mysqli_get_server_info($db->db_connect_id), '4.1.3', '<')) - { - $error[] = $lang['INST_ERR_DB_NO_MYSQLI']; - } - break; - - case 'sqlite': - if (version_compare(sqlite_libversion(), '2.8.2', '<')) - { - $error[] = $lang['INST_ERR_DB_NO_SQLITE']; - } - break; - - case 'firebird': - // check the version of FB, use some hackery if we can't get access to the server info - if ($db->service_handle !== false && function_exists('ibase_server_info')) - { - $val = @ibase_server_info($db->service_handle, IBASE_SVC_SERVER_VERSION); - preg_match('#V([\d.]+)#', $val, $match); - if ($match[1] < 2) - { - $error[] = $lang['INST_ERR_DB_NO_FIREBIRD']; - } - $db_info = @ibase_db_info($db->service_handle, $dbname, IBASE_STS_HDR_PAGES); - - preg_match('/^\\s*Page size\\s*(\\d+)/m', $db_info, $regs); - $page_size = intval($regs[1]); - if ($page_size < 8192) - { - $error[] = $lang['INST_ERR_DB_NO_FIREBIRD_PS']; - } - } - else - { - $sql = "SELECT * - FROM RDB$FUNCTIONS - WHERE RDB$SYSTEM_FLAG IS NULL - AND RDB$FUNCTION_NAME = 'CHAR_LENGTH'"; - $result = $db->sql_query($sql); - $row = $db->sql_fetchrow($result); - $db->sql_freeresult($result); - - // if its a UDF, its too old - if ($row) - { - $error[] = $lang['INST_ERR_DB_NO_FIREBIRD']; - } - else - { - $sql = "SELECT FIRST 0 char_length('') - FROM RDB\$DATABASE"; - $result = $db->sql_query($sql); - if (!$result) // This can only fail if char_length is not defined - { - $error[] = $lang['INST_ERR_DB_NO_FIREBIRD']; - } - $db->sql_freeresult($result); - } - - // Setup the stuff for our random table - $char_array = array_merge(range('A', 'Z'), range('0', '9')); - $char_len = mt_rand(7, 9); - $char_array_len = sizeof($char_array) - 1; - - $final = ''; - - for ($i = 0; $i < $char_len; $i++) - { - $final .= $char_array[mt_rand(0, $char_array_len)]; - } - - // Create some random table - $sql = 'CREATE TABLE ' . $final . " ( - FIELD1 VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE, - FIELD2 INTEGER DEFAULT 0 NOT NULL);"; - $db->sql_query($sql); - - // Create an index that should fail if the page size is less than 8192 - $sql = 'CREATE INDEX ' . $final . ' ON ' . $final . '(FIELD1, FIELD2);'; - $db->sql_query($sql); - - if (ibase_errmsg() !== false) - { - $error[] = $lang['INST_ERR_DB_NO_FIREBIRD_PS']; - } - else - { - // Kill the old table - $db->sql_query('DROP TABLE ' . $final . ';'); - } - unset($final); - } - break; - - case 'oracle': - $sql = "SELECT * - FROM NLS_DATABASE_PARAMETERS - WHERE PARAMETER = 'NLS_RDBMS_VERSION' - OR PARAMETER = 'NLS_CHARACTERSET'"; - $result = $db->sql_query($sql); - - while ($row = $db->sql_fetchrow($result)) - { - $stats[$row['parameter']] = $row['value']; - } - $db->sql_freeresult($result); - - if (version_compare($stats['NLS_RDBMS_VERSION'], '9.2', '<') && $stats['NLS_CHARACTERSET'] !== 'UTF8') - { - $error[] = $lang['INST_ERR_DB_NO_ORACLE']; - } - break; - - case 'postgres': - $sql = "SHOW server_encoding;"; - $result = $db->sql_query($sql); - $row = $db->sql_fetchrow($result); - $db->sql_freeresult($result); - - if ($row['server_encoding'] !== 'UNICODE' && $row['server_encoding'] !== 'UTF8') - { - $error[] = $lang['INST_ERR_DB_NO_POSTGRES']; - } - break; - } - - $db->sql_close(); - } - - if ($error_connect && (!isset($error) || !sizeof($error))) - { - return true; - } - return false; - } - - /** - * Generate the drop down of available database options - */ - function dbms_select($default='') - { - $dbms_options = ''; - foreach ($this->available_dbms as $dbms_name => $details) - { - $selected = ($dbms_name == $default) ? ' selected="selected"' : ''; - $dbms_options .= ''; - } - return $dbms_options; - } /** * Generate a list of available mail server authentication methods @@ -2132,7 +1957,7 @@ class install_install extends module */ var $db_config_options = array( 'legend1' => 'DB_CONFIG', - 'dbms' => array('lang' => 'DBMS', 'type' => 'select', 'options' => '$this->module->dbms_select(\'{VALUE}\')', 'explain' => false), + 'dbms' => array('lang' => 'DBMS', 'type' => 'select', 'options' => 'dbms_select(\'{VALUE}\')', 'explain' => false), 'dbhost' => array('lang' => 'DB_HOST', 'type' => 'text:25:100', 'explain' => true), 'dbport' => array('lang' => 'DB_PORT', 'type' => 'text:25:100', 'explain' => true), 'dbname' => array('lang' => 'DB_NAME', 'type' => 'text:25:100', 'explain' => false), @@ -2172,76 +1997,6 @@ class install_install extends module */ var $php_dlls_other = array('zlib', 'ftp', 'gd', 'xml'); - /** - * Details of the database management systems supported - */ - var $available_dbms = array( - 'firebird' => array( - 'LABEL' => 'FireBird', - 'SCHEMA' => 'firebird', - 'MODULE' => 'interbase', - 'DELIM' => ';;', - 'COMMENTS' => 'remove_remarks', - 'DRIVER' => 'firebird' - ), - 'mysqli' => array( - 'LABEL' => 'MySQL with MySQLi Extension', - 'SCHEMA' => 'mysql_41', - 'MODULE' => 'mysqli', - 'DELIM' => ';', - 'COMMENTS' => 'remove_remarks', - 'DRIVER' => 'mysqli' - ), - 'mysql' => array( - 'LABEL' => 'MySQL', - 'SCHEMA' => 'mysql', - 'MODULE' => 'mysql', - 'DELIM' => ';', - 'COMMENTS' => 'remove_remarks', - 'DRIVER' => 'mysql' - ), - 'mssql' => array( - 'LABEL' => 'MS SQL Server 2000+', - 'SCHEMA' => 'mssql', - 'MODULE' => 'mssql', - 'DELIM' => 'GO', - 'COMMENTS' => 'remove_comments', - 'DRIVER' => 'mssql' - ), - 'mssql_odbc'=> array( - 'LABEL' => 'MS SQL Server [ ODBC ]', - 'SCHEMA' => 'mssql', - 'MODULE' => 'odbc', - 'DELIM' => 'GO', - 'COMMENTS' => 'remove_comments', - 'DRIVER' => 'mssql_odbc' - ), - 'oracle' => array( - 'LABEL' => 'Oracle', - 'SCHEMA' => 'oracle', - 'MODULE' => 'oci8', - 'DELIM' => '/', - 'COMMENTS' => 'remove_comments', - 'DRIVER' => 'oracle' - ), - 'postgres' => array( - 'LABEL' => 'PostgreSQL 7.x/8.x', - 'SCHEMA' => 'postgres', - 'MODULE' => 'pgsql', - 'DELIM' => ';', - 'COMMENTS' => 'remove_comments', - 'DRIVER' => 'postgres' - ), - 'sqlite' => array( - 'LABEL' => 'SQLite', - 'SCHEMA' => 'sqlite', - 'MODULE' => 'sqlite', - 'DELIM' => ';', - 'COMMENTS' => 'remove_remarks', - 'DRIVER' => 'sqlite' - ), - ); - /** * A list of the web-crawlers/bots we recognise by default * @@ -2325,7 +2080,7 @@ class install_install extends module 'W3C [Linkcheck]' => array('W3C-checklink/', ''), 'W3C [Validator]' => array('W3C_*Validator', ''), 'WiseNut [Bot]' => array('http://www.WISEnutbot.com', ''), - 'Yacy [Bot]' => array('yacybot', ''), + 'YaCy [Bot]' => array('yacybot', ''), 'Yahoo MMCrawler [Bot]' => array('Yahoo-MMCrawler/', ''), 'Yahoo Slurp [Bot]' => array('Yahoo! DE Slurp', ''), 'Yahoo [Bot]' => array('Yahoo! Slurp', ''), diff --git a/phpBB/install/install_update.php b/phpBB/install/install_update.php index 3e24cc71ed..9f08f2ec64 100644 --- a/phpBB/install/install_update.php +++ b/phpBB/install/install_update.php @@ -6,7 +6,7 @@ * @copyright (c) 2006 phpBB Group * @license http://opensource.org/licenses/gpl-license.php GNU Public License * -* @todo check for writeable cache/store/files directory +* @todo check for writable cache/store/files directory */ /** @@ -91,7 +91,7 @@ class install_update extends module $db = new $sql_db(); // Connect to DB - $db->sql_connect($dbhost, $dbuser, $dbpasswd, $dbname, $dbport, false); + $db->sql_connect($dbhost, $dbuser, $dbpasswd, $dbname, $dbport, false, false); // We do not need this any longer, unset for safety purposes unset($dbpasswd); @@ -112,20 +112,6 @@ class install_update extends module $user->session_begin(); $auth->acl($user->data); - // Beta4 and below are having a bug displaying an error if the install directory is present. - // This bug got fixed, but we need to get around it by using a tiny 'hack'. - if (!defined('DEBUG_EXTRA')) - { - if (version_compare(strtolower($config['version']), '3.0.b4', '<=')) - { - @define('DEBUG_EXTRA', true); - } - else if (!empty($config['version_update_from']) && version_compare(strtolower($config['version_update_from']), '3.0.b4', '<=')) - { - @define('DEBUG_EXTRA', true); - } - } - $user->setup('install'); // If we are within the intro page we need to make sure we get up-to-date version info @@ -151,7 +137,7 @@ class install_update extends module // For the current version we trick a bit. ;) $this->current_version = (!empty($config['version_update_from'])) ? $config['version_update_from'] : $config['version']; - $up_to_date = (version_compare(strtolower($this->current_version), strtolower($this->latest_version), '<')) ? false : true; + $up_to_date = (version_compare(str_replace('rc', 'RC', strtolower($this->current_version)), str_replace('rc', 'RC', strtolower($this->latest_version)), '<')) ? false : true; // Check for a valid update directory, else point the user to the phpbb.com website if (!file_exists($phpbb_root_path . 'install/update') || !file_exists($phpbb_root_path . 'install/update/index.' . $phpEx) || !file_exists($this->old_location) || !file_exists($this->new_location)) @@ -168,7 +154,7 @@ class install_update extends module // Make sure the update directory holds the correct information // Since admins are able to run the update/checks more than once we only check if the current version is lower or equal than the version to which we update to. - if (version_compare(strtolower($this->current_version), strtolower($this->update_info['version']['to']), '>')) + if (version_compare(str_replace('rc', 'RC', strtolower($this->current_version)), str_replace('rc', 'RC', strtolower($this->update_info['version']['to'])), '>')) { $template->assign_vars(array( 'S_ERROR' => true, @@ -202,7 +188,12 @@ class install_update extends module { $lang = array(); include($this->new_location . 'language/en/install.php'); - $user->lang = array_merge($user->lang, $lang); + // only add new keys to user's language in english + $new_keys = array_diff(array_keys($lang), array_keys($user->lang)); + foreach ($new_keys as $i => $new_key) + { + $user->lang[$new_key] = $lang[$new_key]; + } } } @@ -276,7 +267,7 @@ class install_update extends module $template->assign_vars(array( 'S_DB_UPDATE' => true, 'S_DB_UPDATE_FINISHED' => ($config['version'] == $this->latest_version) ? true : false, - 'U_DB_UPDATE' => $phpbb_root_path . 'install/database_update.' . $phpEx . '?type=1', + 'U_DB_UPDATE' => append_sid($phpbb_root_path . 'install/database_update.' . $phpEx, 'type=1&language=' . $language), 'U_DB_UPDATE_ACTION' => append_sid($this->p_master->module_url, "mode=$mode&sub=update_db"), 'U_ACTION' => append_sid($this->p_master->module_url, "mode=$mode&sub=file_check"), )); @@ -411,12 +402,14 @@ class install_update extends module if ($all_up_to_date) { - $db->sql_query('DELETE FROM ' . CONFIG_TABLE . " WHERE config_name = 'version_update_from'"); - // Add database update to log add_log('admin', 'LOG_UPDATE_PHPBB', $this->current_version, $this->latest_version); $cache->purge(); + + $db->sql_return_on_error(true); + $db->sql_query('DELETE FROM ' . CONFIG_TABLE . " WHERE config_name = 'version_update_from'"); + $db->sql_return_on_error(false); } break; @@ -464,7 +457,7 @@ class install_update extends module $radio_buttons = ''; foreach ($methods as $method) { - $radio_buttons .= ' ' . $method . ' '; + $radio_buttons .= ''; } $template->assign_vars(array( @@ -590,7 +583,9 @@ class install_update extends module } // Now update the installation or download the archive... - $archive_filename = 'update_' . $this->update_info['version']['from'] . '_to_' . $this->update_info['version']['to']; + $download_filename = 'update_' . $this->update_info['version']['from'] . '_to_' . $this->update_info['version']['to']; + $archive_filename = $download_filename . '_' . time() . '_' . unique_id(); + $update_list = $cache->get('_update_list'); $conflicts = request_var('conflict', array('' => 0)); @@ -749,7 +744,7 @@ class install_update extends module { $compress->close(); - $compress->download($archive_filename); + $compress->download($archive_filename, $download_filename); @unlink($phpbb_root_path . 'store/' . $archive_filename . $use_method); exit; @@ -934,7 +929,7 @@ class install_update extends module } // If the file exists within the old directory the file got removed and we will write it back - // not a biggie, but we might want to state this circumstance seperatly later. + // not a biggie, but we might want to state this circumstance separately later. // if (file_exists($this->old_location . $file)) // { // $update_list['removed'][] = $file; @@ -1181,7 +1176,7 @@ class install_update extends module /* Get custom installed styles... $sql = 'SELECT template_name, template_path FROM ' . STYLES_TEMPLATE_TABLE . " - WHERE template_name NOT IN ('subSilver', 'BLABLA')"; + WHERE LOWER(template_name) NOT IN ('subsilver2', 'prosilver')"; $result = $db->sql_query($sql); $templates = array(); @@ -1196,11 +1191,11 @@ class install_update extends module foreach ($info['files'] as $filename) { // Template update? - if (strpos($filename, 'styles/subSilver/template/') === 0) + if (strpos(strtolower($filename), 'styles/subsilver2/template/') === 0) { foreach ($templates as $row) { - $info['custom'][$filename][] = str_replace('/subSilver/', '/' . $row['template_path'] . '/', $filename); + $info['custom'][$filename][] = str_replace('/subsilver2/', '/' . $row['template_path'] . '/', $filename); } } } diff --git a/phpBB/install/schemas/firebird_schema.sql b/phpBB/install/schemas/firebird_schema.sql index dd3e4af9d2..f815449d19 100644 --- a/phpBB/install/schemas/firebird_schema.sql +++ b/phpBB/install/schemas/firebird_schema.sql @@ -1,6 +1,4 @@ # -# Firebird Schema for phpBB 3.x - (c) phpBB Group, 2005 -# # $Id$ # @@ -54,6 +52,7 @@ CREATE TABLE phpbb_acl_groups ( CREATE INDEX phpbb_acl_groups_group_id ON phpbb_acl_groups(group_id);; CREATE INDEX phpbb_acl_groups_auth_opt_id ON phpbb_acl_groups(auth_option_id);; +CREATE INDEX phpbb_acl_groups_auth_role_id ON phpbb_acl_groups(auth_role_id);; # Table: 'phpbb_acl_options' CREATE TABLE phpbb_acl_options ( @@ -113,6 +112,7 @@ CREATE TABLE phpbb_acl_roles_data ( ALTER TABLE phpbb_acl_roles_data ADD PRIMARY KEY (role_id, auth_option_id);; +CREATE INDEX phpbb_acl_roles_data_ath_opt_id ON phpbb_acl_roles_data(auth_option_id);; # Table: 'phpbb_acl_users' CREATE TABLE phpbb_acl_users ( @@ -125,6 +125,7 @@ CREATE TABLE phpbb_acl_users ( CREATE INDEX phpbb_acl_users_user_id ON phpbb_acl_users(user_id);; CREATE INDEX phpbb_acl_users_auth_option_id ON phpbb_acl_users(auth_option_id);; +CREATE INDEX phpbb_acl_users_auth_role_id ON phpbb_acl_users(auth_role_id);; # Table: 'phpbb_banlist' CREATE TABLE phpbb_banlist ( @@ -178,12 +179,11 @@ CREATE INDEX phpbb_bbcodes_display_on_post ON phpbb_bbcodes(display_on_posting); # Table: 'phpbb_bookmarks' CREATE TABLE phpbb_bookmarks ( topic_id INTEGER DEFAULT 0 NOT NULL, - user_id INTEGER DEFAULT 0 NOT NULL, - order_id INTEGER DEFAULT 0 NOT NULL + user_id INTEGER DEFAULT 0 NOT NULL );; -CREATE INDEX phpbb_bookmarks_order_id ON phpbb_bookmarks(order_id);; -CREATE INDEX phpbb_bookmarks_topic_user_id ON phpbb_bookmarks(topic_id, user_id);; +ALTER TABLE phpbb_bookmarks ADD PRIMARY KEY (topic_id, user_id);; + # Table: 'phpbb_bots' CREATE TABLE phpbb_bots ( @@ -924,12 +924,14 @@ ALTER TABLE phpbb_search_results ADD PRIMARY KEY (search_key);; CREATE TABLE phpbb_search_wordlist ( word_id INTEGER NOT NULL, word_text VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE, - word_common INTEGER DEFAULT 0 NOT NULL + word_common INTEGER DEFAULT 0 NOT NULL, + word_count INTEGER DEFAULT 0 NOT NULL );; ALTER TABLE phpbb_search_wordlist ADD PRIMARY KEY (word_id);; CREATE UNIQUE INDEX phpbb_search_wordlist_wrd_txt ON phpbb_search_wordlist(word_text);; +CREATE INDEX phpbb_search_wordlist_wrd_cnt ON phpbb_search_wordlist(word_count);; CREATE GENERATOR phpbb_search_wordlist_gen;; SET GENERATOR phpbb_search_wordlist_gen TO 0;; @@ -949,6 +951,7 @@ CREATE TABLE phpbb_search_wordmatch ( title_match INTEGER DEFAULT 0 NOT NULL );; +CREATE UNIQUE INDEX phpbb_search_wordmatch_unq_mtch ON phpbb_search_wordmatch(word_id, post_id, title_match);; CREATE INDEX phpbb_search_wordmatch_word_id ON phpbb_search_wordmatch(word_id);; CREATE INDEX phpbb_search_wordmatch_post_id ON phpbb_search_wordmatch(post_id);; @@ -1142,101 +1145,7 @@ CREATE TABLE phpbb_styles_imageset ( imageset_id INTEGER NOT NULL, imageset_name VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE, imageset_copyright VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE, - imageset_path VARCHAR(100) CHARACTER SET NONE DEFAULT '' NOT NULL, - site_logo VARCHAR(200) CHARACTER SET NONE DEFAULT '' NOT NULL, - upload_bar VARCHAR(200) CHARACTER SET NONE DEFAULT '' NOT NULL, - poll_left VARCHAR(200) CHARACTER SET NONE DEFAULT '' NOT NULL, - poll_center VARCHAR(200) CHARACTER SET NONE DEFAULT '' NOT NULL, - poll_right VARCHAR(200) CHARACTER SET NONE DEFAULT '' NOT NULL, - icon_friend VARCHAR(200) CHARACTER SET NONE DEFAULT '' NOT NULL, - icon_foe VARCHAR(200) CHARACTER SET NONE DEFAULT '' NOT NULL, - forum_link VARCHAR(200) CHARACTER SET NONE DEFAULT '' NOT NULL, - forum_read VARCHAR(200) CHARACTER SET NONE DEFAULT '' NOT NULL, - forum_read_locked VARCHAR(200) CHARACTER SET NONE DEFAULT '' NOT NULL, - forum_read_subforum VARCHAR(200) CHARACTER SET NONE DEFAULT '' NOT NULL, - forum_unread VARCHAR(200) CHARACTER SET NONE DEFAULT '' NOT NULL, - forum_unread_locked VARCHAR(200) CHARACTER SET NONE DEFAULT '' NOT NULL, - forum_unread_subforum VARCHAR(200) CHARACTER SET NONE DEFAULT '' NOT NULL, - topic_moved VARCHAR(200) CHARACTER SET NONE DEFAULT '' NOT NULL, - topic_read VARCHAR(200) CHARACTER SET NONE DEFAULT '' NOT NULL, - topic_read_mine VARCHAR(200) CHARACTER SET NONE DEFAULT '' NOT NULL, - topic_read_hot VARCHAR(200) CHARACTER SET NONE DEFAULT '' NOT NULL, - topic_read_hot_mine VARCHAR(200) CHARACTER SET NONE DEFAULT '' NOT NULL, - topic_read_locked VARCHAR(200) CHARACTER SET NONE DEFAULT '' NOT NULL, - topic_read_locked_mine VARCHAR(200) CHARACTER SET NONE DEFAULT '' NOT NULL, - topic_unread VARCHAR(200) CHARACTER SET NONE DEFAULT '' NOT NULL, - topic_unread_mine VARCHAR(200) CHARACTER SET NONE DEFAULT '' NOT NULL, - topic_unread_hot VARCHAR(200) CHARACTER SET NONE DEFAULT '' NOT NULL, - topic_unread_hot_mine VARCHAR(200) CHARACTER SET NONE DEFAULT '' NOT NULL, - topic_unread_locked VARCHAR(200) CHARACTER SET NONE DEFAULT '' NOT NULL, - topic_unread_locked_mine VARCHAR(200) CHARACTER SET NONE DEFAULT '' NOT NULL, - sticky_read VARCHAR(200) CHARACTER SET NONE DEFAULT '' NOT NULL, - sticky_read_mine VARCHAR(200) CHARACTER SET NONE DEFAULT '' NOT NULL, - sticky_read_locked VARCHAR(200) CHARACTER SET NONE DEFAULT '' NOT NULL, - sticky_read_locked_mine VARCHAR(200) CHARACTER SET NONE DEFAULT '' NOT NULL, - sticky_unread VARCHAR(200) CHARACTER SET NONE DEFAULT '' NOT NULL, - sticky_unread_mine VARCHAR(200) CHARACTER SET NONE DEFAULT '' NOT NULL, - sticky_unread_locked VARCHAR(200) CHARACTER SET NONE DEFAULT '' NOT NULL, - sticky_unread_locked_mine VARCHAR(200) CHARACTER SET NONE DEFAULT '' NOT NULL, - announce_read VARCHAR(200) CHARACTER SET NONE DEFAULT '' NOT NULL, - announce_read_mine VARCHAR(200) CHARACTER SET NONE DEFAULT '' NOT NULL, - announce_read_locked VARCHAR(200) CHARACTER SET NONE DEFAULT '' NOT NULL, - announce_read_locked_mine VARCHAR(200) CHARACTER SET NONE DEFAULT '' NOT NULL, - announce_unread VARCHAR(200) CHARACTER SET NONE DEFAULT '' NOT NULL, - announce_unread_mine VARCHAR(200) CHARACTER SET NONE DEFAULT '' NOT NULL, - announce_unread_locked VARCHAR(200) CHARACTER SET NONE DEFAULT '' NOT NULL, - announce_unread_locked_mine VARCHAR(200) CHARACTER SET NONE DEFAULT '' NOT NULL, - global_read VARCHAR(200) CHARACTER SET NONE DEFAULT '' NOT NULL, - global_read_mine VARCHAR(200) CHARACTER SET NONE DEFAULT '' NOT NULL, - global_read_locked VARCHAR(200) CHARACTER SET NONE DEFAULT '' NOT NULL, - global_read_locked_mine VARCHAR(200) CHARACTER SET NONE DEFAULT '' NOT NULL, - global_unread VARCHAR(200) CHARACTER SET NONE DEFAULT '' NOT NULL, - global_unread_mine VARCHAR(200) CHARACTER SET NONE DEFAULT '' NOT NULL, - global_unread_locked VARCHAR(200) CHARACTER SET NONE DEFAULT '' NOT NULL, - global_unread_locked_mine VARCHAR(200) CHARACTER SET NONE DEFAULT '' NOT NULL, - pm_read VARCHAR(200) CHARACTER SET NONE DEFAULT '' NOT NULL, - pm_unread VARCHAR(200) CHARACTER SET NONE DEFAULT '' NOT NULL, - icon_contact_aim VARCHAR(200) CHARACTER SET NONE DEFAULT '' NOT NULL, - icon_contact_email VARCHAR(200) CHARACTER SET NONE DEFAULT '' NOT NULL, - icon_contact_icq VARCHAR(200) CHARACTER SET NONE DEFAULT '' NOT NULL, - icon_contact_jabber VARCHAR(200) CHARACTER SET NONE DEFAULT '' NOT NULL, - icon_contact_msnm VARCHAR(200) CHARACTER SET NONE DEFAULT '' NOT NULL, - icon_contact_pm VARCHAR(200) CHARACTER SET NONE DEFAULT '' NOT NULL, - icon_contact_yahoo VARCHAR(200) CHARACTER SET NONE DEFAULT '' NOT NULL, - icon_contact_www VARCHAR(200) CHARACTER SET NONE DEFAULT '' NOT NULL, - icon_post_delete VARCHAR(200) CHARACTER SET NONE DEFAULT '' NOT NULL, - icon_post_edit VARCHAR(200) CHARACTER SET NONE DEFAULT '' NOT NULL, - icon_post_info VARCHAR(200) CHARACTER SET NONE DEFAULT '' NOT NULL, - icon_post_quote VARCHAR(200) CHARACTER SET NONE DEFAULT '' NOT NULL, - icon_post_report VARCHAR(200) CHARACTER SET NONE DEFAULT '' NOT NULL, - icon_post_target VARCHAR(200) CHARACTER SET NONE DEFAULT '' NOT NULL, - icon_post_target_unread VARCHAR(200) CHARACTER SET NONE DEFAULT '' NOT NULL, - icon_topic_attach VARCHAR(200) CHARACTER SET NONE DEFAULT '' NOT NULL, - icon_topic_latest VARCHAR(200) CHARACTER SET NONE DEFAULT '' NOT NULL, - icon_topic_newest VARCHAR(200) CHARACTER SET NONE DEFAULT '' NOT NULL, - icon_topic_reported VARCHAR(200) CHARACTER SET NONE DEFAULT '' NOT NULL, - icon_topic_unapproved VARCHAR(200) CHARACTER SET NONE DEFAULT '' NOT NULL, - icon_user_online VARCHAR(200) CHARACTER SET NONE DEFAULT '' NOT NULL, - icon_user_offline VARCHAR(200) CHARACTER SET NONE DEFAULT '' NOT NULL, - icon_user_profile VARCHAR(200) CHARACTER SET NONE DEFAULT '' NOT NULL, - icon_user_search VARCHAR(200) CHARACTER SET NONE DEFAULT '' NOT NULL, - icon_user_warn VARCHAR(200) CHARACTER SET NONE DEFAULT '' NOT NULL, - button_pm_forward VARCHAR(200) CHARACTER SET NONE DEFAULT '' NOT NULL, - button_pm_new VARCHAR(200) CHARACTER SET NONE DEFAULT '' NOT NULL, - button_pm_reply VARCHAR(200) CHARACTER SET NONE DEFAULT '' NOT NULL, - button_topic_locked VARCHAR(200) CHARACTER SET NONE DEFAULT '' NOT NULL, - button_topic_new VARCHAR(200) CHARACTER SET NONE DEFAULT '' NOT NULL, - button_topic_reply VARCHAR(200) CHARACTER SET NONE DEFAULT '' NOT NULL, - user_icon1 VARCHAR(200) CHARACTER SET NONE DEFAULT '' NOT NULL, - user_icon2 VARCHAR(200) CHARACTER SET NONE DEFAULT '' NOT NULL, - user_icon3 VARCHAR(200) CHARACTER SET NONE DEFAULT '' NOT NULL, - user_icon4 VARCHAR(200) CHARACTER SET NONE DEFAULT '' NOT NULL, - user_icon5 VARCHAR(200) CHARACTER SET NONE DEFAULT '' NOT NULL, - user_icon6 VARCHAR(200) CHARACTER SET NONE DEFAULT '' NOT NULL, - user_icon7 VARCHAR(200) CHARACTER SET NONE DEFAULT '' NOT NULL, - user_icon8 VARCHAR(200) CHARACTER SET NONE DEFAULT '' NOT NULL, - user_icon9 VARCHAR(200) CHARACTER SET NONE DEFAULT '' NOT NULL, - user_icon10 VARCHAR(200) CHARACTER SET NONE DEFAULT '' NOT NULL + imageset_path VARCHAR(100) CHARACTER SET NONE DEFAULT '' NOT NULL );; ALTER TABLE phpbb_styles_imageset ADD PRIMARY KEY (imageset_id);; @@ -1254,6 +1163,32 @@ BEGIN END;; +# Table: 'phpbb_styles_imageset_data' +CREATE TABLE phpbb_styles_imageset_data ( + image_id INTEGER NOT NULL, + image_name VARCHAR(200) CHARACTER SET NONE DEFAULT '' NOT NULL, + image_filename VARCHAR(200) CHARACTER SET NONE DEFAULT '' NOT NULL, + image_lang VARCHAR(30) CHARACTER SET NONE DEFAULT '' NOT NULL, + image_height INTEGER DEFAULT 0 NOT NULL, + image_width INTEGER DEFAULT 0 NOT NULL, + imageset_id INTEGER DEFAULT 0 NOT NULL +);; + +ALTER TABLE phpbb_styles_imageset_data ADD PRIMARY KEY (image_id);; + +CREATE INDEX phpbb_styles_imageset_data_i_id ON phpbb_styles_imageset_data(imageset_id);; + +CREATE GENERATOR phpbb_styles_imageset_data_gen;; +SET GENERATOR phpbb_styles_imageset_data_gen TO 0;; + +CREATE TRIGGER t_phpbb_styles_imageset_data FOR phpbb_styles_imageset_data +BEFORE INSERT +AS +BEGIN + NEW.image_id = GEN_ID(phpbb_styles_imageset_data_gen, 1); +END;; + + # Table: 'phpbb_topics' CREATE TABLE phpbb_topics ( topic_id INTEGER NOT NULL, @@ -1284,7 +1219,7 @@ CREATE TABLE phpbb_topics ( topic_moved_id INTEGER DEFAULT 0 NOT NULL, topic_bumped INTEGER DEFAULT 0 NOT NULL, topic_bumper INTEGER DEFAULT 0 NOT NULL, - poll_title VARCHAR(100) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE, + poll_title VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE, poll_start INTEGER DEFAULT 0 NOT NULL, poll_length INTEGER DEFAULT 0 NOT NULL, poll_max_options INTEGER DEFAULT 1 NOT NULL, @@ -1298,6 +1233,7 @@ CREATE INDEX phpbb_topics_forum_id ON phpbb_topics(forum_id);; CREATE INDEX phpbb_topics_forum_id_type ON phpbb_topics(forum_id, topic_type);; CREATE INDEX phpbb_topics_last_post_time ON phpbb_topics(topic_last_post_time);; CREATE INDEX phpbb_topics_topic_approved ON phpbb_topics(topic_approved);; +CREATE INDEX phpbb_topics_forum_appr_last ON phpbb_topics(forum_id, topic_approved, topic_last_post_id);; CREATE INDEX phpbb_topics_fid_time_moved ON phpbb_topics(forum_id, topic_last_post_time, topic_moved_id);; CREATE GENERATOR phpbb_topics_gen;; @@ -1437,7 +1373,7 @@ ALTER TABLE phpbb_users ADD PRIMARY KEY (user_id);; CREATE INDEX phpbb_users_user_birthday ON phpbb_users(user_birthday);; CREATE INDEX phpbb_users_user_email_hash ON phpbb_users(user_email_hash);; CREATE INDEX phpbb_users_user_type ON phpbb_users(user_type);; -CREATE INDEX phpbb_users_username_clean ON phpbb_users(username_clean);; +CREATE UNIQUE INDEX phpbb_users_username_clean ON phpbb_users(username_clean);; CREATE GENERATOR phpbb_users_gen;; SET GENERATOR phpbb_users_gen TO 0;; diff --git a/phpBB/install/schemas/mssql_schema.sql b/phpBB/install/schemas/mssql_schema.sql index 7f33783072..3e58881427 100644 --- a/phpBB/install/schemas/mssql_schema.sql +++ b/phpBB/install/schemas/mssql_schema.sql @@ -1,5 +1,4 @@ /* - MSSQL Schema for phpBB 3.x - (c) phpBB Group, 2005 $Id$ @@ -71,6 +70,9 @@ GO CREATE INDEX [auth_opt_id] ON [phpbb_acl_groups]([auth_option_id]) ON [PRIMARY] GO +CREATE INDEX [auth_role_id] ON [phpbb_acl_groups]([auth_role_id]) ON [PRIMARY] +GO + /* Table: 'phpbb_acl_options' @@ -139,6 +141,9 @@ ALTER TABLE [phpbb_acl_roles_data] WITH NOCHECK ADD ) ON [PRIMARY] GO +CREATE INDEX [ath_opt_id] ON [phpbb_acl_roles_data]([auth_option_id]) ON [PRIMARY] +GO + /* Table: 'phpbb_acl_users' @@ -158,6 +163,9 @@ GO CREATE INDEX [auth_option_id] ON [phpbb_acl_users]([auth_option_id]) ON [PRIMARY] GO +CREATE INDEX [auth_role_id] ON [phpbb_acl_users]([auth_role_id]) ON [PRIMARY] +GO + /* Table: 'phpbb_banlist' @@ -228,15 +236,16 @@ GO */ CREATE TABLE [phpbb_bookmarks] ( [topic_id] [int] DEFAULT (0) NOT NULL , - [user_id] [int] DEFAULT (0) NOT NULL , - [order_id] [int] DEFAULT (0) NOT NULL + [user_id] [int] DEFAULT (0) NOT NULL ) ON [PRIMARY] GO -CREATE INDEX [order_id] ON [phpbb_bookmarks]([order_id]) ON [PRIMARY] -GO - -CREATE INDEX [topic_user_id] ON [phpbb_bookmarks]([topic_id], [user_id]) ON [PRIMARY] +ALTER TABLE [phpbb_bookmarks] WITH NOCHECK ADD + CONSTRAINT [PK_phpbb_bookmarks] PRIMARY KEY CLUSTERED + ( + [topic_id], + [user_id] + ) ON [PRIMARY] GO @@ -1098,7 +1107,8 @@ GO CREATE TABLE [phpbb_search_wordlist] ( [word_id] [int] IDENTITY (1, 1) NOT NULL , [word_text] [varchar] (255) DEFAULT ('') NOT NULL , - [word_common] [int] DEFAULT (0) NOT NULL + [word_common] [int] DEFAULT (0) NOT NULL , + [word_count] [int] DEFAULT (0) NOT NULL ) ON [PRIMARY] GO @@ -1112,6 +1122,9 @@ GO CREATE UNIQUE INDEX [wrd_txt] ON [phpbb_search_wordlist]([word_text]) ON [PRIMARY] GO +CREATE INDEX [wrd_cnt] ON [phpbb_search_wordlist]([word_count]) ON [PRIMARY] +GO + /* Table: 'phpbb_search_wordmatch' @@ -1123,6 +1136,9 @@ CREATE TABLE [phpbb_search_wordmatch] ( ) ON [PRIMARY] GO +CREATE UNIQUE INDEX [unq_mtch] ON [phpbb_search_wordmatch]([word_id], [post_id], [title_match]) ON [PRIMARY] +GO + CREATE INDEX [word_id] ON [phpbb_search_wordmatch]([word_id]) ON [PRIMARY] GO @@ -1340,101 +1356,7 @@ CREATE TABLE [phpbb_styles_imageset] ( [imageset_id] [int] IDENTITY (1, 1) NOT NULL , [imageset_name] [varchar] (255) DEFAULT ('') NOT NULL , [imageset_copyright] [varchar] (255) DEFAULT ('') NOT NULL , - [imageset_path] [varchar] (100) DEFAULT ('') NOT NULL , - [site_logo] [varchar] (200) DEFAULT ('') NOT NULL , - [upload_bar] [varchar] (200) DEFAULT ('') NOT NULL , - [poll_left] [varchar] (200) DEFAULT ('') NOT NULL , - [poll_center] [varchar] (200) DEFAULT ('') NOT NULL , - [poll_right] [varchar] (200) DEFAULT ('') NOT NULL , - [icon_friend] [varchar] (200) DEFAULT ('') NOT NULL , - [icon_foe] [varchar] (200) DEFAULT ('') NOT NULL , - [forum_link] [varchar] (200) DEFAULT ('') NOT NULL , - [forum_read] [varchar] (200) DEFAULT ('') NOT NULL , - [forum_read_locked] [varchar] (200) DEFAULT ('') NOT NULL , - [forum_read_subforum] [varchar] (200) DEFAULT ('') NOT NULL , - [forum_unread] [varchar] (200) DEFAULT ('') NOT NULL , - [forum_unread_locked] [varchar] (200) DEFAULT ('') NOT NULL , - [forum_unread_subforum] [varchar] (200) DEFAULT ('') NOT NULL , - [topic_moved] [varchar] (200) DEFAULT ('') NOT NULL , - [topic_read] [varchar] (200) DEFAULT ('') NOT NULL , - [topic_read_mine] [varchar] (200) DEFAULT ('') NOT NULL , - [topic_read_hot] [varchar] (200) DEFAULT ('') NOT NULL , - [topic_read_hot_mine] [varchar] (200) DEFAULT ('') NOT NULL , - [topic_read_locked] [varchar] (200) DEFAULT ('') NOT NULL , - [topic_read_locked_mine] [varchar] (200) DEFAULT ('') NOT NULL , - [topic_unread] [varchar] (200) DEFAULT ('') NOT NULL , - [topic_unread_mine] [varchar] (200) DEFAULT ('') NOT NULL , - [topic_unread_hot] [varchar] (200) DEFAULT ('') NOT NULL , - [topic_unread_hot_mine] [varchar] (200) DEFAULT ('') NOT NULL , - [topic_unread_locked] [varchar] (200) DEFAULT ('') NOT NULL , - [topic_unread_locked_mine] [varchar] (200) DEFAULT ('') NOT NULL , - [sticky_read] [varchar] (200) DEFAULT ('') NOT NULL , - [sticky_read_mine] [varchar] (200) DEFAULT ('') NOT NULL , - [sticky_read_locked] [varchar] (200) DEFAULT ('') NOT NULL , - [sticky_read_locked_mine] [varchar] (200) DEFAULT ('') NOT NULL , - [sticky_unread] [varchar] (200) DEFAULT ('') NOT NULL , - [sticky_unread_mine] [varchar] (200) DEFAULT ('') NOT NULL , - [sticky_unread_locked] [varchar] (200) DEFAULT ('') NOT NULL , - [sticky_unread_locked_mine] [varchar] (200) DEFAULT ('') NOT NULL , - [announce_read] [varchar] (200) DEFAULT ('') NOT NULL , - [announce_read_mine] [varchar] (200) DEFAULT ('') NOT NULL , - [announce_read_locked] [varchar] (200) DEFAULT ('') NOT NULL , - [announce_read_locked_mine] [varchar] (200) DEFAULT ('') NOT NULL , - [announce_unread] [varchar] (200) DEFAULT ('') NOT NULL , - [announce_unread_mine] [varchar] (200) DEFAULT ('') NOT NULL , - [announce_unread_locked] [varchar] (200) DEFAULT ('') NOT NULL , - [announce_unread_locked_mine] [varchar] (200) DEFAULT ('') NOT NULL , - [global_read] [varchar] (200) DEFAULT ('') NOT NULL , - [global_read_mine] [varchar] (200) DEFAULT ('') NOT NULL , - [global_read_locked] [varchar] (200) DEFAULT ('') NOT NULL , - [global_read_locked_mine] [varchar] (200) DEFAULT ('') NOT NULL , - [global_unread] [varchar] (200) DEFAULT ('') NOT NULL , - [global_unread_mine] [varchar] (200) DEFAULT ('') NOT NULL , - [global_unread_locked] [varchar] (200) DEFAULT ('') NOT NULL , - [global_unread_locked_mine] [varchar] (200) DEFAULT ('') NOT NULL , - [pm_read] [varchar] (200) DEFAULT ('') NOT NULL , - [pm_unread] [varchar] (200) DEFAULT ('') NOT NULL , - [icon_contact_aim] [varchar] (200) DEFAULT ('') NOT NULL , - [icon_contact_email] [varchar] (200) DEFAULT ('') NOT NULL , - [icon_contact_icq] [varchar] (200) DEFAULT ('') NOT NULL , - [icon_contact_jabber] [varchar] (200) DEFAULT ('') NOT NULL , - [icon_contact_msnm] [varchar] (200) DEFAULT ('') NOT NULL , - [icon_contact_pm] [varchar] (200) DEFAULT ('') NOT NULL , - [icon_contact_yahoo] [varchar] (200) DEFAULT ('') NOT NULL , - [icon_contact_www] [varchar] (200) DEFAULT ('') NOT NULL , - [icon_post_delete] [varchar] (200) DEFAULT ('') NOT NULL , - [icon_post_edit] [varchar] (200) DEFAULT ('') NOT NULL , - [icon_post_info] [varchar] (200) DEFAULT ('') NOT NULL , - [icon_post_quote] [varchar] (200) DEFAULT ('') NOT NULL , - [icon_post_report] [varchar] (200) DEFAULT ('') NOT NULL , - [icon_post_target] [varchar] (200) DEFAULT ('') NOT NULL , - [icon_post_target_unread] [varchar] (200) DEFAULT ('') NOT NULL , - [icon_topic_attach] [varchar] (200) DEFAULT ('') NOT NULL , - [icon_topic_latest] [varchar] (200) DEFAULT ('') NOT NULL , - [icon_topic_newest] [varchar] (200) DEFAULT ('') NOT NULL , - [icon_topic_reported] [varchar] (200) DEFAULT ('') NOT NULL , - [icon_topic_unapproved] [varchar] (200) DEFAULT ('') NOT NULL , - [icon_user_online] [varchar] (200) DEFAULT ('') NOT NULL , - [icon_user_offline] [varchar] (200) DEFAULT ('') NOT NULL , - [icon_user_profile] [varchar] (200) DEFAULT ('') NOT NULL , - [icon_user_search] [varchar] (200) DEFAULT ('') NOT NULL , - [icon_user_warn] [varchar] (200) DEFAULT ('') NOT NULL , - [button_pm_forward] [varchar] (200) DEFAULT ('') NOT NULL , - [button_pm_new] [varchar] (200) DEFAULT ('') NOT NULL , - [button_pm_reply] [varchar] (200) DEFAULT ('') NOT NULL , - [button_topic_locked] [varchar] (200) DEFAULT ('') NOT NULL , - [button_topic_new] [varchar] (200) DEFAULT ('') NOT NULL , - [button_topic_reply] [varchar] (200) DEFAULT ('') NOT NULL , - [user_icon1] [varchar] (200) DEFAULT ('') NOT NULL , - [user_icon2] [varchar] (200) DEFAULT ('') NOT NULL , - [user_icon3] [varchar] (200) DEFAULT ('') NOT NULL , - [user_icon4] [varchar] (200) DEFAULT ('') NOT NULL , - [user_icon5] [varchar] (200) DEFAULT ('') NOT NULL , - [user_icon6] [varchar] (200) DEFAULT ('') NOT NULL , - [user_icon7] [varchar] (200) DEFAULT ('') NOT NULL , - [user_icon8] [varchar] (200) DEFAULT ('') NOT NULL , - [user_icon9] [varchar] (200) DEFAULT ('') NOT NULL , - [user_icon10] [varchar] (200) DEFAULT ('') NOT NULL + [imageset_path] [varchar] (100) DEFAULT ('') NOT NULL ) ON [PRIMARY] GO @@ -1449,6 +1371,31 @@ CREATE UNIQUE INDEX [imgset_nm] ON [phpbb_styles_imageset]([imageset_name]) ON GO +/* + Table: 'phpbb_styles_imageset_data' +*/ +CREATE TABLE [phpbb_styles_imageset_data] ( + [image_id] [int] IDENTITY (1, 1) NOT NULL , + [image_name] [varchar] (200) DEFAULT ('') NOT NULL , + [image_filename] [varchar] (200) DEFAULT ('') NOT NULL , + [image_lang] [varchar] (30) DEFAULT ('') NOT NULL , + [image_height] [int] DEFAULT (0) NOT NULL , + [image_width] [int] DEFAULT (0) NOT NULL , + [imageset_id] [int] DEFAULT (0) NOT NULL +) ON [PRIMARY] +GO + +ALTER TABLE [phpbb_styles_imageset_data] WITH NOCHECK ADD + CONSTRAINT [PK_phpbb_styles_imageset_data] PRIMARY KEY CLUSTERED + ( + [image_id] + ) ON [PRIMARY] +GO + +CREATE INDEX [i_id] ON [phpbb_styles_imageset_data]([imageset_id]) ON [PRIMARY] +GO + + /* Table: 'phpbb_topics' */ @@ -1481,7 +1428,7 @@ CREATE TABLE [phpbb_topics] ( [topic_moved_id] [int] DEFAULT (0) NOT NULL , [topic_bumped] [int] DEFAULT (0) NOT NULL , [topic_bumper] [int] DEFAULT (0) NOT NULL , - [poll_title] [varchar] (100) DEFAULT ('') NOT NULL , + [poll_title] [varchar] (255) DEFAULT ('') NOT NULL , [poll_start] [int] DEFAULT (0) NOT NULL , [poll_length] [int] DEFAULT (0) NOT NULL , [poll_max_options] [int] DEFAULT (1) NOT NULL , @@ -1509,6 +1456,9 @@ GO CREATE INDEX [topic_approved] ON [phpbb_topics]([topic_approved]) ON [PRIMARY] GO +CREATE INDEX [forum_appr_last] ON [phpbb_topics]([forum_id], [topic_approved], [topic_last_post_id]) ON [PRIMARY] +GO + CREATE INDEX [fid_time_moved] ON [phpbb_topics]([forum_id], [topic_last_post_time], [topic_moved_id]) ON [PRIMARY] GO @@ -1691,7 +1641,7 @@ GO CREATE INDEX [user_type] ON [phpbb_users]([user_type]) ON [PRIMARY] GO -CREATE INDEX [username_clean] ON [phpbb_users]([username_clean]) ON [PRIMARY] +CREATE UNIQUE INDEX [username_clean] ON [phpbb_users]([username_clean]) ON [PRIMARY] GO diff --git a/phpBB/install/schemas/mysql_40_schema.sql b/phpBB/install/schemas/mysql_40_schema.sql index 2b3022a875..db814a3613 100644 --- a/phpBB/install/schemas/mysql_40_schema.sql +++ b/phpBB/install/schemas/mysql_40_schema.sql @@ -1,6 +1,4 @@ # -# MySQL Schema for phpBB 3.x - (c) phpBB Group, 2005 -# # $Id$ # @@ -12,12 +10,12 @@ CREATE TABLE phpbb_attachments ( in_message tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, poster_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, is_orphan tinyint(1) UNSIGNED DEFAULT '1' NOT NULL, - physical_filename varchar(255) DEFAULT '' NOT NULL, - real_filename varchar(255) DEFAULT '' NOT NULL, + physical_filename varbinary(255) DEFAULT '' NOT NULL, + real_filename varbinary(255) DEFAULT '' NOT NULL, download_count mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, - attach_comment text NOT NULL, - extension varchar(100) DEFAULT '' NOT NULL, - mimetype varchar(100) DEFAULT '' NOT NULL, + attach_comment blob NOT NULL, + extension varbinary(100) DEFAULT '' NOT NULL, + mimetype varbinary(100) DEFAULT '' NOT NULL, filesize int(20) UNSIGNED DEFAULT '0' NOT NULL, filetime int(11) UNSIGNED DEFAULT '0' NOT NULL, thumbnail tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, @@ -38,14 +36,15 @@ CREATE TABLE phpbb_acl_groups ( auth_role_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, auth_setting tinyint(2) DEFAULT '0' NOT NULL, KEY group_id (group_id), - KEY auth_opt_id (auth_option_id) + KEY auth_opt_id (auth_option_id), + KEY auth_role_id (auth_role_id) ); # Table: 'phpbb_acl_options' CREATE TABLE phpbb_acl_options ( auth_option_id mediumint(8) UNSIGNED NOT NULL auto_increment, - auth_option varchar(50) DEFAULT '' NOT NULL, + auth_option varbinary(50) DEFAULT '' NOT NULL, is_global tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, is_local tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, founder_only tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, @@ -57,9 +56,9 @@ CREATE TABLE phpbb_acl_options ( # Table: 'phpbb_acl_roles' CREATE TABLE phpbb_acl_roles ( role_id mediumint(8) UNSIGNED NOT NULL auto_increment, - role_name text NOT NULL, - role_description text NOT NULL, - role_type varchar(10) DEFAULT '' NOT NULL, + role_name blob NOT NULL, + role_description blob NOT NULL, + role_type varbinary(10) DEFAULT '' NOT NULL, role_order smallint(4) UNSIGNED DEFAULT '0' NOT NULL, PRIMARY KEY (role_id), KEY role_type (role_type), @@ -72,7 +71,8 @@ CREATE TABLE phpbb_acl_roles_data ( role_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, auth_option_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, auth_setting tinyint(2) DEFAULT '0' NOT NULL, - PRIMARY KEY (role_id, auth_option_id) + PRIMARY KEY (role_id, auth_option_id), + KEY ath_opt_id (auth_option_id) ); @@ -84,7 +84,8 @@ CREATE TABLE phpbb_acl_users ( auth_role_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, auth_setting tinyint(2) DEFAULT '0' NOT NULL, KEY user_id (user_id), - KEY auth_option_id (auth_option_id) + KEY auth_option_id (auth_option_id), + KEY auth_role_id (auth_role_id) ); @@ -92,13 +93,13 @@ CREATE TABLE phpbb_acl_users ( CREATE TABLE phpbb_banlist ( ban_id mediumint(8) UNSIGNED NOT NULL auto_increment, ban_userid mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, - ban_ip varchar(40) DEFAULT '' NOT NULL, - ban_email text NOT NULL, + ban_ip varbinary(40) DEFAULT '' NOT NULL, + ban_email blob NOT NULL, ban_start int(11) UNSIGNED DEFAULT '0' NOT NULL, ban_end int(11) UNSIGNED DEFAULT '0' NOT NULL, ban_exclude tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, - ban_reason text NOT NULL, - ban_give_reason text NOT NULL, + ban_reason blob NOT NULL, + ban_give_reason blob NOT NULL, PRIMARY KEY (ban_id), KEY ban_end (ban_end), KEY ban_user (ban_userid, ban_exclude), @@ -110,15 +111,15 @@ CREATE TABLE phpbb_banlist ( # Table: 'phpbb_bbcodes' CREATE TABLE phpbb_bbcodes ( bbcode_id tinyint(3) DEFAULT '0' NOT NULL, - bbcode_tag varchar(16) DEFAULT '' NOT NULL, - bbcode_helpline text NOT NULL, + bbcode_tag varbinary(16) DEFAULT '' NOT NULL, + bbcode_helpline blob NOT NULL, display_on_posting tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, - bbcode_match text NOT NULL, - bbcode_tpl mediumtext NOT NULL, - first_pass_match mediumtext NOT NULL, - first_pass_replace mediumtext NOT NULL, - second_pass_match mediumtext NOT NULL, - second_pass_replace mediumtext NOT NULL, + bbcode_match blob NOT NULL, + bbcode_tpl mediumblob NOT NULL, + first_pass_match mediumblob NOT NULL, + first_pass_replace mediumblob NOT NULL, + second_pass_match mediumblob NOT NULL, + second_pass_replace mediumblob NOT NULL, PRIMARY KEY (bbcode_id), KEY display_on_post (display_on_posting) ); @@ -128,9 +129,7 @@ CREATE TABLE phpbb_bbcodes ( CREATE TABLE phpbb_bookmarks ( topic_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, - order_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, - KEY order_id (order_id), - KEY topic_user_id (topic_id, user_id) + PRIMARY KEY (topic_id, user_id) ); @@ -138,10 +137,10 @@ CREATE TABLE phpbb_bookmarks ( CREATE TABLE phpbb_bots ( bot_id mediumint(8) UNSIGNED NOT NULL auto_increment, bot_active tinyint(1) UNSIGNED DEFAULT '1' NOT NULL, - bot_name text NOT NULL, + bot_name blob NOT NULL, user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, - bot_agent varchar(255) DEFAULT '' NOT NULL, - bot_ip varchar(255) DEFAULT '' NOT NULL, + bot_agent varbinary(255) DEFAULT '' NOT NULL, + bot_ip varbinary(255) DEFAULT '' NOT NULL, PRIMARY KEY (bot_id), KEY bot_active (bot_active) ); @@ -149,8 +148,8 @@ CREATE TABLE phpbb_bots ( # Table: 'phpbb_config' CREATE TABLE phpbb_config ( - config_name varchar(255) DEFAULT '' NOT NULL, - config_value text NOT NULL, + config_name varbinary(255) DEFAULT '' NOT NULL, + config_value blob NOT NULL, is_dynamic tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, PRIMARY KEY (config_name), KEY is_dynamic (is_dynamic) @@ -159,10 +158,10 @@ CREATE TABLE phpbb_config ( # Table: 'phpbb_confirm' CREATE TABLE phpbb_confirm ( - confirm_id char(32) DEFAULT '' NOT NULL, - session_id char(32) DEFAULT '' NOT NULL, + confirm_id binary(32) DEFAULT '' NOT NULL, + session_id binary(32) DEFAULT '' NOT NULL, confirm_type tinyint(3) DEFAULT '0' NOT NULL, - code varchar(8) DEFAULT '' NOT NULL, + code varbinary(8) DEFAULT '' NOT NULL, seed int(10) UNSIGNED DEFAULT '0' NOT NULL, PRIMARY KEY (session_id, confirm_id), KEY confirm_type (confirm_type) @@ -172,7 +171,7 @@ CREATE TABLE phpbb_confirm ( # Table: 'phpbb_disallow' CREATE TABLE phpbb_disallow ( disallow_id mediumint(8) UNSIGNED NOT NULL auto_increment, - disallow_username text NOT NULL, + disallow_username blob NOT NULL, PRIMARY KEY (disallow_id) ); @@ -184,8 +183,8 @@ CREATE TABLE phpbb_drafts ( topic_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, forum_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, save_time int(11) UNSIGNED DEFAULT '0' NOT NULL, - draft_subject text NOT NULL, - draft_message mediumtext NOT NULL, + draft_subject blob NOT NULL, + draft_message mediumblob NOT NULL, PRIMARY KEY (draft_id), KEY save_time (save_time) ); @@ -195,7 +194,7 @@ CREATE TABLE phpbb_drafts ( CREATE TABLE phpbb_extensions ( extension_id mediumint(8) UNSIGNED NOT NULL auto_increment, group_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, - extension varchar(100) DEFAULT '' NOT NULL, + extension varbinary(100) DEFAULT '' NOT NULL, PRIMARY KEY (extension_id) ); @@ -203,13 +202,13 @@ CREATE TABLE phpbb_extensions ( # Table: 'phpbb_extension_groups' CREATE TABLE phpbb_extension_groups ( group_id mediumint(8) UNSIGNED NOT NULL auto_increment, - group_name text NOT NULL, + group_name blob NOT NULL, cat_id tinyint(2) DEFAULT '0' NOT NULL, allow_group tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, download_mode tinyint(1) UNSIGNED DEFAULT '1' NOT NULL, - upload_icon varchar(255) DEFAULT '' NOT NULL, + upload_icon varbinary(255) DEFAULT '' NOT NULL, max_filesize int(20) UNSIGNED DEFAULT '0' NOT NULL, - allowed_forums text NOT NULL, + allowed_forums blob NOT NULL, allow_in_pm tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, PRIMARY KEY (group_id) ); @@ -221,21 +220,21 @@ CREATE TABLE phpbb_forums ( parent_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, left_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, right_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, - forum_parents mediumtext NOT NULL, - forum_name text NOT NULL, - forum_desc text NOT NULL, - forum_desc_bitfield varchar(255) DEFAULT '' NOT NULL, + forum_parents mediumblob NOT NULL, + forum_name blob NOT NULL, + forum_desc blob NOT NULL, + forum_desc_bitfield varbinary(255) DEFAULT '' NOT NULL, forum_desc_options int(11) UNSIGNED DEFAULT '7' NOT NULL, - forum_desc_uid varchar(5) DEFAULT '' NOT NULL, - forum_link text NOT NULL, - forum_password varchar(120) DEFAULT '' NOT NULL, + forum_desc_uid varbinary(5) DEFAULT '' NOT NULL, + forum_link blob NOT NULL, + forum_password varbinary(120) DEFAULT '' NOT NULL, forum_style tinyint(4) DEFAULT '0' NOT NULL, - forum_image varchar(255) DEFAULT '' NOT NULL, - forum_rules text NOT NULL, - forum_rules_link text NOT NULL, - forum_rules_bitfield varchar(255) DEFAULT '' NOT NULL, + forum_image varbinary(255) DEFAULT '' NOT NULL, + forum_rules blob NOT NULL, + forum_rules_link blob NOT NULL, + forum_rules_bitfield varbinary(255) DEFAULT '' NOT NULL, forum_rules_options int(11) UNSIGNED DEFAULT '7' NOT NULL, - forum_rules_uid varchar(5) DEFAULT '' NOT NULL, + forum_rules_uid varbinary(5) DEFAULT '' NOT NULL, forum_topics_per_page tinyint(4) DEFAULT '0' NOT NULL, forum_type tinyint(4) DEFAULT '0' NOT NULL, forum_status tinyint(4) DEFAULT '0' NOT NULL, @@ -244,10 +243,10 @@ CREATE TABLE phpbb_forums ( forum_topics_real mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, forum_last_post_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, forum_last_poster_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, - forum_last_post_subject text NOT NULL, + forum_last_post_subject blob NOT NULL, forum_last_post_time int(11) UNSIGNED DEFAULT '0' NOT NULL, - forum_last_poster_name text NOT NULL, - forum_last_poster_colour varchar(6) DEFAULT '' NOT NULL, + forum_last_poster_name blob NOT NULL, + forum_last_poster_colour varbinary(6) DEFAULT '' NOT NULL, forum_flags tinyint(4) DEFAULT '32' NOT NULL, display_on_index tinyint(1) UNSIGNED DEFAULT '1' NOT NULL, enable_indexing tinyint(1) UNSIGNED DEFAULT '1' NOT NULL, @@ -267,7 +266,7 @@ CREATE TABLE phpbb_forums ( CREATE TABLE phpbb_forums_access ( forum_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, - session_id char(32) DEFAULT '' NOT NULL, + session_id binary(32) DEFAULT '' NOT NULL, PRIMARY KEY (forum_id, user_id, session_id) ); @@ -297,18 +296,18 @@ CREATE TABLE phpbb_groups ( group_id mediumint(8) UNSIGNED NOT NULL auto_increment, group_type tinyint(4) DEFAULT '1' NOT NULL, group_founder_manage tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, - group_name text NOT NULL, - group_desc text NOT NULL, - group_desc_bitfield varchar(255) DEFAULT '' NOT NULL, + group_name blob NOT NULL, + group_desc blob NOT NULL, + group_desc_bitfield varbinary(255) DEFAULT '' NOT NULL, group_desc_options int(11) UNSIGNED DEFAULT '7' NOT NULL, - group_desc_uid varchar(5) DEFAULT '' NOT NULL, + group_desc_uid varbinary(5) DEFAULT '' NOT NULL, group_display tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, - group_avatar varchar(255) DEFAULT '' NOT NULL, + group_avatar varbinary(255) DEFAULT '' NOT NULL, group_avatar_type tinyint(4) DEFAULT '0' NOT NULL, group_avatar_width tinyint(4) DEFAULT '0' NOT NULL, group_avatar_height tinyint(4) DEFAULT '0' NOT NULL, group_rank mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, - group_colour varchar(6) DEFAULT '' NOT NULL, + group_colour varbinary(6) DEFAULT '' NOT NULL, group_sig_chars mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, group_receive_pm tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, group_message_limit mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, @@ -321,7 +320,7 @@ CREATE TABLE phpbb_groups ( # Table: 'phpbb_icons' CREATE TABLE phpbb_icons ( icons_id mediumint(8) UNSIGNED NOT NULL auto_increment, - icons_url varchar(255) DEFAULT '' NOT NULL, + icons_url varbinary(255) DEFAULT '' NOT NULL, icons_width tinyint(4) DEFAULT '0' NOT NULL, icons_height tinyint(4) DEFAULT '0' NOT NULL, icons_order mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, @@ -334,11 +333,11 @@ CREATE TABLE phpbb_icons ( # Table: 'phpbb_lang' CREATE TABLE phpbb_lang ( lang_id tinyint(4) NOT NULL auto_increment, - lang_iso varchar(30) DEFAULT '' NOT NULL, - lang_dir varchar(30) DEFAULT '' NOT NULL, - lang_english_name text NOT NULL, - lang_local_name text NOT NULL, - lang_author text NOT NULL, + lang_iso varbinary(30) DEFAULT '' NOT NULL, + lang_dir varbinary(30) DEFAULT '' NOT NULL, + lang_english_name blob NOT NULL, + lang_local_name blob NOT NULL, + lang_author blob NOT NULL, PRIMARY KEY (lang_id), KEY lang_iso (lang_iso) ); @@ -352,10 +351,10 @@ CREATE TABLE phpbb_log ( forum_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, topic_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, reportee_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, - log_ip varchar(40) DEFAULT '' NOT NULL, + log_ip varbinary(40) DEFAULT '' NOT NULL, log_time int(11) UNSIGNED DEFAULT '0' NOT NULL, - log_operation text NOT NULL, - log_data mediumtext NOT NULL, + log_operation blob NOT NULL, + log_data mediumblob NOT NULL, PRIMARY KEY (log_id), KEY log_type (log_type), KEY forum_id (forum_id), @@ -369,9 +368,9 @@ CREATE TABLE phpbb_log ( CREATE TABLE phpbb_moderator_cache ( forum_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, - username text NOT NULL, + username blob NOT NULL, group_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, - group_name text NOT NULL, + group_name blob NOT NULL, display_on_index tinyint(1) UNSIGNED DEFAULT '1' NOT NULL, KEY disp_idx (display_on_index), KEY forum_id (forum_id) @@ -383,14 +382,14 @@ CREATE TABLE phpbb_modules ( module_id mediumint(8) UNSIGNED NOT NULL auto_increment, module_enabled tinyint(1) UNSIGNED DEFAULT '1' NOT NULL, module_display tinyint(1) UNSIGNED DEFAULT '1' NOT NULL, - module_basename varchar(255) DEFAULT '' NOT NULL, - module_class varchar(10) DEFAULT '' NOT NULL, + module_basename varbinary(255) DEFAULT '' NOT NULL, + module_class varbinary(10) DEFAULT '' NOT NULL, parent_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, left_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, right_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, - module_langname varchar(255) DEFAULT '' NOT NULL, - module_mode varchar(255) DEFAULT '' NOT NULL, - module_auth varchar(255) DEFAULT '' NOT NULL, + module_langname varbinary(255) DEFAULT '' NOT NULL, + module_mode varbinary(255) DEFAULT '' NOT NULL, + module_auth varbinary(255) DEFAULT '' NOT NULL, PRIMARY KEY (module_id), KEY left_right_id (left_id, right_id), KEY module_enabled (module_enabled), @@ -402,7 +401,7 @@ CREATE TABLE phpbb_modules ( CREATE TABLE phpbb_poll_options ( poll_option_id tinyint(4) DEFAULT '0' NOT NULL, topic_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, - poll_option_text text NOT NULL, + poll_option_text blob NOT NULL, poll_option_total mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, KEY poll_opt_id (poll_option_id), KEY topic_id (topic_id) @@ -414,7 +413,7 @@ CREATE TABLE phpbb_poll_votes ( topic_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, poll_option_id tinyint(4) DEFAULT '0' NOT NULL, vote_user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, - vote_user_ip varchar(40) DEFAULT '' NOT NULL, + vote_user_ip varbinary(40) DEFAULT '' NOT NULL, KEY topic_id (topic_id), KEY vote_user_id (vote_user_id), KEY vote_user_ip (vote_user_ip) @@ -428,7 +427,7 @@ CREATE TABLE phpbb_posts ( forum_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, poster_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, icon_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, - poster_ip varchar(40) DEFAULT '' NOT NULL, + poster_ip varbinary(40) DEFAULT '' NOT NULL, post_time int(11) UNSIGNED DEFAULT '0' NOT NULL, post_approved tinyint(1) UNSIGNED DEFAULT '1' NOT NULL, post_reported tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, @@ -436,16 +435,16 @@ CREATE TABLE phpbb_posts ( enable_smilies tinyint(1) UNSIGNED DEFAULT '1' NOT NULL, enable_magic_url tinyint(1) UNSIGNED DEFAULT '1' NOT NULL, enable_sig tinyint(1) UNSIGNED DEFAULT '1' NOT NULL, - post_username text NOT NULL, - post_subject text NOT NULL, - post_text mediumtext NOT NULL, - post_checksum varchar(32) DEFAULT '' NOT NULL, + post_username blob NOT NULL, + post_subject blob NOT NULL, + post_text mediumblob NOT NULL, + post_checksum varbinary(32) DEFAULT '' NOT NULL, post_attachment tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, - bbcode_bitfield varchar(255) DEFAULT '' NOT NULL, - bbcode_uid varchar(5) DEFAULT '' NOT NULL, + bbcode_bitfield varbinary(255) DEFAULT '' NOT NULL, + bbcode_uid varbinary(5) DEFAULT '' NOT NULL, post_postcount tinyint(1) UNSIGNED DEFAULT '1' NOT NULL, post_edit_time int(11) UNSIGNED DEFAULT '0' NOT NULL, - post_edit_reason text NOT NULL, + post_edit_reason blob NOT NULL, post_edit_user mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, post_edit_count smallint(4) UNSIGNED DEFAULT '0' NOT NULL, post_edit_locked tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, @@ -465,23 +464,23 @@ CREATE TABLE phpbb_privmsgs ( root_level mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, author_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, icon_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, - author_ip varchar(40) DEFAULT '' NOT NULL, + author_ip varbinary(40) DEFAULT '' NOT NULL, message_time int(11) UNSIGNED DEFAULT '0' NOT NULL, enable_bbcode tinyint(1) UNSIGNED DEFAULT '1' NOT NULL, enable_smilies tinyint(1) UNSIGNED DEFAULT '1' NOT NULL, enable_magic_url tinyint(1) UNSIGNED DEFAULT '1' NOT NULL, enable_sig tinyint(1) UNSIGNED DEFAULT '1' NOT NULL, - message_subject text NOT NULL, - message_text mediumtext NOT NULL, - message_edit_reason text NOT NULL, + message_subject blob NOT NULL, + message_text mediumblob NOT NULL, + message_edit_reason blob NOT NULL, message_edit_user mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, message_attachment tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, - bbcode_bitfield varchar(255) DEFAULT '' NOT NULL, - bbcode_uid varchar(5) DEFAULT '' NOT NULL, + bbcode_bitfield varbinary(255) DEFAULT '' NOT NULL, + bbcode_uid varbinary(5) DEFAULT '' NOT NULL, message_edit_time int(11) UNSIGNED DEFAULT '0' NOT NULL, message_edit_count smallint(4) UNSIGNED DEFAULT '0' NOT NULL, - to_address text NOT NULL, - bcc_address text NOT NULL, + to_address blob NOT NULL, + bcc_address blob NOT NULL, PRIMARY KEY (msg_id), KEY author_ip (author_ip), KEY message_time (message_time), @@ -494,7 +493,7 @@ CREATE TABLE phpbb_privmsgs ( CREATE TABLE phpbb_privmsgs_folder ( folder_id mediumint(8) UNSIGNED NOT NULL auto_increment, user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, - folder_name text NOT NULL, + folder_name blob NOT NULL, pm_count mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, PRIMARY KEY (folder_id), KEY user_id (user_id) @@ -507,7 +506,7 @@ CREATE TABLE phpbb_privmsgs_rules ( user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, rule_check mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, rule_connection mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, - rule_string text NOT NULL, + rule_string blob NOT NULL, rule_user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, rule_group_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, rule_action mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, @@ -538,15 +537,15 @@ CREATE TABLE phpbb_privmsgs_to ( # Table: 'phpbb_profile_fields' CREATE TABLE phpbb_profile_fields ( field_id mediumint(8) UNSIGNED NOT NULL auto_increment, - field_name text NOT NULL, + field_name blob NOT NULL, field_type tinyint(4) DEFAULT '0' NOT NULL, - field_ident varchar(20) DEFAULT '' NOT NULL, - field_length varchar(20) DEFAULT '' NOT NULL, - field_minlen varchar(255) DEFAULT '' NOT NULL, - field_maxlen varchar(255) DEFAULT '' NOT NULL, - field_novalue text NOT NULL, - field_default_value text NOT NULL, - field_validation varchar(60) DEFAULT '' NOT NULL, + field_ident varbinary(20) DEFAULT '' NOT NULL, + field_length varbinary(20) DEFAULT '' NOT NULL, + field_minlen varbinary(255) DEFAULT '' NOT NULL, + field_maxlen varbinary(255) DEFAULT '' NOT NULL, + field_novalue blob NOT NULL, + field_default_value blob NOT NULL, + field_validation varbinary(60) DEFAULT '' NOT NULL, field_required tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, field_show_on_reg tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, field_hide tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, @@ -572,7 +571,7 @@ CREATE TABLE phpbb_profile_fields_lang ( lang_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, option_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, field_type tinyint(4) DEFAULT '0' NOT NULL, - lang_value text NOT NULL, + lang_value blob NOT NULL, PRIMARY KEY (field_id, lang_id, option_id) ); @@ -581,9 +580,9 @@ CREATE TABLE phpbb_profile_fields_lang ( CREATE TABLE phpbb_profile_lang ( field_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, lang_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, - lang_name text NOT NULL, - lang_explain text NOT NULL, - lang_default_value text NOT NULL, + lang_name blob NOT NULL, + lang_explain blob NOT NULL, + lang_default_value blob NOT NULL, PRIMARY KEY (field_id, lang_id) ); @@ -591,10 +590,10 @@ CREATE TABLE phpbb_profile_lang ( # Table: 'phpbb_ranks' CREATE TABLE phpbb_ranks ( rank_id mediumint(8) UNSIGNED NOT NULL auto_increment, - rank_title text NOT NULL, + rank_title blob NOT NULL, rank_min mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, rank_special tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, - rank_image varchar(255) DEFAULT '' NOT NULL, + rank_image varbinary(255) DEFAULT '' NOT NULL, PRIMARY KEY (rank_id) ); @@ -608,7 +607,7 @@ CREATE TABLE phpbb_reports ( user_notify tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, report_closed tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, report_time int(11) UNSIGNED DEFAULT '0' NOT NULL, - report_text mediumtext NOT NULL, + report_text mediumblob NOT NULL, PRIMARY KEY (report_id) ); @@ -616,8 +615,8 @@ CREATE TABLE phpbb_reports ( # Table: 'phpbb_reports_reasons' CREATE TABLE phpbb_reports_reasons ( reason_id smallint(4) UNSIGNED NOT NULL auto_increment, - reason_title text NOT NULL, - reason_description mediumtext NOT NULL, + reason_title blob NOT NULL, + reason_description mediumblob NOT NULL, reason_order smallint(4) UNSIGNED DEFAULT '0' NOT NULL, PRIMARY KEY (reason_id) ); @@ -625,10 +624,10 @@ CREATE TABLE phpbb_reports_reasons ( # Table: 'phpbb_search_results' CREATE TABLE phpbb_search_results ( - search_key varchar(32) DEFAULT '' NOT NULL, + search_key varbinary(32) DEFAULT '' NOT NULL, search_time int(11) UNSIGNED DEFAULT '0' NOT NULL, - search_keywords mediumtext NOT NULL, - search_authors mediumtext NOT NULL, + search_keywords mediumblob NOT NULL, + search_authors mediumblob NOT NULL, PRIMARY KEY (search_key) ); @@ -636,10 +635,12 @@ CREATE TABLE phpbb_search_results ( # Table: 'phpbb_search_wordlist' CREATE TABLE phpbb_search_wordlist ( word_id mediumint(8) UNSIGNED NOT NULL auto_increment, - word_text text NOT NULL, + word_text blob NOT NULL, word_common tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, + word_count mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, PRIMARY KEY (word_id), - UNIQUE wrd_txt (word_text(255)) + UNIQUE wrd_txt (word_text(255)), + KEY wrd_cnt (word_count) ); @@ -648,6 +649,7 @@ CREATE TABLE phpbb_search_wordmatch ( post_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, word_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, title_match tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, + UNIQUE unq_mtch (word_id, post_id, title_match), KEY word_id (word_id), KEY post_id (post_id) ); @@ -655,15 +657,15 @@ CREATE TABLE phpbb_search_wordmatch ( # Table: 'phpbb_sessions' CREATE TABLE phpbb_sessions ( - session_id char(32) DEFAULT '' NOT NULL, + session_id binary(32) DEFAULT '' NOT NULL, session_user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, session_last_visit int(11) UNSIGNED DEFAULT '0' NOT NULL, session_start int(11) UNSIGNED DEFAULT '0' NOT NULL, session_time int(11) UNSIGNED DEFAULT '0' NOT NULL, - session_ip varchar(40) DEFAULT '' NOT NULL, - session_browser varchar(150) DEFAULT '' NOT NULL, - session_forwarded_for varchar(255) DEFAULT '' NOT NULL, - session_page text NOT NULL, + session_ip varbinary(40) DEFAULT '' NOT NULL, + session_browser varbinary(150) DEFAULT '' NOT NULL, + session_forwarded_for varbinary(255) DEFAULT '' NOT NULL, + session_page blob NOT NULL, session_viewonline tinyint(1) UNSIGNED DEFAULT '1' NOT NULL, session_autologin tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, session_admin tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, @@ -675,9 +677,9 @@ CREATE TABLE phpbb_sessions ( # Table: 'phpbb_sessions_keys' CREATE TABLE phpbb_sessions_keys ( - key_id char(32) DEFAULT '' NOT NULL, + key_id binary(32) DEFAULT '' NOT NULL, user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, - last_ip varchar(40) DEFAULT '' NOT NULL, + last_ip varbinary(40) DEFAULT '' NOT NULL, last_login int(11) UNSIGNED DEFAULT '0' NOT NULL, PRIMARY KEY (key_id, user_id), KEY last_login (last_login) @@ -687,8 +689,8 @@ CREATE TABLE phpbb_sessions_keys ( # Table: 'phpbb_sitelist' CREATE TABLE phpbb_sitelist ( site_id mediumint(8) UNSIGNED NOT NULL auto_increment, - site_ip varchar(40) DEFAULT '' NOT NULL, - site_hostname varchar(255) DEFAULT '' NOT NULL, + site_ip varbinary(40) DEFAULT '' NOT NULL, + site_hostname varbinary(255) DEFAULT '' NOT NULL, ip_exclude tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, PRIMARY KEY (site_id) ); @@ -697,9 +699,9 @@ CREATE TABLE phpbb_sitelist ( # Table: 'phpbb_smilies' CREATE TABLE phpbb_smilies ( smiley_id mediumint(8) UNSIGNED NOT NULL auto_increment, - code varchar(150) DEFAULT '' NOT NULL, - emotion varchar(150) DEFAULT '' NOT NULL, - smiley_url varchar(50) DEFAULT '' NOT NULL, + code varbinary(150) DEFAULT '' NOT NULL, + emotion varbinary(150) DEFAULT '' NOT NULL, + smiley_url varbinary(50) DEFAULT '' NOT NULL, smiley_width smallint(4) UNSIGNED DEFAULT '0' NOT NULL, smiley_height smallint(4) UNSIGNED DEFAULT '0' NOT NULL, smiley_order mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, @@ -712,8 +714,8 @@ CREATE TABLE phpbb_smilies ( # Table: 'phpbb_styles' CREATE TABLE phpbb_styles ( style_id tinyint(4) NOT NULL auto_increment, - style_name text NOT NULL, - style_copyright text NOT NULL, + style_name blob NOT NULL, + style_copyright blob NOT NULL, style_active tinyint(1) UNSIGNED DEFAULT '1' NOT NULL, template_id tinyint(4) DEFAULT '0' NOT NULL, theme_id tinyint(4) DEFAULT '0' NOT NULL, @@ -729,10 +731,10 @@ CREATE TABLE phpbb_styles ( # Table: 'phpbb_styles_template' CREATE TABLE phpbb_styles_template ( template_id tinyint(4) NOT NULL auto_increment, - template_name text NOT NULL, - template_copyright text NOT NULL, - template_path varchar(100) DEFAULT '' NOT NULL, - bbcode_bitfield varchar(255) DEFAULT 'kNg=' NOT NULL, + template_name blob NOT NULL, + template_copyright blob NOT NULL, + template_path varbinary(100) DEFAULT '' NOT NULL, + bbcode_bitfield varbinary(255) DEFAULT 'kNg=' NOT NULL, template_storedb tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, PRIMARY KEY (template_id), UNIQUE tmplte_nm (template_name(255)) @@ -742,10 +744,10 @@ CREATE TABLE phpbb_styles_template ( # Table: 'phpbb_styles_template_data' CREATE TABLE phpbb_styles_template_data ( template_id tinyint(4) NOT NULL auto_increment, - template_filename varchar(100) DEFAULT '' NOT NULL, - template_included text NOT NULL, + template_filename varbinary(100) DEFAULT '' NOT NULL, + template_included blob NOT NULL, template_mtime int(11) UNSIGNED DEFAULT '0' NOT NULL, - template_data mediumtext NOT NULL, + template_data mediumblob NOT NULL, KEY tid (template_id), KEY tfn (template_filename) ); @@ -754,12 +756,12 @@ CREATE TABLE phpbb_styles_template_data ( # Table: 'phpbb_styles_theme' CREATE TABLE phpbb_styles_theme ( theme_id tinyint(4) NOT NULL auto_increment, - theme_name text NOT NULL, - theme_copyright text NOT NULL, - theme_path varchar(100) DEFAULT '' NOT NULL, + theme_name blob NOT NULL, + theme_copyright blob NOT NULL, + theme_path varbinary(100) DEFAULT '' NOT NULL, theme_storedb tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, theme_mtime int(11) UNSIGNED DEFAULT '0' NOT NULL, - theme_data mediumtext NOT NULL, + theme_data mediumblob NOT NULL, PRIMARY KEY (theme_id), UNIQUE theme_name (theme_name(255)) ); @@ -768,108 +770,28 @@ CREATE TABLE phpbb_styles_theme ( # Table: 'phpbb_styles_imageset' CREATE TABLE phpbb_styles_imageset ( imageset_id tinyint(4) NOT NULL auto_increment, - imageset_name text NOT NULL, - imageset_copyright text NOT NULL, - imageset_path varchar(100) DEFAULT '' NOT NULL, - site_logo varchar(200) DEFAULT '' NOT NULL, - upload_bar varchar(200) DEFAULT '' NOT NULL, - poll_left varchar(200) DEFAULT '' NOT NULL, - poll_center varchar(200) DEFAULT '' NOT NULL, - poll_right varchar(200) DEFAULT '' NOT NULL, - icon_friend varchar(200) DEFAULT '' NOT NULL, - icon_foe varchar(200) DEFAULT '' NOT NULL, - forum_link varchar(200) DEFAULT '' NOT NULL, - forum_read varchar(200) DEFAULT '' NOT NULL, - forum_read_locked varchar(200) DEFAULT '' NOT NULL, - forum_read_subforum varchar(200) DEFAULT '' NOT NULL, - forum_unread varchar(200) DEFAULT '' NOT NULL, - forum_unread_locked varchar(200) DEFAULT '' NOT NULL, - forum_unread_subforum varchar(200) DEFAULT '' NOT NULL, - topic_moved varchar(200) DEFAULT '' NOT NULL, - topic_read varchar(200) DEFAULT '' NOT NULL, - topic_read_mine varchar(200) DEFAULT '' NOT NULL, - topic_read_hot varchar(200) DEFAULT '' NOT NULL, - topic_read_hot_mine varchar(200) DEFAULT '' NOT NULL, - topic_read_locked varchar(200) DEFAULT '' NOT NULL, - topic_read_locked_mine varchar(200) DEFAULT '' NOT NULL, - topic_unread varchar(200) DEFAULT '' NOT NULL, - topic_unread_mine varchar(200) DEFAULT '' NOT NULL, - topic_unread_hot varchar(200) DEFAULT '' NOT NULL, - topic_unread_hot_mine varchar(200) DEFAULT '' NOT NULL, - topic_unread_locked varchar(200) DEFAULT '' NOT NULL, - topic_unread_locked_mine varchar(200) DEFAULT '' NOT NULL, - sticky_read varchar(200) DEFAULT '' NOT NULL, - sticky_read_mine varchar(200) DEFAULT '' NOT NULL, - sticky_read_locked varchar(200) DEFAULT '' NOT NULL, - sticky_read_locked_mine varchar(200) DEFAULT '' NOT NULL, - sticky_unread varchar(200) DEFAULT '' NOT NULL, - sticky_unread_mine varchar(200) DEFAULT '' NOT NULL, - sticky_unread_locked varchar(200) DEFAULT '' NOT NULL, - sticky_unread_locked_mine varchar(200) DEFAULT '' NOT NULL, - announce_read varchar(200) DEFAULT '' NOT NULL, - announce_read_mine varchar(200) DEFAULT '' NOT NULL, - announce_read_locked varchar(200) DEFAULT '' NOT NULL, - announce_read_locked_mine varchar(200) DEFAULT '' NOT NULL, - announce_unread varchar(200) DEFAULT '' NOT NULL, - announce_unread_mine varchar(200) DEFAULT '' NOT NULL, - announce_unread_locked varchar(200) DEFAULT '' NOT NULL, - announce_unread_locked_mine varchar(200) DEFAULT '' NOT NULL, - global_read varchar(200) DEFAULT '' NOT NULL, - global_read_mine varchar(200) DEFAULT '' NOT NULL, - global_read_locked varchar(200) DEFAULT '' NOT NULL, - global_read_locked_mine varchar(200) DEFAULT '' NOT NULL, - global_unread varchar(200) DEFAULT '' NOT NULL, - global_unread_mine varchar(200) DEFAULT '' NOT NULL, - global_unread_locked varchar(200) DEFAULT '' NOT NULL, - global_unread_locked_mine varchar(200) DEFAULT '' NOT NULL, - pm_read varchar(200) DEFAULT '' NOT NULL, - pm_unread varchar(200) DEFAULT '' NOT NULL, - icon_contact_aim varchar(200) DEFAULT '' NOT NULL, - icon_contact_email varchar(200) DEFAULT '' NOT NULL, - icon_contact_icq varchar(200) DEFAULT '' NOT NULL, - icon_contact_jabber varchar(200) DEFAULT '' NOT NULL, - icon_contact_msnm varchar(200) DEFAULT '' NOT NULL, - icon_contact_pm varchar(200) DEFAULT '' NOT NULL, - icon_contact_yahoo varchar(200) DEFAULT '' NOT NULL, - icon_contact_www varchar(200) DEFAULT '' NOT NULL, - icon_post_delete varchar(200) DEFAULT '' NOT NULL, - icon_post_edit varchar(200) DEFAULT '' NOT NULL, - icon_post_info varchar(200) DEFAULT '' NOT NULL, - icon_post_quote varchar(200) DEFAULT '' NOT NULL, - icon_post_report varchar(200) DEFAULT '' NOT NULL, - icon_post_target varchar(200) DEFAULT '' NOT NULL, - icon_post_target_unread varchar(200) DEFAULT '' NOT NULL, - icon_topic_attach varchar(200) DEFAULT '' NOT NULL, - icon_topic_latest varchar(200) DEFAULT '' NOT NULL, - icon_topic_newest varchar(200) DEFAULT '' NOT NULL, - icon_topic_reported varchar(200) DEFAULT '' NOT NULL, - icon_topic_unapproved varchar(200) DEFAULT '' NOT NULL, - icon_user_online varchar(200) DEFAULT '' NOT NULL, - icon_user_offline varchar(200) DEFAULT '' NOT NULL, - icon_user_profile varchar(200) DEFAULT '' NOT NULL, - icon_user_search varchar(200) DEFAULT '' NOT NULL, - icon_user_warn varchar(200) DEFAULT '' NOT NULL, - button_pm_forward varchar(200) DEFAULT '' NOT NULL, - button_pm_new varchar(200) DEFAULT '' NOT NULL, - button_pm_reply varchar(200) DEFAULT '' NOT NULL, - button_topic_locked varchar(200) DEFAULT '' NOT NULL, - button_topic_new varchar(200) DEFAULT '' NOT NULL, - button_topic_reply varchar(200) DEFAULT '' NOT NULL, - user_icon1 varchar(200) DEFAULT '' NOT NULL, - user_icon2 varchar(200) DEFAULT '' NOT NULL, - user_icon3 varchar(200) DEFAULT '' NOT NULL, - user_icon4 varchar(200) DEFAULT '' NOT NULL, - user_icon5 varchar(200) DEFAULT '' NOT NULL, - user_icon6 varchar(200) DEFAULT '' NOT NULL, - user_icon7 varchar(200) DEFAULT '' NOT NULL, - user_icon8 varchar(200) DEFAULT '' NOT NULL, - user_icon9 varchar(200) DEFAULT '' NOT NULL, - user_icon10 varchar(200) DEFAULT '' NOT NULL, + imageset_name blob NOT NULL, + imageset_copyright blob NOT NULL, + imageset_path varbinary(100) DEFAULT '' NOT NULL, PRIMARY KEY (imageset_id), UNIQUE imgset_nm (imageset_name(255)) ); +# Table: 'phpbb_styles_imageset_data' +CREATE TABLE phpbb_styles_imageset_data ( + image_id smallint(4) UNSIGNED NOT NULL auto_increment, + image_name varbinary(200) DEFAULT '' NOT NULL, + image_filename varbinary(200) DEFAULT '' NOT NULL, + image_lang varbinary(30) DEFAULT '' NOT NULL, + image_height smallint(4) UNSIGNED DEFAULT '0' NOT NULL, + image_width smallint(4) UNSIGNED DEFAULT '0' NOT NULL, + imageset_id tinyint(4) DEFAULT '0' NOT NULL, + PRIMARY KEY (image_id), + KEY i_id (imageset_id) +); + + # Table: 'phpbb_topics' CREATE TABLE phpbb_topics ( topic_id mediumint(8) UNSIGNED NOT NULL auto_increment, @@ -878,7 +800,7 @@ CREATE TABLE phpbb_topics ( topic_attachment tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, topic_approved tinyint(1) UNSIGNED DEFAULT '1' NOT NULL, topic_reported tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, - topic_title text NOT NULL, + topic_title blob NOT NULL, topic_poster mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, topic_time int(11) UNSIGNED DEFAULT '0' NOT NULL, topic_time_limit int(11) UNSIGNED DEFAULT '0' NOT NULL, @@ -888,19 +810,19 @@ CREATE TABLE phpbb_topics ( topic_status tinyint(3) DEFAULT '0' NOT NULL, topic_type tinyint(3) DEFAULT '0' NOT NULL, topic_first_post_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, - topic_first_poster_name text NOT NULL, - topic_first_poster_colour varchar(6) DEFAULT '' NOT NULL, + topic_first_poster_name blob NOT NULL, + topic_first_poster_colour varbinary(6) DEFAULT '' NOT NULL, topic_last_post_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, topic_last_poster_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, - topic_last_poster_name text NOT NULL, - topic_last_poster_colour varchar(6) DEFAULT '' NOT NULL, - topic_last_post_subject text NOT NULL, + topic_last_poster_name blob NOT NULL, + topic_last_poster_colour varbinary(6) DEFAULT '' NOT NULL, + topic_last_post_subject blob NOT NULL, topic_last_post_time int(11) UNSIGNED DEFAULT '0' NOT NULL, topic_last_view_time int(11) UNSIGNED DEFAULT '0' NOT NULL, topic_moved_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, topic_bumped tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, topic_bumper mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, - poll_title text NOT NULL, + poll_title blob NOT NULL, poll_start int(11) UNSIGNED DEFAULT '0' NOT NULL, poll_length int(11) UNSIGNED DEFAULT '0' NOT NULL, poll_max_options tinyint(4) DEFAULT '1' NOT NULL, @@ -911,6 +833,7 @@ CREATE TABLE phpbb_topics ( KEY forum_id_type (forum_id, topic_type), KEY last_post_time (topic_last_post_time), KEY topic_approved (topic_approved), + KEY forum_appr_last (forum_id, topic_approved, topic_last_post_id), KEY fid_time_moved (forum_id, topic_last_post_time, topic_moved_id) ); @@ -963,23 +886,23 @@ CREATE TABLE phpbb_users ( user_id mediumint(8) UNSIGNED NOT NULL auto_increment, user_type tinyint(2) DEFAULT '0' NOT NULL, group_id mediumint(8) UNSIGNED DEFAULT '3' NOT NULL, - user_permissions mediumtext NOT NULL, + user_permissions mediumblob NOT NULL, user_perm_from mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, - user_ip varchar(40) DEFAULT '' NOT NULL, + user_ip varbinary(40) DEFAULT '' NOT NULL, user_regdate int(11) UNSIGNED DEFAULT '0' NOT NULL, - username text NOT NULL, - username_clean text NOT NULL, - user_password varchar(120) DEFAULT '' NOT NULL, + username blob NOT NULL, + username_clean blob NOT NULL, + user_password varbinary(120) DEFAULT '' NOT NULL, user_passchg int(11) UNSIGNED DEFAULT '0' NOT NULL, user_pass_convert tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, - user_email text NOT NULL, + user_email blob NOT NULL, user_email_hash bigint(20) DEFAULT '0' NOT NULL, - user_birthday varchar(10) DEFAULT '' NOT NULL, + user_birthday varbinary(10) DEFAULT '' NOT NULL, user_lastvisit int(11) UNSIGNED DEFAULT '0' NOT NULL, user_lastmark int(11) UNSIGNED DEFAULT '0' NOT NULL, user_lastpost_time int(11) UNSIGNED DEFAULT '0' NOT NULL, - user_lastpage text NOT NULL, - user_last_confirm_key varchar(10) DEFAULT '' NOT NULL, + user_lastpage blob NOT NULL, + user_last_confirm_key varbinary(10) DEFAULT '' NOT NULL, user_last_search int(11) UNSIGNED DEFAULT '0' NOT NULL, user_warnings tinyint(4) DEFAULT '0' NOT NULL, user_last_warning int(11) UNSIGNED DEFAULT '0' NOT NULL, @@ -987,13 +910,13 @@ CREATE TABLE phpbb_users ( user_inactive_reason tinyint(2) DEFAULT '0' NOT NULL, user_inactive_time int(11) UNSIGNED DEFAULT '0' NOT NULL, user_posts mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, - user_lang varchar(30) DEFAULT '' NOT NULL, + user_lang varbinary(30) DEFAULT '' NOT NULL, user_timezone decimal(5,2) DEFAULT '0' NOT NULL, user_dst tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, - user_dateformat varchar(90) DEFAULT 'd M Y H:i' NOT NULL, + user_dateformat varbinary(90) DEFAULT 'd M Y H:i' NOT NULL, user_style tinyint(4) DEFAULT '0' NOT NULL, user_rank mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, - user_colour varchar(6) DEFAULT '' NOT NULL, + user_colour varbinary(6) DEFAULT '' NOT NULL, user_new_privmsg tinyint(4) DEFAULT '0' NOT NULL, user_unread_privmsg tinyint(4) DEFAULT '0' NOT NULL, user_last_privmsg int(11) UNSIGNED DEFAULT '0' NOT NULL, @@ -1001,11 +924,11 @@ CREATE TABLE phpbb_users ( user_full_folder int(11) DEFAULT '-3' NOT NULL, user_emailtime int(11) UNSIGNED DEFAULT '0' NOT NULL, user_topic_show_days smallint(4) UNSIGNED DEFAULT '0' NOT NULL, - user_topic_sortby_type varchar(1) DEFAULT 't' NOT NULL, - user_topic_sortby_dir varchar(1) DEFAULT 'd' NOT NULL, + user_topic_sortby_type varbinary(1) DEFAULT 't' NOT NULL, + user_topic_sortby_dir varbinary(1) DEFAULT 'd' NOT NULL, user_post_show_days smallint(4) UNSIGNED DEFAULT '0' NOT NULL, - user_post_sortby_type varchar(1) DEFAULT 't' NOT NULL, - user_post_sortby_dir varchar(1) DEFAULT 'a' NOT NULL, + user_post_sortby_type varbinary(1) DEFAULT 't' NOT NULL, + user_post_sortby_dir varbinary(1) DEFAULT 'a' NOT NULL, user_notify tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, user_notify_pm tinyint(1) UNSIGNED DEFAULT '1' NOT NULL, user_notify_type tinyint(4) DEFAULT '0' NOT NULL, @@ -1014,29 +937,29 @@ CREATE TABLE phpbb_users ( user_allow_viewemail tinyint(1) UNSIGNED DEFAULT '1' NOT NULL, user_allow_massemail tinyint(1) UNSIGNED DEFAULT '1' NOT NULL, user_options int(11) UNSIGNED DEFAULT '895' NOT NULL, - user_avatar varchar(255) DEFAULT '' NOT NULL, + user_avatar varbinary(255) DEFAULT '' NOT NULL, user_avatar_type tinyint(2) DEFAULT '0' NOT NULL, user_avatar_width smallint(4) UNSIGNED DEFAULT '0' NOT NULL, user_avatar_height smallint(4) UNSIGNED DEFAULT '0' NOT NULL, - user_sig mediumtext NOT NULL, - user_sig_bbcode_uid varchar(5) DEFAULT '' NOT NULL, - user_sig_bbcode_bitfield varchar(255) DEFAULT '' NOT NULL, - user_from text NOT NULL, - user_icq varchar(15) DEFAULT '' NOT NULL, - user_aim text NOT NULL, - user_yim text NOT NULL, - user_msnm text NOT NULL, - user_jabber text NOT NULL, - user_website text NOT NULL, - user_occ text NOT NULL, - user_interests text NOT NULL, - user_actkey varchar(32) DEFAULT '' NOT NULL, - user_newpasswd varchar(96) DEFAULT '' NOT NULL, + user_sig mediumblob NOT NULL, + user_sig_bbcode_uid varbinary(5) DEFAULT '' NOT NULL, + user_sig_bbcode_bitfield varbinary(255) DEFAULT '' NOT NULL, + user_from blob NOT NULL, + user_icq varbinary(15) DEFAULT '' NOT NULL, + user_aim blob NOT NULL, + user_yim blob NOT NULL, + user_msnm blob NOT NULL, + user_jabber blob NOT NULL, + user_website blob NOT NULL, + user_occ blob NOT NULL, + user_interests blob NOT NULL, + user_actkey varbinary(32) DEFAULT '' NOT NULL, + user_newpasswd varbinary(96) DEFAULT '' NOT NULL, PRIMARY KEY (user_id), KEY user_birthday (user_birthday), KEY user_email_hash (user_email_hash), KEY user_type (user_type), - KEY username_clean (username_clean(255)) + UNIQUE username_clean (username_clean(255)) ); @@ -1054,8 +977,8 @@ CREATE TABLE phpbb_warnings ( # Table: 'phpbb_words' CREATE TABLE phpbb_words ( word_id mediumint(8) UNSIGNED NOT NULL auto_increment, - word text NOT NULL, - replacement text NOT NULL, + word blob NOT NULL, + replacement blob NOT NULL, PRIMARY KEY (word_id) ); diff --git a/phpBB/install/schemas/mysql_41_schema.sql b/phpBB/install/schemas/mysql_41_schema.sql index 7ade8bd1a4..dee258d888 100644 --- a/phpBB/install/schemas/mysql_41_schema.sql +++ b/phpBB/install/schemas/mysql_41_schema.sql @@ -1,6 +1,4 @@ # -# MySQL Schema for phpBB 3.x - (c) phpBB Group, 2005 -# # $Id$ # @@ -38,7 +36,8 @@ CREATE TABLE phpbb_acl_groups ( auth_role_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, auth_setting tinyint(2) DEFAULT '0' NOT NULL, KEY group_id (group_id), - KEY auth_opt_id (auth_option_id) + KEY auth_opt_id (auth_option_id), + KEY auth_role_id (auth_role_id) ) CHARACTER SET `utf8` COLLATE `utf8_bin`; @@ -72,7 +71,8 @@ CREATE TABLE phpbb_acl_roles_data ( role_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, auth_option_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, auth_setting tinyint(2) DEFAULT '0' NOT NULL, - PRIMARY KEY (role_id, auth_option_id) + PRIMARY KEY (role_id, auth_option_id), + KEY ath_opt_id (auth_option_id) ) CHARACTER SET `utf8` COLLATE `utf8_bin`; @@ -84,7 +84,8 @@ CREATE TABLE phpbb_acl_users ( auth_role_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, auth_setting tinyint(2) DEFAULT '0' NOT NULL, KEY user_id (user_id), - KEY auth_option_id (auth_option_id) + KEY auth_option_id (auth_option_id), + KEY auth_role_id (auth_role_id) ) CHARACTER SET `utf8` COLLATE `utf8_bin`; @@ -128,9 +129,7 @@ CREATE TABLE phpbb_bbcodes ( CREATE TABLE phpbb_bookmarks ( topic_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, - order_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, - KEY order_id (order_id), - KEY topic_user_id (topic_id, user_id) + PRIMARY KEY (topic_id, user_id) ) CHARACTER SET `utf8` COLLATE `utf8_bin`; @@ -638,8 +637,10 @@ CREATE TABLE phpbb_search_wordlist ( word_id mediumint(8) UNSIGNED NOT NULL auto_increment, word_text varchar(255) DEFAULT '' NOT NULL, word_common tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, + word_count mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, PRIMARY KEY (word_id), - UNIQUE wrd_txt (word_text) + UNIQUE wrd_txt (word_text), + KEY wrd_cnt (word_count) ) CHARACTER SET `utf8` COLLATE `utf8_bin`; @@ -648,6 +649,7 @@ CREATE TABLE phpbb_search_wordmatch ( post_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, word_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, title_match tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, + UNIQUE unq_mtch (word_id, post_id, title_match), KEY word_id (word_id), KEY post_id (post_id) ) CHARACTER SET `utf8` COLLATE `utf8_bin`; @@ -771,105 +773,25 @@ CREATE TABLE phpbb_styles_imageset ( imageset_name varchar(255) DEFAULT '' NOT NULL, imageset_copyright varchar(255) DEFAULT '' NOT NULL, imageset_path varchar(100) DEFAULT '' NOT NULL, - site_logo varchar(200) DEFAULT '' NOT NULL, - upload_bar varchar(200) DEFAULT '' NOT NULL, - poll_left varchar(200) DEFAULT '' NOT NULL, - poll_center varchar(200) DEFAULT '' NOT NULL, - poll_right varchar(200) DEFAULT '' NOT NULL, - icon_friend varchar(200) DEFAULT '' NOT NULL, - icon_foe varchar(200) DEFAULT '' NOT NULL, - forum_link varchar(200) DEFAULT '' NOT NULL, - forum_read varchar(200) DEFAULT '' NOT NULL, - forum_read_locked varchar(200) DEFAULT '' NOT NULL, - forum_read_subforum varchar(200) DEFAULT '' NOT NULL, - forum_unread varchar(200) DEFAULT '' NOT NULL, - forum_unread_locked varchar(200) DEFAULT '' NOT NULL, - forum_unread_subforum varchar(200) DEFAULT '' NOT NULL, - topic_moved varchar(200) DEFAULT '' NOT NULL, - topic_read varchar(200) DEFAULT '' NOT NULL, - topic_read_mine varchar(200) DEFAULT '' NOT NULL, - topic_read_hot varchar(200) DEFAULT '' NOT NULL, - topic_read_hot_mine varchar(200) DEFAULT '' NOT NULL, - topic_read_locked varchar(200) DEFAULT '' NOT NULL, - topic_read_locked_mine varchar(200) DEFAULT '' NOT NULL, - topic_unread varchar(200) DEFAULT '' NOT NULL, - topic_unread_mine varchar(200) DEFAULT '' NOT NULL, - topic_unread_hot varchar(200) DEFAULT '' NOT NULL, - topic_unread_hot_mine varchar(200) DEFAULT '' NOT NULL, - topic_unread_locked varchar(200) DEFAULT '' NOT NULL, - topic_unread_locked_mine varchar(200) DEFAULT '' NOT NULL, - sticky_read varchar(200) DEFAULT '' NOT NULL, - sticky_read_mine varchar(200) DEFAULT '' NOT NULL, - sticky_read_locked varchar(200) DEFAULT '' NOT NULL, - sticky_read_locked_mine varchar(200) DEFAULT '' NOT NULL, - sticky_unread varchar(200) DEFAULT '' NOT NULL, - sticky_unread_mine varchar(200) DEFAULT '' NOT NULL, - sticky_unread_locked varchar(200) DEFAULT '' NOT NULL, - sticky_unread_locked_mine varchar(200) DEFAULT '' NOT NULL, - announce_read varchar(200) DEFAULT '' NOT NULL, - announce_read_mine varchar(200) DEFAULT '' NOT NULL, - announce_read_locked varchar(200) DEFAULT '' NOT NULL, - announce_read_locked_mine varchar(200) DEFAULT '' NOT NULL, - announce_unread varchar(200) DEFAULT '' NOT NULL, - announce_unread_mine varchar(200) DEFAULT '' NOT NULL, - announce_unread_locked varchar(200) DEFAULT '' NOT NULL, - announce_unread_locked_mine varchar(200) DEFAULT '' NOT NULL, - global_read varchar(200) DEFAULT '' NOT NULL, - global_read_mine varchar(200) DEFAULT '' NOT NULL, - global_read_locked varchar(200) DEFAULT '' NOT NULL, - global_read_locked_mine varchar(200) DEFAULT '' NOT NULL, - global_unread varchar(200) DEFAULT '' NOT NULL, - global_unread_mine varchar(200) DEFAULT '' NOT NULL, - global_unread_locked varchar(200) DEFAULT '' NOT NULL, - global_unread_locked_mine varchar(200) DEFAULT '' NOT NULL, - pm_read varchar(200) DEFAULT '' NOT NULL, - pm_unread varchar(200) DEFAULT '' NOT NULL, - icon_contact_aim varchar(200) DEFAULT '' NOT NULL, - icon_contact_email varchar(200) DEFAULT '' NOT NULL, - icon_contact_icq varchar(200) DEFAULT '' NOT NULL, - icon_contact_jabber varchar(200) DEFAULT '' NOT NULL, - icon_contact_msnm varchar(200) DEFAULT '' NOT NULL, - icon_contact_pm varchar(200) DEFAULT '' NOT NULL, - icon_contact_yahoo varchar(200) DEFAULT '' NOT NULL, - icon_contact_www varchar(200) DEFAULT '' NOT NULL, - icon_post_delete varchar(200) DEFAULT '' NOT NULL, - icon_post_edit varchar(200) DEFAULT '' NOT NULL, - icon_post_info varchar(200) DEFAULT '' NOT NULL, - icon_post_quote varchar(200) DEFAULT '' NOT NULL, - icon_post_report varchar(200) DEFAULT '' NOT NULL, - icon_post_target varchar(200) DEFAULT '' NOT NULL, - icon_post_target_unread varchar(200) DEFAULT '' NOT NULL, - icon_topic_attach varchar(200) DEFAULT '' NOT NULL, - icon_topic_latest varchar(200) DEFAULT '' NOT NULL, - icon_topic_newest varchar(200) DEFAULT '' NOT NULL, - icon_topic_reported varchar(200) DEFAULT '' NOT NULL, - icon_topic_unapproved varchar(200) DEFAULT '' NOT NULL, - icon_user_online varchar(200) DEFAULT '' NOT NULL, - icon_user_offline varchar(200) DEFAULT '' NOT NULL, - icon_user_profile varchar(200) DEFAULT '' NOT NULL, - icon_user_search varchar(200) DEFAULT '' NOT NULL, - icon_user_warn varchar(200) DEFAULT '' NOT NULL, - button_pm_forward varchar(200) DEFAULT '' NOT NULL, - button_pm_new varchar(200) DEFAULT '' NOT NULL, - button_pm_reply varchar(200) DEFAULT '' NOT NULL, - button_topic_locked varchar(200) DEFAULT '' NOT NULL, - button_topic_new varchar(200) DEFAULT '' NOT NULL, - button_topic_reply varchar(200) DEFAULT '' NOT NULL, - user_icon1 varchar(200) DEFAULT '' NOT NULL, - user_icon2 varchar(200) DEFAULT '' NOT NULL, - user_icon3 varchar(200) DEFAULT '' NOT NULL, - user_icon4 varchar(200) DEFAULT '' NOT NULL, - user_icon5 varchar(200) DEFAULT '' NOT NULL, - user_icon6 varchar(200) DEFAULT '' NOT NULL, - user_icon7 varchar(200) DEFAULT '' NOT NULL, - user_icon8 varchar(200) DEFAULT '' NOT NULL, - user_icon9 varchar(200) DEFAULT '' NOT NULL, - user_icon10 varchar(200) DEFAULT '' NOT NULL, PRIMARY KEY (imageset_id), UNIQUE imgset_nm (imageset_name) ) CHARACTER SET `utf8` COLLATE `utf8_bin`; +# Table: 'phpbb_styles_imageset_data' +CREATE TABLE phpbb_styles_imageset_data ( + image_id smallint(4) UNSIGNED NOT NULL auto_increment, + image_name varchar(200) DEFAULT '' NOT NULL, + image_filename varchar(200) DEFAULT '' NOT NULL, + image_lang varchar(30) DEFAULT '' NOT NULL, + image_height smallint(4) UNSIGNED DEFAULT '0' NOT NULL, + image_width smallint(4) UNSIGNED DEFAULT '0' NOT NULL, + imageset_id tinyint(4) DEFAULT '0' NOT NULL, + PRIMARY KEY (image_id), + KEY i_id (imageset_id) +) CHARACTER SET `utf8` COLLATE `utf8_bin`; + + # Table: 'phpbb_topics' CREATE TABLE phpbb_topics ( topic_id mediumint(8) UNSIGNED NOT NULL auto_increment, @@ -878,7 +800,7 @@ CREATE TABLE phpbb_topics ( topic_attachment tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, topic_approved tinyint(1) UNSIGNED DEFAULT '1' NOT NULL, topic_reported tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, - topic_title varchar(100) DEFAULT '' NOT NULL, + topic_title varchar(100) DEFAULT '' NOT NULL COLLATE utf8_unicode_ci, topic_poster mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, topic_time int(11) UNSIGNED DEFAULT '0' NOT NULL, topic_time_limit int(11) UNSIGNED DEFAULT '0' NOT NULL, @@ -900,7 +822,7 @@ CREATE TABLE phpbb_topics ( topic_moved_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, topic_bumped tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, topic_bumper mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, - poll_title varchar(100) DEFAULT '' NOT NULL, + poll_title varchar(255) DEFAULT '' NOT NULL, poll_start int(11) UNSIGNED DEFAULT '0' NOT NULL, poll_length int(11) UNSIGNED DEFAULT '0' NOT NULL, poll_max_options tinyint(4) DEFAULT '1' NOT NULL, @@ -911,6 +833,7 @@ CREATE TABLE phpbb_topics ( KEY forum_id_type (forum_id, topic_type), KEY last_post_time (topic_last_post_time), KEY topic_approved (topic_approved), + KEY forum_appr_last (forum_id, topic_approved, topic_last_post_id), KEY fid_time_moved (forum_id, topic_last_post_time, topic_moved_id) ) CHARACTER SET `utf8` COLLATE `utf8_bin`; @@ -1036,7 +959,7 @@ CREATE TABLE phpbb_users ( KEY user_birthday (user_birthday), KEY user_email_hash (user_email_hash), KEY user_type (user_type), - KEY username_clean (username_clean) + UNIQUE username_clean (username_clean) ) CHARACTER SET `utf8` COLLATE `utf8_bin`; diff --git a/phpBB/install/schemas/oracle_schema.sql b/phpBB/install/schemas/oracle_schema.sql index 8634dcd1fe..9660dbf386 100644 --- a/phpBB/install/schemas/oracle_schema.sql +++ b/phpBB/install/schemas/oracle_schema.sql @@ -1,5 +1,4 @@ /* - Oracle Schema for phpBB 3.x - (c) phpBB Group, 2005 $Id$ @@ -108,6 +107,8 @@ CREATE INDEX phpbb_acl_groups_group_id ON phpbb_acl_groups (group_id) / CREATE INDEX phpbb_acl_groups_auth_opt_id ON phpbb_acl_groups (auth_option_id) / +CREATE INDEX phpbb_acl_groups_auth_role_id ON phpbb_acl_groups (auth_role_id) +/ /* Table: 'phpbb_acl_options' @@ -186,6 +187,8 @@ CREATE TABLE phpbb_acl_roles_data ( ) / +CREATE INDEX phpbb_acl_roles_data_ath_opt_id ON phpbb_acl_roles_data (auth_option_id) +/ /* Table: 'phpbb_acl_users' @@ -203,6 +206,8 @@ CREATE INDEX phpbb_acl_users_user_id ON phpbb_acl_users (user_id) / CREATE INDEX phpbb_acl_users_auth_option_id ON phpbb_acl_users (auth_option_id) / +CREATE INDEX phpbb_acl_users_auth_role_id ON phpbb_acl_users (auth_role_id) +/ /* Table: 'phpbb_banlist' @@ -273,14 +278,10 @@ CREATE INDEX phpbb_bbcodes_display_on_post ON phpbb_bbcodes (display_on_posting) CREATE TABLE phpbb_bookmarks ( topic_id number(8) DEFAULT '0' NOT NULL, user_id number(8) DEFAULT '0' NOT NULL, - order_id number(8) DEFAULT '0' NOT NULL + CONSTRAINT pk_phpbb_bookmarks PRIMARY KEY (topic_id, user_id) ) / -CREATE INDEX phpbb_bookmarks_order_id ON phpbb_bookmarks (order_id) -/ -CREATE INDEX phpbb_bookmarks_topic_user_id ON phpbb_bookmarks (topic_id, user_id) -/ /* Table: 'phpbb_bots' @@ -1232,11 +1233,14 @@ CREATE TABLE phpbb_search_wordlist ( word_id number(8) NOT NULL, word_text varchar2(765) DEFAULT '' , word_common number(1) DEFAULT '0' NOT NULL, + word_count number(8) DEFAULT '0' NOT NULL, CONSTRAINT pk_phpbb_search_wordlist PRIMARY KEY (word_id), CONSTRAINT u_phpbb_wrd_txt UNIQUE (word_text) ) / +CREATE INDEX phpbb_search_wordlist_wrd_cnt ON phpbb_search_wordlist (word_count) +/ CREATE SEQUENCE phpbb_search_wordlist_seq / @@ -1260,7 +1264,8 @@ END; CREATE TABLE phpbb_search_wordmatch ( post_id number(8) DEFAULT '0' NOT NULL, word_id number(8) DEFAULT '0' NOT NULL, - title_match number(1) DEFAULT '0' NOT NULL + title_match number(1) DEFAULT '0' NOT NULL, + CONSTRAINT u_phpbb_unq_mtch UNIQUE (word_id, post_id, title_match) ) / @@ -1518,100 +1523,6 @@ CREATE TABLE phpbb_styles_imageset ( imageset_name varchar2(765) DEFAULT '' , imageset_copyright varchar2(765) DEFAULT '' , imageset_path varchar2(100) DEFAULT '' , - site_logo varchar2(200) DEFAULT '' , - upload_bar varchar2(200) DEFAULT '' , - poll_left varchar2(200) DEFAULT '' , - poll_center varchar2(200) DEFAULT '' , - poll_right varchar2(200) DEFAULT '' , - icon_friend varchar2(200) DEFAULT '' , - icon_foe varchar2(200) DEFAULT '' , - forum_link varchar2(200) DEFAULT '' , - forum_read varchar2(200) DEFAULT '' , - forum_read_locked varchar2(200) DEFAULT '' , - forum_read_subforum varchar2(200) DEFAULT '' , - forum_unread varchar2(200) DEFAULT '' , - forum_unread_locked varchar2(200) DEFAULT '' , - forum_unread_subforum varchar2(200) DEFAULT '' , - topic_moved varchar2(200) DEFAULT '' , - topic_read varchar2(200) DEFAULT '' , - topic_read_mine varchar2(200) DEFAULT '' , - topic_read_hot varchar2(200) DEFAULT '' , - topic_read_hot_mine varchar2(200) DEFAULT '' , - topic_read_locked varchar2(200) DEFAULT '' , - topic_read_locked_mine varchar2(200) DEFAULT '' , - topic_unread varchar2(200) DEFAULT '' , - topic_unread_mine varchar2(200) DEFAULT '' , - topic_unread_hot varchar2(200) DEFAULT '' , - topic_unread_hot_mine varchar2(200) DEFAULT '' , - topic_unread_locked varchar2(200) DEFAULT '' , - topic_unread_locked_mine varchar2(200) DEFAULT '' , - sticky_read varchar2(200) DEFAULT '' , - sticky_read_mine varchar2(200) DEFAULT '' , - sticky_read_locked varchar2(200) DEFAULT '' , - sticky_read_locked_mine varchar2(200) DEFAULT '' , - sticky_unread varchar2(200) DEFAULT '' , - sticky_unread_mine varchar2(200) DEFAULT '' , - sticky_unread_locked varchar2(200) DEFAULT '' , - sticky_unread_locked_mine varchar2(200) DEFAULT '' , - announce_read varchar2(200) DEFAULT '' , - announce_read_mine varchar2(200) DEFAULT '' , - announce_read_locked varchar2(200) DEFAULT '' , - announce_read_locked_mine varchar2(200) DEFAULT '' , - announce_unread varchar2(200) DEFAULT '' , - announce_unread_mine varchar2(200) DEFAULT '' , - announce_unread_locked varchar2(200) DEFAULT '' , - announce_unread_locked_mine varchar2(200) DEFAULT '' , - global_read varchar2(200) DEFAULT '' , - global_read_mine varchar2(200) DEFAULT '' , - global_read_locked varchar2(200) DEFAULT '' , - global_read_locked_mine varchar2(200) DEFAULT '' , - global_unread varchar2(200) DEFAULT '' , - global_unread_mine varchar2(200) DEFAULT '' , - global_unread_locked varchar2(200) DEFAULT '' , - global_unread_locked_mine varchar2(200) DEFAULT '' , - pm_read varchar2(200) DEFAULT '' , - pm_unread varchar2(200) DEFAULT '' , - icon_contact_aim varchar2(200) DEFAULT '' , - icon_contact_email varchar2(200) DEFAULT '' , - icon_contact_icq varchar2(200) DEFAULT '' , - icon_contact_jabber varchar2(200) DEFAULT '' , - icon_contact_msnm varchar2(200) DEFAULT '' , - icon_contact_pm varchar2(200) DEFAULT '' , - icon_contact_yahoo varchar2(200) DEFAULT '' , - icon_contact_www varchar2(200) DEFAULT '' , - icon_post_delete varchar2(200) DEFAULT '' , - icon_post_edit varchar2(200) DEFAULT '' , - icon_post_info varchar2(200) DEFAULT '' , - icon_post_quote varchar2(200) DEFAULT '' , - icon_post_report varchar2(200) DEFAULT '' , - icon_post_target varchar2(200) DEFAULT '' , - icon_post_target_unread varchar2(200) DEFAULT '' , - icon_topic_attach varchar2(200) DEFAULT '' , - icon_topic_latest varchar2(200) DEFAULT '' , - icon_topic_newest varchar2(200) DEFAULT '' , - icon_topic_reported varchar2(200) DEFAULT '' , - icon_topic_unapproved varchar2(200) DEFAULT '' , - icon_user_online varchar2(200) DEFAULT '' , - icon_user_offline varchar2(200) DEFAULT '' , - icon_user_profile varchar2(200) DEFAULT '' , - icon_user_search varchar2(200) DEFAULT '' , - icon_user_warn varchar2(200) DEFAULT '' , - button_pm_forward varchar2(200) DEFAULT '' , - button_pm_new varchar2(200) DEFAULT '' , - button_pm_reply varchar2(200) DEFAULT '' , - button_topic_locked varchar2(200) DEFAULT '' , - button_topic_new varchar2(200) DEFAULT '' , - button_topic_reply varchar2(200) DEFAULT '' , - user_icon1 varchar2(200) DEFAULT '' , - user_icon2 varchar2(200) DEFAULT '' , - user_icon3 varchar2(200) DEFAULT '' , - user_icon4 varchar2(200) DEFAULT '' , - user_icon5 varchar2(200) DEFAULT '' , - user_icon6 varchar2(200) DEFAULT '' , - user_icon7 varchar2(200) DEFAULT '' , - user_icon8 varchar2(200) DEFAULT '' , - user_icon9 varchar2(200) DEFAULT '' , - user_icon10 varchar2(200) DEFAULT '' , CONSTRAINT pk_phpbb_styles_imageset PRIMARY KEY (imageset_id), CONSTRAINT u_phpbb_imgset_nm UNIQUE (imageset_name) ) @@ -1634,6 +1545,40 @@ END; / +/* + Table: 'phpbb_styles_imageset_data' +*/ +CREATE TABLE phpbb_styles_imageset_data ( + image_id number(4) NOT NULL, + image_name varchar2(200) DEFAULT '' , + image_filename varchar2(200) DEFAULT '' , + image_lang varchar2(30) DEFAULT '' , + image_height number(4) DEFAULT '0' NOT NULL, + image_width number(4) DEFAULT '0' NOT NULL, + imageset_id number(4) DEFAULT '0' NOT NULL, + CONSTRAINT pk_phpbb_styles_imageset_data PRIMARY KEY (image_id) +) +/ + +CREATE INDEX phpbb_styles_imageset_data_i_id ON phpbb_styles_imageset_data (imageset_id) +/ + +CREATE SEQUENCE phpbb_styles_imageset_data_seq +/ + +CREATE OR REPLACE TRIGGER t_phpbb_styles_imageset_data +BEFORE INSERT ON phpbb_styles_imageset_data +FOR EACH ROW WHEN ( + new.image_id IS NULL OR new.image_id = 0 +) +BEGIN + SELECT phpbb_styles_imageset_data_seq.nextval + INTO :new.image_id + FROM dual; +END; +/ + + /* Table: 'phpbb_topics' */ @@ -1666,7 +1611,7 @@ CREATE TABLE phpbb_topics ( topic_moved_id number(8) DEFAULT '0' NOT NULL, topic_bumped number(1) DEFAULT '0' NOT NULL, topic_bumper number(8) DEFAULT '0' NOT NULL, - poll_title varchar2(300) DEFAULT '' , + poll_title varchar2(765) DEFAULT '' , poll_start number(11) DEFAULT '0' NOT NULL, poll_length number(11) DEFAULT '0' NOT NULL, poll_max_options number(4) DEFAULT '1' NOT NULL, @@ -1684,6 +1629,8 @@ CREATE INDEX phpbb_topics_last_post_time ON phpbb_topics (topic_last_post_time) / CREATE INDEX phpbb_topics_topic_approved ON phpbb_topics (topic_approved) / +CREATE INDEX phpbb_topics_forum_appr_last ON phpbb_topics (forum_id, topic_approved, topic_last_post_id) +/ CREATE INDEX phpbb_topics_fid_time_moved ON phpbb_topics (forum_id, topic_last_post_time, topic_moved_id) / @@ -1841,7 +1788,8 @@ CREATE TABLE phpbb_users ( user_interests clob DEFAULT '' , user_actkey varchar2(32) DEFAULT '' , user_newpasswd varchar2(96) DEFAULT '' , - CONSTRAINT pk_phpbb_users PRIMARY KEY (user_id) + CONSTRAINT pk_phpbb_users PRIMARY KEY (user_id), + CONSTRAINT u_phpbb_username_clean UNIQUE (username_clean) ) / @@ -1851,8 +1799,6 @@ CREATE INDEX phpbb_users_user_email_hash ON phpbb_users (user_email_hash) / CREATE INDEX phpbb_users_user_type ON phpbb_users (user_type) / -CREATE INDEX phpbb_users_username_clean ON phpbb_users (username_clean) -/ CREATE SEQUENCE phpbb_users_seq / diff --git a/phpBB/install/schemas/postgres_schema.sql b/phpBB/install/schemas/postgres_schema.sql index d0005a16a7..c976a2a157 100644 --- a/phpBB/install/schemas/postgres_schema.sql +++ b/phpBB/install/schemas/postgres_schema.sql @@ -1,5 +1,4 @@ /* - PostgreSQL Schema for phpBB 3.x - (c) phpBB Group, 2005 $Id$ @@ -125,6 +124,7 @@ CREATE TABLE phpbb_acl_groups ( CREATE INDEX phpbb_acl_groups_group_id ON phpbb_acl_groups (group_id); CREATE INDEX phpbb_acl_groups_auth_opt_id ON phpbb_acl_groups (auth_option_id); +CREATE INDEX phpbb_acl_groups_auth_role_id ON phpbb_acl_groups (auth_role_id); /* Table: 'phpbb_acl_options' @@ -169,6 +169,7 @@ CREATE TABLE phpbb_acl_roles_data ( PRIMARY KEY (role_id, auth_option_id) ); +CREATE INDEX phpbb_acl_roles_data_ath_opt_id ON phpbb_acl_roles_data (auth_option_id); /* Table: 'phpbb_acl_users' @@ -183,6 +184,7 @@ CREATE TABLE phpbb_acl_users ( CREATE INDEX phpbb_acl_users_user_id ON phpbb_acl_users (user_id); CREATE INDEX phpbb_acl_users_auth_option_id ON phpbb_acl_users (auth_option_id); +CREATE INDEX phpbb_acl_users_auth_role_id ON phpbb_acl_users (auth_role_id); /* Table: 'phpbb_banlist' @@ -232,11 +234,9 @@ CREATE INDEX phpbb_bbcodes_display_on_post ON phpbb_bbcodes (display_on_posting) CREATE TABLE phpbb_bookmarks ( topic_id INT4 DEFAULT '0' NOT NULL CHECK (topic_id >= 0), user_id INT4 DEFAULT '0' NOT NULL CHECK (user_id >= 0), - order_id INT4 DEFAULT '0' NOT NULL CHECK (order_id >= 0) + PRIMARY KEY (topic_id, user_id) ); -CREATE INDEX phpbb_bookmarks_order_id ON phpbb_bookmarks (order_id); -CREATE INDEX phpbb_bookmarks_topic_user_id ON phpbb_bookmarks (topic_id, user_id); /* Table: 'phpbb_bots' @@ -848,10 +848,12 @@ CREATE TABLE phpbb_search_wordlist ( word_id INT4 DEFAULT nextval('phpbb_search_wordlist_seq'), word_text varchar(255) DEFAULT '' NOT NULL, word_common INT2 DEFAULT '0' NOT NULL CHECK (word_common >= 0), + word_count INT4 DEFAULT '0' NOT NULL CHECK (word_count >= 0), PRIMARY KEY (word_id) ); CREATE UNIQUE INDEX phpbb_search_wordlist_wrd_txt ON phpbb_search_wordlist (word_text); +CREATE INDEX phpbb_search_wordlist_wrd_cnt ON phpbb_search_wordlist (word_count); /* Table: 'phpbb_search_wordmatch' @@ -862,6 +864,7 @@ CREATE TABLE phpbb_search_wordmatch ( title_match INT2 DEFAULT '0' NOT NULL CHECK (title_match >= 0) ); +CREATE UNIQUE INDEX phpbb_search_wordmatch_unq_mtch ON phpbb_search_wordmatch (word_id, post_id, title_match); CREATE INDEX phpbb_search_wordmatch_word_id ON phpbb_search_wordmatch (word_id); CREATE INDEX phpbb_search_wordmatch_post_id ON phpbb_search_wordmatch (post_id); @@ -1015,105 +1018,29 @@ CREATE TABLE phpbb_styles_imageset ( imageset_name varchar(255) DEFAULT '' NOT NULL, imageset_copyright varchar(255) DEFAULT '' NOT NULL, imageset_path varchar(100) DEFAULT '' NOT NULL, - site_logo varchar(200) DEFAULT '' NOT NULL, - upload_bar varchar(200) DEFAULT '' NOT NULL, - poll_left varchar(200) DEFAULT '' NOT NULL, - poll_center varchar(200) DEFAULT '' NOT NULL, - poll_right varchar(200) DEFAULT '' NOT NULL, - icon_friend varchar(200) DEFAULT '' NOT NULL, - icon_foe varchar(200) DEFAULT '' NOT NULL, - forum_link varchar(200) DEFAULT '' NOT NULL, - forum_read varchar(200) DEFAULT '' NOT NULL, - forum_read_locked varchar(200) DEFAULT '' NOT NULL, - forum_read_subforum varchar(200) DEFAULT '' NOT NULL, - forum_unread varchar(200) DEFAULT '' NOT NULL, - forum_unread_locked varchar(200) DEFAULT '' NOT NULL, - forum_unread_subforum varchar(200) DEFAULT '' NOT NULL, - topic_moved varchar(200) DEFAULT '' NOT NULL, - topic_read varchar(200) DEFAULT '' NOT NULL, - topic_read_mine varchar(200) DEFAULT '' NOT NULL, - topic_read_hot varchar(200) DEFAULT '' NOT NULL, - topic_read_hot_mine varchar(200) DEFAULT '' NOT NULL, - topic_read_locked varchar(200) DEFAULT '' NOT NULL, - topic_read_locked_mine varchar(200) DEFAULT '' NOT NULL, - topic_unread varchar(200) DEFAULT '' NOT NULL, - topic_unread_mine varchar(200) DEFAULT '' NOT NULL, - topic_unread_hot varchar(200) DEFAULT '' NOT NULL, - topic_unread_hot_mine varchar(200) DEFAULT '' NOT NULL, - topic_unread_locked varchar(200) DEFAULT '' NOT NULL, - topic_unread_locked_mine varchar(200) DEFAULT '' NOT NULL, - sticky_read varchar(200) DEFAULT '' NOT NULL, - sticky_read_mine varchar(200) DEFAULT '' NOT NULL, - sticky_read_locked varchar(200) DEFAULT '' NOT NULL, - sticky_read_locked_mine varchar(200) DEFAULT '' NOT NULL, - sticky_unread varchar(200) DEFAULT '' NOT NULL, - sticky_unread_mine varchar(200) DEFAULT '' NOT NULL, - sticky_unread_locked varchar(200) DEFAULT '' NOT NULL, - sticky_unread_locked_mine varchar(200) DEFAULT '' NOT NULL, - announce_read varchar(200) DEFAULT '' NOT NULL, - announce_read_mine varchar(200) DEFAULT '' NOT NULL, - announce_read_locked varchar(200) DEFAULT '' NOT NULL, - announce_read_locked_mine varchar(200) DEFAULT '' NOT NULL, - announce_unread varchar(200) DEFAULT '' NOT NULL, - announce_unread_mine varchar(200) DEFAULT '' NOT NULL, - announce_unread_locked varchar(200) DEFAULT '' NOT NULL, - announce_unread_locked_mine varchar(200) DEFAULT '' NOT NULL, - global_read varchar(200) DEFAULT '' NOT NULL, - global_read_mine varchar(200) DEFAULT '' NOT NULL, - global_read_locked varchar(200) DEFAULT '' NOT NULL, - global_read_locked_mine varchar(200) DEFAULT '' NOT NULL, - global_unread varchar(200) DEFAULT '' NOT NULL, - global_unread_mine varchar(200) DEFAULT '' NOT NULL, - global_unread_locked varchar(200) DEFAULT '' NOT NULL, - global_unread_locked_mine varchar(200) DEFAULT '' NOT NULL, - pm_read varchar(200) DEFAULT '' NOT NULL, - pm_unread varchar(200) DEFAULT '' NOT NULL, - icon_contact_aim varchar(200) DEFAULT '' NOT NULL, - icon_contact_email varchar(200) DEFAULT '' NOT NULL, - icon_contact_icq varchar(200) DEFAULT '' NOT NULL, - icon_contact_jabber varchar(200) DEFAULT '' NOT NULL, - icon_contact_msnm varchar(200) DEFAULT '' NOT NULL, - icon_contact_pm varchar(200) DEFAULT '' NOT NULL, - icon_contact_yahoo varchar(200) DEFAULT '' NOT NULL, - icon_contact_www varchar(200) DEFAULT '' NOT NULL, - icon_post_delete varchar(200) DEFAULT '' NOT NULL, - icon_post_edit varchar(200) DEFAULT '' NOT NULL, - icon_post_info varchar(200) DEFAULT '' NOT NULL, - icon_post_quote varchar(200) DEFAULT '' NOT NULL, - icon_post_report varchar(200) DEFAULT '' NOT NULL, - icon_post_target varchar(200) DEFAULT '' NOT NULL, - icon_post_target_unread varchar(200) DEFAULT '' NOT NULL, - icon_topic_attach varchar(200) DEFAULT '' NOT NULL, - icon_topic_latest varchar(200) DEFAULT '' NOT NULL, - icon_topic_newest varchar(200) DEFAULT '' NOT NULL, - icon_topic_reported varchar(200) DEFAULT '' NOT NULL, - icon_topic_unapproved varchar(200) DEFAULT '' NOT NULL, - icon_user_online varchar(200) DEFAULT '' NOT NULL, - icon_user_offline varchar(200) DEFAULT '' NOT NULL, - icon_user_profile varchar(200) DEFAULT '' NOT NULL, - icon_user_search varchar(200) DEFAULT '' NOT NULL, - icon_user_warn varchar(200) DEFAULT '' NOT NULL, - button_pm_forward varchar(200) DEFAULT '' NOT NULL, - button_pm_new varchar(200) DEFAULT '' NOT NULL, - button_pm_reply varchar(200) DEFAULT '' NOT NULL, - button_topic_locked varchar(200) DEFAULT '' NOT NULL, - button_topic_new varchar(200) DEFAULT '' NOT NULL, - button_topic_reply varchar(200) DEFAULT '' NOT NULL, - user_icon1 varchar(200) DEFAULT '' NOT NULL, - user_icon2 varchar(200) DEFAULT '' NOT NULL, - user_icon3 varchar(200) DEFAULT '' NOT NULL, - user_icon4 varchar(200) DEFAULT '' NOT NULL, - user_icon5 varchar(200) DEFAULT '' NOT NULL, - user_icon6 varchar(200) DEFAULT '' NOT NULL, - user_icon7 varchar(200) DEFAULT '' NOT NULL, - user_icon8 varchar(200) DEFAULT '' NOT NULL, - user_icon9 varchar(200) DEFAULT '' NOT NULL, - user_icon10 varchar(200) DEFAULT '' NOT NULL, PRIMARY KEY (imageset_id) ); CREATE UNIQUE INDEX phpbb_styles_imageset_imgset_nm ON phpbb_styles_imageset (imageset_name); +/* + Table: 'phpbb_styles_imageset_data' +*/ +CREATE SEQUENCE phpbb_styles_imageset_data_seq; + +CREATE TABLE phpbb_styles_imageset_data ( + image_id INT2 DEFAULT nextval('phpbb_styles_imageset_data_seq'), + image_name varchar(200) DEFAULT '' NOT NULL, + image_filename varchar(200) DEFAULT '' NOT NULL, + image_lang varchar(30) DEFAULT '' NOT NULL, + image_height INT2 DEFAULT '0' NOT NULL CHECK (image_height >= 0), + image_width INT2 DEFAULT '0' NOT NULL CHECK (image_width >= 0), + imageset_id INT2 DEFAULT '0' NOT NULL, + PRIMARY KEY (image_id) +); + +CREATE INDEX phpbb_styles_imageset_data_i_id ON phpbb_styles_imageset_data (imageset_id); + /* Table: 'phpbb_topics' */ @@ -1148,7 +1075,7 @@ CREATE TABLE phpbb_topics ( topic_moved_id INT4 DEFAULT '0' NOT NULL CHECK (topic_moved_id >= 0), topic_bumped INT2 DEFAULT '0' NOT NULL CHECK (topic_bumped >= 0), topic_bumper INT4 DEFAULT '0' NOT NULL CHECK (topic_bumper >= 0), - poll_title varchar(100) DEFAULT '' NOT NULL, + poll_title varchar(255) DEFAULT '' NOT NULL, poll_start INT4 DEFAULT '0' NOT NULL CHECK (poll_start >= 0), poll_length INT4 DEFAULT '0' NOT NULL CHECK (poll_length >= 0), poll_max_options INT2 DEFAULT '1' NOT NULL, @@ -1161,6 +1088,7 @@ CREATE INDEX phpbb_topics_forum_id ON phpbb_topics (forum_id); CREATE INDEX phpbb_topics_forum_id_type ON phpbb_topics (forum_id, topic_type); CREATE INDEX phpbb_topics_last_post_time ON phpbb_topics (topic_last_post_time); CREATE INDEX phpbb_topics_topic_approved ON phpbb_topics (topic_approved); +CREATE INDEX phpbb_topics_forum_appr_last ON phpbb_topics (forum_id, topic_approved, topic_last_post_id); CREATE INDEX phpbb_topics_fid_time_moved ON phpbb_topics (forum_id, topic_last_post_time, topic_moved_id); /* @@ -1298,7 +1226,7 @@ CREATE TABLE phpbb_users ( CREATE INDEX phpbb_users_user_birthday ON phpbb_users (user_birthday); CREATE INDEX phpbb_users_user_email_hash ON phpbb_users (user_email_hash); CREATE INDEX phpbb_users_user_type ON phpbb_users (user_type); -CREATE INDEX phpbb_users_username_clean ON phpbb_users (username_clean); +CREATE UNIQUE INDEX phpbb_users_username_clean ON phpbb_users (username_clean); /* Table: 'phpbb_warnings' diff --git a/phpBB/install/schemas/schema_data.sql b/phpBB/install/schemas/schema_data.sql index ce151c020b..7122daa8a4 100644 --- a/phpBB/install/schemas/schema_data.sql +++ b/phpBB/install/schemas/schema_data.sql @@ -1,6 +1,4 @@ # -# Basic DB Data for phpBB 3.x - (c) phpBB Group, 2005 -# # $Id$ # @@ -18,7 +16,7 @@ INSERT INTO phpbb_config (config_name, config_value) VALUES ('allow_bookmarks', INSERT INTO phpbb_config (config_name, config_value) VALUES ('allow_emailreuse', '0'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('allow_forum_notify', '1'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('allow_mass_pm', '1'); -INSERT INTO phpbb_config (config_name, config_value) VALUES ('allow_name_chars', '.*'); +INSERT INTO phpbb_config (config_name, config_value) VALUES ('allow_name_chars', 'USERNAME_CHARS_ANY'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('allow_namechange', '0'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('allow_nocensors', '0'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('allow_pm_attach', '0'); @@ -46,13 +44,14 @@ INSERT INTO phpbb_config (config_name, config_value) VALUES ('avatar_max_width', INSERT INTO phpbb_config (config_name, config_value) VALUES ('avatar_min_height', '20'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('avatar_min_width', '20'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('avatar_path', 'images/avatars/upload'); +INSERT INTO phpbb_config (config_name, config_value) VALUES ('avatar_salt', 'phpbb_avatar'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('board_contact', 'contact@yourdomain.tld'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('board_disable', '0'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('board_disable_msg', ''); INSERT INTO phpbb_config (config_name, config_value) VALUES ('board_dst', '0'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('board_email', 'address@yourdomain.tld'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('board_email_form', '0'); -INSERT INTO phpbb_config (config_name, config_value) VALUES ('board_email_sig', 'Thanks, The Management'); +INSERT INTO phpbb_config (config_name, config_value) VALUES ('board_email_sig', '{L_CONFIG_BOARD_EMAIL_SIG}'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('board_hide_emails', '1'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('board_timezone', '0'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('browser_check', '1'); @@ -60,7 +59,9 @@ INSERT INTO phpbb_config (config_name, config_value) VALUES ('bump_interval', '1 INSERT INTO phpbb_config (config_name, config_value) VALUES ('bump_type', 'd'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('cache_gc', '7200'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('captcha_gd', '0'); -INSERT INTO phpbb_config (config_name, config_value) VALUES ('captcha_gd_noise', '1'); +INSERT INTO phpbb_config (config_name, config_value) VALUES ('captcha_gd_foreground_noise', '0'); +INSERT INTO phpbb_config (config_name, config_value) VALUES ('captcha_gd_x_grid', '25'); +INSERT INTO phpbb_config (config_name, config_value) VALUES ('captcha_gd_y_grid', '25'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('check_dnsbl', '0'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('chg_passforce', '0'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('cookie_domain', ''); @@ -90,7 +91,7 @@ INSERT INTO phpbb_config (config_name, config_value) VALUES ('forwarded_for_chec INSERT INTO phpbb_config (config_name, config_value) VALUES ('full_folder_action', '2'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('fulltext_mysql_max_word_len', '254'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('fulltext_mysql_min_word_len', '4'); -INSERT INTO phpbb_config (config_name, config_value) VALUES ('fulltext_native_common_thres', '20'); +INSERT INTO phpbb_config (config_name, config_value) VALUES ('fulltext_native_common_thres', '5'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('fulltext_native_load_upd', '1'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('fulltext_native_max_chars', '14'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('fulltext_native_min_chars', '3'); @@ -136,7 +137,7 @@ INSERT INTO phpbb_config (config_name, config_value) VALUES ('load_online_guests INSERT INTO phpbb_config (config_name, config_value) VALUES ('load_online_time', '5'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('load_onlinetrack', '1'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('load_search', '1'); -INSERT INTO phpbb_config (config_name, config_value) VALUES ('load_tplcompile', '1'); +INSERT INTO phpbb_config (config_name, config_value) VALUES ('load_tplcompile', '0'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('load_user_activity', '1'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('max_attachments', '3'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('max_attachments_pm', '1'); @@ -148,7 +149,7 @@ INSERT INTO phpbb_config (config_name, config_value) VALUES ('max_name_chars', ' INSERT INTO phpbb_config (config_name, config_value) VALUES ('max_pass_chars', '30'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('max_poll_options', '10'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('max_post_chars', '0'); -INSERT INTO phpbb_config (config_name, config_value) VALUES ('max_post_font_size', '0'); +INSERT INTO phpbb_config (config_name, config_value) VALUES ('max_post_font_size', '200'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('max_post_img_height', '0'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('max_post_img_width', '0'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('max_post_smilies', '0'); @@ -156,7 +157,7 @@ INSERT INTO phpbb_config (config_name, config_value) VALUES ('max_post_urls', '0 INSERT INTO phpbb_config (config_name, config_value) VALUES ('max_quote_depth', '3'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('max_reg_attempts', '5'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('max_sig_chars', '255'); -INSERT INTO phpbb_config (config_name, config_value) VALUES ('max_sig_font_size', '24'); +INSERT INTO phpbb_config (config_name, config_value) VALUES ('max_sig_font_size', '200'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('max_sig_img_height', '0'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('max_sig_img_width', '0'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('max_sig_smilies', '0'); @@ -190,8 +191,8 @@ INSERT INTO phpbb_config (config_name, config_value) VALUES ('server_port', ''); INSERT INTO phpbb_config (config_name, config_value) VALUES ('server_protocol', ''); INSERT INTO phpbb_config (config_name, config_value) VALUES ('session_gc', '3600'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('session_length', '3600'); -INSERT INTO phpbb_config (config_name, config_value) VALUES ('site_desc', 'A _little_ text to describe your forum'); -INSERT INTO phpbb_config (config_name, config_value) VALUES ('sitename', 'yourdomain.com'); +INSERT INTO phpbb_config (config_name, config_value) VALUES ('site_desc', '{L_CONFIG_SITE_DESC}'); +INSERT INTO phpbb_config (config_name, config_value) VALUES ('sitename', '{L_CONFIG_SITENAME}'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('smilies_path', 'images/smilies'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('smtp_auth_method', 'PLAIN'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('smtp_delivery', '0'); @@ -203,7 +204,7 @@ INSERT INTO phpbb_config (config_name, config_value) VALUES ('topics_per_page', INSERT INTO phpbb_config (config_name, config_value) VALUES ('tpl_allow_php', '0'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('upload_icons_path', 'images/upload_icons'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('upload_path', 'files'); -INSERT INTO phpbb_config (config_name, config_value) VALUES ('version', '3.0.B5'); +INSERT INTO phpbb_config (config_name, config_value) VALUES ('version', '3.0.RC1'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('warnings_expire_days', '90'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('warnings_gc', '14400'); @@ -270,10 +271,10 @@ INSERT INTO phpbb_acl_options (auth_option, is_local, is_global) VALUES ('m_merg INSERT INTO phpbb_acl_options (auth_option, is_local, is_global) VALUES ('m_move', 1, 1); INSERT INTO phpbb_acl_options (auth_option, is_local, is_global) VALUES ('m_report', 1, 1); INSERT INTO phpbb_acl_options (auth_option, is_local, is_global) VALUES ('m_split', 1, 1); -INSERT INTO phpbb_acl_options (auth_option, is_local, is_global) VALUES ('m_warn', 1, 1); # -- Global moderator auth option (not a local option) INSERT INTO phpbb_acl_options (auth_option, is_local, is_global) VALUES ('m_ban', 0, 1); +INSERT INTO phpbb_acl_options (auth_option, is_local, is_global) VALUES ('m_warn', 0, 1); # -- Admin related auth options INSERT INTO phpbb_acl_options (auth_option, is_global) VALUES ('a_', 1); @@ -379,21 +380,92 @@ INSERT INTO phpbb_acl_roles (role_name, role_description, role_type, role_order) # -- phpbb_styles -INSERT INTO phpbb_styles (style_name, style_copyright, template_id, theme_id, imageset_id) VALUES ('subSilver', '© phpBB Group', 1, 1, 1); +INSERT INTO phpbb_styles (style_name, style_copyright, style_active, template_id, theme_id, imageset_id) VALUES ('prosilver', '© phpBB Group', 1, 1, 1, 1); # -- phpbb_styles_imageset -INSERT INTO phpbb_styles_imageset (imageset_name, imageset_copyright, imageset_path, site_logo, upload_bar, poll_left, poll_center, poll_right, icon_friend, icon_foe, forum_link, forum_read, forum_read_locked, forum_read_subforum, forum_unread, forum_unread_locked, forum_unread_subforum, topic_moved, topic_read, topic_read_mine, topic_read_hot, topic_read_hot_mine, topic_read_locked, topic_read_locked_mine, topic_unread, topic_unread_mine, topic_unread_hot, topic_unread_hot_mine, topic_unread_locked, topic_unread_locked_mine, sticky_read, sticky_read_mine, sticky_read_locked, sticky_read_locked_mine, sticky_unread, sticky_unread_mine, sticky_unread_locked, sticky_unread_locked_mine, announce_read, announce_read_mine, announce_read_locked, announce_read_locked_mine, announce_unread, announce_unread_mine, announce_unread_locked, announce_unread_locked_mine, global_read, global_read_mine, global_read_locked, global_read_locked_mine, global_unread, global_unread_mine, global_unread_locked, global_unread_locked_mine, pm_read, pm_unread, icon_contact_aim, icon_contact_email, icon_contact_icq, icon_contact_jabber, icon_contact_msnm, icon_contact_pm, icon_contact_yahoo, icon_contact_www, icon_post_delete, icon_post_edit, icon_post_info, icon_post_quote, icon_post_report, icon_post_target, icon_post_target_unread, icon_topic_attach, icon_topic_latest, icon_topic_newest, icon_topic_reported, icon_topic_unapproved, icon_user_online, icon_user_offline, icon_user_profile, icon_user_search, icon_user_warn, button_pm_forward, button_pm_new, button_pm_reply, button_topic_locked, button_topic_new, button_topic_reply, user_icon1, user_icon2, user_icon3, user_icon4, user_icon5, user_icon6, user_icon7, user_icon8, user_icon9, user_icon10) VALUES ('subSilver', '© phpBB Group, 2003', 'subSilver', 'site_logo.gif*94*170', 'upload_bar.gif*16*280', 'poll_left.gif*12*4', 'poll_center.gif*12*', 'poll_right.gif*12*4', '', '', 'forum_link.gif*25*46', 'forum_read.gif*25*46', 'forum_read_locked.gif*25*46', 'forum_read_subforum.gif*25*46', 'forum_unread.gif*25*46', 'forum_unread_locked.gif*25*46', 'forum_unread_subforum.gif*25*46', 'topic_moved.gif*18*19', 'topic_read.gif*18*19', 'topic_read_mine.gif*18*19', 'topic_read_hot.gif*18*19', 'topic_read_hot_mine.gif*18*19', 'topic_read_locked.gif*18*19', 'topic_read_locked_mine.gif*18*19', 'topic_unread.gif*18*19', 'topic_unread_mine.gif*18*19', 'topic_unread_hot.gif*18*19', 'topic_unread_hot_mine.gif*18*19', 'topic_unread_locked.gif*18*19', 'topic_unread_locked_mine.gif*18*19', 'sticky_read.gif*18*19', 'sticky_read_mine.gif*18*19', 'sticky_read_locked.gif*18*19', 'sticky_read_locked_mine.gif*18*19', 'sticky_unread.gif*18*19', 'sticky_unread_mine.gif*18*19', 'sticky_unread_locked.gif*18*19', 'sticky_unread_locked_mine.gif*18*19', 'announce_read.gif*18*19', 'announce_read_mine.gif*18*19', 'announce_read_locked.gif*18*19', 'announce_read_locked_mine.gif*18*19', 'announce_unread.gif*18*19', 'announce_unread_mine.gif*18*19', 'announce_unread_locked.gif*18*19', 'announce_unread_locked_mine.gif*18*19', 'announce_read.gif*18*19', 'announce_read_mine.gif*18*19', 'announce_read_locked.gif*18*19', 'announce_read_locked_mine.gif*18*19', 'announce_unread.gif*18*19', 'announce_unread_mine.gif*18*19', 'announce_unread_locked.gif*18*19', 'announce_unread_locked_mine.gif*18*19', 'topic_read.gif*18*19', 'topic_unread.gif*18*19', '{LANG}/icon_contact_aim.gif*20*72', '{LANG}/icon_contact_email.gif*20*72', '{LANG}/icon_contact_icq.gif*20*72', '{LANG}/icon_contact_jabber.gif*20*72', '{LANG}/icon_contact_msnm.gif*20*72', '{LANG}/icon_contact_pm.gif*20*72', '{LANG}/icon_contact_yahoo.gif*20*72', '{LANG}/icon_contact_www.gif*20*72', '{LANG}/icon_post_delete.gif*20*20', '{LANG}/icon_post_edit.gif*20*90', '{LANG}/icon_post_info.gif*20*20', '{LANG}/icon_post_quote.gif*20*90', '{LANG}/icon_post_report.gif*20*20', 'icon_post_target.gif*9*12', 'icon_post_target_unread.gif*9*12', 'icon_topic_attach.gif*18*14', 'icon_topic_latest.gif*9*18', 'icon_topic_newest.gif*9*18', 'icon_topic_reported.gif*18*19', 'icon_topic_unapproved.gif*18*19', '{LANG}/icon_user_online.gif*20*72', '{LANG}/icon_user_offline.gif*20*72', '{LANG}/icon_user_profile.gif*20*72', '{LANG}/icon_user_search.gif*20*72', '{LANG}/icon_user_warn.gif*20*20', '', '{LANG}/button_pm_new.gif*27*97', '{LANG}/button_pm_reply.gif*20*90', '{LANG}/button_topic_locked.gif*27*97', '{LANG}/button_topic_new.gif*27*97', '{LANG}/button_topic_reply.gif*27*97', '', '', '', '', '', '', '', '', '', ''); +INSERT INTO phpbb_styles_imageset (imageset_name, imageset_copyright, imageset_path) VALUES ('prosilver', '© phpBB Group', 'prosilver'); + +# -- phpbb_styles_imageset_data +INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('site_logo', 'site_logo.gif', '', 52, 139, 1); +INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('forum_link', 'forum_link.gif', '', 27, 27, 1); +INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('forum_read', 'forum_read.gif', '', 27, 27, 1); +INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('forum_read_locked', 'forum_read_locked.gif', '', 27, 27, 1); +INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('forum_read_subforum', 'forum_read_subforum.gif', '', 27, 27, 1); +INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('forum_unread', 'forum_unread.gif', '', 27, 27, 1); +INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('forum_unread_locked', 'forum_unread_locked.gif', '', 27, 27, 1); +INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('forum_unread_subforum', 'forum_unread_subforum.gif', '', 27, 27, 1); +INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('topic_moved', 'topic_moved.gif', '', 27, 27, 1); +INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('topic_read', 'topic_read.gif', '', 27, 27, 1); +INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('topic_read_mine', 'topic_read_mine.gif', '', 27, 27, 1); +INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('topic_read_hot', 'topic_read_hot.gif', '', 27, 27, 1); +INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('topic_read_hot_mine', 'topic_read_hot_mine.gif', '', 27, 27, 1); +INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('topic_read_locked', 'topic_read_locked.gif', '', 27, 27, 1); +INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('topic_read_locked_mine', 'topic_read_locked_mine.gif', '', 27, 27, 1); +INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('topic_unread', 'topic_unread.gif', '', 27, 27, 1); +INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('topic_unread_mine', 'topic_unread_mine.gif', '', 27, 27, 1); +INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('topic_unread_hot', 'topic_unread_hot.gif', '', 27, 27, 1); +INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('topic_unread_hot_mine', 'topic_unread_hot_mine.gif', '', 27, 27, 1); +INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('topic_unread_locked', 'topic_unread_locked.gif', '', 27, 27, 1); +INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('topic_unread_locked_mine', 'topic_unread_locked_mine.gif', '', 27, 27, 1); +INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('sticky_read', 'sticky_read.gif', '', 27, 27, 1); +INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('sticky_read_mine', 'sticky_read_mine.gif', '', 27, 27, 1); +INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('sticky_read_locked', 'sticky_read_locked.gif', '', 27, 27, 1); +INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('sticky_read_locked_mine', 'sticky_read_locked_mine.gif', '', 27, 27, 1); +INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('sticky_unread', 'sticky_unread.gif', '', 27, 27, 1); +INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('sticky_unread_mine', 'sticky_unread_mine.gif', '', 27, 27, 1); +INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('sticky_unread_locked', 'sticky_unread_locked.gif', '', 27, 27, 1); +INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('sticky_unread_locked_mine', 'sticky_unread_locked_mine.gif', '', 27, 27, 1); +INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('announce_read', 'announce_read.gif', '', 27, 27, 1); +INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('announce_read_mine', 'announce_read_mine.gif', '', 27, 27, 1); +INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('announce_read_locked', 'announce_read_locked.gif', '', 27, 27, 1); +INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('announce_read_locked_mine', 'announce_read_locked_mine.gif', '', 27, 27, 1); +INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('announce_unread', 'announce_unread.gif', '', 27, 27, 1); +INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('announce_unread_mine', 'announce_unread_mine.gif', '', 27, 27, 1); +INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('announce_unread_locked', 'announce_unread_locked.gif', '', 27, 27, 1); +INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('announce_unread_locked_mine', 'announce_unread_locked_mine.gif', '', 27, 27, 1); +INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('global_read', 'announce_read.gif', '', 27, 27, 1); +INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('global_read_mine', 'announce_read_mine.gif', '', 27, 27, 1); +INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('global_read_locked', 'announce_read_locked.gif', '', 27, 27, 1); +INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('global_read_locked_mine', 'announce_read_locked_mine.gif', '', 27, 27, 1); +INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('global_unread', 'announce_unread.gif', '', 27, 27, 1); +INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('global_unread_mine', 'announce_unread_mine.gif', '', 27, 27, 1); +INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('global_unread_locked', 'announce_unread_locked.gif', '', 27, 27, 1); +INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('global_unread_locked_mine', 'announce_unread_locked_mine.gif', '', 27, 27, 1); +INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('pm_read', 'topic_read.gif', '', 27, 27, 1); +INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('pm_unread', 'topic_unread.gif', '', 27, 27, 1); +INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('icon_back_top', 'icon_back_top.gif', '', 11, 11, 1); +INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('icon_contact_aim', 'icon_contact_aim.gif', '', 20, 20, 1); +INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('icon_contact_email', 'icon_contact_email.gif', '', 20, 20, 1); +INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('icon_contact_icq', 'icon_contact_icq.gif', '', 20, 20, 1); +INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('icon_contact_jabber', 'icon_contact_jabber.gif', '', 20, 20, 1); +INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('icon_contact_msnm', 'icon_contact_msnm.gif', '', 20, 20, 1); +INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('icon_contact_www', 'icon_contact_www.gif', '', 20, 20, 1); +INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('icon_contact_yahoo', 'icon_contact_yahoo.gif', '', 20, 20, 1); +INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('icon_post_delete', 'icon_post_delete.gif', '', 20, 20, 1); +INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('icon_post_info', 'icon_post_info.gif', '', 20, 20, 1); +INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('icon_post_report', 'icon_post_report.gif', '', 20, 20, 1); +INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('icon_post_target', 'icon_post_target.gif', '', 9, 11, 1); +INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('icon_post_target_unread', 'icon_post_target_unread.gif', '', 9, 11, 1); +INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('icon_topic_attach', 'icon_topic_attach.gif', '', 10, 7, 1); +INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('icon_topic_latest', 'icon_topic_latest.gif', '', 9, 11, 1); +INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('icon_topic_newest', 'icon_topic_newest.gif', '', 9, 11, 1); +INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('icon_topic_reported', 'icon_topic_reported.gif', '', 14, 16, 1); +INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('icon_topic_unapproved', 'icon_topic_unapproved.gif', '', 14, 16, 1); +INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('icon_user_profile', 'icon_user_profile.gif', '', 11, 11, 1); +INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('icon_user_warn', 'icon_user_warn.gif', '', 20, 20, 1); +INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('subforum_read', 'subforum_read.gif', '', 9, 11, 1); +INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('subforum_unread', 'subforum_unread.gif', '', 9, 11, 1); # -- phpbb_styles_template -INSERT INTO phpbb_styles_template (template_name, template_copyright, template_path) VALUES ('subSilver', '© phpBB Group', 'subSilver'); +INSERT INTO phpbb_styles_template (template_name, template_copyright, template_path, bbcode_bitfield, template_storedb) VALUES ('prosilver', '© phpBB Group', 'prosilver', 'lNg=', 0); # -- phpbb_styles_theme -INSERT INTO phpbb_styles_theme (theme_name, theme_copyright, theme_path, theme_data) VALUES ('subSilver', '© phpBB Group', 'subSilver', ''); +INSERT INTO phpbb_styles_theme (theme_name, theme_copyright, theme_path, theme_storedb, theme_data) VALUES ('prosilver', '© phpBB Group', 'prosilver', 1, ''); # -- Forums -INSERT INTO phpbb_forums (forum_name, forum_desc, left_id, right_id, parent_id, forum_type, forum_posts, forum_topics, forum_topics_real, forum_last_post_id, forum_last_poster_id, forum_last_poster_name, forum_last_poster_colour, forum_last_post_time, forum_link, forum_password, forum_image, forum_rules, forum_rules_link, forum_rules_uid, forum_desc_uid, prune_days, prune_viewed, forum_parents) VALUES ('My first Category', '', 1, 4, 0, 0, 1, 1, 1, 1, 2, 'Admin', 'AA0000', 972086460, '', '', '', '', '', '', '', 0, 0, ''); +INSERT INTO phpbb_forums (forum_name, forum_desc, left_id, right_id, parent_id, forum_type, forum_posts, forum_topics, forum_topics_real, forum_last_post_id, forum_last_poster_id, forum_last_poster_name, forum_last_poster_colour, forum_last_post_time, forum_link, forum_password, forum_image, forum_rules, forum_rules_link, forum_rules_uid, forum_desc_uid, prune_days, prune_viewed, forum_parents) VALUES ('{L_FORUMS_FIRST_CATEGORY}', '', 1, 4, 0, 0, 1, 1, 1, 1, 2, 'Admin', 'AA0000', 972086460, '', '', '', '', '', '', '', 0, 0, ''); -INSERT INTO phpbb_forums (forum_name, forum_desc, left_id, right_id, parent_id, forum_type, forum_posts, forum_topics, forum_topics_real, forum_last_post_id, forum_last_poster_id, forum_last_poster_name, forum_last_poster_colour, forum_last_post_subject, forum_last_post_time, forum_link, forum_password, forum_image, forum_rules, forum_rules_link, forum_rules_uid, forum_desc_uid, prune_days, prune_viewed, forum_parents) VALUES ('Test Forum 1', 'This is just a test forum.', 2, 3, 1, 1, 1, 1, 1, 1, 2, 'Admin', 'AA0000', 'Welcome to phpBB 3', 972086460, '', '', '', '', '', '', '', 0, 0, ''); +INSERT INTO phpbb_forums (forum_name, forum_desc, left_id, right_id, parent_id, forum_type, forum_posts, forum_topics, forum_topics_real, forum_last_post_id, forum_last_poster_id, forum_last_poster_name, forum_last_poster_colour, forum_last_post_subject, forum_last_post_time, forum_link, forum_password, forum_image, forum_rules, forum_rules_link, forum_rules_uid, forum_desc_uid, prune_days, prune_viewed, forum_parents) VALUES ('{L_FORUMS_TEST_FORUM_TITLE}', '{L_FORUMS_TEST_FORUM_DESC}', 2, 3, 1, 1, 1, 1, 1, 1, 2, 'Admin', 'AA0000', '{L_TOPICS_TOPIC_TITLE}', 972086460, '', '', '', '', '', '', '', 0, 0, ''); # -- Users / Anonymous user INSERT INTO phpbb_users (user_type, group_id, username, username_clean, user_regdate, user_password, user_email, user_lang, user_style, user_rank, user_colour, user_posts, user_permissions, user_ip, user_birthday, user_lastpage, user_last_confirm_key, user_post_sortby_type, user_post_sortby_dir, user_topic_sortby_type, user_topic_sortby_dir, user_avatar, user_sig, user_sig_bbcode_uid, user_from, user_icq, user_aim, user_yim, user_msnm, user_jabber, user_website, user_occ, user_interests, user_actkey, user_newpasswd, user_allow_massemail) VALUES (2, 1, 'Anonymous', 'anonymous', 0, '', '', 'en', 1, 0, '', 0, '', '', '', '', '', 't', 'a', 't', 'd', '', '', '', '', '', '', '', '', '', '', '', '', '', '', 0); @@ -416,7 +488,7 @@ INSERT INTO phpbb_user_group (group_id, user_id, user_pending, group_leader) VAL INSERT INTO phpbb_user_group (group_id, user_id, user_pending, group_leader) VALUES (5, 2, 0, 1); # -- Ranks -INSERT INTO phpbb_ranks (rank_title, rank_min, rank_special, rank_image) VALUES ('Site Admin', 0, 1, ''); +INSERT INTO phpbb_ranks (rank_title, rank_min, rank_special, rank_image) VALUES ('{L_RANKS_SITE_ADMIN_TITLE}', 0, 1, ''); # -- Roles data @@ -456,7 +528,7 @@ INSERT INTO phpbb_acl_roles_data (role_id, auth_option_id, auth_setting) SELECT INSERT INTO phpbb_acl_roles_data (role_id, auth_option_id, auth_setting) SELECT 11, auth_option_id, 1 FROM phpbb_acl_options WHERE auth_option LIKE 'm_%' AND auth_option NOT IN ('m_ban', 'm_chgposter'); # Simple Moderator (m_) -INSERT INTO phpbb_acl_roles_data (role_id, auth_option_id, auth_setting) SELECT 12, auth_option_id, 1 FROM phpbb_acl_options WHERE auth_option LIKE 'm_%' AND auth_option IN ('m_', 'm_approve', 'm_delete', 'm_edit', 'm_info', 'm_report', 'm_warn'); +INSERT INTO phpbb_acl_roles_data (role_id, auth_option_id, auth_setting) SELECT 12, auth_option_id, 1 FROM phpbb_acl_options WHERE auth_option LIKE 'm_%' AND auth_option IN ('m_', 'm_delete', 'm_edit', 'm_info', 'm_report'); # Queue Moderator (m_) INSERT INTO phpbb_acl_roles_data (role_id, auth_option_id, auth_setting) SELECT 13, auth_option_id, 1 FROM phpbb_acl_options WHERE auth_option LIKE 'm_%' AND auth_option IN ('m_', 'm_approve', 'm_edit'); @@ -465,7 +537,7 @@ INSERT INTO phpbb_acl_roles_data (role_id, auth_option_id, auth_setting) SELECT INSERT INTO phpbb_acl_roles_data (role_id, auth_option_id, auth_setting) SELECT 14, auth_option_id, 1 FROM phpbb_acl_options WHERE auth_option LIKE 'f_%'; # Standard Access (f_) -INSERT INTO phpbb_acl_roles_data (role_id, auth_option_id, auth_setting) SELECT 15, auth_option_id, 1 FROM phpbb_acl_options WHERE auth_option LIKE 'f_%' AND auth_option NOT IN ('f_announce', 'f_delete', 'f_ignoreflood', 'f_poll', 'f_sticky', 'f_user_lock'); +INSERT INTO phpbb_acl_roles_data (role_id, auth_option_id, auth_setting) SELECT 15, auth_option_id, 1 FROM phpbb_acl_options WHERE auth_option LIKE 'f_%' AND auth_option NOT IN ('f_announce', 'f_ignoreflood', 'f_poll', 'f_sticky', 'f_user_lock'); # No Access (f_) INSERT INTO phpbb_acl_roles_data (role_id, auth_option_id, auth_setting) SELECT 16, auth_option_id, 0 FROM phpbb_acl_options WHERE auth_option = 'f_'; @@ -484,7 +556,7 @@ INSERT INTO phpbb_acl_roles_data (role_id, auth_option_id, auth_setting) SELECT INSERT INTO phpbb_acl_roles_data (role_id, auth_option_id, auth_setting) SELECT 20, auth_option_id, 0 FROM phpbb_acl_options WHERE auth_option LIKE 'f_%' AND auth_option IN ('f_noapprove'); # Standard Access + Polls (f_) -INSERT INTO phpbb_acl_roles_data (role_id, auth_option_id, auth_setting) SELECT 21, auth_option_id, 1 FROM phpbb_acl_options WHERE auth_option LIKE 'f_%' AND auth_option NOT IN ('f_announce', 'f_delete', 'f_ignoreflood', 'f_sticky', 'f_user_lock'); +INSERT INTO phpbb_acl_roles_data (role_id, auth_option_id, auth_setting) SELECT 21, auth_option_id, 1 FROM phpbb_acl_options WHERE auth_option LIKE 'f_%' AND auth_option NOT IN ('f_announce', 'f_ignoreflood', 'f_sticky', 'f_user_lock'); # Limited Access + Polls (f_) INSERT INTO phpbb_acl_roles_data (role_id, auth_option_id, auth_setting) SELECT 22, auth_option_id, 1 FROM phpbb_acl_options WHERE auth_option LIKE 'f_%' AND auth_option NOT IN ('f_announce', 'f_attach', 'f_bump', 'f_delete', 'f_flash', 'f_icons', 'f_ignoreflood', 'f_sticky', 'f_user_lock', 'f_votechg'); @@ -541,113 +613,86 @@ INSERT INTO phpbb_acl_groups (group_id, forum_id, auth_option_id, auth_role_id, # -- Demo Topic -INSERT INTO phpbb_topics (topic_title, topic_poster, topic_time, topic_views, topic_replies, topic_replies_real, forum_id, topic_status, topic_type, topic_first_post_id, topic_first_poster_name, topic_first_poster_colour, topic_last_post_id, topic_last_poster_id, topic_last_poster_name, topic_last_poster_colour, topic_last_post_subject, topic_last_post_time, topic_last_view_time, poll_title) VALUES ('Welcome to phpBB 3', 2, 972086460, 0, 0, 0, 2, 0, 0, 1, 'Admin', 'AA0000', 1, 2, 'Admin', 'AA0000', 'Welcome to phpBB 3', 972086460, 972086460, ''); +INSERT INTO phpbb_topics (topic_title, topic_poster, topic_time, topic_views, topic_replies, topic_replies_real, forum_id, topic_status, topic_type, topic_first_post_id, topic_first_poster_name, topic_first_poster_colour, topic_last_post_id, topic_last_poster_id, topic_last_poster_name, topic_last_poster_colour, topic_last_post_subject, topic_last_post_time, topic_last_view_time, poll_title) VALUES ('{L_TOPICS_TOPIC_TITLE}', 2, 972086460, 0, 0, 0, 2, 0, 0, 1, 'Admin', 'AA0000', 1, 2, 'Admin', 'AA0000', '{L_TOPICS_TOPIC_TITLE}', 972086460, 972086460, ''); # -- Demo Post -INSERT INTO phpbb_posts (topic_id, forum_id, poster_id, icon_id, post_time, post_username, poster_ip, post_subject, post_text, post_checksum, bbcode_uid) VALUES (1, 2, 2, 1, 972086460, '', '127.0.0.1', 'Welcome to phpBB 3', 'This is an example post in your phpBB 3.0 installation. You may delete this post, this topic and even this forum if you like since everything seems to be working!', '5dd683b17f641daf84c040bfefc58ce9', ''); +INSERT INTO phpbb_posts (topic_id, forum_id, poster_id, icon_id, post_time, post_username, poster_ip, post_subject, post_text, post_checksum, bbcode_uid) VALUES (1, 2, 2, 0, 972086460, '', '127.0.0.1', '{L_TOPICS_TOPIC_TITLE}', '{L_DEFAULT_INSTALL_POST}', '5dd683b17f641daf84c040bfefc58ce9', ''); # -- Admin posted to the demo topic INSERT INTO phpbb_topics_posted (user_id, topic_id, topic_posted) VALUES (2, 1, 1); # -- Smilies -INSERT INTO phpbb_smilies (code, smiley_url, emotion, smiley_width, smiley_height, smiley_order) VALUES (':D', 'icon_biggrin.gif', 'Very Happy', 15, 15, 1); -INSERT INTO phpbb_smilies (code, smiley_url, emotion, smiley_width, smiley_height, smiley_order) VALUES (':)', 'icon_smile.gif', 'Smile', 15, 15, 2); -INSERT INTO phpbb_smilies (code, smiley_url, emotion, smiley_width, smiley_height, smiley_order) VALUES (':(', 'icon_sad.gif', 'Sad', 15, 15, 3); -INSERT INTO phpbb_smilies (code, smiley_url, emotion, smiley_width, smiley_height, smiley_order) VALUES (':o', 'icon_surprised.gif', 'Surprised', 15, 15, 4); -INSERT INTO phpbb_smilies (code, smiley_url, emotion, smiley_width, smiley_height, smiley_order) VALUES (':eek:', 'icon_surprised.gif', 'Surprised', 15, 15, 4); -INSERT INTO phpbb_smilies (code, smiley_url, emotion, smiley_width, smiley_height, smiley_order) VALUES ('8O', 'icon_eek.gif', 'Shocked', 15, 15, 5); -INSERT INTO phpbb_smilies (code, smiley_url, emotion, smiley_width, smiley_height, smiley_order) VALUES (':?', 'icon_confused.gif', 'Confused', 15, 15, 6); -INSERT INTO phpbb_smilies (code, smiley_url, emotion, smiley_width, smiley_height, smiley_order) VALUES ('8)', 'icon_cool.gif', 'Cool', 15, 15, 7); -INSERT INTO phpbb_smilies (code, smiley_url, emotion, smiley_width, smiley_height, smiley_order) VALUES (':lol:', 'icon_lol.gif', 'Laughing', 15, 15, 8); -INSERT INTO phpbb_smilies (code, smiley_url, emotion, smiley_width, smiley_height, smiley_order) VALUES (':x', 'icon_mad.gif', 'Mad', 15, 15, 9); -INSERT INTO phpbb_smilies (code, smiley_url, emotion, smiley_width, smiley_height, smiley_order) VALUES (':P', 'icon_razz.gif', 'Razz', 15, 15, 10); -INSERT INTO phpbb_smilies (code, smiley_url, emotion, smiley_width, smiley_height, smiley_order) VALUES (':oops:', 'icon_redface.gif', 'Embarassed', 15, 15, 11); -INSERT INTO phpbb_smilies (code, smiley_url, emotion, smiley_width, smiley_height, smiley_order) VALUES (':cry:', 'icon_cry.gif', 'Crying or Very sad', 15, 15, 12); -INSERT INTO phpbb_smilies (code, smiley_url, emotion, smiley_width, smiley_height, smiley_order) VALUES (':evil:', 'icon_evil.gif', 'Evil or Very Mad', 15, 15, 13); -INSERT INTO phpbb_smilies (code, smiley_url, emotion, smiley_width, smiley_height, smiley_order) VALUES (':twisted:', 'icon_twisted.gif', 'Twisted Evil', 15, 15, 14); -INSERT INTO phpbb_smilies (code, smiley_url, emotion, smiley_width, smiley_height, smiley_order) VALUES (':roll:', 'icon_rolleyes.gif', 'Rolling Eyes', 15, 15, 15); -INSERT INTO phpbb_smilies (code, smiley_url, emotion, smiley_width, smiley_height, smiley_order) VALUES (';)', 'icon_wink.gif', 'Wink', 15, 15, 16); -INSERT INTO phpbb_smilies (code, smiley_url, emotion, smiley_width, smiley_height, smiley_order) VALUES (':!:', 'icon_exclaim.gif', 'Exclamation', 15, 15, 17); -INSERT INTO phpbb_smilies (code, smiley_url, emotion, smiley_width, smiley_height, smiley_order) VALUES (':?:', 'icon_question.gif', 'Question', 15, 15, 18); -INSERT INTO phpbb_smilies (code, smiley_url, emotion, smiley_width, smiley_height, smiley_order) VALUES (':idea:', 'icon_idea.gif', 'Idea', 15, 15, 19); -INSERT INTO phpbb_smilies (code, smiley_url, emotion, smiley_width, smiley_height, smiley_order) VALUES (':arrow:', 'icon_arrow.gif', 'Arrow', 15, 15, 20); -INSERT INTO phpbb_smilies (code, smiley_url, emotion, smiley_width, smiley_height, smiley_order) VALUES (':|', 'icon_neutral.gif', 'Neutral', 15, 15, 21); -INSERT INTO phpbb_smilies (code, smiley_url, emotion, smiley_width, smiley_height, smiley_order) VALUES (':mrgreen:', 'icon_mrgreen.gif', 'Mr. Green', 15, 15, 22); +INSERT INTO phpbb_smilies (code, smiley_url, emotion, smiley_width, smiley_height, smiley_order) VALUES (':D', 'icon_e_biggrin.gif', '{L_SMILIES_VERY_HAPPY}', 15, 17, 1); +INSERT INTO phpbb_smilies (code, smiley_url, emotion, smiley_width, smiley_height, smiley_order) VALUES (':-D', 'icon_e_biggrin.gif', '{L_SMILIES_VERY_HAPPY}', 15, 17, 2); +INSERT INTO phpbb_smilies (code, smiley_url, emotion, smiley_width, smiley_height, smiley_order) VALUES (':grin:', 'icon_e_biggrin.gif', '{L_SMILIES_VERY_HAPPY}', 15, 17, 3); +INSERT INTO phpbb_smilies (code, smiley_url, emotion, smiley_width, smiley_height, smiley_order) VALUES (':)', 'icon_e_smile.gif', '{L_SMILIES_SMILE}', 15, 17, 4); +INSERT INTO phpbb_smilies (code, smiley_url, emotion, smiley_width, smiley_height, smiley_order) VALUES (':-)', 'icon_e_smile.gif', '{L_SMILIES_SMILE}', 15, 17, 5); +INSERT INTO phpbb_smilies (code, smiley_url, emotion, smiley_width, smiley_height, smiley_order) VALUES (':smile:', 'icon_e_smile.gif', '{L_SMILIES_SMILE}', 15, 17, 6); +INSERT INTO phpbb_smilies (code, smiley_url, emotion, smiley_width, smiley_height, smiley_order) VALUES (';)', 'icon_e_wink.gif', '{L_SMILIES_WINK}', 15, 17, 7); +INSERT INTO phpbb_smilies (code, smiley_url, emotion, smiley_width, smiley_height, smiley_order) VALUES (';-)', 'icon_e_wink.gif', '{L_SMILIES_WINK}', 15, 17, 8); +INSERT INTO phpbb_smilies (code, smiley_url, emotion, smiley_width, smiley_height, smiley_order) VALUES (':wink:', 'icon_e_wink.gif', '{L_SMILIES_WINK}', 15, 17, 9); +INSERT INTO phpbb_smilies (code, smiley_url, emotion, smiley_width, smiley_height, smiley_order) VALUES (':(', 'icon_e_sad.gif', '{L_SMILIES_SAD}', 15, 17, 10); +INSERT INTO phpbb_smilies (code, smiley_url, emotion, smiley_width, smiley_height, smiley_order) VALUES (':-(', 'icon_e_sad.gif', '{L_SMILIES_SAD}', 15, 17, 11); +INSERT INTO phpbb_smilies (code, smiley_url, emotion, smiley_width, smiley_height, smiley_order) VALUES (':sad:', 'icon_e_sad.gif', '{L_SMILIES_SAD}', 15, 17, 12); +INSERT INTO phpbb_smilies (code, smiley_url, emotion, smiley_width, smiley_height, smiley_order) VALUES (':o', 'icon_e_surprised.gif', '{L_SMILIES_SURPRISED}', 15, 19, 13); +INSERT INTO phpbb_smilies (code, smiley_url, emotion, smiley_width, smiley_height, smiley_order) VALUES (':-o', 'icon_e_surprised.gif', '{L_SMILIES_SURPRISED}', 15, 19, 14); +INSERT INTO phpbb_smilies (code, smiley_url, emotion, smiley_width, smiley_height, smiley_order) VALUES (':eek:', 'icon_e_surprised.gif', '{L_SMILIES_SURPRISED}', 15, 19, 15); +INSERT INTO phpbb_smilies (code, smiley_url, emotion, smiley_width, smiley_height, smiley_order) VALUES (':shock:', 'icon_eek.gif', '{L_SMILIES_SHOCKED}', 15, 15, 16); +INSERT INTO phpbb_smilies (code, smiley_url, emotion, smiley_width, smiley_height, smiley_order) VALUES (':?', 'icon_e_confused.gif', '{L_SMILIES_CONFUSED}', 15, 17, 17); +INSERT INTO phpbb_smilies (code, smiley_url, emotion, smiley_width, smiley_height, smiley_order) VALUES (':-?', 'icon_e_confused.gif', '{L_SMILIES_CONFUSED}', 15, 17, 18); +INSERT INTO phpbb_smilies (code, smiley_url, emotion, smiley_width, smiley_height, smiley_order) VALUES (':???:', 'icon_e_confused.gif', '{L_SMILIES_CONFUSED}', 15, 17, 19); +INSERT INTO phpbb_smilies (code, smiley_url, emotion, smiley_width, smiley_height, smiley_order) VALUES ('8-)', 'icon_cool.gif', '{L_SMILIES_COOL}', 15, 15, 20); +INSERT INTO phpbb_smilies (code, smiley_url, emotion, smiley_width, smiley_height, smiley_order) VALUES (':cool:', 'icon_cool.gif', '{L_SMILIES_COOL}', 15, 15, 21); +INSERT INTO phpbb_smilies (code, smiley_url, emotion, smiley_width, smiley_height, smiley_order) VALUES (':lol:', 'icon_lol.gif', '{L_SMILIES_LAUGHING}', 15, 15, 22); +INSERT INTO phpbb_smilies (code, smiley_url, emotion, smiley_width, smiley_height, smiley_order) VALUES (':x', 'icon_mad.gif', '{L_SMILIES_MAD}', 15, 15, 23); +INSERT INTO phpbb_smilies (code, smiley_url, emotion, smiley_width, smiley_height, smiley_order) VALUES (':-x', 'icon_mad.gif', '{L_SMILIES_MAD}', 15, 15, 24); +INSERT INTO phpbb_smilies (code, smiley_url, emotion, smiley_width, smiley_height, smiley_order) VALUES (':mad:', 'icon_mad.gif', '{L_SMILIES_MAD}', 15, 15, 25); +INSERT INTO phpbb_smilies (code, smiley_url, emotion, smiley_width, smiley_height, smiley_order) VALUES (':P', 'icon_razz.gif', '{L_SMILIES_RAZZ}', 15, 15, 26); +INSERT INTO phpbb_smilies (code, smiley_url, emotion, smiley_width, smiley_height, smiley_order) VALUES (':-P', 'icon_razz.gif', '{L_SMILIES_RAZZ}', 15, 15, 27); +INSERT INTO phpbb_smilies (code, smiley_url, emotion, smiley_width, smiley_height, smiley_order) VALUES (':razz:', 'icon_razz.gif', '{L_SMILIES_RAZZ}', 15, 15, 28); +INSERT INTO phpbb_smilies (code, smiley_url, emotion, smiley_width, smiley_height, smiley_order) VALUES (':oops:', 'icon_redface.gif', '{L_SMILIES_EMARRASSED}', 15, 15, 29); +INSERT INTO phpbb_smilies (code, smiley_url, emotion, smiley_width, smiley_height, smiley_order) VALUES (':cry:', 'icon_cry.gif', '{L_SMILIES_CRYING}', 15, 15, 30); +INSERT INTO phpbb_smilies (code, smiley_url, emotion, smiley_width, smiley_height, smiley_order) VALUES (':evil:', 'icon_evil.gif', '{L_SMILIES_EVIL}', 15, 15, 31); +INSERT INTO phpbb_smilies (code, smiley_url, emotion, smiley_width, smiley_height, smiley_order) VALUES (':twisted:', 'icon_twisted.gif', '{L_SMILIES_TWISTED_EVIL}', 15, 15, 32); +INSERT INTO phpbb_smilies (code, smiley_url, emotion, smiley_width, smiley_height, smiley_order) VALUES (':roll:', 'icon_rolleyes.gif', '{L_SMILIES_ROLLING_EYES}', 15, 15, 33); +INSERT INTO phpbb_smilies (code, smiley_url, emotion, smiley_width, smiley_height, smiley_order) VALUES (':!:', 'icon_exclaim.gif', '{L_SMILIES_EXCLAMATION}', 15, 15, 34); +INSERT INTO phpbb_smilies (code, smiley_url, emotion, smiley_width, smiley_height, smiley_order) VALUES (':?:', 'icon_question.gif', '{L_SMILIES_QUESTION}', 15, 15, 35); +INSERT INTO phpbb_smilies (code, smiley_url, emotion, smiley_width, smiley_height, smiley_order) VALUES (':idea:', 'icon_idea.gif', '{L_SMILIES_IDEA}', 15, 15, 36); +INSERT INTO phpbb_smilies (code, smiley_url, emotion, smiley_width, smiley_height, smiley_order) VALUES (':arrow:', 'icon_arrow.gif', '{L_SMILIES_ARROW}', 15, 15, 37); +INSERT INTO phpbb_smilies (code, smiley_url, emotion, smiley_width, smiley_height, smiley_order) VALUES (':|', 'icon_neutral.gif', '{L_SMILIES_NEUTRAL}', 15, 15, 38); +INSERT INTO phpbb_smilies (code, smiley_url, emotion, smiley_width, smiley_height, smiley_order) VALUES (':-|', 'icon_neutral.gif', '{L_SMILIES_NEUTRAL}', 15, 15, 39); +INSERT INTO phpbb_smilies (code, smiley_url, emotion, smiley_width, smiley_height, smiley_order) VALUES (':mrgreen:', 'icon_mrgreen.gif', '{L_SMILIES_MR_GREEN}', 15, 15, 40); +INSERT INTO phpbb_smilies (code, smiley_url, emotion, smiley_width, smiley_height, smiley_order) VALUES (':geek:', 'icon_e_geek.gif', '{L_SMILIES_GEEK}', 17, 17, 41); +INSERT INTO phpbb_smilies (code, smiley_url, emotion, smiley_width, smiley_height, smiley_order) VALUES (':ugeek:', 'icon_e_ugeek.gif', '{L_SMILIES_UBER_GEEK}', 19, 18, 42); +# -- icons +INSERT INTO phpbb_icons (icons_url, icons_width, icons_height, icons_order, display_on_posting) VALUES ('misc/fire.gif', 16, 16, 1, 1); +INSERT INTO phpbb_icons (icons_url, icons_width, icons_height, icons_order, display_on_posting) VALUES ('smile/redface.gif', 16, 16, 9, 1); +INSERT INTO phpbb_icons (icons_url, icons_width, icons_height, icons_order, display_on_posting) VALUES ('smile/mrgreen.gif', 16, 16, 10, 1); +INSERT INTO phpbb_icons (icons_url, icons_width, icons_height, icons_order, display_on_posting) VALUES ('misc/heart.gif', 16, 16, 4, 1); +INSERT INTO phpbb_icons (icons_url, icons_width, icons_height, icons_order, display_on_posting) VALUES ('misc/star.gif', 16, 16, 2, 1); +INSERT INTO phpbb_icons (icons_url, icons_width, icons_height, icons_order, display_on_posting) VALUES ('misc/radioactive.gif', 16, 16, 3, 1); +INSERT INTO phpbb_icons (icons_url, icons_width, icons_height, icons_order, display_on_posting) VALUES ('misc/thinking.gif', 16, 16, 5, 1); +INSERT INTO phpbb_icons (icons_url, icons_width, icons_height, icons_order, display_on_posting) VALUES ('smile/info.gif', 16, 16, 8, 1); +INSERT INTO phpbb_icons (icons_url, icons_width, icons_height, icons_order, display_on_posting) VALUES ('smile/question.gif', 16, 16, 6, 1); +INSERT INTO phpbb_icons (icons_url, icons_width, icons_height, icons_order, display_on_posting) VALUES ('smile/alert.gif', 16, 16, 7, 1); -# -- icons ... these are just some of those in CVS -INSERT INTO phpbb_icons (icons_url, icons_width, icons_height, icons_order, display_on_posting) VALUES ('misc/arrow_bold_rgt.gif', 19, 19, 1, 1); -INSERT INTO phpbb_icons (icons_url, icons_width, icons_height, icons_order, display_on_posting) VALUES ('smile/redface_anim.gif', 19, 19, 9, 1); -INSERT INTO phpbb_icons (icons_url, icons_width, icons_height, icons_order, display_on_posting) VALUES ('smile/mr_green.gif', 19, 19, 10, 1); -INSERT INTO phpbb_icons (icons_url, icons_width, icons_height, icons_order, display_on_posting) VALUES ('misc/musical.gif', 19, 19, 4, 1); -INSERT INTO phpbb_icons (icons_url, icons_width, icons_height, icons_order, display_on_posting) VALUES ('misc/asterix.gif', 19, 19, 2, 1); -INSERT INTO phpbb_icons (icons_url, icons_width, icons_height, icons_order, display_on_posting) VALUES ('misc/square.gif', 19, 19, 3, 1); -INSERT INTO phpbb_icons (icons_url, icons_width, icons_height, icons_order, display_on_posting) VALUES ('smile/alien_grn.gif', 19, 19, 5, 1); -INSERT INTO phpbb_icons (icons_url, icons_width, icons_height, icons_order, display_on_posting) VALUES ('smile/idea.gif', 19, 19, 8, 1); -INSERT INTO phpbb_icons (icons_url, icons_width, icons_height, icons_order, display_on_posting) VALUES ('smile/question.gif', 19, 19, 6, 1); -INSERT INTO phpbb_icons (icons_url, icons_width, icons_height, icons_order, display_on_posting) VALUES ('smile/exclaim.gif', 19, 19, 7, 1); - - -# -- wordlist -INSERT INTO phpbb_search_wordlist (word_text, word_common) VALUES ('this', 0); -INSERT INTO phpbb_search_wordlist (word_text, word_common) VALUES ('example', 0); -INSERT INTO phpbb_search_wordlist (word_text, word_common) VALUES ('post', 0); -INSERT INTO phpbb_search_wordlist (word_text, word_common) VALUES ('your', 0); -INSERT INTO phpbb_search_wordlist (word_text, word_common) VALUES ('phpbb', 0); -INSERT INTO phpbb_search_wordlist (word_text, word_common) VALUES ('installation', 0); -INSERT INTO phpbb_search_wordlist (word_text, word_common) VALUES ('you', 0); -INSERT INTO phpbb_search_wordlist (word_text, word_common) VALUES ('may', 0); -INSERT INTO phpbb_search_wordlist (word_text, word_common) VALUES ('delete', 0); -INSERT INTO phpbb_search_wordlist (word_text, word_common) VALUES ('topic', 0); -INSERT INTO phpbb_search_wordlist (word_text, word_common) VALUES ('and', 0); -INSERT INTO phpbb_search_wordlist (word_text, word_common) VALUES ('even', 0); -INSERT INTO phpbb_search_wordlist (word_text, word_common) VALUES ('forum', 0); -INSERT INTO phpbb_search_wordlist (word_text, word_common) VALUES ('like', 0); -INSERT INTO phpbb_search_wordlist (word_text, word_common) VALUES ('since', 0); -INSERT INTO phpbb_search_wordlist (word_text, word_common) VALUES ('everything', 0); -INSERT INTO phpbb_search_wordlist (word_text, word_common) VALUES ('seems', 0); -INSERT INTO phpbb_search_wordlist (word_text, word_common) VALUES ('working', 0); -INSERT INTO phpbb_search_wordlist (word_text, word_common) VALUES ('welcome', 0); - -# -- wordmatch -INSERT INTO phpbb_search_wordmatch (word_id, post_id, title_match) VALUES (1, 1, 0); -INSERT INTO phpbb_search_wordmatch (word_id, post_id, title_match) VALUES (2, 1, 0); -INSERT INTO phpbb_search_wordmatch (word_id, post_id, title_match) VALUES (3, 1, 0); -INSERT INTO phpbb_search_wordmatch (word_id, post_id, title_match) VALUES (4, 1, 0); -INSERT INTO phpbb_search_wordmatch (word_id, post_id, title_match) VALUES (5, 1, 0); -INSERT INTO phpbb_search_wordmatch (word_id, post_id, title_match) VALUES (6, 1, 0); -INSERT INTO phpbb_search_wordmatch (word_id, post_id, title_match) VALUES (7, 1, 0); -INSERT INTO phpbb_search_wordmatch (word_id, post_id, title_match) VALUES (8, 1, 0); -INSERT INTO phpbb_search_wordmatch (word_id, post_id, title_match) VALUES (9, 1, 0); -INSERT INTO phpbb_search_wordmatch (word_id, post_id, title_match) VALUES (10, 1, 0); -INSERT INTO phpbb_search_wordmatch (word_id, post_id, title_match) VALUES (11, 1, 0); -INSERT INTO phpbb_search_wordmatch (word_id, post_id, title_match) VALUES (12, 1, 0); -INSERT INTO phpbb_search_wordmatch (word_id, post_id, title_match) VALUES (13, 1, 0); -INSERT INTO phpbb_search_wordmatch (word_id, post_id, title_match) VALUES (14, 1, 0); -INSERT INTO phpbb_search_wordmatch (word_id, post_id, title_match) VALUES (15, 1, 0); -INSERT INTO phpbb_search_wordmatch (word_id, post_id, title_match) VALUES (16, 1, 0); -INSERT INTO phpbb_search_wordmatch (word_id, post_id, title_match) VALUES (17, 1, 0); -INSERT INTO phpbb_search_wordmatch (word_id, post_id, title_match) VALUES (18, 1, 0); -INSERT INTO phpbb_search_wordmatch (word_id, post_id, title_match) VALUES (5, 1, 1); -INSERT INTO phpbb_search_wordmatch (word_id, post_id, title_match) VALUES (19, 1, 1); - - -# -- reasons +# -- reasons - the report_description here is not used, only to fill up the db. ;) INSERT INTO phpbb_reports_reasons (reason_title, reason_description, reason_order) VALUES ('warez', 'The reported post contains links to pirated or illegal software', 1); INSERT INTO phpbb_reports_reasons (reason_title, reason_description, reason_order) VALUES ('spam', 'The reported post has for only purpose to advertise for a website or another product', 2); INSERT INTO phpbb_reports_reasons (reason_title, reason_description, reason_order) VALUES ('off_topic', 'The reported post is off topic', 3); INSERT INTO phpbb_reports_reasons (reason_title, reason_description, reason_order) VALUES ('other', 'The reported post does not fit into any other category (please use the description field)', 4); # -- extension_groups -INSERT INTO phpbb_extension_groups (group_name, cat_id, allow_group, download_mode, upload_icon, max_filesize, allowed_forums) VALUES ('Images', 1, 1, 1, '', 0, ''); -INSERT INTO phpbb_extension_groups (group_name, cat_id, allow_group, download_mode, upload_icon, max_filesize, allowed_forums) VALUES ('Archives', 0, 1, 1, '', 0, ''); -INSERT INTO phpbb_extension_groups (group_name, cat_id, allow_group, download_mode, upload_icon, max_filesize, allowed_forums) VALUES ('Plain Text', 0, 0, 1, '', 0, ''); -INSERT INTO phpbb_extension_groups (group_name, cat_id, allow_group, download_mode, upload_icon, max_filesize, allowed_forums) VALUES ('Documents', 0, 0, 1, '', 0, ''); -INSERT INTO phpbb_extension_groups (group_name, cat_id, allow_group, download_mode, upload_icon, max_filesize, allowed_forums) VALUES ('Real Media', 3, 0, 1, '', 0, ''); -INSERT INTO phpbb_extension_groups (group_name, cat_id, allow_group, download_mode, upload_icon, max_filesize, allowed_forums) VALUES ('Windows Media', 2, 0, 1, '', 0, ''); -INSERT INTO phpbb_extension_groups (group_name, cat_id, allow_group, download_mode, upload_icon, max_filesize, allowed_forums) VALUES ('Flash Files', 5, 0, 1, '', 0, ''); -INSERT INTO phpbb_extension_groups (group_name, cat_id, allow_group, download_mode, upload_icon, max_filesize, allowed_forums) VALUES ('Quicktime Media', 6, 0, 1, '', 0, ''); -INSERT INTO phpbb_extension_groups (group_name, cat_id, allow_group, download_mode, upload_icon, max_filesize, allowed_forums) VALUES ('Downloadable Files', 0, 0, 1, '', 0, ''); +INSERT INTO phpbb_extension_groups (group_name, cat_id, allow_group, download_mode, upload_icon, max_filesize, allowed_forums) VALUES ('{L_EXT_GROUP_IMAGES}', 1, 1, 1, '', 0, ''); +INSERT INTO phpbb_extension_groups (group_name, cat_id, allow_group, download_mode, upload_icon, max_filesize, allowed_forums) VALUES ('{L_EXT_GROUP_ARCHIVES}', 0, 1, 1, '', 0, ''); +INSERT INTO phpbb_extension_groups (group_name, cat_id, allow_group, download_mode, upload_icon, max_filesize, allowed_forums) VALUES ('{L_EXT_GROUP_PLAIN_TEXT}', 0, 0, 1, '', 0, ''); +INSERT INTO phpbb_extension_groups (group_name, cat_id, allow_group, download_mode, upload_icon, max_filesize, allowed_forums) VALUES ('{L_EXT_GROUP_DOCUMENTS}', 0, 0, 1, '', 0, ''); +INSERT INTO phpbb_extension_groups (group_name, cat_id, allow_group, download_mode, upload_icon, max_filesize, allowed_forums) VALUES ('{L_EXT_GROUP_REAL_MEDIA}', 3, 0, 1, '', 0, ''); +INSERT INTO phpbb_extension_groups (group_name, cat_id, allow_group, download_mode, upload_icon, max_filesize, allowed_forums) VALUES ('{L_EXT_GROUP_WINDOWS_MEDIA}', 2, 0, 1, '', 0, ''); +INSERT INTO phpbb_extension_groups (group_name, cat_id, allow_group, download_mode, upload_icon, max_filesize, allowed_forums) VALUES ('{L_EXT_GROUP_FLASH_FILES}', 5, 0, 1, '', 0, ''); +INSERT INTO phpbb_extension_groups (group_name, cat_id, allow_group, download_mode, upload_icon, max_filesize, allowed_forums) VALUES ('{L_EXT_GROUP_QUICKTIME_MEDIA}', 6, 0, 1, '', 0, ''); +INSERT INTO phpbb_extension_groups (group_name, cat_id, allow_group, download_mode, upload_icon, max_filesize, allowed_forums) VALUES ('{L_EXT_GROUP_DOWNLOADABLE_FILES}', 0, 0, 1, '', 0, ''); # -- extensions INSERT INTO phpbb_extensions (group_id, extension) VALUES (1, 'gif'); diff --git a/phpBB/install/schemas/sqlite_schema.sql b/phpBB/install/schemas/sqlite_schema.sql index 93e916a234..9f48115874 100644 --- a/phpBB/install/schemas/sqlite_schema.sql +++ b/phpBB/install/schemas/sqlite_schema.sql @@ -1,6 +1,4 @@ # -# SQLite Schema for phpBB 3.x - (c) phpBB Group, 2005 -# # $Id$ # @@ -42,6 +40,7 @@ CREATE TABLE phpbb_acl_groups ( CREATE INDEX phpbb_acl_groups_group_id ON phpbb_acl_groups (group_id); CREATE INDEX phpbb_acl_groups_auth_opt_id ON phpbb_acl_groups (auth_option_id); +CREATE INDEX phpbb_acl_groups_auth_role_id ON phpbb_acl_groups (auth_role_id); # Table: 'phpbb_acl_options' CREATE TABLE phpbb_acl_options ( @@ -74,6 +73,7 @@ CREATE TABLE phpbb_acl_roles_data ( PRIMARY KEY (role_id, auth_option_id) ); +CREATE INDEX phpbb_acl_roles_data_ath_opt_id ON phpbb_acl_roles_data (auth_option_id); # Table: 'phpbb_acl_users' CREATE TABLE phpbb_acl_users ( @@ -86,6 +86,7 @@ CREATE TABLE phpbb_acl_users ( CREATE INDEX phpbb_acl_users_user_id ON phpbb_acl_users (user_id); CREATE INDEX phpbb_acl_users_auth_option_id ON phpbb_acl_users (auth_option_id); +CREATE INDEX phpbb_acl_users_auth_role_id ON phpbb_acl_users (auth_role_id); # Table: 'phpbb_banlist' CREATE TABLE phpbb_banlist ( @@ -126,11 +127,9 @@ CREATE INDEX phpbb_bbcodes_display_on_post ON phpbb_bbcodes (display_on_posting) CREATE TABLE phpbb_bookmarks ( topic_id INTEGER UNSIGNED NOT NULL DEFAULT '0', user_id INTEGER UNSIGNED NOT NULL DEFAULT '0', - order_id INTEGER UNSIGNED NOT NULL DEFAULT '0' + PRIMARY KEY (topic_id, user_id) ); -CREATE INDEX phpbb_bookmarks_order_id ON phpbb_bookmarks (order_id); -CREATE INDEX phpbb_bookmarks_topic_user_id ON phpbb_bookmarks (topic_id, user_id); # Table: 'phpbb_bots' CREATE TABLE phpbb_bots ( @@ -616,10 +615,12 @@ CREATE TABLE phpbb_search_results ( CREATE TABLE phpbb_search_wordlist ( word_id INTEGER PRIMARY KEY NOT NULL , word_text varchar(255) NOT NULL DEFAULT '', - word_common INTEGER UNSIGNED NOT NULL DEFAULT '0' + word_common INTEGER UNSIGNED NOT NULL DEFAULT '0', + word_count INTEGER UNSIGNED NOT NULL DEFAULT '0' ); CREATE UNIQUE INDEX phpbb_search_wordlist_wrd_txt ON phpbb_search_wordlist (word_text); +CREATE INDEX phpbb_search_wordlist_wrd_cnt ON phpbb_search_wordlist (word_count); # Table: 'phpbb_search_wordmatch' CREATE TABLE phpbb_search_wordmatch ( @@ -628,6 +629,7 @@ CREATE TABLE phpbb_search_wordmatch ( title_match INTEGER UNSIGNED NOT NULL DEFAULT '0' ); +CREATE UNIQUE INDEX phpbb_search_wordmatch_unq_mtch ON phpbb_search_wordmatch (word_id, post_id, title_match); CREATE INDEX phpbb_search_wordmatch_word_id ON phpbb_search_wordmatch (word_id); CREATE INDEX phpbb_search_wordmatch_post_id ON phpbb_search_wordmatch (post_id); @@ -743,105 +745,24 @@ CREATE TABLE phpbb_styles_imageset ( imageset_id INTEGER PRIMARY KEY NOT NULL , imageset_name varchar(255) NOT NULL DEFAULT '', imageset_copyright varchar(255) NOT NULL DEFAULT '', - imageset_path varchar(100) NOT NULL DEFAULT '', - site_logo varchar(200) NOT NULL DEFAULT '', - upload_bar varchar(200) NOT NULL DEFAULT '', - poll_left varchar(200) NOT NULL DEFAULT '', - poll_center varchar(200) NOT NULL DEFAULT '', - poll_right varchar(200) NOT NULL DEFAULT '', - icon_friend varchar(200) NOT NULL DEFAULT '', - icon_foe varchar(200) NOT NULL DEFAULT '', - forum_link varchar(200) NOT NULL DEFAULT '', - forum_read varchar(200) NOT NULL DEFAULT '', - forum_read_locked varchar(200) NOT NULL DEFAULT '', - forum_read_subforum varchar(200) NOT NULL DEFAULT '', - forum_unread varchar(200) NOT NULL DEFAULT '', - forum_unread_locked varchar(200) NOT NULL DEFAULT '', - forum_unread_subforum varchar(200) NOT NULL DEFAULT '', - topic_moved varchar(200) NOT NULL DEFAULT '', - topic_read varchar(200) NOT NULL DEFAULT '', - topic_read_mine varchar(200) NOT NULL DEFAULT '', - topic_read_hot varchar(200) NOT NULL DEFAULT '', - topic_read_hot_mine varchar(200) NOT NULL DEFAULT '', - topic_read_locked varchar(200) NOT NULL DEFAULT '', - topic_read_locked_mine varchar(200) NOT NULL DEFAULT '', - topic_unread varchar(200) NOT NULL DEFAULT '', - topic_unread_mine varchar(200) NOT NULL DEFAULT '', - topic_unread_hot varchar(200) NOT NULL DEFAULT '', - topic_unread_hot_mine varchar(200) NOT NULL DEFAULT '', - topic_unread_locked varchar(200) NOT NULL DEFAULT '', - topic_unread_locked_mine varchar(200) NOT NULL DEFAULT '', - sticky_read varchar(200) NOT NULL DEFAULT '', - sticky_read_mine varchar(200) NOT NULL DEFAULT '', - sticky_read_locked varchar(200) NOT NULL DEFAULT '', - sticky_read_locked_mine varchar(200) NOT NULL DEFAULT '', - sticky_unread varchar(200) NOT NULL DEFAULT '', - sticky_unread_mine varchar(200) NOT NULL DEFAULT '', - sticky_unread_locked varchar(200) NOT NULL DEFAULT '', - sticky_unread_locked_mine varchar(200) NOT NULL DEFAULT '', - announce_read varchar(200) NOT NULL DEFAULT '', - announce_read_mine varchar(200) NOT NULL DEFAULT '', - announce_read_locked varchar(200) NOT NULL DEFAULT '', - announce_read_locked_mine varchar(200) NOT NULL DEFAULT '', - announce_unread varchar(200) NOT NULL DEFAULT '', - announce_unread_mine varchar(200) NOT NULL DEFAULT '', - announce_unread_locked varchar(200) NOT NULL DEFAULT '', - announce_unread_locked_mine varchar(200) NOT NULL DEFAULT '', - global_read varchar(200) NOT NULL DEFAULT '', - global_read_mine varchar(200) NOT NULL DEFAULT '', - global_read_locked varchar(200) NOT NULL DEFAULT '', - global_read_locked_mine varchar(200) NOT NULL DEFAULT '', - global_unread varchar(200) NOT NULL DEFAULT '', - global_unread_mine varchar(200) NOT NULL DEFAULT '', - global_unread_locked varchar(200) NOT NULL DEFAULT '', - global_unread_locked_mine varchar(200) NOT NULL DEFAULT '', - pm_read varchar(200) NOT NULL DEFAULT '', - pm_unread varchar(200) NOT NULL DEFAULT '', - icon_contact_aim varchar(200) NOT NULL DEFAULT '', - icon_contact_email varchar(200) NOT NULL DEFAULT '', - icon_contact_icq varchar(200) NOT NULL DEFAULT '', - icon_contact_jabber varchar(200) NOT NULL DEFAULT '', - icon_contact_msnm varchar(200) NOT NULL DEFAULT '', - icon_contact_pm varchar(200) NOT NULL DEFAULT '', - icon_contact_yahoo varchar(200) NOT NULL DEFAULT '', - icon_contact_www varchar(200) NOT NULL DEFAULT '', - icon_post_delete varchar(200) NOT NULL DEFAULT '', - icon_post_edit varchar(200) NOT NULL DEFAULT '', - icon_post_info varchar(200) NOT NULL DEFAULT '', - icon_post_quote varchar(200) NOT NULL DEFAULT '', - icon_post_report varchar(200) NOT NULL DEFAULT '', - icon_post_target varchar(200) NOT NULL DEFAULT '', - icon_post_target_unread varchar(200) NOT NULL DEFAULT '', - icon_topic_attach varchar(200) NOT NULL DEFAULT '', - icon_topic_latest varchar(200) NOT NULL DEFAULT '', - icon_topic_newest varchar(200) NOT NULL DEFAULT '', - icon_topic_reported varchar(200) NOT NULL DEFAULT '', - icon_topic_unapproved varchar(200) NOT NULL DEFAULT '', - icon_user_online varchar(200) NOT NULL DEFAULT '', - icon_user_offline varchar(200) NOT NULL DEFAULT '', - icon_user_profile varchar(200) NOT NULL DEFAULT '', - icon_user_search varchar(200) NOT NULL DEFAULT '', - icon_user_warn varchar(200) NOT NULL DEFAULT '', - button_pm_forward varchar(200) NOT NULL DEFAULT '', - button_pm_new varchar(200) NOT NULL DEFAULT '', - button_pm_reply varchar(200) NOT NULL DEFAULT '', - button_topic_locked varchar(200) NOT NULL DEFAULT '', - button_topic_new varchar(200) NOT NULL DEFAULT '', - button_topic_reply varchar(200) NOT NULL DEFAULT '', - user_icon1 varchar(200) NOT NULL DEFAULT '', - user_icon2 varchar(200) NOT NULL DEFAULT '', - user_icon3 varchar(200) NOT NULL DEFAULT '', - user_icon4 varchar(200) NOT NULL DEFAULT '', - user_icon5 varchar(200) NOT NULL DEFAULT '', - user_icon6 varchar(200) NOT NULL DEFAULT '', - user_icon7 varchar(200) NOT NULL DEFAULT '', - user_icon8 varchar(200) NOT NULL DEFAULT '', - user_icon9 varchar(200) NOT NULL DEFAULT '', - user_icon10 varchar(200) NOT NULL DEFAULT '' + imageset_path varchar(100) NOT NULL DEFAULT '' ); CREATE UNIQUE INDEX phpbb_styles_imageset_imgset_nm ON phpbb_styles_imageset (imageset_name); +# Table: 'phpbb_styles_imageset_data' +CREATE TABLE phpbb_styles_imageset_data ( + image_id INTEGER PRIMARY KEY NOT NULL , + image_name varchar(200) NOT NULL DEFAULT '', + image_filename varchar(200) NOT NULL DEFAULT '', + image_lang varchar(30) NOT NULL DEFAULT '', + image_height INTEGER UNSIGNED NOT NULL DEFAULT '0', + image_width INTEGER UNSIGNED NOT NULL DEFAULT '0', + imageset_id tinyint(4) NOT NULL DEFAULT '0' +); + +CREATE INDEX phpbb_styles_imageset_data_i_id ON phpbb_styles_imageset_data (imageset_id); + # Table: 'phpbb_topics' CREATE TABLE phpbb_topics ( topic_id INTEGER PRIMARY KEY NOT NULL , @@ -884,6 +805,7 @@ CREATE INDEX phpbb_topics_forum_id ON phpbb_topics (forum_id); CREATE INDEX phpbb_topics_forum_id_type ON phpbb_topics (forum_id, topic_type); CREATE INDEX phpbb_topics_last_post_time ON phpbb_topics (topic_last_post_time); CREATE INDEX phpbb_topics_topic_approved ON phpbb_topics (topic_approved); +CREATE INDEX phpbb_topics_forum_appr_last ON phpbb_topics (forum_id, topic_approved, topic_last_post_id); CREATE INDEX phpbb_topics_fid_time_moved ON phpbb_topics (forum_id, topic_last_post_time, topic_moved_id); # Table: 'phpbb_topics_track' @@ -1008,7 +930,7 @@ CREATE TABLE phpbb_users ( CREATE INDEX phpbb_users_user_birthday ON phpbb_users (user_birthday); CREATE INDEX phpbb_users_user_email_hash ON phpbb_users (user_email_hash); CREATE INDEX phpbb_users_user_type ON phpbb_users (user_type); -CREATE INDEX phpbb_users_username_clean ON phpbb_users (username_clean); +CREATE UNIQUE INDEX phpbb_users_username_clean ON phpbb_users (username_clean); # Table: 'phpbb_warnings' CREATE TABLE phpbb_warnings ( diff --git a/phpBB/language/en/acp/attachments.php b/phpBB/language/en/acp/attachments.php index 121069a6f8..b9a352960a 100644 --- a/phpBB/language/en/acp/attachments.php +++ b/phpBB/language/en/acp/attachments.php @@ -33,13 +33,14 @@ if (empty($lang) || !is_array($lang)) $lang = array_merge($lang, array( 'ACP_ATTACHMENT_SETTINGS_EXPLAIN' => 'Here you can configure the main settings for attachments and the associated special categories.', 'ACP_EXTENSION_GROUPS_EXPLAIN' => 'Here you can add, delete, modify or disable your extension groups. Further options include the assignment of a special category to them, changing the download mechanism and defining an upload icon which will be displayed in front of the attachment which belongs to the group.', - 'ACP_MANAGE_EXTENSIONS_EXPLAIN' => 'Here you can manage your allowed extensions. To activate your extensions, please refer to the extension groups management panel. We strongly recommend not to allow scripting extensions (such as php, php3, php4, phtml, pl, cgi, py, rb, asp, aspx, and so forth…)', - 'ACP_ORPHAN_ATTACHMENTS_EXPLAIN' => 'Here you are able to see files within the attachments upload directory but not assigned to posts. This happens mostly if users are attaching files but not submitting the post. You are able to delete the files or attach them to existing posts. Attaching to posts requires a valid post ID, you have to determine this id by yourself, this feature is mainly for those people wanting to upload files with another program and assigning those (mostly large) files to an existing post.', + 'ACP_MANAGE_EXTENSIONS_EXPLAIN' => 'Here you can manage your allowed extensions. To activate your extensions, please refer to the extension groups management panel. We strongly recommend not to allow scripting extensions (such as php, php3, php4, phtml, pl, cgi, py, rb, asp, aspx, and so forth…).', + 'ACP_ORPHAN_ATTACHMENTS_EXPLAIN' => 'Here you are able to see orphaned files. This happens mostly if users are attaching files but not submitting the post. You are able to delete the files or attach them to existing posts. Attaching to posts requires a valid post ID, you have to determine this ID by yourself. This will assign the already uploaded attachment to the post you entered.', 'ADD_EXTENSION' => 'Add extension', 'ADD_EXTENSION_GROUP' => 'Add extension group', - 'ADMIN_UPLOAD_ERROR' => 'Errors while trying to attach file: %s', + 'ADMIN_UPLOAD_ERROR' => 'Errors while trying to attach file: “%sâ€.', 'ALLOWED_FORUMS' => 'Allowed forums', - 'ALLOWED_FORUMS_EXPLAIN' => 'Able to post the assigned extensions at the selected (or all if selected) forums', + 'ALLOWED_FORUMS_EXPLAIN' => 'Able to post the assigned extensions at the selected (or all if selected) forums.', + 'ALLOWED_IN_PM_POST' => 'Allowed', 'ALLOW_ATTACHMENTS' => 'Allow attachments', 'ALLOW_ALL_FORUMS' => 'Allow all forums', 'ALLOW_IN_PM' => 'Allowed in private messaging', @@ -49,9 +50,10 @@ $lang = array_merge($lang, array( 'ASSIGNED_GROUP' => 'Assigned extension group', 'ATTACH_EXTENSIONS_URL' => 'Extensions', 'ATTACH_EXT_GROUPS_URL' => 'Extension groups', - 'ATTACH_MAX_FILESIZE' => 'Maximum filesize', + 'ATTACH_ID' => 'ID', + 'ATTACH_MAX_FILESIZE' => 'Maximum file size', 'ATTACH_MAX_FILESIZE_EXPLAIN' => 'Maximum size of each file, with 0 being unlimited.', - 'ATTACH_MAX_PM_FILESIZE' => 'Maximum filesize messaging', + 'ATTACH_MAX_PM_FILESIZE' => 'Maximum file size messaging', 'ATTACH_MAX_PM_FILESIZE_EXPLAIN' => 'Maximum drive space available per user for private message attachments, with 0 being unlimited.', 'ATTACH_ORPHAN_URL' => 'Orphan attachments', 'ATTACH_POST_ID' => 'Post ID', @@ -70,7 +72,7 @@ $lang = array_merge($lang, array( 'DEFINE_ALLOWED_IPS' => 'Define allowed IPs/hostnames', 'DEFINE_DISALLOWED_IPS' => 'Define disallowed IPs/hostnames', - 'DOWNLOAD_ADD_IPS_EXPLAIN' => 'To specify several different IPs or hostnames enter each on a new line. To specify a range of IP addresses separate the start and end with a hyphen (-), to specify a wildcard use *', + 'DOWNLOAD_ADD_IPS_EXPLAIN' => 'To specify several different IPs or hostnames enter each on a new line. To specify a range of IP addresses separate the start and end with a hyphen (-), to specify a wildcard use “*â€.', 'DOWNLOAD_REMOVE_IPS_EXPLAIN' => 'You can remove (or un-exclude) multiple IP addresses in one go using the appropriate combination of mouse and keyboard for your computer and browser. Excluded IPs have a blue background.', 'DISPLAY_INLINED' => 'Display images inline', 'DISPLAY_INLINED_EXPLAIN' => 'If set to No image attachments will show as a link.', @@ -81,12 +83,12 @@ $lang = array_merge($lang, array( 'EXCLUDE_ENTERED_IP' => 'Enable this to exclude the entered IP/hostname.', 'EXCLUDE_FROM_ALLOWED_IP' => 'Exclude IP from allowed IPs/hostnames', 'EXCLUDE_FROM_DISALLOWED_IP' => 'Exclude IP from disallowed IPs/hostnames', - 'EXTENSIONS_UPDATED' => 'Extensions successfully updated', - 'EXTENSION_EXIST' => 'The extension %s already exist', + 'EXTENSIONS_UPDATED' => 'Extensions successfully updated.', + 'EXTENSION_EXIST' => 'The extension %s already exists.', 'EXTENSION_GROUP' => 'Extension group', 'EXTENSION_GROUPS' => 'Extension groups', 'EXTENSION_GROUP_DELETED' => 'Extension group successfully deleted.', - 'EXTENSION_GROUP_EXIST' => 'The extension group %s already exist', + 'EXTENSION_GROUP_EXIST' => 'The extension group %s already exists.', 'GO_TO_EXTENSIONS' => 'Go to extension management screen', 'GROUP_NAME' => 'Group name', @@ -94,28 +96,29 @@ $lang = array_merge($lang, array( 'IMAGE_LINK_SIZE' => 'Image link dimensions', 'IMAGE_LINK_SIZE_EXPLAIN' => 'Display image attachment as an inline text link if image is larger than this. To disable this behaviour, set the values to 0px by 0px.', 'IMAGICK_PATH' => 'Imagemagick path', - 'IMAGICK_PATH_EXPLAIN' => 'Full path to the imagemagick convert application, e.g. /usr/bin/', + 'IMAGICK_PATH_EXPLAIN' => 'Full path to the imagemagick convert application, e.g. /usr/bin/.', 'MAX_ATTACHMENTS' => 'Max attachments per post', 'MAX_ATTACHMENTS_PM' => 'Max attachments per message', - 'MAX_EXTGROUP_FILESIZE' => 'Maximum filesize', + 'MAX_EXTGROUP_FILESIZE' => 'Maximum file size', 'MAX_IMAGE_SIZE' => 'Maximum image dimensions', 'MAX_IMAGE_SIZE_EXPLAIN' => 'Maximum size of image attachments. Set both values to 0px by 0px to disable dimension checking.', 'MAX_THUMB_WIDTH' => 'Maximum thumbnail width in pixel', - 'MAX_THUMB_WIDTH_EXPLAIN' => 'A generated thumbnail will not exceed the width set here', - 'MIN_THUMB_FILESIZE' => 'Minimum thumbnail filesize', + 'MAX_THUMB_WIDTH_EXPLAIN' => 'A generated thumbnail will not exceed the width set here.', + 'MIN_THUMB_FILESIZE' => 'Minimum thumbnail file size', 'MIN_THUMB_FILESIZE_EXPLAIN' => 'Do not create a thumbnail for images smaller than this.', 'MODE_INLINE' => 'Inline', 'MODE_PHYSICAL' => 'Physical', - 'NOT_ALLOWED_IN_PM' => 'Not allowed in private messages', + 'NOT_ALLOWED_IN_PM' => 'Only allowed in posts', + 'NOT_ALLOWED_IN_PM_POST' => 'Not allowed', 'NOT_ASSIGNED' => 'Not assigned', 'NO_EXT_GROUP' => 'None', 'NO_EXT_GROUP_NAME' => 'No group name entered', 'NO_EXT_GROUP_SPECIFIED' => 'No extension group specified.', 'NO_FILE_CAT' => 'None', 'NO_IMAGE' => 'No image', - 'NO_THUMBNAIL_SUPPORT' => 'Thumbnail support has been disabled because there is no supported GD library available and the imagemagick executable could not be found.', + 'NO_THUMBNAIL_SUPPORT' => 'Thumbnail support has been disabled. For proper functionality either the GD extension need to be available or imagemagick being installed. Both were not found.', 'NO_UPLOAD_DIR' => 'The upload directory you specified does not exist.', 'NO_WRITE_UPLOAD' => 'The upload directory you specified cannot be written to. Please alter the permissions to allow the webserver to write to it.', @@ -128,7 +131,7 @@ $lang = array_merge($lang, array( 'SEARCH_IMAGICK' => 'Search for Imagemagick', 'SECURE_ALLOW_DENY' => 'Allow/Deny list', - 'SECURE_ALLOW_DENY_EXPLAIN' => 'Change the default behaviour when secure downloads are enabled of the Allow/Deny list to that of a whitelist (Allow) or a blacklist (Deny)', + 'SECURE_ALLOW_DENY_EXPLAIN' => 'Change the default behaviour when secure downloads are enabled of the Allow/Deny list to that of a whitelist (Allow) or a blacklist (Deny).', 'SECURE_DOWNLOADS' => 'Enable secure downloads', 'SECURE_DOWNLOADS_EXPLAIN' => 'With this option enabled, downloads are limited to IP’s/hostnames you define.', 'SECURE_DOWNLOAD_NOTICE' => 'Secure Downloads are not enabled. The settings below will be applied after enabling secure downloads.', @@ -138,15 +141,15 @@ $lang = array_merge($lang, array( 'SETTINGS_CAT_IMAGES' => 'Image category settings', 'SPECIAL_CATEGORY' => 'Special category', 'SPECIAL_CATEGORY_EXPLAIN' => 'Special categories differ between the way presented within posts.', - 'SUCCESSFULLY_UPLOADED' => 'Successfully uploaded', - 'SUCCESS_EXTENSION_GROUP_ADD' => 'Extension group successfully added', - 'SUCCESS_EXTENSION_GROUP_EDIT' => 'Extension group successfully updated', + 'SUCCESSFULLY_UPLOADED' => 'Successfully uploaded.', + 'SUCCESS_EXTENSION_GROUP_ADD' => 'Extension group successfully added.', + 'SUCCESS_EXTENSION_GROUP_EDIT' => 'Extension group successfully updated.', 'UPLOADING_FILES' => 'Uploading files', 'UPLOADING_FILE_TO' => 'Uploading file “%1$s†to post number %2$d…', - 'UPLOAD_DENIED_FORUM' => 'You do not have the permission to upload files to forum “%sâ€', + 'UPLOAD_DENIED_FORUM' => 'You do not have the permission to upload files to forum “%sâ€.', 'UPLOAD_DIR' => 'Upload directory', - 'UPLOAD_DIR_EXPLAIN' => 'Storage path for attachments.', + 'UPLOAD_DIR_EXPLAIN' => 'Storage path for attachments. Please note that if you change this directory while already having uploaded attachments you need to manually copy the files to their new location.', 'UPLOAD_ICON' => 'Upload icon', 'UPLOAD_NOT_DIR' => 'The upload location you specified does not appear to be a directory.', )); diff --git a/phpBB/language/en/acp/ban.php b/phpBB/language/en/acp/ban.php index dd21ee8ad0..7e48c19b65 100644 --- a/phpBB/language/en/acp/ban.php +++ b/phpBB/language/en/acp/ban.php @@ -36,7 +36,7 @@ $lang = array_merge($lang, array( '30_MINS' => '30 minutes', '6_HOURS' => '6 hours', - 'ACP_BAN_EXPLAIN' => 'Here you can control the banning of users by name, IP or email address. These methods prevent a user reaching any part of the board. You can give a short (255 character) reason for the ban if you wish. This will be displayed in the admin log. The length of a ban can also be specified. If you want the ban to end on a specific date rather than after a set time period select Until for the ban length and enter a date in yyyy-mm-dd format.', + 'ACP_BAN_EXPLAIN' => 'Here you can control the banning of users by name, IP or e-mail address. These methods prevent a user reaching any part of the board. You can give a short (maximum 3000 characters) reason for the ban if you wish. This will be displayed in the admin log. The duration of a ban can also be specified. If you want the ban to end on a specific date rather than after a set time period select Until -> for the ban length and enter a date in YYYY-MM-DD format.', 'BAN_EXCLUDE' => 'Exclude from banning', 'BAN_LENGTH' => 'Length of ban', @@ -44,30 +44,34 @@ $lang = array_merge($lang, array( 'BAN_GIVE_REASON' => 'Reason shown to the banned', 'BAN_UPDATE_SUCCESSFUL' => 'The banlist has been updated successfully.', - 'EMAIL_BAN' => 'Ban one or more email addresses', - 'EMAIL_BAN_EXCLUDE_EXPLAIN' => 'Enable this to exclude the entered email address from all current bans.', - 'EMAIL_BAN_EXPLAIN' => 'To specify more than one email address enter each on a new line. To match partial addresses use * as the wildcard, e.g. *@hotmail.com, *@*.domain.tld, etc.', - 'EMAIL_NO_BANNED' => 'No banned email addresses', - 'EMAIL_UNBAN' => 'Un-ban or un-exclude emails', - 'EMAIL_UNBAN_EXPLAIN' => 'You can unban (or un-exclude) multiple email addresses in one go using the appropriate combination of mouse and keyboard for your computer and browser. Excluded email addresses have a marked background.', + 'EMAIL_BAN' => 'Ban one or more e-mail addresses', + 'EMAIL_BAN_EXCLUDE_EXPLAIN' => 'Enable this to exclude the entered e-mail address from all current bans.', + 'EMAIL_BAN_EXPLAIN' => 'To specify more than one e-mail address enter each on a new line. To match partial addresses use * as the wildcard, e.g. *@hotmail.com, *@*.domain.tld, etc.', + 'EMAIL_NO_BANNED' => 'No banned e-mail addresses', + 'EMAIL_UNBAN' => 'Un-ban or un-exclude e-mails', + 'EMAIL_UNBAN_EXPLAIN' => 'You can unban (or un-exclude) multiple e-mail addresses in one go using the appropriate combination of mouse and keyboard for your computer and browser. Excluded e-mail addresses are emphasised.', 'IP_BAN' => 'Ban one or more IPs', 'IP_BAN_EXCLUDE_EXPLAIN' => 'Enable this to exclude the entered IP from all current bans.', - 'IP_BAN_EXPLAIN' => 'To specify several different IPs or hostnames enter each on a new line. To specify a range of IP addresses separate the start and end with a hyphen (-), to specify a wildcard use *', + 'IP_BAN_EXPLAIN' => 'To specify several different IPs or hostnames enter each on a new line. To specify a range of IP addresses separate the start and end with a hyphen (-), to specify a wildcard use “*â€.', 'IP_HOSTNAME' => 'IP addresses or hostnames', 'IP_NO_BANNED' => 'No banned IP addresses', 'IP_UNBAN' => 'Un-ban or un-exclude IPs', - 'IP_UNBAN_EXPLAIN' => 'You can unban (or un-exclude) multiple IP addresses in one go using the appropriate combination of mouse and keyboard for your computer and browser. Excluded IPs have a marked background.', + 'IP_UNBAN_EXPLAIN' => 'You can unban (or un-exclude) multiple IP addresses in one go using the appropriate combination of mouse and keyboard for your computer and browser. Excluded IPs are emphasised.', + + 'LENGTH_BAN_INVALID' => 'The date has to be formatted YYYY-MM-DD.', 'PERMANENT' => 'Permanent', 'UNTIL' => 'Until', 'USER_BAN' => 'Ban one or more usernames', 'USER_BAN_EXCLUDE_EXPLAIN' => 'Enable this to exclude the entered users from all current bans.', - 'USER_BAN_EXPLAIN' => 'You can ban multiple users in one go by entering each name on a new line. Use the Find a member facility to look up and add one or more users automatically.', + 'USER_BAN_EXPLAIN' => 'You can ban multiple users in one go by entering each name on a new line. Use the Find a member facility to look up and add one or more users automatically.', 'USER_NO_BANNED' => 'No banned usernames', 'USER_UNBAN' => 'Un-ban or un-exclude usernames', - 'USER_UNBAN_EXPLAIN' => 'You can unban (or un-exclude) multiple users in one go using the appropriate combination of mouse and keyboard for your computer and browser. Excluded users have a marked background.', + 'USER_UNBAN_EXPLAIN' => 'You can unban (or un-exclude) multiple users in one go using the appropriate combination of mouse and keyboard for your computer and browser. Excluded users are emphasised.', + + )); ?> \ No newline at end of file diff --git a/phpBB/language/en/acp/board.php b/phpBB/language/en/acp/board.php index 865a68d60b..32ef227377 100644 --- a/phpBB/language/en/acp/board.php +++ b/phpBB/language/en/acp/board.php @@ -32,8 +32,7 @@ if (empty($lang) || !is_array($lang)) // Board Settings $lang = array_merge($lang, array( - 'ACP_BOARD_SETTINGS_EXPLAIN' => 'Here you can determine the basic operation of your board, from the site name through user registration to private messaging.', - + 'ACP_BOARD_SETTINGS_EXPLAIN' => 'Here you can determine the basic operation of your board, give it a fitting name and description, and among other settings adjust the default values for timezone and language.', 'CUSTOM_DATEFORMAT' => 'Custom…', 'DEFAULT_DATE_FORMAT' => 'Date format', 'DEFAULT_DATE_FORMAT_EXPLAIN' => 'The date format is the same as the PHP date function.', @@ -43,22 +42,21 @@ $lang = array_merge($lang, array( 'DISABLE_BOARD_EXPLAIN' => 'This will make the board unavailable to users. You can also enter a short (255 character) message to display if you wish.', 'OVERRIDE_STYLE' => 'Override user style', 'OVERRIDE_STYLE_EXPLAIN' => 'Replaces user’s style with the default.', - 'RELATIVE_DAYS' => 'Relative days', 'SITE_DESC' => 'Site description', 'SITE_NAME' => 'Site name', - 'SYSTEM_DST' => 'Enable Daylight Savings Time', + 'SYSTEM_DST' => 'Enable Summer Time/DST', 'SYSTEM_TIMEZONE' => 'System timezone', 'WARNINGS_EXPIRE' => 'Warning duration', - 'WARNINGS_EXPIRE_EXPLAIN' => 'Number of days that will elapse before the warning will automatically expire from a user’s record', + 'WARNINGS_EXPIRE_EXPLAIN' => 'Number of days that will elapse before the warning will automatically expire from a user’s record.', )); // Board Features $lang = array_merge($lang, array( - 'ACP_BOARD_FEATURES_EXPLAIN' => 'Here you can enable/disable several board features', + 'ACP_BOARD_FEATURES_EXPLAIN' => 'Here you can enable/disable several board features.', 'ALLOW_ATTACHMENTS' => 'Allow attachments', 'ALLOW_BOOKMARKS' => 'Allow bookmarking topics', - 'ALLOW_BOOKMARKS_EXPLAIN' => 'User is able to store personal bookmarks', + 'ALLOW_BOOKMARKS_EXPLAIN' => 'User is able to store personal bookmarks.', 'ALLOW_BBCODE' => 'Allow BBCode', 'ALLOW_FORUM_NOTIFY' => 'Allow forum watching', 'ALLOW_NAME_CHANGE' => 'Allow username changes', @@ -80,27 +78,27 @@ $lang = array_merge($lang, array( // Avatar Settings $lang = array_merge($lang, array( - 'ACP_AVATAR_SETTINGS_EXPLAIN' => 'Avatars are generally small, unique images a user can associate with themselves. Depending on the style they are usually displayed below the username when viewing topics. Here you can determine how users can define their avatars. Please note that in order to upload avatars you need to have created the directory you name below and ensure it can be written to by the web server. Please also note that filesize limits are only imposed on uploaded avatars, they do not apply to remotely linked images.', + 'ACP_AVATAR_SETTINGS_EXPLAIN' => 'Avatars are generally small, unique images a user can associate with themselves. Depending on the style they are usually displayed below the username when viewing topics. Here you can determine how users can define their avatars. Please note that in order to upload avatars you need to have created the directory you name below and ensure it can be written to by the web server. Please also note that file size limits are only imposed on uploaded avatars, they do not apply to remotely linked images.', 'ALLOW_LOCAL' => 'Enable gallery avatars', 'ALLOW_REMOTE' => 'Enable remote avatars', - 'ALLOW_REMOTE_EXPLAIN' => 'Avatars linked to from another website', + 'ALLOW_REMOTE_EXPLAIN' => 'Avatars linked to from another website.', 'ALLOW_UPLOAD' => 'Enable avatar uploading', 'AVATAR_GALLERY_PATH' => 'Avatar gallery path', - 'AVATAR_GALLERY_PATH_EXPLAIN' => 'Path under your phpBB root directory for pre-loaded images, e.g. images/avatars/gallery', + 'AVATAR_GALLERY_PATH_EXPLAIN' => 'Path under your phpBB root directory for pre-loaded images, e.g. images/avatars/gallery.', 'AVATAR_STORAGE_PATH' => 'Avatar storage path', - 'AVATAR_STORAGE_PATH_EXPLAIN' => 'Path under your phpBB root directory, e.g. images/avatars/upload', + 'AVATAR_STORAGE_PATH_EXPLAIN' => 'Path under your phpBB root directory, e.g. images/avatars/upload.', 'MAX_AVATAR_SIZE' => 'Maximum avatar dimensions', - 'MAX_AVATAR_SIZE_EXPLAIN' => '(Height x Width in pixels)', + 'MAX_AVATAR_SIZE_EXPLAIN' => 'Height x Width in pixels.', 'MAX_FILESIZE' => 'Maximum avatar file size', - 'MAX_FILESIZE_EXPLAIN' => 'For uploaded avatar files', + 'MAX_FILESIZE_EXPLAIN' => 'For uploaded avatar files.', 'MIN_AVATAR_SIZE' => 'Minimum avatar dimensions', - 'MIN_AVATAR_SIZE_EXPLAIN' => '(Height x Width in pixels)', + 'MIN_AVATAR_SIZE_EXPLAIN' => 'Height x Width in pixels.', )); // Message Settings $lang = array_merge($lang, array( - 'ACP_MESSAGE_SETTINGS_EXPLAIN' => 'Here you can set all default settings for private messaging', + 'ACP_MESSAGE_SETTINGS_EXPLAIN' => 'Here you can set all default settings for private messaging.', 'ALLOW_BBCODE_PM' => 'Allow BBCode in private messages', 'ALLOW_FLASH_PM' => 'Allow use of [FLASH] BBCode tag', @@ -125,7 +123,7 @@ $lang = array_merge($lang, array( // Post Settings $lang = array_merge($lang, array( - 'ACP_POST_SETTINGS_EXPLAIN' => 'Here you can set all default settings for posting', + 'ACP_POST_SETTINGS_EXPLAIN' => 'Here you can set all default settings for posting.', 'ALLOW_POST_LINKS' => 'Allow links in posts/private messages', 'ALLOW_POST_LINKS_EXPLAIN' => 'If disallowed the [URL] BBCode tag and automatic/magic URLs are disabled.', @@ -134,13 +132,13 @@ $lang = array_merge($lang, array( 'CHAR_LIMIT' => 'Maximum characters per post', 'CHAR_LIMIT_EXPLAIN' => 'The number of characters allowed within a post. Set to 0 for unlimited characters.', 'DISPLAY_LAST_EDITED' => 'Display last edited time information', - 'DISPLAY_LAST_EDITED_EXPLAIN' => 'Choose if the last edited by information to be displayed on posts', + 'DISPLAY_LAST_EDITED_EXPLAIN' => 'Choose if the last edited by information to be displayed on posts.', 'EDIT_TIME' => 'Limit editing time', 'EDIT_TIME_EXPLAIN' => 'Limits the time available to edit a new post. Setting the value to 0 disables this behaviour.', 'FLOOD_INTERVAL' => 'Flood interval', 'FLOOD_INTERVAL_EXPLAIN' => 'Number of seconds a user must wait between posting new messages. To enable users to ignore this alter their permissions.', - 'HOT_THRESHOLD' => 'Hot topic threshold', - 'HOT_THRESHOLD_EXPLAIN' => 'Posts per topic threshold required for the hot topic annotation. Set to 0 to disable hot topics.', + 'HOT_THRESHOLD' => 'Popular topic threshold', + 'HOT_THRESHOLD_EXPLAIN' => 'Posts per topic threshold required for the popular topic annotation. Set to 0 to disable popular topics.', 'MAX_POLL_OPTIONS' => 'Maximum number of poll options', 'MAX_POST_FONT_SIZE' => 'Maximum font size per post', 'MAX_POST_FONT_SIZE_EXPLAIN' => 'Maximum font size allowed in a post. Set to 0 for unlimited font size.', @@ -161,7 +159,7 @@ $lang = array_merge($lang, array( // Signature Settings $lang = array_merge($lang, array( - 'ACP_SIGNATURE_SETTINGS_EXPLAIN' => 'Here you can set all default settings for signatures', + 'ACP_SIGNATURE_SETTINGS_EXPLAIN' => 'Here you can set all default settings for signatures.', 'MAX_SIG_FONT_SIZE' => 'Maximum signature font size', 'MAX_SIG_FONT_SIZE_EXPLAIN' => 'Maximum font size allowed in user signatures. Set to 0 for unlimited size.', @@ -179,7 +177,7 @@ $lang = array_merge($lang, array( // Registration Settings $lang = array_merge($lang, array( - 'ACP_REGISTER_SETTINGS_EXPLAIN' => 'Here you are able to define registration and profile related settings', + 'ACP_REGISTER_SETTINGS_EXPLAIN' => 'Here you are able to define registration and profile related settings.', 'ACC_ACTIVATION' => 'Account activation', 'ACC_ACTIVATION_EXPLAIN' => 'This determines whether users have immediate access to the board or if confirmation is required. You can also completely disable new registrations.', @@ -188,12 +186,12 @@ $lang = array_merge($lang, array( 'ACC_NONE' => 'None', 'ACC_USER' => 'User', // 'ACC_USER_ADMIN' => 'User + Admin', - 'ALLOW_EMAIL_REUSE' => 'Allow email address re-use', - 'ALLOW_EMAIL_REUSE_EXPLAIN' => 'Different users can register with the same email address.', + 'ALLOW_EMAIL_REUSE' => 'Allow e-mail address re-use', + 'ALLOW_EMAIL_REUSE_EXPLAIN' => 'Different users can register with the same e-mail address.', 'COPPA' => 'COPPA', 'COPPA_FAX' => 'COPPA fax number', 'COPPA_MAIL' => 'COPPA mailing address', - 'COPPA_MAIL_EXPLAIN' => 'This is the mailing address where parents will send COPPA registration forms', + 'COPPA_MAIL_EXPLAIN' => 'This is the mailing address where parents will send COPPA registration forms.', 'ENABLE_COPPA' => 'Enable COPPA', 'ENABLE_COPPA_EXPLAIN' => 'This requires users to declare whether they are 13 or over for compliance with the U.S. COPPA Act. If this is disabled the COPPA specific groups will no longer be displayed.', 'MAX_CHARS' => 'Max', @@ -210,23 +208,30 @@ $lang = array_merge($lang, array( 'USERNAME_LETTER_NUM_SPACERS' => 'Any letter, number, and spacer', 'USERNAME_CHARS' => 'Limit username chars', 'USERNAME_CHARS_ANY' => 'Any character', - 'USERNAME_CHARS_EXPLAIN' => 'Restrict type of characters that may be used in usernames, spacers are; space, -, +, _, [ and ]', + 'USERNAME_CHARS_EXPLAIN' => 'Restrict type of characters that may be used in usernames, spacers are: space, -, +, _, [ and ].', 'USERNAME_LENGTH' => 'Username length', 'USERNAME_LENGTH_EXPLAIN' => 'Minimum and maximum number of characters in usernames.', )); // Visual Confirmation Settings $lang = array_merge($lang, array( - 'ACP_VC_SETTINGS_EXPLAIN' => 'Here you are able to define visual confirmation defaults and captcha settings.', + 'ACP_VC_SETTINGS_EXPLAIN' => 'Here you are able to define visual confirmation defaults and CAPTCHA settings.', - 'CAPTCHA_GD' => 'GD CAPTCHA', - 'CAPTCHA_GD_NOISE' => 'GD CAPTCHA noise', - 'CAPTCHA_GD_EXPLAIN' => 'Use GD to make a more advanced CAPTCHA', - 'CAPTCHA_GD_NOISE_EXPLAIN' => 'Use noise to make the GD based CAPTCHA harder', - 'VISUAL_CONFIRM_POST' => 'Enable visual confirmation for guest postings', - 'VISUAL_CONFIRM_POST_EXPLAIN' => 'Requires anonymous users to enter a random code matching an image to help prevent mass postings.', - 'VISUAL_CONFIRM_REG' => 'Enable visual confirmation for registrations', - 'VISUAL_CONFIRM_REG_EXPLAIN' => 'Requires new users to enter a random code matching an image to help prevent mass registrations.', + 'CAPTCHA_GD' => 'GD CAPTCHA', + 'CAPTCHA_GD_FOREGROUND_NOISE' => 'GD CAPTCHA foreground noise', + 'CAPTCHA_GD_EXPLAIN' => 'Use GD to make a more advanced CAPTCHA.', + 'CAPTCHA_GD_FOREGROUND_NOISE_EXPLAIN' => 'Use foreground noise to make the GD based CAPTCHA harder.', + 'CAPTCHA_GD_X_GRID' => 'GD CAPTCHA background noise x-axis', + 'CAPTCHA_GD_X_GRID_EXPLAIN' => 'Use lower settings of this to make the GD based CAPTCHA harder. 0 will disable x-axis background noise.', + 'CAPTCHA_GD_Y_GRID' => 'GD CAPTCHA background noise y-axis', + 'CAPTCHA_GD_Y_GRID_EXPLAIN' => 'Use lower settings of this to make the GD based CAPTCHA harder. 0 will disable y-axis background noise.', + + 'CAPTCHA_PREVIEW_MSG' => 'Your changes to the visual confirmation setting were not saved. This is just a preview.', + 'CAPTCHA_PREVIEW_EXPLAIN' => 'The CAPTCHA as it will look like using the current settings. Use the preview button to refresh. Note that captchas are randomized and will differ from one view to the next.', + 'VISUAL_CONFIRM_POST' => 'Enable visual confirmation for guest postings', + 'VISUAL_CONFIRM_POST_EXPLAIN' => 'Requires anonymous users to enter a random code matching an image to help prevent mass postings.', + 'VISUAL_CONFIRM_REG' => 'Enable visual confirmation for registrations', + 'VISUAL_CONFIRM_REG_EXPLAIN' => 'Requires new users to enter a random code matching an image to help prevent mass registrations.', )); // Cookie Settings @@ -250,16 +255,16 @@ $lang = array_merge($lang, array( 'CUSTOM_PROFILE_FIELDS' => 'Custom profile fields', 'LIMIT_LOAD' => 'Limit system load', - 'LIMIT_LOAD_EXPLAIN' => 'If the system’s 1-minute load average exceeds this value the board will automatically go offline. A value of 1.0 equals ~100% utilisation of one processor. This only functions on UNIX based servers.', + 'LIMIT_LOAD_EXPLAIN' => 'If the system’s 1-minute load average exceeds this value the board will automatically go offline. A value of 1.0 equals ~100% utilisation of one processor. This only functions on UNIX based servers and where this information is accessible. The value here resets itself to 0 if phpBB was unable to get the load limit.', 'LIMIT_SESSIONS' => 'Limit sessions', 'LIMIT_SESSIONS_EXPLAIN' => 'If the number of sessions exceeds this value within a one minute period the board will go offline. Set to 0 for unlimited sessions.', 'LOAD_CPF_MEMBERLIST' => 'Allow styles to display custom profile fields in memberlist', 'LOAD_CPF_VIEWPROFILE' => 'Display custom profile fields in user profiles', - 'LOAD_CPF_VIEWTOPIC' => 'Display custom profile fields on viewtopic', + 'LOAD_CPF_VIEWTOPIC' => 'Display custom profile fields on topic pages', 'LOAD_USER_ACTIVITY' => 'Show user’s activity', 'LOAD_USER_ACTIVITY_EXPLAIN' => 'Displays active topic/forum in user profiles and user control panel. It is recommended to disable this on boards with more than one million posts.', - 'RECOMPILE_TEMPLATES' => 'Recompile stale templates', - 'RECOMPILE_TEMPLATES_EXPLAIN' => 'Check for updated template files on filesystem and recompile.', + 'RECOMPILE_STYLES' => 'Recompile stale style components', + 'RECOMPILE_STYLES_EXPLAIN' => 'Check for updated style components on filesystem and recompile.', 'YES_ANON_READ_MARKING' => 'Enable topic marking for guests', 'YES_ANON_READ_MARKING_EXPLAIN' => 'Stores read/unread status information for guests. If disabled posts are always read for guests.', 'YES_BIRTHDAYS' => 'Enable birthday listing', @@ -270,7 +275,7 @@ $lang = array_merge($lang, array( 'YES_ONLINE_GUESTS' => 'Enable online guest listings in viewonline', 'YES_ONLINE_GUESTS_EXPLAIN' => 'Allow display of guest user information in viewonline.', 'YES_ONLINE_TRACK' => 'Enable display of user online/offline information', - 'YES_ONLINE_TRACK_EXPLAIN' => 'Display online information for user in profiles and viewtopic.', + 'YES_ONLINE_TRACK_EXPLAIN' => 'Display online information for user in profiles and topic pages.', 'YES_POST_MARKING' => 'Enable dotted topics', 'YES_POST_MARKING_EXPLAIN' => 'Indicates whether user has posted to a topic.', 'YES_READ_MARKING' => 'Enable server-side topic marking', @@ -283,15 +288,15 @@ $lang = array_merge($lang, array( 'AUTH_METHOD' => 'Select an authentication method', - 'APACHE_SETUP_BEFORE_USE' => 'You have to setup apache authentication before you switch phpBB to this authentication method. Keep in mind that the username you use for apache authentication has to be the same as your phpBB username.', + 'APACHE_SETUP_BEFORE_USE' => 'You have to setup apache authentication before you switch phpBB to this authentication method. Keep in mind that the username you use for apache authentication has to be the same as your phpBB username. Apache authentication can only be used with mod_php (not with a CGI version) and safe_mode disabled.', 'LDAP_DN' => 'LDAP base dn', - 'LDAP_DN_EXPLAIN' => 'This is the Distinguished Name, locating the user information, e.g. o=My Company,c=US', - 'LDAP_EMAIL' => 'LDAP email attribute', - 'LDAP_EMAIL_EXPLAIN' => 'Set this to the name of your user entry email attribute (if one exists) in order to automatically set the email address for new users. Leaving this empty results in empty email address for users who log in for the first time.', + 'LDAP_DN_EXPLAIN' => 'This is the Distinguished Name, locating the user information, e.g. o=My Company,c=US.', + 'LDAP_EMAIL' => 'LDAP e-mail attribute', + 'LDAP_EMAIL_EXPLAIN' => 'Set this to the name of your user entry e-mail attribute (if one exists) in order to automatically set the e-mail address for new users. Leaving this empty results in empty e-mail address for users who log in for the first time.', 'LDAP_INCORRECT_USER_PASSWORD' => 'Binding to LDAP server failed with specified user/password.', - 'LDAP_NO_EMAIL' => 'The specified email attribute does not exist.', - 'LDAP_NO_IDENTITY' => 'Could not find a login identity for %s', + 'LDAP_NO_EMAIL' => 'The specified e-mail attribute does not exist.', + 'LDAP_NO_IDENTITY' => 'Could not find a login identity for %s.', 'LDAP_PASSWORD' => 'LDAP password', 'LDAP_PASSWORD_EXPLAIN' => 'Leave blank to use anonymous access. Else fill in the password for the above user. WARNING: This password will be stored as plain text in the database visible to everybody who can access your database.', 'LDAP_SERVER' => 'LDAP server name', @@ -304,34 +309,35 @@ $lang = array_merge($lang, array( // Server Settings $lang = array_merge($lang, array( - 'ACP_SERVER_SETTINGS_EXPLAIN' => 'Here you define server and domain dependant settings. Please ensure the data you enter is accurate, errors will result in emails containing incorrect information. When entering the domain name remember it does include http:// or other protocol term. Only alter the port number if you know your server uses a different value, port 80 is correct in most cases.', + 'ACP_SERVER_SETTINGS_EXPLAIN' => 'Here you define server and domain dependant settings. Please ensure the data you enter is accurate, errors will result in e-mails containing incorrect information. When entering the domain name remember it does include http:// or other protocol term. Only alter the port number if you know your server uses a different value, port 80 is correct in most cases.', 'ENABLE_GZIP' => 'Enable GZip compression', + 'ENABLE_GZIP_EXPLAIN' => 'Generated content will be compressed prior to sending it to the user. This can reduce network traffic but will also increase CPU usage on both server and client side.', 'FORCE_SERVER_VARS' => 'Force server URL settings', - 'FORCE_SERVER_VARS_EXPLAIN' => 'If set to yes the server settings defined here will be used in favour of the automatically determined values', + 'FORCE_SERVER_VARS_EXPLAIN' => 'If set to yes the server settings defined here will be used in favour of the automatically determined values.', 'ICONS_PATH' => 'Post icons storage path', - 'ICONS_PATH_EXPLAIN' => 'Path under your phpBB root directory, e.g. images/icons', + 'ICONS_PATH_EXPLAIN' => 'Path under your phpBB root directory, e.g. images/icons.', 'PATH_SETTINGS' => 'Path settings', 'RANKS_PATH' => 'Rank image storage path', - 'RANKS_PATH_EXPLAIN' => 'Path under your phpBB root directory, e.g. images/ranks', + 'RANKS_PATH_EXPLAIN' => 'Path under your phpBB root directory, e.g. images/ranks.', 'SCRIPT_PATH' => 'Script path', - 'SCRIPT_PATH_EXPLAIN' => 'The path where phpBB is located relative to the domain name, e.g. /phpBB3', + 'SCRIPT_PATH_EXPLAIN' => 'The path where phpBB is located relative to the domain name, e.g. /phpBB3.', 'SERVER_NAME' => 'Domain name', - 'SERVER_NAME_EXPLAIN' => 'The domain name this board runs from (for example: www.foo.bar)', + 'SERVER_NAME_EXPLAIN' => 'The domain name this board runs from (for example: www.foo.bar).', 'SERVER_PORT' => 'Server port', - 'SERVER_PORT_EXPLAIN' => 'The port your server is running on, usually 80, only change if different', + 'SERVER_PORT_EXPLAIN' => 'The port your server is running on, usually 80, only change if different.', 'SERVER_PROTOCOL' => 'Server protocol', - 'SERVER_PROTOCOL_EXPLAIN' => 'This is used as the server protocol if these settings are forced. If empty or not forced the protocol is determined by the cookie secure settings (http:// or https://)', + 'SERVER_PROTOCOL_EXPLAIN' => 'This is used as the server protocol if these settings are forced. If empty or not forced the protocol is determined by the cookie secure settings (http:// or https://).', 'SERVER_URL_SETTINGS' => 'Server URL settings', 'SMILIES_PATH' => 'Smilies storage path', - 'SMILIES_PATH_EXPLAIN' => 'Path under your phpBB root directory, e.g. images/smilies', + 'SMILIES_PATH_EXPLAIN' => 'Path under your phpBB root directory, e.g. images/smilies.', 'UPLOAD_ICONS_PATH' => 'Extension group icons storage path', - 'UPLOAD_ICONS_PATH_EXPLAIN' => 'Path under your phpBB root directory, e.g. images/upload_icons', + 'UPLOAD_ICONS_PATH_EXPLAIN' => 'Path under your phpBB root directory, e.g. images/upload_icons.', )); // Security Settings $lang = array_merge($lang, array( - 'ACP_SECURITY_SETTINGS_EXPLAIN' => 'Here you are able to define session and login related settings', + 'ACP_SECURITY_SETTINGS_EXPLAIN' => 'Here you are able to define session and login related settings.', 'ALL' => 'All', 'ALLOW_AUTOLOGIN' => 'Allow persistent logins', @@ -344,47 +350,47 @@ $lang = array_merge($lang, array( 'CHECK_DNSBL_EXPLAIN' => 'If enabled the user’s IP address is checked against the following DNSBL services on registration and posting: spamcop.net, dsbl.org and spamhaus.org. This lookup may take a while, depending on the server’s configuration. If slowdowns are experienced or too many false positives reported it is recommended to disable this check.', 'CLASS_B' => 'A.B', 'CLASS_C' => 'A.B.C', - 'EMAIL_CHECK_MX' => 'Check email domain for valid MX record', - 'EMAIL_CHECK_MX_EXPLAIN' => 'If enabled, the email domain provided on registration and profile changes is checked for a valid MX record.', + 'EMAIL_CHECK_MX' => 'Check e-mail domain for valid MX record', + 'EMAIL_CHECK_MX_EXPLAIN' => 'If enabled, the e-mail domain provided on registration and profile changes is checked for a valid MX record.', 'FORCE_PASS_CHANGE' => 'Force password change', 'FORCE_PASS_CHANGE_EXPLAIN' => 'Require user to change their password after a set number of days. Set this value to 0 disables this behaviour.', 'FORWARDED_FOR_VALID' => 'Validated X_FORWARDED_FOR header', 'FORWARDED_FOR_VALID_EXPLAIN' => 'Sessions will only be continued if the sent X_FORWARDED_FOR header equals the one sent with the previous request. Bans will be checked against IPs in X_FORWARDED_FOR too.', 'IP_VALID' => 'Session IP validation', - 'IP_VALID_EXPLAIN' => 'Determines how much of the users IP is used to validate a session; All compares the complete address, A.B.C the first x.x.x, A.B the first x.x, None disables checking.', + 'IP_VALID_EXPLAIN' => 'Determines how much of the users IP is used to validate a session; All compares the complete address, A.B.C the first x.x.x, A.B the first x.x, None disables checking. On IPv6 addresses A.B.C compares the first 4 blocks and A.B the first 3 blocks.', 'MAX_LOGIN_ATTEMPTS' => 'Maximum number of login attempts', - 'MAX_LOGIN_ATTEMPTS_EXPLAIN' => 'After this number of failed logins the user needs to additionally confirm his login visually (visual confirmation)', + 'MAX_LOGIN_ATTEMPTS_EXPLAIN' => 'After this number of failed logins the user needs to additionally confirm his login visually (visual confirmation).', 'NO_IP_VALIDATION' => 'None', 'PASSWORD_TYPE' => 'Password complexity', 'PASSWORD_TYPE_EXPLAIN' => 'Determines how complex a password needs to be when set or altered, subsequent options include the previous ones.', - 'PASS_TYPE_ALPHA' => 'Must contain alphanumerics', + 'PASS_TYPE_ALPHA' => 'Must contain letters and numbers', 'PASS_TYPE_ANY' => 'No requirements', 'PASS_TYPE_CASE' => 'Must be mixed case', 'PASS_TYPE_SYMBOL' => 'Must contain symbols', 'TPL_ALLOW_PHP' => 'Allow php in templates', - 'TPL_ALLOW_PHP_EXPLAIN' => 'If this option is enabled, PHP and INCLUDEPHP statements will be recognized and parsed in templates.', + 'TPL_ALLOW_PHP_EXPLAIN' => 'If this option is enabled, PHP and INCLUDEPHP statements will be recognised and parsed in templates.', )); // Email Settings $lang = array_merge($lang, array( - 'ACP_EMAIL_SETTINGS_EXPLAIN' => 'This information is used when the board sends emails to your users. Please ensure the email address you specify is valid, any bounced or undeliverable messages will likely be sent to that address. If your host does not provide a native (PHP based) email service you can instead send messages directly using SMTP. This requires the address of an appropriate server (ask your provider if necessary), do not specify any old name here! If the server requires authentication (and only if it does) enter the necessary username and password. Please note only basic authentication is offered, different authentication implementations are not currently supported.', + 'ACP_EMAIL_SETTINGS_EXPLAIN' => 'This information is used when the board sends e-mails to your users. Please ensure the e-mail address you specify is valid, any bounced or undeliverable messages will likely be sent to that address. If your host does not provide a native (PHP based) e-mail service you can instead send messages directly using SMTP. This requires the address of an appropriate server (ask your provider if necessary), do not specify any old name here! If the server requires authentication (and only if it does) enter the necessary username and password. Please note only basic authentication is offered, different authentication implementations are not currently supported.', - 'ADMIN_EMAIL' => 'Return email address', - 'ADMIN_EMAIL_EXPLAIN' => 'This will be used as the return address on all emails, the technical contact email address. It will always be used as the Return-Path and Sender address in emails.', - 'BOARD_EMAIL_FORM' => 'Users send email via board', - 'BOARD_EMAIL_FORM_EXPLAIN' => 'Instead of showing the users email address users are able to send emails via the board.', - 'BOARD_HIDE_EMAILS' => 'Hide email addresses', - 'BOARD_HIDE_EMAILS_EXPLAIN' => 'This function keeps email addresses completely private.', - 'CONTACT_EMAIL' => 'Contact email address', - 'CONTACT_EMAIL_EXPLAIN' => 'This address will be used whenever a specific contact point is needed, e.g. spam, error output, etc. It will always be used as the From and Reply-To address in emails.', - 'EMAIL_FUNCTION_NAME' => 'Email function name', - 'EMAIL_FUNCTION_NAME_EXPLAIN' => 'The email function used to send mails through PHP.', - 'EMAIL_PACKAGE_SIZE' => 'Email package size', - 'EMAIL_PACKAGE_SIZE_EXPLAIN' => 'This is the number of emails sent in one package.', - 'EMAIL_SIG' => 'Email signature', - 'EMAIL_SIG_EXPLAIN' => 'This text will be attached to all emails the board sends.', - 'ENABLE_EMAIL' => 'Enable board-wide emails', - 'ENABLE_EMAIL_EXPLAIN' => 'If this is set to disabled no emails will be sent by the board at all.', + 'ADMIN_EMAIL' => 'Return e-mail address', + 'ADMIN_EMAIL_EXPLAIN' => 'This will be used as the return address on all e-mails, the technical contact e-mail address. It will always be used as the Return-Path and Sender address in e-mails.', + 'BOARD_EMAIL_FORM' => 'Users send e-mail via board', + 'BOARD_EMAIL_FORM_EXPLAIN' => 'Instead of showing the users e-mail address users are able to send e-mails via the board.', + 'BOARD_HIDE_EMAILS' => 'Hide e-mail addresses', + 'BOARD_HIDE_EMAILS_EXPLAIN' => 'This function keeps e-mail addresses completely private.', + 'CONTACT_EMAIL' => 'Contact e-mail address', + 'CONTACT_EMAIL_EXPLAIN' => 'This address will be used whenever a specific contact point is needed, e.g. spam, error output, etc. It will always be used as the From and Reply-To address in e-mails.', + 'EMAIL_FUNCTION_NAME' => 'E-mail function name', + 'EMAIL_FUNCTION_NAME_EXPLAIN' => 'The e-mail function used to send mails through PHP.', + 'EMAIL_PACKAGE_SIZE' => 'E-mail package size', + 'EMAIL_PACKAGE_SIZE_EXPLAIN' => 'This is the number of e-mails sent in one package.', + 'EMAIL_SIG' => 'E-mail signature', + 'EMAIL_SIG_EXPLAIN' => 'This text will be attached to all e-mails the board sends.', + 'ENABLE_EMAIL' => 'Enable board-wide e-mails', + 'ENABLE_EMAIL_EXPLAIN' => 'If this is set to disabled no e-mails will be sent by the board at all.', 'SMTP_AUTH_METHOD' => 'Authentication method for SMTP', 'SMTP_AUTH_METHOD_EXPLAIN' => 'Only used if a username/password is set, ask your provider if you are unsure which method to use.', 'SMTP_CRAM_MD5' => 'CRAM-MD5', @@ -400,13 +406,13 @@ $lang = array_merge($lang, array( 'SMTP_SETTINGS' => 'SMTP settings', 'SMTP_USERNAME' => 'SMTP username', 'SMTP_USERNAME_EXPLAIN' => 'Only enter a username if your SMTP server requires it.', - 'USE_SMTP' => 'Use SMTP server for email', - 'USE_SMTP_EXPLAIN' => 'Select “Yes†if you want or have to send email via a named server instead of the local mail function.', + 'USE_SMTP' => 'Use SMTP server for e-mail', + 'USE_SMTP_EXPLAIN' => 'Select “Yes†if you want or have to send e-mail via a named server instead of the local mail function.', )); // Jabber settings $lang = array_merge($lang, array( - 'ACP_JABBER_SETTINGS_EXPLAIN' => 'Here you can enable and control the use Jabber for instant messaging and board notices. Jabber is an opensource protocol and therefore available for use by anyone. Some Jabber servers include gateways or transports which allow you to contact users on other networks. Not all servers offer all transports and changes in protocols can prevent transports from operating. Note that it may take several seconds to update Jabber account details, do not stop the script till completed!', + 'ACP_JABBER_SETTINGS_EXPLAIN' => 'Here you can enable and control the use of Jabber for instant messaging and board notifications. Jabber is an open source protocol and therefore available for use by anyone. Some Jabber servers include gateways or transports which allow you to contact users on other networks. Not all servers offer all transports and changes in protocols can prevent transports from operating. Note that it may take several seconds to update Jabber account details, so do not stop the script until it is completed!', 'ERR_JAB_AUTH' => 'Could not authorise on Jabber server.', 'ERR_JAB_CONNECT' => 'Could not connect to Jabber server.', @@ -417,18 +423,18 @@ $lang = array_merge($lang, array( 'JAB_CHANGED' => 'Jabber account changed successfully.', 'JAB_ENABLE' => 'Enable Jabber', - 'JAB_ENABLE_EXPLAIN' => 'Enables use of jabber messaging and notifications', + 'JAB_ENABLE_EXPLAIN' => 'Enables use of Jabber messaging and notifications.', 'JAB_PACKAGE_SIZE' => 'Jabber package size', 'JAB_PACKAGE_SIZE_EXPLAIN' => 'This is the number of messages sent in one package. If set to 0 the message is sent immediately and is not queued for later sending.', 'JAB_PASSWORD' => 'Jabber password', 'JAB_PASS_CHANGED' => 'Jabber password changed successfully.', 'JAB_PORT' => 'Jabber port', - 'JAB_PORT_EXPLAIN' => 'Leave blank unless you know it is not port 5222', + 'JAB_PORT_EXPLAIN' => 'Leave blank unless you know it is not port 5222.', 'JAB_REGISTERED' => 'New account registered successfully.', 'JAB_RESOURCE' => 'Jabber resource', 'JAB_RESOURCE_EXPLAIN' => 'The resource locates this particular connection, e.g. board, home, etc.', 'JAB_SERVER' => 'Jabber server', - 'JAB_SERVER_EXPLAIN' => 'See %sjabber.org%s for a list of servers', + 'JAB_SERVER_EXPLAIN' => 'See %sjabber.org%s for a list of servers.', 'JAB_SETTINGS_CHANGED' => 'Jabber settings changed successfully.', 'JAB_USERNAME' => 'Jabber username', 'JAB_USERNAME_EXPLAIN' => 'If this user is not registered it will be created if possible.', diff --git a/phpBB/language/en/acp/common.php b/phpBB/language/en/acp/common.php index a35e239a81..854dc198af 100644 --- a/phpBB/language/en/acp/common.php +++ b/phpBB/language/en/acp/common.php @@ -43,13 +43,11 @@ $lang = array_merge($lang, array( 'ACP_BACKUP' => 'Backup', 'ACP_BAN' => 'Banning', - 'ACP_BAN_EMAILS' => 'Ban emails', + 'ACP_BAN_EMAILS' => 'Ban e-mails', 'ACP_BAN_IPS' => 'Ban IPs', 'ACP_BAN_USERNAMES' => 'Ban usernames', - 'ACP_BASIC_PERMISSIONS' => 'Basic permissions', 'ACP_BBCODES' => 'BBCodes', 'ACP_BOARD_CONFIGURATION' => 'Board configuration', - 'ACP_BOARD_DEFAULTS' => 'Board defaults', 'ACP_BOARD_FEATURES' => 'Board features', 'ACP_BOARD_MANAGEMENT' => 'Board management', 'ACP_BOARD_SETTINGS' => 'Board settings', @@ -58,7 +56,7 @@ $lang = array_merge($lang, array( 'ACP_CAPTCHA' => 'CAPTCHA', 'ACP_CAT_DATABASE' => 'Database', - 'ACP_CAT_DOT_MODS' => '.Mods', + 'ACP_CAT_DOT_MODS' => '.MODs', 'ACP_CAT_FORUMS' => 'Forums', 'ACP_CAT_GENERAL' => 'General', 'ACP_CAT_MAINTENANCE' => 'Maintenance', @@ -77,7 +75,7 @@ $lang = array_merge($lang, array( 'ACP_DISALLOW' => 'Disallow', 'ACP_DISALLOW_USERNAMES' => 'Disallow usernames', - 'ACP_EMAIL_SETTINGS' => 'Email settings', + 'ACP_EMAIL_SETTINGS' => 'E-mail settings', 'ACP_EXTENSION_GROUPS' => 'Manage extension groups', 'ACP_FORUM_BASED_PERMISSIONS' => 'Forum based permissions', @@ -116,7 +114,7 @@ $lang = array_merge($lang, array( 'ACP_MANAGE_RANKS' => 'Manage ranks', 'ACP_MANAGE_REASONS' => 'Manage report/denial reasons', 'ACP_MANAGE_USERS' => 'Manage users', - 'ACP_MASS_EMAIL' => 'Mass email', + 'ACP_MASS_EMAIL' => 'Mass e-mail', 'ACP_MESSAGES' => 'Messages', 'ACP_MESSAGE_SETTINGS' => 'Private message settings', 'ACP_MODULE_MANAGEMENT' => 'Module management', @@ -128,7 +126,6 @@ $lang = array_merge($lang, array( 'ACP_PERMISSIONS' => 'Permissions', 'ACP_PERMISSION_MASKS' => 'Permission masks', 'ACP_PERMISSION_ROLES' => 'Permission roles', - 'ACP_PERMISSION_SETTINGS' => 'Permission settings', 'ACP_PERMISSION_TRACE' => 'Permission trace', 'ACP_PHP_INFO' => 'PHP information', 'ACP_POST_SETTINGS' => 'Post settings', @@ -153,7 +150,6 @@ $lang = array_merge($lang, array( 'ACP_SERVER_SETTINGS' => 'Server settings', 'ACP_SIGNATURE_SETTINGS' => 'Signature settings', 'ACP_SMILIES' => 'Smilies', - 'ACP_SPECIAL_PERMISSIONS' => 'Special permissions', 'ACP_STYLE_COMPONENTS' => 'Style components', 'ACP_STYLE_MANAGEMENT' => 'Style management', 'ACP_STYLES' => 'Styles', @@ -204,10 +200,9 @@ $lang = array_merge($lang, array( 'CONFIG_UPDATED' => 'Configuration updated successfully.', 'DEACTIVATE' => 'Deactivate', - 'DIMENSIONS' => 'Dimensions', - 'DIRECTORY_DOES_NOT_EXIST' => 'The entered path "%s" does not exist.', - 'DIRECTORY_NOT_DIR' => 'The entered path "%s" is not a directory.', - 'DIRECTORY_NOT_WRITEABLE' => 'The entered path "%s" is not writeable.', + 'DIRECTORY_DOES_NOT_EXIST' => 'The entered path “%s†does not exist.', + 'DIRECTORY_NOT_DIR' => 'The entered path “%s†is not a directory.', + 'DIRECTORY_NOT_WRITABLE' => 'The entered path “%s†is not writable.', 'DISABLE' => 'Disable', 'DOWNLOAD' => 'Download', 'DOWNLOAD_AS' => 'Download as', @@ -230,16 +225,19 @@ $lang = array_merge($lang, array( 'LOGGED_IN_AS' => 'You are logged in as:', 'LOGIN_ADMIN' => 'To administer the board you must be an authenticated user.', 'LOGIN_ADMIN_CONFIRM' => 'To administer the board you must re-authenticate yourself.', - 'LOGIN_ADMIN_SUCCESS' => 'You have successfully authenticated and will now be redirected to the Administration Control Panel', + 'LOGIN_ADMIN_SUCCESS' => 'You have successfully authenticated and will now be redirected to the Administration Control Panel.', 'LOOK_UP_FORUM' => 'Select a forum', + 'LOOK_UP_FORUMS_EXPLAIN'=> 'You are able to select more than one forum.', 'MANAGE' => 'Manage', + 'MENU_TOGGLE' => 'Hide or display the side menu', 'MOVE_DOWN' => 'Move down', 'MOVE_UP' => 'Move up', 'NOTIFY' => 'Notification', 'NO_ADMIN' => 'You are not authorised to administrate this board.', - 'NO_EMAILS_DEFINED' => 'No valid email addresses found', + 'NO_EMAILS_DEFINED' => 'No valid e-mail addresses found.', + 'NO_PASSWORD_SUPPLIED' => 'You need to enter your password to access the Administration Control Panel.', 'OFF' => 'Off', 'ON' => 'On', @@ -248,12 +246,11 @@ $lang = array_merge($lang, array( 'PARSE_SMILIES' => 'Parse smilies', 'PARSE_URLS' => 'Parse links', 'PERMISSIONS_TRANSFERRED' => 'Permissions transferred', - 'PERMISSIONS_TRANSFERRED_EXPLAIN' => 'You are currently having the permissions from %1$s. You are able to browse the forum with the users permissions but not access the administration control panel since admin permissions were not transferred. You are able to revert to your permission set at any time.', - 'PIXEL' => 'px', + 'PERMISSIONS_TRANSFERRED_EXPLAIN' => 'You currently have the permissions from %1$s. You are able to browse the board with this user’s permissions, but not access the administration control panel since admin permissions were not transferred. You can revert to your permission set at any time.', + 'PIXEL' => 'px', 'PROCEED_TO_ACP' => '%sProceed to the ACP%s', 'REMIND' => 'Remind', - 'REORDER' => 'Reorder', 'RESYNC' => 'Resynchronise', 'RETURN_TO' => 'Return to…', @@ -261,7 +258,7 @@ $lang = array_merge($lang, array( 'SELECT_OPTION' => 'Select option', 'UCP' => 'User Control Panel', - 'USERNAMES_EXPLAIN' => 'Place each username on a separate line', + 'USERNAMES_EXPLAIN' => 'Place each username on a separate line.', 'USER_CONTROL_PANEL' => 'User Control Panel', 'WARNING' => 'Warning', @@ -269,7 +266,7 @@ $lang = array_merge($lang, array( // PHP info $lang = array_merge($lang, array( - 'ACP_PHP_INFO_EXPLAIN' => 'This page lists information on the version of PHP installed on this server. It includes details of loaded modules, available variables and default settings. This information may be useful when diagnosing problems. Please be aware that some hosting companies will limit what information is displayed here for security reasons. You are advised to not give out any details on this page except when asked by official team members on the support forums.', + 'ACP_PHP_INFO_EXPLAIN' => 'This page lists information on the version of PHP installed on this server. It includes details of loaded modules, available variables and default settings. This information may be useful when diagnosing problems. Please be aware that some hosting companies will limit what information is displayed here for security reasons. You are advised to not give out any details on this page except when asked by official team members on the support forums.', 'NO_PHPINFO_AVAILABLE' => 'The PHP informations are unable to be determined. Phpinfo() has been disabled for security reasons.', )); @@ -277,14 +274,14 @@ $lang = array_merge($lang, array( // Logs $lang = array_merge($lang, array( 'ACP_ADMIN_LOGS_EXPLAIN' => 'This lists all the actions carried out by board administrators. You can sort by username, date, IP or action. If you have appropriate permissions you can also clear individual operations or the log as a whole.', - 'ACP_CRITICAL_LOGS_EXPLAIN' => 'This lists the actions carried out by the board itself. These log provides you with information you are able to use for solving specific problems, for example non-delivery of emails. You can sort by username, date, IP or action. If you have appropriate permissions you can also clear individual operations or the log as a whole.', - 'ACP_MOD_LOGS_EXPLAIN' => 'This lists the actions carried out by board moderators, select a forum from the drop down list. You can sort by username, date, IP or action. If you have appropriate permissions you can also clear individual operations or the log as a whole.', - 'ACP_USERS_LOGS_EXPLAIN' => 'This lists all actions carried out by users or on users.', + 'ACP_CRITICAL_LOGS_EXPLAIN' => 'This lists the actions carried out by the board itself. This log provides you with information you are able to use for solving specific problems, for example non-delivery of e-mails. You can sort by username, date, IP or action. If you have appropriate permissions you can also clear individual operations or the log as a whole.', + 'ACP_MOD_LOGS_EXPLAIN' => 'This lists all actions done on forums, topics and posts as well as actions carried out on users by moderators, including banning. You can sort by username, date, IP or action. If you have appropriate permissions you can also clear individual operations or the log as a whole.', + 'ACP_USERS_LOGS_EXPLAIN' => 'This lists all actions carried out by users or on users (reports, warnings and user notes).', 'ALL_ENTRIES' => 'All entries', 'DISPLAY_LOG' => 'Display entries from previous', - 'NO_ENTRIES' => 'No log entries for this period', + 'NO_ENTRIES' => 'No log entries for this period.', 'SORT_IP' => 'IP address', 'SORT_DATE' => 'Date', @@ -293,7 +290,7 @@ $lang = array_merge($lang, array( // Index page $lang = array_merge($lang, array( - 'ADMIN_INTRO' => 'Thank you for choosing phpBB as your forum solution. This screen will give you a quick overview of all the various statistics of your board. The links on the left hand side of this screen allow you to control every aspect of your forum experience. Each page will have instructions on how to use the tools.', + 'ADMIN_INTRO' => 'Thank you for choosing phpBB as your board solution. This screen will give you a quick overview of all the various statistics of your board. The links on the left hand side of this screen allow you to control every aspect of your board experience. Each page will have instructions on how to use the tools.', 'ADMIN_LOG' => 'Logged administrator actions', 'ADMIN_LOG_INDEX_EXPLAIN' => 'This gives an overview of the last five actions carried out by board administrators. A full copy of the log can be viewed from the appropriate menu item or following the link below.', 'AVATAR_DIR_SIZE' => 'Avatar directory size', @@ -304,7 +301,7 @@ $lang = array_merge($lang, array( 'DATABASE_SIZE' => 'Database size', 'FILES_PER_DAY' => 'Attachments per day', - 'FORUM_STATS' => 'Forum statistics', + 'FORUM_STATS' => 'Board statistics', 'GZIP_COMPRESSION' => 'GZip compression', @@ -317,13 +314,27 @@ $lang = array_merge($lang, array( 'POSTS_PER_DAY' => 'Posts per day', - 'RESET_DATE' => 'Reset date', - 'RESET_ONLINE' => 'Reset online', - 'RESYNC_POSTCOUNTS' => 'Resynchronise post counts', - 'RESYNC_POST_MARKING' => 'Resynchronise dotted topics', - 'RESYNC_STATS' => 'Resynchronise statistics', + 'PURGE_CACHE' => 'Purge the cache', + 'PURGE_CACHE_CONFIRM' => 'Are you sure you wish to purge the cache?', + 'PURGE_CACHE_EXPLAIN' => 'Purge all cache related items, this includes any cached template files or queries.', - 'STATISTIC' => 'Statistic', + 'RESET_DATE' => 'Reset board’s start date', + 'RESET_DATE_CONFIRM' => 'Are you sure you wish to reset the board’s start date?', + 'RESET_ONLINE' => 'Reset most users ever online', + 'RESET_ONLINE_CONFIRM' => 'Are you sure you wish to reset the most users ever online counter?', + 'RESYNC_POSTCOUNTS' => 'Resynchronise post counts', + 'RESYNC_POSTCOUNTS_EXPLAIN' => 'Only existing posts will be taken into consideration. Pruned posts will not be counted.', + 'RESYNC_POSTCOUNTS_CONFIRM' => 'Are you sure you wish to resynchronise post counts?', + 'RESYNC_POST_MARKING' => 'Resynchronise dotted topics', + 'RESYNC_POST_MARKING_CONFIRM' => 'Are you sure you wish to resynchronise dotted topics?', + 'RESYNC_POST_MARKING_EXPLAIN' => 'First unmarks all topics and then correctly marks topics that have seen any activity during the past six months.', + 'RESYNC_STATS' => 'Resynchronise statistics', + 'RESYNC_STATS_CONFIRM' => 'Are you sure you wish to resynchronise statistics?', + 'RESYNC_STATS_EXPLAIN' => 'Recalculates the total number of posts, topics, users and files.', + 'RUN' => 'Run now', + + 'STATISTIC' => 'Statistic', + 'STATISTIC_RESYNC_OPTIONS' => 'Resynchronise or reset statistics', 'TOPICS_PER_DAY' => 'Topics per day', @@ -347,8 +358,8 @@ $lang = array_merge($lang, array( 'INACTIVE_REASON_REMIND' => 'Forced user account reactivation', 'INACTIVE_REASON_UNKNOWN' => 'Unknown', 'INACTIVE_USERS' => 'Inactive users', - 'INACTIVE_USERS_EXPLAIN' => 'This is a list of users who have registered but whose accounts are inactive. You can activate, delete or remind (by sending an email) these users if you wish.', - 'INACTIVE_USERS_EXPLAIN_INDEX' => 'This is a list of the last 10 registered users who have inactive accounts. A full list is available from the appropriate menu item or by following the link below from where you can activate, delete or remind (by sending an email) these users if you wish.', + 'INACTIVE_USERS_EXPLAIN' => 'This is a list of users who have registered but whose accounts are inactive. You can activate, delete or remind (by sending an e-mail) these users if you wish.', + 'INACTIVE_USERS_EXPLAIN_INDEX' => 'This is a list of the last 10 registered users who have inactive accounts. A full list is available from the appropriate menu item or by following the link below from where you can activate, delete or remind (by sending an e-mail) these users if you wish.', 'NO_INACTIVE_USERS' => 'No inactive users', @@ -362,20 +373,20 @@ $lang = array_merge($lang, array( // Log Entries $lang = array_merge($lang, array( - 'LOG_ACL_ADD_USER_GLOBAL_U_' => 'Added or edited users user permissions
    » %s', - 'LOG_ACL_ADD_GROUP_GLOBAL_U_' => 'Added or edited groups user permissions
    » %s', - 'LOG_ACL_ADD_USER_GLOBAL_M_' => 'Added or edited users global moderator permissions
    » %s', - 'LOG_ACL_ADD_GROUP_GLOBAL_M_' => 'Added or edited groups global moderator permissions
    » %s', - 'LOG_ACL_ADD_USER_GLOBAL_A_' => 'Added or edited users administrator permissions
    » %s', - 'LOG_ACL_ADD_GROUP_GLOBAL_A_' => 'Added or edited groups administrator permissions
    » %s', + 'LOG_ACL_ADD_USER_GLOBAL_U_' => 'Added or edited users’ user permissions
    » %s', + 'LOG_ACL_ADD_GROUP_GLOBAL_U_' => 'Added or edited groups’ user permissions
    » %s', + 'LOG_ACL_ADD_USER_GLOBAL_M_' => 'Added or edited users’ global moderator permissions
    » %s', + 'LOG_ACL_ADD_GROUP_GLOBAL_M_' => 'Added or edited groups’ global moderator permissions
    » %s', + 'LOG_ACL_ADD_USER_GLOBAL_A_' => 'Added or edited users’ administrator permissions
    » %s', + 'LOG_ACL_ADD_GROUP_GLOBAL_A_' => 'Added or edited groups’ administrator permissions
    » %s', 'LOG_ACL_ADD_ADMIN_GLOBAL_A_' => 'Added or edited Administrators
    » %s', 'LOG_ACL_ADD_MOD_GLOBAL_M_' => 'Added or edited Global Moderators
    » %s', - 'LOG_ACL_ADD_USER_LOCAL_F_' => 'Added or edited users forum access from %1$s
    » %2$s', - 'LOG_ACL_ADD_USER_LOCAL_M_' => 'Added or edited users forum moderator access from %1$s
    » %2$s', - 'LOG_ACL_ADD_GROUP_LOCAL_F_' => 'Added or edited groups forum access from %1$s
    » %2$s', - 'LOG_ACL_ADD_GROUP_LOCAL_M_' => 'Added or edited groups forum moderator access from %1$s
    » %2$s', + 'LOG_ACL_ADD_USER_LOCAL_F_' => 'Added or edited users’ forum access from %1$s
    » %2$s', + 'LOG_ACL_ADD_USER_LOCAL_M_' => 'Added or edited users’ forum moderator access from %1$s
    » %2$s', + 'LOG_ACL_ADD_GROUP_LOCAL_F_' => 'Added or edited groups’ forum access from %1$s
    » %2$s', + 'LOG_ACL_ADD_GROUP_LOCAL_M_' => 'Added or edited groups’ forum moderator access from %1$s
    » %2$s', 'LOG_ACL_ADD_MOD_LOCAL_M_' => 'Added or edited Moderators from %1$s
    » %2$s', 'LOG_ACL_ADD_FORUM_LOCAL_F_' => 'Added or edited forum permissions from %1$s
    » %2$s', @@ -400,15 +411,15 @@ $lang = array_merge($lang, array( 'LOG_ATTACH_FILEUPLOAD' => 'Orphan File uploaded to Post
    » ID %1$d - %2$s', 'LOG_ATTACH_ORPHAN_DEL' => 'Orphan Files deleted
    » %s', - 'LOG_BAN_EXCLUDE_USER' => 'Excluded user from ban for reason "%1$s"
    » %2$s ', - 'LOG_BAN_EXCLUDE_IP' => 'Excluded IP from ban for reason "%1$s"
    » %2$s ', - 'LOG_BAN_EXCLUDE_EMAIL' => 'Excluded email from ban for reason "%1$s"
    » %2$s ', - 'LOG_BAN_USER' => 'Banned user for reason "%1$s"
    » %2$s ', - 'LOG_BAN_IP' => 'Banned IP for reason "%1$s"
    » %2$s', - 'LOG_BAN_EMAIL' => 'Banned email for reason "%1$s"
    » %2$s', + 'LOG_BAN_EXCLUDE_USER' => 'Excluded user from ban for reason “%1$sâ€
    » %2$s', + 'LOG_BAN_EXCLUDE_IP' => 'Excluded IP from ban for reason “%1$sâ€
    » %2$s', + 'LOG_BAN_EXCLUDE_EMAIL' => 'Excluded e-mail from ban for reason “%1$sâ€
    » %2$s', + 'LOG_BAN_USER' => 'Banned user for reason “%1$sâ€
    » %2$s', + 'LOG_BAN_IP' => 'Banned IP for reason “%1$sâ€
    » %2$s', + 'LOG_BAN_EMAIL' => 'Banned e-mail for reason “%1$sâ€
    » %2$s', 'LOG_UNBAN_USER' => 'Unbanned user
    » %s', 'LOG_UNBAN_IP' => 'Unbanned IP
    » %s', - 'LOG_UNBAN_EMAIL' => 'Unbanned email
    » %s', + 'LOG_UNBAN_EMAIL' => 'Unbanned e-mail
    » %s', 'LOG_BBCODE_ADD' => 'Added new BBCode
    » %s', 'LOG_BBCODE_EDIT' => 'Edited BBCode
    » %s', @@ -428,7 +439,7 @@ $lang = array_merge($lang, array( 'LOG_CONFIG_AUTH' => 'Altered authentication settings', 'LOG_CONFIG_AVATAR' => 'Altered avatar settings', 'LOG_CONFIG_COOKIE' => 'Altered cookie settings', - 'LOG_CONFIG_EMAIL' => 'Altered email settings', + 'LOG_CONFIG_EMAIL' => 'Altered e-mail settings', 'LOG_CONFIG_FEATURES' => 'Altered board features', 'LOG_CONFIG_LOAD' => 'Altered load settings', 'LOG_CONFIG_MESSAGE' => 'Altered private message settings', @@ -450,10 +461,17 @@ $lang = array_merge($lang, array( 'LOG_LOCK_POST' => 'Locked post
    » %s', 'LOG_MERGE' => 'Merged posts into topic
    » %s', 'LOG_MOVE' => 'Moved topic
    » from %s', + 'LOG_POST_APPROVED' => 'Approved post
    » %s', + 'LOG_POST_DISAPPROVED' => 'Disapproved post “%1$s†with the following reason
    » %2$s', + 'LOG_POST_EDITED' => 'Edited post “%1$s†written by
    » %2$s', + 'LOG_REPORT_CLOSED' => 'Closed report
    » %s', + 'LOG_REPORT_DELETED' => 'Deleted report
    » %s', 'LOG_SPLIT_DESTINATION' => 'Moved splitted posts
    » to %s', 'LOG_SPLIT_SOURCE' => 'Splitted posts
    » from %s', 'LOG_TOPIC_DELETED' => 'Deleted topic
    » %s', + 'LOG_TOPIC_APPROVED' => 'Approved topic
    » %s', + 'LOG_TOPIC_DISAPPROVED' => 'Disapproved topic “%1$s†with the following reason
    %2$s', 'LOG_TOPIC_RESYNC' => 'Resynchronised topic counters
    » %s', 'LOG_TOPIC_TYPE_CHANGED' => 'Changed topic type
    » %s', 'LOG_UNLOCK' => 'Unlocked topic
    » %s', @@ -463,14 +481,15 @@ $lang = array_merge($lang, array( 'LOG_DISALLOW_DELETE' => 'Deleted disallowed username', 'LOG_DB_BACKUP' => 'Database backup', - 'LOG_DB_RESTORE' => 'Database restore', + 'LOG_DB_DELETE' => 'Deleted database backup', + 'LOG_DB_RESTORE' => 'Restored database backup', 'LOG_DOWNLOAD_EXCLUDE_IP' => 'Excluded IP/hostname from download list
    » %s', 'LOG_DOWNLOAD_IP' => 'Added IP/hostname to download list
    » %s', 'LOG_DOWNLOAD_REMOVE_IP' => 'Removed IP/hostname from download list
    » %s', 'LOG_ERROR_JABBER' => 'Jabber error
    » %s', - 'LOG_ERROR_EMAIL' => 'Email error
    » %s', + 'LOG_ERROR_EMAIL' => 'E-mail error
    » %s', 'LOG_FORUM_ADD' => 'Created new forum
    » %s', 'LOG_FORUM_DEL_FORUM' => 'Deleted forum
    » %s', @@ -488,7 +507,7 @@ $lang = array_merge($lang, array( 'LOG_FORUM_SYNC' => 'Re-synchronised forum
    » %s', 'LOG_GROUP_CREATED' => 'New usergroup created
    » %s', - 'LOG_GROUP_DEFAULTS' => 'Group made default for members
    » %s', + 'LOG_GROUP_DEFAULTS' => 'Group “%1$s†made default for members
    » %2$s', 'LOG_GROUP_DELETE' => 'Usergroup deleted
    » %s', 'LOG_GROUP_DEMOTED' => 'Leaders demoted in usergroup %1$s
    » %2$s', 'LOG_GROUP_PROMOTED' => 'Members promoted to leader in usergroup %1$s
    » %2$s', @@ -498,21 +517,22 @@ $lang = array_merge($lang, array( 'LOG_USERS_APPROVED' => 'Users approved in usergroup %1$s
    » %2$s', 'LOG_USERS_ADDED' => 'Added new members to usergroup %1$s
    » %2$s', - 'LOG_IMAGESET_ADD_DB' => 'Added new imageset to database
    » %s', - 'LOG_IMAGESET_ADD_FS' => 'Add new imageset on filesystem
    » %s', - 'LOG_IMAGESET_DELETE' => 'Deleted imageset
    » %s', - 'LOG_IMAGESET_EDIT_DETAILS' => 'Edited imageset details
    » %s', - 'LOG_IMAGESET_EDIT' => 'Edited imageset
    » %s', - 'LOG_IMAGESET_EXPORT' => 'Exported imageset
    » %s', - 'LOG_IMAGESET_REFRESHED' => 'Refreshed imageset
    » %s', + 'LOG_IMAGESET_ADD_DB' => 'Added new imageset to database
    » %s', + 'LOG_IMAGESET_ADD_FS' => 'Add new imageset on filesystem
    » %s', + 'LOG_IMAGESET_DELETE' => 'Deleted imageset
    » %s', + 'LOG_IMAGESET_EDIT_DETAILS' => 'Edited imageset details
    » %s', + 'LOG_IMAGESET_EDIT' => 'Edited imageset
    » %s', + 'LOG_IMAGESET_EXPORT' => 'Exported imageset
    » %s', + 'LOG_IMAGESET_LANG_REFRESHED' => 'Refreshed “%2$s†localisation of imageset
    » %1$s', + 'LOG_IMAGESET_REFRESHED' => 'Refreshed imageset
    » %s', 'LOG_INACTIVE_ACTIVATE' => 'Activated inactive users
    » %s', 'LOG_INACTIVE_DELETE' => 'Deleted inactive users
    » %s', - 'LOG_INACTIVE_REMIND' => 'Sent reminder emails to inactive users
    » %s', + 'LOG_INACTIVE_REMIND' => 'Sent reminder e-mails to inactive users
    » %s', 'LOG_INSTALL_CONVERTED' => 'Converted from %1$s to phpBB %2$s', 'LOG_INSTALL_INSTALLED' => 'Installed phpBB %s', - 'LOG_IP_BROWSER_FORWARDED_CHECK' => 'Session IP/browser/X_FORWARDED_FOR check failed
    »User IP "%1$s" checked against session IP "%2$s", user browser string "%3$s" checked against session browser string "%4$s" and user X_FORWARDED_FOR string "%5$s" checked against session X_FORWARDED_FOR string "%6$s".', + 'LOG_IP_BROWSER_FORWARDED_CHECK' => 'Session IP/browser/X_FORWARDED_FOR check failed
    »User IP “%1$s†checked against session IP “%2$sâ€, user browser string “%3$s†checked against session browser string “%4$s†and user X_FORWARDED_FOR string “%5$s†checked against session X_FORWARDED_FOR string “%6$sâ€.', 'LOG_JAB_CHANGED' => 'Jabber account changed', 'LOG_JAB_PASSCHG' => 'Jabber password changed', @@ -523,15 +543,16 @@ $lang = array_merge($lang, array( 'LOG_LANGUAGE_PACK_INSTALLED' => 'Installed language pack
    » %s', 'LOG_LANGUAGE_PACK_UPDATED' => 'Updated language pack details
    » %s', 'LOG_LANGUAGE_FILE_REPLACED' => 'Replaced language file
    » %s', + 'LOG_LANGUAGE_FILE_SUBMITTED' => 'Submitted language file and placed in store folder
    » %s', - 'LOG_MASS_EMAIL' => 'Sent mass email
    » %s', + 'LOG_MASS_EMAIL' => 'Sent mass e-mail
    » %s', - 'LOG_MCP_CHANGE_POSTER' => 'Changed poster in topic "%1$s"
    » from %2$s to %3$s', + 'LOG_MCP_CHANGE_POSTER' => 'Changed poster in topic “%1$sâ€
    » from %2$s to %3$s', - 'LOG_MODULE_DISABLE' => 'Module disabled', - 'LOG_MODULE_ENABLE' => 'Module enabled', - 'LOG_MODULE_MOVE_DOWN' => 'Module moved down
    » %s', - 'LOG_MODULE_MOVE_UP' => 'Module moved up
    » %s', + 'LOG_MODULE_DISABLE' => 'Module disabled
    » %s', + 'LOG_MODULE_ENABLE' => 'Module enabled
    » %s', + 'LOG_MODULE_MOVE_DOWN' => 'Module moved down
    » %1$s below %2$s', + 'LOG_MODULE_MOVE_UP' => 'Module moved up
    » %1$s above %2$s', 'LOG_MODULE_REMOVED' => 'Module removed
    » %s', 'LOG_MODULE_ADD' => 'Module added
    » %s', 'LOG_MODULE_EDIT' => 'Module edited
    » %s', @@ -561,6 +582,8 @@ $lang = array_merge($lang, array( 'LOG_PRUNE_USER_DEL_DEL' => 'Users pruned and posts deleted
    » %s', 'LOG_PRUNE_USER_DEL_ANON' => 'Users pruned and posts retained
    » %s', + 'LOG_PURGE_CACHE' => 'Purged cache', + 'LOG_RANK_ADDED' => 'Added new rank
    » %s', 'LOG_RANK_REMOVED' => 'Removed rank
    » %s', 'LOG_RANK_UPDATED' => 'Updated rank
    » %s', @@ -575,6 +598,8 @@ $lang = array_merge($lang, array( 'LOG_RESYNC_POST_MARKING' => 'Dotted topics resynchronised', 'LOG_RESYNC_STATS' => 'Post, topic and user statistics resynchronised', + 'LOG_SEARCH_INDEX_CREATED' => 'Created search index for
    » %s', + 'LOG_SEARCH_INDEX_REMOVED' => 'Removed search index for
    » %s', 'LOG_STYLE_ADD' => 'Added new style
    » %s', 'LOG_STYLE_DELETE' => 'Deleted style
    » %s', 'LOG_STYLE_EDIT_DETAILS' => 'Edited style
    » %s', @@ -593,8 +618,8 @@ $lang = array_merge($lang, array( 'LOG_THEME_ADD_FS' => 'Add new theme on filesystem
    » %s', 'LOG_THEME_DELETE' => 'Theme deleted
    » %s', 'LOG_THEME_EDIT_DETAILS' => 'Edited theme details
    » %s', - 'LOG_THEME_EDIT' => 'Edited theme %1$s
    » Modified class %2$s', - 'LOG_THEME_EDIT_ADD' => 'Edited theme %1$s
    » Added class %2$s', + 'LOG_THEME_EDIT' => 'Edited theme %1$s', + 'LOG_THEME_EDIT_FILE' => 'Edited theme %1$s
    » Modified file %2$s', 'LOG_THEME_EXPORT' => 'Exported theme
    » %s', 'LOG_THEME_REFRESHED' => 'Refreshed theme
    » %s', @@ -602,20 +627,20 @@ $lang = array_merge($lang, array( 'LOG_UPDATE_PHPBB' => 'Updated phpBB from version %1$s to version %2$s', 'LOG_USER_ACTIVE' => 'User activated
    » %s', - 'LOG_USER_BAN_USER' => 'Banned User via user management for reason "%1$s"
    » %2$s', - 'LOG_USER_BAN_IP' => 'Banned IP via user management for reason "%1$s"
    » %2$s', - 'LOG_USER_BAN_EMAIL' => 'Banned email via user management for reason "%1$s"
    » %2$s', + 'LOG_USER_BAN_USER' => 'Banned User via user management for reason “%1$sâ€
    » %2$s', + 'LOG_USER_BAN_IP' => 'Banned IP via user management for reason “%1$sâ€
    » %2$s', + 'LOG_USER_BAN_EMAIL' => 'Banned e-mail via user management for reason “%1$sâ€
    » %2$s', 'LOG_USER_DELETED' => 'Deleted user
    » %s', 'LOG_USER_DEL_ATTACH' => 'Removed all attachments made by the user
    » %s', 'LOG_USER_DEL_AVATAR' => 'Removed user avatar
    » %s', 'LOG_USER_DEL_POSTS' => 'Removed all posts made by the user
    » %s', 'LOG_USER_DEL_SIG' => 'Removed user signature
    » %s', 'LOG_USER_INACTIVE' => 'User deactivated
    » %s', - 'LOG_USER_MOVE_POSTS' => 'Moved user posts
    » posts by "%1$s" to forum "%2$s"', + 'LOG_USER_MOVE_POSTS' => 'Moved user posts
    » posts by “%1$s†to forum “%2$sâ€', 'LOG_USER_NEW_PASSWORD' => 'Changed user password
    » %s', - 'LOG_USER_REACTIVATE' => 'Forced user account re-activation
    » %s', - 'LOG_USER_UPDATE_EMAIL' => 'User "%1$s" changed email
    » from "%2$s" to "%3$s"', - 'LOG_USER_UPDATE_NAME' => 'Changed username
    » from "%1$s" to "%2$s"', + 'LOG_USER_REACTIVATE' => 'Forced user account reactivation
    » %s', + 'LOG_USER_UPDATE_EMAIL' => 'User “%1$s†changed e-mail
    » from “%2$s†to “%3$sâ€', + 'LOG_USER_UPDATE_NAME' => 'Changed username
    » from “%1$s†to “%2$sâ€', 'LOG_USER_USER_UPDATE' => 'Updated user details
    » %s', 'LOG_USER_ACTIVE_USER' => 'User account activated', @@ -625,8 +650,8 @@ $lang = array_merge($lang, array( 'LOG_USER_GENERAL' => '%s', 'LOG_USER_INACTIVE_USER' => 'User account de-activated', 'LOG_USER_LOCK' => 'User locked own topic
    » %s', - 'LOG_USER_MOVE_POSTS_USER' => 'Moved all posts to forum "%s"', - 'LOG_USER_REACTIVATE_USER' => 'Forced user account re-activation', + 'LOG_USER_MOVE_POSTS_USER' => 'Moved all posts to forum» %s', + 'LOG_USER_REACTIVATE_USER' => 'Forced user account reactivation', 'LOG_USER_UNLOCK' => 'User unlocked own topic
    » %s', 'LOG_USER_WARNING' => 'Added user warning
    » %s', 'LOG_USER_WARNING_BODY' => 'The following warning was issued to this user
    » %s', diff --git a/phpBB/language/en/acp/database.php b/phpBB/language/en/acp/database.php index 07605cc4cb..e776b13024 100644 --- a/phpBB/language/en/acp/database.php +++ b/phpBB/language/en/acp/database.php @@ -32,7 +32,7 @@ if (empty($lang) || !is_array($lang)) // Database Backup/Restore $lang = array_merge($lang, array( - 'ACP_BACKUP_EXPLAIN' => 'Here you can backup all your phpBB related data. You may store the resulting archive in your store/ folder or download it directly. Depending on your server configuration you be able to compress the file in a number of formats.', + 'ACP_BACKUP_EXPLAIN' => 'Here you can backup all your phpBB related data. You may store the resulting archive in your store/ folder or download it directly. Depending on your server configuration you may be able to compress the file in a number of formats.', 'ACP_RESTORE_EXPLAIN' => 'This will perform a full restore of all phpBB tables from a saved file. If your server supports it you may use a gzip or bzip2 compressed text file and it will automatically be decompressed. WARNING This will overwrite any existing data. The restore may take a long time to process please do not move from this page till it is complete.', 'BACKUP_DELETE' => 'The backup file has been deleted successfully.', @@ -44,12 +44,14 @@ $lang = array_merge($lang, array( 'DATABASE' => 'Database utilities', 'DATA_ONLY' => 'Data only', 'DELETE_BACKUP' => 'Delete backup', + 'DELETE_SELECTED_BACKUP' => 'Are you sure you want to delete the selected backup?', 'DESELECT_ALL' => 'Deselect all', 'DOWNLOAD_BACKUP' => 'Download backup', 'FILE_TYPE' => 'File type', 'FULL_BACKUP' => 'Full', + 'RESTORE_FAILURE' => 'The backup file may be corrupt.', 'RESTORE_OPTIONS' => 'Restore options', 'RESTORE_SUCCESS' => 'The database has been successfully restored.

    Your board should be back to the state it was when the backup was made.', @@ -62,6 +64,7 @@ $lang = array_merge($lang, array( 'STRUCTURE_ONLY' => 'Structure only', 'TABLE_SELECT' => 'Table select', + 'TABLE_SELECT_ERROR'=> 'You must select at least one table.', )); ?> \ No newline at end of file diff --git a/phpBB/language/en/acp/email.php b/phpBB/language/en/acp/email.php index e57b2a8bea..84b2b3db31 100644 --- a/phpBB/language/en/acp/email.php +++ b/phpBB/language/en/acp/email.php @@ -32,12 +32,12 @@ if (empty($lang) || !is_array($lang)) // Email settings $lang = array_merge($lang, array( - 'ACP_MASS_EMAIL_EXPLAIN' => 'Here you can email a message to either all of your users or all users of a specific group. To do this, an email will be sent out to the administrative email address supplied, with a blind carbon copy sent to all recipients. If you are emailing a large group of people please be patient after submitting and do not stop the page halfway through. It is normal for a mass emailing to take a long time, you will be notified when the script has completed', + 'ACP_MASS_EMAIL_EXPLAIN' => 'Here you can e-mail a message to either all of your users or all users of a specific group having the option to receive mass e-mails enabled. To achieve this an e-mail will be sent out to the administrative e-mail address supplied, with a blind carbon copy sent to all recipients. The default setting is to only include 50 recipients in such an e-mail, for more recipients more e-mails will be sent. If you are emailing a large group of people please be patient after submitting and do not stop the page halfway through. It is normal for a mass emailing to take a long time, you will be notified when the script has completed.', 'ALL_USERS' => 'All users', 'COMPOSE' => 'Compose', - 'EMAIL_SEND_ERROR' => 'There were one or more errors while sending the email. Please check the %sError log%s for detailed error messages.', + 'EMAIL_SEND_ERROR' => 'There were one or more errors while sending the e-mail. Please check the %sError log%s for detailed error messages.', 'EMAIL_SENT' => 'This message has been sent.', 'EMAIL_SENT_QUEUE' => 'This message has been queued for sending.', diff --git a/phpBB/language/en/acp/forums.php b/phpBB/language/en/acp/forums.php index 443241702b..5281651bad 100644 --- a/phpBB/language/en/acp/forums.php +++ b/phpBB/language/en/acp/forums.php @@ -72,11 +72,11 @@ $lang = array_merge($lang, array( 'FORUM_DELETE_EXPLAIN' => 'The form below will allow you to delete a forum. If the forum is postable you are able to decide where you want to put all topics (or forums) it contained.', 'FORUM_DELETED' => 'Forum successfully deleted.', 'FORUM_DESC' => 'Description', - 'FORUM_DESC_EXPLAIN' => 'Any markup entered here will displayed as is.', + 'FORUM_DESC_EXPLAIN' => 'Any HTML markup entered here will be displayed as is.', 'FORUM_EDIT_EXPLAIN' => 'The form below will allow you to customise this forum. Please note that moderation and post count controls are set via forum permissions for each user or usergroup.', 'FORUM_IMAGE' => 'Forum image', 'FORUM_IMAGE_EXPLAIN' => 'Location, relative to the phpBB root directory, of an additional image to associate with this forum.', - 'FORUM_LINK_EXPLAIN' => 'Full URL (including the protocol, for example http://) to location clicking this forum will take the user.', + 'FORUM_LINK_EXPLAIN' => 'Full URL (including the protocol, i.e.: http://) to the destination location that clicking this forum will take the user, e.g.: http://www.phpbb.com/.', 'FORUM_LINK_TRACK' => 'Track link redirects', 'FORUM_LINK_TRACK_EXPLAIN' => 'Records the number of times a forum link was clicked.', 'FORUM_NAME' => 'Forum name', @@ -105,20 +105,22 @@ $lang = array_merge($lang, array( 'GENERAL_FORUM_SETTINGS' => 'General forum settings', 'LINK' => 'Link', - 'LIST_INDEX' => 'List forum in subforum listings', - 'LIST_INDEX_EXPLAIN' => 'Displays a link to this forum under the parent forums subforum listing if one exist.', + 'LIST_INDEX' => 'List subforum in parent-forum’s legend', + 'LIST_INDEX_EXPLAIN' => 'Displays this forum on the index and elsewhere as a link within the legend of its parent-forum.', 'LOCKED' => 'Locked', - 'MOVE_POSTS_TO' => 'Move posts to', - 'MOVE_SUBFORUMS_TO' => 'Move subforums to', + 'MOVE_POSTS_NO_POSTABLE_FORUM' => 'The forum you selected for moving the posts to is not postable. Please select a postable forum.', + 'MOVE_POSTS_TO' => 'Move posts to', + 'MOVE_SUBFORUMS_TO' => 'Move subforums to', - 'NO_DESTINATION_FORUM' => 'You have not specified a forum to move content to', - 'NO_FORUM_ACTION' => 'No action defined for what happens with the forum content', + 'NO_DESTINATION_FORUM' => 'You have not specified a forum to move content to.', + 'NO_FORUM_ACTION' => 'No action defined for what happens with the forum content.', 'NO_PARENT' => 'No parent', 'NO_PERMISSIONS' => 'Do not copy permissions', 'NO_PERMISSION_FORUM_ADD' => 'You do not have the necessary permissions to add forums.', 'NO_PERMISSION_FORUM_DELETE' => 'You do not have the necessary permissions to delete forums.', + 'PARENT_IS_LINK_FORUM' => 'The parent you specified is a forum link. Link forums are not able to hold other forums, please specify a category or forum as the parent forum.', 'PARENT_NOT_EXIST' => 'Parent does not exist.', 'PRUNE_ANNOUNCEMENTS' => 'Prune announcements', 'PRUNE_STICKY' => 'Prune stickies', diff --git a/phpBB/language/en/acp/groups.php b/phpBB/language/en/acp/groups.php index dbe22e2154..c831a87981 100644 --- a/phpBB/language/en/acp/groups.php +++ b/phpBB/language/en/acp/groups.php @@ -31,7 +31,7 @@ if (empty($lang) || !is_array($lang)) // in a url you again do not need to specify an order e.g., 'Click %sHERE%s' is fine $lang = array_merge($lang, array( - 'ACP_GROUPS_MANAGE_EXPLAIN' => 'From this panel you can administrate all your usergroups, you can delete, create and edit existing groups. You may choose moderators, toggle open/closed group status and set the group name and description.', + 'ACP_GROUPS_MANAGE_EXPLAIN' => 'From this panel you can administrate all your usergroups, you can delete, create and edit existing groups. You may choose group leaders, toggle open/closed group status and set the group name and description.', 'ADD_USERS' => 'Add users', 'ADD_USERS_EXPLAIN' => 'Here you can add new users to the group. You may select whether this group becomes the new default for the selected users. Additionally you can define them as group leaders. Please enter each username on a separate line.', @@ -56,11 +56,10 @@ $lang = array_merge($lang, array( 'GROUP_DEMOTE' => 'Demote group leader', 'GROUP_DESC' => 'Group description', 'GROUP_DETAILS' => 'Group details', - 'GROUP_DST' => 'Group daylight savings', - 'GROUP_EDIT_EXPLAIN' => 'Here you can edit an existing group. You can change its name, description and type (open, closed, etc.). You can also set certain groupwide options such as colouration, rank, etc. Changes made here override users current settings. Please note that group members can alter their avatar unless you set appropriate user permissions.', - 'GROUP_ERR_USERS_EXIST' => 'The specified users are already members of this group', + 'GROUP_EDIT_EXPLAIN' => 'Here you can edit an existing group. You can change its name, description and type (open, closed, etc.). You can also set certain group wide options such as colouration, rank, etc. Changes made here override users current settings. Please note that group members can alter their avatar unless you set appropriate user permissions.', + 'GROUP_ERR_USERS_EXIST' => 'The specified users are already members of this group.', 'GROUP_FOUNDER_MANAGE' => 'Founder manage only', - 'GROUP_FOUNDER_MANAGE_EXPLAIN' => 'Restrict group management for this group for founders only for the administration control panel.', + 'GROUP_FOUNDER_MANAGE_EXPLAIN' => 'Restrict group management for this group for founders only. Users having group permissions are still able to see this group as well as this groups members.', 'GROUP_HIDDEN' => 'Hidden', 'GROUP_LANG' => 'Group language', 'GROUP_LEAD' => 'Group leaders', @@ -72,19 +71,21 @@ $lang = array_merge($lang, array( 'GROUP_MEMBERS_EXPLAIN' => 'This is a complete listing of all the members of this usergroup. It includes separate sections for leaders, pending and existing members. From here you can manage all aspects of who has membership of this group and what their role is. To remove a leader but keep them in the group use Demote rather than delete. Similarly use Promote to make an existing member a leader.', 'GROUP_MESSAGE_LIMIT' => 'Group private message limit per folder', 'GROUP_MESSAGE_LIMIT_EXPLAIN' => 'This setting overrides the per-user folder message limit. A value of 0 means the user default limit will be used.', - 'GROUP_MODS_ADDED' => 'New group moderators added successfully.', + 'GROUP_MODS_ADDED' => 'New group leaders added successfully.', 'GROUP_MODS_DEMOTED' => 'Group leaders demoted successfully.', 'GROUP_MODS_PROMOTED' => 'Group members promoted successfully.', 'GROUP_NAME' => 'Group name', + 'GROUP_NAME_TAKEN' => 'The group name you entered is already in use, please select an alternative.', 'GROUP_OPEN' => 'Open', 'GROUP_PENDING' => 'Pending members', 'GROUP_PROMOTE' => 'Promote to group leader', 'GROUP_RANK' => 'Group rank', 'GROUP_RECEIVE_PM' => 'Group able to receive private messages', + 'GROUP_RECEIVE_PM_EXPLAIN' => 'Please note that hidden groups are not able to be messaged, regardless of this setting.', 'GROUP_REQUEST' => 'Request', 'GROUP_SETTINGS' => 'Set user preferences', 'GROUP_SETTINGS_EXPLAIN' => 'Here you can force changes in users current preferences. Please note these settings are not saved for the group itself. They are intended as a quick method of altering the preferences of all users in this group.', - 'GROUP_SETTINGS_SAVE' => 'Groupwide settings', + 'GROUP_SETTINGS_SAVE' => 'Group wide settings', 'GROUP_TIMEZONE' => 'Group timezone', 'GROUP_TYPE' => 'Group type', 'GROUP_TYPE_EXPLAIN' => 'This determines which users can join or view this group.', @@ -102,16 +103,16 @@ $lang = array_merge($lang, array( 'NO_USERS' => 'You haven’t entered any users.', 'SPECIAL_GROUPS' => 'Predefined groups', - 'SPECIAL_GROUPS_EXPLAIN' => 'Pre-defined groups are special groups, they cannot be deleted or directly modified. However you can still add users and alter basic settings. By clicking “Default†you can set the relevant group to the default for all its members.', + 'SPECIAL_GROUPS_EXPLAIN' => 'Pre-defined groups are special groups, they cannot be deleted or directly modified. However you can still add users and alter basic settings.', 'TOTAL_MEMBERS' => 'Members', 'USERS_APPROVED' => 'Users approved successfully.', 'USER_DEFAULT' => 'User default', 'USER_DEF_GROUPS' => 'User defined groups', - 'USER_DEF_GROUPS_EXPLAIN' => 'These are groups created by you or another admin on this board. You can manage memberships as well as edit group properties or even delete the group. By clicking “Default†you can set the relevant group to the default for all its members.', + 'USER_DEF_GROUPS_EXPLAIN' => 'These are groups created by you or another admin on this board. You can manage memberships as well as edit group properties or even delete the group.', 'USER_GROUP_DEFAULT' => 'Set as default group', - 'USER_GROUP_DEFAULT_EXPLAIN' => 'Saying yes here will set this group as the default group for the added users', + 'USER_GROUP_DEFAULT_EXPLAIN' => 'Saying yes here will set this group as the default group for the added users.', 'USER_GROUP_LEADER' => 'Set as group leader', )); diff --git a/phpBB/language/en/acp/language.php b/phpBB/language/en/acp/language.php index 4c586e1815..083ba2bce1 100644 --- a/phpBB/language/en/acp/language.php +++ b/phpBB/language/en/acp/language.php @@ -32,9 +32,9 @@ if (empty($lang) || !is_array($lang)) $lang = array_merge($lang, array( 'ACP_FILES' => 'Admin language files', - 'ACP_LANGUAGE_PACKS_EXPLAIN' => 'Here you are able to install/remove language packs', + 'ACP_LANGUAGE_PACKS_EXPLAIN' => 'Here you are able to install/remove language packs.', - 'EMAIL_FILES' => 'Email templates', + 'EMAIL_FILES' => 'E-mail templates', 'FILE_CONTENTS' => 'File contents', 'FILE_FROM_STORAGE' => 'File from storage folder', diff --git a/phpBB/language/en/acp/modules.php b/phpBB/language/en/acp/modules.php index 0edcce9352..535868da1f 100644 --- a/phpBB/language/en/acp/modules.php +++ b/phpBB/language/en/acp/modules.php @@ -49,7 +49,7 @@ $lang = array_merge($lang, array( 'DELETE_MODULE_CONFIRM' => 'Are you sure you want to remove this module?', 'EDIT_MODULE' => 'Edit module', - 'EDIT_MODULE_EXPLAIN' => 'Here you are able to enter module specific settings', + 'EDIT_MODULE_EXPLAIN' => 'Here you are able to enter module specific settings.', 'HIDDEN_MODULE' => 'Hidden module', diff --git a/phpBB/language/en/acp/permissions.php b/phpBB/language/en/acp/permissions.php index e29067895a..ee05c5a568 100644 --- a/phpBB/language/en/acp/permissions.php +++ b/phpBB/language/en/acp/permissions.php @@ -43,12 +43,12 @@ $lang = array_merge($lang, array(

    Permission Roles

    These are used to create different sets of permissions for the different permission types later being able to be assigned on a role-based basis. The default roles should cover the administration of bulletin boards large and small, though within each of the four divisions, you can add/edit/delete roles as you see fit.

    -

    Permission Mask

    +

    Permission Masks

    These are used to view the effective permissions assigned to Users, Moderators (Local and Global), Administrators or Forums.


    -

    For further information on setting up and managing permissions on your phpBB3 forum, please see Chapter 1.5 of our Quick Start Guide.

    +

    For further information on setting up and managing permissions on your phpBB3 board, please see Chapter 1.5 of our Quick Start Guide.

    ', 'ACL_NEVER' => 'Never', @@ -72,23 +72,23 @@ $lang = array_merge($lang, array( 'ACL_VIEW_EXPLAIN' => 'Here you can see the effective permissions the user/group is having. A red square indicates that the user/group does not have the permission, a green square indicates that the user/group does have the permission.', 'ACL_YES' => 'Yes', - 'ACP_ADMINISTRATORS_EXPLAIN' => 'Here you can assign administrator rights to users or groups. All users with admin permissions can view the administration panel.', - 'ACP_FORUM_MODERATORS_EXPLAIN' => 'Here you can assign users and groups as forum moderators. To assign users access to forums, to define global moderative rights or administrators please use the appropriate page.', + 'ACP_ADMINISTRATORS_EXPLAIN' => 'Here you can assign administrator permissions to users or groups. All users with administrator permissions can view the administration control panel.', + 'ACP_FORUM_MODERATORS_EXPLAIN' => 'Here you can assign users and groups as forum moderators. To assign users access to forums, to define global moderative permissions or administrators please use the appropriate page.', 'ACP_FORUM_PERMISSIONS_EXPLAIN' => 'Here you can alter which users and groups can access which forums. To assign moderators or define administrators please use the appropriate page.', - 'ACP_GLOBAL_MODERATORS_EXPLAIN' => 'Here you can assign global moderator rights to users or groups. These moderators are like ordinary moderators except they have access to every forum on your board.', + 'ACP_GLOBAL_MODERATORS_EXPLAIN' => 'Here you can assign global moderator permissions to users or groups. These moderators are like ordinary moderators except they have access to every forum on your board.', 'ACP_GROUPS_FORUM_PERMISSIONS_EXPLAIN' => 'Here you can assign forum permissions to groups.', - 'ACP_GROUPS_PERMISSIONS_EXPLAIN' => 'Here you can assign global permissions to groups - user permissions, global moderator permissions and administrator permissions. User permissions include capabilities such as the use of avatars, sending private messages, et cetera; global moderator permissions such as approving posts, manage topics, manage bans, et ecetera and lastly administrator permissions such as altering permissions, define custom BBCodes, manage forums, et cetera. Individual users permissions should only be changed in rare occasions, the preferred method is putting users in groups and assigning the group’s permissions.', + 'ACP_GROUPS_PERMISSIONS_EXPLAIN' => 'Here you can assign global permissions to groups - user permissions, global moderator permissions and administrator permissions. User permissions include capabilities such as the use of avatars, sending private messages, et cetera; global moderator permissions such as approving posts, manage topics, manage bans, et cetera and lastly administrator permissions such as altering permissions, define custom BBCodes, manage forums, et cetera. Individual users permissions should only be changed in rare occasions, the preferred method is putting users in groups and assigning the group’s permissions.', 'ACP_ADMIN_ROLES_EXPLAIN' => 'Here you are able to manage the roles for administrative permissions. Roles are effective permissions, if you change a role the items having this role assigned will change it’s permissions too.', 'ACP_FORUM_ROLES_EXPLAIN' => 'Here you are able to manage the roles for forum permissions. Roles are effective permissions, if you change a role the items having this role assigned will change it’s permissions too.', 'ACP_MOD_ROLES_EXPLAIN' => 'Here you are able to manage the roles for moderative permissions. Roles are effective permissions, if you change a role the items having this role assigned will change it’s permissions too.', 'ACP_USER_ROLES_EXPLAIN' => 'Here you are able to manage the roles for user permissions. Roles are effective permissions, if you change a role the items having this role assigned will change it’s permissions too.', 'ACP_USERS_FORUM_PERMISSIONS_EXPLAIN' => 'Here you can assign forum permissions to users.', - 'ACP_USERS_PERMISSIONS_EXPLAIN' => 'Here you can assign global permissions to users - user permissions, global moderator permissions and administrator permissions. User permissions include capabilities such as the use of avatars, sending private messages, et cetera; global moderator permissions such as approving posts, manage topics, manage bans, et ecetera and lastly administrator permissions such as altering permissions, define custom BBCodes, manage forums, et cetera. To alter these settings for large numbers of users the Group permissions system is the preferred method. User’s permissions should only be changed in rare occasions, the preferred method is putting users in groups and assigning the group’s permissions.', - 'ACP_VIEW_ADMIN_PERMISSIONS_EXPLAIN' => 'Here you can view the effective administrative permissions assigned to the selected users/groups', - 'ACP_VIEW_GLOBAL_MOD_PERMISSIONS_EXPLAIN' => 'Here you can view the global moderative permissions assigned to the selected users/groups', - 'ACP_VIEW_FORUM_PERMISSIONS_EXPLAIN' => 'Here you can view the forum permissions assigned to the selected users/groups and forums', - 'ACP_VIEW_FORUM_MOD_PERMISSIONS_EXPLAIN' => 'Here you can view the forum moderator permissions assigned to the selected users/groups and forums', - 'ACP_VIEW_USER_PERMISSIONS_EXPLAIN' => 'Here you can view the effective user permissions assigned to the selected users/groups', + 'ACP_USERS_PERMISSIONS_EXPLAIN' => 'Here you can assign global permissions to users - user permissions, global moderator permissions and administrator permissions. User permissions include capabilities such as the use of avatars, sending private messages, et cetera; global moderator permissions such as approving posts, manage topics, manage bans, et cetera and lastly administrator permissions such as altering permissions, define custom BBCodes, manage forums, et cetera. To alter these settings for large numbers of users the Group permissions system is the preferred method. User’s permissions should only be changed in rare occasions, the preferred method is putting users in groups and assigning the group’s permissions.', + 'ACP_VIEW_ADMIN_PERMISSIONS_EXPLAIN' => 'Here you can view the effective administrative permissions assigned to the selected users/groups.', + 'ACP_VIEW_GLOBAL_MOD_PERMISSIONS_EXPLAIN' => 'Here you can view the global moderative permissions assigned to the selected users/groups.', + 'ACP_VIEW_FORUM_PERMISSIONS_EXPLAIN' => 'Here you can view the forum permissions assigned to the selected users/groups and forums.', + 'ACP_VIEW_FORUM_MOD_PERMISSIONS_EXPLAIN' => 'Here you can view the forum moderator permissions assigned to the selected users/groups and forums.', + 'ACP_VIEW_USER_PERMISSIONS_EXPLAIN' => 'Here you can view the effective user permissions assigned to the selected users/groups.', 'ADD_GROUPS' => 'Add groups', 'ADD_PERMISSIONS' => 'Add permissions', @@ -110,7 +110,7 @@ $lang = array_merge($lang, array( 'DEFAULT' => 'Default', 'DELETE_ROLE' => 'Delete role', - 'DELETE_ROLE_CONFIRM' => 'Are you sure you want to remove this role? Items having this role assigned will not loosing their permission settings.', + 'DELETE_ROLE_CONFIRM' => 'Are you sure you want to remove this role? Items having this role assigned will not loose their permission settings.', 'DISPLAY_ROLE_ITEMS' => 'View items using this role', 'EDIT_PERMISSIONS' => 'Edit permissions', @@ -118,7 +118,6 @@ $lang = array_merge($lang, array( 'GROUPS_NOT_ASSIGNED' => 'No group assigned to this role', - 'LOOK_UP_FORUMS_EXPLAIN' => 'You are able to select more than one forum', 'LOOK_UP_GROUP' => 'Look up usergroup', 'LOOK_UP_USER' => 'Look up user', @@ -170,8 +169,8 @@ $lang = array_merge($lang, array( 'ROLE_USER_STANDARD' => 'Standard Features', 'ROLE_DESCRIPTION_ADMIN_FORUM' => 'Can access the forum management and forum permission settings.', - 'ROLE_DESCRIPTION_ADMIN_FULL' => 'Has access to all admin functions of this forum.
    Not recommended.', - 'ROLE_DESCRIPTION_ADMIN_STANDARD' => 'Has access to most admin features but is not allowed to use server or system related tools.', + 'ROLE_DESCRIPTION_ADMIN_FULL' => 'Has access to all administrative functions of this board.
    Not recommended.', + 'ROLE_DESCRIPTION_ADMIN_STANDARD' => 'Has access to most administrative features but is not allowed to use server or system related tools.', 'ROLE_DESCRIPTION_ADMIN_USERGROUP' => 'Can manage groups and users: Able to change permissions, settings, manage bans, and manage ranks.', 'ROLE_DESCRIPTION_FORUM_BOT' => 'This role is recommended for bots and search spiders.', 'ROLE_DESCRIPTION_FORUM_FULL' => 'Can use all forum features, including posting of announcements and stickies. Can also ignore the flood limit.
    Not recommended for normal users.', @@ -181,7 +180,7 @@ $lang = array_merge($lang, array( 'ROLE_DESCRIPTION_FORUM_ONQUEUE' => 'Can use most forum features including attachments, but posts and topics need to be approved by a moderator.', 'ROLE_DESCRIPTION_FORUM_POLLS' => 'Like Standard Access but can also create polls.', 'ROLE_DESCRIPTION_FORUM_READONLY' => 'Can read the forum, but cannot create new topics or reply to posts.', - 'ROLE_DESCRIPTION_FORUM_STANDARD' => 'Can use most forum features including attachments, but cannot lock or delete own topics, and cannot create polls.', + 'ROLE_DESCRIPTION_FORUM_STANDARD' => 'Can use most forum features including attachments and deleting own topics, but cannot lock own topics, and cannot create polls.', 'ROLE_DESCRIPTION_MOD_FULL' => 'Can use all moderating features, including banning.', 'ROLE_DESCRIPTION_MOD_QUEUE' => 'Can use the Moderation Queue to validate and edit posts, but nothing else.', 'ROLE_DESCRIPTION_MOD_SIMPLE' => 'Can only use basic topic actions. Cannot send warnings or use moderation queue.', @@ -203,7 +202,7 @@ $lang = array_merge($lang, array( 'SELECTED_FORUM_NOT_EXIST' => 'The selected forum(s) do not exist.', 'SELECTED_GROUP_NOT_EXIST' => 'The selected group(s) do not exist.', 'SELECTED_USER_NOT_EXIST' => 'The selected user(s) do not exist.', - 'SELECT_FORUM_SUBFORUM_EXPLAIN' => 'The forum you select here will include all subforums into the selection', + 'SELECT_FORUM_SUBFORUM_EXPLAIN' => 'The forum you select here will include all subforums into the selection.', 'SELECT_ROLE' => 'Select role…', 'SELECT_TYPE' => 'Select type', 'SET_PERMISSIONS' => 'Set permissions', diff --git a/phpBB/language/en/acp/permissions_phpbb.php b/phpBB/language/en/acp/permissions_phpbb.php index d090dcef1e..8cdbc492c4 100644 --- a/phpBB/language/en/acp/permissions_phpbb.php +++ b/phpBB/language/en/acp/permissions_phpbb.php @@ -91,7 +91,7 @@ $lang = array_merge($lang, array( 'acl_u_viewprofile' => array('lang' => 'Can view profiles', 'cat' => 'profile'), 'acl_u_chgname' => array('lang' => 'Can change username', 'cat' => 'profile'), 'acl_u_chgpasswd' => array('lang' => 'Can change password', 'cat' => 'profile'), - 'acl_u_chgemail' => array('lang' => 'Can change email address', 'cat' => 'profile'), + 'acl_u_chgemail' => array('lang' => 'Can change e-mail address', 'cat' => 'profile'), 'acl_u_chgavatar' => array('lang' => 'Can change avatar', 'cat' => 'profile'), 'acl_u_chggrp' => array('lang' => 'Can change default usergroup', 'cat' => 'profile'), @@ -107,7 +107,7 @@ $lang = array_merge($lang, array( 'acl_u_pm_edit' => array('lang' => 'Can edit own private messages', 'cat' => 'pm'), 'acl_u_pm_delete' => array('lang' => 'Can remove private messages from own folder', 'cat' => 'pm'), 'acl_u_pm_forward' => array('lang' => 'Can forward private messages', 'cat' => 'pm'), - 'acl_u_pm_emailpm' => array('lang' => 'Can email private messages', 'cat' => 'pm'), + 'acl_u_pm_emailpm' => array('lang' => 'Can e-mail private messages', 'cat' => 'pm'), 'acl_u_pm_printpm' => array('lang' => 'Can print private messages', 'cat' => 'pm'), 'acl_u_pm_attach' => array('lang' => 'Can attach files in private messages', 'cat' => 'pm'), 'acl_u_pm_download' => array('lang' => 'Can download files in private messages', 'cat' => 'pm'), @@ -116,11 +116,11 @@ $lang = array_merge($lang, array( 'acl_u_pm_img' => array('lang' => 'Can post images in private messages', 'cat' => 'pm'), 'acl_u_pm_flash' => array('lang' => 'Can post Flash in private messages', 'cat' => 'pm'), - 'acl_u_sendemail' => array('lang' => 'Can send emails', 'cat' => 'misc'), + 'acl_u_sendemail' => array('lang' => 'Can send e-mails', 'cat' => 'misc'), 'acl_u_sendim' => array('lang' => 'Can send instant messages', 'cat' => 'misc'), 'acl_u_ignoreflood' => array('lang' => 'Can ignore flood limit', 'cat' => 'misc'), 'acl_u_hideonline' => array('lang' => 'Can hide online status', 'cat' => 'misc'), - 'acl_u_viewonline' => array('lang' => 'Can view all online', 'cat' => 'misc'), + 'acl_u_viewonline' => array('lang' => 'Can view hidden online users', 'cat' => 'misc'), 'acl_u_search' => array('lang' => 'Can search board', 'cat' => 'misc'), )); @@ -153,7 +153,7 @@ $lang = array_merge($lang, array( 'acl_f_report' => array('lang' => 'Can report posts', 'cat' => 'actions'), 'acl_f_subscribe' => array('lang' => 'Can subscribe forum', 'cat' => 'actions'), 'acl_f_print' => array('lang' => 'Can print topics', 'cat' => 'actions'), - 'acl_f_email' => array('lang' => 'Can email topics', 'cat' => 'actions'), + 'acl_f_email' => array('lang' => 'Can e-mail topics', 'cat' => 'actions'), 'acl_f_search' => array('lang' => 'Can search the forum', 'cat' => 'misc'), 'acl_f_ignoreflood' => array('lang' => 'Can ignore flood limit', 'cat' => 'misc'), @@ -175,7 +175,7 @@ $lang = array_merge($lang, array( 'acl_m_merge' => array('lang' => 'Can merge topics', 'cat' => 'topic_actions'), 'acl_m_info' => array('lang' => 'Can view post details', 'cat' => 'misc'), - 'acl_m_warn' => array('lang' => 'Can issue warnings', 'cat' => 'misc'), + 'acl_m_warn' => array('lang' => 'Can issue warnings', 'cat' => 'misc'), // This moderator setting is only global (and not local) 'acl_m_ban' => array('lang' => 'Can manage bans', 'cat' => 'misc'), // This moderator setting is only global (and not local) )); @@ -221,7 +221,7 @@ $lang = array_merge($lang, array( 'acl_a_clearlogs' => array('lang' => 'Can clear logs', 'cat' => 'misc'), 'acl_a_modules' => array('lang' => 'Can manage modules', 'cat' => 'misc'), 'acl_a_language' => array('lang' => 'Can manage language packs', 'cat' => 'misc'), - 'acl_a_email' => array('lang' => 'Can send mass email', 'cat' => 'misc'), + 'acl_a_email' => array('lang' => 'Can send mass e-mail', 'cat' => 'misc'), 'acl_a_bots' => array('lang' => 'Can manage bots', 'cat' => 'misc'), 'acl_a_reasons' => array('lang' => 'Can manage report/denial reasons', 'cat' => 'misc'), 'acl_a_backup' => array('lang' => 'Can backup/restore database', 'cat' => 'misc'), diff --git a/phpBB/language/en/acp/posting.php b/phpBB/language/en/acp/posting.php index fba23e233f..c543c5f246 100644 --- a/phpBB/language/en/acp/posting.php +++ b/phpBB/language/en/acp/posting.php @@ -33,15 +33,15 @@ if (empty($lang) || !is_array($lang)) // BBCodes // Note to translators: you can translate everything but what's between { and } $lang = array_merge($lang, array( - 'ACP_BBCODES_EXPLAIN' => 'BBCode is a special implementation of HTML offering greater control over what and how something is displayed. From this page you can add, remove and edit custom BBCodes', + 'ACP_BBCODES_EXPLAIN' => 'BBCode is a special implementation of HTML offering greater control over what and how something is displayed. From this page you can add, remove and edit custom BBCodes.', 'ADD_BBCODE' => 'Add a new BBCode', 'BBCODE_ADDED' => 'BBCode added successfully.', 'BBCODE_EDITED' => 'BBCode edited successfully.', 'BBCODE_NOT_EXIST' => 'The BBCode you selected does not exist.', - 'BBCODE_HELPLINE' => 'Helpline', - 'BBCODE_HELPLINE_EXPLAIN' => 'This field contains the mouseover text of the BBCode', - 'BBCODE_HELPLINE_TEXT' => 'Helpline text', + 'BBCODE_HELPLINE' => 'Help line', + 'BBCODE_HELPLINE_EXPLAIN' => 'This field contains the mouse over text of the BBCode.', + 'BBCODE_HELPLINE_TEXT' => 'Help line text', 'BBCODE_INVALID_TAG_NAME' => 'The BBCode tag name that you selected already exists.', 'BBCODE_OPEN_ENDED_TAG' => 'Your custom BBCode must contain both an opening and a closing tag.', 'BBCODE_TAG' => 'Tag', @@ -49,28 +49,28 @@ $lang = array_merge($lang, array( 'BBCODE_TAG_DEF_TOO_LONG' => 'The tag definition that you have entered is too long, please shorten your tag definition.', 'BBCODE_USAGE' => 'BBCode usage', 'BBCODE_USAGE_EXAMPLE' => '[hilight={COLOR}]{TEXT}[/hilight]

    [font={TEXT1}]{TEXT2}[/font]', - 'BBCODE_USAGE_EXPLAIN' => 'Here you define how to use the bbcode. Replace any variable input by the corresponding token (%ssee below%s)', + 'BBCODE_USAGE_EXPLAIN' => 'Here you define how to use the BBCode. Replace any variable input by the corresponding token (%ssee below%s).', 'EXAMPLE' => 'Example:', 'EXAMPLES' => 'Examples:', 'HTML_REPLACEMENT' => 'HTML replacement', 'HTML_REPLACEMENT_EXAMPLE' => '<span style="background-color:{COLOR};">{TEXT}</span>

    <span style="font-family:{TEXT1};">{TEXT2}</span>', - 'HTML_REPLACEMENT_EXPLAIN' => 'Here you define the default HTML replacement (each template can have its own HTML replacement). Do not forget to put back tokens you used above!', + 'HTML_REPLACEMENT_EXPLAIN' => 'Here you define the default HTML replacement. Do not forget to put back tokens you used above!', 'TOKEN' => 'Token', 'TOKENS' => 'Tokens', - 'TOKENS_EXPLAIN' => 'Tokens are placeholders for user input. The input will be validated only if it matches the corresponding definition. If needed, you can number them by adding a number as the last character between the braces, e.g. {USERNAME1}, {USERNAME2}.

    In addition to these tokens you can use any of lang string present in your language/ directory like this: {L_<stringname>} where <stringname> is the name of the translated string you want to add. For example, {L_WROTE} will be displayed as "wrote" or its translation according to user’s locale', + 'TOKENS_EXPLAIN' => 'Tokens are placeholders for user input. The input will be validated only if it matches the corresponding definition. If needed, you can number them by adding a number as the last character between the braces, e.g. {USERNAME1}, {USERNAME2}.

    In addition to these tokens you can use any language string present in your language/ directory like this: {L_<STRINGNAME>} where <STRINGNAME> is the name of the translated string you want to add. For example, {L_WROTE} will be displayed as "wrote" or its translation according to user’s locale.', 'TOKEN_DEFINITION' => 'What can it be?', 'TOO_MANY_BBCODES' => 'You cannot create any more BBCodes. Please remove one or more BBCodes then try again.', 'tokens' => array( 'TEXT' => 'Any text, including foreign characters, numbers, etc…', 'NUMBER' => 'Any series of digits', - 'EMAIL' => 'A valid email address', - 'URL' => 'A valid URL using any protocol (http, ftp, etc… cannot be used for javascript exploits). If none is given, "http://" is prepended to the string', - 'LOCAL_URL' => 'A local URL. The URL must be relative to the topic page and cannot contain a server name or protocol', - 'COLOR' => 'A HTML color, can be either in the numeric form #FF1234 or a CSS colour keyword such as fuchsia or InactiveBorder' + 'EMAIL' => 'A valid e-mail address', + 'URL' => 'A valid URL using any protocol (http, ftp, etc… cannot be used for javascript exploits). If none is given, "http://" is prefixed to the string.', + 'LOCAL_URL' => 'A local URL. The URL must be relative to the topic page and cannot contain a server name or protocol.', + 'COLOR' => 'A HTML colour, can be either in the numeric form #FF1234 or a CSS colour keyword such as fuchsia or InactiveBorder' ) )); @@ -79,17 +79,18 @@ $lang = array_merge($lang, array( 'ACP_ICONS_EXPLAIN' => 'From this page you can add, remove and edit the icons users may add to their topics or posts. These icons are generally displayed next to topic titles on the forum listing, or the post subjects in topic listings. You can also install and create new packages of icons.', 'ACP_SMILIES_EXPLAIN' => 'Smilies or emoticons are typically small, sometimes animated images used to convey an emotion or feeling. From this page you can add, remove and edit the emoticons users can use in their posts and private messages. You can also install and create new packages of smilies.', 'ADD_SMILIES' => 'Add multiple smilies', + 'ADD_SMILEY_CODE' => 'Add additional smiley code', 'ADD_ICONS' => 'Add multiple icons', 'AFTER_ICONS' => 'After %s', 'AFTER_SMILIES' => 'After %s', 'CODE' => 'Code', 'CURRENT_ICONS' => 'Current icons', - 'CURRENT_ICONS_EXPLAIN' => 'Choose what to do with the currently installed icons', + 'CURRENT_ICONS_EXPLAIN' => 'Choose what to do with the currently installed icons.', 'CURRENT_SMILIES' => 'Current smilies', - 'CURRENT_SMILIES_EXPLAIN' => 'Choose what to do with the currently installed smilies', + 'CURRENT_SMILIES_EXPLAIN' => 'Choose what to do with the currently installed smilies.', - 'DISPLAY_ON_POSTING' => 'Display on posting', + 'DISPLAY_ON_POSTING' => 'Display on posting page', 'EDIT_ICONS' => 'Edit icons', 'EDIT_SMILIES' => 'Edit smilies', @@ -116,15 +117,19 @@ $lang = array_merge($lang, array( 'ICONS_ORDER' => 'Icon order', 'ICONS_URL' => 'Icon image file', 'ICONS_WIDTH' => 'Icon width', - 'IMPORT_ICONS' => 'Install icons pak', - 'IMPORT_SMILIES' => 'Install smilies pak', + 'IMPORT_ICONS' => 'Install icons package', + 'IMPORT_SMILIES' => 'Install smilies package', 'KEEP_ALL' => 'Keep all', 'MASS_ADD_SMILIES' => 'Add multiple smilies', + 'NO_ICONS_ADD' => 'There are no icons available for adding.', + 'NO_ICONS_EDIT' => 'There are no icons available for modifying.', 'NO_ICONS_EXPORT' => 'You have no icons with which to create a package.', 'NO_ICONS_PAK' => 'No icon packages found.', + 'NO_SMILIES_ADD' => 'There are no smilies available for adding.', + 'NO_SMILIES_EDIT' => 'There are no smilies available for modifying.', 'NO_SMILIES_EXPORT' => 'You have no smilies with which to create a package.', 'NO_SMILIES_PAK' => 'No smiley packages found.', @@ -176,7 +181,7 @@ $lang = array_merge($lang, array( // Ranks $lang = array_merge($lang, array( - 'ACP_RANKS_EXPLAIN' => 'Using this form you can add, edit, view and delete ranks. You can also create custom ranks which can be applied to a user via the user management facility.', + 'ACP_RANKS_EXPLAIN' => 'Using this form you can add, edit, view and delete ranks. You can also create special ranks which can be applied to a user via the user management facility.', 'ADD_RANK' => 'Add new rank', 'MUST_SELECT_RANK' => 'You must select a rank.', @@ -197,11 +202,11 @@ $lang = array_merge($lang, array( // Disallow Usernames $lang = array_merge($lang, array( - 'ACP_DISALLOW_EXPLAIN' => 'Here you can control usernames which will not be allowed to be used. Disallowed usernames are allowed to contain a wildcard character of *. Please note that you will not be allowed to specify any username that has already been registered, you must first delete that name then disallow it', - 'ADD_DISALLOW_EXPLAIN' => 'You can disallow a username using the wildcard character * to match any character', + 'ACP_DISALLOW_EXPLAIN' => 'Here you can control usernames which will not be allowed to be used. Disallowed usernames are allowed to contain a wildcard character of *. Please note that you will not be allowed to specify any username that has already been registered, you must first delete that name then disallow it.', + 'ADD_DISALLOW_EXPLAIN' => 'You can disallow a username using the wildcard character * to match any character.', 'ADD_DISALLOW_TITLE' => 'Add a disallowed username', - 'DELETE_DISALLOW_EXPLAIN' => 'You can remove a disallowed username by selecting the username from this list and clicking submit', + 'DELETE_DISALLOW_EXPLAIN' => 'You can remove a disallowed username by selecting the username from this list and clicking submit.', 'DELETE_DISALLOW_TITLE' => 'Remove a disallowed username', 'DISALLOWED_ALREADY' => 'The name you entered could not be disallowed. It either already exists in the list, exists in the word censor list, or a matching username is present.', 'DISALLOWED_DELETED' => 'The disallowed username has been successfully removed.', @@ -215,12 +220,12 @@ $lang = array_merge($lang, array( $lang = array_merge($lang, array( 'ACP_REASONS_EXPLAIN' => 'Here you can manage the reasons used in reports and denial messages when disapproving posts. There is one default reason (marked with a *) you are not able to remove, this reason is normally used for custom messages if no reason fits.', 'ADD_NEW_REASON' => 'Add new reason', - 'AVAILABLE_TITLES' => 'Available localized reason titles', + 'AVAILABLE_TITLES' => 'Available localised reason titles', 'IS_NOT_TRANSLATED' => 'Reason has not been localised.', - 'IS_NOT_TRANSLATED_EXPLAIN' => 'Reason has not been localised. If you want to provide the localized form, specify the correct key from the language files report reasons section.', + 'IS_NOT_TRANSLATED_EXPLAIN' => 'Reason has not been localised. If you want to provide the localised form, specify the correct key from the language files report reasons section.', 'IS_TRANSLATED' => 'Reason has been localised.', - 'IS_TRANSLATED_EXPLAIN' => 'Reason has been localised. If the title you enter here is specified within the language files report reasons section, the localized form of the title and description will be used.', + 'IS_TRANSLATED_EXPLAIN' => 'Reason has been localised. If the title you enter here is specified within the language files report reasons section, the localised form of the title and description will be used.', 'NO_REASON' => 'Reason could not be found.', 'NO_REASON_INFO' => 'You have to specify a title and a description for this reason.', @@ -232,7 +237,7 @@ $lang = array_merge($lang, array( 'REASON_DESCRIPTION' => 'Reason description', 'REASON_DESC_TRANSLATED' => 'Displayed reason description', 'REASON_EDIT' => 'Edit report/denial reason', - 'REASON_EDIT_EXPLAIN' => 'Here you are able to add or edit a reason. If the reason is translated the localized version is used instead of the description entered here.', + 'REASON_EDIT_EXPLAIN' => 'Here you are able to add or edit a reason. If the reason is translated the localised version is used instead of the description entered here.', 'REASON_REMOVED' => 'Report/denial reason successfully removed.', 'REASON_TITLE' => 'Reason title', 'REASON_TITLE_TRANSLATED' => 'Displayed reason title', diff --git a/phpBB/language/en/acp/profile.php b/phpBB/language/en/acp/profile.php index f690f6fdb7..bd4a3f0e6e 100644 --- a/phpBB/language/en/acp/profile.php +++ b/phpBB/language/en/acp/profile.php @@ -38,7 +38,7 @@ $lang = array_merge($lang, array( 'ALWAYS_TODAY' => 'Always the current date', 'BOOL_ENTRIES_EXPLAIN' => 'Enter your options now', - 'BOOL_TYPE_EXPLAIN' => 'Define the type, either a checkbox or radio buttons', + 'BOOL_TYPE_EXPLAIN' => 'Define the type, either a checkbox or radio buttons.', 'CHANGED_PROFILE_FIELD' => 'Successfully changed profile field.', 'CHARS_ANY' => 'Any character', @@ -46,11 +46,11 @@ $lang = array_merge($lang, array( 'COLUMNS' => 'Columns', 'CP_LANG_DEFAULT_VALUE' => 'Default value', 'CP_LANG_EXPLAIN' => 'Field description', - 'CP_LANG_EXPLAIN_EXPLAIN' => 'The explanation for this field presented to the user', + 'CP_LANG_EXPLAIN_EXPLAIN' => 'The explanation for this field presented to the user.', 'CP_LANG_NAME' => 'Field name/title presented to the user', 'CP_LANG_OPTIONS' => 'Options', 'CREATE_NEW_FIELD' => 'Create new field', - 'CUSTOM_FIELDS_NOT_TRANSLATED' => 'At least one custom profile field has not yet been translated. Please enter the required information by clicking on the "Translate" link.', + 'CUSTOM_FIELDS_NOT_TRANSLATED' => 'At least one custom profile field has not yet been translated. Please enter the required information by clicking on the “Translate†link.', 'DEFAULT_ISO_LANGUAGE' => 'Default language [%s]', 'DEFAULT_LANGUAGE_NOT_FILLED' => 'The language entries for the default language are not filled for this profile field.', @@ -62,8 +62,8 @@ $lang = array_merge($lang, array( 'DISPLAY_AT_REGISTER' => 'Display at registration screen', 'DISPLAY_AT_REGISTER_EXPLAIN' => 'If this option is enabled, the field will be displayed on registration and able to be changed within the user control panel.', 'DISPLAY_PROFILE_FIELD' => 'Display profile field', - 'DISPLAY_PROFILE_FIELD_EXPLAIN' => 'The profile field will be shown on viewtopic/viewprofile/memberlist. if this is enabled within the load settings. Only showing within the users profile is enabled by default.', - 'DROPDOWN_ENTRIES_EXPLAIN' => 'Enter your options now, every option in one line', + 'DISPLAY_PROFILE_FIELD_EXPLAIN' => 'The profile field will be shown on topic pages, profiles and the memberlist if this is enabled within the load settings. Only showing within the users profile is enabled by default.', + 'DROPDOWN_ENTRIES_EXPLAIN' => 'Enter your options now, every option in one line.', 'EDIT_DROPDOWN_LANG_EXPLAIN' => 'Please note that you are able to change your options text and also able to add new options to the end. It is not advised to add new options between existing options - this could result in wrong options assigned to your users. This can also happen if you remove options in-between. Removing options from the end result in users having assigned this item now reverting back to the default one.', 'EMPTY_FIELD_IDENT' => 'Empty field identification', @@ -74,7 +74,7 @@ $lang = array_merge($lang, array( 'FIELD_BOOL' => 'Boolean (Yes/No)', 'FIELD_DATE' => 'Date', 'FIELD_DESCRIPTION' => 'Field description', - 'FIELD_DESCRIPTION_EXPLAIN' => 'The explanation for this field presented to the user', + 'FIELD_DESCRIPTION_EXPLAIN' => 'The explanation for this field presented to the user.', 'FIELD_DROPDOWN' => 'Dropdown box', 'FIELD_IDENT' => 'Field identification', 'FIELD_IDENT_ALREADY_EXIST' => 'The chosen field identification already exist. Please choose another name.', @@ -82,7 +82,7 @@ $lang = array_merge($lang, array( 'FIELD_INT' => 'Numbers', 'FIELD_LENGTH' => 'Length of input box', 'FIELD_NOT_FOUND' => 'Profile field not found.', - 'FIELD_STRING' => 'Single textfield', + 'FIELD_STRING' => 'Single text field', 'FIELD_TEXT' => 'Textarea', 'FIELD_TYPE' => 'Field type', 'FIELD_TYPE_EXPLAIN' => 'You are not able to change the field type later.', @@ -107,7 +107,7 @@ $lang = array_merge($lang, array( 'NO_FIELD_ID' => 'No field id specified.', 'NO_FIELD_TYPE' => 'No Field type specified.', 'NO_VALUE_OPTION' => 'Option equal to non entered value', - 'NO_VALUE_OPTION_EXPLAIN' => 'Value for a non-entry. If the field is required, the user gets an error if he choose the option selected here', + 'NO_VALUE_OPTION_EXPLAIN' => 'Value for a non-entry. If the field is required, the user gets an error if he choose the option selected here.', 'NUMBERS_ONLY' => 'Only numbers (0-9)', 'PREVIEW_PROFILE_FIELD' => 'Preview profile field', @@ -125,11 +125,11 @@ $lang = array_merge($lang, array( 'SAVE' => 'Save', 'SECOND_OPTION' => 'Second option', - 'STEP_1_EXPLAIN_CREATE' => 'Here you can enter the first basic parameters of your new profile field. These information are needed for the second step where you are able to set remaining options and where you are able to preview and tweak your profile field further.', - 'STEP_1_EXPLAIN_EDIT' => 'Here you can change the basic parameters of your profile field. The relevant options are re-calculated within the second step, where you are able to preview and test the changed settings.', + 'STEP_1_EXPLAIN_CREATE' => 'Here you can enter the first basic parameters of your new profile field. This information is needed for the second step where you’ll be able to set remaining options and tweak your profile field further.', + 'STEP_1_EXPLAIN_EDIT' => 'Here you can change the basic parameters of your profile field. The relevant options are re-calculated within the second step.', 'STEP_1_TITLE_CREATE' => 'Add profile field', 'STEP_1_TITLE_EDIT' => 'Edit profile field', - 'STEP_2_EXPLAIN_CREATE' => 'Here you are able to define some common options. Further you are able to preview the field you generated, as the user will see it. Play around with it until you are satisfied as how the field behaves.', + 'STEP_2_EXPLAIN_CREATE' => 'Here you are able to define some common options you may want to adjust.', 'STEP_2_EXPLAIN_EDIT' => 'Here you are able to change some common options. Further you are able to preview the changed field, as the user will see it. Play around with it until you are satisfied as how the field behaves.
    Please note that changes to profile fields will not affect existing profile fields entered by your users.', 'STEP_2_TITLE_CREATE' => 'Profile type specific options', 'STEP_2_TITLE_EDIT' => 'Profile type specific options', diff --git a/phpBB/language/en/acp/prune.php b/phpBB/language/en/acp/prune.php index 9c23848623..6172602f9f 100644 --- a/phpBB/language/en/acp/prune.php +++ b/phpBB/language/en/acp/prune.php @@ -44,10 +44,17 @@ $lang = array_merge($lang, array( 'LAST_ACTIVE_EXPLAIN' => 'Enter a date in YYYY-MM-DD format.', + 'PRUNE_USERS_LIST' => 'Users to be pruned', + 'PRUNE_USERS_LIST_DELETE' => 'With the selected critera for pruning users the following accounts will be removed.', + 'PRUNE_USERS_LIST_DEACTIVATE' => 'With the selected critera for pruning users the following accounts will be deactivated.', + 'SELECT_USERS_EXPLAIN' => 'Enter specific usernames here, they will be used in preference to the criteria above.', 'USER_DEACTIVATE_SUCCESS' => 'The selected users have been deactivated successfully.', 'USER_DELETE_SUCCESS' => 'The selected users have been deleted successfully.', + 'USER_PRUNE_FAILURE' => 'No users fit the selected criteria.', + + 'WRONG_ACTIVE_JOINED_DATE' => 'The date entered is wrong, it is expected in YYYY-MM-DD format.', )); // Forum Pruning @@ -56,7 +63,7 @@ $lang = array_merge($lang, array( 'FORUM_PRUNE' => 'Forum prune', - 'NO_PRUNE' => 'No forums pruned', + 'NO_PRUNE' => 'No forums pruned.', 'SELECTED_FORUM' => 'Selected forum', 'SELECTED_FORUMS' => 'Selected forums', @@ -65,12 +72,13 @@ $lang = array_merge($lang, array( 'PRUNE_ANNOUNCEMENTS' => 'Prune announcements', 'PRUNE_FINISHED_POLLS' => 'Prune closed polls', 'PRUNE_FINISHED_POLLS_EXPLAIN' => 'Removes topics with polls which have ended.', + 'PRUNE_FORUM_CONFIRM' => 'Are you sure you want to prune the selected forums with the settings specified? Once removed, there is no way to recover the pruned posts and topics.', 'PRUNE_NOT_POSTED' => 'Days since last posted', 'PRUNE_NOT_VIEWED' => 'Days since last viewed', 'PRUNE_OLD_POLLS' => 'Prune old polls', 'PRUNE_OLD_POLLS_EXPLAIN' => 'Removes topics with polls not voted in for post age days.', 'PRUNE_STICKY' => 'Prune stickies', - 'PRUNE_SUCCESS' => 'Pruning of forums was successful', + 'PRUNE_SUCCESS' => 'Pruning of forums was successful.', 'TOPICS_PRUNED' => 'Topics pruned', )); diff --git a/phpBB/language/en/acp/search.php b/phpBB/language/en/acp/search.php index 59a4dbb43a..3367f63e48 100644 --- a/phpBB/language/en/acp/search.php +++ b/phpBB/language/en/acp/search.php @@ -37,10 +37,10 @@ $lang = array_merge($lang, array( 'COMMON_WORD_THRESHOLD' => 'Common word threshold', 'COMMON_WORD_THRESHOLD_EXPLAIN' => 'Words which are contained in a greater percentage of all posts will be regarded as common. Common words are ignored in search queries. Set to zero to disable. Only takes effect if there are more than 100 posts.', 'CONFIRM_SEARCH_BACKEND' => 'Are you sure you wish to switch to a different search backend? After changing the search backend you will have to create an index for the new search backend. If you don’t plan on switching back to the old search backend you can also delete the old backend’s index in order to free system resources.', - 'CONTINUE_DELETING_INDEX' => 'Continue previous index deleting process', - 'CONTINUE_DELETING_INDEX_EXPLAIN' => 'An index deleting process has been started. In order to access the search index page again you need to complete it first.', + 'CONTINUE_DELETING_INDEX' => 'Continue previous index removal process', + 'CONTINUE_DELETING_INDEX_EXPLAIN' => 'An index removal process has been started. In order to access the search index page you will have to complete it or cancel it.', 'CONTINUE_INDEXING' => 'Continue previous indexing process', - 'CONTINUE_INDEXING_EXPLAIN' => 'An indexing process has been started. In order to access the search index page again you need to complete it first.', + 'CONTINUE_INDEXING_EXPLAIN' => 'An indexing process has been started. In order to access the search index page you will have to complete it or cancel it.', 'CREATE_INDEX' => 'Create index', 'DELETE_INDEX' => 'Delete index', @@ -49,11 +49,11 @@ $lang = array_merge($lang, array( 'FULLTEXT_MYSQL_INCOMPATIBLE_VERSION' => 'The MySQL fulltext backend can only be used with MySQL4 and above.', 'FULLTEXT_MYSQL_NOT_MYISAM' => 'MySQL fulltext indexes can only be used with MyISAM tables.', - 'FULLTEXT_MYSQL_SUBJECT_CARDINALITY' => 'Cardinality of the post_subject fulltext index (estimate of unique values)', - 'FULLTEXT_MYSQL_TEXT_CARDINALITY' => 'Cardinality of the post_text fulltext index (estimate of unique values)', 'FULLTEXT_MYSQL_TOTAL_POSTS' => 'Total number of indexed posts', - 'FULLTEXT_MYSQL_UNICODE' => 'Support for non-latin UTF-8 characters:', - 'FULLTEXT_MYSQL_UNICODE_EXPLAIN' => 'This search backend requires PCRE unicode character properties, only available in PHP 4.4, 5.1 and above, if you want to search for non-latin characters.', + 'FULLTEXT_MYSQL_MBSTRING' => 'Support for non-latin UTF-8 characters using mbstring:', + 'FULLTEXT_MYSQL_PCRE' => 'Support for non-latin UTF-8 characters using PCRE:', + 'FULLTEXT_MYSQL_MBSTRING_EXPLAIN' => 'If PCRE does not have unicode character properties, the search backend will try to use mbstring\'s regular expression engine.', + 'FULLTEXT_MYSQL_PCRE_EXPLAIN' => 'This search backend requires PCRE unicode character properties, only available in PHP 4.4, 5.1 and above, if you want to search for non-latin characters.', 'GENERAL_SEARCH_SETTINGS' => 'General search settings', 'GO_TO_SEARCH_INDEX' => 'Go to search index page', @@ -76,6 +76,8 @@ $lang = array_merge($lang, array( 'SEARCH_GUEST_INTERVAL' => 'Guest search flood interval', 'SEARCH_GUEST_INTERVAL_EXPLAIN' => 'Number of seconds guests must wait between searches. If one guest searches all others have to wait until the time interval passed.', + 'SEARCH_INDEX_CREATE_REDIRECT' => 'All posts up to post id %1$d have now been indexed, of which %2$d posts were within this step.
    The current rate of indexing is approximately %3$.1f posts per second.
    Indexing in progress…', + 'SEARCH_INDEX_DELETE_REDIRECT' => 'All posts up to post id %1$d have been removed from the search index.
    Deleting in progress…', 'SEARCH_INDEX_CREATED' => 'Successfully indexed all posts in the board database.', 'SEARCH_INDEX_REMOVED' => 'Successfully deleted the search index for this backend.', 'SEARCH_INTERVAL' => 'User search flood interval', diff --git a/phpBB/language/en/acp/styles.php b/phpBB/language/en/acp/styles.php index 8270614c2a..df14105eb2 100644 --- a/phpBB/language/en/acp/styles.php +++ b/phpBB/language/en/acp/styles.php @@ -34,7 +34,7 @@ $lang = array_merge($lang, array( 'ACP_IMAGESETS_EXPLAIN' => 'Imagesets comprise all the button, forum, folder, etc. and other non-style specific images used by the board. Here you can edit, export or delete existing imagesets and import or activate new sets.', 'ACP_STYLES_EXPLAIN' => 'Here you can manage the available styles on your board. A style consists off a template, theme and imageset. You may alter existing styles, delete, deactivate, reactivate, create or import new ones. You can also see what a style will look like using the preview function. The current default style is noted by the presence of an asterisk (*). Also listed is the total user count for each style, note that overriding user styles will not be reflected here.', 'ACP_TEMPLATES_EXPLAIN' => 'A template set comprises all the markup used to generate the layout of your board. Here you can edit existing template sets, delete, export, import and preview sets. You can also modify the templating code used to generate BBCode.', - 'ACP_THEMES_EXPLAIN' => 'From here you can create, install, edit, delete and export themes. A theme is the combination of colours and images that are applied to your templates to define the basic look of your forum. The range of options open to you depends on the configuration of your server and phpBB installation, see the manual for further details. Please note that when creating new themes the use of an existing theme as a basis is optional.', + 'ACP_THEMES_EXPLAIN' => 'From here you can create, install, edit, delete and export themes. A theme is the combination of colours and images that are applied to your templates to define the basic look of your board. The range of options open to you depends on the configuration of your server and phpBB installation, see the manual for further details. Please note that when creating new themes the use of an existing theme as a basis is optional.', 'ADD_IMAGESET' => 'Create imageset', 'ADD_IMAGESET_EXPLAIN' => 'Here you can create a new imageset. Depending on your server configuration and file permissions you may have additional options here. For example you may be able to base this imageset on an existing one. You may also be able to upload or import (from the store directory) a imageset archive. If you upload or import an archive the imageset name can be optionally taken from the archive name (to do this leave the imageset name blank).', 'ADD_STYLE' => 'Create style', @@ -54,7 +54,7 @@ $lang = array_merge($lang, array( 'CACHE' => 'Cache', 'CACHE_CACHED' => 'Cached', 'CACHE_FILENAME' => 'Template file', - 'CACHE_FILESIZE' => 'Filesize', + 'CACHE_FILESIZE' => 'File size', 'CACHE_MODIFIED' => 'Modified', 'CONFIRM_IMAGESET_REFRESH' => 'Are you sure you wish to refresh all imageset data? The settings from the imageset configuration file will overwrite all modifications to the imageset which have been carried out with the imageset editor.', 'CONFIRM_TEMPLATE_CLEAR_CACHE' => 'Are you sure you wish to clear all cached versions of your template files?', @@ -65,11 +65,7 @@ $lang = array_merge($lang, array( 'CREATE_STYLE' => 'Create new style', 'CREATE_TEMPLATE' => 'Create new template set', 'CREATE_THEME' => 'Create new theme', - 'CSS_CLASS_NAME' => 'CSS class name', - 'CSS_COLOUR_EXPLAIN' => 'You can either enter a hexadecimal number for the colour or use the web safe colour swatch to select one.', 'CURRENT_IMAGE' => 'Current image', - 'CUSTOM_CLASS' => 'Custom class', - 'CUSTOM_CLASS_EXPLAIN' => 'You can add additional classes to this theme if you wish. You must provide the actual CSS class name below, it must be the same as that you have or will use in your template. Please remember that class names may contain only alphanumeric characters, periods (.), colons (:), dash (-), underscore (_) and number/hash/pound (#). The new class will be added to class selection above.', 'DEACTIVATE_DEFAULT' => 'You cannot deactivate the default style.', 'DELETE_FROM_FS' => 'Delete from filesystem', @@ -89,16 +85,16 @@ $lang = array_merge($lang, array( 'EDIT_DETAILS_STYLE' => 'Edit style', 'EDIT_DETAILS_STYLE_EXPLAIN' => 'Using the form below you can modify this existing style. You may alter the combination of template, theme and imageset which define the style itself. You may also make the style the default one.', 'EDIT_DETAILS_TEMPLATE' => 'Edit template details', - 'EDIT_DETAILS_TEMPLATE_EXPLAIN' => 'Here you can edit certain templates details such as its name. You may also have the option to switch storage of the stylesheet from the filesystem to the database and vice versa. This option depends on your PHP configuration and whether your template set can be written to by the webserver.', + 'EDIT_DETAILS_TEMPLATE_EXPLAIN' => 'Here you can edit certain template details such as its name. You may also have the option to switch storage of the stylesheet from the filesystem to the database and vice versa. This option depends on your PHP configuration and whether your template set can be written to by the web server.', 'EDIT_DETAILS_THEME' => 'Edit theme details', - 'EDIT_DETAILS_THEME_EXPLAIN' => 'Here you can edit certain theme details such as its name. You may also have the option to switch storage of the stylesheet from the filesystem to the database and vice versa. This option depends on your PHP configuration and whether your stylesheet can be written to by the webserver.', + 'EDIT_DETAILS_THEME_EXPLAIN' => 'Here you can edit certain theme details such as its name. You may also have the option to switch storage of the stylesheet from the filesystem to the database and vice versa. This option depends on your PHP configuration and whether your stylesheet can be written to by the web server.', 'EDIT_IMAGESET' => 'Edit imageset', 'EDIT_IMAGESET_EXPLAIN' => 'Here you can edit the individual images which define the imageset. You can also specify dimensions for the image. Dimensions are optional, specifying them can overcome certain rendering issues with some browsers. By not specifying them you reduce the size of the database record a little.', 'EDIT_TEMPLATE' => 'Edit template', 'EDIT_TEMPLATE_EXPLAIN' => 'Here you can edit your template set directly. Please remember that these edits are permanent and cannot be undone once submitted. If PHP can write to the template files in your styles directory any changes here will be written directly to those files. If PHP cannot write to those files they will be copied into the database and all changes will only be reflected there. Please take care when editing your template set, remember to close all replacement variable terms {XXXX} and conditional statements.', 'EDIT_TEMPLATE_STORED_DB' => 'The template file was unwritable so the template set is now stored in the database containing the modified file.', 'EDIT_THEME' => 'Edit theme', - 'EDIT_THEME_EXPLAIN' => 'Here you can edit the selected theme, changing colours, images, etc. You can switch between a simplified interface where you can set basic colours, etc. and a more advanced "raw CSS" mode. The raw mode allows you to add additional parameters such as borders, etc. Only set parameters you need else leave them blank or undefined.', + 'EDIT_THEME_EXPLAIN' => 'Here you can edit the selected theme, changing colours, images, etc.', 'EDIT_THEME_STORED_DB' => 'The stylesheet file was unwritable so the stylesheet is now stored in the database containing your modification.', 'EXPORT' => 'Export', @@ -112,11 +108,9 @@ $lang = array_merge($lang, array( 'HIDE_CSS' => 'Hide raw CSS', - 'IMAGE_CONFIGURATION' => 'Image configuration', 'IMAGE_WIDTH' => 'Image width', 'IMAGE_HEIGHT' => 'Image height', 'IMAGE' => 'Image', - 'IMAGE_LOCATION' => 'Image location', 'IMAGE_NAME' => 'Image name', 'IMAGE_PARAMETER' => 'Parameter', 'IMAGE_VALUE' => 'Value', @@ -165,20 +159,22 @@ $lang = array_merge($lang, array( 'IMG_FORUM_UNREAD' => 'Forum new posts', 'IMG_FORUM_UNREAD_LOCKED' => 'Forum new posts locked', 'IMG_FORUM_UNREAD_SUBFORUM' => 'Subforum new posts', - + 'IMG_SUBFORUM_READ' => 'Legend subforum', + 'IMG_SUBFORUM_UNREAD' => 'Legend subforum new posts', + 'IMG_TOPIC_MOVED' => 'Topic moved', 'IMG_TOPIC_READ' => 'Topic', 'IMG_TOPIC_READ_MINE' => 'Topic posted to', - 'IMG_TOPIC_READ_HOT' => 'Topic hot', - 'IMG_TOPIC_READ_HOT_MINE' => 'Topic hot posted to', + 'IMG_TOPIC_READ_HOT' => 'Topic popular', + 'IMG_TOPIC_READ_HOT_MINE' => 'Topic popular posted to', 'IMG_TOPIC_READ_LOCKED' => 'Topic locked', 'IMG_TOPIC_READ_LOCKED_MINE' => 'Topic locked posted to', 'IMG_TOPIC_UNREAD' => 'Topic new posts', 'IMG_TOPIC_UNREAD_MINE' => 'Topic posted to new', - 'IMG_TOPIC_UNREAD_HOT' => 'Topic hot new posts', - 'IMG_TOPIC_UNREAD_HOT_MINE' => 'Topic hot posted to new', + 'IMG_TOPIC_UNREAD_HOT' => 'Topic popular new posts', + 'IMG_TOPIC_UNREAD_HOT_MINE' => 'Topic popular posted to new', 'IMG_TOPIC_UNREAD_LOCKED' => 'Topic locked new', 'IMG_TOPIC_UNREAD_LOCKED_MINE' => 'Topic locked posted to new', @@ -212,8 +208,10 @@ $lang = array_merge($lang, array( 'IMG_PM_READ' => 'Read private message', 'IMG_PM_UNREAD' => 'Unread private message', + 'IMG_ICON_BACK_TOP' => 'Top', + 'IMG_ICON_CONTACT_AIM' => 'AIM', - 'IMG_ICON_CONTACT_EMAIL' => 'Send email', + 'IMG_ICON_CONTACT_EMAIL' => 'Send e-mail', 'IMG_ICON_CONTACT_ICQ' => 'ICQ', 'IMG_ICON_CONTACT_JABBER' => 'Jabber', 'IMG_ICON_CONTACT_MSNM' => 'MSNM', @@ -280,18 +278,17 @@ $lang = array_merge($lang, array( 'LINE_SPACING' => 'Line spacing', 'LOCALISED_IMAGES' => 'Localised', - 'EDITED_IMAGESET' => 'Edited imageset', - 'NO_CLASS' => 'Cannot find class in stylesheet.', 'NO_IMAGESET' => 'Cannot find imageset on filesystem.', 'NO_IMAGE' => 'No image', + 'NO_IMAGE_ERROR' => 'Cannot find image on filesystem.', 'NO_STYLE' => 'Cannot find style on filesystem.', 'NO_TEMPLATE' => 'Cannot find template on filesystem.', 'NO_THEME' => 'Cannot find theme on filesystem.', - 'NO_UNINSTALLED_IMAGESET' => 'No uninstalled imagesets detected', - 'NO_UNINSTALLED_STYLE' => 'No uninstalled styles detected', - 'NO_UNINSTALLED_TEMPLATE' => 'No uninstalled templates detected', - 'NO_UNINSTALLED_THEME' => 'No uninstalled themes detected', + 'NO_UNINSTALLED_IMAGESET' => 'No uninstalled imagesets detected.', + 'NO_UNINSTALLED_STYLE' => 'No uninstalled styles detected.', + 'NO_UNINSTALLED_TEMPLATE' => 'No uninstalled templates detected.', + 'NO_UNINSTALLED_THEME' => 'No uninstalled themes detected.', 'NO_UNIT' => 'None', 'ONLY_IMAGESET' => 'This is the only remaining imageset, you cannot delete it.', @@ -319,16 +316,13 @@ $lang = array_merge($lang, array( 'SELECT_IMAGE' => 'Select image', 'SELECT_TEMPLATE' => 'Select template file', - 'SELECT_CLASS' => 'Select CSS class', + 'SELECT_THEME' => 'Select theme file', 'SELECTED_IMAGE' => 'Selected image', 'SELECTED_IMAGESET' => 'Selected imageset', 'SELECTED_TEMPLATE' => 'Selected template', 'SELECTED_TEMPLATE_FILE' => 'Selected template file', 'SELECTED_THEME' => 'Selected theme', - 'SELECTED_CLASS' => 'Selected CSS class', - 'SHOW_CSS' => 'Show raw CSS', - 'SHOW_CSS_NOTE' => 'Note', - 'SHOW_CSS_EXPLAIN' => 'Enter each element on a new line, ending with a ; Expand the data for each element, e.g. do not use font: use font-family:, font-weight:, etc.', + 'SELECTED_THEME_FILE' => 'Selected theme file', 'STORE_DATABASE' => 'Database', 'STORE_FILESYSTEM' => 'Filesystem', 'STYLE_ACTIVATE' => 'Activate', @@ -374,7 +368,7 @@ $lang = array_merge($lang, array( 'TEMPLATE_ERR_NAME_EXIST' => 'A template set with that name already exists.', 'TEMPLATE_ERR_NAME_LONG' => 'The template name can be no longer than 30 characters.', 'TEMPLATE_ERR_NOT_TEMPLATE' => 'The archive you specified does not contain a valid template set.', - 'TEMPLATE_ERR_STYLE_NAME' => 'You must supply a name for this templates.', + 'TEMPLATE_ERR_STYLE_NAME' => 'You must supply a name for this template.', 'TEMPLATE_EXPORT' => 'Export templates', 'TEMPLATE_EXPORT_EXPLAIN' => 'Here you can export a template set in the form of an archive. This archive will contain all the files necessary to install the templates on another board. You may select whether to download the file directly or to place it in your store folder for download later or via FTP.', 'TEMPLATE_EXPORTED' => 'Templates exported successfully and stored in %s.', @@ -391,7 +385,7 @@ $lang = array_merge($lang, array( 'THEME_DELETED' => 'Theme deleted successfully.', 'THEME_DELETED_FS' => 'Theme removed from database but files remain on the filesystem.', 'THEME_DETAILS_UPDATED' => 'Theme details successfully updated.', - 'THEME_EDITOR' => 'Raw CSS theme editor', + 'THEME_EDITOR' => 'Theme editor', 'THEME_EDITOR_HEIGHT' => 'Theme editor height', 'THEME_ERR_ARCHIVE' => 'Please select an archive method.', 'THEME_ERR_CLASS_CHARS' => 'Only alphanumeric characters plus ., :, -, _ and # are valid in class names.', @@ -402,6 +396,7 @@ $lang = array_merge($lang, array( 'THEME_ERR_NOT_THEME' => 'The archive you specified does not contain a valid theme.', 'THEME_ERR_REFRESH_FS' => 'This theme is stored on the filesystem so there is no need to refresh it.', 'THEME_ERR_STYLE_NAME' => 'You must supply a name for this theme.', + 'THEME_FILE' => 'Theme file', 'THEME_EXPORT' => 'Export Theme', 'THEME_EXPORT_EXPLAIN' => 'Here you can export a theme in the form of an archive. This archive will contain all the data necessary to install the theme on another board. You may select whether to download the file directly or to place it in your store folder for download later or via FTP.', 'THEME_EXPORTED' => 'Theme exported successfully and stored in %s.', @@ -409,7 +404,7 @@ $lang = array_merge($lang, array( 'THEME_LOCATION_EXPLAIN' => 'Images are always stored on the filesystem.', 'THEME_NAME' => 'Theme name', 'THEME_REFRESHED' => 'Theme refreshed successfully.', - 'THEME_UPDATED' => 'Class updated successfully.', + 'THEME_UPDATED' => 'Theme updated successfully.', 'UNDERLINE' => 'Underline', 'UNINSTALLED_IMAGESET' => 'Uninstalled imagesets', diff --git a/phpBB/language/en/acp/users.php b/phpBB/language/en/acp/users.php index 41deacbcaf..7c09a99c42 100644 --- a/phpBB/language/en/acp/users.php +++ b/phpBB/language/en/acp/users.php @@ -34,6 +34,7 @@ $lang = array_merge($lang, array( 'ADMIN_SIG_PREVIEW' => 'Signature preview', 'AT_LEAST_ONE_FOUNDER' => 'You are not able to change this founder to a normal user. There needs to be at least one founder enabled for this board. If you want to change this users founder status, promote another user to be a founder first.', + 'BAN_ALREADY_ENTERED' => 'The ban had been previously entered successfully. The ban list has not been updated.', 'BAN_SUCCESSFUL' => 'Ban entered successfully.', 'CANNOT_BAN_FOUNDER' => 'You are not allowed to ban founder accounts.', @@ -48,15 +49,15 @@ $lang = array_merge($lang, array( 'CANNOT_REMOVE_YOURSELF' => 'You are not allowed to remove your own user account.', 'CANNOT_SET_FOUNDER_BOT' => 'You are not able to promote ignored users to be founders.', 'CANNOT_SET_FOUNDER_INACTIVE' => 'You need to activate users before you promote them to founders, only activated users are able to be promoted.', - 'CONFIRM_EMAIL_EXPLAIN' => 'You only need to specify this if you are changing the users email address.', + 'CONFIRM_EMAIL_EXPLAIN' => 'You only need to specify this if you are changing the users e-mail address.', 'DELETE_POSTS' => 'Delete posts', 'DELETE_USER' => 'Delete user', - 'DELETE_USER_EXPLAIN' => 'Please note that deleting a user is final, they cannot be recovered', + 'DELETE_USER_EXPLAIN' => 'Please note that deleting a user is final, they cannot be recovered.', - 'FORCE_REACTIVATION_SUCCESS' => 'Successfully forced re-activation.', + 'FORCE_REACTIVATION_SUCCESS' => 'Successfully forced reactivation.', 'FOUNDER' => 'Founder', - 'FOUNDER_EXPLAIN' => 'Founders have all admin permissions and can never be banned, deleted or altered by non-founder members', + 'FOUNDER_EXPLAIN' => 'Founders have all administrative permissions and can never be banned, deleted or altered by non-founder members.', 'GROUP_APPROVE' => 'Approve member', 'GROUP_DEFAULT' => 'Make group default for member', @@ -86,8 +87,8 @@ $lang = array_merge($lang, array( 'USER_ADMIN_ACTIVATE' => 'Activate account', 'USER_ADMIN_ACTIVATED' => 'User activated successfully.', 'USER_ADMIN_AVATAR_REMOVED' => 'Successfully removed avatar from user account.', - 'USER_ADMIN_BAN_EMAIL' => 'Ban by email', - 'USER_ADMIN_BAN_EMAIL_REASON' => 'Email address banned via user management', + 'USER_ADMIN_BAN_EMAIL' => 'Ban by e-mail', + 'USER_ADMIN_BAN_EMAIL_REASON' => 'E-mail address banned via user management', 'USER_ADMIN_BAN_IP' => 'Ban by IP', 'USER_ADMIN_BAN_IP_REASON' => 'IP banned via user management', 'USER_ADMIN_BAN_NAME_REASON' => 'Username banned via user management', @@ -99,7 +100,7 @@ $lang = array_merge($lang, array( 'USER_ADMIN_DEL_POSTS' => 'Delete all posts', 'USER_ADMIN_DEL_SIG' => 'Delete signature', 'USER_ADMIN_EXPLAIN' => 'Here you can change your users information and certain specific options. To modify the users permissions please use the user and group permissions system.', - 'USER_ADMIN_FORCE' => 'Force re-activation', + 'USER_ADMIN_FORCE' => 'Force reactivation', 'USER_ADMIN_MOVE_POSTS' => 'Move all posts', 'USER_ADMIN_SIG_REMOVED' => 'Successfully removed signature from user account.', 'USER_ATTACHMENTS_REMOVED' => 'Successfully removed all attachments made by this user.', diff --git a/phpBB/language/en/common.php b/phpBB/language/en/common.php index 953a5c9644..029f63e1c0 100644 --- a/phpBB/language/en/common.php +++ b/phpBB/language/en/common.php @@ -29,6 +29,10 @@ if (empty($lang) || !is_array($lang)) // 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 +// +// Some characters you may want to copy&paste: +// ’ » “ †… +// $lang = array_merge($lang, array( 'TRANSLATION_INFO' => '', @@ -44,11 +48,12 @@ $lang = array_merge($lang, array( '6_MONTHS' => '6 months', '7_DAYS' => '7 days', - 'ACCOUNT_ALREADY_ACTIVATED' => 'Your account is already activated', - 'ACCOUNT_NOT_ACTIVATED' => 'Your account has not been activated yet', + 'ACCOUNT_ALREADY_ACTIVATED' => 'Your account has already been activated.', + 'ACCOUNT_DEACTIVATED' => 'Your account has been manually deactivated and is only able to be reactivated by an administrator.', + 'ACCOUNT_NOT_ACTIVATED' => 'Your account has not been activated yet.', 'ACP' => 'Administration Control Panel', 'ACTIVE' => 'active', - 'ACTIVE_ERROR' => 'You have specified an inactive username. Please activate your account and try again. If you continue to have problems please contact a board administrator.', + 'ACTIVE_ERROR' => 'The specified username is currently inactive. If you have problems activating your account, please contact a board administrator.', 'ADMINISTRATOR' => 'Administrator', 'ADMINISTRATORS' => 'Administrators', 'AGE' => 'Age', @@ -61,39 +66,41 @@ $lang = array_merge($lang, array( 'ALL_TIMES' => 'All times are %1$s %2$s', 'ALL_TOPICS' => 'All Topics', 'AND' => 'And', - 'ARE_WATCHING_FORUM' => 'You have subscribed to receive updates on this forum', - 'ARE_WATCHING_TOPIC' => 'You have subscribed to receive updates on this topic.', + 'ARE_WATCHING_FORUM' => 'You have subscribed to be notified of new posts in this forum.', + 'ARE_WATCHING_TOPIC' => 'You have subscribed to be notified of new posts in this topic.', 'ASCENDING' => 'Ascending', 'ATTACHMENTS' => 'Attachments', + 'ATTACHED_IMAGE_NOT_IMAGE' => 'The image file you tried to attach is invalid.', 'AUTHOR' => 'Author', - 'AUTH_NO_PROFILE_CREATED' => 'Creating a user profile failed', - 'AVATAR_DISALLOWED_EXTENSION' => 'The extension %s is not allowed', - 'AVATAR_EMPTY_REMOTE_DATA' => 'Avatar could not be uploaded, the remote data appears to be invalid or corrupted.', - 'AVATAR_INVALID_FILENAME' => '%s is an invalid filename', + 'AUTH_NO_PROFILE_CREATED' => 'The creation of a user profile was unsuccessful.', + 'AVATAR_DISALLOWED_EXTENSION' => 'This file cannot be displayed because the extension %s is not allowed.', + 'AVATAR_EMPTY_REMOTE_DATA' => 'The specified avatar could not be uploaded because the remote data appears to be invalid or corrupted.', + 'AVATAR_EMPTY_FILEUPLOAD' => 'The uploaded avatar file is empty.', + 'AVATAR_INVALID_FILENAME' => '%s is an invalid filename.', 'AVATAR_NOT_UPLOADED' => 'Avatar could not be uploaded.', - 'AVATAR_NO_SIZE' => 'Could not obtain width or height of linked avatar, please enter them manually.', - 'AVATAR_PARTIAL_UPLOAD' => 'The uploaded file was only partially uploaded', - 'AVATAR_PHP_SIZE_NA' => 'The avatar’s filesize is too large.
    Could not determine the maximum size defined by PHP in php.ini.', - 'AVATAR_PHP_SIZE_OVERRUN' => 'The avatar’s filesize is too large, maximum upload size is %d MB.
    Please note this is set in php.ini and cannot be overridden.', + 'AVATAR_NO_SIZE' => 'The width or height of the linked avatar could not be determined. Please enter them manually.', + 'AVATAR_PARTIAL_UPLOAD' => 'The specified file was only partially uploaded.', + 'AVATAR_PHP_SIZE_NA' => 'The avatar’s filesize is too large.
    The maximum allowed filesize set in php.ini could not be determined.', + 'AVATAR_PHP_SIZE_OVERRUN' => 'The avatar’s filesize is too large. The maximum allowed upload size is %d MB.
    Please note this is set in php.ini and cannot be overridden.', 'AVATAR_URL_INVALID' => 'The URL you specified is invalid.', 'AVATAR_URL_NOT_FOUND' => 'The file specified could not be found.', 'AVATAR_WRONG_FILESIZE' => 'The avatar must be between 0 and %1d %2s.', - 'AVATAR_WRONG_SIZE' => 'The avatar must be at least %1$d pixels wide, %2$d pixels high and at most %3$d pixels wide and %4$d pixels high. The submitted avatar is %5$d pixels wide and %6$d pixels high.', + 'AVATAR_WRONG_SIZE' => 'The submitted avatar is %5$d pixels wide and %6$d pixels high. Avatars must be at least %1$d pixels wide and %2$d pixels high, but no larger than %3$d pixels wide and %4$d pixels high.', 'BACK_TO_TOP' => 'Top', 'BACK_TO_PREV' => 'Back to previous page', - 'BAN_TRIGGERED_BY_EMAIL'=> 'This ban has been issued on your email address.', - 'BAN_TRIGGERED_BY_IP' => 'This ban has been issued on your IP address.', - 'BAN_TRIGGERED_BY_USER' => 'This ban has been issued on your username.', + 'BAN_TRIGGERED_BY_EMAIL'=> 'A ban has been issued on your e-mail address.', + 'BAN_TRIGGERED_BY_IP' => 'A ban has been issued on your IP address.', + 'BAN_TRIGGERED_BY_USER' => 'A ban has been issued on your username.', 'BBCODE_GUIDE' => 'BBCode guide', 'BCC' => 'BCC', 'BIRTHDAYS' => 'Birthdays', 'BOARD_BAN_PERM' => 'You have been permanently banned from this board.

    Please contact the %2$sBoard Administrator%3$s for more information.', 'BOARD_BAN_REASON' => 'Reason given for ban: %s', 'BOARD_BAN_TIME' => 'You have been banned from this board until %1$s.

    Please contact the %2$sBoard Administrator%3$s for more information.', - 'BOARD_DISABLE' => 'Sorry but this board is currently unavailable', - 'BOARD_DISABLED' => 'This board is currently disabled', - 'BOARD_UNAVAILABLE' => 'Sorry but the board is temporarily unavailable, please try again in a few minutes', + 'BOARD_DISABLE' => 'Sorry but this board is currently unavailable.', + 'BOARD_DISABLED' => 'This board is currently disabled.', + 'BOARD_UNAVAILABLE' => 'Sorry but the board is temporarily unavailable, please try again in a few minutes.', 'BROWSING_FORUM_GUEST' => 'Users browsing this forum: %1$s and %2$d guest', 'BROWSING_FORUM_GUESTS' => 'Users browsing this forum: %1$s and %2$d guests', 'BYTES' => 'Bytes', @@ -101,19 +108,20 @@ $lang = array_merge($lang, array( 'CANCEL' => 'Cancel', 'CHANGE' => 'Change', 'CHANGE_FONT_SIZE' => 'Change font size', - 'CHANGING_PREFERENCES' => 'Changing forum preferences', - 'CHANGING_PROFILE' => 'Changing forum profile settings', + 'CHANGING_PREFERENCES' => 'Changing board preferences', + 'CHANGING_PROFILE' => 'Changing profile settings', 'CLICK_VIEW_PRIVMSG' => '%sGo to your inbox%s', + 'COLLAPSE_VIEW' => 'Collapse view', 'CLOSE_WINDOW' => 'Close window', 'COLOUR_SWATCH' => 'Colour swatch', - 'COMMA_SEPARATOR' => ', ', // Used in pagination and secret yet-to-be-release style, use localised comma if appropiate, eg: Ideographic or Arabic + 'COMMA_SEPARATOR' => ', ', // Used in pagination of ACP & prosilver, use localised comma if appropriate, eg: Ideographic or Arabic 'CONFIRM' => 'Confirm', 'CONFIRM_CODE' => 'Confirmation code', - 'CONFIRM_CODE_EXPLAIN' => 'Enter the code exactly as you see it in the image, it is case insensitive. Please note that a zero does not exist.', + 'CONFIRM_CODE_EXPLAIN' => 'Enter the code exactly as it appears. All letters are case insensitive, there is no zero.', 'CONFIRM_CODE_WRONG' => 'The confirmation code you entered was incorrect.', 'CONFIRM_OPERATION' => 'Are you sure you wish to carry out this operation?', 'CONGRATULATIONS' => 'Congratulations to', - 'CONNECTION_FAILED' => 'Connection failed', + 'CONNECTION_FAILED' => 'Connection failed.', 'CONNECTION_SUCCESS' => 'Connection was successful!', 'COOKIES_DELETED' => 'All board cookies successfully deleted.', 'CURRENT_TIME' => 'It is currently %s', @@ -135,82 +143,86 @@ $lang = array_merge($lang, array( 'DISPLAY_TOPICS' => 'Display topics from previous', 'DOWNLOADED' => 'Downloaded', 'DOWNLOADING_FILE' => 'Downloading file', - 'DOWNLOAD_COUNT' => '%d time', - 'DOWNLOAD_COUNTS' => '%d times', - 'DOWNLOAD_NONE' => '0 times', + 'DOWNLOAD_COUNT' => 'Downloaded %d time', + 'DOWNLOAD_COUNTS' => 'Downloaded %d times', + 'DOWNLOAD_COUNT_NONE' => 'Not downloaded yet', + 'VIEWED_COUNT' => 'Viewed %d time', + 'VIEWED_COUNTS' => 'Viewed %d times', + 'VIEWED_COUNT_NONE' => 'Not viewed yet', 'EDIT_POST' => 'Edit post', - 'EMAIL' => 'Email', - 'EMAIL_ADDRESS' => 'Email address', - 'EMAIL_SMTP_ERROR_RESPONSE' => 'Ran into problems sending email at Line %1$s. Response: %2$s', + 'EMAIL' => 'E-mail', + 'EMAIL_ADDRESS' => 'E-mail address', + 'EMAIL_SMTP_ERROR_RESPONSE' => 'Ran into problems sending e-mail at Line %1$s. Response: %2$s.', 'EMPTY_SUBJECT' => 'You must specify a subject when posting a new topic.', + 'EMPTY_MESSAGE_SUBJECT' => 'You must specify a subject when composing a new message.', 'ENABLED' => 'Enabled', 'ENCLOSURE' => 'Enclosure', - 'ERR_CHANGING_DIRECTORY' => 'Unable to change directory', - 'ERR_CONNECTING_SERVER' => 'Error connecting to the server', - 'ERR_UNABLE_TO_LOGIN' => 'Error on login. Supplied username or password wrong.', - 'ERR_WRONG_PATH_TO_PHPBB' => 'The phpBB path entered seems to be not valid.', + 'ERR_CHANGING_DIRECTORY' => 'Unable to change directory.', + 'ERR_CONNECTING_SERVER' => 'Error connecting to the server.', + 'ERR_UNABLE_TO_LOGIN' => 'The specified username or password is incorrect.', + 'ERR_WRONG_PATH_TO_PHPBB' => 'The phpBB path specified appears to be invalid.', 'EXPAND_VIEW' => 'Expand view', 'EXTENSION' => 'Extension', - 'EXTENSION_DISABLED_AFTER_POSTING' => 'The extension %s has been deactivated and can no longer be displayed', + 'EXTENSION_DISABLED_AFTER_POSTING' => 'The extension %s has been deactivated and can no longer be displayed.', 'FAQ' => 'FAQ', 'FAQ_EXPLAIN' => 'Frequently Asked Questions', 'FILENAME' => 'Filename', - 'FILESIZE' => 'Filesize', + 'FILESIZE' => 'File size', 'FILEDATE' => 'File date', 'FILE_COMMENT' => 'File comment', - 'FILE_NOT_FOUND' => 'The requested file could not be found', + 'FILE_NOT_FOUND' => 'The requested file could not be found.', 'FIND_USERNAME' => 'Find a member', 'FOLDER' => 'Folder', 'FORGOT_PASS' => 'I forgot my password', 'FORUM' => 'Forum', 'FORUMS' => 'Forums', - 'FORUMS_MARKED' => 'All forums have been marked read', + 'FORUMS_MARKED' => 'All forums have been marked read.', 'FORUM_CAT' => 'Forum category', 'FORUM_INDEX' => 'Board index', 'FORUM_LINK' => 'Forum link', 'FORUM_LOCATION' => 'Forum location', 'FORUM_LOCKED' => 'Forum locked', 'FORUM_RULES' => 'Forum rules', - 'FORUM_RULES_LINK' => 'Please click to view the forum rules', + 'FORUM_RULES_LINK' => 'Please click here to view the forum rules', 'FROM' => 'from', - 'FSOCK_DISABLED' => 'The operation is not able to be completed because the fsock functions has been disabled or the server being queried could not be found.', + 'FSOCK_DISABLED' => 'The operation could not be completed because the fsockopen function has been disabled or the server being queried could not be found.', 'FTP_FSOCK_HOST' => 'FTP host', - 'FTP_FSOCK_HOST_EXPLAIN' => 'FTP server used to connect your site', + 'FTP_FSOCK_HOST_EXPLAIN' => 'FTP server used to connect your site.', 'FTP_FSOCK_PASSWORD' => 'FTP password', - 'FTP_FSOCK_PASSWORD_EXPLAIN' => 'Password for your FTP username', + 'FTP_FSOCK_PASSWORD_EXPLAIN' => 'Password for your FTP username.', 'FTP_FSOCK_PORT' => 'FTP port', - 'FTP_FSOCK_PORT_EXPLAIN' => 'Port used to connect to your server', + 'FTP_FSOCK_PORT_EXPLAIN' => 'Port used to connect to your server.', 'FTP_FSOCK_ROOT_PATH' => 'Path to phpBB', - 'FTP_FSOCK_ROOT_PATH_EXPLAIN' => 'Path from the root to your phpBB board', + 'FTP_FSOCK_ROOT_PATH_EXPLAIN' => 'Path from the root to your phpBB board.', 'FTP_FSOCK_TIMEOUT' => 'FTP timeout', - 'FTP_FSOCK_TIMEOUT_EXPLAIN' => 'The amount of time, in seconds, that the system will wait for a reply from your server', + 'FTP_FSOCK_TIMEOUT_EXPLAIN' => 'The amount of time, in seconds, that the system will wait for a reply from your server.', 'FTP_FSOCK_USERNAME' => 'FTP username', - 'FTP_FSOCK_USERNAME_EXPLAIN' => 'Username used to connect to your server', + 'FTP_FSOCK_USERNAME_EXPLAIN' => 'Username used to connect to your server.', 'FTP_HOST' => 'FTP host', - 'FTP_HOST_EXPLAIN' => 'FTP server used to connect your site', + 'FTP_HOST_EXPLAIN' => 'FTP server used to connect your site.', 'FTP_PASSWORD' => 'FTP password', - 'FTP_PASSWORD_EXPLAIN' => 'Password for your FTP username', + 'FTP_PASSWORD_EXPLAIN' => 'Password for your FTP username.', 'FTP_PORT' => 'FTP port', - 'FTP_PORT_EXPLAIN' => 'Port used to connect to your server', + 'FTP_PORT_EXPLAIN' => 'Port used to connect to your server.', 'FTP_ROOT_PATH' => 'Path to phpBB', - 'FTP_ROOT_PATH_EXPLAIN' => 'Path from the root to your phpBB board', + 'FTP_ROOT_PATH_EXPLAIN' => 'Path from the root to your phpBB board.', 'FTP_TIMEOUT' => 'FTP timeout', - 'FTP_TIMEOUT_EXPLAIN' => 'The amount of time, in seconds, that the system will wait for a reply from your server', + 'FTP_TIMEOUT_EXPLAIN' => 'The amount of time, in seconds, that the system will wait for a reply from your server.', 'FTP_USERNAME' => 'FTP username', - 'FTP_USERNAME_EXPLAIN' => 'Username used to connect to your server', + 'FTP_USERNAME_EXPLAIN' => 'Username used to connect to your server.', + 'GENERAL_ERROR' => 'General Error', 'GO' => 'Go', 'GOTO_PAGE' => 'Go to page', 'GROUP' => 'Group', 'GROUPS' => 'Groups', - 'GROUP_ERR_DESC_LONG' => 'Group description is too long.', 'GROUP_ERR_TYPE' => 'Inappropriate group type specified.', 'GROUP_ERR_USERNAME' => 'No group name specified.', - 'GROUP_ERR_USER_LONG' => 'Group name is too long.', + 'GROUP_ERR_USER_LONG' => 'Group names cannot exceed 60 characters. The specified group name is too long.', 'GUEST' => 'Guest', 'GUEST_USERS_ONLINE' => 'There are %d guest users online', 'GUEST_USERS_TOTAL' => '%d guests', @@ -238,22 +250,22 @@ $lang = array_merge($lang, array( 'ICQ' => 'ICQ', 'ICQ_STATUS' => 'ICQ status', - 'IF' => 'if', + 'IF' => 'If', 'IMAGE' => 'Image', - 'IMAGE_FILETYPE_INVALID' => 'Image filetype %d for mimetype %s not supported.', - 'IMAGE_FILETYPE_MISMATCH' => 'Image filetype mismatch: expected extension %1$s but extension %2$s given.', + 'IMAGE_FILETYPE_INVALID' => 'Image file type %d for mimetype %s not supported.', + 'IMAGE_FILETYPE_MISMATCH' => 'Image file type mismatch: expected extension %1$s but extension %2$s given.', 'IN' => 'in', 'INDEX' => 'Index page', 'INFORMATION' => 'Information', 'INTERESTS' => 'Interests', - 'INVALID_DIGEST_CHALLENGE' => 'Invalid digest challenge', - 'INVALID_EMAIL_LOG' => '%s possibly an invalid email address?', + 'INVALID_DIGEST_CHALLENGE' => 'Invalid digest challenge.', + 'INVALID_EMAIL_LOG' => '%s possibly an invalid e-mail address?', 'IP' => 'IP', 'IP_BLACKLISTED' => 'Your IP %1$s has been blocked because it is blacklisted. For details please see %2$s.', 'JABBER' => 'Jabber', 'JOINED' => 'Joined', - 'JUMP_PAGE' => 'Enter the page number you wish to go to', + 'JUMP_PAGE' => 'Enter the page number you wish to go to.', 'JUMP_TO' => 'Jump to', 'JUMP_TO_PAGE' => 'Click to jump to page…', @@ -262,24 +274,25 @@ $lang = array_merge($lang, array( 'LAST_POST' => 'Last post', 'LAST_UPDATED' => 'Last updated', 'LAST_VISIT' => 'Last visit', - 'LDAP_NO_LDAP_EXTENSION' => 'LDAP extension not available', - 'LDAP_NO_SERVER_CONNECTION' => 'Could not connect to LDAP server', + 'LDAP_NO_LDAP_EXTENSION' => 'LDAP extension not available.', + 'LDAP_NO_SERVER_CONNECTION' => 'Could not connect to LDAP server.', 'LEGEND' => 'Legend', 'LOCATION' => 'Location', 'LOCK_POST' => 'Lock post', 'LOCK_POST_EXPLAIN' => 'Prevent editing', 'LOCK_TOPIC' => 'Lock topic', 'LOGIN' => 'Login', - 'LOGIN_CHECK_PM' => 'Log in to check your private messages', + 'LOGIN_CHECK_PM' => 'Log in to check your private messages.', 'LOGIN_CONFIRMATION' => 'Confirmation of login', - 'LOGIN_CONFIRM_EXPLAIN' => 'To prevent brute forcing accounts the board administrator requires you to enter a confirmation code after a maximum amount of failed logins. 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.', + 'LOGIN_CONFIRM_EXPLAIN' => 'To prevent brute forcing accounts the board requires you to enter a confirmation code after a maximum amount of failed logins. 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.', 'LOGIN_ERROR_ATTEMPTS' => 'You exceeded the maximum allowed number of login attempts. In addition to your username and password you now also have to enter the confirm code from the image you see below.', 'LOGIN_ERROR_EXTERNAL_AUTH_APACHE' => 'You have not been authenticated by Apache.', 'LOGIN_ERROR_PASSWORD' => 'You have specified an incorrect password. Please check your password and try again. If you continue to have problems please contact the %sBoard Administrator%s.', + 'LOGIN_ERROR_PASSWORD_CONVERT' => 'It was not possible to convert your password when updating this bulletin board’s software. Please %srequest a new password%s. If you continue to have problems please contact the %sBoard Administrator%s.', 'LOGIN_ERROR_USERNAME' => 'You have specified an incorrect username. Please check your username and try again. If you continue to have problems please contact the %sBoard Administrator%s.', 'LOGIN_FORUM' => 'To view or post in this forum you must enter its password.', 'LOGIN_INFO' => 'In order to login you must be registered. Registering takes only a few seconds but gives you increased capabilities. The board administrator may also grant additional permissions to registered users. Before you login please ensure you are familiar with our terms of use and related policies. Please ensure you read any forum rules as you navigate around the board.', - 'LOGIN_VIEWFORUM' => 'The board administrator requires you to be registered and logged in to view this forum.', + 'LOGIN_VIEWFORUM' => 'The board requires you to be registered and logged in to view this forum.', 'LOGIN_EXPLAIN_EDIT' => 'In order to edit posts in this forum you have to be registered and logged in.', 'LOGOUT' => 'Logout', 'LOGOUT_USER' => 'Logout [ %s ]', @@ -292,6 +305,8 @@ $lang = array_merge($lang, array( 'MCP' => 'Moderator Control Panel', 'MEMBERLIST' => 'Members', 'MEMBERLIST_EXPLAIN' => 'View complete list of members', + 'MERGE' => 'Merge', + 'MERGE_POSTS' => 'Merge posts', 'MERGE_TOPIC' => 'Merge topic', 'MESSAGE' => 'Message', 'MESSAGES' => 'Messages', @@ -315,27 +330,29 @@ $lang = array_merge($lang, array( 'NEXT' => 'Next', 'NEVER' => 'Never', 'NO' => 'No', - 'NOT_ALLOWED_MANAGE_GROUP' => 'You are not allowed to manage this group from the “Administration Control Panelâ€.', - 'NOT_AUTHORIZED' => 'You are not authorised to access this area.', + 'NOT_ALLOWED_MANAGE_GROUP' => 'You are not allowed to manage this group.', + 'NOT_AUTHORISED' => 'You are not authorised to access this area.', 'NOT_WATCHING_FORUM' => 'You are no longer subscribed to updates on this forum.', 'NOT_WATCHING_TOPIC' => 'You are no longer subscribed to this topic.', + 'NOTIFY_ADMIN' => 'Please notify the board administrator or webmaster.', + 'NOTIFY_ADMIN_EMAIL' => 'Please notify the board administrator or webmaster: %1$s', 'NO_ACCESS_ATTACHMENT' => 'You are not allowed to access this file.', 'NO_ACTION' => 'No action specified.', 'NO_ADMINISTRATORS' => 'No administrators assigned at this board.', - 'NO_AUTH_ADMIN' => 'You do not have admin permissions and therefore not allowed to access the administration control panel.', + 'NO_AUTH_ADMIN' => 'Access to the Administration Control Panel is not allowed as you do not have administrative permissions.', 'NO_AUTH_ADMIN_USER_DIFFER' => 'You are not able to re-authenticate as a different user.', 'NO_AUTH_OPERATION' => 'You do not have the necessary permissions to complete this operation.', - 'NO_CONNECT_TO_SMTP_HOST' => 'Could not connect to smtp host : %s : %s', + 'NO_CONNECT_TO_SMTP_HOST' => 'Could not connect to smtp host : %1$s : %2$s', 'NO_BIRTHDAYS' => 'No birthdays today', - 'NO_EMAIL_MESSAGE' => 'Email message was blank', - 'NO_EMAIL_RESPONSE_CODE' => 'Could not get mail server response codes', - 'NO_EMAIL_SUBJECT' => 'No email subject specified', + 'NO_EMAIL_MESSAGE' => 'E-mail message was blank.', + 'NO_EMAIL_RESPONSE_CODE' => 'Could not get mail server response codes.', + 'NO_EMAIL_SUBJECT' => 'No e-mail subject specified.', 'NO_FORUM' => 'The forum you selected does not exist.', - 'NO_FORUMS' => 'This board has no forums', + 'NO_FORUMS' => 'This board has no forums.', 'NO_GROUP' => 'The requested usergroup does not exist.', - 'NO_GROUP_MEMBERS' => 'This group currently has no members', + 'NO_GROUP_MEMBERS' => 'This group currently has no members.', 'NO_IPS_DEFINED' => 'No IP addresses or hostnames defined', - 'NO_MEMBERS' => 'No members found for this search criteria', + 'NO_MEMBERS' => 'No members found for this search criterion.', 'NO_MESSAGES' => 'No messages', 'NO_MODE' => 'No mode specified.', 'NO_MODERATORS' => 'No moderators assigned at this board.', @@ -345,8 +362,9 @@ $lang = array_merge($lang, array( 'NO_ONLINE_USERS' => 'No registered users', 'NO_POSTS' => 'No posts', 'NO_POSTS_TIME_FRAME' => 'No posts exist inside this topic for the selected time frame.', - 'NO_SUCH_SEARCH_MODULE' => 'The specified search backend doesn’t exist', - 'NO_SUPPORTED_AUTH_METHODS' => 'No supported authentication methods', + 'NO_SUBJECT' => 'No subject specified', // Used for posts having no subject defined but displayed within management pages. + 'NO_SUCH_SEARCH_MODULE' => 'The specified search backend doesn’t exist.', + 'NO_SUPPORTED_AUTH_METHODS' => 'No supported authentication methods.', 'NO_TOPIC' => 'The requested topic does not exist.', 'NO_TOPICS' => 'There are no topics or posts in this forum.', 'NO_TOPICS_TIME_FRAME' => 'No topics exist inside this forum for the selected time frame.', @@ -354,7 +372,7 @@ $lang = array_merge($lang, array( 'NO_UPLOAD_FORM_FOUND' => 'Upload initiated but no valid file upload form found.', 'NO_USER' => 'The requested user does not exist.', 'NO_USERS' => 'The requested users do not exist.', - 'NO_USER_SPECIFIED' => 'No username was specified', + 'NO_USER_SPECIFIED' => 'No username was specified.', 'OCCUPATION' => 'Occupation', 'OFFLINE' => 'Offline', @@ -378,7 +396,7 @@ $lang = array_merge($lang, array( 'POSTED_IN_FORUM' => 'in', 'POSTED_ON_DATE' => 'on', 'POSTS' => 'Posts', - 'POSTS_UNAPPROVED' => 'At least one post in this topic has not been approved', + 'POSTS_UNAPPROVED' => 'At least one post in this topic has not been approved.', 'POST_BY_AUTHOR' => 'by', 'POST_BY_FOE' => 'This post was made by %1$s who is currently on your ignore list. %2$sDisplay this post%3$s.', 'POST_DAY' => '%.2f posts per day', @@ -387,9 +405,11 @@ $lang = array_merge($lang, array( 'POST_PCT' => '%.2f%% of all posts', 'POST_PCT_ACTIVE' => '%.2f%% of user’s posts', 'POST_PCT_ACTIVE_OWN' => '%.2f%% of your posts', + 'POST_REPLY' => 'Post a reply', 'POST_REPORTED' => 'Click to view report', 'POST_SUBJECT' => 'Post subject', 'POST_TIME' => 'Post time', + 'POST_TOPIC' => 'Post a new topic', 'POST_UNAPPROVED' => 'This post is waiting for approval', 'PREVIEW' => 'Preview', 'PREVIOUS' => 'Previous', @@ -417,7 +437,7 @@ $lang = array_merge($lang, array( 'REG_USER_ONLINE' => 'There is %d registered user and ', 'REG_USER_TOTAL' => '%d registered, ', 'REMOVE' => 'Remove', - 'REMOVE_INSTALL' => 'Please delete, move or rename the install directory before you use your forum. If this directory is still present, only the Administration Control Panel (ACP) will be accessible.', + 'REMOVE_INSTALL' => 'Please delete, move or rename the install directory before you use your board. If this directory is still present, only the Administration Control Panel (ACP) will be accessible.', 'REPLIES' => 'Replies', 'REPLY_WITH_QUOTE' => 'Reply with quote', 'REPLYING_GLOBAL_ANNOUNCE' => 'Replying to global announcement', @@ -425,7 +445,7 @@ $lang = array_merge($lang, array( 'REPORT_BY' => 'Report by', 'REPORT_POST' => 'Report this post', 'REPORTING_POST' => 'Reporting post', - 'RESEND_ACTIVATION' => 'Resend activation email', + 'RESEND_ACTIVATION' => 'Resend activation e-mail', 'RESET' => 'Reset', 'RESTORE_PERMISSIONS' => 'Restore permissions', 'RETURN_INDEX' => '%sReturn to the index page%s', @@ -466,16 +486,17 @@ $lang = array_merge($lang, array( 'SEARCH_UNANSWERED' => 'View unanswered posts', 'SECONDS' => 'Seconds', 'SELECT' => 'Select', + 'SELECT_ALL_CODE' => 'Select all', 'SELECT_DESTINATION_FORUM' => 'Please select a destination forum', 'SELECT_FORUM' => 'Select a forum', - 'SEND_EMAIL' => 'Email', + 'SEND_EMAIL' => 'E-mail', 'SEND_PRIVATE_MESSAGE' => 'Send private message', 'SETTINGS' => 'Settings', 'SIGNATURE' => 'Signature', 'SKIP' => 'Skip to content', - 'SMTP_NO_AUTH_SUPPORT' => 'SMTP server does not support authentication', - 'SORRY_AUTH_READ' => 'You are not authorised to read this forum', - 'SORRY_AUTH_VIEW_ATTACH' => 'You are not authorised to download this attachment', + 'SMTP_NO_AUTH_SUPPORT' => 'SMTP server does not support authentication.', + 'SORRY_AUTH_READ' => 'You are not authorised to read this forum.', + 'SORRY_AUTH_VIEW_ATTACH' => 'You are not authorised to download this attachment.', 'SORT_BY' => 'Sort by', 'SORT_JOINED' => 'Joined date', 'SORT_LOCATION' => 'Location', @@ -511,8 +532,8 @@ $lang = array_merge($lang, array( 'TOO_LONG_PASSWORD_CONFIRM' => 'The password confirmation you entered is too long.', 'TOO_LONG_USER_PASSWORD' => 'The password you entered is too long.', 'TOO_LONG_USERNAME' => 'The username you entered is too long.', - 'TOO_LONG_EMAIL' => 'The email address you entered is too long.', - 'TOO_LONG_EMAIL_CONFIRM' => 'The email address confirmation you entered is too long.', + 'TOO_LONG_EMAIL' => 'The e-mail address you entered is too long.', + 'TOO_LONG_EMAIL_CONFIRM' => 'The e-mail address confirmation you entered is too long.', 'TOO_LONG_WEBSITE' => 'The website address you entered is too long.', 'TOO_LONG_YIM' => 'The Yahoo! Messenger name you entered is too long.', @@ -530,15 +551,15 @@ $lang = array_merge($lang, array( 'TOO_SHORT_PASSWORD_CONFIRM' => 'The password confirmation you entered is too short.', 'TOO_SHORT_USER_PASSWORD' => 'The password you entered is too short.', 'TOO_SHORT_USERNAME' => 'The username you entered is too short.', - 'TOO_SHORT_EMAIL' => 'The email address you entered is too short.', - 'TOO_SHORT_EMAIL_CONFIRM' => 'The email address confirmation you entered is too short.', + 'TOO_SHORT_EMAIL' => 'The e-mail address you entered is too short.', + 'TOO_SHORT_EMAIL_CONFIRM' => 'The e-mail address confirmation you entered is too short.', 'TOO_SHORT_WEBSITE' => 'The website address you entered is too short.', 'TOO_SHORT_YIM' => 'The Yahoo! Messenger name you entered is too short.', 'TOPIC' => 'Topic', 'TOPICS' => 'Topics', 'TOPIC_ICON' => 'Topic icon', - 'TOPIC_LOCKED' => 'This topic is locked, you cannot edit posts or make further replies', + 'TOPIC_LOCKED' => 'This topic is locked, you cannot edit posts or make further replies.', 'TOPIC_MOVED' => 'Moved topic', 'TOPIC_REVIEW' => 'Topic review', 'TOPIC_TITLE' => 'Topic title', @@ -547,8 +568,8 @@ $lang = array_merge($lang, array( 'TOTAL_LOG' => '1 log', 'TOTAL_LOGS' => '%d logs', 'TOTAL_NO_PM' => '0 private messages in total', - 'TOTAL_PM' => '1 private messages in total', - 'TOTAL_PMS' => '$d private messages in total', + 'TOTAL_PM' => '1 private message in total', + 'TOTAL_PMS' => '%d private messages in total', 'TOTAL_POSTS' => 'Total posts', 'TOTAL_POSTS_OTHER' => 'Total posts %d', 'TOTAL_POSTS_ZERO' => 'Total posts 0', @@ -559,7 +580,7 @@ $lang = array_merge($lang, array( 'TOTAL_USERS_ZERO' => 'Total members 0', 'TRACKED_PHP_ERROR' => 'Tracked PHP errors: %s', - 'UNABLE_GET_IMAGE_SIZE' => 'Accessing the image was impossible or file isn’t a valid image.', + 'UNABLE_GET_IMAGE_SIZE' => 'It was not possible to determine the dimensions of the image.', 'UNABLE_TO_DELIVER_FILE'=> 'Unable to deliver file.', 'UNKNOWN_BROWSER' => 'Unknown browser', 'UNMARK_ALL' => 'Unmark all', @@ -569,18 +590,19 @@ $lang = array_merge($lang, array( 'UNWATCHED_FORUMS' => 'You are no longer watching the selected forums.', 'UNWATCHED_TOPICS' => 'You are no longer watching the selected topics.', 'UPDATE' => 'Update', - 'UPLOAD_IN_PROGRESS' => 'The upload is currently in progress', - 'URL_REDIRECT' => 'If your browser does not support meta redirection please click %sHERE%s to be redirected.', + 'UPLOAD_IN_PROGRESS' => 'The upload is currently in progress.', + 'URL_REDIRECT' => 'If your browser does not support meta redirection %splease click HERE to be redirected%s.', 'USERGROUPS' => 'Groups', 'USERNAME' => 'Username', 'USERNAMES' => 'Usernames', 'USER_AVATAR' => 'User avatar', - 'USER_CANNOT_READ' => 'You cannot read posts in this forum', + 'USER_CANNOT_READ' => 'You cannot read posts in this forum.', 'USER_POST' => '%d Post', 'USER_POSTS' => '%d Posts', 'USERS' => 'Users', 'USE_PERMISSIONS' => 'Test out user’s permissions', + 'VARIANT_DATE_SEPARATOR' => ' / ', // Used in date format dropdown, eg: "Today, 13:37 / 01 Jan 2007, 13:37" ... to join a relative date with calendar date 'VIEWED' => 'Viewed', 'VIEWING_FAQ' => 'Viewing FAQ', 'VIEWING_MEMBERS' => 'Viewing member details', @@ -593,8 +615,8 @@ $lang = array_merge($lang, array( 'VIEWS' => 'Views', 'VIEW_BOOKMARKS' => 'View bookmarks', 'VIEW_FORUM_LOGS' => 'View Logs', - 'VIEW_LATEST_POST' => 'View latest post', - 'VIEW_NEWEST_POST' => 'View latest unread post', + 'VIEW_LATEST_POST' => 'View the latest post', + 'VIEW_NEWEST_POST' => 'View first unread post', 'VIEW_NOTES' => 'View user notes', 'VIEW_ONLINE_TIME' => 'This data is based on users active over the past %d minute', 'VIEW_ONLINE_TIMES' => 'This data is based on users active over the past %d minutes', @@ -622,17 +644,18 @@ $lang = array_merge($lang, array( 'WRONG_DATA_WEBSITE' => 'The website address has to be a valid URL, including the protocol. For example http://www.example.com/.', 'YEAR' => 'Year', + 'YEAR_MONTH_DAY' => '(YYYY-MM-DD)', 'YES' => 'Yes', 'YIM' => 'YIM', 'YOU_LAST_VISIT' => 'Last visit was: %s', - 'YOU_NEW_PM' => 'A new private message is waiting for you in your Inbox', - 'YOU_NEW_PMS' => 'New private messages are waiting for you in your Inbox', - 'YOU_NO_NEW_PM' => 'No new private messages are waiting for you', + 'YOU_NEW_PM' => 'A new private message is waiting for you in your Inbox.', + 'YOU_NEW_PMS' => 'New private messages are waiting for you in your Inbox.', + 'YOU_NO_NEW_PM' => 'No new private messages are waiting for you.', 'datetime' => array( - 'TODAY' => 'Today, ', - 'TOMORROW' => 'Tomorrow, ', - 'YESTERDAY' => 'Yesterday, ', + 'TODAY' => 'Today', + 'TOMORROW' => 'Tomorrow', + 'YESTERDAY' => 'Yesterday', 'Sunday' => 'Sunday', 'Monday' => 'Monday', @@ -667,7 +690,7 @@ $lang = array_merge($lang, array( 'Feb' => 'Feb', 'Mar' => 'Mar', 'Apr' => 'Apr', - 'May_short' => 'May', // Short representation of "May". May_short used because in english the short and long date are the same for May. + 'May_short' => 'May', // Short representation of "May". May_short used because in English the short and long date are the same for May. 'Jun' => 'Jun', 'Jul' => 'Jul', 'Aug' => 'Aug', @@ -717,7 +740,7 @@ $lang = array_merge($lang, array( '12.75' => 'UTC + 12:45 hours', '13' => 'UTC + 13 hours', '14' => 'UTC + 14 hours', - 'dst' => '[ DST ]', + 'dst' => '[ DST ]', ), 'tz_zones' => array( @@ -764,12 +787,13 @@ $lang = array_merge($lang, array( // The value is only an example and will get replaced by the current time on view 'dateformats' => array( - '|d M Y| H:i' => '01 Jan 2007 13:37 [Relative days]', 'd M Y, H:i' => '01 Jan 2007, 13:37', 'd M Y H:i' => '01 Jan 2007 13:37', + 'M jS, \'y, H:i' => 'Jan 1st, \'07, 13:37', 'D M d, Y g:i a' => 'Mon Jan 01, 2007 1:37 pm', - 'M jS, y, H:i' => 'Jan 1st, 07, 1:37 pm', - 'F jS, Y, g:i a' => 'January 1st, 2007, 1:37 pm' + 'F jS, Y, g:i a' => 'January 1st, 2007, 1:37 pm', + '|d M Y|, H:i' => 'Today, 13:37 / 01 Jan 2007, 13:37', + '|F jS, Y|, g:i a' => 'Today, 1:37 pm / January 1st, 2007, 1:37 pm' ), // The default dateformat which will be used on new installs in this language diff --git a/phpBB/language/en/email/admin_send_email.txt b/phpBB/language/en/email/admin_send_email.txt index b778496258..6687404527 100644 --- a/phpBB/language/en/email/admin_send_email.txt +++ b/phpBB/language/en/email/admin_send_email.txt @@ -1,9 +1,9 @@ -The following is an email sent to you by an administrator of "{SITENAME}". If this message is spam, contains abusive or other comments you find offensive please contact the webmaster of the board at the following address: +The following is an e-mail sent to you by an administrator of "{SITENAME}". If this message is spam, contains abusive or other comments you find offensive please contact the webmaster of the board at the following address: {CONTACT_EMAIL} -Include this full email (particularly the headers). +Include this full e-mail (particularly the headers). Message sent to you follows: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/phpBB/language/en/email/admin_welcome_activated.txt b/phpBB/language/en/email/admin_welcome_activated.txt index 0e4658b969..c16a403f00 100644 --- a/phpBB/language/en/email/admin_welcome_activated.txt +++ b/phpBB/language/en/email/admin_welcome_activated.txt @@ -2,6 +2,6 @@ Subject: Account activated Hello {USERNAME}, -Your account on "{SITENAME}" has now been activated, you may login using the username and password you received in a previous email. +Your account on "{SITENAME}" has now been activated, you may login using the username and password you received in a previous e-mail. {EMAIL_SIG} \ No newline at end of file diff --git a/phpBB/language/en/email/admin_welcome_inactive.txt b/phpBB/language/en/email/admin_welcome_inactive.txt index 29d5e7d818..0d75f33c18 100644 --- a/phpBB/language/en/email/admin_welcome_inactive.txt +++ b/phpBB/language/en/email/admin_welcome_inactive.txt @@ -2,14 +2,14 @@ Subject: Welcome to "{SITENAME}" - {U_BOARD} {WELCOME_MSG} -Please keep this email for your records. Your account information is as follows: +Please keep this e-mail for your records. Your account information is as follows: ---------------------------- Username: {USERNAME} Password: {PASSWORD} ---------------------------- -Your account is currently inactive, the administrator of the board will need to activate it before you can log in. You will receive another email when this has occurred. +Your account is currently inactive, the administrator of the board will need to activate it before you can log in. You will receive another e-mail when this has occurred. Please do not forget your password as it has been encrypted in our database and we cannot retrieve it for you. However, should you forget your password you can request a new one which will be activated in the same way as this account. diff --git a/phpBB/language/en/email/coppa_resend_inactive.txt b/phpBB/language/en/email/coppa_resend_inactive.txt index a69f9086b2..b1e45213e9 100644 --- a/phpBB/language/en/email/coppa_resend_inactive.txt +++ b/phpBB/language/en/email/coppa_resend_inactive.txt @@ -16,7 +16,7 @@ OR mail it to: Permission to participate at "{SITENAME}" Username: {USERNAME} -Email: {EMAIL_ADDRESS} +E-mail: {EMAIL_ADDRESS} I HAVE REVIEWED THE INFORMATION PROVIDED BY MY CHILD AND HEREBY GRANT PERMISSION TO "{SITENAME}" TO STORE THIS INFORMATION. I UNDERSTAND THIS INFORMATION CAN BE CHANGED AT ANY TIME BY ENTERING A PASSWORD. diff --git a/phpBB/language/en/email/coppa_welcome_inactive.txt b/phpBB/language/en/email/coppa_welcome_inactive.txt index 1cb28f65bd..1167502c8a 100644 --- a/phpBB/language/en/email/coppa_welcome_inactive.txt +++ b/phpBB/language/en/email/coppa_welcome_inactive.txt @@ -17,7 +17,7 @@ Permission to participate at "{SITENAME}" Username: {USERNAME} Password: {PASSWORD} -Email: {EMAIL_ADDRESS} +E-mail: {EMAIL_ADDRESS} I HAVE REVIEWED THE INFORMATION PROVIDED BY MY CHILD AND HEREBY GRANT PERMISSION TO "{SITENAME}" TO STORE THIS INFORMATION. I UNDERSTAND THIS INFORMATION CAN BE CHANGED AT ANY TIME BY ENTERING A PASSWORD. diff --git a/phpBB/language/en/email/email_notify.txt b/phpBB/language/en/email/email_notify.txt index 725b52f0cc..0d0ac7fc28 100644 --- a/phpBB/language/en/email/email_notify.txt +++ b/phpBB/language/en/email/email_notify.txt @@ -1,8 +1,8 @@ -Subject: "{SITENAME}" - Email a friend +Subject: "{SITENAME}" - E-mail a friend Hello {TO_USERNAME}, -This email was sent from "{SITENAME}" by {FROM_USERNAME} who thought you may be interested in the following topic: +This e-mail was sent from "{SITENAME}" by {FROM_USERNAME} who thought you may be interested in the following topic: {TOPIC_NAME} @@ -10,7 +10,7 @@ You can find it at: {U_TOPIC} -A message from {FROM_USERNAME} may also be included below. Please note that this message has not been seen or approved by the board administrators. If you wish to complain about having received this email please contact the board administrator at {BOARD_CONTACT}. Please quote the message headers when contacting this address. +A message from {FROM_USERNAME} may also be included below. Please note that this message has not been seen or approved by the board administrators. If you wish to complain about having received this e-mail please contact the board administrator at {BOARD_CONTACT}. Please quote the message headers when contacting this address. ---------- diff --git a/phpBB/language/en/email/installed.txt b/phpBB/language/en/email/installed.txt index 61cd345774..4d9286bd65 100644 --- a/phpBB/language/en/email/installed.txt +++ b/phpBB/language/en/email/installed.txt @@ -4,7 +4,7 @@ Congratulations, You have successfully installed phpBB on your server. -This email contains important information on your installation that you should keep safe. The password has been encrypted in the database and cannot be recovered, although you can request a new password should you lose this one +This e-mail contains important information on your installation that you should keep safe. The password has been encrypted in the database and cannot be recovered, although you can request a new password should you lose this one. ---------------------------- Username: {USERNAME} diff --git a/phpBB/language/en/email/profile_send_email.txt b/phpBB/language/en/email/profile_send_email.txt index 3e63777c9f..9fb19e7eb1 100644 --- a/phpBB/language/en/email/profile_send_email.txt +++ b/phpBB/language/en/email/profile_send_email.txt @@ -1,11 +1,11 @@ Hello {TO_USERNAME}, -The following is an email sent to you by {FROM_USERNAME} via your account on "{SITENAME}". If this message is spam, contains abusive or other comments you find offensive please contact the webmaster of the board at the following address: +The following is an e-mail sent to you by {FROM_USERNAME} via your account on "{SITENAME}". If this message is spam, contains abusive or other comments you find offensive please contact the webmaster of the board at the following address: {BOARD_CONTACT} -Include this full email (particularly the headers). Please note that the reply address to this email has been set to that of {FROM_USERNAME}. +Include this full e-mail (particularly the headers). Please note that the reply address to this e-mail has been set to that of {FROM_USERNAME}. Message sent to you follows ~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/phpBB/language/en/email/topic_notify.txt b/phpBB/language/en/email/topic_notify.txt index dc36eed5f5..3c8c38cf0a 100644 --- a/phpBB/language/en/email/topic_notify.txt +++ b/phpBB/language/en/email/topic_notify.txt @@ -10,7 +10,7 @@ If you want to view the newest post made since your last visit, click the follow If you want to view the topic, click the following link: {U_TOPIC} -If you no longer wish to watch this topic you can either click the "Stop watching this topic" link found at the bottom of the topic above, or by clicking the following link: +If you no longer wish to watch this topic you can either click the "Unsubscribe topic" link found at the bottom of the topic above, or by clicking the following link: {U_STOP_WATCHING_TOPIC} diff --git a/phpBB/language/en/email/user_reactivate_account.txt b/phpBB/language/en/email/user_reactivate_account.txt new file mode 100644 index 0000000000..444933b633 --- /dev/null +++ b/phpBB/language/en/email/user_reactivate_account.txt @@ -0,0 +1,19 @@ +Subject: Reactivate your account on "{SITENAME}" - {U_BOARD} + +A board administrator forced your account to be reactivated. Your account is currently inactive. +Please follow the steps listed here to reactivate your account. + +Please keep this e-mail for your records. Your account information is as follows: + +---------------------------- +Username: {USERNAME} +---------------------------- + +Your password has been encrypted in our database. Should you forget your password you can request a new one which will be activated in the same way as this account. + +Please visit the following link to reactivate your account: + +{U_ACTIVATE} + + +{EMAIL_SIG} \ No newline at end of file diff --git a/phpBB/language/en/email/user_remind_inactive.txt b/phpBB/language/en/email/user_remind_inactive.txt index 601a9ad6f9..49dea02044 100644 --- a/phpBB/language/en/email/user_remind_inactive.txt +++ b/phpBB/language/en/email/user_remind_inactive.txt @@ -2,7 +2,7 @@ Subject: Inactive account reminder Hello {USERNAME}, -On {REGISTER_DATE} you registered a new account at "{SITENAME}". To date you have not activated this account which is a prerequisite for forum login. For your convenience the activation link is repeated below. +On {REGISTER_DATE} you registered a new account at "{SITENAME}". To date you have not activated this account which is a prerequisite for board login. For your convenience the activation link is repeated below. {U_ACTIVATE} diff --git a/phpBB/language/en/email/user_resend_inactive.txt b/phpBB/language/en/email/user_resend_inactive.txt index 061ffedae1..f0a0034aa5 100644 --- a/phpBB/language/en/email/user_resend_inactive.txt +++ b/phpBB/language/en/email/user_resend_inactive.txt @@ -2,7 +2,7 @@ Subject: Welcome to "{SITENAME}" - {U_BOARD} {WELCOME_MSG} -Please keep this email for your records. Your account information is as follows: +Please keep this e-mail for your records. Your account information is as follows: ---------------------------- Username: {USERNAME} diff --git a/phpBB/language/en/email/user_welcome.txt b/phpBB/language/en/email/user_welcome.txt index 5389e92f4e..52957082fb 100644 --- a/phpBB/language/en/email/user_welcome.txt +++ b/phpBB/language/en/email/user_welcome.txt @@ -2,7 +2,7 @@ Subject: Welcome to "{SITENAME}" - {U_BOARD} {WELCOME_MSG} -Please keep this email for your records. Your account information is as follows: +Please keep this e-mail for your records. Your account information is as follows: ---------------------------- Username: {USERNAME} diff --git a/phpBB/language/en/email/user_welcome_inactive.txt b/phpBB/language/en/email/user_welcome_inactive.txt index 65d0d20a56..3cd5e3c2ea 100644 --- a/phpBB/language/en/email/user_welcome_inactive.txt +++ b/phpBB/language/en/email/user_welcome_inactive.txt @@ -2,7 +2,7 @@ Subject: Welcome to "{SITENAME}" - {U_BOARD} {WELCOME_MSG} -Please keep this email for your records. Your account information is as follows: +Please keep this e-mail for your records. Your account information is as follows: ---------------------------- Username: {USERNAME} diff --git a/phpBB/language/en/groups.php b/phpBB/language/en/groups.php index 2f9f6826e9..9141cc4892 100644 --- a/phpBB/language/en/groups.php +++ b/phpBB/language/en/groups.php @@ -31,10 +31,11 @@ if (empty($lang) || !is_array($lang)) // in a url you again do not need to specify an order e.g., 'Click %sHERE%s' is fine $lang = array_merge($lang, array( - 'ALREADY_DEFAULT_GROUP' => 'The selected group is already your default group', - 'ALREADY_IN_GROUP' => 'You are already a member of the selected group', + 'ALREADY_DEFAULT_GROUP' => 'The selected group is already your default group.', + 'ALREADY_IN_GROUP' => 'You are already a member of the selected group.', + 'ALREADY_IN_GROUP_PENDING' => 'You already requested joining the selected group.', - 'CHANGED_DEFAULT_GROUP' => 'Successfully changed default group', + 'CHANGED_DEFAULT_GROUP' => 'Successfully changed default group.', 'GROUP_AVATAR' => 'Group avatar', 'GROUP_CHANGE_DEFAULT' => 'Are you sure you want to change your default membership to the group “%sâ€?', @@ -42,7 +43,7 @@ $lang = array_merge($lang, array( 'GROUP_DESC' => 'Group description', 'GROUP_HIDDEN' => 'Hidden', 'GROUP_INFORMATION' => 'Usergroup information', - 'GROUP_IS_CLOSED' => 'This is a closed group, where new members cannot automatically join and only upon invitation of a group leader.', + 'GROUP_IS_CLOSED' => 'This is a closed group, new members can only join upon invitation of a group leader.', 'GROUP_IS_FREE' => 'This is a freely open group, all new members are welcome.', 'GROUP_IS_HIDDEN' => 'This is a hidden group, only members of this group can view its membership.', 'GROUP_IS_OPEN' => 'This is an open group, members can apply to join.', @@ -51,7 +52,7 @@ $lang = array_merge($lang, array( 'GROUP_JOIN_CONFIRM' => 'Are you sure you want to join the selected group?', 'GROUP_JOIN_PENDING' => 'Request to join group', 'GROUP_JOIN_PENDING_CONFIRM' => 'Are you sure you want to request joining the selected group?', - 'GROUP_JOINED' => 'Successfully joined selected group', + 'GROUP_JOINED' => 'Successfully joined selected group.', 'GROUP_JOINED_PENDING' => 'Successfully requested group membership. Please wait for a group leader to approve your membership.', 'GROUP_LIST' => 'Manage users', 'GROUP_MEMBERS' => 'Group members', @@ -62,17 +63,17 @@ $lang = array_merge($lang, array( 'GROUP_RESIGN_MEMBERSHIP_CONFIRM' => 'Are you sure you want to resign your membership from the selected group?', 'GROUP_RESIGN_PENDING' => 'Resign a pending group membership', 'GROUP_RESIGN_PENDING_CONFIRM' => 'Are you sure you want to resign your pending membership from the selected group?', - 'GROUP_RESIGNED_MEMBERSHIP' => 'You were successfully removed from the selected group', - 'GROUP_RESIGNED_PENDING' => 'Your pending membership was successfully removed from the selected group', + 'GROUP_RESIGNED_MEMBERSHIP' => 'You were successfully removed from the selected group.', + 'GROUP_RESIGNED_PENDING' => 'Your pending membership was successfully removed from the selected group.', 'GROUP_TYPE' => 'Group type', 'GROUP_UNDISCLOSED' => 'Hidden group', 'FORUM_UNDISCLOSED' => 'Moderating hidden forum(s)', - 'LOGIN_EXPLAIN_GROUP' => 'You need to login to view group details', + 'LOGIN_EXPLAIN_GROUP' => 'You need to login to view group details.', - 'NO_LEADERS' => 'You are not a leader of any group', + 'NO_LEADERS' => 'You are not a leader of any group.', 'NOT_LEADER_OF_GROUP' => 'The requested operation cannot be taken because you are not a leader of the selected group.', - 'NOT_MEMBER_OF_GROUP' => 'The requested operation cannot be taken because you are not a member of the selected group.', + 'NOT_MEMBER_OF_GROUP' => 'The requested operation cannot be taken because you are not a member of the selected group or your membership has not been approved yet.', 'NOT_RESIGN_FROM_DEFAULT_GROUP' => 'You are not allowed to resign from your default group.', 'PRIMARY_GROUP' => 'Primary group', diff --git a/phpBB/language/en/help_bbcode.php b/phpBB/language/en/help_bbcode.php index 63ac19cf28..8c7b4c2329 100644 --- a/phpBB/language/en/help_bbcode.php +++ b/phpBB/language/en/help_bbcode.php @@ -40,15 +40,15 @@ $help = array( ), array( 0 => 'How to create bold, italic and underlined text', - 1 => 'BBCode includes tags to allow you to quickly change the basic style of your text. This is achieved in the following ways:
    • To make a piece of text bold enclose it in [b][/b], eg.

      [b]Hello[/b]

      will become Hello
    • For underlining use [u][/u], for example:

      [u]Good Morning[/u]

      becomes Good Morning
    • To italicise text use [i][/i], eg.

      This is [i]Great![/i]

      would give This is Great!
    ' + 1 => 'BBCode includes tags to allow you to quickly change the basic style of your text. This is achieved in the following ways:
    • To make a piece of text bold enclose it in [b][/b], eg.

      [b]Hello[/b]

      will become Hello
    • For underlining use [u][/u], for example:

      [u]Good Morning[/u]

      becomes Good Morning
    • To italicise text use [i][/i], eg.

      This is [i]Great![/i]

      would give This is Great!
    ' ), array( 0 => 'How to change the text colour or size', - 1 => 'To alter the color or size of your text the following tags can be used. Keep in mind that how the output appears will depend on the viewers browser and system:
    • Changing the colour of text is achieved by wrapping it in [color=][/color]. You can specify either a recognised colour name (eg. red, blue, yellow, etc.) or the hexadecimal triplet alternative, eg. #FFFFFF, #000000. For example, to create red text you could use:

      [color=red]Hello![/color]

      or

      [color=#FF0000]Hello![/color]

      will both output Hello!
    • Changing the text size is achieved in a similar way using [size=][/size]. This tag is dependent on the template the user has selected but the recommended format is a numerical value representing the text size in pixels, starting at 1 (so tiny you will not see it) through to 29 (very large). For example:

      [size=9]SMALL[/size]

      will generally be SMALL

      whereas:

      [size=24]HUGE![/size]

      will be HUGE!
    ' + 1 => 'To alter the colour or size of your text the following tags can be used. Keep in mind that how the output appears will depend on the viewers browser and system:
    • Changing the colour of text is achieved by wrapping it in [color=][/color]. You can specify either a recognised colour name (eg. red, blue, yellow, etc.) or the hexadecimal triplet alternative, eg. #FFFFFF, #000000. For example, to create red text you could use:

      [color=red]Hello![/color]

      or

      [color=#FF0000]Hello![/color]

      will both output Hello!
    • Changing the text size is achieved in a similar way using [size=][/size]. This tag is dependent on the template the user has selected but the recommended format is a numerical value representing the text size in percent, starting at 20 through to 200 (very large) by default. For example:

      [size=30]SMALL[/size]

      will generally be SMALL

      whereas:

      [size=200]HUGE![/size]

      will be HUGE!
    ' ), array( 0 => 'Can I combine formatting tags?', - 1 => 'Yes, of course you can, for example to get someones attention you may write:

    [size=18][color=red][b]LOOK AT ME![/b][/color][/size]

    this would output LOOK AT ME!

    We don’t recommend you output lots of text that looks like this though! Remember it is up to you, the poster to ensure tags are closed correctly. For example the following is incorrect:

    [b][u]This is wrong[/b][/u]' + 1 => 'Yes, of course you can, for example to get someones attention you may write:

    [size=150][color=red][b]LOOK AT ME![/b][/color][/size]

    this would output LOOK AT ME!

    We don’t recommend you output lots of text that looks like this though! Remember it is up to you, the poster to ensure tags are closed correctly. For example the following is incorrect:

    [b][u]This is wrong[/b][/u]' ), array( 0 => '--', @@ -56,11 +56,11 @@ $help = array( ), array( 0 => 'Quoting text in replies', - 1 => 'There are two ways you can quote text, with a reference or without.
    • When you utilise the Quote function to reply to a post on the board you should notice that the post text is added to the message window enclosed in a [quote=""][/quote] block. This method allows you to quote with a reference to a person or whatever else you choose to put! For example to quote a piece of text Mr. Blobby wrote you would enter:

      [quote="Mr. Blobby"]The text Mr. Blobby wrote would go here[/quote]

      The resulting output will automatically add, Mr. Blobby wrote: before the actual text. Remember you must include the parenthesis "" around the name you are quoting, they are not optional.
    • The second method allows you to blindly quote something. To utilise this enclose the text in [quote][/quote] tags. When you view the message it will simply show, Quote: before the text itself.
    ' + 1 => 'There are two ways you can quote text, with a reference or without.
    • When you utilise the Quote function to reply to a post on the board you should notice that the post text is added to the message window enclosed in a [quote=""][/quote] block. This method allows you to quote with a reference to a person or whatever else you choose to put! For example to quote a piece of text Mr. Blobby wrote you would enter:

      [quote="Mr. Blobby"]The text Mr. Blobby wrote would go here[/quote]

      The resulting output will automatically add, Mr. Blobby wrote: before the actual text. Remember you must include the quotation marks "" around the name you are quoting, they are not optional.
    • The second method allows you to blindly quote something. To utilise this enclose the text in [quote][/quote] tags. When you view the message it will simply show the text within a quotation block.
    ' ), array( 0 => 'Outputting code or fixed width data', - 1 => 'If you want to output a piece of code or in fact anything that requires a fixed width, eg. Courier type font you should enclose the text in [code][/code] tags, eg.

    [code]echo "This is some code";[/code]

    All formatting used within [code][/code] tags is retained when you later view it.' + 1 => 'If you want to output a piece of code or in fact anything that requires a fixed width, eg. Courier type font you should enclose the text in [code][/code] tags, eg.

    [code]echo "This is some code";[/code]

    All formatting used within [code][/code] tags is retained when you later view it. PHP syntax highlighting can be enabled using [code=php][/code] and is recommended when posting PHP code samples as it improves readability.' ), array( 0 => '--', @@ -68,11 +68,11 @@ $help = array( ), array( 0 => 'Creating an Un-ordered list', - 1 => 'BBCode supports two types of lists, unordered and ordered. They are essentially the same as their HTML equivalents. An unordered list ouputs each item in your list sequentially one after the other indenting each with a bullet character. To create an unordered list you use [list][/list] and define each item within the list using [*]. For example to list your favourite colours you could use:

    [list]
    [*]Red
    [*]Blue
    [*]Yellow
    [/list]

    This would generate the following list:
    • Red
    • Blue
    • Yellow
    ' + 1 => 'BBCode supports two types of lists, unordered and ordered. They are essentially the same as their HTML equivalents. An unordered list outputs each item in your list sequentially one after the other indenting each with a bullet character. To create an unordered list you use [list][/list] and define each item within the list using [*]. For example to list your favourite colours you could use:

    [list]
    [*]Red
    [*]Blue
    [*]Yellow
    [/list]

    This would generate the following list:
    • Red
    • Blue
    • Yellow
    ' ), array( 0 => 'Creating an Ordered list', - 1 => 'The second type of list, an ordered list gives you control over what is output before each item. To create an ordered list you use [list=1][/list] to create a numbered list or alternatively [list=a][/list] for an alphabetical list. As with the unordered list items are specified using [*]. For example:

    [list=1]
    [*]Go to the shops
    [*]Buy a new computer
    [*]Swear at computer when it crashes
    [/list]

    will generate the following:
    1. Go to the shops
    2. Buy a new computer
    3. Swear at computer when it crashes
    Whereas for an alphabetical list you would use:

    [list=a]
    [*]The first possible answer
    [*]The second possible answer
    [*]The third possible answer
    [/list]

    giving
    1. The first possible answer
    2. The second possible answer
    3. The third possible answer
    ' + 1 => 'The second type of list, an ordered list gives you control over what is output before each item. To create an ordered list you use [list=1][/list] to create a numbered list or alternatively [list=a][/list] for an alphabetical list. As with the unordered list items are specified using [*]. For example:

    [list=1]
    [*]Go to the shops
    [*]Buy a new computer
    [*]Swear at computer when it crashes
    [/list]

    will generate the following:
    1. Go to the shops
    2. Buy a new computer
    3. Swear at computer when it crashes
    Whereas for an alphabetical list you would use:

    [list=a]
    [*]The first possible answer
    [*]The second possible answer
    [*]The third possible answer
    [/list]

    giving
    1. The first possible answer
    2. The second possible answer
    3. The third possible answer
    ' ), array( 0 => '--', @@ -80,7 +80,7 @@ $help = array( ), array( 0 => 'Linking to another site', - 1 => 'phpBB BBCode supports a number of ways of creating URIs, Uniform Resource Indicators better known as URLs.
    • The first of these uses the [url=][/url] tag, whatever you type after the = sign will cause the contents of that tag to act as a URL. For example to link to phpBB.com you could use:

      [url=http://www.phpbb.com/]Visit phpBB![/url]

      This would generate the following link, Visit phpBB! You will notice the link opens in a new window so the user can continue browsing the forums if they wish.
    • If you want the URL itself displayed as the link you can do this by simply using:

      [url]http://www.phpbb.com/[/url]

      This would generate the following link, http://www.phpbb.com/
    • Additionally phpBB features something called Magic Links, this will turn any syntactically correct URL into a link without you needing to specify any tags or even the leading http://. For example typing www.phpbb.com into your message will automatically lead to www.phpbb.com being output when you view the message.
    • The same thing applies equally to email addresses, you can either specify an address explicitly for example:

      [email]no.one@domain.adr[/email]

      which will output no.one@domain.adr or you can just type no.one@domain.adr into your message and it will be automatically converted when you view.
    As with all the BBCode tags you can wrap URLs around any of the other tags such as [img][/img] (see next entry), [b][/b], etc. As with the formatting tags it is up to you to ensure the correct open and close order is following, for example:

    [url=http://www.google.com/][img]http://www.google.com/intl/en_ALL/images/logo.gif[/url][/img]

    is not correct which may lead to your post being deleted so take care.' + 1 => 'phpBB BBCode supports a number of ways of creating URIs, Uniform Resource Indicators better known as URLs.
    • The first of these uses the [url=][/url] tag, whatever you type after the = sign will cause the contents of that tag to act as a URL. For example to link to phpBB.com you could use:

      [url=http://www.phpbb.com/]Visit phpBB![/url]

      This would generate the following link, Visit phpBB! Please notice that the link opens in the same window or a new window depending on the users browser preferences.
    • If you want the URL itself displayed as the link you can do this by simply using:

      [url]http://www.phpbb.com/[/url]

      This would generate the following link, http://www.phpbb.com/
    • Additionally phpBB features something called Magic Links, this will turn any syntactically correct URL into a link without you needing to specify any tags or even the leading http://. For example typing www.phpbb.com into your message will automatically lead to www.phpbb.com being output when you view the message.
    • The same thing applies equally to e-mail addresses, you can either specify an address explicitly for example:

      [email]no.one@domain.adr[/email]

      which will output no.one@domain.adr or you can just type no.one@domain.adr into your message and it will be automatically converted when you view.
    As with all the BBCode tags you can wrap URLs around any of the other tags such as [img][/img] (see next entry), [b][/b], etc. As with the formatting tags it is up to you to ensure the correct open and close order is following, for example:

    [url=http://www.google.com/][img]http://www.google.com/intl/en_ALL/images/logo.gif[/url][/img]

    is not correct which may lead to your post being deleted so take care.' ), array( 0 => '--', @@ -88,7 +88,7 @@ $help = array( ), array( 0 => 'Adding an image to a post', - 1 => 'phpBB BBCode incorporates a tag for including images in your posts. Two very important things to remember when using this tag are; many users do not appreciate lots of images being shown in posts and secondly the image you display must already be available on the internet (it cannot exist only on your computer for example, unless you run a webserver!). To display an image you must surround the URL pointing to the image with [img][/img] tags. For example:

    [img]http://www.google.com/intl/en_ALL/images/logo.gif[/img]

    As noted in the URL section above you can wrap an image in a [url][/url] tag if you wish, eg.

    [url=http://www.google.com/][img]http://www.google.com/intl/en_ALL/images/logo.gif[/img][/url]

    would generate:

    ' + 1 => 'phpBB BBCode incorporates a tag for including images in your posts. Two very important things to remember when using this tag are; many users do not appreciate lots of images being shown in posts and secondly the image you display must already be available on the internet (it cannot exist only on your computer for example, unless you run a webserver!). To display an image you must surround the URL pointing to the image with [img][/img] tags. For example:

    [img]http://www.google.com/intl/en_ALL/images/logo.gif[/img]

    As noted in the URL section above you can wrap an image in a [url][/url] tag if you wish, eg.

    [url=http://www.google.com/][img]http://www.google.com/intl/en_ALL/images/logo.gif[/img][/url]

    would generate:

    ' ), array( 0 => 'Adding attachments into a post', diff --git a/phpBB/language/en/help_faq.php b/phpBB/language/en/help_faq.php index 49192f91d5..e37efbba6c 100644 --- a/phpBB/language/en/help_faq.php +++ b/phpBB/language/en/help_faq.php @@ -40,35 +40,35 @@ $help = array( ), array( 0 => 'Why do I get logged off automatically?', - 1 => 'If you do not check the Log me in automatically box when you login the board will only keep you logged in for a preset time. This prevents misuse of your account by anyone else. To stay logged in check the box during login, this is not recommended if you access the board from a shared computer, e.g. library, internet cafe, university computer lab, etc. If you do not see this check box, it means your administrator has disabled this feature.' + 1 => 'If you do not check the Log me in automatically box when you login, the board will only keep you logged in for a preset time. This prevents misuse of your account by anyone else. To stay logged in, check the box during login. This is not recommended if you access the board from a shared computer, e.g. library, internet cafe, university computer lab, etc. If you do not see this checkbox, it means the board administrator has disabled this feature.' ), array( 0 => 'How do I prevent my username appearing in the online user listings?', - 1 => 'Within the UCP under “Forum preferences†you will find an option Hide your online status, if you enable this option with Yes, you’ll only appear to the administrators, moderators or yourself. You will be counted as a hidden user.' + 1 => 'Within your User Control Panel, under “Board preferencesâ€, you will find the option Hide your online status. Enable this option with Yesand you will only appear to the administrators, moderators and yourself. You will be counted as a hidden user.' ), array( 0 => 'I’ve lost my password!', - 1 => 'Don’t panic! While your password cannot be retrieved, it can be reset. To do this go to the login page and click I’ve forgotten my password, follow the instructions and you should be able to log in again in no time.' + 1 => 'Don’t panic! While your password cannot be retrieved, it can easily be reset. Visit the login page and click I’ve forgotten my password. Follow the instructions and you should be able to log in again shortly.' ), array( 0 => 'I registered but cannot login!', - 1 => 'Firstly check your are entering the correct username and password. If they are okay then one of two things may have happened. If COPPA support is enabled and you clicked the I am under 13 years old link while registering then you will have to follow the instructions you received. If this is not the case then does your account need activating? Some boards will require all new registrations be activated, either by yourself or by the administrator before you can logon. When you registered it would have told you whether activation was required. If you were sent an email then follow the instructions, if you did not receive the email then are you sure your email address is valid? One reason activation is used is to reduce the possibility of rogue users abusing the board anonymously. If you are sure the email address you used is valid then try contacting the board administrator.' + 1 => 'First, check your username and password. If they are correct, then one of two things may have happened. If COPPA support is enabled and you specified being under 13 years old during registration, you will have to follow the instructions you received. Some boards will also require new registrations to be activated, either by yourself or by an administrator before you can logon; this information was present during registration. If you were sent an e-mail, follow the instructions. If you did not receive an e-mail, you may have provided an incorrect e-mail address or the e-mail may have been picked up by a spam filer. If you are sure the e-mail address you provided is correct, try contacting an administrator.' ), array( 0 => 'I registered in the past but cannot login any more?!', - 1 => 'The most likely reasons for this are; you entered an incorrect username or password (check the email you were sent when you first registered) or the administrator has deleted your account for some reason. If it is the later case then perhaps you did not post anything? It is usual for boards to periodically remove users who have not posted anything so as to reduce the size of the database. Try registering again and get involved in discussions.' + 1 => 'Attempt to locate the e-mail sent to you when you first registered, check your username and password and try again. It is possible an administrator has deactivated or deleted your account for some reason. Also, many boards periodically remove users who have not posted for a long time to reduce the size of the database. If this has happened, try registering again and being more involved in discussions.' ), array( 0 => 'What is COPPA?', - 1 => 'COPPA, or Child Online Privacy and Protection Act of 1998 is a law in the United States that requires website that can potentially collect information from minors under the age of 13 to have written parental consent, or some other method of the legal guardians acknowledging they are allowing the collection of personally identifiable information from a minor under the age of 13. If you are unsure if this applies to you as someone trying to register, or to the website you are trying to register on, contact legal counsel for assistance. Please note that the phpBB Team cannot provide legal advice and are not the point of contact for legal concerns of any kind, except as outlined below.', + 1 => 'COPPA, or the Child Online Privacy and Protection Act of 1998, is a law in the United States requiring websites which can potentially collect information from minors under the age of 13 to have written parental consent or some other method of legal guardian acknowledgment, allowing the collection of personally identifiable information from a minor under the age of 13. If you are unsure if this applies to you as someone trying to register or to the website you are trying to register on, contact legal counsel for assistance. Please note that the phpBB Group cannot provide legal advice and is not a point of contact for legal concerns of any kind, except as outlined below.', ), array( 0 => 'Why can’t I register?', - 1 => 'It is possible the website owner has banned your IP address or disallowed the username you are attempting to register. The website owner could have also disabled registration to prevent new visitors from signing up. Contact the board administrator for assistance.', + 1 => 'It is possible the website owner has banned your IP address or disallowed the username you are attempting to register. The website owner could have also disabled registration to prevent new visitors from signing up. Contact a board administrator for assistance.', ), array( 0 => 'What does the “Delete all board cookies†do?', - 1 => 'Delete all board cookies deletes the cookies created by phpBB3 which keeps you authenticated and logged into the board, and also provides functions such as read tracking if set by the board owner.', + 1 => '“Delete all board cookiesâ€deletes the cookies created by phpBB which keep you authenticated and logged into the board. It also provides functions such as read tracking if they have been enabled by the board owner. If you are having login or logout problems, deleting board cookies may help.', ), array( 0 => '--', @@ -76,31 +76,31 @@ $help = array( ), array( 0 => 'How do I change my settings?', - 1 => 'All your settings (if you are registered) are stored in the database. To alter them click the UCP link (generally shown at the top of pages but this may not be the case). This will allow you to change all your settings and preferences.' + 1 => 'If you are a registered user, all your settings are stored in the board database. To alter them, visit your User Control Panel; a link can usually be found at the top of board pages. This system will allow you to change all your settings and preferences.' ), array( 0 => 'The times are not correct!', - 1 => 'Though there are rare occurrences of the website’s server having the wrong time, the times are probably correct. However; what you may be seeing are times displayed in a timezone different from the one you are in. If this is the case you should change your profile setting for the timezone to match your particular area, e.g. London, Paris, New York, Sydney, etc. Please note that changing the timezone, like most settings can only be done by registered users. So if you are not registered this is a good time to do so, if you pardon the pun!' + 1 => 'It is possible the time displayed is from a timezone different from the one you are in. If this is the case, visit your User Control Panel and change your timezone to match your particular area, e.g. London, Paris, New York, Sydney, etc. Please note that changing the timezone, like most settings, can only be done by registered users. If you are not registered, this is a good time to do so.' ), array( 0 => 'I changed the timezone and the time is still wrong!', - 1 => 'If you are sure you have set the timezone correctly and the time is still different the most likely answer is daylight savings time (or summer time as it is known in the UK and other places). The board is not designed to handle the changeovers between standard and daylight time so during summer months the time may be an hour different from the real local time.' + 1 => 'If you are sure you have set the timezone and Summer Time/DST correctly and the time is still incorrect, then the time stored on the server clock is incorrect. Please notify an administrator to correct the problem.' ), array( 0 => 'My language is not in the list!', - 1 => 'The most likely reasons for this are either the administrator did not install your language or someone has not translated this board into your language. Try asking the board administrator if they can install the language pack you need, if it does not exist then please feel free to create a new translation. More information can be found at the phpBB Group website (see link at bottom of pages).' + 1 => 'Either the administrator has not installed your language or someone has not translated this board into your language. Try asking the board administrator if they can install the language pack you need. If the language pack does not exist, feel free to create a new translation. More information can be found at the phpBB website (see link at the bottom of board pages).' ), array( 0 => 'How do I show an image below my username?', - 1 => 'There may be two images below a username when viewing posts. The first is an image associated with your rank, generally these take the form of stars or blocks indicating how many posts you have made or your status on the board. Below this may be a larger image known as an avatar, this is generally unique or personal to each user. It is up to the board administrator to enable avatars and they have a choice over the way in which avatars can be made available. If you are unable to use avatars then this is the decision of the board admin, you should ask them their reasons.' + 1 => 'There are two images that may appear below a username when viewing posts. Depending on the used style, the first may be an image associated with your rank, generally in the form of stars, blocks or dots, indicating how many posts you have made or your status on the board. The second, usually a larger image, is known as an avatar and is generally unique or personal to each user. It is up to the board administrator to enable avatars and to choose the way in which avatars can be made available. If you are unable to use avatars, contact a board administrator and ask them for their reasons.' ), array( - 0 => 'How do I change my rank?', - 1 => 'In general you cannot directly change the wording of any rank (ranks appear below your username in topics and on your profile depending on the style used). Most boards use ranks to indicate the number of posts you have made and to identify certain users, e.g. moderators and administrators may have a special rank. Please do not abuse the board by posting unnecessarily just to increase your rank, you will probably find the moderator or administrator will simply lower your post count.' + 0 => 'What is my rank and how do I change it?', + 1 => 'Ranks, which appear below your username, indicate the number of posts you have made or identify certain users, e.g. moderators and administrators. In general, you cannot directly change the wording of any board ranks as they are set by the board administrator. Please do not abuse the board by posting unnecessarily just to increase your rank. Most boards will not tolerate this and the moderator or administrator will simply lower your post count.' ), array( - 0 => 'When I click the email link for a user it asks me to login?', - 1 => 'Sorry but only registered users can send email to people via the built-in email form (if the admin has enabled this feature). This is to prevent malicious use of the email system by anonymous users.' + 0 => 'When I click the e-mail link for a user it asks me to login?', + 1 => 'Only registered users can send e-mail to other users via the built-in e-mail form, and only if the administrator has enabled this feature. This is to prevent malicious use of the e-mail system by anonymous users.' ), array( 0 => '--', @@ -108,55 +108,55 @@ $help = array( ), array( 0 => 'How do I post a topic in a forum?', - 1 => 'To post a new topic in one of the forums, click the relevant button on either the forum or topic screens. You may need to register before you can post a message, the facilities available to you are listed at the bottom of the forum and topic screens (the You can post new topics, You can vote in polls, etc. list).' + 1 => 'To post a new topic in a forum, click the relevant button on either the forum or topic screens. You may need to register before you can post a message. A list of your permissions in each forum is available at the bottom of the forum and topic screens. Example: You can post new topics, You can vote in polls, etc.' ), array( 0 => 'How do I edit or delete a post?', - 1 => 'Unless you are the board admin or forum moderator you can only edit or delete your own posts. You can edit a post (sometimes for only a limited time after it was made) by clicking the edit button for the relevant post. If someone has already replied to the post you will find a small piece of text output below the post when you return to the topic, which lists the number of times you edited it along with when. This will not appear if no one has replied, nor will not appear if moderators or administrators edit the post though they may leave a note as to why they’ve edited the post at their own disgression. Please note that normal users cannot delete a post once someone has replied.' + 1 => 'Unless you are a board administrator or moderator, you can only edit or delete your own posts. You can edit a post by clicking the edit button for the relevant post, sometimes for only a limited time after the post was made. If someone has already replied to the post, you will find a small piece of text output below the post when you return to the topic which lists the number of times you edited it along with the date and time. This will only appear if someone has made a reply; it will not appear if a moderator or administrator edited the post, though they may leave a note as to why they’ve edited the post at their own digression. Please note that normal users cannot delete a post once someone has replied.' ), array( 0 => 'How do I add a signature to my post?', - 1 => 'To add a signature to a post you must first create one, this is done via your profile. Once created you can check the Add Signature box on the posting form to add your signature. You can also add a signature by default to all your posts by checking the appropriate radio box in your profile (you can still prevent a signature being added to individual posts by un-checking the add signature box on the posting form).' + 1 => 'To add a signature to a post you must first create one via your User Control Panel. Once created, you can check the Add signature box on the posting form to add your signature. You can also add a signature by default to all your posts by checking the appropriate radio button in your profile. If you do so, you can still prevent a signature being added to individual posts by un-checking the add signature box within the posting form.' ), array( 0 => 'How do I create a poll?', - 1 => 'Creating a poll is easy, when you post a new topic (or edit the first post of a topic, if you have permission) you should see an Add Poll form below the main posting box (if you cannot see this then you probably do not have rights to create polls). You should enter a title for the poll and then at least two options (to set an option type in the poll question and click the Add option button. You can also set a time limit for the poll, 0 is an infinite poll. There will be a limit to the number of options you can list, this is set by the board administrator.' + 1 => 'When posting a new topic or editing the first post of a topic, click the “Poll creation†tab below the main posting form; if you cannot see this, you do not have appropriate permissions to create polls. Enter a title and at least two options in the appropriate fields, making sure each option is on a separate line in the textarea. You can also set the number of options users may select during voting under “Options per userâ€, a time limit in days for the poll (0 for infinite duration) and lastly the option to allow users to amend their votes.' + ), + array( + 0 => 'Why can’t I add more poll options?', + 1 => 'The limit for poll options is set by the board administrator. If you feel you need to add more options to your poll then the allowed amount, contact the board administrator.' ), array( 0 => 'How do I edit or delete a poll?', - 1 => 'As with posts, polls can only be edited by the original poster, a moderator or board admin. To edit a poll click the first post in the topic (this always has the poll associated with it). If no one has cast a vote then users can delete the poll or edit any poll option, however if people have already placed votes only moderators or administrators can edit or delete it. This is to prevent people rigging polls by changing options mid-way through a poll' + 1 => 'As with posts, polls can only be edited by the original poster, a moderator or an administrator. To edit a poll, click to edit the first post in the topic; this always has the poll associated with it. If no one has cast a vote, users can delete the poll or edit any poll option. However, if members have already placed votes, only moderators or administrators can edit or delete it. This prevents the poll’s options from being changed mid-way through a poll.' ), array( 0 => 'Why can’t I access a forum?', - 1 => 'Some forums may be limited to certain users or groups. To view, read, post, etc. you may need special authorization, only the forum moderator and board admin can grant this access, you should contact them.' - ), - array( - 0 => 'Why can’t I vote in polls?', - 1 => 'Only registered users can vote in polls (so as to prevent spoofing of results). If you have registered and still cannot vote then you probably do not have appropriate access rights.' + 1 => 'Some forums may be limited to certain users or groups. To view, read, post or perform another action you may need special authorization. Contact a moderator or board administrator to grant you access.' ), array( 0 => 'Why can’t I add attachments?', - 1 => 'The ability to add attachments can be done on a per forum, per group, or per user basis. The board administrator may not have allowed attachments to be added for the specific forum you are posting in, or perhaps only the administrator group can post attachments. Contact the board administrator if you are unsure about why you are unable to add attachments.' + 1 => 'Attachment permissions are granted on a per forum, per group, or per user basis. The board administrator may not have allowed attachments to be added for the specific forum you are posting in, or perhaps only certain groups can post attachments. Contact the board administrator if you are unsure about why you are unable to add attachments.' ), array( 0 => 'Why did I receive a warning?', - 1 => 'Each board administrator has their own set of rules for their site. If they feel you have broken one of their rules, they may issue you a warning. Please note that this is the board administrator’s decision, and the phpBB Group does not have anything to do with the warning on the given site.' + 1 => 'Each board administrator has their own set of rules for their site. If you have broken a rule, you may issued a warning. Please note that this is the board administrator’s decision, and the phpBB Group has nothing to do with the warnings on the given site. Contact the board administrator if you are unsure about why you were issued a warning.' ), array( 0 => 'How can I report posts to a moderator?', - 1 => 'If the board administrator has allowed it, go to the post you want to report and you should see a button that is for reporting posts. Clicking this will walk you through the steps necessary to report the post.' + 1 => 'If the board administrator has allowed it, you should see a button for reporting posts next to the post you wish to report. Clicking this will walk you through the steps necessary to report the post.' ), array( 0 => 'What is the “Save†button for in topic posting?', - 1 => 'This allows you to save messages to be completed and submitted at a later date. To reload them, go to the User Control Panel and follow the self explanatory options there.' + 1 => 'This allows you to save passages to be completed and submitted at a later date. To reload a saved passage, visit the User Control Panel.' ), array( 0 => 'Why does my post need to be approved?', - 1 => 'The board administrator may decide that the forum you are posting to needs to have posts reviewed first. It is also possible that the administrator has placed you in to a group of users whom he or she feels is a group that needs to have their posts reviewed before being submitted to the site. Please contact the board administrator for further details.' + 1 => 'The board administrator may have decided that posts in the forum you are posting to require review before submission. It is also possible that the administrator has placed you in a group of users whose posts require review before submission. Please contact the board administrator for further details.' ), array( 0 => 'How do I bump my topic?', - 1 => 'By clicking the “Bump topic†link when you are viewing it, you can “bump†the topic to the top of the forum on the first page. However, if you do not see this, then topic bumping is disabled. It is also possible to bump the topic simply by replying to it. However, be sure to follow the rules of the site you are visiting.' + 1 => 'By clicking the “Bump topic†link when you are viewing it, you can “bump†the topic to the top of the forum on the first page. However, if you do not see this, then topic bumping may be disabled or the time allowance between bumps has not yet been reached. It is also possible to bump the topic simply by replying to it, however, be sure to follow the board rules when doing so.' ), array( 0 => '--', @@ -164,39 +164,39 @@ $help = array( ), array( 0 => 'What is BBCode?', - 1 => 'BBCode is a special implementation of HTML, whether you can use BBCode is determined by the administrator (you can also disable it on a per post basis from the posting form). BBCode itself is similar in style to HTML, tags are enclosed in square braces [ and ] rather than < and > and it offers greater control over what and how something is displayed. For more information on BBCode see the guide which can be accessed from the posting page.' + 1 => 'BBCode is a special implementation of HTML, offering great formatting control on particular objects in a post. The use of BBCode is granted by the administrator, but it can also be disabled on a per post basis from the posting form. BBCode itself is similar in style to HTML, but tags are enclosed in square brackets [ and ] rather than < and >. For more information on BBCode see the guide which can be accessed from the posting page.' ), array( 0 => 'Can I use HTML?', - 1 => 'No. It is not possible to post HTML on this board and have it rendered as HTML. Most formatting which can be carried out using HTML can also be applied using BBCode instead.' + 1 => 'No. It is not possible to post HTML on this board and have it rendered as HTML. Most formatting which can be carried out using HTML can be applied using BBCode instead.' ), array( 0 => 'What are Smilies?', - 1 => 'Smilies, or Emoticons are small graphical images which can be used to express some feeling using a short code, e.g. :) means happy, :( means sad. The full list of emoticons can be seen via the posting form. Try not to overuse smilies though, they can quickly render a post unreadable and a moderator may decide to edit them out or remove the post altogether. The board administrator may also have set a limit to the number of such smilies you may use within a post.' + 1 => 'Smilies, or Emoticons, are small images which can be used to express a feeling using a short code, e.g. :) denotes happy, while :( denotes sad. The full list of emoticons can be seen in the posting form. Try not to overuse smilies, however, as they can quickly render a post unreadable and a moderator may edit them out or remove the post altogether. The board administrator may also have set a limit to the number of smilies you may use within a post.' ), array( 0 => 'Can I post images?', - 1 => 'Yes, images can be shown in your posts. However; if the administrator has allowed attachments, you may be able to upload the image to the board. Otherwise, you must link to an image stored on a publicly accessible web server, e.g. http://www.example.com/my-picture.gif. You cannot link to pictures stored on your own PC (unless it is a publicly accessible server) nor images stored behind authentication mechanisms, e.g. hotmail or yahoo mailboxes, password protected sites, etc. To display the image use the BBCode [img] tag.' + 1 => 'Yes, images can be shown in your posts. If the administrator has allowed attachments, you may be able to upload the image to the board. Otherwise, you must link to an image stored on a publicly accessible web server, e.g. http://www.example.com/my-picture.gif. You cannot link to pictures stored on your own PC (unless it is a publicly accessible server) nor images stored behind authentication mechanisms, e.g. hotmail or yahoo mailboxes, password protected sites, etc. To display the image use the BBCode [img] tag.' ), array( 0 => 'What are global announcements?', - 1 => 'Global announcements contain important information and you should read them as soon as possible. Global announcements will appear at the top of every forum and also within your User Control Panel. Whether or not you can post a global announcement depends on the permissions required, these are set by the administrator.' + 1 => 'Global announcements contain important information and you should read them whenever possible. They will appear at the top of every forum and within your User Control Panel. Global announcement permissions are granted by the board administrator.' ), array( 0 => 'What are announcements?', - 1 => 'Announcements often contain important information for the forum you are currently reading and you should read them as soon as possible. Announcements appear at the top of every page in the forum to which they are posted. As with global announcements, whether or not you can post an announcement depends on the permissions required, these are set by the administrator.' + 1 => 'Announcements often contain important information for the forum you are currently reading and you should read them whenever possible. Announcements appear at the top of every page in the forum to which they are posted. As with global announcements, announcement permissions are granted by the board administrator.' ), array( 0 => 'What are sticky topics?', - 1 => 'Sticky topics appear below any announcements in viewforum and only on the first page. They are often quite important so you should read them where possible. As with announcements the board administrator determines what permissions are required to post sticky topics in each forum.' + 1 => 'Sticky topics within the forum appear below announcements and only on the first page. They are often quite important so you should read them whenever possible. As with announcements and global announcements, sticky topic permissions are granted by the board administrator.' ), array( 0 => 'What are locked topics?', - 1 => 'Locked topics are set this way by either the forum moderator or board administrator. You cannot reply to locked topics and any poll it contained is automatically ended. Topics may be locked for many reasons.' + 1 => 'Locked topics are topics where users can no longer reply and any poll it contained was automatically ended. Topics may be locked for many reasons and were set this way by either the forum moderator or board administrator. You may also be able to lock your own topics depending on the permissions you are granted by the board administrator.' ), array( 0 => 'What are topic icons?', - 1 => 'Topic icons are images which can be associated with posts to indicate their content. The ability to use topic icons depends on the permissions set by the administrator.' + 1 => 'Topic icons are author chosen images associated with posts to indicate their content. The ability to use topic icons depends on the permissions set by the board administrator.' ), array( 0 => '--', @@ -204,35 +204,35 @@ $help = array( ), array( 0 => 'What are Administrators?', - 1 => 'Administrators are people assigned the highest level of control over the entire board. These people can control all facets of board operation which includes setting permissions, banning users, creating usergroups or moderators, etc, dependant on the board founder and what permissions he or she has given the other administrators. They can also have full moderator capabilities in all the forums, depending on what the board founder has allowed.' + 1 => 'Administrators are members assigned with the highest level of control over the entire board. These members can control all facets of board operation, including setting permissions, banning users, creating usergroups or moderators, etc., dependent upon the board founder and what permissions he or she has given the other administrators. They may also have full moderator capabilities in all forums, depending on the settings put forth by the board founder.' ), array( 0 => 'What are Moderators?', - 1 => 'Moderators are individuals (or groups of individuals) whose job it is to look after the running of the forums from day to day. They have the power to edit or delete posts and lock, unlock, move, delete and split topics in the forum they moderate. Generally moderators are there to prevent people going off-topic or posting abusive or offensive material.' + 1 => 'Moderators are individuals (or groups of individuals) who look after the forums from day to day. They have the authority to edit or delete posts and lock, unlock, move, delete and split topics in the forum they moderate. Generally, moderators are present to prevent users from going off-topic or posting abusive or offensive material.' ), array( - 0 => 'What are Usergroups?', - 1 => 'Usergroups are a way in which board administrators can group users. Each user can belong to several groups (this differs from most other boards) and each group can be assigned individual access rights. This makes it easy for administrators to set up several users as moderators of a forum, or to give them access to a private forum, etc.' + 0 => 'What are usergroups?', + 1 => 'Usergroups are groups of users that divide the community into manageable sections board administrators can work with. Each user can belong to several groups and each group can be assigned individual permissions. This provides an easy way for administrators to change permissions for many users at once, such as changing moderator permissions or granting users access to a private forum.' ), array( - 0 => 'How do I join a Usergroup?', - 1 => 'To join a Usergroup click the Usergroup link within your User Control Panel, you can then view all usergroups. Not all groups are open access, some may require approval to join, some are closed and some may even have hidden memberships. If the group is open then you can join it by clicking the appropriate button. If a group requires approval to join you may request to join it by clicking the appropriate button. The user group leader will need to approve your request, they may ask why you want to join the group. Please do not pester a group leader if they turn your request down, they will have their reasons.' + 0 => 'Where are the usergroups and how do I join one?', + 1 => 'You can view all usergroups by via the “Usergroups†link within your User Control Panel. If you would like to join one, proceed by clicking the appropriate button. Not all groups have open access, however. Some may require approval to join, some may be closed and some may even have hidden memberships. If the group is open, you can join it by clicking the appropriate button. If a group requires approval to join you may request to join by clicking the appropriate button. The user group leader will need to approve your request and may ask why you want to join the group. Please do not harass a group leader if they reject your request; they will have their reasons.' ), array( - 0 => 'How do I become a Usergroup Leader?', - 1 => 'When Usergroups are initially created by the board administrator, they also assign a Usergroup leader. If you are interested in creating a Usergroup then your first point of contact should be the administrator, try sending them a private message.' + 0 => 'How do I become a usergroup leader?', + 1 => 'A usergroup leader is usually assigned when usergroups are initially created by a board administrator. If you are interested in creating a usergroup, your first point of contact should be an administrator; try sending a private message.', ), array( - 0 => 'Why do some Usergroups appear in a different colour?', + 0 => 'Why do some usergroups appear in a different colour?', 1 => 'It is possible for the board administrator to assign a colour to the members of a usergroup to make it easy to identify the members of this group.' ), array( - 0 => 'What is a “Default Usergroupâ€?', + 0 => 'What is a “Default usergroupâ€?', 1 => 'If you are a member of more than one usergroup, your default is used to determine which group colour and group rank should be shown for you by default. The board administrator may grant you permission to change your default usergroup via your User Control Panel.' ), array( 0 => 'What is “The team†link?', - 1 => 'This page provides you with a list of the board staff, including board administrators and moderators which includes details of which forums they moderate.' + 1 => 'This page provides you with a list of board staff, including board administrators and moderators and other details such as the forums they moderate.' ), array( 0 => '--', @@ -240,35 +240,35 @@ $help = array( ), array( 0 => 'I cannot send private messages!', - 1 => 'There are three reasons for this; you are not registered and/or not logged on, the board administrator has disabled private messaging for the entire board, or the board administrator has prevented you from sending messages. If it is the latter case you should try asking the administrator why.' + 1 => 'There are three reasons for this; you are not registered and/or not logged on, the board administrator has disabled private messaging for the entire board, or the board administrator has prevented you from sending messages. Contact a board administrator for more information.' ), array( 0 => 'I keep getting unwanted private messages!', - 1 => 'You may block a user from sending you private messages by using message rules within your User Control Panel. If you are receiving abusive private messages from someone inform the board admin, they have the power to prevent a user from sending private messages at all.' + 1 => 'You can block a user from sending you private messages by using message rules within your User Control Panel. If you are receiving abusive private messages from a particular user, inform a board administrator; they have the power to prevent a user from sending private messages.' ), array( - 0 => 'I have received a spamming or abusive email from someone on this board!', - 1 => 'We are sorry to hear that. The email form feature of this board includes safeguards to try and track users who send such posts. You should email the board administrator with a full copy of the email you received, it is very important this include the headers (these list details of the user that sent the email). They can then take action.' + 0 => 'I have received a spamming or abusive e-mail from someone on this board!', + 1 => 'We are sorry to hear that. The e-mail form feature of this board includes safeguards to try and track users who send such posts, so e-mail the board administrator with a full copy of the e-mail you received. It is very important that this includes the headers that contain the details of the user that sent the e-mail. The board administrator can then take action.' ), array( 0 => '--', 1 => 'Friends and Foes' ), array( - 0 => 'What is my Friends and Foes list?', - 1 => 'You can use these lists to organise other members of the forum. Members added to your friends list will be listed within your User Control Panel for quick access to see their online status and to send them private messages. Subject to template support, posts from these users may also be highlighted. If you add a user to your foes list then any posts made by them will be hidden by default.' + 0 => 'What are my Friends and Foes lists?', + 1 => 'You can use these lists to organise other members of the board. Members added to your friends list will be listed within your User Control Panel for quick access to see their online status and to send them private messages. Subject to template support, posts from these users may also be highlighted. If you add a user to your foes list, any posts they make will be hidden by default.' ), array( - 0 => 'How can I add / remove users to my friends or foes list?', - 1 => 'You can add users to your list in two ways. Within each user’s profile, there is a link to add them to either your friend or foe list. Alternatively from your User Control Panel, you can directly add users by entering their member name. You may also remove users from your list using the same page.' + 0 => 'How can I add / remove users to my Friends or Foes list?', + 1 => 'You can add users to your list in two ways. Within each user’s profile, there is a link to add them to either your Friend or Foe list. Alternatively, from your User Control Panel, you can directly add users by entering their member name. You may also remove users from your list using the same page.' ), array( 0 => '--', 1 => 'Searching the Forums' ), array( - 0 => 'How can I search the forum?', - 1 => 'By entering a search term in the search box located on the index view, forum view or topic view. Advanced search can be accessed by clicking the “Search†link which is available on all pages on the forum.' + 0 => 'How can I search a forum or forums?', + 1 => 'Enter a search term in the search box located on the index, forum or topic pages. Advanced search can be accessed by clicking the “Advance Search†link which is available on all pages on the forum. How to access the search may depend on the style used.' ), array( 0 => 'Why does my search return no results?', @@ -276,11 +276,11 @@ $help = array( ), array( 0 => 'Why does my search return a blank page!?', - 1 => 'Your search returned too many results for the webserver to handle. Use Advanced search and be more specific in the terms used and forums that are to be searched.' + 1 => 'Your search returned too many results for the webserver to handle. Use “Advanced search†and be more specific in the terms used and forums that are to be searched.' ), array( 0 => 'How do I search for members?', - 1 => 'Go to the “Members†page and click the “Find a member†link. Once there, fill out the self explanatory options.' + 1 => 'Visit to the “Members†page and click the “Find a member†link.' ), array( 0 => 'How can I find my own posts and topics?', @@ -292,15 +292,15 @@ $help = array( ), array( 0 => 'What is the difference between bookmarking and subscribing?', - 1 => 'Bookmarking in phpBB3 is much like bookmarking in your web browser. You aren’t necessarily alerted when there’s an update, but you can later come back to the topic. To contrast that with subscribing, subscribing will notify you when there is an update to the topic or forum on the board via your preferred method or methods.' + 1 => 'Bookmarking in phpBB3 is much like bookmarking in your web browser. You aren’t alerted when there’s an update, but you can come back to the topic later. Subscribing, however, will notify you when there is an update to the topic or forum on the board via your preferred method or methods.' ), array( 0 => 'How do I subscribe to specific forums or topics?', - 1 => 'To subscribe to a specific forum, once you enter the forum, you will see a “Subscribe to forum†link. This will subscribe you to the forum just like you would for a topic. To subscribe to a topic, you can either reply to the topic and check the checkbox to subscribe or you can click the link that says subscribe to topic from within the topic itself.' + 1 => 'To subscribe to a specific forum, click the “Subscribe forum†link upon entering the forum. To subscribe to a topic, reply to the topic with the subscribe checkbox checked or click the “Subscribe topic†link within the topic itself.' ), array( 0 => 'How do I remove my subscriptions?', - 1 => 'To remove your subscriptions, you simply go to your User Control Panel, or UCP for short, and follow the links to your subscriptions.' + 1 => 'To remove your subscriptions, go to your User Control Panel and follow the links to your subscriptions.' ), array( 0 => '--', @@ -312,7 +312,7 @@ $help = array( ), array( 0 => 'How do I find all my attachments?', - 1 => 'To find your list of attachments that you have uploaded, go to your User Control Panel, or UCP, and follow the links to the attachments section.' + 1 => 'To find your list of attachments that you have uploaded, go to your User Control Panel and follow the links to the attachments section.' ), array( 0 => '--', @@ -320,15 +320,15 @@ $help = array( ), array( 0 => 'Who wrote this bulletin board?', - 1 => 'This software (in its unmodified form) is produced, released and is copyright phpBB Group. It is made available under the GNU General Public Licence and may be freely distributed, see link for more details' + 1 => 'This software (in its unmodified form) is produced, released and is copyright phpBB Group. It is made available under the GNU General Public License and may be freely distributed. See the link for more details.' ), array( 0 => 'Why isn’t X feature available?', - 1 => 'This software was written by and licensed through phpBB Group. If you believe a feature needs to be added then please visit the phpbb.com website and see what phpBB Group have to say. Please do not post feature requests to the board at phpbb.com, the Group uses sourceforge to handle tasking of new features. Please read through the forums and see what, if any, our position may already be for a feature and then follow the procedure given there.' + 1 => 'This software was written by and licensed through phpBB Group. If you believe a feature needs to be added, please visit the phpbb.com website and see what phpBB Group have to say. Please do not post feature requests to the board at phpbb.com, the group uses SourceForge to handle tasking of new features. Please read through the forums and see what, if any, our position may already be for a feature and then follow the procedure given there.' ), array( 0 => 'Who do I contact about abusive and/or legal matters related to this board?', - 1 => 'You should contact the administrator of this board. If you cannot find who this you should first contact one of the forum moderators and ask them who you should in turn contact. If still get no response you should contact the owner of the domain (do a whois lookup) or, if this is running on a free service (e.g. yahoo, free.fr, f2s.com, etc.), the management or abuse department of that service. Please note that phpBB Group has absolutely no control and cannot in any way be held liable over how, where or by whom this board is used. It is absolutely pointless contacting phpBB Group in relation to any legal (cease and desist, liable, defamatory comment, etc.) matter not directly related to the phpbb.com website or the discrete software of phpBB itself. If you do email phpBB Group about any third party use of this software then you should expect a terse response or no response at all.' + 1 => 'Any of the administrators listed on the “The team†page should be an appropriate point of contact for your complaints. If this still gets no response then you should contact the owner of the domain (do a whois lookup) or, if this is running on a free service (e.g. Yahoo!, free.fr, f2s.com, etc.), the management or abuse department of that service. Please note that the phpBB Group has absolutely no jurisdiction and cannot in any way be held liable over how, where or by whom this board is used. Do not contact the phpBB Group in relation to any legal (cease and desist, liable, defamatory comment, etc.) matter not directly related to the phpBB.com website or the discrete software of phpBB itself. If you do e-mail phpBB Group about any third party use of this software then you should expect a terse response or no response at all.' ) ); diff --git a/phpBB/language/en/install.php b/phpBB/language/en/install.php index 42e0cf5ccf..fa176cbaea 100755 --- a/phpBB/language/en/install.php +++ b/phpBB/language/en/install.php @@ -34,10 +34,10 @@ $lang = array_merge($lang, array( 'ADMIN_CONFIG' => 'Administrator configuration', 'ADMIN_PASSWORD' => 'Administrator password', 'ADMIN_PASSWORD_CONFIRM' => 'Confirm administrator password', - 'ADMIN_PASSWORD_EXPLAIN' => '(Please enter a password between 6 and 30 characters in length)', + 'ADMIN_PASSWORD_EXPLAIN' => '(Please enter a password between 6 and 30 characters in length.)', 'ADMIN_TEST' => 'Check administrator settings', 'ADMIN_USERNAME' => 'Administrator username', - 'ADMIN_USERNAME_EXPLAIN' => '(Please enter a username between 3 and 20 characters in length)', + 'ADMIN_USERNAME_EXPLAIN' => '(Please enter a username between 3 and 20 characters in length.)', 'APP_MAGICK' => 'Imagemagick support [ Attachments ]', 'AUTHOR_NOTES' => 'Author notes
    » %s', 'AVAILABLE' => 'Available', @@ -46,7 +46,7 @@ $lang = array_merge($lang, array( 'BEGIN_CONVERT' => 'Begin conversion', 'BLANK_PREFIX_FOUND' => 'A scan of your tables has shown a valid installation using no table prefix.', 'BOARD_NOT_INSTALLED' => 'No installation found', - 'BOARD_NOT_INSTALLED_EXPLAIN' => 'To perform a conversion you need to have a default installation of phpBB3. Please note that for a conversion the new installation and the old installation need to reside within the same database. You may now want to perform an installation.', + 'BOARD_NOT_INSTALLED_EXPLAIN' => 'The phpBB Unified Convertor Framework requires a default installation of phpBB3 to function, please proceed by first installing phpBB3.', 'CATEGORY' => 'Category', 'CACHE_STORE' => 'Cache type', @@ -54,33 +54,38 @@ $lang = array_merge($lang, array( 'CAT_CONVERT' => 'Convert', 'CAT_INSTALL' => 'Install', 'CAT_OVERVIEW' => 'Overview', + 'CAT_UPDATE' => 'Update', 'CHANGE' => 'Change', 'CHECK_TABLE_PREFIX' => 'Please check your table prefix and try again.', 'CLEAN_VERIFY' => 'Cleaning up and verifying the final structure', + 'COLLIDING_CLEAN_USERNAME' => '%s is the clean username for:', + 'COLLIDING_USERNAMES_FOUND' => 'Colliding usernames were found on your old board. In order to complete the conversion please delete or rename these users so that there is only one user on your old board for each clean username.', + 'COLLIDING_USER' => '» user id: %d username: %s (%d posts)', 'CONFIG_CONVERT' => 'Converting the configuration', - 'CONFIG_FILE_UNABLE_WRITE' => 'It was not possible to write the configuration file. Alternative methods for this file to be created are presented below', - 'CONFIG_FILE_WRITTEN' => 'The configuration file has been written. You may now proceed to the next step of the installation', + 'CONFIG_FILE_UNABLE_WRITE' => 'It was not possible to write the configuration file. Alternative methods for this file to be created are presented below.', + 'CONFIG_FILE_WRITTEN' => 'The configuration file has been written. You may now proceed to the next step of the installation.', 'CONFIG_PHPBB_EMPTY' => 'The phpBB3 config variable for "%s" is empty.', 'CONFIG_RETRY' => 'Retry', - 'CONTACT_EMAIL_CONFIRM' => 'Confirm contact email', + 'CONTACT_EMAIL_CONFIRM' => 'Confirm contact e-mail', 'CONTINUE_CONVERT' => 'Continue conversion', 'CONTINUE_CONVERT_BODY' => 'A previous conversion attempt has been determined. You are now able to choose between starting a new conversion or continuing the conversion.', 'CONTINUE_LAST' => 'Continue last statements', 'CONTINUE_OLD_CONVERSION' => 'Continue previously started conversion', 'CONVERT' => 'Convert', 'CONVERT_COMPLETE' => 'Conversion completed', - 'CONVERT_COMPLETE_EXPLAIN' => 'You have now successfully converted your board to phpBB 3.0. You can now login and access your forum. Remember that help on using phpBB is available online via the Userguide and the Beta support forum', + 'CONVERT_COMPLETE_EXPLAIN' => 'You have now successfully converted your board to phpBB 3.0. You can now login and access your board. Remember that help on using phpBB is available online via the Documentation and the support forums.', 'CONVERT_INTRO' => 'Welcome to the phpBB Unified Convertor Framework', - 'CONVERT_INTRO_BODY' => 'From here, you are able to import data from other (installed) forum systems. The list below shows all the conversion modules currently available. If there is no convertor shown in this list for the forum software you wish to convert from, please check our website where further conversion modules may be available for download.', + 'CONVERT_INTRO_BODY' => 'From here, you are able to import data from other (installed) board systems. The list below shows all the conversion modules currently available. If there is no convertor shown in this list for the board software you wish to convert from, please check our website where further conversion modules may be available for download.', 'CONVERT_NEW_CONVERSION' => 'New conversion', - 'CONVERT_NOT_EXIST' => 'The specified convertor does not exist', - 'CONVERT_SETTINGS_VERIFIED' => 'The information you entered has been verified. To start the conversion progress, push the button below to begin', + 'CONVERT_NOT_EXIST' => 'The specified convertor does not exist.', + 'CONVERT_SETTINGS_VERIFIED' => 'The information you entered has been verified. To start the conversion process, push the button below to begin.', + 'CONV_ERR_FATAL' => 'Fatal conversion error', 'CONV_ERROR_ATTACH_FTP_DIR' => 'FTP upload for attachments is enabled at the old board. Please disable the FTP upload option and make sure a valid upload directory is specified, then copy all attachment files to this new web accessible directory. Once you have done this, restart the convertor.', 'CONV_ERROR_CONFIG_EMPTY' => 'There is no configuration information available for the conversion.', 'CONV_ERROR_FORUM_ACCESS' => 'Unable to get forum access information.', 'CONV_ERROR_GET_CATEGORIES' => 'Unable to get categories.', - 'CONV_ERROR_GET_CONFIG' => 'Could not retrieve your forum configuration.', + 'CONV_ERROR_GET_CONFIG' => 'Could not retrieve your board configuration.', 'CONV_ERROR_COULD_NOT_READ' => 'Unable to access/read "%s".', 'CONV_ERROR_GROUP_ACCESS' => 'Unable to get group authentication information.', 'CONV_ERROR_INCONSISTENT_GROUPS' => 'Inconsistency in groups table detected in add_bots() - you need to add all special groups if you do it manually.', @@ -89,7 +94,7 @@ $lang = array_merge($lang, array( 'CONV_ERROR_INSERT_USER_GROUP' => 'Unable to insert user into user_group table.', 'CONV_ERROR_MESSAGE_PARSER' => 'Message parser error', 'CONV_ERROR_NO_AVATAR_PATH' => 'Note to developer: you must specify $convertor[\'avatar_path\'] to use %s.', - 'CONV_ERROR_NO_FORUM_PATH' => 'The relative path to the source forum has not been specified.', + 'CONV_ERROR_NO_FORUM_PATH' => 'The relative path to the source board has not been specified.', 'CONV_ERROR_NO_GALLERY_PATH' => 'Note to developer: you must specify $convertor[\'avatar_gallery_path\'] to use %s.', 'CONV_ERROR_NO_GROUP' => 'Group "%1$s" could not be found in %2$s.', 'CONV_ERROR_NO_RANKS_PATH' => 'Note to developer: you must specify $convertor[\'ranks_path\'] to use %s.', @@ -103,17 +108,17 @@ $lang = array_merge($lang, array( 'CONV_ERROR_WRONG_GROUP' => 'Wrong group "%1$s" defined in %2$s.', 'CONV_SAVED_MESSAGES' => 'Saved messages', - 'COULD_NOT_COPY' => 'Could not copy file %1$s to %2$s

    Please check that the target directory exists and is writable by the webserver', - 'COULD_NOT_FIND_PATH' => 'Could not find path to your former forum. Please check your settings and try again.
    » Specified source path was %s', + 'COULD_NOT_COPY' => 'Could not copy file %1$s to %2$s

    Please check that the target directory exists and is writable by the webserver.', + 'COULD_NOT_FIND_PATH' => 'Could not find path to your former board. Please check your settings and try again.
    » Specified source path was %s.', 'DBMS' => 'Database type', 'DB_CONFIG' => 'Database configuration', 'DB_CONNECTION' => 'Database connection', - 'DB_ERR_INSERT' => 'Error while processing INSERT query', - 'DB_ERR_LAST' => 'Error while processing query_last', - 'DB_ERR_QUERY_FIRST' => 'Error while executing query_first', - 'DB_ERR_QUERY_FIRST_TABLE' => 'Error while executing query_first, %s ("%s")', - 'DB_ERR_SELECT' => 'Error while running SELECT query', + 'DB_ERR_INSERT' => 'Error while processing INSERT query.', + 'DB_ERR_LAST' => 'Error while processing query_last.', + 'DB_ERR_QUERY_FIRST' => 'Error while executing query_first.', + 'DB_ERR_QUERY_FIRST_TABLE' => 'Error while executing query_first, %s ("%s").', + 'DB_ERR_SELECT' => 'Error while running SELECT query.', 'DB_HOST' => 'Database server hostname or DSN', 'DB_HOST_EXPLAIN' => 'DSN stands for Data Source Name and is relevant only for ODBC installs.', 'DB_NAME' => 'Database name', @@ -123,8 +128,8 @@ $lang = array_merge($lang, array( 'DB_USERNAME' => 'Database username', 'DB_TEST' => 'Test connection', 'DEFAULT_LANG' => 'Default board language', - 'DEFAULT_PREFIX_IS' => 'The convertor was not able to find tables with the specified prefix. Please make sure you have the old within the same database as your phpBB 3.0.x installation. The default table prefix for %1$s is %2$s', - 'DEV_NO_TEST_FILE' => 'No value has been specified for the test_file variable in the convertor. If you are a user of this convertor, you should not be seeing this error, please report this message to the convertor author. If you are a convertor author, you must specify the name of a file which exists in the source forum to allow the path to it to be verified.', + 'DEFAULT_PREFIX_IS' => 'The convertor was not able to find tables with the specified prefix. Please make sure you have entered the correct details for the board you are converting from. The default table prefix for %1$s is %2$s.', + 'DEV_NO_TEST_FILE' => 'No value has been specified for the test_file variable in the convertor. If you are a user of this convertor, you should not be seeing this error, please report this message to the convertor author. If you are a convertor author, you must specify the name of a file which exists in the source board to allow the path to it to be verified.', 'DIRECTORIES_AND_FILES' => 'Directory and file setup', 'DISABLE_KEYS' => 'Disabling keys', 'DLL_FIREBIRD' => 'Firebird', @@ -145,73 +150,95 @@ $lang = array_merge($lang, array( 'DL_DOWNLOAD' => 'Download', 'DONE' => 'Done', - 'ENABLE_KEYS' => 'Re-enabling keys. This can take a while', + 'ENABLE_KEYS' => 'Re-enabling keys. This can take a while.', 'FILES_OPTIONAL' => 'Optional files and directories', 'FILES_OPTIONAL_EXPLAIN' => 'Optional - These files, directories or permission settings are not required. The installation system will attempt to use various techniques to create them if they do not exist or cannot be written to. However, the presence of these will speed installation.', 'FILES_REQUIRED' => 'Files and Directories', - 'FILES_REQUIRED_EXPLAIN' => 'Required - In order to function correctly phpBB needs to be able to access or write to certain files or directories. If you see “Not Found†you need to create the relevant file or directory. If you see “Unwriteable†you need to change the permissions on the file or directory to allow phpBB to write to it.', + 'FILES_REQUIRED_EXPLAIN' => 'Required - In order to function correctly phpBB needs to be able to access or write to certain files or directories. If you see “Not Found†you need to create the relevant file or directory. If you see “Unwritable†you need to change the permissions on the file or directory to allow phpBB to write to it.', 'FILLING_TABLE' => 'Filling table %s', 'FILLING_TABLES' => 'Filling tables', 'FINAL_STEP' => 'Processing final step', - 'FORUM_ADDRESS' => 'Forum address', - 'FORUM_ADDRESS_EXPLAIN' => 'This is the URL of your former forum, for example http://www.example.com/phpBB2/. If an address is entered here and not left empty every instance of this address will be replaced by your new forum address within messages, private messages and signatures.', - 'FORUM_PATH' => 'Forum path', - 'FORUM_PATH_EXPLAIN' => 'This is the relative path on disk to your former forum from the root of your phpBB install', + 'FORUM_ADDRESS' => 'Board address', + 'FORUM_ADDRESS_EXPLAIN' => 'This is the URL of your former board, for example http://www.example.com/phpBB2/. If an address is entered here and not left empty every instance of this address will be replaced by your new board address within messages, private messages and signatures.', + 'FORUM_PATH' => 'Board path', + 'FORUM_PATH_EXPLAIN' => 'This is the relative path on disk to your former board from the root of your phpBB installation.', 'FOUND' => 'Found', 'FTP_CONFIG' => 'Transfer config by FTP', - 'FTP_CONFIG_EXPLAIN' => 'phpBB has detected the presence of the FTP module on this server. You may attempt to install your config.php via this if you wish. You will need to supply the information listed below. Remember your username and password are those to your server! (ask your hosting provider for details if you are unsure what these are)', + 'FTP_CONFIG_EXPLAIN' => 'phpBB has detected the presence of the FTP module on this server. You may attempt to install your config.php via this if you wish. You will need to supply the information listed below. Remember your username and password are those to your server! (ask your hosting provider for details if you are unsure what these are).', 'FTP_PATH' => 'FTP path', - 'FTP_PATH_EXPLAIN' => 'This is the path from your root directory to that of phpBB, e.g. htdocs/phpBB3/', + 'FTP_PATH_EXPLAIN' => 'This is the path from your root directory to that of phpBB, e.g. htdocs/phpBB3/.', 'FTP_UPLOAD' => 'Upload', 'GPL' => 'General Public License', - + 'INITIAL_CONFIG' => 'Basic configuration', 'INITIAL_CONFIG_EXPLAIN' => 'Now that install has determined your server can run phpBB you need to supply some specific information. If you do not know how to connect to your database please contact your hosting provider (in the first instance) or use the phpBB support forums. When entering data please ensure you check it thoroughly before continuing.', - 'INSTALL_CONGRATS' => 'Congratulations', - 'INSTALL_CONGRATS_EXPLAIN' => 'You have now successfully installed phpBB 3.0. Clicking the button below will take you to your Administration Control Panel (ACP). Take some time to examine the options available to you. Remember that help is available online via the Userguide and the Beta support forum, see the %sREADME%s for further information.

    Please now delete, move or rename the install directory before you use your forum. If this directory is still present, only the Administration Control Panel (ACP) will be accessible.', + 'INSTALL_CONGRATS' => 'Congratulations!', + 'INSTALL_CONGRATS_EXPLAIN' => ' +

    You have now successfully installed phpBB %1$s. From here, you have two options as to what to do with your newly installed phpBB3:

    +

    Convert an existing board to phpBB3

    +

    The phpBB Unified Convertor Framework supports the conversion of phpBB 2.0.x and other board systems to phpBB3. If you have an existing board that you wish to convert, please proceed on to the convertor.

    +

    Go live with your phpBB3!

    +

    Clicking the button below will take you to your Administration Control Panel (ACP). Take some time to examine the options available to you. Remember that help is available online via the Documentation and the support forums, see the README for further information.

    Please now delete, move or rename the install directory before you use your board. If this directory is still present, only the Administration Control Panel (ACP) will be accessible.

    ', 'INSTALL_INTRO' => 'Welcome to Installation', - 'INSTALL_INTRO_BODY' => 'With this option, it is possible to install phpBB onto your server.

    In order to proceed, you will need the following information on hand:

    +// TODO: write some more introductions here + 'INSTALL_INTRO_BODY' => 'With this option, it is possible to install phpBB onto your server.

    In order to proceed, you will need your database settings. If you do not know your database settings, please contact your host and ask for them. You will not be able to continue without them. You need:

    +
      -
    • Database server name
    • -
    • Database name
    • -
    • Database username and password
    • +
    • The Database Type - the database you will be using.
    • +
    • The Database server hostname or DSN - the address of the database server.
    • +
    • The Database server port - the port of the database server (most of the time this is not needed).
    • +
    • The Database name - the name of the database on the server.
    • +
    • The Database username and Database password - the login data to access the database.
    -

    Some more introductory text can go here…', + +

    Note: if you are installing using SQLite, you should enter the full path to your database file in the DSN field and leave the username and password fields blank. For security reasons, you should make sure that the database file is not stored in a location accessible from the web.

    + +

    phpBB3 supports the following databases:

    +
      +
    • MySQL 3.23 or above (MySQLi supported)
    • +
    • PostgreSQL 7.3+
    • +
    • SQLite 2.8.2+
    • +
    • Firebird 2.0+
    • +
    • MS SQL Server 2000 or above (directly or via ODBC)
    • +
    • Oracle
    • +
    + +

    Only those databases supported on your server will be displayed.', 'INSTALL_INTRO_NEXT' => 'To commence the installation, please press the button below.', 'INSTALL_LOGIN' => 'Login', 'INSTALL_NEXT' => 'Next stage', 'INSTALL_NEXT_FAIL' => 'Some tests failed and you should correct these problems before proceeding to the next stage. Failure to do so may result in an incomplete installation.', 'INSTALL_NEXT_PASS' => 'All the basic tests have been passed and you may proceed to the next stage of installation. If you have changed any permissions, modules, etc. and wish to re-test you can do so if you wish.', 'INSTALL_PANEL' => 'Installation Panel', - 'INSTALL_SEND_CONFIG' => 'Unfortunately phpBB could not write the configuration information directly to your config.php. This may be because the file does not exist or is not writeable. A number of options will be listed below enabling you to complete installation of config.php.', + 'INSTALL_SEND_CONFIG' => 'Unfortunately phpBB could not write the configuration information directly to your config.php. This may be because the file does not exist or is not writable. A number of options will be listed below enabling you to complete installation of config.php.', 'INSTALL_START' => 'Start install', 'INSTALL_TEST' => 'Test again', 'INST_ERR' => 'Installation error', - 'INST_ERR_DB_CONNECT' => 'Could not connect to the database, see error message below', - 'INST_ERR_DB_FORUM_PATH' => 'The database file specified is within your forum directory tree. You should put this file in a non web-accessible location', - 'INST_ERR_DB_NO_ERROR' => 'No error message given', + 'INST_ERR_DB_CONNECT' => 'Could not connect to the database, see error message below.', + 'INST_ERR_DB_FORUM_PATH' => 'The database file specified is within your board directory tree. You should put this file in a non web-accessible location.', + 'INST_ERR_DB_NO_ERROR' => 'No error message given.', 'INST_ERR_DB_NO_MYSQLI' => 'The version of MySQL installed on this machine is incompatible with the “MySQL with MySQLi Extension†option you have selected. Please try the “MySQL†option instead.', 'INST_ERR_DB_NO_SQLITE' => 'The version of the SQLite extension you have installed is too old, it must be upgraded to at least 2.8.2.', 'INST_ERR_DB_NO_ORACLE' => 'The version of Oracle installed on this machine requires you to set the NLS_CHARACTERSET parameter to UTF8. Either upgrade your installation to 9.2+ or change the parameter.', 'INST_ERR_DB_NO_FIREBIRD' => 'The version of Firebird installed on this machine is older than 2.0, please upgrade to a newer version.', 'INST_ERR_DB_NO_FIREBIRD_PS'=> 'The database you selected for Firebird has a page size less than 8192, it must be at least 8192.', - 'INST_ERR_DB_NO_POSTGRES' => 'The database you have selected was not created in UNICODE or UTF8 encoding. Try installing with a database in UNICODE or UTF8 encoding', - 'INST_ERR_DB_NO_NAME' => 'No database name specified', - 'INST_ERR_EMAIL_INVALID' => 'The email address you entered is invalid', - 'INST_ERR_EMAIL_MISMATCH' => 'The emails you entered did not match.', + 'INST_ERR_DB_NO_POSTGRES' => 'The database you have selected was not created in UNICODE or UTF8 encoding. Try installing with a database in UNICODE or UTF8 encoding.', + 'INST_ERR_DB_NO_NAME' => 'No database name specified.', + 'INST_ERR_EMAIL_INVALID' => 'The e-mail address you entered is invalid.', + 'INST_ERR_EMAIL_MISMATCH' => 'The e-mails you entered did not match.', 'INST_ERR_FATAL' => 'Fatal installation error', - 'INST_ERR_FATAL_DB' => 'A fatal and unrecoverable database error has occurred. This may be because the specified user does not have appropriate rights to CREATE TABLES or INSERT data, etc. Further information may be given below. Please contact your hosting provider in the first instance or the support forums of phpBB for further assistance.', + 'INST_ERR_FATAL_DB' => 'A fatal and unrecoverable database error has occurred. This may be because the specified user does not have appropriate permissions to CREATE TABLES or INSERT data, etc. Further information may be given below. Please contact your hosting provider in the first instance or the support forums of phpBB for further assistance.', 'INST_ERR_FTP_PATH' => 'Could not change to the given directory, please check the path.', - 'INST_ERR_FTP_LOGIN' => 'Could not login to FTP server, check your username and password', - 'INST_ERR_MISSING_DATA' => 'You must fill out all fields in this block', - 'INST_ERR_NO_DB' => 'Cannot load the PHP module for the selected database type', + 'INST_ERR_FTP_LOGIN' => 'Could not login to FTP server, check your username and password.', + 'INST_ERR_MISSING_DATA' => 'You must fill out all fields in this block.', + 'INST_ERR_NO_DB' => 'Cannot load the PHP module for the selected database type.', 'INST_ERR_PASSWORD_MISMATCH' => 'The passwords you entered did not match.', 'INST_ERR_PASSWORD_TOO_LONG' => 'The password you entered is too long. The maximum length is 30 characters.', 'INST_ERR_PASSWORD_TOO_SHORT' => 'The password you entered is too short. The minimum length is 6 characters.', 'INST_ERR_PREFIX' => 'Tables with the specified prefix already exist, please choose an alternative.', - 'INST_ERR_PREFIX_INVALID' => 'The table prefix you have specified is invalid for your database. Please try another, removing characters such as the hyphen', + 'INST_ERR_PREFIX_INVALID' => 'The table prefix you have specified is invalid for your database. Please try another, removing characters such as the hyphen.', 'INST_ERR_PREFIX_TOO_LONG' => 'The table prefix you have specified is too long. The maximum length is %d characters.', 'INST_ERR_USER_TOO_LONG' => 'The username you entered is too long. The maximum length is 20 characters.', 'INST_ERR_USER_TOO_SHORT' => 'The username you entered is too short. The minimum length is 3 characters.', @@ -219,31 +246,35 @@ $lang = array_merge($lang, array( // mbstring 'MBSTRING_CHECK' => 'mbstring extension check', - 'MBSTRING_CHECK_EXPLAIN' => 'mbstring is a PHP extension that provides multibyte string functions. Certain features of mbstring are not compatible with phpBB and must be disabled.', + 'MBSTRING_CHECK_EXPLAIN' => 'Required - mbstring is a PHP extension that provides multibyte string functions. Certain features of mbstring are not compatible with phpBB and must be disabled.', 'MBSTRING_FUNC_OVERLOAD' => 'Function overloading', - 'MBSTRING_FUNC_OVERLOAD_EXPLAIN' => 'mbstring.func_overload must be set to either 0 or 4', + 'MBSTRING_FUNC_OVERLOAD_EXPLAIN' => 'mbstring.func_overload must be set to either 0 or 4.', 'MBSTRING_ENCODING_TRANSLATION' => 'Transparent character encoding', - 'MBSTRING_ENCODING_TRANSLATION_EXPLAIN' => 'mbstring.encoding_translation must be set to 0', + 'MBSTRING_ENCODING_TRANSLATION_EXPLAIN' => 'mbstring.encoding_translation must be set to 0.', 'MBSTRING_HTTP_INPUT' => 'HTTP input character conversion', - 'MBSTRING_HTTP_INPUT_EXPLAIN' => 'mbstring.http_input must be set to pass', + 'MBSTRING_HTTP_INPUT_EXPLAIN' => 'mbstring.http_input must be set to pass.', 'MBSTRING_HTTP_OUTPUT' => 'HTTP output character conversion', - 'MBSTRING_HTTP_OUTPUT_EXPLAIN' => 'mbstring.http_output must be set to pass', + 'MBSTRING_HTTP_OUTPUT_EXPLAIN' => 'mbstring.http_output must be set to pass.', - 'MAKE_FOLDER_WRITABLE' => 'Please make sure that this folder exists and is writable by the webserver then try again:
    »%s', - 'MAKE_FOLDERS_WRITABLE' => 'Please make sure that these folders exist and are writable by the webserver then try again:
    »%s', + 'MAKE_FOLDER_WRITABLE' => 'Please make sure that this folder exists and is writable by the webserver then try again:
    »%s.', + 'MAKE_FOLDERS_WRITABLE' => 'Please make sure that these folders exist and are writable by the webserver then try again:
    »%s.', 'NAMING_CONFLICT' => 'Naming conflict: %s and %s are both aliases

    %s', 'NEXT_STEP' => 'Proceed to next step', 'NOT_FOUND' => 'Cannot find', 'NOT_UNDERSTAND' => 'Could not understand %s #%d, table %s ("%s")', - 'NO_CONVERTORS' => 'No convertors are available for use', - 'NO_CONVERT_SPECIFIED' => 'No convertor specified', - 'NO_LOCATION' => 'Cannot determine location. If you know Imagemagick is installed, you may specify the location later within your Administration Panel', + 'NO_CONVERTORS' => 'No convertors are available for use.', + 'NO_CONVERT_SPECIFIED' => 'No convertor specified.', + 'NO_LOCATION' => 'Cannot determine location. If you know Imagemagick is installed, you may specify the location later within your administration control panel', 'NO_TABLES_FOUND' => 'No tables found.', // TODO: Write some explanatory introduction text - 'OVERVIEW_BODY' => 'Welcome to our public beta of the next-generation of phpBB after 2.0.x, phpBB 3.0! This beta release is intended for advanced users to try out on dedicated development environments to help us finish creating the best Opensource Bulletin Board solution available.

    Note: This release is not final and made available for testing purposes only.

    This installation system will guide you through the process of installing phpBB, converting from a different software package or updating to the latest version of phpBB. For more information on each option, select it from the menu above.', + + 'OVERVIEW_BODY' => 'Welcome to our public release candidate of the next-generation of phpBB after 2.0.x, phpBB 3.0! This release is intended for wider scale use to help us identifying last bugs and problematic areas.

    Please read our installation guide for more information about installing phpBB3

    Note: This release is still not final. You may want to wait for the full final release before running it live.

    This installation system will guide you through the process of installing phpBB, converting from a different software package or updating to the latest version of phpBB. For more information on each option, select it from the menu above.', + 'PCRE_UTF_SUPPORT' => 'PCRE UTF-8 support', - 'PCRE_UTF_SUPPORT_EXPLAIN' => 'phpBB will not run if your PHP installation is not compiled with UTF-8 support in the PCRE extension', + 'PCRE_UTF_SUPPORT_EXPLAIN' => 'phpBB will not run if your PHP installation is not compiled with UTF-8 support in the PCRE extension.', + 'PHP_GETIMAGESIZE_SUPPORT' => 'PHP function getimagesize() is available', + 'PHP_GETIMAGESIZE_SUPPORT_EXPLAIN' => 'Required - In order for phpBB to function correctly, the getimagesize function needs to be available.', 'PHP_OPTIONAL_MODULE' => 'Optional modules', 'PHP_OPTIONAL_MODULE_EXPLAIN' => 'Optional - These modules or applications are optional. However, if they are available they will enable extra features.', 'PHP_SUPPORTED_DB' => 'Supported databases', @@ -253,11 +284,13 @@ $lang = array_merge($lang, array( 'PHP_SAFE_MODE' => 'Safe mode', 'PHP_SETTINGS' => 'PHP version and settings', 'PHP_SETTINGS_EXPLAIN' => 'Required - You must be running at least version 4.3.3 of PHP in order to install phpBB. If safe mode is displayed below your PHP installation is running in that mode. This will impose limitations on remote administration and similar features.', + 'PHP_URL_FOPEN_SUPPORT' => 'PHP setting allow_url_fopen is enabled', + 'PHP_URL_FOPEN_SUPPORT_EXPLAIN' => 'Optional - This setting is optional, however certain phpBB functions like off-site avatars will not work properly without it. ', 'PHP_VERSION_REQD' => 'PHP version >= 4.3.3', 'POST_ID' => 'Post ID', 'PREFIX_FOUND' => 'A scan of your tables has shown a valid installation using %s as table prefix.', 'PREPROCESS_STEP' => 'Executing pre-processing functions/queries', - 'PRE_CONVERT_COMPLETE' => 'All pre-conversion steps have successfully been completed. You may now begin the actual conversion process.', + 'PRE_CONVERT_COMPLETE' => 'All pre-conversion steps have successfully been completed. You may now begin the actual conversion process. Please note that you may have to manually adjust several things. After conversion, especially check the permissions assigned, rebuild your search index if necessary and also make sure files got copied correctly, for example avatars and smilies.', 'PROCESS_LAST' => 'Processing last statements', 'REFRESH_PAGE' => 'Refresh page to continue conversion', @@ -269,10 +302,12 @@ $lang = array_merge($lang, array( 'RETRY_WRITE_EXPLAIN' => 'If you wish you can change the permissions on config.php to allow phpBB to write to it. Should you wish to do that you can click Retry below to try again. Remember to return the permissions on config.php after phpBB has finished installation.', 'SCRIPT_PATH' => 'Script path', - 'SCRIPT_PATH_EXPLAIN' => 'The path where phpBB is located relative to the domain name, e.g. /phpBB3', + 'SCRIPT_PATH_EXPLAIN' => 'The path where phpBB is located relative to the domain name, e.g. /phpBB3.', 'SELECT_LANG' => 'Select language', 'SERVER_CONFIG' => 'Server configuration', - 'SOFTWARE' => 'Forum software', + 'SEARCH_INDEX_UNCONVERTED' => 'Search index was not converted', + 'SEARCH_INDEX_UNCONVERTED_EXPLAIN' => 'Your old search index was not converted. Searching will always yield an empty result. To create a new search index go to the Administration Control Panel, select Maintenance and then choose Search index from the submenu.', + 'SOFTWARE' => 'Board software', 'SPECIFY_OPTIONS' => 'Specify conversion options', 'STAGE_ADMINISTRATOR' => 'Administrator details', 'STAGE_ADVANCED' => 'Advanced settings', @@ -293,26 +328,26 @@ $lang = array_merge($lang, array( 'SUB_SUPPORT' => 'Support', 'SUCCESSFUL_CONNECT' => 'Successful connection', // TODO: Write some text on obtaining support - 'SUPPORT_BODY' => 'During the beta phase a minimal level of support will be given at the phpBB 3.0 Beta support forum. We will provide answers to general setup questions, configuration problems and support for determining common problems mostly related to bugs. We will not support modifications, custom code/style additions or any users using the beta packages within a live environment.

    For additional assistance, please refer to our Quick Start Guide.

    To ensure you stay up to date with the latest news and releases, why not subscribe to our mailing list', + 'SUPPORT_BODY' => 'During the release candidate phase full support will be given at the phpBB 3.0.x support forums. We will provide answers to general setup questions, configuration problems, conversion problems and support for determining common problems mostly related to bugs. We also allow discussions about modifications and custom code/style additions.

    For additional assistance, please refer to our Quick Start Guide and the online documentation.

    To ensure you stay up to date with the latest news and releases, why not subscribe to our mailing list?', 'SYNC_FORUMS' => 'Starting to sync forums', 'SYNC_TOPICS' => 'Starting to sync topics', - 'SYNC_TOPIC_ID' => 'Synchronising topics from topic_id %1$s to %2$s', + 'SYNC_TOPIC_ID' => 'Synchronising topics from topic_id %1$s to %2$s.', 'TABLES_MISSING' => 'Could not find these tables
    » %s.', 'TABLE_PREFIX' => 'Prefix for tables in database', - 'TABLE_PREFIX_SAME' => 'The table prefix needs to be the one used by the software you are converting from.
    » Specified table prefix was %s', + 'TABLE_PREFIX_SAME' => 'The table prefix needs to be the one used by the software you are converting from.
    » Specified table prefix was %s.', 'TESTS_PASSED' => 'Tests passed', 'TESTS_FAILED' => 'Tests failed', - 'UNABLE_WRITE_LOCK' => 'Unable to write lock file', + 'UNABLE_WRITE_LOCK' => 'Unable to write lock file.', 'UNAVAILABLE' => 'Unavailable', - 'UNWRITEABLE' => 'Unwriteable', - 'UPDATE_TOPICS_POSTED' => 'Generating topics posted informations', - + 'UNWRITABLE' => 'Unwritable', + 'UPDATE_TOPICS_POSTED' => 'Generating topics posted information', + 'UPDATE_TOPICS_POSTED_ERR' => 'An error occured while generating topics posted information. You can retry this step in the ACP after the conversion process is completed.', 'VERSION' => 'Version', - 'WELCOME_INSTALL' => 'Welcome to phpBB 3 Installation', - 'WRITEABLE' => 'Writeable', + 'WELCOME_INSTALL' => 'Welcome to phpBB3 Installation', + 'WRITABLE' => 'Writable', )); // Updater @@ -331,7 +366,7 @@ $lang = array_merge($lang, array( 'COLLECTED_INFORMATION' => 'Information on collected files', 'COLLECTED_INFORMATION_EXPLAIN' => 'The list below shows information about the files needing an update. Please read the information in front of every status block to see what they mean and what you may need to do to perform a successful update.', 'COMPLETE_LOGIN_TO_BOARD' => 'You should now login to your board and check if everything is working fine. Do not forget to delete, rename or move your install directory!', - 'CONTINUE_INLINE_UPDATE' => 'The database update was successful. Now please close this window and continue the update process as explained.', + 'CONTINUE_UPDATE_NOW' => 'Continue the update process now', 'CURRENT_FILE' => 'Current original file', 'CURRENT_VERSION' => 'Current version', @@ -352,8 +387,8 @@ $lang = array_merge($lang, array( 'ERROR' => 'Error', - 'FILE_ALREADY_UP_TO_DATE' => 'File is already up to date', - 'FILE_DIFF_NOT_ALLOWED' => 'File not allowed to be diffed', + 'FILE_ALREADY_UP_TO_DATE' => 'File is already up to date.', + 'FILE_DIFF_NOT_ALLOWED' => 'File not allowed to be diffed.', 'FILE_USED' => 'Information used from', // Single file 'FILES_CONFLICT' => 'Conflict files', 'FILES_CONFLICT_EXPLAIN' => 'The following files are modified and do not represent the original files from the old version. phpBB determined that these files create conflicts if they are tried to be merged. Please investigate the conflicts and try to manually resolve them or continue the update choosing the preferred merging method. If you resolve the conflicts manually check the files again after you modified the them. You are also able to choose between the preferred merge method for every file. The first one will result in a file where the conflicting lines from your old file will be lost, the other one will result in loosing the changes from the newer file.', @@ -371,7 +406,8 @@ $lang = array_merge($lang, array( 'FTP_UPDATE_METHOD' => 'FTP upload', 'INCOMPATIBLE_UPDATE_FILES' => 'The update files found are incompatible with your installed version. Your installed version is %1$s and the update file is for updating phpBB %2$s to %3$s.', - 'INCOMPLETE_UPDATE_FILES' => 'The update files are incomplete', + 'INCOMPLETE_UPDATE_FILES' => 'The update files are incomplete.', + 'INLINE_UPDATE_SUCCESSFUL' => 'The database update was successful. Now you need to continue the update process.', 'LATEST_VERSION' => 'Latest version', 'LINE' => 'Line', @@ -389,11 +425,11 @@ $lang = array_merge($lang, array( 'MERGE_SELECT_ERROR' => 'Conflicting file merge modes are not correctly selected.', 'NEW_FILE' => 'New updated file', - 'NO_AUTH_UPDATE' => 'Not authorized to update', + 'NO_AUTH_UPDATE' => 'Not authorised to update', 'NO_ERRORS' => 'No errors', 'NO_UPDATE_FILES' => 'Not updating the following files', 'NO_UPDATE_FILES_EXPLAIN' => 'The following files are new or modified but the directory they normally reside in could not be found on your installation. If this list contains files to other directories than language/ or styles/ than you may have modified your directory structure and the update may be incomplete.', - 'NO_UPDATE_FILES_OUTDATED' => 'No valid update directory was found, please make sure you uploaded the relevant files.

    Your installation does not seem to be up to date. Updates are available for your version of phpBB %1$s, please visit http://www.phpbb.com/downloads.php to obtain the correct package to update from Version %2$s to Version %3$s.', + 'NO_UPDATE_FILES_OUTDATED' => 'No valid update directory was found, please make sure you uploaded the relevant files.

    Your installation does not seem to be up to date. Updates are available for your version of phpBB %1$s, please visit http://www.phpbb.com/downloads/ to obtain the correct package to update from Version %2$s to Version %3$s.', 'NO_UPDATE_FILES_UP_TO_DATE' => 'Your version is up to date. There is no need to run the update tool. If you want to make an integrity check on your files make sure you uploaded the correct update files.', 'NO_UPDATE_INFO' => 'Update file information could not be found.', 'NO_UPDATES_REQUIRED' => 'No updates required', @@ -404,7 +440,7 @@ $lang = array_merge($lang, array( 'OLD_UPDATE_FILES' => 'Update files are out of date. The update files found are for updating from phpBB %1$s to phpBB %2$s but the latest version of phpBB is %3$s.', 'PERFORM_DATABASE_UPDATE' => 'Perform database update', - 'PERFORM_DATABASE_UPDATE_EXPLAIN' => 'Below you will find a link to the database update script. This script needs to be run seperatly because updating the database might result in unexpected behaviour if you are logged in. The database update can take a while, so please do not stop the execution if it seems to hang. After you performed the database update, close the database update window and continue the update process.', + 'PERFORM_DATABASE_UPDATE_EXPLAIN' => 'Below you will find a link to the database update script. This script needs to be run separately because updating the database might result in unexpected behaviour if you are logged in. The database update can take a while, so please do not stop the execution if it seems to hang. After you performed the database update just follow the link presented to continue the update process.', 'PREVIOUS_VERSION' => 'Previous version', 'PROGRESS' => 'Progress', @@ -420,7 +456,7 @@ $lang = array_merge($lang, array( 'SHOW_DIFF_NEW' => 'Show file contents', 'SHOW_DIFF_NEW_CONFLICT' => 'Show differences', 'SHOW_DIFF_NOT_MODIFIED' => 'Show differences', - 'SOME_QUERIES_FAILED' => 'Some queries failed, the statements and errors are listing below', + 'SOME_QUERIES_FAILED' => 'Some queries failed, the statements and errors are listing below.', 'SQL' => 'SQL', 'SQL_FAILURE_EXPLAIN' => 'This is probably nothing to worry about, update will continue. Should this fail to complete you may need to seek help at our support forums. See README for details on how to obtain advice.', 'STAGE_FILE_CHECK' => 'Check files', @@ -455,7 +491,7 @@ $lang = array_merge($lang, array(

    The recommended way of updating your installation only takes the following steps:

      -
    • Go to the phpBB.com downloads page and download the correct "phpBB Update Package" archive.

    • +
    • Go to the phpBB.com downloads page and download the correct "phpBB Update Package" archive.

    • Unpack the archive.

    • Upload the complete uncompressed install folder to your phpBB root directory (where your config.php file is).

    @@ -470,13 +506,13 @@ $lang = array_merge($lang, array( 'UPDATE_METHOD_EXPLAIN' => 'You are now able to choose your preferred update method. Using the FTP upload will present you with a form you need to enter your FTP account details into. With this method the files will be automatically moved to the new location and backups of the old files being created by appending .bak to the filename. If you choose to download the modified files you are able to unpack and upload them to their correct location manually later.', 'UPDATE_SUCCESS' => 'Update was successful', 'UPDATE_SUCCESS_EXPLAIN' => 'Successfully updated all files. The next step involves checking all files again to make sure the files got updated correctly.', - 'UPDATE_VERSION_OPTIMIZE' => 'Updating version and optimizing tables', + 'UPDATE_VERSION_OPTIMIZE' => 'Updating version and optimising tables', 'UPDATING_DATA' => 'Updating data', 'UPDATING_TO_LATEST_STABLE' => 'Updating database to latest stable release', 'UPDATED_VERSION' => 'Updated version', 'UPLOAD_METHOD' => 'Upload method', - 'UPDATE_DB_SUCCESS' => 'Database update was successful', + 'UPDATE_DB_SUCCESS' => 'Database update was successful.', 'VERSION_CHECK' => 'Version check', 'VERSION_CHECK_EXPLAIN' => 'Checks to see if the version of phpBB you are currently running is up to date.', @@ -490,4 +526,56 @@ $lang = array_merge($lang, array( 'WRONG_INFO_FILE_FORMAT' => 'Wrong info file format', )); +// Default database schema entries... +$lang = array_merge($lang, array( + 'CONFIG_BOARD_EMAIL_SIG' => 'Thanks, The Management', + 'CONFIG_SITE_DESC' => 'A _little_ text to describe your forum', + 'CONFIG_SITENAME' => 'yourdomain.com', + + 'DEFAULT_INSTALL_POST' => 'This is an example post in your phpBB3 installation. You may delete this post, this topic and even this forum if you like since everything seems to be working!', + + 'EXT_GROUP_ARCHIVES' => 'Archives', + 'EXT_GROUP_DOCUMENTS' => 'Documents', + 'EXT_GROUP_DOWNLOADABLE_FILES' => 'Downloadable Files', + 'EXT_GROUP_FLASH_FILES' => 'Flash Files', + 'EXT_GROUP_IMAGES' => 'Images', + 'EXT_GROUP_PLAIN_TEXT' => 'Plain Text', + 'EXT_GROUP_QUICKTIME_MEDIA' => 'Quicktime Media', + 'EXT_GROUP_REAL_MEDIA' => 'Real Media', + 'EXT_GROUP_WINDOWS_MEDIA' => 'Windows Media', + + 'FORUMS_FIRST_CATEGORY' => 'My first Category', + 'FORUMS_TEST_FORUM_DESC' => 'This is just a test forum.', + 'FORUMS_TEST_FORUM_TITLE' => 'Test Forum 1', + + 'RANKS_SITE_ADMIN_TITLE' => 'Site Admin', + + 'SMILIES_ARROW' => 'Arrow', + 'SMILIES_CONFUSED' => 'Confused', + 'SMILIES_COOL' => 'Cool', + 'SMILIES_CRYING' => 'Crying or Very Sad', + 'SMILIES_EMARRASSED' => 'Embarrassed', + 'SMILIES_EVIL' => 'Evil or Very Mad', + 'SMILIES_EXCLAMATION' => 'Exclamation', + 'SMILIES_GEEK' => 'Geek', + 'SMILIES_IDEA' => 'Idea', + 'SMILIES_LAUGHING' => 'Laughing', + 'SMILIES_MAD' => 'Mad', + 'SMILIES_MR_GREEN' => 'Mr. Green', + 'SMILIES_NEUTRAL' => 'Neutral', + 'SMILIES_QUESTION' => 'Question', + 'SMILIES_RAZZ' => 'Razz', + 'SMILIES_ROLLING_EYES' => 'Rolling Eyes', + 'SMILIES_SAD' => 'Sad', + 'SMILIES_SHOCKED' => 'Shocked', + 'SMILIES_SMILE' => 'Smile', + 'SMILIES_SURPRISED' => 'Surprised', + 'SMILIES_TWISTED_EVIL' => 'Twisted Evil', + 'SMILIES_UBER_GEEK' => 'Uber Geek', + 'SMILIES_VERY_HAPPY' => 'Very Happy', + 'SMILIES_WINK' => 'Wink', + + 'TOPICS_TOPIC_TITLE' => 'Welcome to phpBB3', +)); + ?> \ No newline at end of file diff --git a/phpBB/language/en/iso.txt b/phpBB/language/en/iso.txt index 2ef8c12962..c421dd4316 100644 --- a/phpBB/language/en/iso.txt +++ b/phpBB/language/en/iso.txt @@ -1,3 +1,3 @@ -English [GB] -English [GB] +British English +British English phpBB Group \ No newline at end of file diff --git a/phpBB/language/en/mcp.php b/phpBB/language/en/mcp.php index 837ae6f9b1..89b57d5d65 100644 --- a/phpBB/language/en/mcp.php +++ b/phpBB/language/en/mcp.php @@ -32,24 +32,25 @@ if (empty($lang) || !is_array($lang)) $lang = array_merge($lang, array( 'ACTION' => 'Action', + 'ACTION_NOTE' => 'Action/Note', 'ADD_FEEDBACK' => 'Add feedback', 'ADD_FEEDBACK_EXPLAIN' => 'If you would like to add a report on this please fill out the following form. Only use plain text; HTML, BBCode, etc. are not permitted.', 'ADD_WARNING' => 'Add warning', 'ADD_WARNING_EXPLAIN' => 'To send a warning to this user please fill out the following form. Only use plain text; HTML, BBCode, etc. are not permitted.', 'ALL_ENTRIES' => 'All entries', - 'ALL_NOTES_DELETED' => 'Successfully removed all user notes', + 'ALL_NOTES_DELETED' => 'Successfully removed all user notes.', 'ALL_REPORTS' => 'All reports', - 'ALREADY_REPORTED' => 'This post has already been reported', - 'ALREADY_WARNED' => 'A warning has already been issued for this post', + 'ALREADY_REPORTED' => 'This post has already been reported.', + 'ALREADY_WARNED' => 'A warning has already been issued for this post.', 'APPROVE' => 'Approve', 'APPROVE_POST' => 'Approve post', 'APPROVE_POST_CONFIRM' => 'Are you sure you want to approve this post?', 'APPROVE_POSTS' => 'Approve posts', 'APPROVE_POSTS_CONFIRM' => 'Are you sure you want to approve the selected posts?', - 'CANNOT_MOVE_SAME_FORUM'=> 'You cannot move a topic to the forum it’s already in', - 'CANNOT_WARN_ANONYMOUS' => 'You cannot warn unregistered guest users', - 'CANNOT_WARN_SELF' => 'You cannot warn yourself', + 'CANNOT_MOVE_SAME_FORUM'=> 'You cannot move a topic to the forum it’s already in.', + 'CANNOT_WARN_ANONYMOUS' => 'You cannot warn unregistered guest users.', + 'CANNOT_WARN_SELF' => 'You cannot warn yourself.', 'CAN_LEAVE_BLANK' => 'This can be left blank.', 'CHANGE_POSTER' => 'Change poster', 'CLOSE_REPORT' => 'Close report', @@ -77,19 +78,19 @@ $lang = array_merge($lang, array( 'DISPLAY_LOG' => 'Display entries from previous', 'DISPLAY_OPTIONS' => 'Display options', - 'EMPTY_REPORT' => 'You must enter a description when selecting this reason', - 'EMPTY_TOPICS_REMOVED_WARNING' => 'Please note that one or several topics have been removed from the database because they were or become empty', + 'EMPTY_REPORT' => 'You must enter a description when selecting this reason.', + 'EMPTY_TOPICS_REMOVED_WARNING' => 'Please note that one or several topics have been removed from the database because they were or become empty.', 'FEEDBACK' => 'Feedback', - 'FORK' => 'Fork', - 'FORK_TOPIC' => 'Fork topic', + 'FORK' => 'Copy', + 'FORK_TOPIC' => 'Copy topic', 'FORK_TOPIC_CONFIRM' => 'Are you sure you want to copy this topic?', - 'FORK_TOPICS' => 'Fork selected topics', + 'FORK_TOPICS' => 'Copy selected topics', 'FORK_TOPICS_CONFIRM' => 'Are you sure you want to copy the selected topics?', 'FORUM_DESC' => 'Description', 'FORUM_NAME' => 'Forum name', - 'FORUM_NOT_EXIST' => 'The forum you selected does not exist', - 'FORUM_NOT_POSTABLE' => 'The forum you selected cannot be posted to', + 'FORUM_NOT_EXIST' => 'The forum you selected does not exist.', + 'FORUM_NOT_POSTABLE' => 'The forum you selected cannot be posted to.', 'FORUM_STATUS' => 'Forum status', 'FORUM_STYLE' => 'Forum style', @@ -100,7 +101,7 @@ $lang = array_merge($lang, array( 'LATEST_LOGS' => 'Latest 5 logged actions', 'LATEST_REPORTED' => 'Latest 5 reports', - 'LATEST_UNAPPROVED' => 'Latest 5 posts awaiting for approval', + 'LATEST_UNAPPROVED' => 'Latest 5 posts awaiting approval', 'LATEST_WARNING_TIME' => 'Latest warning issued', 'LATEST_WARNINGS' => 'Latest 5 warnings', 'LEAVE_SHADOW' => 'Leave shadow topic in place', @@ -122,12 +123,12 @@ $lang = array_merge($lang, array( 'LOOKUP_ALL' => 'Look up all IPs', 'LOOKUP_IP' => 'Look up IP', - 'MARKED_NOTES_DELETED' => 'Successfully removed all marked user notes', + 'MARKED_NOTES_DELETED' => 'Successfully removed all marked user notes.', 'MCP_ADD' => 'Add a warning', 'MCP_BAN' => 'Banning', - 'MCP_BAN_EMAILS' => 'Ban emails', + 'MCP_BAN_EMAILS' => 'Ban e-mails', 'MCP_BAN_IPS' => 'Ban IPs', 'MCP_BAN_USERNAMES' => 'Ban Usernames', @@ -151,7 +152,7 @@ $lang = array_merge($lang, array( 'MCP_MAKE_GLOBALS_CONFIRM' => 'Are you sure you want to change the selected topics to “Global announcementsâ€?', 'MCP_MAKE_STICKY' => 'Modify to “Stickyâ€', 'MCP_MAKE_STICKY_CONFIRM' => 'Are you sure you want to change this topic to a “Stickyâ€?', - 'MCP_MAKE_STICKIES' => 'Modify to “Stickieâ€s', + 'MCP_MAKE_STICKIES' => 'Modify to “Stickiesâ€', 'MCP_MAKE_STICKIES_CONFIRM' => 'Are you sure you want to change the selected topics to “Stickiesâ€?', 'MCP_MAKE_NORMAL' => 'Modify to “Standard Topicâ€', 'MCP_MAKE_NORMAL_CONFIRM' => 'Are you sure you want to change this topic to a “Standard Topicâ€?', @@ -162,19 +163,21 @@ $lang = array_merge($lang, array( 'MCP_NOTES_FRONT' => 'Front page', 'MCP_NOTES_USER' => 'User details', + 'MCP_POST_REPORTS' => 'Reports issued on this post', + 'MCP_REPORTS' => 'Reported posts', 'MCP_REPORT_DETAILS' => 'Report details', 'MCP_REPORTS_CLOSED' => 'Closed reports', - 'MCP_REPORTS_CLOSED_EXPLAIN' => 'This is a list of all reports about posts which have previously been resolved', + 'MCP_REPORTS_CLOSED_EXPLAIN' => 'This is a list of all reports about posts which have previously been resolved.', 'MCP_REPORTS_OPEN' => 'Open reports', - 'MCP_REPORTS_OPEN_EXPLAIN' => 'This is a list of all reported posts which are still to be handled', + 'MCP_REPORTS_OPEN_EXPLAIN' => 'This is a list of all reported posts which are still to be handled.', 'MCP_QUEUE' => 'Moderation queue', 'MCP_QUEUE_APPROVE_DETAILS' => 'Approve details', 'MCP_QUEUE_UNAPPROVED_POSTS' => 'Posts awaiting approval', - 'MCP_QUEUE_UNAPPROVED_POSTS_EXPLAIN' => 'This is a list of all posts which require approving before they will be visible to users', + 'MCP_QUEUE_UNAPPROVED_POSTS_EXPLAIN' => 'This is a list of all posts which require approving before they will be visible to users.', 'MCP_QUEUE_UNAPPROVED_TOPICS' => 'Topics awaiting approval', - 'MCP_QUEUE_UNAPPROVED_TOPICS_EXPLAIN' => 'This is a list of all topics which require approving before they will be visible to users', + 'MCP_QUEUE_UNAPPROVED_TOPICS_EXPLAIN' => 'This is a list of all topics which require approving before they will be visible to users.', 'MCP_VIEW_USER' => 'View warnings for a specific user', @@ -186,9 +189,13 @@ $lang = array_merge($lang, array( 'MERGE_POSTS' => 'Merge posts', 'MERGE_POSTS_CONFIRM' => 'Are you sure you want to merge the selected posts?', - 'MERGE_TOPIC_EXPLAIN' => 'Using the form below you can merge selected posts into another topic. These posts will not be reordered and will appear as if the users posted them to the new topic.
    Please enter the destination topic id or click on the "Select" button to search for one', + 'MERGE_TOPIC_EXPLAIN' => 'Using the form below you can merge selected posts into another topic. These posts will not be reordered and will appear as if the users posted them to the new topic.
    Please enter the destination topic id or click on “Select topic†to search for one.', 'MERGE_TOPIC_ID' => 'Destination topic identification number', + 'MERGE_TOPICS' => 'Merge topics', + 'MERGE_TOPICS_CONFIRM' => 'Are you sure you want to merge the selected topics?', 'MODERATE_FORUM' => 'Moderate forum', + 'MODERATE_TOPIC' => 'Moderate topic', + 'MODERATE_POST' => 'Moderate post', 'MOD_OPTIONS' => 'Moderator options', 'MORE_INFO' => 'Further information', 'MOST_WARNINGS' => 'Users with most warnings', @@ -199,40 +206,43 @@ $lang = array_merge($lang, array( 'NOTIFY_POSTER_APPROVAL' => 'Notify poster about approval?', 'NOTIFY_POSTER_DISAPPROVAL' => 'Notify poster about disapproval?', 'NOTIFY_USER_WARN' => 'Notify user about warning?', - 'NOT_MODERATOR' => 'You are not a moderator of this forum', - 'NO_DESTINATION_FORUM' => 'Please select a forum for destination', + 'NOT_MODERATOR' => 'You are not a moderator of this forum.', + 'NO_DESTINATION_FORUM' => 'Please select a forum for destination.', 'NO_DESTINATION_FORUM_FOUND' => 'There is no destination forum available.', - 'NO_ENTRIES' => 'No log entries for this period', - 'NO_FEEDBACK' => 'No feedback exists for this user', - 'NO_FINAL_TOPIC_SELECTED' => 'You have to select a destination topic for merging posts', - 'NO_MATCHES_FOUND' => 'No matches found', - 'NO_POST' => 'You have to select a post in order to warn the user for a post', + 'NO_ENTRIES' => 'No log entries for this period.', + 'NO_FEEDBACK' => 'No feedback exists for this user.', + 'NO_FINAL_TOPIC_SELECTED' => 'You have to select a destination topic for merging posts.', + 'NO_MATCHES_FOUND' => 'No matches found.', + 'NO_POST' => 'You have to select a post in order to warn the user for a post.', 'NO_POST_REPORT' => 'This post was not reported.', - 'NO_POST_SELECTED' => 'You must select at least one post to perform this action', - 'NO_REASON_DISAPPROVAL' => 'Please give an appropriate reason for disapproval', + 'NO_POST_SELECTED' => 'You must select at least one post to perform this action.', + 'NO_REASON_DISAPPROVAL' => 'Please give an appropriate reason for disapproval.', + 'NO_REPORT' => 'No report found', 'NO_REPORTS' => 'No reports', + 'NO_REPORT_SELECTED' => 'You must select at least one report to perform this action.', 'NO_TOPIC_ICON' => 'None', - 'NO_TOPIC_SELECTED' => 'You must select at least one topic to perform this action', + 'NO_TOPIC_SELECTED' => 'You must select at least one topic to perform this action.', + 'NO_TOPICS_QUEUE' => 'No topics', 'ONLY_TOPIC' => 'Only topic "%s"', - 'OTHER_USERS' => 'Users posting from this IP', + 'OTHER_USERS' => 'Other users posting from this IP', 'POSTER' => 'Poster', - 'POSTS_APPROVED_SUCCESS' => 'The selected posts have been approved', - 'POSTS_DELETED_SUCCESS' => 'The selected posts have been successfully removed from the database', - 'POSTS_DISAPPROVED_SUCCESS' => 'The selected posts have been disapproved', - 'POSTS_LOCKED_SUCCESS' => 'The selected posts have been locked successfully', - 'POSTS_MERGED_SUCCESS' => 'The selected posts have been merged', - 'POSTS_UNLOCKED_SUCCESS' => 'The selected posts have been unlocked successfully', + 'POSTS_APPROVED_SUCCESS' => 'The selected posts have been approved.', + 'POSTS_DELETED_SUCCESS' => 'The selected posts have been successfully removed from the database.', + 'POSTS_DISAPPROVED_SUCCESS' => 'The selected posts have been disapproved.', + 'POSTS_LOCKED_SUCCESS' => 'The selected posts have been locked successfully.', + 'POSTS_MERGED_SUCCESS' => 'The selected posts have been merged.', + 'POSTS_UNLOCKED_SUCCESS' => 'The selected posts have been unlocked successfully.', 'POSTS_PER_PAGE' => 'Posts per page', - 'POSTS_PER_PAGE_EXPLAIN' => '(Set to 0 to view all posts)', - 'POST_APPROVED_SUCCESS' => 'The selected post has been approved', - 'POST_DELETED_SUCCESS' => 'The selected post has been successfully removed from the database', - 'POST_DISAPPROVED_SUCCESS' => 'The selected post has been disapproved', - 'POST_LOCKED_SUCCESS' => 'Post locked successfully', - 'POST_NOT_EXIST' => 'The post you requested does not exist', - 'POST_REPORTED_SUCCESS' => 'This post has been successfully reported', - 'POST_UNLOCKED_SUCCESS' => 'Post unlocked successfully', + 'POSTS_PER_PAGE_EXPLAIN' => '(Set to 0 to view all posts.)', + 'POST_APPROVED_SUCCESS' => 'The selected post has been approved.', + 'POST_DELETED_SUCCESS' => 'The selected post has been successfully removed from the database.', + 'POST_DISAPPROVED_SUCCESS' => 'The selected post has been disapproved.', + 'POST_LOCKED_SUCCESS' => 'Post locked successfully.', + 'POST_NOT_EXIST' => 'The post you requested does not exist.', + 'POST_REPORTED_SUCCESS' => 'This post has been successfully reported.', + 'POST_UNLOCKED_SUCCESS' => 'Post unlocked successfully.', 'READ_USERNOTES' => 'User notes', 'READ_WARNINGS' => 'User warnings', @@ -242,20 +252,20 @@ $lang = array_merge($lang, array( 'REPORTED_ON_DATE' => 'on', 'REPORTS_CLOSED_SUCCESS' => 'The selected reports have been closed successfully.', 'REPORTS_DELETED_SUCCESS' => 'The selected reports have been deleted successfully.', - 'REPORTS_TOTAL' => 'In total there are %d reports to review', - 'REPORTS_ZERO_TOTAL' => 'There are no reports to review', - 'REPORT_CLOSED' => 'This report has previously been closed.', + 'REPORTS_TOTAL' => 'In total there are %d reports to review.', + 'REPORTS_ZERO_TOTAL' => 'There are no reports to review.', + 'REPORT_CLOSED' => 'This report has already been closed.', 'REPORT_CLOSED_SUCCESS' => 'The selected report has been closed successfully.', 'REPORT_DELETED_SUCCESS' => 'The selected report has been deleted successfully.', 'REPORT_DETAILS' => 'Report details', 'REPORT_MESSAGE' => 'Report this message', - 'REPORT_MESSAGE_EXPLAIN' => 'Use this form to report the selected message to the board administrators. Reporting should generally be used only if the message breaks forum rules.', + 'REPORT_MESSAGE_EXPLAIN' => 'Use this form to report the selected message. Reporting should generally be used only if the message breaks forum rules.', 'REPORT_NOTIFY' => 'Notify me', - 'REPORT_NOTIFY_EXPLAIN' => 'Informs you when your report is dealt with', + 'REPORT_NOTIFY_EXPLAIN' => 'Informs you when your report is dealt with.', 'REPORT_POST_EXPLAIN' => 'Use this form to report the selected post to the forum moderators and board administrators. Reporting should generally be used only if the post breaks forum rules.', 'REPORT_REASON' => 'Report reason', 'REPORT_TIME' => 'Report time', - 'REPORT_TOTAL' => 'In total there is 1 report to review', + 'REPORT_TOTAL' => 'In total there is 1 report to review.', 'RESYNC' => 'Resync', 'RETURN_MESSAGE' => '%sReturn to the message%s', 'RETURN_NEW_FORUM' => '%sReturn to the new forum%s', @@ -269,6 +279,7 @@ $lang = array_merge($lang, array( 'SELECT_ACTION' => 'Select desired action', 'SELECT_FORUM_GLOBAL_ANNOUNCEMENT' => 'Please select the forum you wish this global announcement to be displayed.', 'SELECT_FORUM_GLOBAL_ANNOUNCEMENTS' => 'One or more of the selected topics are global announcements. Please select the forum you wish these to be displayed.', + 'SELECT_MERGE' => 'Select for merge', 'SELECT_TOPICS_FROM' => 'Select topics from', 'SELECT_TOPIC' => 'Select topic', 'SELECT_USER' => 'Select user', @@ -284,38 +295,38 @@ $lang = array_merge($lang, array( 'SPLIT_TOPIC_ALL_CONFIRM' => 'Are you sure you want to split this topic?', 'SPLIT_TOPIC_BEYOND' => 'Split topic at selected post', 'SPLIT_TOPIC_BEYOND_CONFIRM' => 'Are you sure you want to split this topic at the selected post?', - 'SPLIT_TOPIC_EXPLAIN' => 'Using the form below you can split a topic in two, either by selecting the posts individually or by splitting at a selected post', + 'SPLIT_TOPIC_EXPLAIN' => 'Using the form below you can split a topic in two, either by selecting the posts individually or by splitting at a selected post.', 'THIS_POST_IP' => 'IP for this post', - 'TOPICS_APPROVED_SUCCESS' => 'The selected topics have been approved', - 'TOPICS_DELETED_SUCCESS' => 'The selected topics have been successfully removed from the database', - 'TOPICS_DISAPPROVED_SUCCESS'=> 'The selected topics have been disapproved', - 'TOPICS_FORKED_SUCCESS' => 'The selected topics have been copied successfully', - 'TOPICS_LOCKED_SUCCESS' => 'The selected topics have been locked', - 'TOPICS_MOVED_SUCCESS' => 'The selected topics have been moved successfully', - 'TOPICS_RESYNC_SUCCESS' => 'The selected topics have been resynchronised', + 'TOPICS_APPROVED_SUCCESS' => 'The selected topics have been approved.', + 'TOPICS_DELETED_SUCCESS' => 'The selected topics have been successfully removed from the database.', + 'TOPICS_DISAPPROVED_SUCCESS'=> 'The selected topics have been disapproved.', + 'TOPICS_FORKED_SUCCESS' => 'The selected topics have been copied successfully.', + 'TOPICS_LOCKED_SUCCESS' => 'The selected topics have been locked.', + 'TOPICS_MOVED_SUCCESS' => 'The selected topics have been moved successfully.', + 'TOPICS_RESYNC_SUCCESS' => 'The selected topics have been resynchronised.', 'TOPICS_TYPE_CHANGED' => 'Topic types changed successfully.', - 'TOPICS_UNLOCKED_SUCCESS' => 'The selected topics have been unlocked', - 'TOPIC_APPROVED_SUCCESS' => 'The selected topic has been approved', - 'TOPIC_DELETED_SUCCESS' => 'The selected topic has been successfully removed from the database', - 'TOPIC_DISAPPROVED_SUCCESS' => 'The selected topic has been disapproved', - 'TOPIC_FORKED_SUCCESS' => 'The selected topic has been copied successfully', - 'TOPIC_LOCKED_SUCCESS' => 'The selected topic has been locked', - 'TOPIC_MOVED_SUCCESS' => 'The selected topic has been moved successfully', - 'TOPIC_NOT_EXIST' => 'The topic you selected does not exist', - 'TOPIC_RESYNC_SUCCESS' => 'The selected topic has been resynchronised', - 'TOPIC_SPLIT_SUCCESS' => 'The selected topic has been split successfully', + 'TOPICS_UNLOCKED_SUCCESS' => 'The selected topics have been unlocked.', + 'TOPIC_APPROVED_SUCCESS' => 'The selected topic has been approved.', + 'TOPIC_DELETED_SUCCESS' => 'The selected topic has been successfully removed from the database.', + 'TOPIC_DISAPPROVED_SUCCESS' => 'The selected topic has been disapproved.', + 'TOPIC_FORKED_SUCCESS' => 'The selected topic has been copied successfully.', + 'TOPIC_LOCKED_SUCCESS' => 'The selected topic has been locked.', + 'TOPIC_MOVED_SUCCESS' => 'The selected topic has been moved successfully.', + 'TOPIC_NOT_EXIST' => 'The topic you selected does not exist.', + 'TOPIC_RESYNC_SUCCESS' => 'The selected topic has been resynchronised.', + 'TOPIC_SPLIT_SUCCESS' => 'The selected topic has been split successfully.', 'TOPIC_TIME' => 'Topic time', 'TOPIC_TYPE_CHANGED' => 'Topic type changed successfully.', - 'TOPIC_UNLOCKED_SUCCESS' => 'The selected topic has been unlocked', + 'TOPIC_UNLOCKED_SUCCESS' => 'The selected topic has been unlocked.', 'TOTAL_WARNINGS' => 'Total Warnings', - 'UNAPPROVED_POSTS_TOTAL' => 'In total there are %d posts waiting for approval', - 'UNAPPROVED_POSTS_ZERO_TOTAL' => 'There are no posts waiting for approval', - 'UNAPPROVED_POST_TOTAL' => 'In total there is 1 post waiting for approval', + 'UNAPPROVED_POSTS_TOTAL' => 'In total there are %d posts waiting for approval.', + 'UNAPPROVED_POSTS_ZERO_TOTAL' => 'There are no posts waiting for approval.', + 'UNAPPROVED_POST_TOTAL' => 'In total there is 1 post waiting for approval.', 'UNLOCK' => 'Unlock', 'UNLOCK_POST' => 'Unlock post', - 'UNLOCK_POST_EXPLAIN' => 'Allow editing', + 'UNLOCK_POST_EXPLAIN' => 'Allow editing.', 'UNLOCK_POST_POST' => 'Unlock post', 'UNLOCK_POST_POST_CONFIRM' => 'Are you sure you want to allow editing this post?', 'UNLOCK_POST_POSTS' => 'Unlock selected posts', @@ -324,34 +335,34 @@ $lang = array_merge($lang, array( 'UNLOCK_TOPIC_CONFIRM' => 'Are you sure you want to unlock this topic?', 'UNLOCK_TOPICS' => 'Unlock selected topics', 'UNLOCK_TOPICS_CONFIRM' => 'Are you sure you want to unlock all selected topics?', - 'USER_CANNOT_POST' => 'You cannot post in this forum', - 'USER_CANNOT_REPORT' => 'You cannot report posts in this forum', + 'USER_CANNOT_POST' => 'You cannot post in this forum.', + 'USER_CANNOT_REPORT' => 'You cannot report posts in this forum.', 'USER_FEEDBACK_ADDED' => 'User feedback added successfully.', 'USER_WARNING_ADDED' => 'User warned successfully.', 'VIEW_DETAILS' => 'View details', 'WARNED_USERS' => 'Warned users', - 'WARNED_USERS_EXPLAIN' => 'This is a list of users with unexpired warnings issued to them', + 'WARNED_USERS_EXPLAIN' => 'This is a list of users with unexpired warnings issued to them.', 'WARNING_PM_BODY' => 'The following is a warning which has been issued to you by an administrator or moderator of this site.[quote]%s[/quote]', 'WARNING_PM_SUBJECT' => 'Board warning issued', - 'WARNING_POST_DEFAULT' => 'This is a warning regarding the following post made by you: %s', - 'WARNINGS_ZERO_TOTAL' => 'No warnings exists', + 'WARNING_POST_DEFAULT' => 'This is a warning regarding the following post made by you: %s.', + 'WARNINGS_ZERO_TOTAL' => 'No warnings exist.', - 'YOU_SELECTED_TOPIC' => 'You selected topic number %d: %s', + 'YOU_SELECTED_TOPIC' => 'You selected topic number %d: %s.', 'report_reasons' => array( 'TITLE' => array( 'WAREZ' => 'Warez', 'SPAM' => 'Spam', 'OFF_TOPIC' => 'Off-topic', - 'OTHER' => 'Other' + 'OTHER' => 'Other', ), 'DESCRIPTION' => array( - 'WAREZ' => 'The post contains links to illegal or pirated software', - 'SPAM' => 'The reported post has the only purpose to advertise for a website or another product', - 'OFF_TOPIC' => 'The reported post is off topic', - 'OTHER' => 'The reported post does not fit into any other category, please use the description field' + 'WAREZ' => 'The post contains links to illegal or pirated software.', + 'SPAM' => 'The reported post has the only purpose to advertise for a website or another product.', + 'OFF_TOPIC' => 'The reported post is off topic.', + 'OTHER' => 'The reported post does not fit into any other category, please use the description field.', ) ), )); diff --git a/phpBB/language/en/memberlist.php b/phpBB/language/en/memberlist.php index 2d47c31f38..f4219feb61 100644 --- a/phpBB/language/en/memberlist.php +++ b/phpBB/language/en/memberlist.php @@ -36,28 +36,30 @@ $lang = array_merge($lang, array( 'ACTIVE_IN_TOPIC' => 'Most active topic', 'ADD_FOE' => 'Add foe', 'ADD_FRIEND' => 'Add friend', - 'AFTER' => 'After', + 'AFTER' => 'After', + + 'ALL' => 'All', 'BEFORE' => 'Before', - 'CC_EMAIL' => 'Send a copy of this email to yourself', + 'CC_EMAIL' => 'Send a copy of this e-mail to yourself.', 'CONTACT_USER' => 'Contact', 'DEST_LANG' => 'Language', 'DEST_LANG_EXPLAIN' => 'Select an appropriate language (if available) for the recipient of this message.', - 'EMAIL_BODY_EXPLAIN' => 'This message will be sent as plain text, do not include any HTML or BBCode. The return address for this message will be set to your email address.', - 'EMAIL_DISABLED' => 'Sorry but all email related functions have been disabled.', - 'EMAIL_SENT' => 'The email has been sent.', - 'EMAIL_TOPIC_EXPLAIN' => 'This message will be sent as plain text, do not include any HTML or BBCode. Please note that the topic information is already included in the message. The return address for this message will be set to your email address.', - 'EMPTY_ADDRESS_EMAIL' => 'You must provide a valid email address for the recipient.', + 'EMAIL_BODY_EXPLAIN' => 'This message will be sent as plain text, do not include any HTML or BBCode. The return address for this message will be set to your e-mail address.', + 'EMAIL_DISABLED' => 'Sorry but all e-mail related functions have been disabled.', + 'EMAIL_SENT' => 'The e-mail has been sent.', + 'EMAIL_TOPIC_EXPLAIN' => 'This message will be sent as plain text, do not include any HTML or BBCode. Please note that the topic information is already included in the message. The return address for this message will be set to your e-mail address.', + 'EMPTY_ADDRESS_EMAIL' => 'You must provide a valid e-mail address for the recipient.', 'EMPTY_MESSAGE_EMAIL' => 'You must enter a message to be emailed.', 'EMPTY_NAME_EMAIL' => 'You must enter the real name of the recipient.', - 'EMPTY_SUBJECT_EMAIL' => 'You must specify a subject for the email.', + 'EMPTY_SUBJECT_EMAIL' => 'You must specify a subject for the e-mail.', 'EQUAL_TO' => 'Equal to', 'FIND_USERNAME_EXPLAIN' => 'Use this form to search for specific members. You do not need to fill out all fields. To match partial data use * as a wildcard. When entering dates use the format YYYY-MM-DD, e.g. 2004-02-29. Use the mark checkboxes to select one or more usernames (several usernames may be accepted depending on the form itself) and click the Select Marked button to return to the previous form.', - 'FLOOD_EMAIL_LIMIT' => 'You cannot send another email at this time. Please try again later.', + 'FLOOD_EMAIL_LIMIT' => 'You cannot send another e-mail at this time. Please try again later.', 'GROUP_LEADER' => 'Group leader', @@ -69,7 +71,7 @@ $lang = array_merge($lang, array( 'IM_DOWNLOAD_APP' => 'Download application', 'IM_ICQ' => 'Please note that users may have selected to not receive unsolicited instant messages.', 'IM_JABBER' => 'Please note that users may have selected to not receive unsolicited instant messages.', - 'IM_JABBER_SUBJECT' => 'This is an automated message please do not reply! Message from user %1$s at %2$s', + 'IM_JABBER_SUBJECT' => 'This is an automated message please do not reply! Message from user %1$s at %2$s.', 'IM_MESSAGE' => 'Your message', 'IM_MSNM' => 'Please note that you need Windows Messenger installed to use this.', 'IM_MSNM_BROWSER' => 'Your browser does not support this.', @@ -86,14 +88,14 @@ $lang = array_merge($lang, array( 'LESS_THAN' => 'Less than', 'LIST_USER' => '1 user', 'LIST_USERS' => '%d users', - 'LOGIN_EXPLAIN_LEADERS' => 'The board administrator requires you to be registered and logged in to view the team listing.', - 'LOGIN_EXPLAIN_MEMBERLIST' => 'The board administrator requires you to be registered and logged in to access the memberlist.', - 'LOGIN_EXPLAIN_SEARCHUSER' => 'The board administrator requires you to be registered and logged in to search users.', - 'LOGIN_EXPLAIN_VIEWPROFILE' => 'The board administrator requires you to be registered and logged in to view profiles.', + 'LOGIN_EXPLAIN_LEADERS' => 'The board requires you to be registered and logged in to view the team listing.', + 'LOGIN_EXPLAIN_MEMBERLIST' => 'The board requires you to be registered and logged in to access the memberlist.', + 'LOGIN_EXPLAIN_SEARCHUSER' => 'The board requires you to be registered and logged in to search users.', + 'LOGIN_EXPLAIN_VIEWPROFILE' => 'The board requires you to be registered and logged in to view profiles.', 'MORE_THAN' => 'More than', - 'NO_EMAIL' => 'You are not permitted to send email to this user.', + 'NO_EMAIL' => 'You are not permitted to send e-mail to this user.', 'NO_VIEW_USERS' => 'You are not authorised to view the member list or profiles.', 'ORDER' => 'Order', @@ -110,9 +112,14 @@ $lang = array_merge($lang, array( 'SEARCH_USER_POSTS' => 'Search user’s posts', 'SELECT_MARKED' => 'Select marked', 'SELECT_SORT_METHOD' => 'Select sort method', + 'SEND_AIM_MESSAGE' => 'Send AIM message', + 'SEND_ICQ_MESSAGE' => 'Send ICQ message', 'SEND_IM' => 'Instant messaging', + 'SEND_JABBER_MESSAGE' => 'Send Jabber message', 'SEND_MESSAGE' => 'Message', - 'SORT_EMAIL' => 'Email', + 'SEND_MSNM_MESSAGE' => 'Send MSNM/WLM message', + 'SEND_YIM_MESSAGE' => 'Send YIM message', + 'SORT_EMAIL' => 'E-mail', 'SORT_LAST_ACTIVE' => 'Last active', 'SORT_POST_COUNT' => 'Post count', @@ -120,7 +127,7 @@ $lang = array_merge($lang, array( 'USER_ADMIN' => 'Administrate user', 'USER_FORUM' => 'User statistics', 'USER_ONLINE' => 'Online', - 'USER_PRESENCE' => 'Forum presence', + 'USER_PRESENCE' => 'Board presence', 'VIEWING_PROFILE' => 'Viewing profile - %s', 'VISITED' => 'Last visited', diff --git a/phpBB/language/en/posting.php b/phpBB/language/en/posting.php index 2b486f8b8c..480a95c392 100644 --- a/phpBB/language/en/posting.php +++ b/phpBB/language/en/posting.php @@ -32,34 +32,36 @@ if (empty($lang) || !is_array($lang)) $lang = array_merge($lang, array( 'ADD_ATTACHMENT' => 'Upload attachment', - 'ADD_ATTACHMENT_EXPLAIN' => 'If you wish to attach one or more files enter the details below', + 'ADD_ATTACHMENT_EXPLAIN' => 'If you wish to attach one or more files enter the details below.', 'ADD_FILE' => 'Add the file', 'ADD_POLL' => 'Poll creation', - 'ADD_POLL_EXPLAIN' => 'If you do not want to add a poll to your topic leave the fields blank', + 'ADD_POLL_EXPLAIN' => 'If you do not want to add a poll to your topic leave the fields blank.', 'ALREADY_DELETED' => 'Sorry but this message is already deleted.', 'ATTACH_QUOTA_REACHED' => 'Sorry, the board attachment quota has been reached.', 'ATTACH_SIG' => 'Attach a signature (signatures can be altered via the UCP)', - 'BBCODE_B_HELP' => 'Bold text: [b]text[/b] (alt+b)', - 'BBCODE_C_HELP' => 'Code display: [code]code[/code] (alt+c)', + 'BBCODE_A_HELP' => 'Inline uploaded attachment: [attachment=]filename.ext[/attachment]', + 'BBCODE_B_HELP' => 'Bold text: [b]text[/b]', + 'BBCODE_C_HELP' => 'Code display: [code]code[/code]', 'BBCODE_E_HELP' => 'List: Add list element', 'BBCODE_F_HELP' => 'Font size: [size=x-small]small text[/size]', 'BBCODE_IS_OFF' => '%sBBCode%s is OFF', 'BBCODE_IS_ON' => '%sBBCode%s is ON', - 'BBCODE_I_HELP' => 'Italic text: [i]text[/i] (alt+i)', - 'BBCODE_L_HELP' => 'List: [list]text[/list] (alt+l)', - 'BBCODE_O_HELP' => 'Ordered list: [list=]text[/list] (alt+o)', - 'BBCODE_P_HELP' => 'Insert image: [img]http://image_url[/img] (alt+p)', - 'BBCODE_Q_HELP' => 'Quote text: [quote]text[/quote] (alt+q)', + 'BBCODE_I_HELP' => 'Italic text: [i]text[/i]', + 'BBCODE_L_HELP' => 'List: [list]text[/list]', + 'BBCODE_LISTITEM_HELP' => 'List item: [*]text[/*]', + 'BBCODE_O_HELP' => 'Ordered list: [list=]text[/list]', + 'BBCODE_P_HELP' => 'Insert image: [img]http://image_url[/img]', + 'BBCODE_Q_HELP' => 'Quote text: [quote]text[/quote]', 'BBCODE_S_HELP' => 'Font color: [color=red]text[/color] Tip: you can also use color=#FF0000', - 'BBCODE_U_HELP' => 'Underline text: [u]text[/u] (alt+u)', - 'BBCODE_W_HELP' => 'Insert URL: [url]http://url[/url] or [url=http://url]URL text[/url] (alt+w)', - 'BBCODE_D_HELP' => 'Flash: [flash=width,height]http://url[/flash] (alt+d)', + 'BBCODE_U_HELP' => 'Underline text: [u]text[/u]', + 'BBCODE_W_HELP' => 'Insert URL: [url]http://url[/url] or [url=http://url]URL text[/url]', + 'BBCODE_D_HELP' => 'Flash: [flash=width,height]http://url[/flash]', 'BUMP_ERROR' => 'You cannot bump this topic so soon after the last post.', 'CANNOT_DELETE_REPLIED' => 'Sorry but you may only delete posts which have not been replied to.', 'CANNOT_EDIT_POST_LOCKED' => 'This post has been locked. You can no longer edit that post.', - 'CANNOT_EDIT_TIME' => 'You can no longer edit or delete that post', + 'CANNOT_EDIT_TIME' => 'You can no longer edit or delete that post.', 'CANNOT_POST_ANNOUNCE' => 'Sorry but you cannot post announcements.', 'CANNOT_POST_STICKY' => 'Sorry but you cannot post sticky topics.', 'CHANGE_TOPIC_TO' => 'Change topic type to', @@ -75,13 +77,14 @@ $lang = array_merge($lang, array( 'DISABLE_BBCODE' => 'Disable BBCode', 'DISABLE_MAGIC_URL' => 'Do not automatically parse URLs', 'DISABLE_SMILIES' => 'Disable smilies', - 'DISALLOWED_EXTENSION' => 'The extension %s is not allowed', + 'DISALLOWED_EXTENSION' => 'The extension %s is not allowed.', 'DRAFT_LOADED' => 'Draft loaded into posting area, you may want to finish your post now.
    Your draft will be deleted after submitting this post.', + 'DRAFT_LOADED_PM' => 'Draft loaded into message area, you may want to finish your private message now.
    Your draft will be deleted after submitting this private message.', 'DRAFT_SAVED' => 'Draft successfully saved.', 'DRAFT_TITLE' => 'Draft title', 'EDIT_REASON' => 'Reason for editing this post', - 'EMPTY_FILEUPLOAD' => 'The uploaded file is empty', + 'EMPTY_FILEUPLOAD' => 'The uploaded file is empty.', 'EMPTY_MESSAGE' => 'You must enter a message when posting.', 'EMPTY_REMOTE_DATA' => 'File could not be uploaded, please try uploading the file manually.', @@ -89,6 +92,7 @@ $lang = array_merge($lang, array( 'FLASH_IS_ON' => '[flash] is ON', 'FLOOD_ERROR' => 'You cannot make another post so soon after your last.', 'FONT_COLOR' => 'Font color', + 'FONT_COLOR_HIDE' => 'Hide font color', 'FONT_HUGE' => 'Huge', 'FONT_LARGE' => 'Large', 'FONT_NORMAL' => 'Normal', @@ -96,11 +100,11 @@ $lang = array_merge($lang, array( 'FONT_SMALL' => 'Small', 'FONT_TINY' => 'Tiny', - 'GENERAL_UPLOAD_ERROR' => 'Could not upload attachment to %s', + 'GENERAL_UPLOAD_ERROR' => 'Could not upload attachment to %s.', 'IMAGES_ARE_OFF' => '[img] is OFF', 'IMAGES_ARE_ON' => '[img] is ON', - 'INVALID_FILENAME' => '%s is an invalid filename', + 'INVALID_FILENAME' => '%s is an invalid filename.', 'LOAD' => 'Load', 'LOAD_DRAFT' => 'Load draft', @@ -118,46 +122,46 @@ $lang = array_merge($lang, array( 'MAX_IMG_WIDTH_EXCEEDED' => 'Your images may only be up to %1$d pixels wide.', 'MESSAGE_BODY_EXPLAIN' => 'Enter your message here, it may contain no more than %d characters.', - 'MESSAGE_DELETED' => 'This message has been deleted successfully', + 'MESSAGE_DELETED' => 'This message has been deleted successfully.', 'MORE_SMILIES' => 'View more smilies', - 'NOTIFY_REPLY' => 'Send me an email when a reply is posted', + 'NOTIFY_REPLY' => 'Notify me when a reply is posted', 'NOT_UPLOADED' => 'File could not be uploaded.', - 'NO_DELETE_POLL_OPTIONS' => 'You cannot delete existing poll options', + 'NO_DELETE_POLL_OPTIONS' => 'You cannot delete existing poll options.', 'NO_PM_ICON' => 'No PM icon', - 'NO_POLL_TITLE' => 'You have to enter a poll title', + 'NO_POLL_TITLE' => 'You have to enter a poll title.', 'NO_POST' => 'The requested post does not exist.', - 'NO_POST_MODE' => 'No post mode specified', + 'NO_POST_MODE' => 'No post mode specified.', - 'PARTIAL_UPLOAD' => 'The uploaded file was only partially uploaded', - 'PHP_SIZE_NA' => 'The attachment’s filesize is too large.
    Could not determine the maximum size defined by PHP in php.ini.', - 'PHP_SIZE_OVERRUN' => 'The attachment’s filesize is too large, the maximum upload size is %d MB.
    Please note this is set in php.ini and cannot be overridden.', + 'PARTIAL_UPLOAD' => 'The uploaded file was only partially uploaded.', + 'PHP_SIZE_NA' => 'The attachment’s file size is too large.
    Could not determine the maximum size defined by PHP in php.ini.', + 'PHP_SIZE_OVERRUN' => 'The attachment’s file size is too large, the maximum upload size is %d MB.
    Please note this is set in php.ini and cannot be overridden.', 'PLACE_INLINE' => 'Place inline', 'POLL_DELETE' => 'Delete poll', 'POLL_FOR' => 'Run poll for', - 'POLL_FOR_EXPLAIN' => 'Enter 0 or leave blank for a never ending poll', + 'POLL_FOR_EXPLAIN' => 'Enter 0 or leave blank for a never ending poll.', 'POLL_MAX_OPTIONS' => 'Options per user', 'POLL_MAX_OPTIONS_EXPLAIN' => 'This is the number of options each user may select when voting.', 'POLL_OPTIONS' => 'Poll options', - 'POLL_OPTIONS_EXPLAIN' => 'Place each option on a new line. You may enter up to %d options', + 'POLL_OPTIONS_EXPLAIN' => 'Place each option on a new line. You may enter up to %d options.', 'POLL_QUESTION' => 'Poll question', + 'POLL_TITLE_TOO_LONG' => 'The poll title must contain fewer than 100 characters.', + 'POLL_TITLE_COMP_TOO_LONG' => 'The parsed size of your poll title is too large, consider removing BBCodes or smilies.', 'POLL_VOTE_CHANGE' => 'Allow re-voting', 'POLL_VOTE_CHANGE_EXPLAIN' => 'If enabled users are able to change their vote.', 'POSTED_ATTACHMENTS' => 'Posted attachments', 'POST_CONFIRMATION' => 'Confirmation of post', - 'POST_CONFIRM_EXPLAIN' => 'To prevent automated posts the board administrator 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.', - 'POST_DELETED' => 'This message has been deleted successfully', - 'POST_EDITED' => 'This message has been edited successfully', - 'POST_EDITED_MOD' => 'This message has been edited but requires approval', + 'POST_CONFIRM_EXPLAIN' => 'To prevent automated posts 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.', + 'POST_DELETED' => 'This message has been deleted successfully.', + 'POST_EDITED' => 'This message has been edited successfully.', + 'POST_EDITED_MOD' => 'This message has been edited successfully, but it will need to be approved by a moderator before it is publicly viewable. You will be notified when your post has been approved.', 'POST_GLOBAL' => 'Global', 'POST_ICON' => 'Post icon', 'POST_NORMAL' => 'Normal', - 'POST_REPLY' => 'Post a reply', 'POST_REVIEW' => 'Post review', 'POST_REVIEW_EXPLAIN' => 'At least one new post has been made to this topic. You may wish to review your post in light of this.', - 'POST_STORED' => 'This message has been posted successfully', - 'POST_STORED_MOD' => 'This message has been saved but requires approval', - 'POST_TOPIC' => 'Post a new topic', + 'POST_STORED' => 'This message has been posted successfully.', + 'POST_STORED_MOD' => 'This message has been submitted successfully, but it will need to be approved by a moderator before it is publicly viewable. You will be notified when your post has been approved.', 'POST_TOPIC_AS' => 'Post topic as', 'PROGRESS_BAR' => 'Progress bar', @@ -172,35 +176,35 @@ $lang = array_merge($lang, array( 'SMILIES_ARE_ON' => 'Smilies are ON', 'STICKY_ANNOUNCE_TIME_LIMIT'=> 'Sticky/Announcement time limit', 'STICK_TOPIC_FOR' => 'Stick topic for', - 'STICK_TOPIC_FOR_EXPLAIN' => 'Enter 0 or leave blank for a never ending Sticky/Announcement', - 'STYLES_TIP' => 'Tip: Styles can be applied quickly to selected text', + 'STICK_TOPIC_FOR_EXPLAIN' => 'Enter 0 or leave blank for a never ending Sticky/Announcement.', + 'STYLES_TIP' => 'Tip: Styles can be applied quickly to selected text.', 'TOO_FEW_CHARS' => 'Your message contains too few characters.', - 'TOO_FEW_POLL_OPTIONS' => 'You must enter at least two poll options', - 'TOO_MANY_ATTACHMENTS' => 'Cannot add another attachment, %d is the maxmimum.', + 'TOO_FEW_POLL_OPTIONS' => 'You must enter at least two poll options.', + 'TOO_MANY_ATTACHMENTS' => 'Cannot add another attachment, %d is the maximum.', 'TOO_MANY_CHARS' => 'Your message contains too many characters.', - 'TOO_MANY_POLL_OPTIONS' => 'You have tried to enter too many poll options', + 'TOO_MANY_POLL_OPTIONS' => 'You have tried to enter too many poll options.', 'TOO_MANY_SMILIES' => 'Your message contains too many smilies. The maximum number of smilies allowed is %d.', 'TOO_MANY_URLS' => 'Your message contains too many URLs. The maximum number of URLs allowed is %d.', - 'TOO_MANY_USER_OPTIONS' => 'You cannot specify more options per user than existing poll options', - 'TOPIC_BUMPED' => 'Topic has been bumped successfully', + 'TOO_MANY_USER_OPTIONS' => 'You cannot specify more options per user than existing poll options.', + 'TOPIC_BUMPED' => 'Topic has been bumped successfully.', - 'UNAUTHORISED_BBCODE' => 'You cannot use certain BBCodes: %s', + 'UNAUTHORISED_BBCODE' => 'You cannot use certain BBCodes: %s.', 'UNGLOBALISE_EXPLAIN' => 'To switch this topic back from being global to a normal topic, you need to select the forum you wish this topic to be displayed.', 'UPDATE_COMMENT' => 'Update comment', 'URL_INVALID' => 'The URL you specified is invalid.', 'URL_NOT_FOUND' => 'The file specified could not be found.', 'URL_IS_OFF' => '[url] is OFF', 'URL_IS_ON' => '[url] is ON', - 'USER_CANNOT_BUMP' => 'You cannot bump topics in this forum', - 'USER_CANNOT_DELETE' => 'You cannot delete posts in this forum', - 'USER_CANNOT_EDIT' => 'You cannot edit posts in this forum', - 'USER_CANNOT_REPLY' => 'You cannot reply in this forum', + 'USER_CANNOT_BUMP' => 'You cannot bump topics in this forum.', + 'USER_CANNOT_DELETE' => 'You cannot delete posts in this forum.', + 'USER_CANNOT_EDIT' => 'You cannot edit posts in this forum.', + 'USER_CANNOT_REPLY' => 'You cannot reply in this forum.', 'USER_CANNOT_FORUM_POST' => 'You are not able to do posting operations on this forum due to the forum type not supporting it.', 'VIEW_MESSAGE' => '%sView your submitted message%s', - 'WRONG_FILESIZE' => 'The file is too big, maximum allowed size is %1d %2s', + 'WRONG_FILESIZE' => 'The file is too big, maximum allowed size is %1d %2s.', 'WRONG_SIZE' => 'The image must be at least %1$d pixels wide, %2$d pixels high and at most %3$d pixels wide and %4$d pixels high. The submitted image is %5$d pixels wide and %6$d pixels high.', )); diff --git a/phpBB/language/en/search.php b/phpBB/language/en/search.php index f3db3af503..720c39635e 100644 --- a/phpBB/language/en/search.php +++ b/phpBB/language/en/search.php @@ -43,12 +43,12 @@ $lang = array_merge($lang, array( 'GLOBAL' => 'Global announcement', 'IGNORED_TERMS' => 'ignored', - 'IGNORED_TERMS_EXPLAIN' => 'The following words in your search query were ignored: %s', + 'IGNORED_TERMS_EXPLAIN' => 'The following words in your search query were ignored: %s.', 'JUMP_TO_POST' => 'Jump to post', 'NO_KEYWORDS' => 'You must specify at least one word to search for. Each word must consist of at least %d characters and must not contain more than %d characters excluding wildcards.', - 'NO_RECENT_SEARCHES' => 'No searches have been carried out recently', + 'NO_RECENT_SEARCHES' => 'No searches have been carried out recently.', 'NO_SEARCH' => 'Sorry but you are not permitted to use the search system.', 'NO_SEARCH_RESULTS' => 'No suitable matches were found.', 'NO_SEARCH_TIME' => 'Sorry but you cannot use search at this time. Please try again in a few minutes.', @@ -61,13 +61,14 @@ $lang = array_merge($lang, array( 'RESULT_DAYS' => 'Limit results to previous', 'RESULT_SORT' => 'Sort results by', 'RETURN_FIRST' => 'Return first', + 'RETURN_TO_SEARCH_ADV' => 'Return to advanced search', 'SEARCHED_FOR' => 'Search term used', 'SEARCHED_TOPIC' => 'Searched topic', 'SEARCH_ALL_TERMS' => 'Search for all terms or use query as entered', 'SEARCH_ANY_TERMS' => 'Search for any terms', 'SEARCH_AUTHOR' => 'Search for author', - 'SEARCH_AUTHOR_EXPLAIN' => 'Use * as a wildcard for partial matches', + 'SEARCH_AUTHOR_EXPLAIN' => 'Use * as a wildcard for partial matches.', 'SEARCH_FIRST_POST' => 'First post of topics only', 'SEARCH_FORUMS' => 'Search in forums', 'SEARCH_FORUMS_EXPLAIN' => 'Select the forum or forums you wish to search in. For speed all subforums can be searched by selecting the parent and setting enable search subforums below.', diff --git a/phpBB/language/en/search_synonyms.php b/phpBB/language/en/search_synonyms.php index 18f0ba40f8..886e1f1289 100644 --- a/phpBB/language/en/search_synonyms.php +++ b/phpBB/language/en/search_synonyms.php @@ -119,8 +119,8 @@ $synonyms = array( 'offense' => 'offence', 'ommision' => 'omission', 'ommission' => 'omission', - 'optimize' => 'optimize', - 'organise' => 'organize', + 'optimize' => 'optimise', + 'organize' => 'organise', 'pajamas' => 'pyjamas', 'paleography' => 'palaeography', diff --git a/phpBB/language/en/ucp.php b/phpBB/language/en/ucp.php index 4e9949482c..65d32cab07 100644 --- a/phpBB/language/en/ucp.php +++ b/phpBB/language/en/ucp.php @@ -45,43 +45,47 @@ $lang = array_merge($lang, array(
    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â€).

    - 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 email address (hereinafter “your emailâ€). 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 email required by “%1$s†during the registration process are at our digression what is mandatory and what is optional. 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 emails from the phpBB software.
    + 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 required by “%1$s†during the registration process are at our digression what is mandatory and what is optional. 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.

    - 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 email, then the phpBB software will generate a new password to reclaim your account.
    + 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.
    ', )); // 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_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 email for details.', - 'ACCOUNT_INACTIVE' => 'Your account has been created. However, this forum requires account activation, an activation key has been sent to the email address you provided. Please check your email for further information', - 'ACCOUNT_INACTIVE_ADMIN' => 'Your account has been created. However, this forum requires account activation by the administrator. An email has been sent to them and you will be informed when your account has been activated', - 'ACTIVATION_EMAIL_SENT' => 'The activation email has been sent to your email address', + '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.', '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_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_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]', - 'ADMIN_EMAIL' => 'Administrators can email me information', + '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 forum.', + '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, filesize %3$dkB.', + 'AVATAR_EXPLAIN' => 'Maximum dimensions; width %1$d pixels, height %2$d pixels, file size %3$dkB.', + 'AVATAR_FEATURES_DISABLED' => 'The avatar functionality is currently disabled.', 'AVATAR_GALLERY' => 'Local gallery', - 'AVATAR_GENERAL_UPLOAD_ERROR' => 'Could not upload avatar to %s', + 'AVATAR_GENERAL_UPLOAD_ERROR' => 'Could not upload avatar to %s.', 'AVATAR_PAGE' => 'Page', 'BACK_TO_DRAFTS' => 'Back to saved drafts', @@ -89,17 +93,17 @@ $lang = array_merge($lang, array( '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 date() function', - 'BOARD_DST' => 'Daylight Saving Time is in effect', + 'BOARD_DATE_FORMAT_EXPLAIN' => 'The syntax used is identical to the PHP date() function.', + 'BOARD_DST' => 'Summer Time/DST 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 Remove marked bookmarks button.', - 'BOOKMARKS_DISABLED' => 'Bookmarks are disabled on this board', - 'BOOKMARKS_REMOVED' => 'Bookmarks removed successfully', + '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_EDIT_MESSAGE_TIME' => 'You can no longer edit or delete that message.', 'CANNOT_MOVE_TO_SAME_FOLDER'=> 'Messages can not be moved to the folder you want to remove.', 'CANNOT_RENAME_FOLDER' => 'This folder can not be renamed.', 'CANNOT_REMOVE_FOLDER' => 'This folder can not be removed.', @@ -108,29 +112,29 @@ $lang = array_merge($lang, array( 'CLICK_RETURN_FOLDER' => '%1$sReturn to your “%3$s†folder%2$s', 'CONFIRMATION' => 'Confirmation of registration', 'CONFIRM_CHANGES' => 'Confirm changes', - 'CONFIRM_EMAIL' => 'Confirm email address', - 'CONFIRM_EMAIL_EXPLAIN' => 'You only need to specify this if you are changing your email address.', - 'CONFIRM_EXPLAIN' => 'To prevent automated registrations the board administrator 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.', + '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.', 'CONFIRM_PASSWORD' => 'Confirm password', - 'CONFIRM_PASSWORD_EXPLAIN' => 'You only need to confirm your password if you changed it above', + 'CONFIRM_PASSWORD_EXPLAIN' => 'You only need to confirm your password if you changed it above.', '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 confirm your current password if you wish to change it, alter your email address or username.', + 'CURRENT_PASSWORD_EXPLAIN' => 'You must confirm your current password if you wish to change it, alter your e-mail address or username.', '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_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', + '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?', @@ -148,25 +152,25 @@ $lang = array_merge($lang, array( 'DEMOTE_SELECTED' => 'Demote selected', 'DISABLE_CENSORS' => 'Enable word censoring', 'DISPLAY_GALLERY' => 'Display gallery', - 'DOMAIN_NO_MX_RECORD_EMAIL' => 'The entered email domain has no valid MX record.', + '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 email address you entered is not allowed to be used.', - 'EMAIL_INVALID_EMAIL' => 'The email address you entered is invalid.', - 'EMAIL_REMIND' => 'This must be the email address you supplied when registering.', - 'EMAIL_TAKEN_EMAIL' => 'The entered email 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', + 'EMAIL_BANNED_EMAIL' => 'The e-mail address you entered is not allowed to be used.', + 'EMAIL_INVALID_EMAIL' => 'The e-mail address you entered is invalid.', + 'EMAIL_REMIND' => 'This must be the e-mail address you supplied when registering.', + '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 folder', + '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.', @@ -179,24 +183,24 @@ $lang = array_merge($lang, array( 'FIELD_INVALID_DATE' => 'The field “%s†has an invalid date.', '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 and personal messages will not be permitted. Please note that you cannot ignore moderators or administrators.', - 'FOES_UPDATED' => 'Your foes list has been updated successfully', - 'FOLDER_ADDED' => 'Folder successfully added', + '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_EXIST' => 'Folder %s already exist', + 'FOLDER_NAME_EXIST' => 'Folder %s already exists.', 'FOLDER_OPTIONS' => 'Folder options', - 'FOLDER_RENAMED' => 'Folder successfully renamed', - 'FOLDER_REMOVED' => 'Folder successfully removed', + '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', + '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 have been changed successfully', + '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', @@ -213,7 +217,7 @@ $lang = array_merge($lang, array( 'IMPORTANT_NEWS' => 'Important announcements', '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', + 'ITEMS_REQUIRED' => 'The items marked with * are required profile fields and need to be filled out.', 'JOIN_SELECTED' => 'Join selected', @@ -222,20 +226,21 @@ $lang = array_merge($lang, array( '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_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 as important', + 'MARK_IMPORTANT' => 'Mark/Unmark as important', 'MARKED_MESSAGE' => 'Marked message', - 'MAX_FOLDER_REACHED' => 'Maximum number of allowed user defined folders reached', + '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_DELETED' => 'Message successfully deleted.', 'MESSAGE_HISTORY' => 'Message history', - 'MESSAGE_REMOVED_FROM_OUTBOX' => 'This message has been removed by it’s author before it was delivered', + 'MESSAGE_REMOVED_FROM_OUTBOX' => 'This message has been removed by it’s author before it was delivered.', 'MESSAGE_SENT_ON' => 'on', - 'MESSAGE_STORED' => 'This message has been sent successfully', + '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', @@ -245,19 +250,19 @@ $lang = array_merge($lang, array( 'MOVE_TO_FOLDER' => 'Move to folder', 'MOVE_UP' => 'Move up', - 'NEW_EMAIL_ERROR' => 'The email addresses you entered do not match.', + 'NEW_EMAIL_ERROR' => 'The e-mail addresses you entered do not match.', 'NEW_FOLDER_NAME' => 'New folder name', 'NEW_PASSWORD' => 'New password', 'NEW_PASSWORD_ERROR' => 'The passwords you entered do not match.', 'NOTIFY_METHOD' => 'Notification method', 'NOTIFY_METHOD_BOTH' => 'Both', - 'NOTIFY_METHOD_EMAIL' => 'Email only', + '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_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_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_FRIENDS' => 'You cannot add users to your foes list who are on your friends list.', @@ -277,64 +282,66 @@ $lang = array_merge($lang, array( '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 sending private messages.', - 'NO_AUTH_SIGNATURE' => 'You are not authorised to define a signature', + '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_EMAIL_USER' => 'The email/username information submitted could not be found', + 'NO_BOOKMARKS' => 'You have no bookmarks.', + 'NO_BOOKMARKS_SELECTED' => 'You have selected no bookmarks.', + '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_RECIPIENT' => 'No recipient defined', - 'NO_RULES_DEFINED' => 'No rules defined', - 'NO_SAVED_DRAFTS' => 'No drafts saved', + '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 watching any forums.', 'NO_WATCHED_TOPICS' => 'You are not watching any topics.', - 'PASS_TYPE_ALPHA_EXPLAIN' => 'Password must be between %1$d and %2$d chars long and must contain alphanumerics', + '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 chars long and must be mixed case', - 'PASS_TYPE_SYMBOL_EXPLAIN' => 'Password must be between %1$d and %2$d chars long and must contain symbols', + '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' => 'Your password has been sent successfully to your original email address.', + 'PASSWORD_ACTIVATED' => 'Your new password has been activated.', + 'PASSWORD_UPDATED' => 'Your password has been sent successfully to your original e-mail address.', 'PERMISSIONS_RESTORED' => 'Successfully restored original permissions.', - 'PERMISSIONS_TRANSFERRED' => 'Successfully transferred permissions from %s, you are now able to browse the forum with the users permissions.
    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', + 'PERMISSIONS_TRANSFERRED' => 'Successfully transferred permissions from %s, you are now able to browse the board with this user’s permissions.
    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' => 'Post 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 will be viewable to other members. Be careful when including any personal details. Any fields marked with a * must be completed.', + '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', - 'RELATIVE_DAYS' => 'Relative days', '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', @@ -348,19 +355,19 @@ $lang = array_merge($lang, array( '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_NOT_DEFINED' => 'Rule not correctly specified', + 'RULE_ADDED' => 'Rule successfully added.', + 'RULE_ALREADY_DEFINED' => 'This rule was defined previously.', + 'RULE_DELETED' => 'Rule successfully removed.', + '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', + '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 at', - 'SHOW_EMAIL' => 'Users can contact me by email', - 'SIGNATURE_EXPLAIN' => 'This is a block of text that can be added to posts you make. There is a %d character limit', + 'SHOW_EMAIL' => 'Users can contact me by e-mail', + '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', @@ -369,21 +376,21 @@ $lang = array_merge($lang, array( 'SORT_EXTENSION' => 'Extension', 'SORT_FILENAME' => 'Filename', 'SORT_POST_TIME' => 'Post time', - 'SORT_SIZE' => 'Filesize', + 'SORT_SIZE' => 'File size', 'TIMEZONE' => 'Timezone', 'TO' => 'To', - 'TOO_MANY_RECIPIENTS' => 'Too many recipients', + 'TOO_MANY_RECIPIENTS' => '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 email address before your account is activated. The administrator will review your account and if approved you will receive an email at the address you specified.', + '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 email address before your account is activated. You will receive an email at the address you provide that contains an account activation link.', + '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', @@ -395,9 +402,9 @@ $lang = array_merge($lang, array( 'UCP_MAIN_SUBSCRIBED' => 'Manage subscriptions', 'UCP_MSNM' => 'MSN Messenger', - 'UCP_NO_ATTACHMENTS' => 'You have posted no files', + 'UCP_NO_ATTACHMENTS' => 'You have posted no files.', - 'UCP_PREFS' => 'Forum preferences', + 'UCP_PREFS' => 'Board preferences', 'UCP_PREFS_PERSONAL' => 'Edit global settings', 'UCP_PREFS_POST' => 'Edit posting defaults', 'UCP_PREFS_VIEW' => 'Edit display options', @@ -405,7 +412,7 @@ $lang = array_merge($lang, array( 'UCP_PM' => 'Private messages', 'UCP_PM_COMPOSE' => 'Compose message', 'UCP_PM_DRAFTS' => 'Manage PM drafts', - 'UCP_PM_OPTIONS' => 'Edit options', + 'UCP_PM_OPTIONS' => 'Rules, folders & settings', 'UCP_PM_POPUP' => 'Private messages', 'UCP_PM_POPUP_TITLE' => 'Private message popup', 'UCP_PM_UNREAD' => 'Unread messages', @@ -423,7 +430,7 @@ $lang = array_merge($lang, array( 'UCP_REGISTER_DISABLE' => 'Creating a new account is currently not possible.', 'UCP_REMIND' => 'Send password', - 'UCP_RESEND' => 'Send activation email', + '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', @@ -434,14 +441,14 @@ $lang = array_merge($lang, array( '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, it 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_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_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 banned.', + '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', @@ -468,13 +475,13 @@ $lang = array_merge($lang, array( '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 Unwatch marked button.', 'WATCHED_FORUMS' => 'Watched forums', 'WATCHED_TOPICS' => 'Watched topics', - 'WRONG_ACTIVATION' => 'The activation key you supplied does not match any in the database', + '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_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_FRIENDS_EXPLAIN' => 'To remove usernames select them and click submit.', 'YOUR_WARNINGS' => 'Your warning level', 'PM_ACTION' => array( @@ -508,7 +515,7 @@ $lang = array_merge($lang, array( ), - '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 extra rights to view content or increase your capabilities in other areas.', + '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', diff --git a/phpBB/language/en/viewforum.php b/phpBB/language/en/viewforum.php index 8a1802b414..c981c24eb1 100644 --- a/phpBB/language/en/viewforum.php +++ b/phpBB/language/en/viewforum.php @@ -42,7 +42,6 @@ $lang = array_merge($lang, array( 'LOGIN_NOTIFY_FORUM' => 'You have been notified about this forum, please login to view it.', 'MARK_TOPICS_READ' => 'Mark topics read', - 'MOVED_TOPIC' => 'Moved topic', 'NEW_POSTS_HOT' => 'New posts [ Popular ]', 'NEW_POSTS_LOCKED' => 'New posts [ Locked ]', @@ -52,7 +51,7 @@ $lang = array_merge($lang, array( 'POST_FORUM_LOCKED' => 'Forum is locked', - 'TOPICS_MARKED' => 'The topics for this forum have now been marked read', + 'TOPICS_MARKED' => 'The topics for this forum have now been marked read.', 'VIEW_FORUM' => 'View forum', 'VIEW_FORUM_TOPIC' => '1 topic', diff --git a/phpBB/language/en/viewtopic.php b/phpBB/language/en/viewtopic.php index 1361a345f7..aec904eddc 100644 --- a/phpBB/language/en/viewtopic.php +++ b/phpBB/language/en/viewtopic.php @@ -32,13 +32,13 @@ if (empty($lang) || !is_array($lang)) $lang = array_merge($lang, array( 'ATTACHMENT' => 'Attachment', - 'ATTACHMENT_FUNCTIONALITY_DISABLED' => 'The attachments feature has been disabled', + 'ATTACHMENT_FUNCTIONALITY_DISABLED' => 'The attachments feature has been disabled.', 'BOOKMARK_ADDED' => 'Bookmarked topic successfully.', 'BOOKMARK_REMOVED' => 'Removed bookmarked topic successfully.', 'BOOKMARK_TOPIC' => 'Bookmark topic', 'BOOKMARK_TOPIC_REMOVE' => 'Remove from bookmarks', - 'BUMPED_BY' => 'Last bumped by %1$s on %2$s', + 'BUMPED_BY' => 'Last bumped by %1$s on %2$s.', 'BUMP_TOPIC' => 'Bump topic', 'CODE' => 'Code', @@ -46,17 +46,17 @@ $lang = array_merge($lang, array( 'DELETE_TOPIC' => 'Delete topic', 'DOWNLOAD_NOTICE' => 'You do not have the required permissions to view the files attached to this post.', - 'EDITED_TIMES_TOTAL' => 'Last edited by %1$s on %2$s, edited %3$d times in total', - 'EDITED_TIME_TOTAL' => 'Last edited by %1$s on %2$s, edited %3$d time in total', - 'EMAIL_TOPIC' => 'Email friend', - 'ERROR_NO_ATTACHMENT' => 'The selected attachment does not exist anymore', + 'EDITED_TIMES_TOTAL' => 'Last edited by %1$s on %2$s, edited %3$d times in total.', + 'EDITED_TIME_TOTAL' => 'Last edited by %1$s on %2$s, edited %3$d time in total.', + 'EMAIL_TOPIC' => 'E-mail friend', + 'ERROR_NO_ATTACHMENT' => 'The selected attachment does not exist anymore.', 'FILE_NOT_FOUND_404' => 'The file %s does not exist.', 'FORK_TOPIC' => 'Copy topic', 'LINKAGE_FORBIDDEN' => 'You are not authorised to view, download or link from/to this site.', 'LOGIN_NOTIFY_TOPIC' => 'You have been notified about this topic, please login to view it.', - 'LOGIN_VIEWTOPIC' => 'The board administrator requires you to be registered and logged in to view this topic.', + 'LOGIN_VIEWTOPIC' => 'The board requires you to be registered and logged in to view this topic.', 'MAKE_ANNOUNCE' => 'Change to “Announcementâ€', 'MAKE_GLOBAL' => 'Change to “Globalâ€', @@ -68,8 +68,8 @@ $lang = array_merge($lang, array( 'MOVE_TOPIC' => 'Move topic', 'NO_ATTACHMENT_SELECTED'=> 'You haven’t selected an attachment to download or view.', - 'NO_NEWER_TOPICS' => 'There are no newer topics in this forum', - 'NO_OLDER_TOPICS' => 'There are no older topics in this forum', + 'NO_NEWER_TOPICS' => 'There are no newer topics in this forum.', + 'NO_OLDER_TOPICS' => 'There are no older topics in this forum.', 'NO_UNREAD_POSTS' => 'There are no new unread posts for this topic.', 'NO_VOTE_OPTION' => 'You must specify an option when voting.', 'NO_VOTES' => 'No votes', @@ -99,7 +99,7 @@ $lang = array_merge($lang, array( 'VIEW_TOPIC_POSTS' => '%d posts', 'VIEW_UNREAD_POST' => 'First unread post', 'VISIT_WEBSITE' => 'WWW', - 'VOTE_SUBMITTED' => 'Your vote has been cast', + 'VOTE_SUBMITTED' => 'Your vote has been cast.', 'WROTE' => 'wrote', )); diff --git a/phpBB/mcp.php b/phpBB/mcp.php index bf2666102a..a8042c5b57 100644 --- a/phpBB/mcp.php +++ b/phpBB/mcp.php @@ -56,6 +56,12 @@ $quickmod = (isset($_REQUEST['quickmod'])) ? true : false; $action = request_var('action', ''); $action_ary = request_var('action', array('' => 0)); +$forum_action = request_var('forum_action', ''); +if ($forum_action !== '' && !empty($_POST['sort'])) +{ + $action = $forum_action; +} + if (sizeof($action_ary)) { list($action, ) = each($action_ary); @@ -87,8 +93,7 @@ if ($post_id) $topic_id = (int) $row['topic_id']; $forum_id = (int) ($row['forum_id']) ? $row['forum_id'] : $forum_id; } - -if ($topic_id && !$forum_id) +else if ($topic_id) { $sql = 'SELECT forum_id FROM ' . TOPICS_TABLE . " @@ -124,14 +129,14 @@ if (!$auth->acl_getf_global('m_')) if (!$allow_user) { - trigger_error($user->lang['NOT_AUTHORIZED']); + trigger_error($user->lang['NOT_AUTHORISED']); } } // if the user cannot read the forum he tries to access then we won't allow mcp access either if ($forum_id && !$auth->acl_get('f_read', $forum_id)) { - trigger_error($user->lang['NOT_AUTHORIZED']); + trigger_error($user->lang['NOT_AUTHORISED']); } if ($forum_id) @@ -168,6 +173,10 @@ if ($quickmod) $module->set_active('logs', 'topic_logs'); break; + case 'merge_topic': + $module->set_active('main', 'forum_view'); + break; + case 'split': case 'merge': $module->set_active('main', 'topic_view'); @@ -186,14 +195,18 @@ else // Hide some of the options if we don't have the relevant information to use them if (!$post_id) { - $module->set_display('reports', 'report_details', false); $module->set_display('main', 'post_details', false); $module->set_display('warn', 'warn_post', false); +} - if (!$topic_id || $mode == 'unapproved_posts') - { - $module->set_display('queue', 'approve_details', false); - } +if ($mode == '' || $mode == 'unapproved_topics' || $mode == 'unapproved_posts') +{ + $module->set_display('queue', 'approve_details', false); +} + +if ($mode == '' || $mode == 'reports' || $mode == 'reports_closed') +{ + $module->set_display('reports', 'report_details', false); } if (!$topic_id) @@ -220,6 +233,14 @@ $module->load_active(); // Assign data to the template engine for the list of modules $module->assign_tpl_vars(append_sid("{$phpbb_root_path}mcp.$phpEx")); +// Generate urls for letting the moderation control panel being accessed in different modes +$template->assign_vars(array( + 'U_MCP' => append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=main'), + 'U_MCP_FORUM' => ($forum_id) ? append_sid("{$phpbb_root_path}mcp.$phpEx", "i=main&mode=forum_view&f=$forum_id") : '', + 'U_MCP_TOPIC' => ($forum_id && $topic_id) ? append_sid("{$phpbb_root_path}mcp.$phpEx", "i=main&mode=topic_view&t=$topic_id") : '', + 'U_MCP_POST' => ($forum_id && $topic_id && $post_id) ? append_sid("{$phpbb_root_path}mcp.$phpEx", "i=main&mode=post_details&t=$topic_id&p=$post_id") : '', +)); + // Generate the page, do not display/query online list $module->display($module->get_page_title(), false); @@ -231,6 +252,41 @@ function _module__url($mode, &$module_row) return extra_url(); } +function _module_notes_url($mode, &$module_row) +{ + if ($mode == 'front') + { + return ''; + } + + global $user_id; + return ($user_id) ? "&u=$user_id" : ''; +} + +function _module_warn_url($mode, &$module_row) +{ + if ($mode == 'front' || $mode == 'list') + { + return ''; + } + + if ($mode == 'warn_post') + { + global $forum_id, $post_id; + + $url_extra = ($forum_id) ? "&f=$forum_id" : ''; + $url_extra .= ($post_id) ? "&p=$post_id" : ''; + + return $url_extra; + } + else + { + global $user_id; + + return ($user_id) ? "&u=$user_id" : ''; + } +} + function _module_main_url($mode, &$module_row) { return extra_url(); @@ -246,6 +302,11 @@ function _module_ban_url($mode, &$module_row) return extra_url(); } +function _module_queue_url($mode, &$module_row) +{ + return extra_url(); +} + function extra_url() { global $forum_id, $topic_id, $post_id, $user_id; @@ -585,7 +646,7 @@ function mcp_sorting($mode, &$sort_days, &$sort_key, &$sort_dir, &$sort_by_sql, } else { - $where_sql .= ' ' . $db->sql_in_set('p.forum_id', get_forum_list('m_report')); + $where_sql .= ' ' . $db->sql_in_set('p.forum_id', get_forum_list('!m_report'), true, true); } if ($mode == 'reports') diff --git a/phpBB/memberlist.php b/phpBB/memberlist.php index 9b43d0be24..235923d426 100644 --- a/phpBB/memberlist.php +++ b/phpBB/memberlist.php @@ -30,6 +30,12 @@ $username = request_var('un', '', true); $group_id = request_var('g', 0); $topic_id = request_var('t', 0); +// Check our mode... +if (!in_array($mode, array('', 'group', 'viewprofile', 'email', 'contact', 'searchuser', 'leaders'))) +{ + trigger_error('NO_MODE'); +} + switch ($mode) { case 'email': @@ -49,7 +55,6 @@ switch ($mode) break; } - $start = request_var('start', 0); $submit = (isset($_POST['submit'])) ? true : false; @@ -67,21 +72,28 @@ switch ($mode) { case 'leaders': // Display a listing of board admins, moderators - $user->add_lang('groups'); - + include($phpbb_root_path . 'includes/functions_user.' . $phpEx); + $page_title = $user->lang['THE_TEAM']; $template_html = 'memberlist_leaders.html'; $user_ary = $auth->acl_get_list(false, array('a_', 'm_'), false); - $admin_id_ary = $mod_id_ary = $forum_id_ary = array(); + $admin_id_ary = $global_mod_id_ary = $mod_id_ary = $forum_id_ary = array(); foreach ($user_ary as $forum_id => $forum_ary) { foreach ($forum_ary as $auth_option => $id_ary) { - if (!$forum_id && $auth_option == 'a_') + if (!$forum_id) { - $admin_id_ary = array_merge($admin_id_ary, $id_ary); + if ($auth_option == 'a_') + { + $admin_id_ary = array_merge($admin_id_ary, $id_ary); + } + else + { + $global_mod_id_ary = array_merge($global_mod_id_ary, $id_ary); + } continue; } else @@ -100,6 +112,9 @@ switch ($mode) } $admin_id_ary = array_unique($admin_id_ary); + $global_mod_id_ary = array_unique($global_mod_id_ary); + + $mod_id_ary = array_merge($mod_id_ary, $global_mod_id_ary); $mod_id_ary = array_unique($mod_id_ary); // Admin group id... @@ -110,6 +125,17 @@ switch ($mode) $admin_group_id = (int) $db->sql_fetchfield('group_id'); $db->sql_freeresult($result); + // Get group memberships for the admin id ary... + $admin_memberships = group_memberships($admin_group_id, $admin_id_ary); + $admin_user_ids = array(); + + // ok, we only need the user ids... + foreach ($admin_memberships as $row) + { + $admin_user_ids[$row['user_id']] = true; + } + unset($admin_memberships); + $sql = 'SELECT forum_id, forum_name FROM ' . FORUMS_TABLE . ' WHERE forum_type = ' . FORUM_POST; @@ -142,23 +168,20 @@ switch ($mode) 'ORDER_BY' => 'g.group_name ASC, u.username_clean ASC' )); - $result = $db->sql_query($sql); while ($row = $db->sql_fetchrow($result)) { $which_row = (in_array($row['user_id'], $admin_id_ary)) ? 'admin' : 'mod'; - // We sort out admins not having the admin group as default - // The drawback is that only those admins are displayed which are within - // the special group 'Administrators' and also having it assigned as their default group. - // - might change - if ($which_row == 'admin' && $row['default_group'] != $admin_group_id) + // We sort out admins not within the 'Administrators' group. + // Else, we will list those as admin only having the permission to view logs for example. + if ($which_row == 'admin' && empty($admin_user_ids[$row['user_id']])) { // Remove from admin_id_ary, because the user may be a mod instead unset($admin_id_ary[array_search($row['user_id'], $admin_id_ary)]); - if (!in_array($row['user_id'], $mod_id_ary)) + if (!in_array($row['user_id'], $mod_id_ary) && !in_array($row['user_id'], $global_mod_id_ary)) { continue; } @@ -171,7 +194,7 @@ switch ($mode) $s_forum_select = ''; $undisclosed_forum = false; - if (isset($forum_id_ary[$row['user_id']])) + if (isset($forum_id_ary[$row['user_id']]) && !in_array($row['user_id'], $global_mod_id_ary)) { if ($which_row == 'mod' && sizeof(array_diff(array_keys($forums), $forum_id_ary[$row['user_id']]))) { @@ -192,13 +215,14 @@ switch ($mode) } } - // If the mod is only moderating non-viewable forums let us display this circumstance - // instead of saying they are moderating all forums + // If the mod is only moderating non-viewable forums we skip the user. There is no gain in displaying the person then... if (!$s_forum_select && $undisclosed_forum) { - $s_forum_select = ''; +// $s_forum_select = ''; + continue; } + // The person is moderating several "public" forums, therefore the person should be listed, but not giving the real group name if hidden. if ($row['group_type'] == GROUP_HIDDEN && !$auth->acl_gets('a_group', 'a_groupadd', 'a_groupdel') && $row['ug_user_id'] != $user->data['user_id']) { $group_name = $user->lang['GROUP_UNDISCLOSED']; @@ -243,6 +267,11 @@ switch ($mode) $page_title = $user->lang['IM_USER']; $template_html = 'memberlist_im.html'; + if (!$auth->acl_get('u_sendim')) + { + trigger_error('NOT_AUTHORISED'); + } + $presence_img = ''; switch ($action) { @@ -268,7 +297,7 @@ switch ($mode) break; default: - trigger_error('This contact option is not supported', E_USER_ERROR); + trigger_error('NO_MODE', E_USER_ERROR); break; } @@ -345,26 +374,9 @@ switch ($mode) } // Get user... - if ($username) - { - $sql = 'SELECT * - FROM ' . USERS_TABLE . " - WHERE username_clean = '" . $db->sql_escape(utf8_clean_string($username)) . "'"; - } - else - { - $sql = 'SELECT * - FROM ' . USERS_TABLE . " - WHERE user_id = $user_id"; - } - - // a_user admins and founder are able to view inactive users and bots to be able to - // manage them more easily - if (!$auth->acl_get('a_user') && $user->data['user_type'] != USER_FOUNDER) - { - $sql .= ' AND user_type IN (' . USER_NORMAL . ', ' . USER_FOUNDER . ')'; - } - + $sql = 'SELECT * + FROM ' . USERS_TABLE . ' + WHERE ' . (($username) ? "username_clean = '" . $db->sql_escape(utf8_clean_string($username)) . "'" : "user_id = $user_id"); $result = $db->sql_query($sql); $member = $db->sql_fetchrow($result); $db->sql_freeresult($result); @@ -374,14 +386,29 @@ switch ($mode) trigger_error('NO_USER'); } + // a_user admins and founder are able to view inactive users and bots to be able to manage them more easily + // Normal users are able to see at least users having only changed their profile settings but not yet reactivated. + if (!$auth->acl_get('a_user') && $user->data['user_type'] != USER_FOUNDER) + { + if ($member['user_type'] == USER_IGNORE) + { + trigger_error('NO_USER'); + } + else if ($member['user_type'] == USER_INACTIVE && $member['user_inactive_reason'] != INACTIVE_PROFILE) + { + trigger_error('NO_USER'); + } + } + $user_id = (int) $member['user_id']; // Do the SQL thang $sql = 'SELECT g.group_id, g.group_name, g.group_type FROM ' . GROUPS_TABLE . ' g, ' . USER_GROUP_TABLE . " ug WHERE ug.user_id = $user_id - AND g.group_id = ug.group_id" . ((!$auth->acl_get('a_group')) ? ' AND group_type <> ' . GROUP_HIDDEN : '') . ' - ORDER BY group_type, group_name'; + AND g.group_id = ug.group_id" . ((!$auth->acl_gets('a_group', 'a_groupadd', 'a_groupdel')) ? ' AND g.group_type <> ' . GROUP_HIDDEN : '') . ' + AND ug.user_pending = 0 + ORDER BY g.group_type, g.group_name'; $result = $db->sql_query($sql); $group_options = ''; @@ -443,23 +470,7 @@ switch ($mode) $member['user_sig'] = smiley_text($member['user_sig']); } - $poster_avatar = ''; - if (!empty($member['user_avatar'])) - { - switch ($member['user_avatar_type']) - { - case AVATAR_UPLOAD: - $poster_avatar = $config['avatar_path'] . '/'; - break; - - case AVATAR_GALLERY: - $poster_avatar = $config['avatar_gallery_path'] . '/'; - break; - } - $poster_avatar .= $member['user_avatar']; - - $poster_avatar = ''; - } + $poster_avatar = get_user_avatar($member['user_avatar'], $member['user_avatar_type'], $member['user_avatar_width'], $member['user_avatar_height']); $template->assign_vars(show_profile($member)); @@ -869,7 +880,7 @@ switch ($mode) // Additional sorting options for user search ... if search is enabled, if not // then only admins can make use of this (for ACP functionality) - $sql_select = $sql_from = $sql_where = $order_by = ''; + $sql_select = $sql_where_data = $sql_from = $sql_where = $order_by = ''; $form = request_var('form', ''); $field = request_var('field', ''); @@ -929,7 +940,7 @@ switch ($mode) $sql_where .= (is_numeric($count)) ? ' AND u.user_posts ' . $find_key_match[$count_select] . ' ' . (int) $count . ' ' : ''; $sql_where .= (sizeof($joined) > 1) ? " AND u.user_regdate " . $find_key_match[$joined_select] . ' ' . gmmktime(0, 0, 0, intval($joined[1]), intval($joined[2]), intval($joined[0])) : ''; $sql_where .= (sizeof($active) > 1) ? " AND u.user_lastvisit " . $find_key_match[$active_select] . ' ' . gmmktime(0, 0, 0, $active[1], intval($active[2]), intval($active[0])) : ''; - $sql_where .= ($search_group_id) ? " AND u.user_id = ug.user_id AND ug.group_id = $search_group_id " : ''; + $sql_where .= ($search_group_id) ? " AND u.user_id = ug.user_id AND ug.group_id = $search_group_id AND ug.user_pending = 0 " : ''; if ($search_group_id) { @@ -1055,24 +1066,8 @@ switch ($mode) break; } - $avatar_img = ''; - - if ($group_row['group_avatar']) - { - switch ($group_row['group_avatar_type']) - { - case AVATAR_UPLOAD: - $avatar_img = $phpbb_root_path . $config['avatar_path'] . '/'; - break; - - case AVATAR_GALLERY: - $avatar_img = $phpbb_root_path . $config['avatar_gallery_path'] . '/'; - break; - } - - $avatar_img .= $group_row['group_avatar']; - $avatar_img = ''; - } + // Misusing the avatar function for displaying group avatars... + $avatar_img = get_user_avatar($group_row['group_avatar'], $group_row['group_avatar_type'], $group_row['group_avatar_width'], $group_row['group_avatar_height'], 'GROUP_AVATAR'); $rank_title = $rank_img = $rank_img_src = ''; if ($group_row['group_rank']) @@ -1110,6 +1105,7 @@ switch ($mode) $order_by = 'ug.group_leader DESC, '; $sql_where .= " AND ug.user_pending = 0 AND u.user_id = ug.user_id AND ug.group_id = $group_id"; + $sql_where_data = " AND u.user_id = ug.user_id AND ug.group_id = $group_id"; } // Sorting and order @@ -1144,7 +1140,7 @@ switch ($mode) $s_char_options .= ''; // Build a relevant pagination_url - $params = array(); + $params = $sort_params = array(); foreach (array('_POST', '_GET') as $global_var) { foreach ($$global_var as $key => $var) @@ -1159,14 +1155,24 @@ switch ($mode) continue; } - $params[] = urlencode($key) . '=' . urlencode(htmlspecialchars($var)); + $param = urlencode($key) . '=' . urlencode(htmlspecialchars($var)); + $params[] = $param; + + if (!in_array($key, array('sk', 'sd'))) + { + $sort_params[] = $param; + } } } $u_hide_find_member = append_sid("{$phpbb_root_path}memberlist.$phpEx", implode('&', $params)); $params[] = "mode=$mode"; + $sort_params[] = "mode=$mode"; $pagination_url = append_sid("{$phpbb_root_path}memberlist.$phpEx", implode('&', $params)); + $sort_url = append_sid("{$phpbb_root_path}memberlist.$phpEx", implode('&', $sort_params)); + + unset($params, $sort_params); // Some search user specific data if ($mode == 'searchuser' && ($config['load_search'] || $auth->acl_get('a_'))) @@ -1174,10 +1180,25 @@ switch ($mode) $group_selected = request_var('search_group_id', 0); $s_group_select = ''; - $sql = 'SELECT group_id, group_name, group_type - FROM ' . GROUPS_TABLE . ' - WHERE group_type <> ' . GROUP_HIDDEN . ' - ORDER BY group_name ASC'; + if ($auth->acl_gets('a_group', 'a_groupadd', 'a_groupdel')) + { + $sql = 'SELECT group_id, group_name, group_type + FROM ' . GROUPS_TABLE . ' + ORDER BY group_name ASC'; + } + else + { + $sql = 'SELECT g.group_id, g.group_name, g.group_type + FROM ' . GROUPS_TABLE . ' g + LEFT JOIN ' . USER_GROUP_TABLE . ' ug + ON ( + g.group_id = ug.group_id + AND ug.user_id = ' . $user->data['user_id'] . ' + AND ug.user_pending = 0 + ) + WHERE (g.group_type <> ' . GROUP_HIDDEN . ' OR ug.user_id = ' . $user->data['user_id'] . ') + ORDER BY g.group_name ASC'; + } $result = $db->sql_query($sql); while ($row = $db->sql_fetchrow($result)) @@ -1199,6 +1220,8 @@ switch ($mode) 'COUNT' => $count, 'IP' => $ipdomain, + 'S_IP_SEARCH_ALLOWED' => ($auth->acl_getf_global('m_info')) ? true : false, + 'S_IN_SEARCH_POPUP' => ($form && $field) ? true : false, 'S_SEARCH_USER' => true, 'S_FORM_NAME' => $form, 'S_FIELD_NAME' => $field, @@ -1212,23 +1235,8 @@ switch ($mode) ); } - $sql = 'SELECT session_user_id, MAX(session_time) AS session_time - FROM ' . SESSIONS_TABLE . ' - WHERE session_time >= ' . (time() - $config['session_length']) . ' - AND session_user_id <> ' . ANONYMOUS . ' - GROUP BY session_user_id'; - $result = $db->sql_query($sql); - - $session_times = array(); - while ($row = $db->sql_fetchrow($result)) - { - $session_times[$row['session_user_id']] = $row['session_time']; - } - $db->sql_freeresult($result); - - // Do the SQL thang - $sql = "SELECT u.* - $sql_select + // Get us some users :D + $sql = "SELECT u.user_id FROM " . USERS_TABLE . " u $sql_from WHERE u.user_type IN (" . USER_NORMAL . ', ' . USER_FOUNDER . ") @@ -1236,68 +1244,113 @@ switch ($mode) ORDER BY $order_by"; $result = $db->sql_query_limit($sql, $config['topics_per_page'], $start); - $id_cache = array(); + $user_list = array(); while ($row = $db->sql_fetchrow($result)) { - $row['session_time'] = (!empty($session_times[$row['user_id']])) ? $session_times[$row['user_id']] : 0; - $row['last_visit'] = (!empty($row['session_time'])) ? $row['session_time'] : $row['user_lastvisit']; - - $id_cache[$row['user_id']] = $row; + $user_list[] = (int) $row['user_id']; } $db->sql_freeresult($result); - - // Load custom profile fields - if ($config['load_cpf_memberlist']) - { - include_once($phpbb_root_path . 'includes/functions_profile_fields.' . $phpEx); - $cp = new custom_profile(); - // Grab all profile fields from users in id cache for later use - similar to the poster cache - $profile_fields_cache = $cp->generate_profile_fields_template('grab', array_keys($id_cache)); - } - - // If we sort by last active date we need to adjust the id cache due to user_lastvisit not being the last active date... - if ($sort_key == 'l') + // So, did we get any users? + if (sizeof($user_list)) { - $lesser_than = ($sort_dir == 'a') ? -1 : 1; - uasort($id_cache, create_function('$first, $second', "return (\$first['last_visit'] == \$second['last_visit']) ? 0 : ((\$first['last_visit'] < \$second['last_visit']) ? $lesser_than : ($lesser_than * -1));")); - } + // Session time?! Session time... + $sql = 'SELECT session_user_id, MAX(session_time) AS session_time + FROM ' . SESSIONS_TABLE . ' + WHERE session_time >= ' . (time() - $config['session_length']) . ' + AND ' . $db->sql_in_set('session_user_id', $user_list) . ' + GROUP BY session_user_id'; + $result = $db->sql_query($sql); - $i = 0; - foreach ($id_cache as $user_id => $row) - { - $cp_row = array(); + $session_times = array(); + while ($row = $db->sql_fetchrow($result)) + { + $session_times[$row['session_user_id']] = $row['session_time']; + } + $db->sql_freeresult($result); + + // Do the SQL thang + if ($mode == 'group') + { + $sql = "SELECT u.* + $sql_select + FROM " . USERS_TABLE . " u + $sql_from + WHERE " . $db->sql_in_set('u.user_id', $user_list) . " + $sql_where_data"; + } + else + { + $sql = 'SELECT * + FROM ' . USERS_TABLE . ' + WHERE ' . $db->sql_in_set('user_id', $user_list); + } + $result = $db->sql_query($sql); + + $id_cache = array(); + while ($row = $db->sql_fetchrow($result)) + { + $row['session_time'] = (!empty($session_times[$row['user_id']])) ? $session_times[$row['user_id']] : 0; + $row['last_visit'] = (!empty($row['session_time'])) ? $row['session_time'] : $row['user_lastvisit']; + + $id_cache[$row['user_id']] = $row; + } + $db->sql_freeresult($result); + + // Load custom profile fields if ($config['load_cpf_memberlist']) { - $cp_row = (isset($profile_fields_cache[$user_id])) ? $cp->generate_profile_fields_template('show', false, $profile_fields_cache[$user_id]) : array(); + include_once($phpbb_root_path . 'includes/functions_profile_fields.' . $phpEx); + $cp = new custom_profile(); + + // Grab all profile fields from users in id cache for later use - similar to the poster cache + $profile_fields_cache = $cp->generate_profile_fields_template('grab', $user_list); } - $memberrow = array_merge(show_profile($row), array( - 'ROW_NUMBER' => $i + ($start + 1), - - 'S_CUSTOM_PROFILE' => (isset($cp_row['row']) && sizeof($cp_row['row'])) ? true : false, - 'S_GROUP_LEADER' => (isset($row['group_leader']) && $row['group_leader']) ? true : false, - - 'U_VIEW_PROFILE' => append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=viewprofile&u=' . $user_id)) - ); - - if (isset($cp_row['row']) && sizeof($cp_row['row'])) + // If we sort by last active date we need to adjust the id cache due to user_lastvisit not being the last active date... + if ($sort_key == 'l') { - $memberrow = array_merge($memberrow, $cp_row['row']); + $lesser_than = ($sort_dir == 'a') ? -1 : 1; + uasort($id_cache, create_function('$first, $second', "return (\$first['last_visit'] == \$second['last_visit']) ? 0 : ((\$first['last_visit'] < \$second['last_visit']) ? $lesser_than : ($lesser_than * -1));")); } - $template->assign_block_vars('memberrow', $memberrow); - - if (isset($cp_row['blockrow']) && sizeof($cp_row['blockrow'])) + for ($i = 0, $end = sizeof($user_list); $i < $end; ++$i) { - foreach ($cp_row['blockrow'] as $field_data) + $user_id = $user_list[$i]; + $row =& $id_cache[$user_id]; + + $cp_row = array(); + if ($config['load_cpf_memberlist']) { - $template->assign_block_vars('memberrow.custom_fields', $field_data); + $cp_row = (isset($profile_fields_cache[$user_id])) ? $cp->generate_profile_fields_template('show', false, $profile_fields_cache[$user_id]) : array(); } - } - $i++; - unset($id_cache[$user_id]); + $memberrow = array_merge(show_profile($row), array( + 'ROW_NUMBER' => $i + ($start + 1), + + 'S_CUSTOM_PROFILE' => (isset($cp_row['row']) && sizeof($cp_row['row'])) ? true : false, + 'S_GROUP_LEADER' => (isset($row['group_leader']) && $row['group_leader']) ? true : false, + + 'U_VIEW_PROFILE' => append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=viewprofile&u=' . $user_id)) + ); + + if (isset($cp_row['row']) && sizeof($cp_row['row'])) + { + $memberrow = array_merge($memberrow, $cp_row['row']); + } + + $template->assign_block_vars('memberrow', $memberrow); + + if (isset($cp_row['blockrow']) && sizeof($cp_row['blockrow'])) + { + foreach ($cp_row['blockrow'] as $field_data) + { + $template->assign_block_vars('memberrow.custom_fields', $field_data); + } + } + + unset($id_cache[$user_id]); + } } // Generate page @@ -1319,20 +1372,20 @@ switch ($mode) 'U_FIND_MEMBER' => ($config['load_search'] || $auth->acl_get('a_')) ? append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=searchuser') : '', 'U_HIDE_FIND_MEMBER' => ($mode == 'searchuser') ? $u_hide_find_member : '', - 'U_SORT_USERNAME' => $pagination_url . '&sk=a&sd=' . (($sort_key == 'a' && $sort_dir == 'a') ? 'd' : 'a'), - 'U_SORT_FROM' => $pagination_url . '&sk=b&sd=' . (($sort_key == 'b' && $sort_dir == 'a') ? 'd' : 'a'), - 'U_SORT_JOINED' => $pagination_url . '&sk=c&sd=' . (($sort_key == 'c' && $sort_dir == 'a') ? 'd' : 'a'), - 'U_SORT_POSTS' => $pagination_url . '&sk=d&sd=' . (($sort_key == 'd' && $sort_dir == 'a') ? 'd' : 'a'), - 'U_SORT_EMAIL' => $pagination_url . '&sk=e&sd=' . (($sort_key == 'e' && $sort_dir == 'a') ? 'd' : 'a'), - 'U_SORT_WEBSITE' => $pagination_url . '&sk=f&sd=' . (($sort_key == 'f' && $sort_dir == 'a') ? 'd' : 'a'), - 'U_SORT_LOCATION' => $pagination_url . '&sk=n&sd=' . (($sort_key == 'n' && $sort_dir == 'a') ? 'd' : 'a'), - 'U_SORT_ICQ' => $pagination_url . '&sk=g&sd=' . (($sort_key == 'g' && $sort_dir == 'a') ? 'd' : 'a'), - 'U_SORT_AIM' => $pagination_url . '&sk=h&sd=' . (($sort_key == 'h' && $sort_dir == 'a') ? 'd' : 'a'), - 'U_SORT_MSN' => $pagination_url . '&sk=i&sd=' . (($sort_key == 'i' && $sort_dir == 'a') ? 'd' : 'a'), - 'U_SORT_YIM' => $pagination_url . '&sk=j&sd=' . (($sort_key == 'j' && $sort_dir == 'a') ? 'd' : 'a'), - 'U_SORT_ACTIVE' => $pagination_url . '&sk=k&sd=' . (($sort_key == 'k' && $sort_dir == 'a') ? 'd' : 'a'), - 'U_SORT_RANK' => $pagination_url . '&sk=m&sd=' . (($sort_key == 'm' && $sort_dir == 'a') ? 'd' : 'a'), - 'U_LIST_CHAR' => $pagination_url . '&sk=a&sd=' . (($sort_key == 'l' && $sort_dir == 'a') ? 'd' : 'a'), + 'U_SORT_USERNAME' => $sort_url . '&sk=a&sd=' . (($sort_key == 'a' && $sort_dir == 'a') ? 'd' : 'a'), + 'U_SORT_FROM' => $sort_url . '&sk=b&sd=' . (($sort_key == 'b' && $sort_dir == 'a') ? 'd' : 'a'), + 'U_SORT_JOINED' => $sort_url . '&sk=c&sd=' . (($sort_key == 'c' && $sort_dir == 'a') ? 'd' : 'a'), + 'U_SORT_POSTS' => $sort_url . '&sk=d&sd=' . (($sort_key == 'd' && $sort_dir == 'a') ? 'd' : 'a'), + 'U_SORT_EMAIL' => $sort_url . '&sk=e&sd=' . (($sort_key == 'e' && $sort_dir == 'a') ? 'd' : 'a'), + 'U_SORT_WEBSITE' => $sort_url . '&sk=f&sd=' . (($sort_key == 'f' && $sort_dir == 'a') ? 'd' : 'a'), + 'U_SORT_LOCATION' => $sort_url . '&sk=b&sd=' . (($sort_key == 'b' && $sort_dir == 'a') ? 'd' : 'a'), + 'U_SORT_ICQ' => $sort_url . '&sk=g&sd=' . (($sort_key == 'g' && $sort_dir == 'a') ? 'd' : 'a'), + 'U_SORT_AIM' => $sort_url . '&sk=h&sd=' . (($sort_key == 'h' && $sort_dir == 'a') ? 'd' : 'a'), + 'U_SORT_MSN' => $sort_url . '&sk=i&sd=' . (($sort_key == 'i' && $sort_dir == 'a') ? 'd' : 'a'), + 'U_SORT_YIM' => $sort_url . '&sk=j&sd=' . (($sort_key == 'j' && $sort_dir == 'a') ? 'd' : 'a'), + 'U_SORT_ACTIVE' => $sort_url . '&sk=l&sd=' . (($sort_key == 'l' && $sort_dir == 'a') ? 'd' : 'a'), + 'U_SORT_RANK' => $sort_url . '&sk=m&sd=' . (($sort_key == 'm' && $sort_dir == 'a') ? 'd' : 'a'), + 'U_LIST_CHAR' => $sort_url . '&sk=a&sd=' . (($sort_key == 'l' && $sort_dir == 'a') ? 'd' : 'a'), 'S_SHOW_GROUP' => ($mode == 'group') ? true : false, 'S_MODE_SELECT' => $s_sort_key, @@ -1440,17 +1493,24 @@ function show_profile($data) 'U_SEARCH_USER' => ($auth->acl_get('u_search')) ? append_sid("{$phpbb_root_path}search.$phpEx", "author_id=$user_id&sr=posts") : '', 'U_NOTES' => $auth->acl_getf_global('m_') ? append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=notes&mode=user_notes&u=' . $user_id, true, $user->session_id) : '', - 'U_WARN' => $auth->acl_getf_global('m_warn') ? append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=warn&mode=warn_user&u=' . $user_id, true, $user->session_id) : '', + 'U_WARN' => $auth->acl_get('m_warn') ? append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=warn&mode=warn_user&u=' . $user_id, true, $user->session_id) : '', 'U_PM' => ($config['allow_privmsg'] && $auth->acl_get('u_sendpm') && ($data['user_allow_pm'] || $auth->acl_gets('a_', 'm_') || $auth->acl_getf_global('m_'))) ? append_sid("{$phpbb_root_path}ucp.$phpEx", 'i=pm&mode=compose&u=' . $user_id) : '', 'U_EMAIL' => $email, 'U_WWW' => (!empty($data['user_website'])) ? $data['user_website'] : '', 'U_ICQ' => ($data['user_icq']) ? 'http://www.icq.com/people/webmsg.php?to=' . $data['user_icq'] : '', - 'U_AIM' => ($data['user_aim']) ? append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=contact&action=aim&u=' . $user_id) : '', + 'U_AIM' => ($data['user_aim'] && $auth->acl_get('u_sendim')) ? append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=contact&action=aim&u=' . $user_id) : '', 'U_YIM' => ($data['user_yim']) ? 'http://edit.yahoo.com/config/send_webmesg?.target=' . $data['user_yim'] . '&.src=pg' : '', - 'U_MSN' => ($data['user_msnm']) ? append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=contact&action=msnm&u=' . $user_id) : '', - 'U_JABBER' => ($data['user_jabber']) ? append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=contact&action=jabber&u=' . $user_id) : '', + 'U_MSN' => ($data['user_msnm'] && $auth->acl_get('u_sendim')) ? append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=contact&action=msnm&u=' . $user_id) : '', + 'U_JABBER' => ($data['user_jabber'] && $auth->acl_get('u_sendim')) ? append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=contact&action=jabber&u=' . $user_id) : '', 'LOCATION' => ($data['user_from']) ? $data['user_from'] : '', - + + 'USER_ICQ' => $data['user_icq'], + 'USER_AIM' => $data['user_aim'], + 'USER_YIM' => $data['user_yim'], + 'USER_MSN' => $data['user_msnm'], + 'USER_JABBER' => $data['user_jabber'], + 'USER_JABBER_IMG' => ($data['user_jabber']) ? $user->img('icon_contact_jabber', $data['user_jabber']) : '', + 'L_VIEWING_PROFILE' => sprintf($user->lang['VIEWING_PROFILE'], $username), ); } diff --git a/phpBB/posting.php b/phpBB/posting.php index 2bb1329d16..77f8aa720d 100644 --- a/phpBB/posting.php +++ b/phpBB/posting.php @@ -85,6 +85,7 @@ switch ($mode) case 'delete': if (!$post_id) { + $user->setup('posting'); trigger_error('NO_POST'); } @@ -123,7 +124,7 @@ switch ($mode) if (!$sql) { - $user->setup(array('posting', 'mcp', 'viewtopic')); + $user->setup('posting'); trigger_error('NO_POST_MODE'); } @@ -133,6 +134,10 @@ $db->sql_freeresult($result); if (!$post_data) { + if (!($mode == 'post' || $mode == 'bump' || $mode == 'reply')) + { + $user->setup('posting'); + } trigger_error(($mode == 'post' || $mode == 'bump' || $mode == 'reply') ? 'NO_TOPIC' : 'NO_POST'); } @@ -403,12 +408,13 @@ if ($mode != 'edit') $post_data['enable_magic_url'] = $post_data['drafts'] = false; // User own some drafts? -if ($user->data['is_registered'] && $auth->acl_get('u_savedrafts')) +if ($user->data['is_registered'] && $auth->acl_get('u_savedrafts') && ($mode == 'reply' || $mode == 'post' || $mode == 'quote')) { $sql = 'SELECT draft_id FROM ' . DRAFTS_TABLE . ' - WHERE (forum_id IN (' . $forum_id . ', 0)' . (($topic_id) ? " OR topic_id = $topic_id" : '') . ') - AND user_id = ' . $user->data['user_id'] . + WHERE user_id = ' . $user->data['user_id'] . + (($forum_id) ? ' AND forum_id = ' . (int) $forum_id : '') . + (($topic_id) ? ' AND topic_id = ' . (int) $topic_id : '') . (($draft_id) ? " AND draft_id <> $draft_id" : ''); $result = $db->sql_query_limit($sql, 1); @@ -441,14 +447,14 @@ if ($mode == 'edit' && $post_data['bbcode_uid']) // HTML, BBCode, Smilies, Images and Flash status $bbcode_status = ($config['allow_bbcode'] && $auth->acl_get('f_bbcode', $forum_id)) ? true : false; -$smilies_status = ($config['allow_smilies'] && $auth->acl_get('f_smilies', $forum_id)) ? true : false; -$img_status = ($auth->acl_get('f_img', $forum_id)) ? true : false; +$smilies_status = ($bbcode_status && $config['allow_smilies'] && $auth->acl_get('f_smilies', $forum_id)) ? true : false; +$img_status = ($bbcode_status && $auth->acl_get('f_img', $forum_id)) ? true : false; $url_status = ($config['allow_post_links']) ? true : false; -$flash_status = ($auth->acl_get('f_flash', $forum_id)) ? true : false; +$flash_status = ($bbcode_status && $auth->acl_get('f_flash', $forum_id)) ? true : false; $quote_status = ($auth->acl_get('f_reply', $forum_id)) ? true : false; // Save Draft -if ($save && $user->data['is_registered'] && $auth->acl_get('u_savedrafts')) +if ($save && $user->data['is_registered'] && $auth->acl_get('u_savedrafts') && ($mode == 'reply' || $mode == 'post' || $mode == 'quote')) { $subject = utf8_normalize_nfc(request_var('subject', '', true)); $subject = (!$subject && $mode != 'post') ? $post_data['topic_title'] : $subject; @@ -510,7 +516,7 @@ if ($save && $user->data['is_registered'] && $auth->acl_get('u_savedrafts')) } // Load requested Draft -if ($draft_id && $user->data['is_registered'] && $auth->acl_get('u_savedrafts')) +if ($draft_id && ($mode == 'reply' || $mode == 'quote' || $mode == 'post') && $user->data['is_registered'] && $auth->acl_get('u_savedrafts')) { $sql = 'SELECT draft_subject, draft_message FROM ' . DRAFTS_TABLE . " @@ -534,7 +540,7 @@ if ($draft_id && $user->data['is_registered'] && $auth->acl_get('u_savedrafts')) } // Load draft overview -if ($load && $post_data['drafts']) +if ($load && ($mode == 'reply' || $mode == 'quote' || $mode == 'post') && $post_data['drafts']) { load_drafts($topic_id, $forum_id); } @@ -544,7 +550,7 @@ $solved_captcha = false; if ($submit || $preview || $refresh) { $post_data['topic_cur_post_id'] = request_var('topic_cur_post_id', 0); - $post_data['post_subject'] = utf8_normalize_nfc(request_var('subject', '', true)); + $post_data['post_subject'] = trim(utf8_normalize_nfc(request_var('subject', '', true))); $message_parser->message = utf8_normalize_nfc(request_var('message', '', true)); $post_data['username'] = utf8_normalize_nfc(request_var('username', $post_data['username'], true)); @@ -707,7 +713,7 @@ if ($submit || $preview || $refresh) { include($phpbb_root_path . 'includes/functions_user.' . $phpEx); - if (($result = validate_username($post_data['username'])) !== false) + if (($result = validate_username($post_data['username'], (!empty($post_data['post_username'])) ? $post_data['post_username'] : '')) !== false) { $user->add_lang('ucp'); $error[] = $user->lang[$result . '_USERNAME']; @@ -769,10 +775,11 @@ if ($submit || $preview || $refresh) $post_data['poll_options'] = (isset($poll['poll_options'])) ? $poll['poll_options'] : ''; $post_data['poll_title'] = (isset($poll['poll_title'])) ? $poll['poll_title'] : ''; + /* We reset votes, therefore also allow removing options if ($post_data['poll_last_vote'] && ($poll['poll_options_size'] < $orig_poll_options_size)) { $message_parser->warn_msg[] = $user->lang['NO_DELETE_POLL_OPTIONS']; - } + }*/ } else { @@ -800,8 +807,9 @@ if ($submit || $preview || $refresh) if (!$auth->acl_get($auth_option, $forum_id)) { - // There is a special case where a user edits his post whereby the topic type got changed by an admin/mod - if ($mode == 'edit' && $post_data['poster_id'] == $user->data['user_id']) + // There is a special case where a user edits his post whereby the topic type got changed by an admin/mod. + // Another case would be a mod not having sticky permissions for example but edit permissions. + if ($mode == 'edit') { // To prevent non-authed users messing around with the topic type we reset it to the original one. $post_data['topic_type'] = $post_data['orig_topic_type']; @@ -849,7 +857,7 @@ if ($submit || $preview || $refresh) include_once($phpbb_root_path . 'includes/functions_admin.' . $phpEx); $template->assign_vars(array( - 'S_FORUM_SELECT' => make_forum_select(false, false, false, true, true), + 'S_FORUM_SELECT' => make_forum_select(false, false, false, true, true, true), 'S_UNGLOBALISE' => true) ); @@ -858,6 +866,12 @@ if ($submit || $preview || $refresh) } else { + if (!$auth->acl_get('f_post', $to_forum_id)) + { + // This will only be triggered if the user tried to trick the forum. + trigger_error('NOT_AUTHORISED'); + } + $forum_id = $to_forum_id; } } @@ -906,6 +920,7 @@ if ($submit || $preview || $refresh) 'topic_first_post_id' => (isset($post_data['topic_first_post_id'])) ? (int) $post_data['topic_first_post_id'] : 0, 'topic_last_post_id' => (isset($post_data['topic_last_post_id'])) ? (int) $post_data['topic_last_post_id'] : 0, 'topic_time_limit' => (int) $post_data['topic_time_limit'], + 'topic_attachment' => (isset($post_data['topic_attachment'])) ? (int) $post_data['topic_attachment'] : 0, 'post_id' => (int) $post_id, 'topic_id' => (int) $topic_id, 'forum_id' => (int) $forum_id, @@ -931,8 +946,17 @@ if ($submit || $preview || $refresh) 'bbcode_uid' => $message_parser->bbcode_uid, 'message' => $message_parser->message, 'attachment_data' => $message_parser->attachment_data, - 'filename_data' => $message_parser->filename_data + 'filename_data' => $message_parser->filename_data, + + 'topic_approved' => (isset($post_data['topic_approved'])) ? $post_data['topic_approved'] : false, + 'post_approved' => (isset($post_data['post_approved'])) ? $post_data['post_approved'] : false, ); + + if ($mode == 'edit') + { + $data['topic_replies_real'] = $post_data['topic_replies_real']; + } + unset($message_parser); $redirect_url = submit_post($mode, $post_data['post_subject'], $post_data['username'], $post_data['topic_type'], $poll, $data, $update_message); @@ -1095,7 +1119,7 @@ if ($mode == 'post' || ($mode == 'edit' && $post_id == $post_data['topic_first_p } $s_topic_icons = false; -if ($post_data['enable_icons']) +if ($post_data['enable_icons'] && $auth->acl_get('f_icons', $forum_id)) { $s_topic_icons = posting_gen_topic_icons($mode, $post_data['icon_id']); } @@ -1204,7 +1228,7 @@ $template->assign_vars(array( 'IMG_STATUS' => ($img_status) ? $user->lang['IMAGES_ARE_ON'] : $user->lang['IMAGES_ARE_OFF'], 'FLASH_STATUS' => ($flash_status) ? $user->lang['FLASH_IS_ON'] : $user->lang['FLASH_IS_OFF'], 'SMILIES_STATUS' => ($smilies_status) ? $user->lang['SMILIES_ARE_ON'] : $user->lang['SMILIES_ARE_OFF'], - 'URL_STATUS' => ($url_status) ? $user->lang['URL_IS_ON'] : $user->lang['URL_IS_OFF'], + 'URL_STATUS' => ($bbcode_status && $url_status) ? $user->lang['URL_IS_ON'] : $user->lang['URL_IS_OFF'], 'MINI_POST_IMG' => $user->img('icon_post_target', $user->lang['POST']), 'POST_DATE' => ($post_data['post_time']) ? $user->format_date($post_data['post_time']) : '', 'ERROR' => (sizeof($error)) ? implode('
    ', $error) : '', @@ -1219,7 +1243,7 @@ $template->assign_vars(array( 'S_CLOSE_PROGRESS_WINDOW' => (isset($_POST['add_file'])) ? true : false, 'S_EDIT_POST' => ($mode == 'edit') ? true : false, 'S_EDIT_REASON' => ($mode == 'edit' && $auth->acl_get('m_edit', $forum_id)) ? true : false, - 'S_DISPLAY_USERNAME' => (!$user->data['is_registered'] || ($mode == 'edit' && $post_data['post_username'])) ? true : false, + 'S_DISPLAY_USERNAME' => (!$user->data['is_registered'] || ($mode == 'edit' && $post_data['poster_id'] == ANONYMOUS)) ? true : false, 'S_SHOW_TOPIC_ICONS' => $s_topic_icons, 'S_DELETE_ALLOWED' => ($mode == 'edit' && (($post_id == $post_data['topic_last_post_id'] && $post_data['poster_id'] == $user->data['user_id'] && $auth->acl_get('f_delete', $forum_id)) || $auth->acl_get('m_delete', $forum_id))) ? true : false, 'S_BBCODE_ALLOWED' => $bbcode_status, @@ -1237,7 +1261,7 @@ $template->assign_vars(array( 'S_LINKS_ALLOWED' => $url_status, 'S_MAGIC_URL_CHECKED' => ($urls_checked) ? ' checked="checked"' : '', 'S_TYPE_TOGGLE' => $topic_type_toggle, - 'S_SAVE_ALLOWED' => ($auth->acl_get('u_savedrafts') && $user->data['is_registered']) ? true : false, + 'S_SAVE_ALLOWED' => ($auth->acl_get('u_savedrafts') && $user->data['is_registered'] && $mode != 'edit') ? true : false, 'S_HAS_DRAFTS' => ($auth->acl_get('u_savedrafts') && $user->data['is_registered'] && $post_data['drafts']) ? true : false, 'S_FORM_ENCTYPE' => $form_enctype, @@ -1381,7 +1405,7 @@ function handle_post_delete($forum_id, $topic_id, $post_id, &$post_data) } // If we are here the user is not able to delete - present the correct error message - if ($post_data['poster_id'] != $user->data['user_id'] && !$auth->acl_get('f_delete', $forum_id)) + if ($post_data['poster_id'] != $user->data['user_id'] && $auth->acl_get('f_delete', $forum_id)) { trigger_error('DELETE_OWN_POSTS'); } diff --git a/phpBB/report.php b/phpBB/report.php index a7bcf58cc9..cbae24b228 100644 --- a/phpBB/report.php +++ b/phpBB/report.php @@ -26,8 +26,8 @@ $forum_id = request_var('f', 0); $post_id = request_var('p', 0); $reason_id = request_var('reason_id', 0); $report_text = utf8_normalize_nfc(request_var('report_text', '', true)); +$user_notify = ($user->data['is_registered']) ? request_var('notify', 0) : false; -$user_notify = (isset($_POST['notify']) && $user->data['is_registered']) ? true : false; $submit = (isset($_POST['submit'])) ? true : false; if (!$post_id) @@ -132,7 +132,8 @@ if ($submit && $reason_id) { $sql = 'UPDATE ' . TOPICS_TABLE . ' SET topic_reported = 1 - WHERE topic_id = ' . $report_data['topic_id']; + WHERE topic_id = ' . $report_data['topic_id'] . ' + OR topic_moved_id = ' . $report_data['topic_id']; $db->sql_query($sql); } diff --git a/phpBB/search.php b/phpBB/search.php index 3e4159025a..ed1b43fd9e 100644 --- a/phpBB/search.php +++ b/phpBB/search.php @@ -135,7 +135,7 @@ if ($keywords || $author || $author_id || $search_id || $submit) } // Which forums should not be searched? Author searches are also carried out in unindexed forums - if (empty($search->search_query) && sizeof($author_id_ary)) + if (empty($keywords) && sizeof($author_id_ary)) { $ex_fid_ary = array_keys($auth->acl_getf('!f_read', true)); } @@ -234,7 +234,7 @@ if ($keywords || $author || $author_id || $search_id || $submit) $correct_query = $search->split_keywords($keywords, $search_terms); if (!$correct_query || (empty($search->search_query) && !sizeof($author_id_ary) && !$search_id)) { - $ignored = (sizeof($search->common_words)) ? sprintf($user->lang['IGNORED_TERMS_EXPLAIN'], htmlspecialchars(implode(' ', $search->common_words), ENT_COMPAT, 'UTF-8')) . '
    ' : ''; + $ignored = (sizeof($search->common_words)) ? sprintf($user->lang['IGNORED_TERMS_EXPLAIN'], implode(' ', $search->common_words)) . '
    ' : ''; trigger_error($ignored . sprintf($user->lang['NO_KEYWORDS'], $search->word_length['min'], $search->word_length['max'])); } } @@ -453,16 +453,16 @@ if ($keywords || $author || $author_id || $search_id || $submit) } // define some vars for urls - $hilit = htmlspecialchars(implode('|', explode(' ', preg_replace('#\s+#u', ' ', str_replace(array('+', '-', '|', '(', ')'), ' ', $keywords))))); - $u_hilit = urlencode($keywords); + $hilit = implode('|', explode(' ', preg_replace('#\s+#u', ' ', str_replace(array('+', '-', '|', '(', ')', '"'), ' ', $keywords)))); + $u_hilit = urlencode(htmlspecialchars_decode(str_replace('|', ' ', $hilit))); $u_show_results = ($show_results != 'posts') ? '&sr=' . $show_results : ''; $u_search_forum = implode('&fid%5B%5D=', $search_forum); $u_search = append_sid("{$phpbb_root_path}search.$phpEx", $u_sort_param . $u_show_results); $u_search .= ($search_id) ? '&search_id=' . $search_id : ''; - $u_search .= ($u_hilit) ? '&keywords=' . $u_hilit : ''; + $u_search .= ($u_hilit) ? '&keywords=' . urlencode(htmlspecialchars_decode($search->search_query)) : ''; $u_search .= ($topic_id) ? '&t=' . $topic_id : ''; - $u_search .= ($author) ? '&author=' . urlencode($author) : ''; + $u_search .= ($author) ? '&author=' . urlencode(htmlspecialchars_decode($author)) : ''; $u_search .= ($author_id) ? '&author_id=' . $author_id : ''; $u_search .= ($u_search_forum) ? '&fid%5B%5D=' . $u_search_forum : ''; $u_search .= (!$search_child) ? '&sc=0' : ''; @@ -472,8 +472,8 @@ if ($keywords || $author || $author_id || $search_id || $submit) $template->assign_vars(array( 'SEARCH_TITLE' => $l_search_title, 'SEARCH_MATCHES' => $l_search_matches, - 'SEARCH_WORDS' => preg_replace('#&(\#[0-9]+;)#', '&$1', htmlspecialchars($search->search_query)), - 'IGNORED_WORDS' => (sizeof($search->common_words)) ? htmlspecialchars(implode(' ', $search->common_words)) : '', + 'SEARCH_WORDS' => $search->search_query, + 'IGNORED_WORDS' => (sizeof($search->common_words)) ? implode(' ', $search->common_words) : '', 'PAGINATION' => generate_pagination($u_search, $total_match_count, $per_page, $start), 'PAGE_NUMBER' => on_page($total_match_count, $per_page, $start), 'TOTAL_MATCHES' => $total_match_count, @@ -489,9 +489,10 @@ if ($keywords || $author || $author_id || $search_id || $submit) 'NEWEST_POST_IMG' => $user->img('icon_topic_newest', 'VIEW_NEWEST_POST'), 'REPORTED_IMG' => $user->img('icon_topic_reported', 'TOPIC_REPORTED'), 'UNAPPROVED_IMG' => $user->img('icon_topic_unapproved', 'TOPIC_UNAPPROVED'), + 'LAST_POST_IMG' => $user->img('icon_topic_latest', 'VIEW_LATEST_POST'), - 'U_SEARCH_WORDS' => $u_search) - ); + 'U_SEARCH_WORDS' => $u_search, + )); if ($sql_where) { @@ -546,7 +547,7 @@ if ($keywords || $author || $author_id || $search_id || $submit) if ($config['load_anon_lastread'] || ($user->data['is_registered'] && !$config['load_db_lastread'])) { $tracking_topics = (isset($_COOKIE[$config['cookie_name'] . '_track'])) ? ((STRIP) ? stripslashes($_COOKIE[$config['cookie_name'] . '_track']) : $_COOKIE[$config['cookie_name'] . '_track']) : ''; - $tracking_topics = ($tracking_topics) ? unserialize($tracking_topics) : array(); + $tracking_topics = ($tracking_topics) ? tracking_unserialize($tracking_topics) : array(); } $sql = "SELECT $sql_select @@ -711,6 +712,7 @@ if ($keywords || $author || $author_id || $search_id || $submit) foreach ($hilit_array as $key => $value) { $hilit_array[$key] = str_replace('\*', '\w*?', preg_quote($value, '#')); + $hilit_array[$key] = preg_replace('#(^|\s)\\\\w\*\?(\s|$)#', '$1\w+?$2', $hilit_array[$key]); } $hilit = implode('|', $hilit_array); } @@ -779,7 +781,6 @@ if ($keywords || $author || $author_id || $search_id || $submit) 'PAGINATION' => topic_generate_pagination($replies, $view_topic_url), 'TOPIC_TYPE' => $topic_type, - 'LAST_POST_IMG' => $user->img('icon_topic_latest', 'VIEW_LATEST_POST'), 'TOPIC_FOLDER_IMG' => $user->img($folder_img, $folder_alt), 'TOPIC_FOLDER_IMG_SRC' => $user->img($folder_img, $folder_alt, false, '', 'src'), 'TOPIC_ICON_IMG' => (!empty($icons[$row['icon_id']])) ? $icons[$row['icon_id']]['img'] : '', @@ -812,7 +813,7 @@ if ($keywords || $author || $author_id || $search_id || $submit) $template->assign_block_vars('searchresults', array( 'S_IGNORE_POST' => true, - 'L_IGNORE_POST' => sprintf($user->lang['POST_BY_FOE'], $row['username'], "', '')) + 'L_IGNORE_POST' => sprintf($user->lang['POST_BY_FOE'], $row['username'], "', '')) ); continue; @@ -960,6 +961,8 @@ while ($row = $db->sql_fetchrow($result)) if ($row['left_id'] > $cat_right) { + // make sure we don't forget anything + $s_forums .= $holding; $holding = ''; } @@ -1008,8 +1011,9 @@ $template->assign_vars(array( 'S_FORUM_OPTIONS' => $s_forums, 'S_SELECT_SORT_DIR' => $s_sort_dir, 'S_SELECT_SORT_KEY' => $s_sort_key, - 'S_SELECT_SORT_DAYS' => $s_limit_days) -); + 'S_SELECT_SORT_DAYS' => $s_limit_days, + 'S_IN_SEARCH' => true, +)); // Handle large objects differently for Oracle and MSSQL switch ($db->sql_layer) @@ -1040,14 +1044,14 @@ $result = $db->sql_query_limit($sql, 5); while ($row = $db->sql_fetchrow($result)) { - $keywords = htmlspecialchars($row['search_keywords'], ENT_COMPAT, 'UTF-8'); + $keywords = $row['search_keywords']; $template->assign_block_vars('recentsearch', array( 'KEYWORDS' => $keywords, 'TIME' => $user->format_date($row['search_time']), - 'U_KEYWORDS' => append_sid("{$phpbb_root_path}search.$phpEx", 'keywords=' . urlencode($keywords))) - ); + 'U_KEYWORDS' => append_sid("{$phpbb_root_path}search.$phpEx", 'keywords=' . urlencode(htmlspecialchars_decode($keywords))) + )); } $db->sql_freeresult($result); diff --git a/phpBB/store/.htaccess b/phpBB/store/.htaccess index c39181686f..aa5afc1640 100644 --- a/phpBB/store/.htaccess +++ b/phpBB/store/.htaccess @@ -1,4 +1,4 @@ - -Order Allow,Deny -Deny from All - \ No newline at end of file + + Order Allow,Deny + Deny from All + \ No newline at end of file diff --git a/phpBB/style.php b/phpBB/style.php index a9803aa4e5..9be0d6a0dc 100644 --- a/phpBB/style.php +++ b/phpBB/style.php @@ -16,7 +16,10 @@ $phpbb_root_path = './'; $phpEx = substr(strrchr(__FILE__, '.'), 1); require($phpbb_root_path . 'config.' . $phpEx); -set_magic_quotes_runtime(0); +if (version_compare(PHP_VERSION, '6.0.0-dev', '<')) +{ + set_magic_quotes_runtime(0); +} // Load Extensions if (!empty($load_extensions)) @@ -33,7 +36,7 @@ if (!empty($load_extensions)) $sid = (isset($_GET['sid'])) ? htmlspecialchars($_GET['sid']) : ''; $id = (isset($_GET['id'])) ? intval($_GET['id']) : 0; -if (!ctype_alnum($sid)) +if (strspn($sid, 'abcdefABCDEF0123456789') !== strlen($sid)) { $sid = ''; } @@ -60,15 +63,16 @@ if ($id && $sid) $cache = new cache(); // Connect to DB - if (!@$db->sql_connect($dbhost, $dbuser, $dbpasswd, $dbname, $dbport, false)) + if (!@$db->sql_connect($dbhost, $dbuser, $dbpasswd, $dbname, $dbport, false, false)) { exit; } + unset($dbpasswd); $config = $cache->obtain_config(); - $sql = "SELECT s.session_id, u.user_lang - FROM {$table_prefix}sessions s, {$table_prefix}users u + $sql = 'SELECT u.user_id, u.user_lang + FROM ' . SESSIONS_TABLE . ' s, ' . USERS_TABLE . " u WHERE s.session_id = '" . $db->sql_escape($sid) . "' AND s.session_user_id = u.user_id"; $result = $db->sql_query($sql); @@ -77,43 +81,94 @@ if ($id && $sid) if ($user) { - $sql = "SELECT s.style_id, c.theme_data, c.theme_path, c.theme_name, c.theme_mtime, i.*, t.template_path - FROM {$table_prefix}styles s, {$table_prefix}styles_template t, {$table_prefix}styles_theme c, {$table_prefix}styles_imageset i - WHERE s.style_id = $id + $sql = 'SELECT s.style_id, c.theme_data, c.theme_path, c.theme_name, c.theme_mtime, i.*, t.template_path + FROM ' . STYLES_TABLE . ' s, ' . STYLES_TEMPLATE_TABLE . ' t, ' . STYLES_THEME_TABLE . ' c, ' . STYLES_IMAGESET_TABLE . ' i + WHERE s.style_id = ' . $id . ' AND t.template_id = s.template_id AND c.theme_id = s.theme_id - AND i.imageset_id = s.imageset_id"; + AND i.imageset_id = s.imageset_id'; $result = $db->sql_query($sql, 300); $theme = $db->sql_fetchrow($result); $db->sql_freeresult($result); + if ($user['user_id'] == ANONYMOUS) + { + $user['user_lang'] = $config['default_lang']; + } + + $user_image_lang = (file_exists($phpbb_root_path . 'styles/' . $theme['imageset_path'] . '/imageset/' . $user['user_lang'])) ? $user['user_lang'] : $config['default_lang']; + + $sql = 'SELECT * + FROM ' . STYLES_IMAGESET_DATA_TABLE . ' + WHERE imageset_id = ' . $theme['imageset_id'] . " + AND image_lang IN('" . $db->sql_escape($user_image_lang) . "', '')"; + $result = $db->sql_query($sql, 3600); + + $img_array = array(); + + while ($row = $db->sql_fetchrow($result)) + { + $img_array[$row['image_name']] = $row; + } + if (!$theme) { exit; } // Re-cache stylesheet data if necessary - if ($config['load_tplcompile'] && $theme['theme_mtime'] < @filemtime("{$phpbb_root_path}styles/" . $theme['theme_path'] . '/theme/stylesheet.css')) + if ($config['load_tplcompile'] || empty($theme['theme_data'])) { - include_once($phpbb_root_path . 'includes/acp/acp_styles.' . $phpEx); + $recache = (empty($theme['theme_data'])) ? true : false; + $update_time = time(); - $theme['theme_data'] = acp_styles::db_theme_data($theme); - $theme['theme_mtime'] = @filemtime("{$phpbb_root_path}styles/" . $theme['theme_path'] . '/theme/stylesheet.css'); + // We test for stylesheet.css because it is faster and most likely the only file changed on common themes + if (!$recache && $theme['theme_mtime'] < @filemtime("{$phpbb_root_path}styles/" . $theme['theme_path'] . '/theme/stylesheet.css')) + { + $recache = true; + $update_time = @filemtime("{$phpbb_root_path}styles/" . $theme['theme_path'] . '/theme/stylesheet.css'); + } + else if (!$recache) + { + $last_change = $theme['theme_mtime']; - // Save CSS contents - $sql_ary = array( - 'theme_mtime' => $theme['theme_mtime'], - 'theme_data' => $theme['theme_data'] - ); + foreach (glob("{$phpbb_root_path}styles/{$theme['theme_path']}/theme/*.css", GLOB_NOSORT) as $file) + { + if ($last_change < @filemtime($file)) + { + $recache = true; + break; + } + } + } - $sql = 'UPDATE ' . STYLES_THEME_TABLE . ' SET ' . $db->sql_build_array('UPDATE', $sql_ary) . " - WHERE theme_id = $id"; - $db->sql_query($sql); + if ($recache) + { + include_once($phpbb_root_path . 'includes/acp/acp_styles.' . $phpEx); - $cache->destroy('sql', STYLES_THEME_TABLE); + $theme['theme_data'] = acp_styles::db_theme_data($theme); + $theme['theme_mtime'] = $update_time; + + // Save CSS contents + $sql_ary = array( + 'theme_mtime' => $theme['theme_mtime'], + 'theme_data' => $theme['theme_data'] + ); + + $sql = 'UPDATE ' . STYLES_THEME_TABLE . ' SET ' . $db->sql_build_array('UPDATE', $sql_ary) . " + WHERE theme_id = $id"; + $db->sql_query($sql); + + $cache->destroy('sql', STYLES_THEME_TABLE); + + header('Expires: 0'); + } + } + else + { + header('Expires: ' . gmdate('D, d M Y H:i:s \G\M\T', time() + 3600)); } - header('Expires: ' . gmdate('D, d M Y H:i:s \G\M\T', time() + 3600)); header('Content-type: text/css'); // Parse Theme Data @@ -121,7 +176,7 @@ if ($id && $sid) '{T_THEME_PATH}' => "{$phpbb_root_path}styles/" . $theme['theme_path'] . '/theme', '{T_TEMPLATE_PATH}' => "{$phpbb_root_path}styles/" . $theme['template_path'] . '/template', '{T_IMAGESET_PATH}' => "{$phpbb_root_path}styles/" . $theme['imageset_path'] . '/imageset', - '{T_IMAGESET_LANG_PATH}' => "{$phpbb_root_path}styles/" . $theme['imageset_path'] . '/imageset/' . $user['user_lang'], + '{T_IMAGESET_LANG_PATH}' => "{$phpbb_root_path}styles/" . $theme['imageset_path'] . '/imageset/' . $user_image_lang, '{T_STYLESHEET_NAME}' => $theme['theme_name'], '{S_USER_LANG}' => $user['user_lang'] ); @@ -137,49 +192,42 @@ if ($id && $sid) foreach ($matches[1] as $i => $img) { $img = strtolower($img); - if (!isset($theme[$img])) + $find[] = $matches[0][$i]; + + if (!isset($img_array[$img])) { + $replace[] = ''; continue; } if (!isset($imgs[$img])) { - // Do not include dimensions? - if (strpos($theme[$img], '*') === false) - { - $imgsrc = trim($theme[$img]); - $width = $height = null; - } - else - { - list($imgsrc, $height, $width) = explode('*', $theme[$img]); - } - + $img_data = &$img_array[$img]; + $imgsrc = ($img_data['image_lang'] ? $img_data['image_lang'] . '/' : '') . $img_data['image_filename']; $imgs[$img] = array( - 'src' => $phpbb_root_path . 'styles/' . $theme['imageset_path'] . '/imageset/' . str_replace('{LANG}', $user['user_lang'], $imgsrc), - 'width' => $width, - 'height' => $height, + 'src' => $phpbb_root_path . 'styles/' . $theme['imageset_path'] . '/imageset/' . $imgsrc, + 'width' => $img_data['image_width'], + 'height' => $img_data['image_height'], ); } switch ($matches[2][$i]) { case 'SRC': - $replace = $imgs[$img]['src']; + $replace[] = $imgs[$img]['src']; break; case 'WIDTH': - $replace = $imgs[$img]['width']; + $replace[] = $imgs[$img]['width']; break; case 'HEIGHT': - $replace = $imgs[$img]['height']; + $replace[] = $imgs[$img]['height']; break; default: continue; } - $find = $matches[0][$i]; } if (sizeof($find)) diff --git a/phpBB/styles/prosilver/imageset/announce_read.gif b/phpBB/styles/prosilver/imageset/announce_read.gif new file mode 100644 index 0000000000..33e4a5e852 Binary files /dev/null and b/phpBB/styles/prosilver/imageset/announce_read.gif differ diff --git a/phpBB/styles/prosilver/imageset/announce_read_locked.gif b/phpBB/styles/prosilver/imageset/announce_read_locked.gif new file mode 100644 index 0000000000..76ead8a02c Binary files /dev/null and b/phpBB/styles/prosilver/imageset/announce_read_locked.gif differ diff --git a/phpBB/styles/prosilver/imageset/announce_read_locked_mine.gif b/phpBB/styles/prosilver/imageset/announce_read_locked_mine.gif new file mode 100644 index 0000000000..2105d21f10 Binary files /dev/null and b/phpBB/styles/prosilver/imageset/announce_read_locked_mine.gif differ diff --git a/phpBB/styles/prosilver/imageset/announce_read_mine.gif b/phpBB/styles/prosilver/imageset/announce_read_mine.gif new file mode 100644 index 0000000000..ad928330e6 Binary files /dev/null and b/phpBB/styles/prosilver/imageset/announce_read_mine.gif differ diff --git a/phpBB/styles/prosilver/imageset/announce_unread.gif b/phpBB/styles/prosilver/imageset/announce_unread.gif new file mode 100644 index 0000000000..4a789f70f0 Binary files /dev/null and b/phpBB/styles/prosilver/imageset/announce_unread.gif differ diff --git a/phpBB/styles/prosilver/imageset/announce_unread_locked.gif b/phpBB/styles/prosilver/imageset/announce_unread_locked.gif new file mode 100644 index 0000000000..76dcc6ca71 Binary files /dev/null and b/phpBB/styles/prosilver/imageset/announce_unread_locked.gif differ diff --git a/phpBB/styles/prosilver/imageset/announce_unread_locked_mine.gif b/phpBB/styles/prosilver/imageset/announce_unread_locked_mine.gif new file mode 100644 index 0000000000..53782fc3dc Binary files /dev/null and b/phpBB/styles/prosilver/imageset/announce_unread_locked_mine.gif differ diff --git a/phpBB/styles/prosilver/imageset/announce_unread_mine.gif b/phpBB/styles/prosilver/imageset/announce_unread_mine.gif new file mode 100644 index 0000000000..e01e920b59 Binary files /dev/null and b/phpBB/styles/prosilver/imageset/announce_unread_mine.gif differ diff --git a/phpBB/styles/prosilver/imageset/en/button_pm_forward.gif b/phpBB/styles/prosilver/imageset/en/button_pm_forward.gif new file mode 100644 index 0000000000..3384df34be Binary files /dev/null and b/phpBB/styles/prosilver/imageset/en/button_pm_forward.gif differ diff --git a/phpBB/styles/prosilver/imageset/en/button_pm_new.gif b/phpBB/styles/prosilver/imageset/en/button_pm_new.gif new file mode 100644 index 0000000000..cc0381c6b2 Binary files /dev/null and b/phpBB/styles/prosilver/imageset/en/button_pm_new.gif differ diff --git a/phpBB/styles/prosilver/imageset/en/button_pm_reply.gif b/phpBB/styles/prosilver/imageset/en/button_pm_reply.gif new file mode 100644 index 0000000000..3275b06d52 Binary files /dev/null and b/phpBB/styles/prosilver/imageset/en/button_pm_reply.gif differ diff --git a/phpBB/styles/prosilver/imageset/en/button_topic_locked.gif b/phpBB/styles/prosilver/imageset/en/button_topic_locked.gif new file mode 100644 index 0000000000..b08918a24f Binary files /dev/null and b/phpBB/styles/prosilver/imageset/en/button_topic_locked.gif differ diff --git a/phpBB/styles/prosilver/imageset/en/button_topic_new.gif b/phpBB/styles/prosilver/imageset/en/button_topic_new.gif new file mode 100644 index 0000000000..5b7b1e0e60 Binary files /dev/null and b/phpBB/styles/prosilver/imageset/en/button_topic_new.gif differ diff --git a/phpBB/styles/prosilver/imageset/en/button_topic_reply.gif b/phpBB/styles/prosilver/imageset/en/button_topic_reply.gif new file mode 100644 index 0000000000..e900c80c70 Binary files /dev/null and b/phpBB/styles/prosilver/imageset/en/button_topic_reply.gif differ diff --git a/phpBB/styles/prosilver/imageset/en/icon_contact_pm.gif b/phpBB/styles/prosilver/imageset/en/icon_contact_pm.gif new file mode 100644 index 0000000000..ec190118fe Binary files /dev/null and b/phpBB/styles/prosilver/imageset/en/icon_contact_pm.gif differ diff --git a/phpBB/styles/prosilver/imageset/en/icon_post_edit.gif b/phpBB/styles/prosilver/imageset/en/icon_post_edit.gif new file mode 100644 index 0000000000..19006f95a7 Binary files /dev/null and b/phpBB/styles/prosilver/imageset/en/icon_post_edit.gif differ diff --git a/phpBB/styles/prosilver/imageset/en/icon_post_quote.gif b/phpBB/styles/prosilver/imageset/en/icon_post_quote.gif new file mode 100644 index 0000000000..c3708a1477 Binary files /dev/null and b/phpBB/styles/prosilver/imageset/en/icon_post_quote.gif differ diff --git a/phpBB/styles/prosilver/imageset/en/icon_user_online.gif b/phpBB/styles/prosilver/imageset/en/icon_user_online.gif new file mode 100644 index 0000000000..6b571ffce0 Binary files /dev/null and b/phpBB/styles/prosilver/imageset/en/icon_user_online.gif differ diff --git a/phpBB/styles/prosilver/imageset/en/imageset.cfg b/phpBB/styles/prosilver/imageset/en/imageset.cfg new file mode 100644 index 0000000000..de0200c9de --- /dev/null +++ b/phpBB/styles/prosilver/imageset/en/imageset.cfg @@ -0,0 +1,35 @@ +# +# phpBB Imageset Configuration File +# +# @package phpBB3 +# @copyright (c) 2006 phpBB Group +# @license http://opensource.org/licenses/gpl-license.php GNU Public License +# +# +# At the left is the name, please do not change this +# At the right the value is entered +# For on/off options the valid values are on, off, 1, 0, true and false +# +# Values get trimmed, if you want to add a space in front or at the end of +# the value, then enclose the value with single or double quotes. +# Single and double quotes do not need to be escaped. +# +# + +# Images +img_icon_contact_pm = icon_contact_pm.gif*20*28 + +img_icon_post_edit = icon_post_edit.gif*20*42 +img_icon_post_quote = icon_post_quote.gif*20*54 + +img_icon_user_online = icon_user_online.gif*58*58 +img_icon_user_offline = icon_user_offline.gif +img_icon_user_search = icon_user_search.gif + +img_button_pm_forward = button_pm_forward.gif*25*96 +img_button_pm_new = button_pm_new.gif*25*84 +img_button_pm_reply = button_pm_reply.gif*25*96 + +img_button_topic_locked = button_topic_locked.gif*25*88 +img_button_topic_new = button_topic_new.gif*25*96 +img_button_topic_reply = button_topic_reply.gif*25*96 diff --git a/phpBB/styles/prosilver/imageset/en/index.htm b/phpBB/styles/prosilver/imageset/en/index.htm new file mode 100644 index 0000000000..e69de29bb2 diff --git a/phpBB/styles/prosilver/imageset/forum_link.gif b/phpBB/styles/prosilver/imageset/forum_link.gif new file mode 100644 index 0000000000..01fb1c4e1e Binary files /dev/null and b/phpBB/styles/prosilver/imageset/forum_link.gif differ diff --git a/phpBB/styles/prosilver/imageset/forum_read.gif b/phpBB/styles/prosilver/imageset/forum_read.gif new file mode 100644 index 0000000000..82ceee0784 Binary files /dev/null and b/phpBB/styles/prosilver/imageset/forum_read.gif differ diff --git a/phpBB/styles/prosilver/imageset/forum_read_locked.gif b/phpBB/styles/prosilver/imageset/forum_read_locked.gif new file mode 100644 index 0000000000..450bf28c3c Binary files /dev/null and b/phpBB/styles/prosilver/imageset/forum_read_locked.gif differ diff --git a/phpBB/styles/prosilver/imageset/forum_read_subforum.gif b/phpBB/styles/prosilver/imageset/forum_read_subforum.gif new file mode 100644 index 0000000000..5e97bc94ce Binary files /dev/null and b/phpBB/styles/prosilver/imageset/forum_read_subforum.gif differ diff --git a/phpBB/styles/prosilver/imageset/forum_unread.gif b/phpBB/styles/prosilver/imageset/forum_unread.gif new file mode 100644 index 0000000000..5a305d2470 Binary files /dev/null and b/phpBB/styles/prosilver/imageset/forum_unread.gif differ diff --git a/phpBB/styles/prosilver/imageset/forum_unread_locked.gif b/phpBB/styles/prosilver/imageset/forum_unread_locked.gif new file mode 100644 index 0000000000..34f1d46ad7 Binary files /dev/null and b/phpBB/styles/prosilver/imageset/forum_unread_locked.gif differ diff --git a/phpBB/styles/prosilver/imageset/forum_unread_subforum.gif b/phpBB/styles/prosilver/imageset/forum_unread_subforum.gif new file mode 100644 index 0000000000..5ddd1b2cba Binary files /dev/null and b/phpBB/styles/prosilver/imageset/forum_unread_subforum.gif differ diff --git a/phpBB/styles/prosilver/imageset/icon_back_top.gif b/phpBB/styles/prosilver/imageset/icon_back_top.gif new file mode 100644 index 0000000000..4d2b8f3822 Binary files /dev/null and b/phpBB/styles/prosilver/imageset/icon_back_top.gif differ diff --git a/phpBB/styles/prosilver/imageset/icon_contact_aim.gif b/phpBB/styles/prosilver/imageset/icon_contact_aim.gif new file mode 100644 index 0000000000..be039fcde2 Binary files /dev/null and b/phpBB/styles/prosilver/imageset/icon_contact_aim.gif differ diff --git a/phpBB/styles/prosilver/imageset/icon_contact_email.gif b/phpBB/styles/prosilver/imageset/icon_contact_email.gif new file mode 100644 index 0000000000..caa3683005 Binary files /dev/null and b/phpBB/styles/prosilver/imageset/icon_contact_email.gif differ diff --git a/phpBB/styles/prosilver/imageset/icon_contact_icq.gif b/phpBB/styles/prosilver/imageset/icon_contact_icq.gif new file mode 100644 index 0000000000..48a09373eb Binary files /dev/null and b/phpBB/styles/prosilver/imageset/icon_contact_icq.gif differ diff --git a/phpBB/styles/prosilver/imageset/icon_contact_jabber.gif b/phpBB/styles/prosilver/imageset/icon_contact_jabber.gif new file mode 100644 index 0000000000..e335433e97 Binary files /dev/null and b/phpBB/styles/prosilver/imageset/icon_contact_jabber.gif differ diff --git a/phpBB/styles/prosilver/imageset/icon_contact_msnm.gif b/phpBB/styles/prosilver/imageset/icon_contact_msnm.gif new file mode 100644 index 0000000000..b82253599b Binary files /dev/null and b/phpBB/styles/prosilver/imageset/icon_contact_msnm.gif differ diff --git a/phpBB/styles/prosilver/imageset/icon_contact_www.gif b/phpBB/styles/prosilver/imageset/icon_contact_www.gif new file mode 100644 index 0000000000..83cee9728d Binary files /dev/null and b/phpBB/styles/prosilver/imageset/icon_contact_www.gif differ diff --git a/phpBB/styles/prosilver/imageset/icon_contact_yahoo.gif b/phpBB/styles/prosilver/imageset/icon_contact_yahoo.gif new file mode 100644 index 0000000000..305f297fdb Binary files /dev/null and b/phpBB/styles/prosilver/imageset/icon_contact_yahoo.gif differ diff --git a/phpBB/styles/prosilver/imageset/icon_offline.gif b/phpBB/styles/prosilver/imageset/icon_offline.gif new file mode 100644 index 0000000000..c5e41a41db Binary files /dev/null and b/phpBB/styles/prosilver/imageset/icon_offline.gif differ diff --git a/phpBB/styles/prosilver/imageset/icon_online.gif b/phpBB/styles/prosilver/imageset/icon_online.gif new file mode 100644 index 0000000000..18e43cd0c6 Binary files /dev/null and b/phpBB/styles/prosilver/imageset/icon_online.gif differ diff --git a/phpBB/styles/prosilver/imageset/icon_post_delete.gif b/phpBB/styles/prosilver/imageset/icon_post_delete.gif new file mode 100644 index 0000000000..f51ffc24a6 Binary files /dev/null and b/phpBB/styles/prosilver/imageset/icon_post_delete.gif differ diff --git a/phpBB/styles/prosilver/imageset/icon_post_info.gif b/phpBB/styles/prosilver/imageset/icon_post_info.gif new file mode 100644 index 0000000000..af089d8656 Binary files /dev/null and b/phpBB/styles/prosilver/imageset/icon_post_info.gif differ diff --git a/phpBB/styles/prosilver/imageset/icon_post_report.gif b/phpBB/styles/prosilver/imageset/icon_post_report.gif new file mode 100644 index 0000000000..72c6ae89d0 Binary files /dev/null and b/phpBB/styles/prosilver/imageset/icon_post_report.gif differ diff --git a/phpBB/styles/prosilver/imageset/icon_post_target.gif b/phpBB/styles/prosilver/imageset/icon_post_target.gif new file mode 100644 index 0000000000..a29dbffa35 Binary files /dev/null and b/phpBB/styles/prosilver/imageset/icon_post_target.gif differ diff --git a/phpBB/styles/prosilver/imageset/icon_post_target_unread.gif b/phpBB/styles/prosilver/imageset/icon_post_target_unread.gif new file mode 100644 index 0000000000..e97eeb2b2e Binary files /dev/null and b/phpBB/styles/prosilver/imageset/icon_post_target_unread.gif differ diff --git a/phpBB/styles/prosilver/imageset/icon_rate_bad.gif b/phpBB/styles/prosilver/imageset/icon_rate_bad.gif new file mode 100644 index 0000000000..7901889408 Binary files /dev/null and b/phpBB/styles/prosilver/imageset/icon_rate_bad.gif differ diff --git a/phpBB/styles/prosilver/imageset/icon_rate_good.gif b/phpBB/styles/prosilver/imageset/icon_rate_good.gif new file mode 100644 index 0000000000..6d23034d71 Binary files /dev/null and b/phpBB/styles/prosilver/imageset/icon_rate_good.gif differ diff --git a/phpBB/styles/prosilver/imageset/icon_topic_attach.gif b/phpBB/styles/prosilver/imageset/icon_topic_attach.gif new file mode 100644 index 0000000000..9a70638650 Binary files /dev/null and b/phpBB/styles/prosilver/imageset/icon_topic_attach.gif differ diff --git a/phpBB/styles/prosilver/imageset/icon_topic_latest.gif b/phpBB/styles/prosilver/imageset/icon_topic_latest.gif new file mode 100644 index 0000000000..d79d31ac43 Binary files /dev/null and b/phpBB/styles/prosilver/imageset/icon_topic_latest.gif differ diff --git a/phpBB/styles/prosilver/imageset/icon_topic_newest.gif b/phpBB/styles/prosilver/imageset/icon_topic_newest.gif new file mode 100644 index 0000000000..0aa19884b5 Binary files /dev/null and b/phpBB/styles/prosilver/imageset/icon_topic_newest.gif differ diff --git a/phpBB/styles/prosilver/imageset/icon_topic_reported.gif b/phpBB/styles/prosilver/imageset/icon_topic_reported.gif new file mode 100644 index 0000000000..006b1e2291 Binary files /dev/null and b/phpBB/styles/prosilver/imageset/icon_topic_reported.gif differ diff --git a/phpBB/styles/prosilver/imageset/icon_topic_unapproved.gif b/phpBB/styles/prosilver/imageset/icon_topic_unapproved.gif new file mode 100644 index 0000000000..09d8f387a7 Binary files /dev/null and b/phpBB/styles/prosilver/imageset/icon_topic_unapproved.gif differ diff --git a/phpBB/styles/prosilver/imageset/icon_user_warn.gif b/phpBB/styles/prosilver/imageset/icon_user_warn.gif new file mode 100755 index 0000000000..9c4ad98e5c Binary files /dev/null and b/phpBB/styles/prosilver/imageset/icon_user_warn.gif differ diff --git a/phpBB/styles/prosilver/imageset/imageset.cfg b/phpBB/styles/prosilver/imageset/imageset.cfg new file mode 100644 index 0000000000..87c6fc3c93 --- /dev/null +++ b/phpBB/styles/prosilver/imageset/imageset.cfg @@ -0,0 +1,116 @@ +# +# phpBB Imageset Configuration File +# +# @package phpBB3 +# @copyright (c) 2006 phpBB Group +# @license http://opensource.org/licenses/gpl-license.php GNU Public License +# +# +# At the left is the name, please do not change this +# At the right the value is entered +# For on/off options the valid values are on, off, 1, 0, true and false +# +# Values get trimmed, if you want to add a space in front or at the end of +# the value, then enclose the value with single or double quotes. +# Single and double quotes do not need to be escaped. +# +# + +# General Information about this style +name = prosilver +copyright = © phpBB Group, 2007 +version = 3.0.0 + +# Images +img_site_logo = site_logo.gif*52*139 +img_poll_left = +img_poll_center = +img_poll_right = +img_icon_friend = +img_icon_foe = + +img_forum_link = forum_link.gif*27*27 +img_forum_read = forum_read.gif*27*27 +img_forum_read_locked = forum_read_locked.gif*27*27 +img_forum_read_subforum = forum_read_subforum.gif*27*27 +img_forum_unread = forum_unread.gif*27*27 +img_forum_unread_locked = forum_unread_locked.gif*27*27 +img_forum_unread_subforum = forum_unread_subforum.gif*27*27 + +img_topic_moved = topic_moved.gif*27*27 + +img_topic_read = topic_read.gif*27*27 +img_topic_read_mine = topic_read_mine.gif*27*27 +img_topic_read_hot = topic_read_hot.gif*27*27 +img_topic_read_hot_mine = topic_read_hot_mine.gif*27*27 +img_topic_read_locked = topic_read_locked.gif*27*27 +img_topic_read_locked_mine = topic_read_locked_mine.gif*27*27 + +img_topic_unread = topic_unread.gif*27*27 +img_topic_unread_mine = topic_unread_mine.gif*27*27 +img_topic_unread_hot = topic_unread_hot.gif*27*27 +img_topic_unread_hot_mine = topic_unread_hot_mine.gif*27*27 +img_topic_unread_locked = topic_unread_locked.gif*27*27 +img_topic_unread_locked_mine = topic_unread_locked_mine.gif*27*27 + +img_sticky_read = sticky_read.gif*27*27 +img_sticky_read_mine = sticky_read_mine.gif*27*27 +img_sticky_read_locked = sticky_read_locked.gif*27*27 +img_sticky_read_locked_mine = sticky_read_locked_mine.gif*27*27 +img_sticky_unread = sticky_unread.gif*27*27 +img_sticky_unread_mine = sticky_unread_mine.gif*27*27 +img_sticky_unread_locked = sticky_unread_locked.gif*27*27 +img_sticky_unread_locked_mine = sticky_unread_locked_mine.gif*27*27 + +img_announce_read = announce_read.gif*27*27 +img_announce_read_mine = announce_read_mine.gif*27*27 +img_announce_read_locked = announce_read_locked.gif*27*27 +img_announce_read_locked_mine = announce_read_locked_mine.gif*27*27 +img_announce_unread = announce_unread.gif*27*27 +img_announce_unread_mine = announce_unread_mine.gif*27*27 +img_announce_unread_locked = announce_unread_locked.gif*27*27 +img_announce_unread_locked_mine = announce_unread_locked_mine.gif*27*27 + +img_global_read = announce_read.gif*27*27 +img_global_read_mine = announce_read_mine.gif*27*27 +img_global_read_locked = announce_read_locked.gif*27*27 +img_global_read_locked_mine = announce_read_locked_mine.gif*27*27 +img_global_unread = announce_unread.gif*27*27 +img_global_unread_mine = announce_unread_mine.gif*27*27 +img_global_unread_locked = announce_unread_locked.gif*27*27 +img_global_unread_locked_mine = announce_unread_locked_mine.gif*27*27 + +img_subforum_read = subforum_read.gif*9*11 +img_subforum_unread = subforum_unread.gif*9*11 + +img_pm_read = topic_read.gif*27*27 +img_pm_unread = topic_unread.gif*27*27 + +img_icon_back_top = icon_back_top.gif*11*11 + +img_icon_contact_aim = icon_contact_aim.gif*20*20 +img_icon_contact_email = icon_contact_email.gif*20*20 +img_icon_contact_icq = icon_contact_icq.gif*20*20 +img_icon_contact_jabber = icon_contact_jabber.gif*20*20 +img_icon_contact_msnm = icon_contact_msnm.gif*20*20 + +img_icon_contact_www = icon_contact_www.gif*20*20 +img_icon_contact_yahoo = icon_contact_yahoo.gif*20*20 + +img_icon_post_delete = icon_post_delete.gif*20*20 + +img_icon_post_info = icon_post_info.gif*20*20 + +img_icon_post_report = icon_post_report.gif*20*20 +img_icon_post_target = icon_post_target.gif*9*11 +img_icon_post_target_unread = icon_post_target_unread.gif*9*11 + +img_icon_topic_attach = icon_topic_attach.gif*10*7 +img_icon_topic_latest = icon_topic_latest.gif*9*11 +img_icon_topic_newest = icon_topic_newest.gif*9*11 +img_icon_topic_reported = icon_topic_reported.gif*14*16 +img_icon_topic_unapproved = icon_topic_unapproved.gif*14*16 + +img_icon_user_profile = icon_user_profile.gif*11*11 + +img_icon_user_warn = icon_user_warn.gif*20*20 diff --git a/phpBB/styles/prosilver/imageset/index.htm b/phpBB/styles/prosilver/imageset/index.htm new file mode 100644 index 0000000000..e69de29bb2 diff --git a/phpBB/styles/prosilver/imageset/site_logo.gif b/phpBB/styles/prosilver/imageset/site_logo.gif new file mode 100644 index 0000000000..909114c377 Binary files /dev/null and b/phpBB/styles/prosilver/imageset/site_logo.gif differ diff --git a/phpBB/styles/prosilver/imageset/sticky_read.gif b/phpBB/styles/prosilver/imageset/sticky_read.gif new file mode 100644 index 0000000000..59e42833db Binary files /dev/null and b/phpBB/styles/prosilver/imageset/sticky_read.gif differ diff --git a/phpBB/styles/prosilver/imageset/sticky_read_locked.gif b/phpBB/styles/prosilver/imageset/sticky_read_locked.gif new file mode 100644 index 0000000000..79f581be79 Binary files /dev/null and b/phpBB/styles/prosilver/imageset/sticky_read_locked.gif differ diff --git a/phpBB/styles/prosilver/imageset/sticky_read_locked_mine.gif b/phpBB/styles/prosilver/imageset/sticky_read_locked_mine.gif new file mode 100644 index 0000000000..ad056086e5 Binary files /dev/null and b/phpBB/styles/prosilver/imageset/sticky_read_locked_mine.gif differ diff --git a/phpBB/styles/prosilver/imageset/sticky_read_mine.gif b/phpBB/styles/prosilver/imageset/sticky_read_mine.gif new file mode 100644 index 0000000000..49e8b3f01c Binary files /dev/null and b/phpBB/styles/prosilver/imageset/sticky_read_mine.gif differ diff --git a/phpBB/styles/prosilver/imageset/sticky_unread.gif b/phpBB/styles/prosilver/imageset/sticky_unread.gif new file mode 100644 index 0000000000..ae6d5954b1 Binary files /dev/null and b/phpBB/styles/prosilver/imageset/sticky_unread.gif differ diff --git a/phpBB/styles/prosilver/imageset/sticky_unread_locked.gif b/phpBB/styles/prosilver/imageset/sticky_unread_locked.gif new file mode 100644 index 0000000000..5792b8649a Binary files /dev/null and b/phpBB/styles/prosilver/imageset/sticky_unread_locked.gif differ diff --git a/phpBB/styles/prosilver/imageset/sticky_unread_locked_mine.gif b/phpBB/styles/prosilver/imageset/sticky_unread_locked_mine.gif new file mode 100644 index 0000000000..93495770c8 Binary files /dev/null and b/phpBB/styles/prosilver/imageset/sticky_unread_locked_mine.gif differ diff --git a/phpBB/styles/prosilver/imageset/sticky_unread_mine.gif b/phpBB/styles/prosilver/imageset/sticky_unread_mine.gif new file mode 100644 index 0000000000..2580ca0518 Binary files /dev/null and b/phpBB/styles/prosilver/imageset/sticky_unread_mine.gif differ diff --git a/phpBB/styles/prosilver/imageset/subforum_read.gif b/phpBB/styles/prosilver/imageset/subforum_read.gif new file mode 100644 index 0000000000..595595c296 Binary files /dev/null and b/phpBB/styles/prosilver/imageset/subforum_read.gif differ diff --git a/phpBB/styles/prosilver/imageset/subforum_unread.gif b/phpBB/styles/prosilver/imageset/subforum_unread.gif new file mode 100644 index 0000000000..b2b661dc78 Binary files /dev/null and b/phpBB/styles/prosilver/imageset/subforum_unread.gif differ diff --git a/phpBB/styles/prosilver/imageset/topic_moved.gif b/phpBB/styles/prosilver/imageset/topic_moved.gif new file mode 100644 index 0000000000..3275cd6ef9 Binary files /dev/null and b/phpBB/styles/prosilver/imageset/topic_moved.gif differ diff --git a/phpBB/styles/prosilver/imageset/topic_read.gif b/phpBB/styles/prosilver/imageset/topic_read.gif new file mode 100644 index 0000000000..0347ffc1e9 Binary files /dev/null and b/phpBB/styles/prosilver/imageset/topic_read.gif differ diff --git a/phpBB/styles/prosilver/imageset/topic_read_hot.gif b/phpBB/styles/prosilver/imageset/topic_read_hot.gif new file mode 100644 index 0000000000..dcb6f3bd60 Binary files /dev/null and b/phpBB/styles/prosilver/imageset/topic_read_hot.gif differ diff --git a/phpBB/styles/prosilver/imageset/topic_read_hot_mine.gif b/phpBB/styles/prosilver/imageset/topic_read_hot_mine.gif new file mode 100644 index 0000000000..1e5498a9be Binary files /dev/null and b/phpBB/styles/prosilver/imageset/topic_read_hot_mine.gif differ diff --git a/phpBB/styles/prosilver/imageset/topic_read_locked.gif b/phpBB/styles/prosilver/imageset/topic_read_locked.gif new file mode 100644 index 0000000000..83bc8bd02f Binary files /dev/null and b/phpBB/styles/prosilver/imageset/topic_read_locked.gif differ diff --git a/phpBB/styles/prosilver/imageset/topic_read_locked_mine.gif b/phpBB/styles/prosilver/imageset/topic_read_locked_mine.gif new file mode 100644 index 0000000000..360f9d989a Binary files /dev/null and b/phpBB/styles/prosilver/imageset/topic_read_locked_mine.gif differ diff --git a/phpBB/styles/prosilver/imageset/topic_read_mine.gif b/phpBB/styles/prosilver/imageset/topic_read_mine.gif new file mode 100644 index 0000000000..4972a4e0a5 Binary files /dev/null and b/phpBB/styles/prosilver/imageset/topic_read_mine.gif differ diff --git a/phpBB/styles/prosilver/imageset/topic_unread.gif b/phpBB/styles/prosilver/imageset/topic_unread.gif new file mode 100644 index 0000000000..542a998258 Binary files /dev/null and b/phpBB/styles/prosilver/imageset/topic_unread.gif differ diff --git a/phpBB/styles/prosilver/imageset/topic_unread_hot.gif b/phpBB/styles/prosilver/imageset/topic_unread_hot.gif new file mode 100644 index 0000000000..e712f6e827 Binary files /dev/null and b/phpBB/styles/prosilver/imageset/topic_unread_hot.gif differ diff --git a/phpBB/styles/prosilver/imageset/topic_unread_hot_mine.gif b/phpBB/styles/prosilver/imageset/topic_unread_hot_mine.gif new file mode 100644 index 0000000000..fa8b167c64 Binary files /dev/null and b/phpBB/styles/prosilver/imageset/topic_unread_hot_mine.gif differ diff --git a/phpBB/styles/prosilver/imageset/topic_unread_locked.gif b/phpBB/styles/prosilver/imageset/topic_unread_locked.gif new file mode 100644 index 0000000000..4fb8fa9517 Binary files /dev/null and b/phpBB/styles/prosilver/imageset/topic_unread_locked.gif differ diff --git a/phpBB/styles/prosilver/imageset/topic_unread_locked_mine.gif b/phpBB/styles/prosilver/imageset/topic_unread_locked_mine.gif new file mode 100644 index 0000000000..4ee6cfe423 Binary files /dev/null and b/phpBB/styles/prosilver/imageset/topic_unread_locked_mine.gif differ diff --git a/phpBB/styles/prosilver/imageset/topic_unread_mine.gif b/phpBB/styles/prosilver/imageset/topic_unread_mine.gif new file mode 100644 index 0000000000..e73da38df7 Binary files /dev/null and b/phpBB/styles/prosilver/imageset/topic_unread_mine.gif differ diff --git a/phpBB/styles/prosilver/style.cfg b/phpBB/styles/prosilver/style.cfg new file mode 100644 index 0000000000..f1ea67f7ce --- /dev/null +++ b/phpBB/styles/prosilver/style.cfg @@ -0,0 +1,22 @@ +# +# phpBB Style Configuration File +# +# @package phpBB3 +# @copyright (c) 2005 phpBB Group +# @license http://opensource.org/licenses/gpl-license.php GNU Public License +# +# +# At the left is the name, please do not change this +# At the right the value is entered +# For on/off options the valid values are on, off, 1, 0, true and false +# +# Values get trimmed, if you want to add a space in front or at the end of +# the value, then enclose the value with single or double quotes. +# Single and double quotes do not need to be escaped. +# +# + +# General Information about this style +name = prosilver +copyright = © phpBB Group, 2007 +version = 3.0.0 \ No newline at end of file diff --git a/phpBB/styles/prosilver/template/attachment.html b/phpBB/styles/prosilver/template/attachment.html new file mode 100644 index 0000000000..9e68274f0b --- /dev/null +++ b/phpBB/styles/prosilver/template/attachment.html @@ -0,0 +1,121 @@ + + + +

    [{_file.DENIED_MESSAGE}]

    + + + +
    +
    {_file.DOWNLOAD_NAME}
    +
    {_file.COMMENT}
    +
    + + + + +
    +
    {_file.DOWNLOAD_NAME}
    +
    {_file.COMMENT}
    +
    {_file.DOWNLOAD_NAME} ({_file.FILESIZE} {_file.SIZE_LANG}) {_file.L_DOWNLOAD_COUNT}
    +
    + + + +
    +
    {_file.UPLOAD_ICON} {_file.DOWNLOAD_NAME}
    +
    {_file.COMMENT}
    +
    ({_file.FILESIZE} {_file.SIZE_LANG}) {_file.L_DOWNLOAD_COUNT}
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + + + + + + + + + +

    + [ {L_PLAY_QUICKTIME_FILE} ] + {_file.DOWNLOAD_NAME} [ {_file.FILESIZE} {_file.SIZE_LANG} | {_file.L_DOWNLOAD_COUNT} ]

    + + + + diff --git a/phpBB/styles/prosilver/template/bbcode.html b/phpBB/styles/prosilver/template/bbcode.html new file mode 100644 index 0000000000..30d68af614 --- /dev/null +++ b/phpBB/styles/prosilver/template/bbcode.html @@ -0,0 +1,40 @@ +
      +
        +
      + +
        +
      + +
    • +
    • + +
      {USERNAME} {L_WROTE}: +
      +
      + +
      {L_CODE}: {L_SELECT_ALL_CODE}
      +
      + +
      +
      + + + + + + + + + + +{TEXT} + +{TEXT} + +{L_IMAGE} + +{DESCRIPTION} + +{DESCRIPTION} + + \ No newline at end of file diff --git a/phpBB/styles/prosilver/template/confirm_body.html b/phpBB/styles/prosilver/template/confirm_body.html new file mode 100644 index 0000000000..5b783915a4 --- /dev/null +++ b/phpBB/styles/prosilver/template/confirm_body.html @@ -0,0 +1,20 @@ + + + +
      +
      + +

      {MESSAGE_TITLE}

      +

      {MESSAGE_TEXT}

      + +
      + {S_HIDDEN_FIELDS} +   + +
      + +
      +
      + + + diff --git a/phpBB/styles/prosilver/template/custom_profile_fields.html b/phpBB/styles/prosilver/template/custom_profile_fields.html new file mode 100644 index 0000000000..81f6daabb4 --- /dev/null +++ b/phpBB/styles/prosilver/template/custom_profile_fields.html @@ -0,0 +1,31 @@ + + + + + + + + + + + + + + + + + checked="checked" /> + + + + + + + + + + + + diff --git a/phpBB/styles/prosilver/template/drafts.html b/phpBB/styles/prosilver/template/drafts.html new file mode 100644 index 0000000000..2b48785e32 --- /dev/null +++ b/phpBB/styles/prosilver/template/drafts.html @@ -0,0 +1,44 @@ + + + +
      +
      + +

      {L_LOAD_DRAFT}

      +

      {L_LOAD_DRAFT_EXPLAIN}

      + +
      +
      + +
      +
      + +
        +
      • +
        +
        {L_LOAD_DRAFT}
        +
        {L_SAVE_DATE}
        +
        +
      • +
      + + +
      +
      + diff --git a/phpBB/styles/prosilver/template/editor.js b/phpBB/styles/prosilver/template/editor.js new file mode 100644 index 0000000000..38dd77bdbe --- /dev/null +++ b/phpBB/styles/prosilver/template/editor.js @@ -0,0 +1,397 @@ +/** +* bbCode control by subBlue design [ www.subBlue.com ] +* Includes unixsafe colour palette selector by SHS` +*/ + +// Startup variables +var imageTag = false; +var theSelection = false; + +// Check for Browser & Platform for PC & IE specific bits +// More details from: http://www.mozilla.org/docs/web-developer/sniffer/browser_type.html +var clientPC = navigator.userAgent.toLowerCase(); // Get client info +var clientVer = parseInt(navigator.appVersion); // Get browser version + +var is_ie = ((clientPC.indexOf('msie') != -1) && (clientPC.indexOf('opera') == -1)); +var is_win = ((clientPC.indexOf('win') != -1) || (clientPC.indexOf('16bit') != -1)); + +var baseHeight; +onload_functions.push('initInsertions()'); + +/** +* Shows the help messages in the helpline window +*/ +function helpline(help) +{ + document.forms[form_name].helpbox.value = help_line[help]; +} + +/** +* Fix a bug involving the TextRange object. From +* http://www.frostjedi.com/terra/scripts/demo/caretBug.html +*/ +function initInsertions() +{ + var doc; + + if( document.forms[form_name]) + { + doc = document; + } + else + { + doc = opener.document; + } + + var textarea = doc.forms[form_name].elements[text_name]; + if (is_ie && typeof(baseHeight) != 'number') + { + textarea.focus(); + baseHeight = doc.selection.createRange().duplicate().boundingHeight; + document.body.focus(); + } +} + +/** +* bbstyle +*/ +function bbstyle(bbnumber) +{ + if (bbnumber != -1) + { + bbfontstyle(bbtags[bbnumber], bbtags[bbnumber+1]); + } + else + { + insert_text('[*]'); + document.forms[form_name].elements[text_name].focus(); + } +} + +/** +* Apply bbcodes +*/ +function bbfontstyle(bbopen, bbclose) +{ + theSelection = false; + + var textarea = document.forms[form_name].elements[text_name]; + + textarea.focus(); + + if ((clientVer >= 4) && is_ie && is_win) + { + // Get text selection + theSelection = document.selection.createRange().text; + + if (theSelection) + { + // Add tags around selection + document.selection.createRange().text = bbopen + theSelection + bbclose; + document.forms[form_name].elements[text_name].focus(); + theSelection = ''; + return; + } + } + else if (document.forms[form_name].elements[text_name].selectionEnd && (document.forms[form_name].elements[text_name].selectionEnd - document.forms[form_name].elements[text_name].selectionStart > 0)) + { + mozWrap(document.forms[form_name].elements[text_name], bbopen, bbclose); + document.forms[form_name].elements[text_name].focus(); + theSelection = ''; + return; + } + + //The new position for the cursor after adding the bbcode + var caret_pos = getCaretPosition(textarea).start; + var new_pos = caret_pos + bbopen.length; + + // Open tag + insert_text(bbopen + bbclose); + + // Center the cursor when we don't have a selection + // Gecko and proper browsers + if (!isNaN(textarea.selectionStart)) + { + textarea.selectionStart = new_pos; + textarea.selectionEnd = new_pos; + } + // IE + else if (document.selection) + { + var range = textarea.createTextRange(); + range.move("character", new_pos); + range.select(); + storeCaret(textarea); + } + + textarea.focus(); + return; +} + +/** +* Insert text at position +*/ +function insert_text(text, spaces, popup) +{ + var textarea; + + if (!popup) + { + textarea = document.forms[form_name].elements[text_name]; + } + else + { + textarea = opener.document.forms[form_name].elements[text_name]; + } + if (spaces) + { + text = ' ' + text + ' '; + } + + if (!isNaN(textarea.selectionStart)) + { + var sel_start = textarea.selectionStart; + var sel_end = textarea.selectionEnd; + + mozWrap(textarea, text, '') + textarea.selectionStart = sel_start + text.length; + textarea.selectionEnd = sel_end + text.length; + } + else if (textarea.createTextRange && textarea.caretPos) + { + if (baseHeight != textarea.caretPos.boundingHeight) + { + textarea.focus(); + storeCaret(textarea); + } + + var caret_pos = textarea.caretPos; + caret_pos.text = caret_pos.text.charAt(caret_pos.text.length - 1) == ' ' ? caret_pos.text + text + ' ' : caret_pos.text + text; + } + else + { + textarea.value = textarea.value + text; + } + if (!popup) + { + textarea.focus(); + } +} + +/** +* Add inline attachment at position +*/ +function attach_inline(index, filename) +{ + insert_text('[attachment=' + index + ']' + filename + '[/attachment]'); + document.forms[form_name].elements[text_name].focus(); +} + +/** +* Add quote text to message +*/ +function addquote(post_id, username) +{ + var message_name = 'message_' + post_id; + var theSelection = ''; + var divarea = false; + + if (document.all) + { + divarea = document.all[message_name]; + } + else + { + divarea = document.getElementById(message_name); + } + + // Get text selection - not only the post content :( + if (window.getSelection) + { + theSelection = window.getSelection().toString(); + } + else if (document.getSelection) + { + theSelection = document.getSelection(); + } + else if (document.selection) + { + theSelection = document.selection.createRange().text; + } + + if (theSelection == '' || typeof theSelection == 'undefined' || theSelection == null) + { + if (divarea.innerHTML) + { + theSelection = divarea.innerHTML.replace(/
      /ig, '\n'); + theSelection = theSelection.replace(//ig, '\n'); + theSelection = theSelection.replace(/<\;/ig, '<'); + theSelection = theSelection.replace(/>\;/ig, '>'); + theSelection = theSelection.replace(/&\;/ig, '&'); + } + else if (document.all) + { + theSelection = divarea.innerText; + } + else if (divarea.textContent) + { + theSelection = divarea.textContent; + } + else if (divarea.firstChild.nodeValue) + { + theSelection = divarea.firstChild.nodeValue; + } + } + + if (theSelection) + { + insert_text('[quote="' + username + '"]' + theSelection + '[/quote]'); + } + + return; +} + +/** +* From http://www.massless.org/mozedit/ +*/ +function mozWrap(txtarea, open, close) +{ + var selLength = txtarea.textLength; + var selStart = txtarea.selectionStart; + var selEnd = txtarea.selectionEnd; + var scrollTop = txtarea.scrollTop; + + if (selEnd == 1 || selEnd == 2) + { + selEnd = selLength; + } + + var s1 = (txtarea.value).substring(0,selStart); + var s2 = (txtarea.value).substring(selStart, selEnd) + var s3 = (txtarea.value).substring(selEnd, selLength); + + txtarea.value = s1 + open + s2 + close + s3; + txtarea.selectionStart = selEnd + open.length + close.length; + txtarea.selectionEnd = txtarea.selectionStart; + txtarea.focus(); + txtarea.scrollTop = scrollTop; + + return; +} + +/** +* Insert at Caret position. Code from +* http://www.faqts.com/knowledge_base/view.phtml/aid/1052/fid/130 +*/ +function storeCaret(textEl) +{ + if (textEl.createTextRange) + { + textEl.caretPos = document.selection.createRange().duplicate(); + } +} + +/** +* Color pallette +*/ +function colorPalette(dir, width, height) +{ + var r = 0, g = 0, b = 0; + var numberList = new Array(6); + var color = ''; + + numberList[0] = '00'; + numberList[1] = '40'; + numberList[2] = '80'; + numberList[3] = 'BF'; + numberList[4] = 'FF'; + + document.writeln(''); + + for (r = 0; r < 5; r++) + { + if (dir == 'h') + { + document.writeln(''); + } + + for (g = 0; g < 5; g++) + { + if (dir == 'v') + { + document.writeln(''); + } + + for (b = 0; b < 5; b++) + { + color = String(numberList[r]) + String(numberList[g]) + String(numberList[b]); + document.write(''); + } + + if (dir == 'v') + { + document.writeln(''); + } + } + + if (dir == 'h') + { + document.writeln(''); + } + } + document.writeln('
      '); + document.write('#' + color + ''); + document.writeln('
      '); +} + + +/** +* Caret Position object +*/ +function caretPosition() +{ + var start = null; + var end = null; +} + + +/** +* Get the caret position in an textarea +*/ +function getCaretPosition(txtarea) +{ + var caretPos = new caretPosition(); + + // simple Gecko/Opera way + if(txtarea.selectionStart || txtarea.selectionStart == 0) + { + caretPos.start = txtarea.selectionStart; + caretPos.end = txtarea.selectionEnd; + } + // dirty and slow IE way + else if(document.selection) + { + + // get current selection + var range = document.selection.createRange(); + + // a new selection of the whole textarea + var range_all = document.body.createTextRange(); + range_all.moveToElementText(txtarea); + + // calculate selection start point by moving beginning of range_all to beginning of range + var sel_start; + for (sel_start = 0; range_all.compareEndPoints('StartToStart', range) < 0; sel_start++) + { + range_all.moveStart('character', 1); + } + + txtarea.sel_start = sel_start; + + // we ignore the end value for IE, this is already dirty enough and we don't need it + caretPos.start = txtarea.sel_start; + caretPos.end = txtarea.sel_start; + } + + return caretPos; +} \ No newline at end of file diff --git a/phpBB/styles/prosilver/template/faq_body.html b/phpBB/styles/prosilver/template/faq_body.html new file mode 100644 index 0000000000..aec578985e --- /dev/null +++ b/phpBB/styles/prosilver/template/faq_body.html @@ -0,0 +1,52 @@ + + +

      {L_FAQ_TITLE}

      + + + + + + +
      + + +
      +
      + +
      +

      {faq_block.BLOCK_TITLE}

      + +
      +
      {faq_block.faq_row.FAQ_QUESTION}
      +
      {faq_block.faq_row.FAQ_ANSWER}
      +
      {L_BACK_TO_TOP}
      +
      +
      + +
      + +
      +
      + + + + diff --git a/phpBB/styles/prosilver/template/forum_fn.js b/phpBB/styles/prosilver/template/forum_fn.js new file mode 100644 index 0000000000..e9754aeae2 --- /dev/null +++ b/phpBB/styles/prosilver/template/forum_fn.js @@ -0,0 +1,252 @@ +/** +* phpBB3 forum functions +*/ + +/** +* Window popup +*/ +function popup(url, width, height) +{ + window.open(url.replace(/&/g, '&'), '_popup', 'height=' + height + ',resizable=yes,scrollbars=yes, width=' + width); + return false; +} + +/** +* Jump to page +*/ +function jumpto() +{ + var page = prompt(jump_page, on_page); + + if (page !== null && !isNaN(page) && page > 0) + { + document.location.href = base_url.replace(/&/g, '&') + '&start=' + ((page - 1) * per_page); + } +} + +/** +* Mark/unmark checklist +* id = ID of parent container, name = name prefix, state = state [true/false] +*/ +function marklist(id, name, state) +{ + var parent = document.getElementById(id); + if (!parent) + { + eval('parent = document.' + id); + } + + if (!parent) + { + return; + } + + var rb = parent.getElementsByTagName('input'); + + for (var r = 0; r < rb.length; r++) + { + if (rb[r].name.substr(0, name.length) == name) + { + rb[r].checked = state; + } + } +} + +/** +* Resize viewable area for attached image or topic review panel (possibly others to come) +* e = element +*/ +function viewableArea(e, itself) +{ + if (!e) return; + if (!itself) + { + e = e.parentNode; + } + + if (!e.vaHeight) + { + // Store viewable area height before changing style to auto + e.vaHeight = e.offsetHeight; + e.vaMaxHeight = e.style.maxHeight; + e.style.height = 'auto'; + e.style.maxHeight = 'none'; + e.style.overflow = 'visible'; + } + else + { + // Restore viewable area height to the default + e.style.height = e.vaHeight + 'px'; + e.style.overflow = 'auto'; + e.style.maxHeight = e.vaMaxHeight; + e.vaHeight = false; + } +} + +/** +* Set display of page element +* s[-1,0,1] = hide,toggle display,show +*/ +function dE(n, s) +{ + var e = document.getElementById(n); + + if (!s) + { + s = (e.style.display == '' || e.style.display == 'block') ? -1 : 1; + } + e.style.display = (s == 1) ? 'block' : 'none'; +} + +/** +* Alternate display of subPanels +*/ +function subPanels(p) +{ + var i, e, t; + + if (typeof(p) == 'string') + { + show_panel = p; + } + + for (i = 0; i < panels.length; i++) + { + e = document.getElementById(panels[i]); + t = document.getElementById(panels[i] + '-tab'); + + if (e) + { + if (panels[i] == show_panel) + { + e.style.display = 'block'; + if (t) + { + t.className = 'activetab'; + } + } + else + { + e.style.display = 'none'; + if (t) + { + t.className = ''; + } + } + } + } +} + +/** +* Call print preview +*/ +function printPage() +{ + if (is_ie) + { + printPreview(); + } + else + { + window.print(); + } +} + +/** +* Show/hide groups of blocks +* c = CSS style name +* e = checkbox element +* t = toggle dispay state (used to show 'grip-show' image in the profile block when hiding the profiles) +*/ +function displayBlocks(c, e, t) +{ + var s = (e.checked == true) ? 1 : -1; + + if (t) + { + s *= -1; + } + + var divs = document.getElementsByTagName("DIV"); + + for (var d = 0; d < divs.length; d++) + { + if (divs[d].className.indexOf(c) == 0) + { + divs[d].style.display = (s == 1) ? 'none' : 'block'; + } + } +} + +function selectCode(a) +{ + // Get ID of code block + var e = a.parentNode.parentNode.getElementsByTagName('CODE')[0]; + + // Not IE + if (window.getSelection) + { + var s = window.getSelection(); + // Safari + if (s.setBaseAndExtent) + { + s.setBaseAndExtent(e, 0, e, e.innerText.length - 1); + } + // Firefox and Opera + else + { + var r = document.createRange(); + r.selectNodeContents(e); + s.removeAllRanges(); + s.addRange(r); + } + } + // Some older browsers + else if (document.getSelection) + { + var s = document.getSelection(); + var r = document.createRange(); + r.selectNodeContents(e); + s.removeAllRanges(); + s.addRange(r); + } + // IE + else if (document.selection) + { + var r = document.body.createTextRange(); + r.moveToElementText(e); + r.select(); + } +} + +/** +* Play quicktime file by determining it's width/height +* from the displayed rectangle area +*/ +function play_qt_file(obj) +{ + var rectangle = obj.GetRectangle(); + + if (rectangle) + { + rectangle = rectangle.split(',') + var x1 = parseInt(rectangle[0]); + var x2 = parseInt(rectangle[2]); + var y1 = parseInt(rectangle[1]); + var y2 = parseInt(rectangle[3]); + + var width = (x1 < 0) ? (x1 * -1) + x2 : x2 - x1; + var height = (y1 < 0) ? (y1 * -1) + y2 : y2 - y1; + } + else + { + var width = 200; + var height = 0; + } + + obj.width = width; + obj.height = height + 16; + + obj.SetControllerVisible(true); + obj.Play(); +} diff --git a/phpBB/styles/prosilver/template/forumlist_body.html b/phpBB/styles/prosilver/template/forumlist_body.html new file mode 100644 index 0000000000..30c7e5ffee --- /dev/null +++ b/phpBB/styles/prosilver/template/forumlist_body.html @@ -0,0 +1,65 @@ + + + +
    + +
    +
    + + + +
    +
    + +
      + + + +
    • +
      +
      +
      {forumrow.FORUM_IMAGE}
      + {forumrow.FORUM_NAME}
      + {forumrow.FORUM_DESC} + +
      {forumrow.L_MODERATOR_STR}: {forumrow.MODERATORS} + +
      {forumrow.L_SUBFORUM_STR} {forumrow.SUBFORUMS} +
      + +
      {L_REDIRECTS}: {forumrow.CLICKS}
      + +
      {forumrow.TOPICS} {L_TOPICS}
      +
      {forumrow.POSTS} {L_POSTS}
      +
      + {L_LAST_POST} {L_POST_BY_AUTHOR} {forumrow.LAST_POSTER_FULL} + {LAST_POST_IMG}
      {L_POSTED_ON_DATE} {forumrow.LAST_POST_TIME}{L_NO_POSTS}
      +
      + +
      +
    • + + + +
    + +
    +
    + + + +
    +
    + {L_NO_FORUMS} +
    +
    + diff --git a/phpBB/styles/prosilver/template/index.htm b/phpBB/styles/prosilver/template/index.htm new file mode 100644 index 0000000000..e69de29bb2 diff --git a/phpBB/styles/prosilver/template/index_body.html b/phpBB/styles/prosilver/template/index_body.html new file mode 100644 index 0000000000..96fa57857e --- /dev/null +++ b/phpBB/styles/prosilver/template/index_body.html @@ -0,0 +1,42 @@ + + +

    {LAST_VISIT_DATE}{CURRENT_TIME}

    +

    {CURRENT_TIME}
    {L_MCP} ]

    {CURRENT_TIME}

    + + + + + + +
    +

    {L_LOGIN_LOGOUT}  •  {L_REGISTER}

    + +
    + + + +

    {L_WHO_IS_ONLINE}

    +

    {TOTAL_USERS_ONLINE} ({L_ONLINE_EXPLAIN})
    {RECORD_USERS}

    {LOGGED_IN_USER_LIST} +
    {L_LEGEND}: {LEGEND}

    + + + +

    {L_BIRTHDAYS}

    +

    {L_CONGRATULATIONS}: {BIRTHDAY_LIST}{L_NO_BIRTHDAYS}

    + + + +

    {L_STATISTICS}

    +

    {TOTAL_POSTS} • {TOTAL_TOPICS} • {TOTAL_USERS} • {NEWEST_USER}

    + + + \ No newline at end of file diff --git a/phpBB/styles/prosilver/template/jumpbox.html b/phpBB/styles/prosilver/template/jumpbox.html new file mode 100644 index 0000000000..077362e306 --- /dev/null +++ b/phpBB/styles/prosilver/template/jumpbox.html @@ -0,0 +1,31 @@ + + +
    + + +

    {L_RETURN_TO} {FORUM_NAME}

    + +

    {L_RETURN_TO} {L_INDEX}

    + +

    {L_RETURN_TO}: {SEARCH_TOPIC}

    + +

    {L_RETURN_TO} {L_SEARCH_ADV}

    + + + +
    + +
    + + + + +
    + + + diff --git a/phpBB/styles/prosilver/template/login_body.html b/phpBB/styles/prosilver/template/login_body.html new file mode 100644 index 0000000000..8174a2ddc1 --- /dev/null +++ b/phpBB/styles/prosilver/template/login_body.html @@ -0,0 +1,67 @@ + + +
    +
    +
    + +
    +

    {LOGIN_EXPLAIN}{L_LOGIN}

    + +
    class="fields1"class="fields2"> +
    {LOGIN_ERROR}
    +
    +
    +
    +
    +
    +
    +
    + +
    {L_FORGOT_PASS}
    +
    {L_RESEND_ACTIVATION}
    + +
    + + +
    +

    {L_CONFIRM_CODE_EXPLAIN}
    +
    {CONFIRM_IMAGE}
    +
    +
    + + + +
    +
    +
    +
    + +
    +
     
    +
    {S_HIDDEN_FIELDS}
    +
    + +
    +
    +
    +
    + + +
    +
    + +
    +

    {L_REGISTER}

    +

    {L_LOGIN_INFO}

    +

    {L_TERMS_USE} | {L_PRIVACY}

    +
    +

    {L_REGISTER}

    +
    + +
    +
    + + +
    + + \ No newline at end of file diff --git a/phpBB/styles/prosilver/template/login_forum.html b/phpBB/styles/prosilver/template/login_forum.html new file mode 100644 index 0000000000..f47586f469 --- /dev/null +++ b/phpBB/styles/prosilver/template/login_forum.html @@ -0,0 +1,35 @@ + + +

    {L_LOGIN} {FORUM_NAME}

    + +
    + +
    +
    + +

    {L_LOGIN_FORUM}

    + +
    + +
    +
     
    +
    {LOGIN_ERROR}
    +
    + +
    +
    +
    +
    +
    +
     
    +
    {S_HIDDEN_FIELDS}
    +
    +
    + +
    +
    + +
    + + + \ No newline at end of file diff --git a/phpBB/styles/prosilver/template/mcp_approve.html b/phpBB/styles/prosilver/template/mcp_approve.html new file mode 100644 index 0000000000..64f9f0542f --- /dev/null +++ b/phpBB/styles/prosilver/template/mcp_approve.html @@ -0,0 +1,53 @@ + + +
    + +
    +
    + +
    + +

    {MESSAGE_TITLE}

    +

    {ADDITIONAL_MSG}

    + +
    + +
    +
     
    +
    +
    + + + +
    +
    +
    +
    +
    +
    +

    {L_CAN_LEAVE_BLANK}
    +
    +
    + + +
    +
     
    +
    {MESSAGE_TEXT}
    +
    +
    + +
    + {S_HIDDEN_FIELDS}  + +
    + +
    + +
    +
    + +
    + + \ No newline at end of file diff --git a/phpBB/styles/prosilver/template/mcp_ban.html b/phpBB/styles/prosilver/template/mcp_ban.html new file mode 100644 index 0000000000..cc41ce9c1f --- /dev/null +++ b/phpBB/styles/prosilver/template/mcp_ban.html @@ -0,0 +1,128 @@ + + + + +
    + +

    {L_TITLE}

    + +
    +
    + +

    {L_TITLE}

    +

    {L_EXPLAIN}

    + +
    +
    +
    +
    +
    {L_FIND_USERNAME}
    +
    +
    +
    +
    + +
    +
    +
    +
    +
    +
    +
    +
    +
    + +
    + +
    +

    {L_BAN_EXCLUDE_EXPLAIN}
    +
    + + +
    +
    +
    + +
    +
    + +
    + {S_HIDDEN_FIELDS}  + +
    + +
    +
    + +

    {L_UNBAN_TITLE}

    +

    {L_UNBAN_EXPLAIN}

    + + +
    +
    +
    +
    +
    +
    +
    {L_BAN_LENGTH}:
    +
    +
    +
    +
    {L_BAN_REASON}:
    +
    +
    +
    +
    {L_BAN_GIVE_REASON}:
    +
    +
    +
    + +
    +
    + +
    + {S_HIDDEN_FIELDS}  + +
    + + + +

    {L_NO_BAN_CELL}

    + +
    +
  • + + + + + + \ No newline at end of file diff --git a/phpBB/styles/prosilver/template/mcp_footer.html b/phpBB/styles/prosilver/template/mcp_footer.html new file mode 100644 index 0000000000..5a48d95f23 --- /dev/null +++ b/phpBB/styles/prosilver/template/mcp_footer.html @@ -0,0 +1,9 @@ + + +
    + + + + + + \ No newline at end of file diff --git a/phpBB/styles/prosilver/template/mcp_forum.html b/phpBB/styles/prosilver/template/mcp_forum.html new file mode 100644 index 0000000000..17e57578ba --- /dev/null +++ b/phpBB/styles/prosilver/template/mcp_forum.html @@ -0,0 +1,107 @@ + + + + + +

    {L_FORUM}: {FORUM_NAME}

    + +
    + +
    +
    + + + + + + +
      +
    • +
      +
      {L_TOPICS}
      +
      {L_REPLIES}
      +
      {L_LAST_POST}
      +
      {L_MARK}
      +
      +
    • +
    +
      + + +
    • +
      +
      style="background-image: url({T_ICONS_PATH}{topicrow.TOPIC_ICON_IMG});"> + [ {L_SELECT_MERGE} ]   + {topicrow.TOPIC_TITLE} + {topicrow.UNAPPROVED_IMG} + {REPORTED_IMG} +  [ {L_DELETE_SHADOW_TOPIC} ] +
      + {topicrow.PAGINATION} + {topicrow.ATTACH_ICON_IMG} {L_POST_BY_AUTHOR} {topicrow.TOPIC_AUTHOR_FULL} {L_POSTED_ON_DATE} {topicrow.FIRST_POST_TIME}
      +
      {topicrow.REPLIES} {L_REPLIES}
      +
      {L_LAST_POST} {L_POST_BY_AUTHOR} {topicrow.LAST_POST_AUTHOR_FULL} {L_POSTED_ON_DATE}
      {topicrow.LAST_POST_TIME}
      +
      +
      + checked="checked" />  +
      +
      +
    • + +
    + +
      +
    • {L_NO_TOPICS}

    • +
    + + +
    + {L_NEXT} + {L_PREVIOUS} + + + +
    + +
    + + + + + +
    +
    + +
    + + + +
    + +
    + + \ No newline at end of file diff --git a/phpBB/styles/prosilver/template/mcp_front.html b/phpBB/styles/prosilver/template/mcp_front.html new file mode 100644 index 0000000000..722f4d59f5 --- /dev/null +++ b/phpBB/styles/prosilver/template/mcp_front.html @@ -0,0 +1,142 @@ + + +

    {PAGE_TITLE}

    + + + +
    + +
    +
    + +

    {L_LATEST_UNAPPROVED}

    +

    {L_UNAPPROVED_TOTAL}

    + + +
      +
    • +
      +
      {L_VIEW_DETAILS}
      +
      {L_TOPIC} & {L_FORUM}
      +
      +
    • +
    + + +

    {L_UNAPPROVED_POSTS_ZERO_TOTAL}

    + + +
    +
    + + +
    +   + + +
    + + +
    + + + +
    +
    + +

    {L_LATEST_REPORTED}

    +

    {L_REPORTS_TOTAL}

    + + +
      +
    • +
      +
      {L_VIEW_DETAILS}
      +
      {L_REPORTER} & {L_FORUM}
      +
      +
    • +
    +
      + + +
    • +
      +
      + {report.SUBJECT} {report.ATTACH_ICON_IMG}
      + {L_POSTED} {L_POST_BY_AUTHOR} {report.AUTHOR_FULL} {L_POSTED_ON_DATE} {report.POST_TIME} +
      +
      + {L_REPORTED} {L_POST_BY_AUTHOR} {report.REPORTER_FULL} {L_REPORTED_ON_DATE} {report.REPORT_TIME}
      + {L_FORUM}: {report.FORUM_NAME}
      +
      +
      +
    • + +
    + +

    {L_REPORTS_ZERO_TOTAL}

    + + +
    +
    + + + +
    +
    + +

    {L_LATEST_LOGS}

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    {L_ACTION}{L_USERNAME}{L_IP}{L_VIEW_TOPIC}{L_VIEW_TOPIC_LOGS}{L_TIME}
    {log.ACTION}{log.USERNAME}{log.IP}{L_VIEW_TOPIC}{L_VIEW_TOPIC_LOGS} {log.TIME}
    {L_NO_ENTRIES}
    + +
    +
    + + + \ No newline at end of file diff --git a/phpBB/styles/prosilver/template/mcp_header.html b/phpBB/styles/prosilver/template/mcp_header.html new file mode 100644 index 0000000000..9af0f4c4e6 --- /dev/null +++ b/phpBB/styles/prosilver/template/mcp_header.html @@ -0,0 +1,67 @@ + + +

    {L_MCP}

    + + +

    + [ {L_MCP} | {L_MODERATE_FORUM} + | {L_MODERATE_TOPIC} + | {L_MODERATE_POST} ] +

    + + +
    + +
    + +
    +
    + +
    + + + +
    + +
    +

    {L_MESSAGE}

    +

    {MESSAGE}

    +

    {return_links.MESSAGE_LINK}

    +
    + + + +
    + +
    +

    {L_PLEASE_CONFIRM}

    +

    {CONFIRM_MESSAGE}

    + +
    + {S_HIDDEN_FIELDS}  + +
    +
    + +
    + diff --git a/phpBB/styles/prosilver/template/mcp_logs.html b/phpBB/styles/prosilver/template/mcp_logs.html new file mode 100644 index 0000000000..4e4e782fca --- /dev/null +++ b/phpBB/styles/prosilver/template/mcp_logs.html @@ -0,0 +1,86 @@ + + +

    {L_TITLE}

    + +
    + +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    {L_USERNAME}{L_IP}{L_TIME}{L_ACTION}{L_MARK}
    {log.USERNAME}{log.IP}{log.DATE}{log.ACTION}
    + {log.DATA} +
    {L_NO_ENTRIES}
    + + +
    + {L_NEXT} + {L_PREVIOUS} + + + + +
    + +
    + + + +
    +
    + + +
    + +   + + +
    + + +
    +
    + + + +
    + + \ No newline at end of file diff --git a/phpBB/styles/prosilver/template/mcp_message.html b/phpBB/styles/prosilver/template/mcp_message.html new file mode 100644 index 0000000000..1fde48b2cc --- /dev/null +++ b/phpBB/styles/prosilver/template/mcp_message.html @@ -0,0 +1,8 @@ + + +
    +

    {MESSAGE_TITLE}

    +

    {MESSAGE_TEXT}

    +
    + + \ No newline at end of file diff --git a/phpBB/styles/prosilver/template/mcp_move.html b/phpBB/styles/prosilver/template/mcp_move.html new file mode 100644 index 0000000000..cde4f95257 --- /dev/null +++ b/phpBB/styles/prosilver/template/mcp_move.html @@ -0,0 +1,36 @@ + + +
    + +
    +
    + +
    +

    {MESSAGE_TITLE}

    +

    {ADDITIONAL_MSG}

    + +
    +
    +
    +
    +
    +
    +
    +
     
    +
    {MESSAGE_TEXT}
    +
    +
    + +
    + {S_HIDDEN_FIELDS}  + +
    + +
    + +
    +
    + +
    + + \ No newline at end of file diff --git a/phpBB/styles/prosilver/template/mcp_notes_front.html b/phpBB/styles/prosilver/template/mcp_notes_front.html new file mode 100644 index 0000000000..19b143c521 --- /dev/null +++ b/phpBB/styles/prosilver/template/mcp_notes_front.html @@ -0,0 +1,28 @@ + + +
    + +

    {L_TITLE}

    + +
    +
    + +
    +
    +
    +
    +
    {L_FIND_USERNAME}
    +
    +
    + +
    +
    + +
    +   + +
    + +
    + + \ No newline at end of file diff --git a/phpBB/styles/prosilver/template/mcp_notes_user.html b/phpBB/styles/prosilver/template/mcp_notes_user.html new file mode 100644 index 0000000000..817c7d235b --- /dev/null +++ b/phpBB/styles/prosilver/template/mcp_notes_user.html @@ -0,0 +1,122 @@ + + +
    + +

    {L_TITLE}

    + +
    +
    + +

    {USERNAME}{USERNAME}

    + +
    +
    +
    {AVATAR_IMG}
    +
    + +
    +
    +
    {L_RANK}:
    {RANK_TITLE}
    +
    {L_RANK}:
    {RANK_IMG}
    +
    {L_JOINED}:
    {JOINED}
    +
    {L_TOTAL_POSTS}:
    {POSTS}
    +
    {L_WARNINGS}:
    {WARNINGS}
    +
    +
    +
    + +
    +
    + +
    +
    + +

    {L_ADD_FEEDBACK}

    +

    {L_ADD_FEEDBACK_EXPLAIN}

    + +
    + +
    + +
    +
    + +
    + {S_HIDDEN_FIELDS}  + +
    + +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    {L_REPORT_BY}{L_IP}{L_TIME}{L_ACTION_NOTE}{L_MARK}
    {usernotes.REPORT_BY}{usernotes.IP}{usernotes.REPORT_AT}{usernotes.ACTION}
    {L_NO_ENTRIES}
    + +
    + +
    + {L_NEXT} + {L_PREVIOUS} + + + +
    + +
    + + + +
    +
    + + +
    + +   +
    + +
    + +
    + + +
    + + \ No newline at end of file diff --git a/phpBB/styles/prosilver/template/mcp_post.html b/phpBB/styles/prosilver/template/mcp_post.html new file mode 100644 index 0000000000..dc0ea9f800 --- /dev/null +++ b/phpBB/styles/prosilver/template/mcp_post.html @@ -0,0 +1,284 @@ + + + +

    {L_REPORT_DETAILS}

    + +
    +
    + +
    +

    {L_REPORT_REASON}: {REPORT_REASON_TITLE}

    +

    {L_REPORTED} {L_POST_BY_AUTHOR} {REPORTER_FULL} {L_REPORTED_ON_DATE} {REPORT_DATE}

    + +

    {L_REPORT_CLOSED}

    + +
    + + {REPORT_TEXT} + + {REPORT_REASON_DESCRIPTION} + +
    +
    + +
    +
    + +
    + +
    + +   + + + +
    + +
    + + +

    {L_POST_DETAILS}

    + + +
    +
    + +
    + + + + +

    {POST_SUBJECT}

    +

    {MINI_POST_IMG} {L_POSTED} {L_POST_BY_AUTHOR} {POST_AUTHOR_FULL} {L_POSTED_ON_DATE} {POST_DATE}

    + + +
    + +

    +   + + +

    + +
    + + + +

    + {REPORTED_IMG} {L_MESSAGE_REPORTED} +

    + + +
    + {POST_PREVIEW} +
    + + +
    +
    {L_ATTACHMENTS}
    + +
    {attachment.DISPLAY_ATTACHMENT}
    + +
    + + + +
    {SIGNATURE}
    + + + +
    +
    {L_THIS_POST_IP}: + {POST_IPADDR}{POST_IP} ({POST_IP}{L_LOOKUP_IP}) + + {POST_IPADDR} ({POST_IP}){POST_IP} ({L_LOOKUP_IP}) +
    + + +
    + +
    +
    + + +
    +
    + +

    {L_MOD_OPTIONS}

    + +
    + +
    +
    +
    +
    +
    + + +
    + [ {L_FIND_USERNAME} ] +
    +
    +
    + +
    + + + +
    + +
    +
    +
    +
    +
    +
    +
    + +
    + + +
    +
    + + + + +
    +
    + +

    {RETURN_QUEUE} | {RETURN_TOPIC_SIMPLE} | {RETURN_POST}{RETURN_REPORTS} | {L_VIEW_TOPIC}{RETURN_TOPIC}

    + +
    +
    + + + + + + +
    +
    + +
    + + +

    {L_FEEDBACK}

    + + + {L_REPORTED_BY}: {usernotes.REPORT_BY} {L_REPORTED_ON_DATE} {usernotes.REPORT_AT} +
    +
    {usernotes.ACTION}
    + +
    + + + +
    +   + +
    + + + +

    {L_ADD_FEEDBACK}

    +

    {L_ADD_FEEDBACK_EXPLAIN}

    + +
    + +
    + +
    +   + +
    + +
    + +
    +
    + + + +
    +
    + +

    {L_MCP_POST_REPORTS}

    + + + {L_REPORTED_BY}: {reports.REPORTER}{reports.REPORTER} {L_REPORTED_ON_DATE} {reports.REPORT_TIME} +

    {reports.REASON_TITLE}: {reports.REASON_DESC}
    {reports.REPORT_TEXT}

    + + +
    +
    + + + +
    +
    + +

    {L_THIS_POST_IP}: + {POST_IPADDR}{POST_IP} ({POST_IP}{L_LOOKUP_IP}) + + {POST_IPADDR} ({POST_IP}){POST_IP} ({L_LOOKUP_IP}) +

    + + + + + + + + + + + + + + + + + + + + +
    {L_OTHER_USERS}{L_POSTS}
    {userrow.USERNAME}{userrow.USERNAME}{userrow.NUM_POSTS}
    {L_NO_MATCHES_FOUND}
    + + + + + + + + + + + + + + + + + + + + +
    {L_IPS_POSTED_FROM}{L_POSTS}
    {iprow.HOSTNAME} ({iprow.IP}){iprow.IP} ({L_LOOKUP_IP}){iprow.NUM_POSTS}
    {L_NO_MATCHES_FOUND}
    + +

    {L_LOOKUP_ALL}

    + +
    +
    + + + + + + + \ No newline at end of file diff --git a/phpBB/styles/prosilver/template/mcp_queue.html b/phpBB/styles/prosilver/template/mcp_queue.html new file mode 100644 index 0000000000..096ed8243a --- /dev/null +++ b/phpBB/styles/prosilver/template/mcp_queue.html @@ -0,0 +1,96 @@ + + +
    + +
    + + +
    + +

    {L_TITLE}

    + +
    +
    + +

    {L_EXPLAIN}

    + + + +
      +
    • +
      +
      {L_TOPIC}{L_POST}
      +
      {L_TOPIC} & {L_FORUM}
      +
      {L_MARK}
      +
      +
    • +
    + + +
    + {L_NEXT} + {L_PREVIOUS} + + + + +
    + +
    + + + +

    {L_NO_TOPICS_QUEUE}{L_NO_POSTS}

    + + +
    +
    + + +
    +   + + +
    + + +
    + + \ No newline at end of file diff --git a/phpBB/styles/prosilver/template/mcp_reports.html b/phpBB/styles/prosilver/template/mcp_reports.html new file mode 100644 index 0000000000..04e64265f2 --- /dev/null +++ b/phpBB/styles/prosilver/template/mcp_reports.html @@ -0,0 +1,85 @@ + + +
    + +
    + + +
    + +

    {L_TITLE}

    + +
    +
    + +

    {L_EXPLAIN}

    + + + +
      +
    • +
      +
      {L_VIEW_DETAILS}
      +
      {L_REPORTER} & {L_FORUM}
      +
      {L_MARK}
      +
      +
    • +
    +
      + + +
    • +
      +
      + {postrow.POST_SUBJECT} {postrow.ATTACH_ICON_IMG}
      + {L_POSTED} {L_POST_BY_AUTHOR} {postrow.POST_AUTHOR_FULL} {L_POSTED_ON_DATE} {postrow.POST_TIME} +
      +
      + {postrow.REPORTER_FULL} {L_REPORTED_ON_DATE} {postrow.REPORT_TIME}
      + {L_FORUM}: {postrow.FORUM_NAME}
      +
      +
      +
      +
    • + +
    + +
    + {L_NEXT} + {L_PREVIOUS} + + + + +
    +
    + + + +

    {L_NO_REPORTS}

    + + +
    +
    + + +
    + +   + +
    + + +
    + + \ No newline at end of file diff --git a/phpBB/styles/prosilver/template/mcp_topic.html b/phpBB/styles/prosilver/template/mcp_topic.html new file mode 100644 index 0000000000..704624b993 --- /dev/null +++ b/phpBB/styles/prosilver/template/mcp_topic.html @@ -0,0 +1,169 @@ + + +

    {L_TOPIC}: {TOPIC_TITLE}

    + + + +
    + +
    + +
    + +
    +
    + +
    +
    +

    {L_POSTS_PER_PAGE_EXPLAIN}
    +
    +
    +
    +
    +
    {S_SELECT_SORT_DAYS}  
    +
    +
    + + +
    +

    {L_SPLIT_TOPIC_EXPLAIN}

    + + +
    +
    +
    + +
    +
    + + +
    +
    +
    +
    +
    +
    +
    +
    +
    + + + +
    +

    {L_MERGE_TOPIC_EXPLAIN}

    +
    +
    +
    + + {L_SELECT_TOPIC} +
    +
    {TO_TOPIC_INFO}
    +
    +
    + + +
    +
    + +
    +
    + +

    + {L_EXPAND_VIEW} + {L_TOPIC_REVIEW}: {TOPIC_TITLE} +

    + +
    + +
    +
    + +
    +
    {L_POST_DETAILS} | {L_SELECT}: checked="checked" />
    + +

    {postrow.POST_SUBJECT}

    +

    {postrow.MINI_POST_IMG} {L_POSTED} {postrow.POST_DATE} {L_POST_BY_AUTHOR} {postrow.POST_AUTHOR_FULL} [ {L_POST_DETAILS} ]

    + + +

    + {UNAPPROVED_IMG} {L_POST_UNAPPROVED} + {REPORTED_IMG} {L_POST_REPORTED} +

    + + +
    {postrow.MESSAGE}
    + + +
    +
    {L_ATTACHMENTS}
    + +
    {postrow.attachment.DISPLAY_ATTACHMENT}
    + +
    + + +
    + +
    +
    + +
    + +
    + + + + + +
    +
    + +
    +   + + +
    + +
    + + \ No newline at end of file diff --git a/phpBB/styles/prosilver/template/mcp_viewlogs.html b/phpBB/styles/prosilver/template/mcp_viewlogs.html new file mode 100644 index 0000000000..862fad9df7 --- /dev/null +++ b/phpBB/styles/prosilver/template/mcp_viewlogs.html @@ -0,0 +1,51 @@ + + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    {L_DISPLAY_OPTIONS}
    {L_DISPLAY_LOG}: {S_SELECT_SORT_DAYS} {L_SORT_BY} {S_SELECT_SORT_KEY} {S_SELECT_SORT_DIR} 
    {L_USERNAME}{L_IP}{L_TIME}{L_ACTION}
    {L_LOGS_CURRENT_TOPIC} {TOPIC_NAME}
    {log.USERNAME}{log.IP}{log.TIME}{log.ACTION}{L_VIEW_TOPIC} | {L_VIEW_TOPIC_LOGS}
    {L_NO_ENTRIES}
    + +
    + + + + + + +
    {L_GOTO_PAGE} {L_PREVIOUS}  {PAGINATION}  {L_NEXT}
    + + \ No newline at end of file diff --git a/phpBB/styles/prosilver/template/mcp_warn_front.html b/phpBB/styles/prosilver/template/mcp_warn_front.html new file mode 100644 index 0000000000..77eb1d013d --- /dev/null +++ b/phpBB/styles/prosilver/template/mcp_warn_front.html @@ -0,0 +1,97 @@ + + +
    + +

    {L_WARN_USER}

    + +
    +
    + +

    {L_SELECT_USER}

    + +
    +
    +
    +
    +
    {L_FIND_USERNAME}
    +
    +
    + +
    +
    + +
    +   + +
    + +
    + +
    +
    + +

    {L_MOST_WARNINGS}

    + + + + + + + + + + + + + + + + + + + + + + +
    {L_USERNAME}{L_WARNINGS}{L_LATEST_WARNING_TIME}
    {highest.USERNAME_FULL}{highest.WARNINGS}{highest.WARNING_TIME}{L_VIEW_NOTES}
    + +

    {L_WARNINGS_ZERO_TOTAL}

    + + +
    +
    + +
    +
    + +

    {L_LATEST_WARNINGS}

    + + + + + + + + + + + + + + + + + + + + + +
    {L_USERNAME}{L_TIME}{L_TOTAL_WARNINGS}
    {latest.USERNAME_FULL}{latest.WARNING_TIME}{latest.WARNINGS}{L_VIEW_NOTES}
    + +

    {L_WARNINGS_ZERO_TOTAL}

    + + +
    +
    + + \ No newline at end of file diff --git a/phpBB/styles/prosilver/template/mcp_warn_list.html b/phpBB/styles/prosilver/template/mcp_warn_list.html new file mode 100644 index 0000000000..e0401e1912 --- /dev/null +++ b/phpBB/styles/prosilver/template/mcp_warn_list.html @@ -0,0 +1,66 @@ + + +
    + +

    {L_WARNED_USERS}

    + +
    +
    + +

    {L_WARNED_USERS_EXPLAIN}

    + + +

    + + + + + + + + + + + + + + + + + + + + + +
    {L_USERNAME}{L_WARNINGS}{L_LATEST_WARNING_TIME}
    {user.USERNAME_FULL}{user.WARNINGS}{user.WARNING_TIME}{L_VIEW_NOTES}
    + +
    + + + +
    +
    + + + +

    {L_WARNINGS_ZERO_TOTAL}

    + + +
    +
    + + + +
    + + \ No newline at end of file diff --git a/phpBB/styles/prosilver/template/mcp_warn_post.html b/phpBB/styles/prosilver/template/mcp_warn_post.html new file mode 100644 index 0000000000..e887a246e8 --- /dev/null +++ b/phpBB/styles/prosilver/template/mcp_warn_post.html @@ -0,0 +1,72 @@ + + +
    + +

    {L_MCP_WARN_POST}

    + +
    +
    + +

    {USERNAME}{USERNAME}

    + +
    +
    +
    {AVATAR_IMG}
    +
    + +
    +
    +
    {L_RANK}:
    {RANK_TITLE}
    +
    {L_RANK}:
    {RANK_IMG}
    +
    {L_JOINED}:
    {JOINED}
    +
    {L_TOTAL_POSTS}:
    {POSTS}
    +
    {L_WARNINGS}:
    {WARNINGS}
    +
    +
    +
    + +
    +
    + +
    +
    + +

    {L_POST_DETAILS}

    + +
    + +
    + {POST} +
    + +
    + +
    +
    + +
    +
    + +

    {L_ADD_WARNING}

    +

    {L_ADD_WARNING_EXPLAIN}

    + +
    + +

    +
    +
     
    +
    +
    +
    + +
    +
    + +
    +   + +
    + +
    + + \ No newline at end of file diff --git a/phpBB/styles/prosilver/template/mcp_warn_user.html b/phpBB/styles/prosilver/template/mcp_warn_user.html new file mode 100644 index 0000000000..7604ceb868 --- /dev/null +++ b/phpBB/styles/prosilver/template/mcp_warn_user.html @@ -0,0 +1,56 @@ + + +
    + +

    {L_WARN_USER}

    + +
    +
    + +

    {USERNAME}{USERNAME}

    + +
    +
    +
    {AVATAR_IMG}
    +
    + +
    +
    +
    {L_RANK}:
    {RANK_TITLE}
    +
    {L_RANK}:
    {RANK_IMG}
    +
    {L_JOINED}:
    {JOINED}
    +
    {L_TOTAL_POSTS}:
    {POSTS}
    +
    {L_WARNINGS}:
    {WARNINGS}
    +
    +
    +
    + +
    +
    + +
    +
    + +

    {L_ADD_WARNING}

    +

    {L_ADD_WARNING_EXPLAIN}

    + +
    + +

    +
    +
     
    +
    +
    +
    + +
    +
    + +
    +   + +
    + +
    + + \ No newline at end of file diff --git a/phpBB/styles/prosilver/template/mcp_whois.html b/phpBB/styles/prosilver/template/mcp_whois.html new file mode 100644 index 0000000000..4906816635 --- /dev/null +++ b/phpBB/styles/prosilver/template/mcp_whois.html @@ -0,0 +1,14 @@ + +

    {L_WHOIS}

    + +
    +
    + +

    {L_RETURN_POST}

    +
    {WHOIS}
    +

    {L_RETURN_POST}

    + +
    +
    + + \ No newline at end of file diff --git a/phpBB/styles/prosilver/template/memberlist_body.html b/phpBB/styles/prosilver/template/memberlist_body.html new file mode 100644 index 0000000000..3cf276cec6 --- /dev/null +++ b/phpBB/styles/prosilver/template/memberlist_body.html @@ -0,0 +1,169 @@ + + + +
    + + + + + + + + + + + + + + + style="color:#{GROUP_COLOR};">{GROUP_NAME} +

    {GROUP_DESC} {GROUP_TYPE}

    +

    + {AVATAR_IMG} + {RANK_IMG} + {GROUP_RANK} +

    + + +

    {PAGE_TITLE}: {SEARCH_WORDS}

    + +
    +
    + + + +
    +
    + + +
    + +
    + +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    {L_GROUP_MEMBERS}    
    {memberrow.RANK_IMG}{memberrow.RANK_TITLE} {memberrow.USERNAME_FULL}
    {L_SELECT} ]
    {memberrow.POSTS}{memberrow.POSTS}
    {memberrow.LOCATION}
     
    {memberrow.JOINED}{memberrow.VISITED} 
    {L_NO_MEMBERS}
    + +
    +
    + + +
    + + +
    + + + + +
    + + + +
    + {L_PREVIOUS} + {L_NEXT} + + +
    + + +
    + +
    + + + + + + + + + diff --git a/phpBB/styles/prosilver/template/memberlist_email.html b/phpBB/styles/prosilver/template/memberlist_email.html new file mode 100644 index 0000000000..614efa73ee --- /dev/null +++ b/phpBB/styles/prosilver/template/memberlist_email.html @@ -0,0 +1,92 @@ + + + + +

    {L_SEND_EMAIL} {USERNAME}

    + +
    + +
    +
    + +
    +

    {ERROR_MESSAGE}

    +
    + +
    +
    +
    {USERNAME}
    +
    +
    +
    +
    +
    + +
    +
    +
    +
    +
    +
    +
    +
    +
    +

    + {L_DEST_LANG_EXPLAIN}
    +
    +
    + +
    +

    + {L_EMAIL_BODY_EXPLAIN}
    +
    +
    +
    +
     
    +
    +
    +
    +
    + +
    +
    + +
    +
    +
    +
    + +
    +
    +
    +
    + +
    + + \ No newline at end of file diff --git a/phpBB/styles/prosilver/template/memberlist_im.html b/phpBB/styles/prosilver/template/memberlist_im.html new file mode 100644 index 0000000000..7ebe1e3472 --- /dev/null +++ b/phpBB/styles/prosilver/template/memberlist_im.html @@ -0,0 +1,85 @@ + + + +

    {L_SEND_IM}

    + +
    + +
    +
    + +

    {L_SEND_IM_EXPLAIN}

    + +
    +
    +
    +
    {USERNAME} [ {IM_CONTACT} ] {PRESENCE_IMG}
    +
    + + +
    +
    +
    +
    +
    +
    +
    +
    +
    +
     
    +
    +
    + + + + + + +
    +
     
    +
    {L_IM_ADD_CONTACT}
    +
    {L_IM_SEND_MESSAGE}
    +
    {L_IM_DOWNLOAD_APP} | {L_IM_AIM_EXPRESS}
    +
    + + + +
    +
     
    +
    +
    {L_IM_ADD_CONTACT}
    +
    {L_IM_SEND_MESSAGE}
    + + + +
    +
    +
    +
    +
    +
     
    +
    +
    + + + +
    +
     
    +
    {L_IM_NO_JABBER}
    +
    + + + +
    +
     
    +
    {L_IM_SENT_JABBER}
    +
    + +
    + +
    +
    + +
    + + \ No newline at end of file diff --git a/phpBB/styles/prosilver/template/memberlist_leaders.html b/phpBB/styles/prosilver/template/memberlist_leaders.html new file mode 100644 index 0000000000..60496139c2 --- /dev/null +++ b/phpBB/styles/prosilver/template/memberlist_leaders.html @@ -0,0 +1,76 @@ + + +

    {PAGE_TITLE}

    + +
    + +
    +
    + + + + + + + + + + + + + + + + + + + + + + +
    {L_RANK} {L_ADMINISTRATORS}{L_PRIMARY_GROUP}{L_FORUMS}
    {admin.RANK_IMG}{admin.RANK_TITLE}{admin.USERNAME_FULL} + style="font-weight: bold; color:#{admin.GROUP_COLOR}" href="{admin.U_GROUP}">{admin.GROUP_NAME} + + {admin.GROUP_NAME} + -
    {L_NO_MEMBERS}
    + +
    +
    + +
    +
    + + + + + + + + + + + + + + + + + + + + + + +
    {L_MODERATORS}  
    {mod.RANK_IMG}{mod.RANK_TITLE}{mod.USERNAME_FULL} + style="font-weight: bold; color:#{mod.GROUP_COLOR}" href="{mod.U_GROUP}">{mod.GROUP_NAME} + + {mod.GROUP_NAME} + {L_ALL_FORUMS}
    {L_NO_MEMBERS}
    + +
    +
    + +
    + + + \ No newline at end of file diff --git a/phpBB/styles/prosilver/template/memberlist_search.html b/phpBB/styles/prosilver/template/memberlist_search.html new file mode 100644 index 0000000000..ba7cf302ff --- /dev/null +++ b/phpBB/styles/prosilver/template/memberlist_search.html @@ -0,0 +1,116 @@ + + + + + + +

    {L_FIND_USERNAME}

    + +
    +
    +
    + +

    {L_FIND_USERNAME_EXPLAIN}

    + +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    + +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    + +
    +
    +
    +
    + +
    +
    +
    +
    +
    +
    +
    +
    +
    + +
    + +
    + +
    +   + +
    + +
    +
    + +
    diff --git a/phpBB/styles/prosilver/template/memberlist_view.html b/phpBB/styles/prosilver/template/memberlist_view.html new file mode 100644 index 0000000000..5b50f74689 --- /dev/null +++ b/phpBB/styles/prosilver/template/memberlist_view.html @@ -0,0 +1,98 @@ + + +

    {PAGE_TITLE}

    + +
    +
    +
    + + +
    +
    {AVATAR_IMG}
    +
    {RANK_TITLE}
    +
    {RANK_IMG}
    +
    + + +
    +
    {L_USERNAME}:
    +
    + {USERNAME} + [ {L_USER_ADMIN} ] + [ {L_USE_PERMISSIONS} ] +
    + +
    {L_RANK}:
    {RANK_TITLE}
    +
    {L_RANK}:
    {RANK_IMG}
    + +
    {L_USER_IS_INACTIVE}:
    {USER_INACTIVE_REASON}
    +
    {L_LOCATION}:
    {LOCATION}
    +
    {L_AGE}:
    {AGE}
    +
    {L_OCCUPATION}:
    {OCCUPATION}
    +
    {L_INTERESTS}:
    {INTERESTS}
    +
    {L_USERGROUPS}:
    +
    {L_SIGNATURE}:
    {SIGNATURE}
    +
    + +
    +
    + +
    +
    +
    + +

    {L_CONTACT_USER} {USERNAME}

    + +
    +
    {L_EMAIL_ADDRESS}:
    {L_SEND_EMAIL} {USERNAME}
    +
    {L_WEBSITE}:
    {U_WWW}
    +
    {L_PM}:
    {L_SEND_PRIVATE_MESSAGE}
    + +
    {L_MSNM}:
    {L_SEND_MSNM_MESSAGE}{USER_MSN}
    +
    {L_YIM}:
    {L_SEND_YIM_MESSAGE}{USER_YIM}
    +
    {L_AIM}:
    {L_SEND_AIM_MESSAGE}{USER_AIM}
    +
    {L_ICQ}:
    {L_SEND_ICQ_MESSAGE}{USER_ICQ}
    +
    {L_JABBER}:
    {L_SEND_JABBER_MESSAGE}
    {L_JABBER}:
    {USER_JABBER}
    + + +
    {postrow.PROFILE_FIELD1_NAME}:
    {postrow.PROFILE_FIELD1_VALUE}
    + +
    {custom_fields.PROFILE_FIELD_NAME}:
    {custom_fields.PROFILE_FIELD_VALUE}
    + + +
     
    {L_ADD_FRIEND}
    +
     
    {L_ADD_FOE}
    + + +
     
    {L_REMOVE_FRIEND}
    + +
     
    {L_REMOVE_FOE}
    + + + +
    +
    + +
    +

    {L_USER_FORUM}

    +
    +
    {L_JOINED}:
    {JOINED}
    +
    {L_VISITED}:
    {VISITED}
    + +
    {L_WARNINGS}:
    +
    {WARNINGS} [ {L_VIEW_NOTES} | {L_WARN_USER} ]
    + +
    {L_TOTAL_POSTS}:
    {POSTS} | {L_SEARCH_USER_POSTS}
    ({POSTS_PCT} / {POSTS_DAY})
    + +
    {L_ACTIVE_IN_FORUM}:
    {ACTIVE_FORUM}
    ({ACTIVE_FORUM_POSTS} / {ACTIVE_FORUM_PCT}) -
    +
    {L_ACTIVE_IN_TOPIC}:
    {ACTIVE_TOPIC}
    ({ACTIVE_TOPIC_POSTS} / {ACTIVE_TOPIC_PCT}) -
    + +
    +
    +
    +
    +
    + + + + \ No newline at end of file diff --git a/phpBB/styles/prosilver/template/message_body.html b/phpBB/styles/prosilver/template/message_body.html new file mode 100644 index 0000000000..1fb30a21cf --- /dev/null +++ b/phpBB/styles/prosilver/template/message_body.html @@ -0,0 +1,11 @@ + + +
    +
    +

    {MESSAGE_TITLE}

    +

    {MESSAGE_TEXT}

    +

    {L_RETURN_TO_SEARCH_ADV}

    +
    +
    + + \ No newline at end of file diff --git a/phpBB/styles/prosilver/template/overall_footer.html b/phpBB/styles/prosilver/template/overall_footer.html new file mode 100644 index 0000000000..05fc5087bd --- /dev/null +++ b/phpBB/styles/prosilver/template/overall_footer.html @@ -0,0 +1,50 @@ +
    + + + +
    + +
    + + {RUN_CRON_TASK} +
    + + + \ No newline at end of file diff --git a/phpBB/styles/prosilver/template/overall_header.html b/phpBB/styles/prosilver/template/overall_header.html new file mode 100644 index 0000000000..bb5ca7e35b --- /dev/null +++ b/phpBB/styles/prosilver/template/overall_header.html @@ -0,0 +1,175 @@ + + + + + + + + + + + + + +{META} +{SITENAME} • <!-- IF S_IN_MCP -->{L_MCP} • <!-- ELSEIF S_IN_UCP -->{L_UCP} • <!-- ENDIF -->{PAGE_TITLE} + + + + + + + + + + + + + + + + + + + + + +
    + + + + +
    + + +
    +
    + {L_INFORMATION}: {L_BOARD_DISABLED} +
    +
    + \ No newline at end of file diff --git a/phpBB/styles/prosilver/template/posting_attach_body.html b/phpBB/styles/prosilver/template/posting_attach_body.html new file mode 100644 index 0000000000..d39405487d --- /dev/null +++ b/phpBB/styles/prosilver/template/posting_attach_body.html @@ -0,0 +1,21 @@ +
    +
    + +

    {L_ADD_ATTACHMENT_EXPLAIN}

    + +
    +
    +
    +
    + + +
    +
    +
    +
    +
    +
    +
    + +
    +
    diff --git a/phpBB/styles/prosilver/template/posting_body.html b/phpBB/styles/prosilver/template/posting_body.html new file mode 100644 index 0000000000..73b82700c5 --- /dev/null +++ b/phpBB/styles/prosilver/template/posting_body.html @@ -0,0 +1,6 @@ + + + + + + diff --git a/phpBB/styles/prosilver/template/posting_buttons.html b/phpBB/styles/prosilver/template/posting_buttons.html new file mode 100644 index 0000000000..5f1f061532 --- /dev/null +++ b/phpBB/styles/prosilver/template/posting_buttons.html @@ -0,0 +1,121 @@ + + + + + + + +
    + + + + + + + + + + + + + + + + + + + + + + + + +
    + diff --git a/phpBB/styles/prosilver/template/posting_editor.html b/phpBB/styles/prosilver/template/posting_editor.html new file mode 100644 index 0000000000..0cf67c300b --- /dev/null +++ b/phpBB/styles/prosilver/template/posting_editor.html @@ -0,0 +1,259 @@ +
    +

    {ERROR}

    + + + +
    + + +
    +
    +
    + +
    + {to_recipient.NAME} {to_recipient.NAME_FULL}  +   + +
    +
    + + +
    +
    +
    + +
    + {bcc_recipient.NAME}{bcc_recipient.NAME_FULL}  +   + +
    +
    + +
    +
    +
    {L_FIND_USERNAME}
    +
    +
    +
    + +
    +

    {L_FIND_USERNAME}
    + +
    + +
    + {to_recipient.NAME}{to_recipient.NAME_FULL}  +   + +
    + + +
    +
    + + +
    + + +
    +
    +
    +
    +
    + + +
    + + + + +
    +
    +
    +
    + + + +
    +
    +
    + + +
    +
    + + + +
    +
    +
    +
    + + + +
    +
    +
    +
    + +
    +

    {L_CONFIRM_CODE_EXPLAIN}
    +
    {CONFIRM_IMAGE}
    +
    +
    + + + + + +
    + + {L_SMILIES}
    + + {smiley.SMILEY_CODE} + + + +
    {L_MORE_SMILIES} + + + +
    + {BBCODE_STATUS}
    + + {IMG_STATUS}
    + {FLASH_STATUS}
    + {URL_STATUS}
    + {SMILIES_STATUS} + + + +
    + {L_BACK_TO_DRAFTS} + {L_TOPIC_REVIEW} + +
    + +
    + +
    +
    + + + + +
    +
    + + + +
    +
    +

    {L_POSTED_ATTACHMENTS}

    + +
    + + +
    + +

    +
    {attach_row.FILENAME}
    +
    +
    +   + +
    +
    + {attach_row.S_HIDDEN} +
    + + +
    + +
    +
    + + + +
    +
    +
    + {S_HIDDEN_ADDRESS_FIELD} + {S_HIDDEN_FIELDS} +   +   + onclick="document.getElementById('postform').action += '#preview';" />  +   + +
    + +
    +
    + + + + + + + +
    +
    + +
    + +
    + + +
    + + +
    + + +
    + + +
    + + +
    + + +
    + + + +
    + + + +
    +
    +
    +
    + + + +
    +
    +
    +
    {L_STICK_TOPIC_FOR_EXPLAIN}
    +
    + + + +
    +
    +
    +
    + +
    + + + \ No newline at end of file diff --git a/phpBB/styles/prosilver/template/posting_layout.html b/phpBB/styles/prosilver/template/posting_layout.html new file mode 100644 index 0000000000..b5c5e7dcfd --- /dev/null +++ b/phpBB/styles/prosilver/template/posting_layout.html @@ -0,0 +1,90 @@ + + + +

    {TOPIC_TITLE}

    + +

    {FORUM_NAME}

    + + + +
    +
    + + + {L_FORUM_RULES} + + {L_FORUM_RULES}
    + {FORUM_RULES} + + +
    +
    + + +
    + + +
    +
    + +

    {L_INFORMATION}

    +

    {L_DRAFT_LOADED}

    + +
    +
    + + + + + + + +
    +
    +
    +

    {L_SELECT_DESTINATION_FORUM}

    +

    {L_UNGLOBALISE_EXPLAIN}

    +
    +
    +
    +
    + +
    +
     
    +
    +
    +
    + +
    +
    + + + + +
    +
    + +

    {L_POST_A}

    + + + + +
    +
    + + + + + + + +
    + + + + + diff --git a/phpBB/styles/prosilver/template/posting_pm_layout.html b/phpBB/styles/prosilver/template/posting_pm_layout.html new file mode 100644 index 0000000000..378c632858 --- /dev/null +++ b/phpBB/styles/prosilver/template/posting_pm_layout.html @@ -0,0 +1,33 @@ + + + +
    +
    + +

    {L_INFORMATION}

    +

    {L_DRAFT_LOADED_PM}

    + +
    +
    + + + + + + +

    {L_TITLE}

    + +
    +
    + + + + +
    +
    + + + + + + \ No newline at end of file diff --git a/phpBB/styles/prosilver/template/posting_poll_body.html b/phpBB/styles/prosilver/template/posting_poll_body.html new file mode 100644 index 0000000000..ca721748e9 --- /dev/null +++ b/phpBB/styles/prosilver/template/posting_poll_body.html @@ -0,0 +1,50 @@ +
    +
    + + +

    {L_ADD_POLL_EXPLAIN}

    + + +
    + +
    +
    +
    +
    +
    +

    {L_POLL_OPTIONS_EXPLAIN}
    +
    +
    + +
    + +
    +
    +
    +
    {L_POLL_MAX_OPTIONS_EXPLAIN}
    +
    +
    +
    +
    +
    {L_POLL_FOR_EXPLAIN}
    +
    + + +
    + +
    +
    +
    +
    + + + +
    +
    +
    +
    + +
    + +
    +
    diff --git a/phpBB/styles/prosilver/template/posting_preview.html b/phpBB/styles/prosilver/template/posting_preview.html new file mode 100644 index 0000000000..f2a5d635dc --- /dev/null +++ b/phpBB/styles/prosilver/template/posting_preview.html @@ -0,0 +1,49 @@ +
    +
    + + +
    +

    {L_PREVIEW}: {POLL_QUESTION}

    +

    {L_POLL_LENGTH}
    {L_MAX_VOTES}

    + +
    +
    + +
    +
    +
    checked="checked"/> checked="checked" />
    +
    + +
    +
    +
    + +
    +
    + +
    +
    + + + +
    +

    {L_PREVIEW}: {PREVIEW_SUBJECT}

    + +
    {PREVIEW_MESSAGE}
    + + +
    +
    {L_ATTACHMENTS}
    + +
    {attachment.DISPLAY_ATTACHMENT}
    + +
    + + +
    {PREVIEW_SIGNATURE}
    +
    + +
    +
    + +
    diff --git a/phpBB/styles/prosilver/template/posting_review.html b/phpBB/styles/prosilver/template/posting_review.html new file mode 100644 index 0000000000..5953ea11f9 --- /dev/null +++ b/phpBB/styles/prosilver/template/posting_review.html @@ -0,0 +1,29 @@ +

    {L_POST_REVIEW}

    + +

    {L_POST_REVIEW_EXPLAIN}

    + + +
    +
    + +
    +

    {post_review_row.POST_SUBJECT}

    +

    {post_review_row.MINI_POST_IMG}{post_review_row.MINI_POST_IMG} {L_POST_BY_AUTHOR} {post_review_row.POST_AUTHOR_FULL} {L_POSTED_ON_DATE} {post_review_row.POST_DATE}

    +
    {post_review_row.MESSAGE}
    + + +
    +
    {L_ATTACHMENTS}
    + +
    {post_review_row.attachment.DISPLAY_ATTACHMENT}
    + +
    + + +
    + +
    +
    + + +
    \ No newline at end of file diff --git a/phpBB/styles/prosilver/template/posting_smilies.html b/phpBB/styles/prosilver/template/posting_smilies.html new file mode 100644 index 0000000000..12f5cd3c77 --- /dev/null +++ b/phpBB/styles/prosilver/template/posting_smilies.html @@ -0,0 +1,22 @@ + + + + + +

    {L_SMILIES}

    +
    +
    + + {smiley.SMILEY_CODE} + + +
    +
    +{L_CLOSE_WINDOW} + + \ No newline at end of file diff --git a/phpBB/styles/prosilver/template/posting_topic_review.html b/phpBB/styles/prosilver/template/posting_topic_review.html new file mode 100644 index 0000000000..f3aa5d94d0 --- /dev/null +++ b/phpBB/styles/prosilver/template/posting_topic_review.html @@ -0,0 +1,47 @@ + +

    + {L_EXPAND_VIEW} + {L_TOPIC_REVIEW}: {TOPIC_TITLE} +

    + +
    + +
    +
    + +
    + + + + +

    {topic_review_row.POST_SUBJECT}

    +

    {topic_review_row.MINI_POST_IMG}{topic_review_row.MINI_POST_IMG} {L_POST_BY_AUTHOR} {topic_review_row.POST_AUTHOR_FULL} {L_POSTED_ON_DATE} {topic_review_row.POST_DATE}

    +
    {topic_review_row.MESSAGE}
    + + +
    +
    {L_ATTACHMENTS}
    + +
    {topic_review_row.attachment.DISPLAY_ATTACHMENT}
    + +
    + + + + + +
    +
    +
    + +
    + +
    + + +

    {L_BACK_TO_TOP}

    + +

    {L_BACK_TO_TOP}

    + \ No newline at end of file diff --git a/phpBB/styles/prosilver/template/report_body.html b/phpBB/styles/prosilver/template/report_body.html new file mode 100644 index 0000000000..ecd8a8a706 --- /dev/null +++ b/phpBB/styles/prosilver/template/report_body.html @@ -0,0 +1,50 @@ + + +

    {L_REPORT_POST}{L_REPORT_MESSAGE}

    + +
    +
    +
    + +
    +

    {L_REPORT_POST_EXPLAIN}{L_REPORT_MESSAGE_EXPLAIN}

    + +
    +
    +
    +
    +
    + +
    +

    {L_REPORT_NOTIFY_EXPLAIN}
    +
    + + +
    +
    + +
    +

    {L_CAN_LEAVE_BLANK}
    +
    +
    +
    +
    + +
    +
    + +
    +
    + +
    +
    +   + +
    +
    + +
    +
    +
    + + \ No newline at end of file diff --git a/phpBB/styles/prosilver/template/search_body.html b/phpBB/styles/prosilver/template/search_body.html new file mode 100644 index 0000000000..95390c2545 --- /dev/null +++ b/phpBB/styles/prosilver/template/search_body.html @@ -0,0 +1,120 @@ + + +

    {L_SEARCH}

    + +
    + +
    +
    +

    {L_SEARCH_QUERY}

    + +
    +
    +

    {L_SEARCH_KEYWORDS_EXPLAIN}
    +
    +
    +
    +
    +
    +

    {L_SEARCH_AUTHOR_EXPLAIN}
    +
    +
    +
    + +
    +
    + +
    +
    + +

    {L_SEARCH_OPTIONS}

    + +
    +
    +

    {L_SEARCH_FORUMS_EXPLAIN}
    +
    +
    +
    +
    +
    + + +
    +
    +
    +
    +
    +
    +
    +
    +
    + +
    + +
    +
    +
    + + +
    +
    +
    +
    +
    {S_SELECT_SORT_KEY}  + + +
    +
    +
    +
    +
    {S_SELECT_SORT_DAYS}
    +
    +
    +
    +
    {L_POST_CHARACTERS}
    +
    +
    + +
    +
    + +
    +
    + +
    + {S_HIDDEN_FIELDS}  + +
    + +
    +
    + +
    + +
    +
    + + + + + + + + + + + + + + + + + + + +
    {L_RECENT_SEARCHES}
    {recentsearch.KEYWORDS} {recentsearch.TIME}
    {L_NO_RECENT_SEARCHES}
    + +
    +
    + + \ No newline at end of file diff --git a/phpBB/styles/prosilver/template/search_results.html b/phpBB/styles/prosilver/template/search_results.html new file mode 100644 index 0000000000..adb955034f --- /dev/null +++ b/phpBB/styles/prosilver/template/search_results.html @@ -0,0 +1,161 @@ + + +

    {SEARCH_TITLE}{SEARCH_MATCHES}: {SEARCH_WORDS}

    +

    {L_IGNORED_TERMS}: {IGNORED_WORDS}

    + + +

    {L_RETURN_TO}: {SEARCH_TOPIC}

    + +

    {L_RETURN_TO_SEARCH_ADV}

    + + + +
    + +
    + + + + + + +
    + +
    + + + + + +
    + +
    +
      +
    • +
      +
      {L_TOPICS}
      +
      {L_REPLIES}
      +
      {L_VIEWS}
      +
      {L_LAST_POST}
      +
      +
    • +
    + + +
    +
    + +
    +
    + {L_NO_SEARCH_RESULTS} +
    +
    + + + + + +
    +
    + + +
    + {searchresults.L_IGNORE_POST} +
    + +
    +

    {searchresults.POST_SUBJECT}

    +
    {searchresults.MESSAGE}
    +
    + +
    +
    {L_POST_BY_AUTHOR} {searchresults.POST_AUTHOR_FULL}
    +
    {L_POSTED_ON_DATE} {searchresults.POST_DATE}
    +
     
    + +
    {L_FORUM}: {searchresults.FORUM_TITLE}
    +
    {L_TOPIC}: {searchresults.TOPIC_TITLE}
    + +
    {L_GLOBAL}: {searchresults.TOPIC_TITLE}
    + +
    {L_REPLIES}: {searchresults.TOPIC_REPLIES}
    +
    {L_VIEWS}: {searchresults.TOPIC_VIEWS}
    +
    + + + + + + +
    +
    + +
    +
    + {L_NO_SEARCH_RESULTS} +
    +
    + + + + +
    + +
    + {L_PREVIOUS} + {L_NEXT} + + + + +
    + +
    + +
    + + + + + + + + + \ No newline at end of file diff --git a/phpBB/styles/prosilver/template/simple_footer.html b/phpBB/styles/prosilver/template/simple_footer.html new file mode 100644 index 0000000000..e64e209368 --- /dev/null +++ b/phpBB/styles/prosilver/template/simple_footer.html @@ -0,0 +1,20 @@ +
    + + + +
    + + + \ No newline at end of file diff --git a/phpBB/styles/prosilver/template/simple_header.html b/phpBB/styles/prosilver/template/simple_header.html new file mode 100644 index 0000000000..a9f57df354 --- /dev/null +++ b/phpBB/styles/prosilver/template/simple_header.html @@ -0,0 +1,66 @@ + + + + + + + + + + + + + +{META} +{SITENAME} • <!-- IF S_IN_MCP -->{L_MCP} • <!-- ELSEIF S_IN_UCP -->{L_UCP} • <!-- ENDIF -->{PAGE_TITLE} + + + + + + + + + + + + + + + + + + + + +
    + +
    \ No newline at end of file diff --git a/phpBB/styles/prosilver/template/styleswitcher.js b/phpBB/styles/prosilver/template/styleswitcher.js new file mode 100644 index 0000000000..c68215d13f --- /dev/null +++ b/phpBB/styles/prosilver/template/styleswitcher.js @@ -0,0 +1,161 @@ + +function fontsizeup() +{ + var active = getActiveStyleSheet(); + + switch (active) + { + case 'A--': + setActiveStyleSheet('A-'); + break; + + case 'A-': + setActiveStyleSheet('A'); + break; + + case 'A': + setActiveStyleSheet('A+'); + break; + + case 'A+': + setActiveStyleSheet('A++'); + break; + + case 'A++': + setActiveStyleSheet('A'); + break; + + default: + setActiveStyleSheet('A'); + break; + } +} + +function fontsizedown() +{ + active = getActiveStyleSheet(); + + switch (active) + { + case 'A++' : + setActiveStyleSheet('A+'); + break; + + case 'A+' : + setActiveStyleSheet('A'); + break; + + case 'A' : + setActiveStyleSheet('A-'); + break; + + case 'A-' : + setActiveStyleSheet('A--'); + break; + + case 'A--' : + break; + + default : + setActiveStyleSheet('A--'); + break; + } +} + +function setActiveStyleSheet(title) +{ + var i, a, main; + + for (i = 0; (a = document.getElementsByTagName('link')[i]); i++) + { + if (a.getAttribute('rel').indexOf('style') != -1 && a.getAttribute('title')) + { + a.disabled = true; + if (a.getAttribute('title') == title) + { + a.disabled = false; + } + } + } +} + +function getActiveStyleSheet() +{ + var i, a; + + for (i = 0; (a = document.getElementsByTagName('link')[i]); i++) + { + if (a.getAttribute('rel').indexOf('style') != -1 && a.getAttribute('title') && !a.disabled) + { + return a.getAttribute('title'); + } + } + + return null; +} + +function getPreferredStyleSheet() +{ + return ('A-'); +} + +function createCookie(name, value, days) +{ + if (days) + { + var date = new Date(); + date.setTime(date.getTime() + (days*24*60*60*1000)); + var expires = '; expires=' + date.toGMTString(); + } + else + { + expires = ''; + } + + document.cookie = name + '=' + value + expires + '; path=/'; +} + +function readCookie(name) +{ + var nameEQ = name + '='; + var ca = document.cookie.split(';'); + + for (var i = 0; i < ca.length; i++) + { + var c = ca[i]; + + while (c.charAt(0) == ' ') + { + c = c.substring(1, c.length); + } + + if (c.indexOf(nameEQ) == 0) + { + return c.substring(nameEQ.length, c.length); + } + } + + return null; +} + +function load_cookie() +{ + var cookie = readCookie('style_cookie'); + var title = cookie ? cookie : getPreferredStyleSheet(); + setActiveStyleSheet(title); +} + +function unload_cookie() +{ + var title = getActiveStyleSheet(); + createCookie('style_cookie', title, 365); +} + +onload_functions.push('load_cookie()'); +onunload_functions.push('unload_cookie()'); + +/* +var cookie = readCookie("style"); +var title = cookie ? cookie : getPreferredStyleSheet(); +setActiveStyleSheet(title); +*/ diff --git a/phpBB/styles/prosilver/template/template.cfg b/phpBB/styles/prosilver/template/template.cfg new file mode 100644 index 0000000000..1251dcdce2 --- /dev/null +++ b/phpBB/styles/prosilver/template/template.cfg @@ -0,0 +1,25 @@ +# +# phpBB Template Configuration File +# +# @package phpBB3 +# @copyright (c) 2006 phpBB Group +# @license http://opensource.org/licenses/gpl-license.php GNU Public License +# +# +# At the left is the name, please do not change this +# At the right the value is entered +# For on/off options the valid values are on, off, 1, 0, true and false +# +# Values get trimmed, if you want to add a space in front or at the end of +# the value, then enclose the value with single or double quotes. +# Single and double quotes do not need to be escaped. +# +# + +# General Information about this template +name = prosilver +copyright = © phpBB Group, 2007 +version = 3.0.0 + +# Defining a different template bitfield +template_bitfield = lNg= diff --git a/phpBB/styles/prosilver/template/ucp_agreement.html b/phpBB/styles/prosilver/template/ucp_agreement.html new file mode 100644 index 0000000000..e2b7312e33 --- /dev/null +++ b/phpBB/styles/prosilver/template/ucp_agreement.html @@ -0,0 +1,47 @@ + + + + +
    + +
    +
    +
    +

    {SITENAME} - {L_REGISTRATION}

    +

    {L_COPPA_BIRTHDAY}{L_TERMS_OF_USE}

    +
    +
    +
    + +
    +
    +
    + + {L_COPPA_NO}  {L_COPPA_YES} + +   + + +
    +
    +
    + + {S_HIDDEN_FIELDS} +
    + + + +
    +
    +
    +

    {SITENAME} - {AGREEMENT_TITLE}

    +

    {AGREEMENT_TEXT}

    +
    +

    {L_BACK}

    +
    +
    +
    + + + + \ No newline at end of file diff --git a/phpBB/styles/prosilver/template/ucp_attachments.html b/phpBB/styles/prosilver/template/ucp_attachments.html new file mode 100644 index 0000000000..9c4701c1ee --- /dev/null +++ b/phpBB/styles/prosilver/template/ucp_attachments.html @@ -0,0 +1,79 @@ + + +
    + +

    {L_TITLE}

    + +
    +
    + +

    {L_ATTACHMENTS_EXPLAIN}

    + + + + + + + +
    + {L_NEXT} + {L_PREVIOUS} + + + +
    + +
    + + + +

    {L_UCP_NO_ATTACHMENTS}

    + + +
    +
    + + +
    + + +
    + + +
    + + \ No newline at end of file diff --git a/phpBB/styles/prosilver/template/ucp_avatar_options.html b/phpBB/styles/prosilver/template/ucp_avatar_options.html new file mode 100644 index 0000000000..d43e76e584 --- /dev/null +++ b/phpBB/styles/prosilver/template/ucp_avatar_options.html @@ -0,0 +1,70 @@ + +
    +
    + +

    {L_AVATAR_FEATURES_DISABLED}

    + + +
    +

    {ERROR}

    +
    +

    {L_AVATAR_EXPLAIN}
    +
    {AVATAR}
    +
    +
    + + +
    +
    +
    +
    + + + +
    +

    {L_UPLOAD_AVATAR_URL_EXPLAIN}
    +
    +
    + + + +
    +

    {L_LINK_REMOTE_AVATAR_EXPLAIN}
    +
    +
    +
    +

    {L_LINK_REMOTE_SIZE_EXPLAIN}
    +
    + ×  + +
    +
    + +
    + + +
    +
    + +
    +
    + +

    {L_AVATAR_GALLERY}

    + +
    + + + +
    + + + + + +
    +
    diff --git a/phpBB/styles/prosilver/template/ucp_footer.html b/phpBB/styles/prosilver/template/ucp_footer.html new file mode 100644 index 0000000000..ce28ae7c4e --- /dev/null +++ b/phpBB/styles/prosilver/template/ucp_footer.html @@ -0,0 +1,14 @@ + +
    +
    + +
    + + + + + + + + + \ No newline at end of file diff --git a/phpBB/styles/prosilver/template/ucp_groups_manage.html b/phpBB/styles/prosilver/template/ucp_groups_manage.html new file mode 100644 index 0000000000..318c97d497 --- /dev/null +++ b/phpBB/styles/prosilver/template/ucp_groups_manage.html @@ -0,0 +1,240 @@ + + +

    {L_USERGROUPS}

    + +
    + +
    +
    + +

    {L_GROUPS_EXPLAIN}

    + + +

    {L_GROUP_DETAILS}

    + + + + +
    +

    {L_WARNING}

    +

    {ERROR_MSG}

    +
    + + +
    +
    +
    +
    style="color: #{GROUP_COLOUR};">{GROUP_NAME} +
    +
    +
    +
    +
    +
      
    +
    + +
    +

    {L_GROUP_TYPE_EXPLAIN}
    +
    + + + + +
    +
    + + + +
    + +
    +
    + +
    +
    +

    {L_GROUP_SETTINGS_SAVE}

    + +
    +
    +

    {L_GROUP_COLOR_EXPLAIN}
    +
        [ {L_COLOUR_SWATCH} ]
    +
    +
    +
    +
    +
    +
    + +
    +
    + + + +
    + {S_HIDDEN_FIELDS} +   +   +   + +
    + + + + + + + + + + + + + + + + + + + + + + + + +
    {L_GROUP_LEAD}{L_GROUP_DEFAULT}{L_POSTS}{L_JOINED}{L_MARK}
    {leader.USERNAME}{L_YES}{L_NO}{leader.USER_POSTS}{leader.JOINED} 
    + + + + + + + + + + + + + + + +
    {L_GROUP_APPROVED}{L_GROUP_DEFAULT}{L_POSTS}{L_JOINED}{L_MARK}
    + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    {L_GROUP_PENDING}{L_GROUP_DEFAULT}{L_POSTS}{L_JOINED}{L_MARK}
    {member.USERNAME}{L_YES}{L_NO}{member.USER_POSTS}{member.JOINED}
    {L_GROUPS_NO_MEMBERS}
    + + + + + + +
    + + + +
    + +
    +
    + +

    {L_ADD_USERS}

    + +

    {L_ADD_USERS_EXPLAIN}

    + +
    +
    +

    {L_USER_GROUP_DEFAULT_EXPLAIN}
    +
    + + +
    +
    +
    +

    {L_USERNAMES_EXPLAIN}
    +
    +
    {L_FIND_USERNAME}
    +
    +
    + +
    +
    + +
    + +
    + + + + +
      +
    • +
      +
      {L_GROUP_LEADER}
      +
      {L_OPTIONS}
      +
      +
    • +
    + + +

    {L_NO_LEADERS}

    + + + + + + + +
    + + \ No newline at end of file diff --git a/phpBB/styles/prosilver/template/ucp_groups_membership.html b/phpBB/styles/prosilver/template/ucp_groups_membership.html new file mode 100644 index 0000000000..b40f6d6b18 --- /dev/null +++ b/phpBB/styles/prosilver/template/ucp_groups_membership.html @@ -0,0 +1,164 @@ + + +

    {L_USERGROUPS}

    + +
    + +
    +
    + +

    {L_GROUPS_EXPLAIN}

    + + +
      +
    • +
      +
      {L_GROUP_LEADER}
      +
      {L_SELECT}
      +
      +
    • +
    + + + + +
      +
    • +
      +
      {L_GROUP_MEMBER}
      +
      {L_SELECT}
      +
      +
    • +
    + + +
    +
    + + +
    +
    +
      +
    • +
      +
      {L_GROUP_PENDING}
      +
      {L_SELECT}
      +
      +
    • +
    + +
    +
    + + +
    +
    +
      +
    • +
      +
      {L_GROUP_NONMEMBER}
      +
      {L_SELECT}
      +
      +
    • +
    + +
    +
    + + + + +
    + +
    + +
    + + + +
    + +   + +
    + +
    + + + + +
    + + \ No newline at end of file diff --git a/phpBB/styles/prosilver/template/ucp_header.html b/phpBB/styles/prosilver/template/ucp_header.html new file mode 100644 index 0000000000..151a3f04d2 --- /dev/null +++ b/phpBB/styles/prosilver/template/ucp_header.html @@ -0,0 +1,101 @@ + + +

    {L_UCP}

    + +
    + +
    + + +
    + + +
    +
    + +
    + +
    + + + +
    +
    + +
    +
    {L_FRIENDS}
    + + +
    {friends_online.USERNAME_FULL}
    + + + +
    {friends_offline.USERNAME_FULL}
    + +
    + +
    +
    + + + +
    +
    + +
    +
    {L_MESSAGE_COLOURS}
    + +
    {pm_colour_info.IMG} {pm_colour_info.LANG}
    + +
    + +
    +
    + + +
    + +
    diff --git a/phpBB/styles/prosilver/template/ucp_main_bookmarks.html b/phpBB/styles/prosilver/template/ucp_main_bookmarks.html new file mode 100644 index 0000000000..7d59df1a02 --- /dev/null +++ b/phpBB/styles/prosilver/template/ucp_main_bookmarks.html @@ -0,0 +1,75 @@ + + + + +

    {L_TITLE}

    + +
    +
    + +

    {L_BOOKMARKS_EXPLAIN}

    + + +

    {L_BOOKMARKS_DISABLED}

    + + + +
      +
    • +
      +
      {L_BOOKMARKS}
      +
      {L_LAST_POST}
      +
      +
    • +
    + + + +

    {L_NO_BOOKMARKS}

    + + + + +
    +
    + + +
    + + +
    + + + + + \ No newline at end of file diff --git a/phpBB/styles/prosilver/template/ucp_main_drafts.html b/phpBB/styles/prosilver/template/ucp_main_drafts.html new file mode 100644 index 0000000000..b60e478ce3 --- /dev/null +++ b/phpBB/styles/prosilver/template/ucp_main_drafts.html @@ -0,0 +1,70 @@ + + +
    + +

    {L_TITLE}

    + +
    +
    + +

    {L_DRAFTS_EXPLAIN}

    + + + + +
    +
    + +
    + {S_HIDDEN_FIELDS}  + +
    + + + + +
      +
    • +
      +
      {L_DRAFT_TITLE}
      +
      {L_SAVE_DATE}
      +
      {L_MARK}
      +
      +
    • +
    + + +

    {L_NO_SAVED_DRAFTS}

    + + +
    +
    + + +
    + + +
    + + + + + + \ No newline at end of file diff --git a/phpBB/styles/prosilver/template/ucp_main_front.html b/phpBB/styles/prosilver/template/ucp_main_front.html new file mode 100644 index 0000000000..d49166fe62 --- /dev/null +++ b/phpBB/styles/prosilver/template/ucp_main_front.html @@ -0,0 +1,45 @@ + + +

    {L_TITLE}

    + +
    +
    + +

    {L_UCP_WELCOME}

    + + +

    {L_IMPORTANT_NEWS}

    + +
      + +
    • +
      +
      style="background-image: url({T_ICONS_PATH}{topicrow.TOPIC_ICON_IMG});"> + {NEWEST_POST_IMG} {topicrow.TOPIC_TITLE}
      + {topicrow.PAGINATION} + {topicrow.ATTACH_ICON_IMG} {L_POST_BY_AUTHOR} {topicrow.TOPIC_AUTHOR_FULL} {L_POSTED_ON_DATE} {topicrow.FIRST_POST_TIME} +
      +
      {L_LAST_POST} {L_POST_BY_AUTHOR} {topicrow.LAST_POST_AUTHOR_FULL} + {LAST_POST_IMG}
      {L_POSTED_ON_DATE} {topicrow.LAST_POST_TIME}
      +
      +
      +
    • + +
    + + +

    {L_YOUR_DETAILS}

    + +
    +
    {L_JOINED}:
    {JOINED}
    +
    {L_VISITED}:
    {LAST_VISIT_YOU}
    +
    {L_TOTAL_POSTS}:
    {POSTS} | {L_SEARCH_YOUR_POSTS}
    ({POSTS_DAY} / {POSTS_PCT}){POSTS}
    +
    {L_ACTIVE_IN_FORUM}:
    {ACTIVE_FORUM}
    ({ACTIVE_FORUM_POSTS} / {ACTIVE_FORUM_PCT}) -
    +
    {L_ACTIVE_IN_TOPIC}:
    {ACTIVE_TOPIC}
    ({ACTIVE_TOPIC_POSTS} / {ACTIVE_TOPIC_PCT}) -
    +
    {L_YOUR_WARNINGS}:
    {WARNING_IMG} [{WARNINGS}]
    +
    + +
    +
    + + \ No newline at end of file diff --git a/phpBB/styles/prosilver/template/ucp_main_subscribed.html b/phpBB/styles/prosilver/template/ucp_main_subscribed.html new file mode 100644 index 0000000000..d806507e06 --- /dev/null +++ b/phpBB/styles/prosilver/template/ucp_main_subscribed.html @@ -0,0 +1,90 @@ + + +
    + +

    {L_TITLE}

    +
    +
    + +

    {L_WATCHED_EXPLAIN}

    + + +
      +
    • +
      +
      {L_WATCHED_FORUMS}
      +
      {L_MARK}
      +
      +
    • +
    + + +

    {L_NO_WATCHED_FORUMS}

    + + + +
      +
    • +
      +
      {L_WATCHED_TOPICS}
      +
      {L_LAST_POST}
      +
      +
    • +
    + + + +

    {L_NO_WATCHED_TOPICS}

    + + +
    +
    + + +
    + + +
    + + +
    + + \ No newline at end of file diff --git a/phpBB/styles/prosilver/template/ucp_pm_history.html b/phpBB/styles/prosilver/template/ucp_pm_history.html new file mode 100644 index 0000000000..3c18462b8e --- /dev/null +++ b/phpBB/styles/prosilver/template/ucp_pm_history.html @@ -0,0 +1,33 @@ + +

    + {L_EXPAND_VIEW} + {L_MESSAGE_HISTORY}: {TITLE} +

    + +
    + +
    +
    + +
    + + + + +

    class="current">{history_row.SUBJECT}

    +

    {history_row.MINI_POST_IMG} {L_SENT_AT}: {history_row.SENT_DATE}
    + {L_MESSAGE_BY_AUTHOR} {history_row.MESSAGE_AUTHOR_FULL}

    +
    + {history_row.MESSAGE} +
    +
    + +
    +
    + +
    + +
    +

    {L_BACK_TO_TOP}

    diff --git a/phpBB/styles/prosilver/template/ucp_pm_message_footer.html b/phpBB/styles/prosilver/template/ucp_pm_message_footer.html new file mode 100644 index 0000000000..18ba5216bf --- /dev/null +++ b/phpBB/styles/prosilver/template/ucp_pm_message_footer.html @@ -0,0 +1,2 @@ + + diff --git a/phpBB/styles/prosilver/template/ucp_pm_message_header.html b/phpBB/styles/prosilver/template/ucp_pm_message_header.html new file mode 100644 index 0000000000..4a026fccac --- /dev/null +++ b/phpBB/styles/prosilver/template/ucp_pm_message_header.html @@ -0,0 +1,29 @@ +

    {L_TITLE}: {CUR_FOLDER_NAME}

    + +
    + +
    +
    + +

    {FOLDER_STATUS}

    + + diff --git a/phpBB/styles/prosilver/template/ucp_pm_options.html b/phpBB/styles/prosilver/template/ucp_pm_options.html new file mode 100644 index 0000000000..8e2626a29a --- /dev/null +++ b/phpBB/styles/prosilver/template/ucp_pm_options.html @@ -0,0 +1,131 @@ + + +

    {L_TITLE}

    + + + +
    +
    + +

    {ERROR_MESSAGE}

    +

    {NOTIFICATION_MESSAGE}

    + +

    {L_DEFINED_RULES}

    + +
      + +
    1. {L_IF} {rule.CHECK} {rule.RULE} {rule.STRING} | {rule.ACTION}: {rule.FOLDER}
    2. + +
    3. {L_NO_RULES_DEFINED}
    4. + +
    + +

    {L_ADD_NEW_RULE}

    + +
    + + +
    +
    for="check_option">{L_IF}:
    +
    + {CHECK_CURRENT} +
    +
    + + + +
    +
    +
    {RULE_CURRENT}
    +
    + + + + +
    +
    +
    + + + + +  [ {L_FIND_USERNAME} ] + + {L_NO_GROUPS} + + + + {COND_CURRENT} + +
    +
    + + + + + + + + +
    +
    +
    {ACTION_CURRENT}
    +
    + + +
    + +

    {L_FOLDER_OPTIONS}

    + +
    + + +
    +
    +
    {L_MAX_FOLDER_REACHED}
    +
    +
    + + + + + +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    + + +
    + +
    +
    +
    +
    +
    +
    + + +
    +

    {L_DEFAULT_ACTION_EXPLAIN}
    +
    {DEFAULT_ACTION}
    +
    +
    +
    + +
    +
    + + + + \ No newline at end of file diff --git a/phpBB/styles/prosilver/template/ucp_pm_popup.html b/phpBB/styles/prosilver/template/ucp_pm_popup.html new file mode 100644 index 0000000000..44012a9b65 --- /dev/null +++ b/phpBB/styles/prosilver/template/ucp_pm_popup.html @@ -0,0 +1,25 @@ + + + + +
    +
    +
    +

    {L_LOGIN_CHECK_PM}{MESSAGE}

    {CLICK_TO_VIEW}

    +

    {L_CLOSE_WINDOW}

    +
    +
    +
    + + \ No newline at end of file diff --git a/phpBB/styles/prosilver/template/ucp_pm_viewfolder.html b/phpBB/styles/prosilver/template/ucp_pm_viewfolder.html new file mode 100644 index 0000000000..3704d8e84b --- /dev/null +++ b/phpBB/styles/prosilver/template/ucp_pm_viewfolder.html @@ -0,0 +1,123 @@ + + + + + + + + +

    {L_EXPORT_AS_CSV}

    +
    +
    +
    +

    {L_OPTIONS}

    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    + +   +   +
    +
    + + + + +
    +

    {RULE_REMOVED_MESSAGES}

    +
    + + + +
    +

    {NOT_MOVED_MESSAGES}
    {RELEASE_MESSAGE_INFO}

    +
    + + + +
      +
    • +
      +
      {L_MESSAGE}
      +
      {L_MARK}
      +
      +
    • +
    +
      + + +
    • +
      + style="background-image: url({messagerow.PM_ICON_URL});"> + + + {L_DELETE_MESSAGE}
      + {L_MESSAGE_REMOVED_FROM_OUTBOX} + + {messagerow.SUBJECT} + + +
      {L_PM_FROM_REMOVED_AUTHOR} + + + {REPORTED_IMG} {messagerow.ATTACH_ICON_IMG}
      + {L_MESSAGE_TO} {messagerow.RECIPIENTS}{L_MESSAGE_BY_AUTHOR} {messagerow.MESSAGE_AUTHOR_FULL} {L_MESSAGE_SENT_ON} {messagerow.SENT_TIME} + +
      {L_SENT_AT} {messagerow.SENT_TIME}
      +
      {messagerow.FOLDER}{L_UNKNOWN_FOLDER}
      +
      +
      +
    • + + +
    + +

    {L_NO_MESSAGES}

    + + + +
    +

    + + +
    + +
    + + + + +
    +
    + + +
    + {L_PREVIOUS} + {L_NEXT} + + + + +
    + + + + + \ No newline at end of file diff --git a/phpBB/styles/prosilver/template/ucp_pm_viewmessage.html b/phpBB/styles/prosilver/template/ucp_pm_viewmessage.html new file mode 100644 index 0000000000..904605485d --- /dev/null +++ b/phpBB/styles/prosilver/template/ucp_pm_viewmessage.html @@ -0,0 +1,112 @@ + + + + +
    +
    + + +
    + {L_VIEW_PREVIOUS_HISTORY} + {L_VIEW_NEXT_HISTORY} +
    + + + +
    +
    + +
    + + + + + +

    {SUBJECT}

    + +

    + {L_SENT_AT}: {SENT_DATE} +
    {L_PM_FROM}: {MESSAGE_AUTHOR_FULL} +
    {L_TO}: {to_recipient.NAME} +
    {L_BCC}: {bcc_recipient.NAME} +

    + + +
    {MESSAGE}
    + + +
    +
    {L_ATTACHMENTS}
    + +
    {attachment.DISPLAY_ATTACHMENT}
    + +
    + + + +
    {L_DOWNLOAD_NOTICE}
    + + + +
    {EDITED_MESSAGE} +
    {L_REASON}: {EDIT_REASON} +
    + + + +
    {SIGNATURE}
    + +
    + +
    +
    {AUTHOR_AVATAR}
    {MESSAGE_AUTHOR_FULL}
    +
    {RANK_TITLE}
    +
    {RANK_IMG}
    +
     
    +
    {L_POSTS}: {AUTHOR_POSTS}
    +
    {L_JOINED}: {AUTHOR_JOINED}
    +
    {L_LOCATION}: {AUTHOR_FROM}
    + + +
    + +
    + +
    + + + +
    +
    + + +
    + {L_VIEW_PREVIOUS_PM} + {L_VIEW_NEXT_PM} + +   + + + + +
    + + + + + + + \ No newline at end of file diff --git a/phpBB/styles/prosilver/template/ucp_pm_viewmessage_print.html b/phpBB/styles/prosilver/template/ucp_pm_viewmessage_print.html new file mode 100644 index 0000000000..29a732f847 --- /dev/null +++ b/phpBB/styles/prosilver/template/ucp_pm_viewmessage_print.html @@ -0,0 +1,130 @@ + + + + + + +{SITENAME} :: {PAGE_TITLE} + + + + + + + + + + + + + + + + + +
    {SITENAME}
    {L_PRIVATE_MESSAGING}

    {SUBJECT}
    {PAGE_NUMBER}
    + +
    + + + + + + + + + + + + + + + + + + + + + + + +
    {L_PM_FROM}: {MESSAGE_AUTHOR} [ {SENT_DATE} ]
    {L_TO}: + + class="sep">{to_recipient.NAME}  + +
    {L_BCC}: + + class="sep">{bcc_recipient.NAME}  + +

    {MESSAGE}
    + +
    + + + + + + + + + + +
    {PAGE_NUMBER}{S_TIMEZONE}
    Powered by phpBB {PHPBB_VERSION} © 2000, 2002, 2005, 2007 phpBB Group
    http://www.phpbb.com/
    + + + \ No newline at end of file diff --git a/phpBB/styles/prosilver/template/ucp_prefs_personal.html b/phpBB/styles/prosilver/template/ucp_prefs_personal.html new file mode 100644 index 0000000000..b8c70841d7 --- /dev/null +++ b/phpBB/styles/prosilver/template/ucp_prefs_personal.html @@ -0,0 +1,143 @@ + + +
    + +

    {L_TITLE}

    + +
    +
    + +
    +

    {ERROR}

    +
    +
    +
    + + +
    +
    +
    +
    +
    + + +
    +
    +
    +

    {L_ALLOW_PM_EXPLAIN}
    +
    + + +
    +
    + +
    +
    +
    + + +
    +
    + + +
    +
    +
    + + + +
    +
    + +
    +
    +
    + + +
    +
    +
    +
    +
    + + +
    +
    +
    +
    +
    +
    + +
    +
    +
    +
    + +
    +
    +
    +
    +
    +
    +
    + + +
    +
    +
    +

    {L_BOARD_DATE_FORMAT_EXPLAIN}
    +
    + +
    + +
    +
    + +
    +
    + +
    + {S_HIDDEN_FIELDS}  + +
    + +
    + + + + \ No newline at end of file diff --git a/phpBB/styles/prosilver/template/ucp_prefs_post.html b/phpBB/styles/prosilver/template/ucp_prefs_post.html new file mode 100644 index 0000000000..87f906d245 --- /dev/null +++ b/phpBB/styles/prosilver/template/ucp_prefs_post.html @@ -0,0 +1,51 @@ + + +
    + +

    {L_TITLE}

    +
    +
    + +
    +

    {ERROR}

    +
    +
    +
    + + +
    +
    +
    +
    +
    + + +
    +
    +
    +
    +
    + + +
    +
    +
    +
    +
    + + +
    +
    +
    + +
    +
    + +
    + {S_HIDDEN_FIELDS}  + +
    + +
    + + \ No newline at end of file diff --git a/phpBB/styles/prosilver/template/ucp_prefs_view.html b/phpBB/styles/prosilver/template/ucp_prefs_view.html new file mode 100644 index 0000000000..b33d6f748b --- /dev/null +++ b/phpBB/styles/prosilver/template/ucp_prefs_view.html @@ -0,0 +1,94 @@ + + +
    + +

    {L_TITLE}

    + +
    +
    + +
    +

    {ERROR}

    +
    +
    +
    + + +
    +
    +
    +
    +
    + + +
    +
    +
    +
    +
    + + +
    +
    +
    +
    +
    + + +
    +
    +
    +
    +
    + + +
    +
    + +
    +
    +
    + + +
    +
    + +
    +
    +
    +
    {S_TOPIC_SORT_DAYS}
    +
    +
    +
    +
    {S_TOPIC_SORT_KEY}
    +
    +
    +
    +
    {S_TOPIC_SORT_DIR}
    +
    +
    +
    +
    +
    {S_POST_SORT_DAYS}
    +
    +
    +
    +
    {S_POST_SORT_KEY}
    +
    +
    +
    +
    {S_POST_SORT_DIR}
    +
    +
    + +
    +
    + +
    + {S_HIDDEN_FIELDS}  + +
    + +
    + + \ No newline at end of file diff --git a/phpBB/styles/prosilver/template/ucp_profile_avatar.html b/phpBB/styles/prosilver/template/ucp_profile_avatar.html new file mode 100644 index 0000000000..e5a8d59677 --- /dev/null +++ b/phpBB/styles/prosilver/template/ucp_profile_avatar.html @@ -0,0 +1,19 @@ + + +
    + +

    {L_TITLE}

    + + + +
    + {S_HIDDEN_FIELDS} +   +   +   + +
    + +
    + + \ No newline at end of file diff --git a/phpBB/styles/prosilver/template/ucp_profile_profile_info.html b/phpBB/styles/prosilver/template/ucp_profile_profile_info.html new file mode 100644 index 0000000000..7ae6fd054b --- /dev/null +++ b/phpBB/styles/prosilver/template/ucp_profile_profile_info.html @@ -0,0 +1,77 @@ + + +
    + +

    {L_TITLE}

    + +
    +
    +

    {L_PROFILE_INFO_NOTICE}

    + +
    +

    {ERROR}

    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +

    {L_BIRTHDAY_EXPLAIN}
    +
    + + + +
    +
    + +
    +
    +
    {profile_fields.LANG_EXPLAIN}
    +
    {profile_fields.ERROR}
    +
    {profile_fields.FIELD}
    +
    + +
    + +
    +
    + +
    + {S_HIDDEN_FIELDS}  + +
    + +
    + + \ No newline at end of file diff --git a/phpBB/styles/prosilver/template/ucp_profile_reg_details.html b/phpBB/styles/prosilver/template/ucp_profile_reg_details.html new file mode 100644 index 0000000000..5c63c5144b --- /dev/null +++ b/phpBB/styles/prosilver/template/ucp_profile_reg_details.html @@ -0,0 +1,63 @@ + + +
    + +

    {L_TITLE}

    +
    +
    + + +

    {L_FORCE_PASSWORD_EXPLAIN}

    + + +
    +

    {ERROR}

    +
    +

    {L_USERNAME_EXPLAIN}
    +
    {USERNAME}
    +
    +
    +

    {L_USERNAME_EXPLAIN}
    +
    {EMAIL}
    +
    + +
    +

    {L_CONFIRM_EMAIL_EXPLAIN}
    +
    +
    + + +
    +

    {L_CHANGE_PASSWORD_EXPLAIN}
    +
    +
    +
    +

    {L_CONFIRM_PASSWORD_EXPLAIN}
    +
    +
    + +
    +
    +
    + +
    +
    + +
    +
    +

    {L_CURRENT_PASSWORD_EXPLAIN}
    +
    +
    +
    + +
    +
    + +
    + {S_HIDDEN_FIELDS}  + +
    + +
    + + \ No newline at end of file diff --git a/phpBB/styles/prosilver/template/ucp_profile_signature.html b/phpBB/styles/prosilver/template/ucp_profile_signature.html new file mode 100644 index 0000000000..f1015cc820 --- /dev/null +++ b/phpBB/styles/prosilver/template/ucp_profile_signature.html @@ -0,0 +1,51 @@ + + +
    + +

    {L_TITLE}

    + + +
    +
    +

    {L_SIGNATURE_PREVIEW}

    +
    +
    {SIGNATURE_PREVIEW}
    +
    +
    +
    + + +
    +
    + +

    {L_SIGNATURE_EXPLAIN}

    + + + +

    {L_OPTIONS}

    +
    + +
    + + +
    + + +
    + + +
    + +
    +
    + +
    + {S_HIDDEN_FIELDS} +   +   + +
    + +
    + + \ No newline at end of file diff --git a/phpBB/styles/prosilver/template/ucp_register.html b/phpBB/styles/prosilver/template/ucp_register.html new file mode 100644 index 0000000000..2bb8272337 --- /dev/null +++ b/phpBB/styles/prosilver/template/ucp_register.html @@ -0,0 +1,123 @@ + + + + +
    + +
    +
    + +

    {SITENAME} - {L_REGISTRATION}

    + +
    +
    {ERROR}
    + +
    {L_REG_COND}
    + + +
    {L_ITEMS_REQUIRED}
    + + +
    +

    {L_USERNAME_EXPLAIN}
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +

    {L_PASSWORD_EXPLAIN}
    +
    +
    +
    +
    +
    +
    + +
    + +
    +
    +
    +
    +
    +
    +
    +
    + + +
    +
    +
    {profile_fields.LANG_EXPLAIN} +
    {profile_fields.ERROR}
    +
    {profile_fields.FIELD}
    +
    + +
    + + +
    +
    + +
    +
    + +

    {L_CONFIRMATION}

    +

    {L_CONFIRM_EXPLAIN}

    + +
    +
    +
    +
    {CONFIRM_IMG}
    +
    +
    {L_CONFIRM_CODE_EXPLAIN}
    +
    +
    + + + +
    +
    + +
    +
    + +

    {L_COPPA_COMPLIANCE}

    + +

    {L_COPPA_EXPLAIN}

    + + +
    +
    + +
    +
    + +
    + {S_HIDDEN_FIELDS} +   + +
    + +
    +
    + +
    + + \ No newline at end of file diff --git a/phpBB/styles/prosilver/template/ucp_remind.html b/phpBB/styles/prosilver/template/ucp_remind.html new file mode 100644 index 0000000000..971bc36344 --- /dev/null +++ b/phpBB/styles/prosilver/template/ucp_remind.html @@ -0,0 +1,31 @@ + + +
    + +
    +
    + +
    +

    {L_SEND_PASSWORD}

    + +
    +
    +
    +
    +
    +
    +

    {L_EMAIL_REMIND}
    +
    +
    +
    +
     
    +
    {S_HIDDEN_FIELDS} 
    +
    +
    +
    + +
    +
    +
    + + \ No newline at end of file diff --git a/phpBB/styles/prosilver/template/ucp_resend.html b/phpBB/styles/prosilver/template/ucp_resend.html new file mode 100644 index 0000000000..01e8312bc8 --- /dev/null +++ b/phpBB/styles/prosilver/template/ucp_resend.html @@ -0,0 +1,32 @@ + + + +
    + +
    +
    + +
    +

    {L_UCP_RESEND}

    + +
    +
    +
    +
    +
    +
    +

    {L_EMAIL_REMIND}
    +
    +
    +
    +
     
    +
    {S_HIDDEN_FIELDS} 
    +
    +
    +
    + +
    +
    +
    + + \ No newline at end of file diff --git a/phpBB/styles/prosilver/template/ucp_zebra_foes.html b/phpBB/styles/prosilver/template/ucp_zebra_foes.html new file mode 100644 index 0000000000..e580e3c1c9 --- /dev/null +++ b/phpBB/styles/prosilver/template/ucp_zebra_foes.html @@ -0,0 +1,41 @@ + + +
    + +

    {L_TITLE}

    + +
    +
    + +

    {L_FOES_EXPLAIN}

    + +
    +

    {ERROR}

    +
    +

    {L_YOUR_FOES_EXPLAIN}
    +
    + + + + {L_NO_FOES} + +
    +
    +
    +

    {L_ADD_FOES_EXPLAIN}
    +
    +
    {L_FIND_USERNAME}
    +
    +
    + +
    +
    + +
    + {S_HIDDEN_FIELDS}  + +
    + +
    + + \ No newline at end of file diff --git a/phpBB/styles/prosilver/template/ucp_zebra_friends.html b/phpBB/styles/prosilver/template/ucp_zebra_friends.html new file mode 100644 index 0000000000..ffd60e3bf1 --- /dev/null +++ b/phpBB/styles/prosilver/template/ucp_zebra_friends.html @@ -0,0 +1,41 @@ + + +
    + +

    {L_TITLE}

    + +
    +
    + +

    {L_FRIENDS_EXPLAIN}

    + +
    +

    {ERROR}

    +
    +

    {L_YOUR_FRIENDS_EXPLAIN}
    +
    + + + + {L_NO_FRIENDS} + +
    +
    +
    +

    {L_ADD_FRIENDS_EXPLAIN}
    +
    +
    {L_FIND_USERNAME}
    +
    +
    + +
    +
    + +
    + {S_HIDDEN_FIELDS}  + +
    + +
    + + \ No newline at end of file diff --git a/phpBB/styles/prosilver/template/viewforum_body.html b/phpBB/styles/prosilver/template/viewforum_body.html new file mode 100644 index 0000000000..1049617f66 --- /dev/null +++ b/phpBB/styles/prosilver/template/viewforum_body.html @@ -0,0 +1,216 @@ + +

    {L_MCP} ]

    +

    {FORUM_NAME}

    + + +

    + + {FORUM_DESC}
    + {L_MODERATOR}{L_MODERATORS}: {MODERATORS} +

    + + + +
    +
    + + + {L_FORUM_RULES} + + {L_FORUM_RULES}
    + {FORUM_RULES} + + +
    +
    + + + + + + + + + + +
    style="margin-top: 2em;"> + + + + + + + + + + + + + + + +
    + + + + +
    +
    + {L_NO_READ_ACCESS} +
    +
    + + + +
    + +
    +
    + +
    +

    {L_LOGIN_LOGOUT}  •  {L_REGISTER}

    + +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
     
    +
    +
    +
    +
    + +
    +
    + + + + + + + + + + + + + + +
    +
    +
      +
    • +
      +
      {L_ACTIVE_TOPICS}{L_ANNOUNCEMENTS}{L_TOPICS}
      +
      {L_REPLIES}
      +
      {L_VIEWS}
      +
      {L_LAST_POST}
      +
      +
    • +
    + +
    +
    + + + + +
    +
    + {L_NO_TOPICS} +
    +
    + + + + + +
    + {L_PREVIOUS} + {L_NEXT} + + + +
    +
    +
    + + + +
    + + + + + + + +
    + + + + + +

    {L_WHO_IS_ONLINE}

    +

    {LOGGED_IN_USER_LIST}

    + + + +

    {L_FORUM_PERMISSIONS}

    +

    {rules.RULE}

    + + + \ No newline at end of file diff --git a/phpBB/styles/prosilver/template/viewonline_body.html b/phpBB/styles/prosilver/template/viewonline_body.html new file mode 100644 index 0000000000..a29f59166b --- /dev/null +++ b/phpBB/styles/prosilver/template/viewonline_body.html @@ -0,0 +1,56 @@ + + +

    {TOTAL_REGISTERED_USERS_ONLINE}

    +

    {TOTAL_GUEST_USERS_ONLINE}{L_SWITCH_GUEST_DISPLAY}

    + + + +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + +
    {L_USERNAME}{L_FORUM_LOCATION}{L_LAST_UPDATED}
    {user_row.USERNAME} {L_IP}: {user_row.USER_IP} » {L_WHOIS}{user_row.FORUM_LOCATION}{user_row.LASTUPDATE}
    {L_NO_ONLINE_USERS}{L_SWITCH_GUEST_DISPLAY}
    + +
    +
    + + +
    + {L_PREVIOUS}{L_PREVIOUS}{L_NEXT}{L_NEXT} +
    + + +

    {L_LEGEND}: {LEGEND}

    + + + + + diff --git a/phpBB/styles/prosilver/template/viewonline_whois.html b/phpBB/styles/prosilver/template/viewonline_whois.html new file mode 100644 index 0000000000..5baa12aa58 --- /dev/null +++ b/phpBB/styles/prosilver/template/viewonline_whois.html @@ -0,0 +1,15 @@ + + +

    {L_WHOIS}

    + +
    +
    + +
    +
    {WHOIS}
    +
    + +
    +
    + + \ No newline at end of file diff --git a/phpBB/styles/prosilver/template/viewtopic_body.html b/phpBB/styles/prosilver/template/viewtopic_body.html new file mode 100644 index 0000000000..faff638669 --- /dev/null +++ b/phpBB/styles/prosilver/template/viewtopic_body.html @@ -0,0 +1,269 @@ + +

    {L_MCP} ]

    +

    {TOPIC_TITLE}

    + +{FORUM_DESC}
    + + +

    + + {L_MODERATOR}{L_MODERATORS}: {MODERATORS} + + +

    + + + +
    +
    + + + {L_FORUM_RULES} + + {L_FORUM_RULES}
    + {FORUM_RULES} + + +
    +
    + + +
    + + + + + + + + + + + +
    +
    + + +
    + +
    +
    + +
    +

    {POLL_QUESTION}

    +

    {L_POLL_LENGTH}
    {L_MAX_VOTES}

    + +
    + +
    title="{L_POLL_VOTED_OPTION}"> +
    {poll_option.POLL_OPTION_CAPTION}
    +
    checked="checked"/> checked="checked" />
    +
    {poll_option.POLL_OPTION_RESULT}
    +
    {L_NO_VOTES}{poll_option.POLL_OPTION_PERCENT}
    +
    + + + +
    +
     
    +
    {L_TOTAL_VOTES} : {TOTAL_VOTES}
    +
    + + + +
    +
     
    +
    +
    + + + +
    +
     
    +
    {L_VIEW_RESULTS}
    +
    + +
    +
    + +
    +
    + + {S_HIDDEN_FIELDS} + +
    +
    + + + + +
    +
    + +
    + +
    {postrow.L_IGNORE_POST}
    + + + + + + + + +

    class="first"> {postrow.POST_SUBJECT}

    +

    {postrow.MINI_POST_IMG}{postrow.MINI_POST_IMG}{L_POST_BY_AUTHOR} {postrow.POST_AUTHOR_FULL} {L_POSTED_ON_DATE} {postrow.POST_DATE}

    + + +

    + {UNAPPROVED_IMG} {L_POST_UNAPPROVED} + {REPORTED_IMG} {L_POST_REPORTED} +

    + + +
    {postrow.MESSAGE}
    + + +
    +
    {L_ATTACHMENTS}
    + +
    {postrow.attachment.DISPLAY_ATTACHMENT}
    + +
    + + +
    {L_DOWNLOAD_NOTICE}
    + +
    {postrow.EDITED_MESSAGE} +
    {L_REASON}: {postrow.EDIT_REASON} +
    + + +
    {postrow.BUMPED_MESSAGE}
    +
    {postrow.SIGNATURE}
    + + +
    + + +
    +
    + + {postrow.POSTER_AVATAR}{postrow.POSTER_AVATAR}
    + + {postrow.POST_AUTHOR_FULL}{postrow.POST_AUTHOR_FULL} +
    + +
    {postrow.RANK_TITLE}
    {postrow.RANK_IMG}
    + +
     
    + +
    {L_POSTS}: {postrow.POSTER_POSTS}
    +
    {L_JOINED}: {postrow.POSTER_JOINED}
    +
    {L_LOCATION}: {postrow.POSTER_FROM}
    + + + +
    {postrow.PROFILE_FIELD1_NAME}: {postrow.PROFILE_FIELD1_VALUE}
    + + + +
    {postrow.custom_fields.PROFILE_FIELD_NAME}: {postrow.custom_fields.PROFILE_FIELD_VALUE}
    + + + + +
    + +
    + + + +
    + + + + +
    +
    + +
    + + + +
    + +
    + {L_PREVIOUS} + {L_NEXT} + + +
    + +
    +
    + + +
    + + + + + +
    + + + + +
    +
    + +
    +
    + + + +

    {L_WHO_IS_ONLINE}

    +

    {LOGGED_IN_USER_LIST}

    + + + \ No newline at end of file diff --git a/phpBB/styles/prosilver/template/viewtopic_print.html b/phpBB/styles/prosilver/template/viewtopic_print.html new file mode 100644 index 0000000000..c9fb542eb4 --- /dev/null +++ b/phpBB/styles/prosilver/template/viewtopic_print.html @@ -0,0 +1,62 @@ + + + + + + + + + + + + + +{META} +{SITENAME} • {PAGE_TITLE} + + + + + +
    + + + + +
    +
    {PAGE_NUMBER}
    + +
    +

    {postrow.POST_SUBJECT}

    +
    {postrow.MINI_POST_IMG}{L_POSTED}: {postrow.POST_DATE}
    +
    {L_POST_BY_AUTHOR} style="color: {postrow.POST_AUTHOR_COLOUR}">{postrow.POST_AUTHOR}
    +
    {postrow.MESSAGE}
    +
    +
    + +
    + + + +
    + + + \ No newline at end of file diff --git a/phpBB/styles/prosilver/theme/buttons.css b/phpBB/styles/prosilver/theme/buttons.css new file mode 100644 index 0000000000..7e402f4b16 --- /dev/null +++ b/phpBB/styles/prosilver/theme/buttons.css @@ -0,0 +1,191 @@ +/* proSilver Button Styles +---------------------------------------- */ + +/* Rollover buttons + Based on: http://wellstyled.com/css-nopreload-rollovers.html +----------------------------------------*/ +.buttons { + float: left; + width: auto; + height: auto; +} + +.rtl .button { + float: right; +} + +/* Rollover state */ +.buttons div { + float: left; + margin: 0 5px 0 0; + background-position: 0 100%; +} + +.rtl .button div { + float: right; + margin: 0 0 0 5px; +} + +/* Rolloff state */ +.buttons div a { + display: block; + width: 100%; + height: 100%; + background-position: 0 0; +} + +/* Hide text and hide off-state image when rolling over (prevents flicker in IE) */ +.buttons div span { display: none; } +.buttons div a:hover { background-image: none; } + +/* Big button images */ +.reply-icon, .reply-icon a { background: transparent none 0 0 no-repeat; } +.post-icon, .post-icon a { background: transparent none 0 0 no-repeat; } +.locked-icon, .locked-icon a { background: transparent none 0 0 no-repeat; } +.pmreply-icon, .pmreply-icon a { background: none 0 0 no-repeat; } +.newpm-icon, .newpm-icon a { background: none 0 0 no-repeat; } +.forwardpm-icon, .forwardpm-icon a { background: none 0 0 no-repeat; } + +/* Set big button dimensions */ +.buttons div.reply-icon { width: {IMG_BUTTON_TOPIC_REPLY_WIDTH}px; height: {IMG_BUTTON_TOPIC_REPLY_HEIGHT}px; } +.buttons div.post-icon { width: {IMG_BUTTON_TOPIC_NEW_WIDTH}px; height: {IMG_BUTTON_TOPIC_NEW_HEIGHT}px; } +.buttons div.locked-icon { width: {IMG_BUTTON_TOPIC_LOCKED_WIDTH}px; height: {IMG_BUTTON_TOPIC_LOCKED_HEIGHT}px; } +.buttons div.pmreply-icon { width: {IMG_BUTTON_PM_REPLY_WIDTH}px; height: {IMG_BUTTON_PM_REPLY_HEIGHT}px; } +.buttons div.newpm-icon { width: {IMG_BUTTON_PM_NEW_WIDTH}px; height: {IMG_BUTTON_PM_NEW_HEIGHT}px; } +.buttons div.forwardpm-icon { width: {IMG_BUTTON_PM_FORWARD_WIDTH}px; height: {IMG_BUTTON_PM_FORWARD_HEIGHT}px; } + +/* Sub-header (navigation bar) +--------------------------------------------- */ +a.print, a.sendemail, a.fontsize { + display: block; + overflow: hidden; + height: 18px; + text-indent: -5000px; + text-align: left; + background-repeat: no-repeat; +} + +a.print { + background-image: none; + width: 22px; +} + +a.sendemail { + background-image: none; + width: 22px; +} + +a.sendemail:hover { + background-position: 0 -18px; +} + +a.fontsize { + background-image: none; + background-position: 0 -1px; + width: 29px; +} + +a.fontsize:hover { + background-position: 0 -20px; + text-decoration: none; +} + +/* Icon images +---------------------------------------- */ +.sitehome, .icon-faq, .icon-members, .icon-home, .icon-ucp, .icon-register, .icon-logout, +.icon-bookmark, .icon-bump, .icon-subscribe, .icon-unsubscribe, .icon-pages, .icon-search{ + background-position: 0 50%; + background-repeat: no-repeat; + background-image: none; + padding: 1px 0 0 17px; +} + +.rtl .sitehome, .rtl .icon-faq, .rtl .icon-members, .rtl .icon-home, .rtl .icon-ucp, .rtl .icon-register, .rtl .icon-logout, +.rtl .icon-bookmark, .rtl .icon-bump, .rtl .icon-subscribe, .rtl .icon-unsubscribe, .rtl .icon-pages, .rtl .icon-search{ + background-position: 100% 50%; + padding: 1px 17px 0 0; +} + +/* Poster profile icons +----------------------------------------*/ +ul.profile-icons { + padding-top: 10px; + list-style: none; +} + +/* Rollover state */ +ul.profile-icons li { + float: left; + margin: 0 6px 3px 0; + background-position: 0 100%; +} + +.rtl ul.profile-icons li { + margin: 0 0 3px 6px; +} + +/* Rolloff state */ +ul.profile-icons li a { + display: block; + width: 100%; + height: 100%; + background-position: 0 0; +} + +/* Hide text and hide off-state image when rolling over (prevents flicker in IE) */ +ul.profile-icons li span { display:none; } +ul.profile-icons li a:hover { background: none; } + +/* Positioning of moderator icons */ +.postbody ul.profile-icons { + float: right; + width: auto; + padding: 0; +} + +.postbody ul.profile-icons li { + margin: 0 3px; +} + +/* Profile & navigation icons */ +.email-icon, .email-icon a { background: none top left no-repeat; } +.aim-icon, .aim-icon a { background: none top left no-repeat; } +.yahoo-icon, .yahoo-icon a { background: none top left no-repeat; } +.web-icon, .web-icon a { background: none top left no-repeat; } +.msnm-icon, .msnm-icon a { background: none top left no-repeat; } +.icq-icon, .icq-icon a { background: none top left no-repeat; } +.jabber-icon, .jabber-icon a { background: none top left no-repeat; } +.pm-icon, .pm-icon a { background: none top left no-repeat; } +.quote-icon, .quote-icon a { background: none top left no-repeat; } + +/* Moderator icons */ +.report-icon, .report-icon a { background: none top left no-repeat; } +.warn-icon, .warn-icon a { background: none top left no-repeat; } +.edit-icon, .edit-icon a { background: none top left no-repeat; } +.delete-icon, .delete-icon a { background: none top left no-repeat; } +.info-icon, .info-icon a { background: none top left no-repeat; } + +/* Set profile icon dimensions */ +ul.profile-icons li.email-icon { width: {IMG_ICON_CONTACT_EMAIL_WIDTH}px; height: {IMG_ICON_CONTACT_EMAIL_HEIGHT}px; } +ul.profile-icons li.aim-icon { width: {IMG_ICON_CONTACT_AIM_WIDTH}px; height: {IMG_ICON_CONTACT_AIM_HEIGHT}px; } +ul.profile-icons li.yahoo-icon { width: {IMG_ICON_CONTACT_YAHOO_WIDTH}px; height: {IMG_ICON_CONTACT_YAHOO_HEIGHT}px; } +ul.profile-icons li.web-icon { width: {IMG_ICON_CONTACT_WWW_WIDTH}px; height: {IMG_ICON_CONTACT_WWW_HEIGHT}px; } +ul.profile-icons li.msnm-icon { width: {IMG_ICON_CONTACT_MSNM_WIDTH}px; height: {IMG_ICON_CONTACT_MSNM_HEIGHT}px; } +ul.profile-icons li.icq-icon { width: {IMG_ICON_CONTACT_ICQ_WIDTH}px; height: {IMG_ICON_CONTACT_ICQ_HEIGHT}px; } +ul.profile-icons li.jabber-icon { width: {IMG_ICON_CONTACT_JABBER_WIDTH}px; height: {IMG_ICON_CONTACT_JABBER_HEIGHT}px; } +ul.profile-icons li.pm-icon { width: {IMG_ICON_CONTACT_PM_WIDTH}px; height: {IMG_ICON_CONTACT_PM_HEIGHT}px; } +ul.profile-icons li.quote-icon { width: {IMG_ICON_POST_QUOTE_WIDTH}px; height: {IMG_ICON_POST_QUOTE_HEIGHT}px; } +ul.profile-icons li.report-icon { width: {IMG_ICON_POST_REPORT_WIDTH}px; height: {IMG_ICON_POST_REPORT_HEIGHT}px; } +ul.profile-icons li.edit-icon { width: {IMG_ICON_POST_EDIT_WIDTH}px; height: {IMG_ICON_POST_EDIT_HEIGHT}px; } +ul.profile-icons li.delete-icon { width: {IMG_ICON_POST_DELETE_WIDTH}px; height: {IMG_ICON_POST_DELETE_HEIGHT}px; } +ul.profile-icons li.info-icon { width: {IMG_ICON_POST_INFO_WIDTH}px; height: {IMG_ICON_POST_INFO_HEIGHT}px; } +ul.profile-icons li.warn-icon { width: {IMG_ICON_USER_WARN_WIDTH}px; height: {IMG_ICON_USER_WARN_HEIGHT}px; } + +/* Fix profile icon default margins */ +ul.profile-icons li.edit-icon { margin: 0 0 0 3px; } +ul.profile-icons li.quote-icon { margin: 0 0 0 10px; } +ul.profile-icons li.info-icon, ul.profile-icons li.report-icon { margin: 0 3px 0 0; } + +.rtl ul.profile-icons li.edit-icon { margin: 0 3px 0 0; } +.rtl ul.profile-icons li.quote-icon { margin: 0 10px 0 0; } +.rtl ul.profile-icons li.info-icon, .rtl ul.profile-icons li.report-icon { margin: 0 0 0 3px; } diff --git a/phpBB/styles/prosilver/theme/colours.css b/phpBB/styles/prosilver/theme/colours.css new file mode 100644 index 0000000000..70d89e7370 --- /dev/null +++ b/phpBB/styles/prosilver/theme/colours.css @@ -0,0 +1,957 @@ +/* +-------------------------------------------------------------- +Colours and backgrounds for common.css +-------------------------------------------------------------- */ + +html, body { + color: #536482; + background-color: #FFFFFF; +} + +h1 { + color: #FFFFFF; +} + +h2 { + color: #28313F; +} + +h3 { + border-bottom-color: #CCCCCC; + color: #115098; +} + +hr { + border-color: #FFFFFF; + border-top-color: #CCCCCC; +} + +hr.dashed { + border-top-color: #CCCCCC; +} + +/* Search box +--------------------------------------------- */ + +#search-box { + color: #FFFFFF; +} + +#search-box #keywords { + background-color: #FFF; +} + +#search-box input { + border-color: #0075B0; +} + +/* Round cornered boxes and backgrounds +---------------------------------------- */ +.headerbar { + background-color: #12A3EB; + background-image: url("{T_THEME_PATH}/images/bg_header.gif"); + color: #FFFFFF; +} + +.navbar { + background-color: #cadceb; +} + +.forabg { + background-color: #0076b1; + background-image: url("{T_THEME_PATH}/images/bg_list.gif"); +} + +.forumbg { + background-color: #12A3EB; + background-image: url("{T_THEME_PATH}/images/bg_header.gif"); +} + +.panel { + background-color: #ECF1F3; + color: #28313F; +} + +.post:target .content { + color: #000000; +} + +.post:target h3 a { + color: #000000; +} + +.bg1 { background-color: #ECF3F7; } +.bg2 { background-color: #e1ebf2; } +.bg3 { background-color: #cadceb; } + +.ucprowbg { + background-color: #DCDEE2; +} + +.fieldsbg { + background-color: #E7E8EA; +} + +span.corners-top { + background-image: url("{T_THEME_PATH}/images/corners_left.png"); +} + +span.corners-top span { + background-image: url("{T_THEME_PATH}/images/corners_right.png"); +} + +span.corners-bottom { + background-image: url("{T_THEME_PATH}/images/corners_left.png"); +} + +span.corners-bottom span { + background-image: url("{T_THEME_PATH}/images/corners_right.png"); +} + +/* Horizontal lists +----------------------------------------*/ + +ul.navlinks { + border-bottom-color: #FFFFFF; +} + +/* Table styles +----------------------------------------*/ +table.table1 thead th { + color: #FFFFFF; +} + +table.table1 tbody tr { + border-color: #BFC1CF; +} + +table.table1 tbody tr:hover, table.table1 tbody tr.hover { + background-color: #CFE1F6; + color: #000; +} + +table.table1 td { + color: #536482; +} + +table.table1 tbody td { + border-top-color: #FAFAFA; +} + +table.table1 tbody th { + border-bottom-color: #000000; + color: #333333; + background-color: #FFFFFF; +} + +table.info tbody th { + color: #000000; +} + +/* Misc layout styles +---------------------------------------- */ +dl.details dt { + color: #000000; +} + +dl.details dd { + color: #536482; +} + +.sep { + color: #1198D9; +} + +/* Pagination +---------------------------------------- */ + +.pagination span strong { + color: #FFFFFF; + background-color: #4692BF; + border-color: #4692BF; +} + +.pagination span a, .pagination span a:link, .pagination span a:visited, .pagination span a:active { + color: #5C758C; + background-color: #ECEDEE; + border-color: #B4BAC0; +} + +.pagination span a:hover { + border-color: #368AD2; + background-color: #368AD2; + color: #FFF; +} + +/* Pagination in viewforum for multipage topics */ +.row .pagination { + background-image: url("{T_THEME_PATH}/images/icon_pages.gif"); +} + +.row .pagination span a, li.pagination span a { + background-color: #FFFFFF; +} + +.row .pagination span a:hover, li.pagination span a:hover { + background-color: #368AD2; +} + +/* Miscellaneous styles +---------------------------------------- */ + +.copyright { + color: #555555; +} + +.error { + color: #BC2A4D; +} + +.reported { + background-color: #F7ECEF; +} + +li.reported:hover { + background-color: #ECD5D8 !important; +} +.sticky, .announce { + /* you can add a background for stickies and announcements*/ +} + +div.rules { + background-color: #ECD5D8; + color: #BC2A4D; +} + +p.rules { + background-color: #ECD5D8; + background-image: none; +} + +/* +-------------------------------------------------------------- +Colours and backgrounds for links.css +-------------------------------------------------------------- */ + +a:link { color: #105289; } +a:visited { color: #105289; } +a:hover { color: #D31141; } +a:active { color: #368AD2; } + +/* Links on gradient backgrounds */ +#search-box a:link, .navbg a:link, .forumbg .header a:link, .forabg .header a:link, th a:link { + color: #FFFFFF; +} + +#search-box a:visited, .navbg a:visited, .forumbg .header a:visited, .forabg .header a:visited, th a:visited { + color: #FFFFFF; +} + +#search-box a:hover, .navbg a:hover, .forumbg .header a:hover, .forabg .header a:hover, th a:hover { + color: #A8D8FF; +} + +#search-box a:active, .navbg a:active, .forumbg .header a:active, .forabg .header a:active, th a:active { + color: #C8E6FF; +} + +/* Links for forum/topic lists */ +a.forumtitle { + color: #105289; +} + +/* a.forumtitle:visited { color: #105289; } */ + +a.forumtitle:hover { + color: #BC2A4D; +} + +a.forumtitle:active { + color: #105289; +} + +a.topictitle { + color: #105289; +} + +/* a.topictitle:visited { color: #368AD2; } */ + +a.topictitle:hover { + color: #BC2A4D; +} + +a.topictitle:active { + color: #105289; +} + +/* Post body links */ +.postlink { + color: #368AD2; + border-bottom-color: #368AD2; +} + +.postlink:visited { + color: #5D8FBD; + border-bottom-color: #666666; +} + +.postlink:active { + color: #368AD2; +} + +.postlink:hover { + background-color: #D0E4F6; + color: #0D4473; +} + +.signature a, .signature a:visited, .signature a:active, .signature a:hover { + background-color: transparent; +} + +/* Profile links */ +.postprofile a:link, .postprofile a:active, .postprofile a:visited, .postprofile dt.author a { + color: #105289; +} + +.postprofile a:hover, .postprofile dt.author a:hover { + color: #D31141; +} + +/* Profile searchresults */ +.search .postprofile a { + color: #105289; +} + +.search .postprofile a:hover { + color: #D31141; +} + +/* Back to top of page */ +a.top { + background-image: url("{IMG_ICON_BACK_TOP_SRC}"); +} + +a.top2 { + background-image: url("{IMG_ICON_BACK_TOP_SRC}"); +} + +/* Arrow links */ +a.up { background-image: url("{T_THEME_PATH}/images/arrow_up.gif") } +a.down { background-image: url("{T_THEME_PATH}/images/arrow_down.gif") } +a.left { background-image: url("{T_THEME_PATH}/images/arrow_left.gif") } +a.right { background-image: url("{T_THEME_PATH}/images/arrow_right.gif") } + +a.up:hover { + background-color: transparent; +} + +a.left:hover { + color: #368AD2; +} + +a.right:hover { + color: #368AD2; +} + + +/* +-------------------------------------------------------------- +Colours and backgrounds for content.css +-------------------------------------------------------------- */ + +ul.forums { + background-color: #eef5f9; + background-image: url("{T_THEME_PATH}/images/gradient.gif"); +} + +ul.topiclist li { + color: #4C5D77; +} + +ul.topiclist dd { + border-left-color: #FFFFFF; +} + +ul.topiclist li.row dt a.subforum.read { + background-image: url("{IMG_SUBFORUM_READ_SRC}"); +} + +ul.topiclist li.row dt a.subforum.unread { + background-image: url("{IMG_SUBFORUM_UNREAD_SRC}"); +} + +li.row { + border-top-color: #FFFFFF; + border-bottom-color: #00608F; +} + +li.row strong { + color: #000000; +} + +li.row:hover { + background-color: #F6F4D0; +} + +li.row:hover dd { + border-left-color: #CCCCCC; +} + +li.header dt, li.header dd { + color: #FFFFFF; +} + +/* Forum list column styles */ +ul.topiclist dd.searchextra { + color: #333333; +} + +/* Post body styles +----------------------------------------*/ +.postbody { + color: #333333; +} + +/* Content container styles +----------------------------------------*/ +.content { + color: #333333; +} + +.content h2, .panel h2 { + color: #115098; + border-bottom-color: #CCCCCC; +} + +dl.faq dt { + color: #333333; +} + +.posthilit { + background-color: #F3BFCC; + color: #BC2A4D; +} + +.announce, .unreadpost { + /* Highlight the announcements & unread posts box */ + border-left-color: #BC2A4D; + border-right-color: #BC2A4D; +} + +/* Post signature */ +.signature { + border-top-color: #CCCCCC; +} + +/* Post noticies */ +.notice { + border-top-color: #CCCCCC; +} + +/* BB Code styles +----------------------------------------*/ +/* Quote block */ +blockquote { + background-color: #EBEADD; + background-image: url("{T_THEME_PATH}/images/quote.gif"); + border-color:#DBDBCE; +} + +blockquote blockquote { + /* Nested quotes */ + background-color:#EFEED9; +} + +blockquote blockquote blockquote { + /* Nested quotes */ + background-color: #EBEADD; +} + +/* Code block */ +dl.codebox { + background-color: #FFFFFF; + border-color: #C9D2D8; +} + +dl.codebox dt { + border-bottom-color: #CCCCCC; +} + +dl.codebox code { + color: #2E8B57; +} + +.syntaxbg { color: #FFFFFF; } +.syntaxcomment { color: #FF8000; } +.syntaxdefault { color: #0000BB; } +.syntaxhtml { color: #000000; } +.syntaxkeyword { color: #007700; } +.syntaxstring { color: #DD0000; } + +/* Attachments +----------------------------------------*/ +.attachbox { + background-color: #FFFFFF; + border-color: #C9D2D8; +} + +.pm-message .attachbox { + background-color: #F2F3F3; +} + +.attachbox dd { + border-top-color: #C9D2D8; +} + +.attachbox p { + color: #666666; +} + +.attachbox p.stats +{ + color: #666666; +} + +.attach-image img { + border-color: #999999; +} + +/* Inline image thumbnails */ + +dl.file dd { + color: #666666; +} + +dl.thumbnail img { + border-color: #666666; + background-color: #FFFFFF; +} + +dl.thumbnail dd { + color: #666666; +} + +dl.thumbnail dt a:hover { + background-color: #EEEEEE; +} + +dl.thumbnail dt a:hover img { + border-color: #368AD2; +} + +/* Post poll styles +----------------------------------------*/ + +fieldset.polls dl { + border-top-color: #DCDEE2; + color: #666666; +} + +fieldset.polls dl.voted { + color: #000000; +} + +fieldset.polls dd div { + color: #FFFFFF; +} + +.pollbar1 { + background-color: #AA2346; + border-bottom-color: #74162C; + border-right-color: #74162C; +} + +.pollbar2 { + background-color: #BE1E4A; + border-bottom-color: #8C1C38; + border-right-color: #8C1C38; +} + +.pollbar3 { + background-color: #D11A4E; + border-bottom-color: #AA2346; + border-right-color: #AA2346; +} + +.pollbar4 { + background-color: #E41653; + border-bottom-color: #BE1E4A; + border-right-color: #BE1E4A; +} + +.pollbar5 { + background-color: #F81157; + border-bottom-color: #D11A4E; + border-right-color: #D11A4E; +} + +/* Poster profile block +----------------------------------------*/ +.postprofile { + color: #666666; + border-left-color: #FFFFFF; +} + +.pm .postprofile { + border-left-color: #DDDDDD; +} + +.postprofile strong { + color: #000000; +} + +.online { + background-image: url("{T_IMAGESET_LANG_PATH}/icon_user_online.gif"); +} + +/* +-------------------------------------------------------------- +Colours and backgrounds for buttons.css +-------------------------------------------------------------- */ + +/* Big button images */ +.reply-icon, .reply-icon a { background-image: url("{IMG_BUTTON_TOPIC_REPLY_SRC}"); } +.post-icon, .post-icon a { background-image: url("{IMG_BUTTON_TOPIC_NEW_SRC}") ;} +.locked-icon, .locked-icon a { background-image: url("{IMG_BUTTON_TOPIC_LOCKED_SRC}"); } +.pmreply-icon, .pmreply-icon a { background-image: url("{IMG_BUTTON_PM_REPLY_SRC}") ;} +.newpm-icon, .newpm-icon a { background-image: url("{IMG_BUTTON_PM_NEW_SRC}") ;} +.forwardpm-icon, .forwardpm-icon a { background-image: url("{IMG_BUTTON_PM_FORWARD_SRC}") ;} + +a.print { + background-image: url("{T_THEME_PATH}/images/icon_print.gif"); +} + +a.sendemail { + background-image: url("{T_THEME_PATH}/images/icon_sendemail.gif"); +} + +a.fontsize { + background-image: url("{T_THEME_PATH}/images/icon_fontsize.gif"); +} + +/* Icon images +---------------------------------------- */ +.sitehome { background-image: url("{T_THEME_PATH}/images/icon_home.gif"); } +.icon-faq { background-image: url("{T_THEME_PATH}/images/icon_faq.gif"); } +.icon-members { background-image: url("{T_THEME_PATH}/images/icon_members.gif"); } +.icon-home { background-image: url("{T_THEME_PATH}/images/icon_home.gif"); } +.icon-ucp { background-image: url("{T_THEME_PATH}/images/icon_ucp.gif"); } +.icon-register { background-image: url("{T_THEME_PATH}/images/icon_register.gif"); } +.icon-logout { background-image: url("{T_THEME_PATH}/images/icon_logout.gif"); } +.icon-bookmark { background-image: url("{T_THEME_PATH}/images/icon_bookmark.gif"); } +.icon-bump { background-image: url("{T_THEME_PATH}/images/icon_bump.gif"); } +.icon-subscribe { background-image: url("{T_THEME_PATH}/images/icon_subscribe.gif"); } +.icon-unsubscribe { background-image: url("{T_THEME_PATH}/images/icon_unsubscribe.gif"); } +.icon-pages { background-image: url("{T_THEME_PATH}/images/icon_pages.gif"); } +.icon-search { background-image: url("{T_THEME_PATH}/images/icon_search.gif"); } + +/* Profile & navigation icons */ +.email-icon, .email-icon a { background-image: url("{IMG_ICON_CONTACT_EMAIL_SRC}"); } +.aim-icon, .aim-icon a { background-image: url("{IMG_ICON_CONTACT_AIM_SRC}"); } +.yahoo-icon, .yahoo-icon a { background-image: url("{IMG_ICON_CONTACT_YAHOO_SRC}"); } +.web-icon, .web-icon a { background-image: url("{IMG_ICON_CONTACT_WWW_SRC}"); } +.msnm-icon, .msnm-icon a { background-image: url("{IMG_ICON_CONTACT_MSNM_SRC}"); } +.icq-icon, .icq-icon a { background-image: url("{IMG_ICON_CONTACT_ICQ_SRC}"); } +.jabber-icon, .jabber-icon a { background-image: url("{IMG_ICON_CONTACT_JABBER_SRC}"); } +.pm-icon, .pm-icon a { background-image: url("{IMG_ICON_CONTACT_PM_SRC}"); } +.quote-icon, .quote-icon a { background-image: url("{IMG_ICON_POST_QUOTE_SRC}"); } + +/* Moderator icons */ +.report-icon, .report-icon a { background-image: url("{IMG_ICON_POST_REPORT_SRC}"); } +.edit-icon, .edit-icon a { background-image: url("{IMG_ICON_POST_EDIT_SRC}"); } +.delete-icon, .delete-icon a { background-image: url("{IMG_ICON_POST_DELETE_SRC}"); } +.info-icon, .info-icon a { background-image: url("{IMG_ICON_POST_INFO_SRC}"); } +.warn-icon, .warn-icon a { background-image: url("{IMG_ICON_USER_WARN_SRC}"); } /* Need updated warn icon */ + +/* +-------------------------------------------------------------- +Colours and backgrounds for cp.css +-------------------------------------------------------------- */ + +/* Main CP box +----------------------------------------*/ + +#cp-main h3, #cp-main hr, #cp-menu hr { + border-color: #A4B3BF; +} + +#cp-main .panel li.row { + border-bottom-color: #B5C1CB; + border-top-color: #F9F9F9; +} + +ul.cplist { + border-top-color: #B5C1CB; +} + +#cp-main .panel li.header dd, #cp-main .panel li.header dt { + color: #000000; +} + +#cp-main table.table1 thead th { + color: #333333; + border-bottom-color: #333333; +} + +#cp-main .pm-message { + border-color: #DBDEE2; + background-color: #FFFFFF; +} + +/* CP tabbed menu +----------------------------------------*/ +#tabs a { + background-image: url("{T_THEME_PATH}/images/bg_tabs1.gif"); +} + +#tabs a span { + background-image: url("{T_THEME_PATH}/images/bg_tabs2.gif"); + color: #536482; +} + +#tabs a:hover span { + color: #BC2A4D; +} + +#tabs .activetab a { + border-bottom-color: #CADCEB; +} + +#tabs .activetab a span { + color: #333333; +} + +#tabs .activetab a:hover span { + color: #000000; +} + +/* Mini tabbed menu used in MCP +----------------------------------------*/ +#minitabs li { + background-color: #E1EBF2; +} + +#minitabs li.activetab { + background-color: #F9F9F9; +} + +#minitabs li.activetab a, #minitabs li.activetab a:hover { + color: #333333; +} + +/* UCP navigation menu +----------------------------------------*/ + +/* Link styles for the sub-section links */ +#navigation a { + color: #333; + background-color: #B2C2CF; + background-image: url("{T_THEME_PATH}/images/bg_menu.gif"); +} + +#navigation a:hover { + background-color: #aabac6; + color: #BC2A4D; +} + +#navigation #active-subsection a { + color: #D31141; + background-color: #F9F9F9; + background-image: none; +} + +#navigation #active-subsection a:hover { + color: #D31141; +} + +/* Preferences pane layout +----------------------------------------*/ +#cp-main h2 { + color: #333333; +} + +#cp-main .panel { + background-color: #F9F9F9; +} + +#cp-main .pm { + background-color: #FFFFFF; +} + +#cp-main span.corners-top, #cp-menu span.corners-top { + background-image: url("{T_THEME_PATH}/images/corners_left2.gif"); +} + +#cp-main span.corners-top span, #cp-menu span.corners-top span { + background-image: url("{T_THEME_PATH}/images/corners_right2.gif"); +} + +#cp-main span.corners-bottom, #cp-menu span.corners-bottom { + background-image: url("{T_THEME_PATH}/images/corners_left2.gif"); +} + +#cp-main span.corners-bottom span, #cp-menu span.corners-bottom span { + background-image: url("{T_THEME_PATH}/images/corners_right2.gif"); +} + +/* Topicreview */ +#cp-main .panel #topicreview span.corners-top, #cp-menu .panel #topicreview span.corners-top { + background-image: url("{T_THEME_PATH}/images/corners_left.gif"); +} + +#cp-main .panel #topicreview span.corners-top span, #cp-menu .panel #topicreview span.corners-top span { + background-image: url("{T_THEME_PATH}/images/corners_right.gif"); +} + +#cp-main .panel #topicreview span.corners-bottom, #cp-menu .panel #topicreview span.corners-bottom { + background-image: url("{T_THEME_PATH}/images/corners_left.gif"); +} + +#cp-main .panel #topicreview span.corners-bottom span, #cp-menu .panel #topicreview span.corners-bottom span { + background-image: url("{T_THEME_PATH}/images/corners_right.gif"); +} + +/* Friends list */ +.cp-mini { + background-color: #eef5f9; +} + +dl.mini dt { + color: #425067; +} + +/* PM Styles +----------------------------------------*/ +/* PM Message history */ +.current { + color: #999999 !important; +} + +/* PM marking colours */ +.pmlist li.pm_message_reported_colour, .pm_message_reported_colour { + border-left-color: #BC2A4D; + border-right-color: #BC2A4D; +} + +.pmlist li.pm_marked_colour, .pm_marked_colour { + border-color: #FF6600; +} + +.pmlist li.pm_replied_colour, .pm_replied_colour { + border-color: #A9B8C2; +} + +.pmlist li.pm_friend_colour, .pm_friend_colour { + border-color: #5D8FBD; +} + +pmlist li.pm_foe_colour, .pm_foe_colour { + border-color: #000000; +} + +/* Avatar gallery */ +#gallery label { + background-color: #FFFFFF; + border-color: #CCC; +} + +#gallery label:hover { + background-color: #EEE; +} + +/* +-------------------------------------------------------------- +Colours and backgrounds for forms.css +-------------------------------------------------------------- */ + +/* General form styles +----------------------------------------*/ +select { + border-color: #666666; + background-color: #FAFAFA; +} + +label { + color: #425067; +} + +/* Definition list layout for forms +---------------------------------------- */ +dd label { + color: #333; +} + +/* Hover effects */ +fieldset dl:hover dt label { + color: #000000; +} + +fieldset.fields2 dl:hover dt label { + color: inherit; +} + +/* Quick-login on index page */ +fieldset.quick-login input { + background-color: #F2F3F3; +} + +/* Posting page styles +----------------------------------------*/ + +#message-box textarea { + color: #333333; +} + +/* Input field styles +---------------------------------------- */ +.inputbox { + background-color: #FFFFFF; + border-color: #B4BAC0; + color: #333333; +} + +.inputbox:hover { + border-color: #11A3EA; +} + +.inputbox:focus { + border-color: #11A3EA; + color: #0F4987; +} + +/* Form button styles +---------------------------------------- */ + +a.button1, input.button1, input.button3, a.button2, input.button2 { + color: #000; + background-color: #FAFAFA; + background-image: url("{T_THEME_PATH}/images/bg_button.gif"); +} + +a.button1, input.button1 { + border-color: #666666; +} + +input.button3 { + background-image: none; +} + +/* Alternative button */ +a.button2, input.button2, input.button3 { + border-color: #666666; +} + +/* button in the style of the form buttons */ +a.button1, a.button1:link, a.button1:visited, a.button1:active, a.button2, a.button2:link, a.button2:visited, a.button2:active { + color: #000000; +} + +/* Hover states */ +a.button1:hover, input.button1:hover, a.button2:hover, input.button2:hover, input.button3:hover { + border-color: #BC2A4D; + color: #BC2A4D; +} + +input.search { + background-image: url("{T_THEME_PATH}/images/icon_textbox_search.gif"); +} \ No newline at end of file diff --git a/phpBB/styles/prosilver/theme/common.css b/phpBB/styles/prosilver/theme/common.css new file mode 100644 index 0000000000..f870a87d3c --- /dev/null +++ b/phpBB/styles/prosilver/theme/common.css @@ -0,0 +1,621 @@ +/* General proSilver Markup Styles +---------------------------------------- */ + +* { + /* Reset browsers default margin, padding and font sizes */ + margin: 0; + padding: 0; +} + +html { + font-size: 100%; + /* Always show a scrollbar for short pages - stops the jump when the scrollbar appears. non-IE browsers */ + height: 100%; + margin-bottom: 1px; +} + +body { + /* Text-Sizing with ems: http://www.clagnut.com/blog/348/ */ + font-family: Verdana, Helvetica, Arial, sans-serif; + color: #828282; + background-color: #FFFFFF; + /*font-size: 62.5%; This sets the default font size to be equivalent to 10px */ + font-size: 10px; + margin: 0; + padding: 12px 0; +} + +h1 { + /* Forum name */ + font-family: "Trebuchet MS", Arial, Helvetica, sans-serif; + margin-right: 200px; + color: #FFFFFF; + margin-top: 15px; + font-weight: bold; + font-size: 2em; +} + +h2 { + /* Forum header titles */ + font-family: "Trebuchet MS", Arial, Helvetica, sans-serif; + font-weight: normal; + color: #3f3f3f; + font-size: 2em; + margin: 0.8em 0 0.2em 0; +} + +h2.solo { + margin-bottom: 1em; +} + +h3 { + /* Sub-headers (also used as post headers, but defined later) */ + font-family: Arial, Helvetica, sans-serif; + font-weight: bold; + text-transform: uppercase; + border-bottom: 1px solid #CCCCCC; + margin-bottom: 3px; + padding-bottom: 2px; + font-size: 1.05em; + color: #989898; + margin-top: 20px; +} + +h4 { + /* Forum and topic list titles */ + font-family: "Trebuchet MS", Verdana, Helvetica, Arial, Sans-serif; + font-size: 1.3em; +} + +p { + line-height: 1.3em; + font-size: 1.1em; + margin-bottom: 1.5em; +} + +img { + border-width: 0; +} + +hr { + /* Also see tweaks.css */ + border: 0 none #FFFFFF; + border-top: 1px solid #CCCCCC; + height: 1px; + margin: 5px 0; + display: block; + clear: both; +} + +hr.dashed { + border-top: 1px dashed #CCCCCC; + margin: 10px 0; +} + +hr.divider { + display: none; +} + +p.right { + text-align: right; +} + +/* Main blocks +---------------------------------------- */ +#wrap { + padding: 0 20px; + min-width: 650px; +} + +#simple-wrap { + padding: 6px 10px; +} + +#page-body { + margin: 4px 0; + clear: both; +} + +#page-footer { + clear: both; +} + +#page-footer h3 { + margin-top: 20px; +} + +#logo { + float: left; + width: auto; + padding: 10px 13px 0 10px; +} + +a#logo:hover { + text-decoration: none; +} + +/* Search box +--------------------------------------------- */ +#search-box { + color: #FFFFFF; + position: relative; + margin-top: 30px; + margin-right: 5px; + display: block; + float: right; + text-align: right; + white-space: nowrap; /* For Opera */ +} + +.rtl #search-box { + float: left; + text-align: left; + margin-right: 0; + margin-left: 5px; +} + +#search-box #keywords { + width: 95px; + background-color: #FFF; +} + +#search-box input { + border: 1px solid #b0b0b0; +} + +/* .button1 style defined later, just a few tweaks for the search button version */ +#search-box input.button1 { + padding: 1px 5px; +} + +#search-box li { + text-align: right; + margin-top: 4px; +} + +#search-box img { + vertical-align: middle; + margin-right: 3px; +} + +/* Site description and logo */ +#site-description { + float: left; + width: 70%; +} + +.rtl #site-description { + float: right; +} + +#site-description h1 { + margin-right: 0; +} + +/* Round cornered boxes and backgrounds +---------------------------------------- */ +.headerbar { + background: #ebebeb none repeat-x 0 0; + color: #FFFFFF; + margin-bottom: 4px; + padding: 0 5px; +} + +.navbar { + background-color: #ebebeb; + padding: 0 10px; +} + +.forabg { + background: #b1b1b1 none repeat-x 0 0; + margin-bottom: 4px; + padding: 0 5px; + clear: both; +} + +.forumbg { + background: #ebebeb none repeat-x 0 0; + margin-bottom: 4px; + padding: 0 5px; + clear: both; +} + +.panel { + margin-bottom: 4px; + padding: 0 10px; + background-color: #f3f3f3; + color: #3f3f3f; +} + +.post { + padding: 0 10px; + margin-bottom: 4px; + background-repeat: no-repeat; + background-position: 100% 0; +} + +.post:target .content { + color: #000000; +} + +.post:target h3 a { + color: #000000; +} + +.bg1 { background-color: #f7f7f7;} +.bg2 { background-color: #f2f2f2; } +.bg3 { background-color: #ebebeb; } + +.rowbg { + margin: 5px 5px 2px 5px; +} + +.ucprowbg { + background-color: #e2e2e2; +} + +.fieldsbg { + /*border: 1px #DBDEE2 solid;*/ + background-color: #eaeaea; +} + +span.corners-top, span.corners-bottom, span.corners-top span, span.corners-bottom span { + font-size: 1px; + line-height: 1px; + display: block; + height: 5px; + background-repeat: no-repeat; +} + +span.corners-top { + background-image: none; + background-position: 0 0; + margin: 0 -5px; +} + +span.corners-top span { + background-image: none; + background-position: 100% 0; +} + +span.corners-bottom { + background-image: none; + background-position: 0 100%; + margin: 0 -5px; + clear: both; +} + +span.corners-bottom span { + background-image: none;; + background-position: 100% 100%; +} + +.headbg span.corners-bottom { + margin-bottom: -1px; +} + +.post span.corners-top, .post span.corners-bottom, .panel span.corners-top, .panel span.corners-bottom, .navbar span.corners-top, .navbar span.corners-bottom { + margin: 0 -10px; +} + +.rules span.corners-top { + margin: 0 -10px 5px -10px; +} + +.rules span.corners-bottom { + margin: 5px -10px 0 -10px; +} + +/* Horizontal lists +----------------------------------------*/ +ul.linklist { + display: block; + margin: 0; +} + +ul.linklist li { + display: block; + list-style-type: none; + float: left; + width: auto; + margin-right: 5px; + font-size: 1.1em; + line-height: 2.2em; +} + +ul.linklist li.rightside, p.rightside { + float: right; + margin-right: 0; + margin-left: 5px; + text-align: right; +} + +ul.navlinks { + padding-bottom: 1px; + border-bottom: 1px solid #FFFFFF; + font-weight: bold; +} + +/* Table styles +----------------------------------------*/ +table.table1 { + /* See tweaks.css */ +} + +#ucp-main table.table1 { + padding: 2px; +} + +table.table1 thead th { + font-weight: normal; + text-transform: uppercase; + color: #FFFFFF; + line-height: 1.3em; + font-size: 1em; + padding: 0 0 4px 3px; +} + +table.table1 thead th span { + padding-left: 7px; +} + +table.table1 tbody tr { + border: 1px solid #cfcfcf; +} + +table.table1 tbody tr:hover, table.table1 tbody tr.hover { + background-color: #f6f6f6; + color: #000; +} + +table.table1 td { + color: #6a6a6a; + font-size: 1.1em; +} + +table.table1 tbody td { + padding: 5px; + border-top: 1px solid #FAFAFA; +} + +table.table1 tbody th { + padding: 5px; + border-bottom: 1px solid #000000; + text-align: left; + color: #333333; + background-color: #FFFFFF; +} + +/* Specific column styles */ +table.table1 .name { text-align: left; } +table.table1 .posts { text-align: center !important; width: 7%; } +table.table1 .joined { text-align: left; width: 15%; } +table.table1 .active { text-align: left; width: 15%; } +table.table1 .mark { text-align: center; width: 7%; } +table.table1 .info { text-align: left; width: 30%; } +table.table1 .info div { width: 100%; white-space: nowrap; overflow: hidden; } +table.table1 .autocol { line-height: 2em; white-space: nowrap; } +table.table1 thead .autocol { padding-left: 1em; } + +table.table1 span.rank-img { + float: right; + width: auto; +} + +table.info td { + padding: 3px; +} + +table.info tbody th { + padding: 3px; + text-align: right; + vertical-align: top; + color: #000000; + font-weight: normal; +} + +.forumbg table.table1 { + margin: 0 -2px -1px -1px; +} + +/* Misc layout styles +---------------------------------------- */ +/* column[1-2] styles are containers for two column layouts + Also see tweaks.css */ +.column1 { + float: left; + clear: left; + width: 49%; +} + +.column2 { + float: right; + clear: right; + width: 49%; +} + +/* General classes for placing floating blocks */ +.left-box { + float: left; + width: auto; + text-align: left; +} + +.right-box { + float: right; + width: auto; + text-align: right; +} + +dl.details { + /*font-family: "Lucida Grande", Verdana, Helvetica, Arial, sans-serif;*/ + font-size: 1.1em; +} + +dl.details dt { + float: left; + width: 16em; + text-align: right; + color: #000000; + display: block; +} + +dl.details dd { + margin-left: 16em; + padding-left: 5px; + margin-bottom: 5px; + color: #828282; +} + +/* Pagination +---------------------------------------- */ +.pagination { + height: 1%; /* IE tweak (holly hack) */ + width: auto; + text-align: right; + margin-top: 5px; + float: right; +} + +.pagination span.page-sep { + display:none; +} + +li.pagination { + margin-top: 0; +} + +.pagination strong, .pagination b { + font-weight: normal; +} + +.pagination span strong { + padding: 0 2px; + margin: 0 2px; + font-weight: normal; + color: #FFFFFF; + background-color: #bfbfbf; + border: 1px solid #bfbfbf; + font-size: 0.9em; +} + +.pagination span a, .pagination span a:link, .pagination span a:visited, .pagination span a:active { + font-weight: normal; + text-decoration: none; + color: #747474; + margin: 0 2px; + padding: 0 2px; + background-color: #eeeeee; + border: 1px solid #bababa; + font-size: 0.9em; + line-height: 1.5em; +} + +.pagination span a:hover { + border-color: #d2d2d2; + background-color: #d2d2d2; + color: #FFF; + text-decoration: none; +} + +.pagination img { + vertical-align: middle; +} + +/* Pagination in viewforum for multipage topics */ +.row .pagination { + display: block; + float: right; + width: auto; + margin-top: 0; + padding: 1px 0 1px 15px; + font-size: 0.9em; + background: none 0 50% no-repeat; +} + +.row .pagination span a, li.pagination span a { + background-color: #FFFFFF; +} + +.row .pagination span a:hover, li.pagination span a:hover { + background-color: #d2d2d2; +} + +/* Miscellaneous styles +---------------------------------------- */ +#forum-permissions { + float: right; + width: auto; + padding-left: 5px; + margin-left: 5px; + margin-top: 10px; + text-align: right; +} + +.copyright { + padding: 5px; + text-align: center; + color: #555555; +} + +.small { + font-size: 0.9em !important; +} + +.titlespace { + margin-bottom: 15px; +} + +.headerspace { + margin-top: 20px; +} + +.error { + color: #bcbcbc; + font-weight: bold; + font-size: 1em; +} + +.reported { + background-color: #f7f7f7; +} + +li.reported:hover { + background-color: #ececec; +} + +div.rules { + background-color: #ececec; + color: #bcbcbc; + padding: 0 10px; + margin: 10px 0; + font-size: 1.1em; +} + +p.rules { + background-color: #ececec; + background-image: none; + padding: 5px; +} + +p.rules img { + vertical-align: middle; +} + +p.rules a { + vertical-align: middle; + clear: both; +} + +#top { + position: absolute; + top: -20px; +} + +.clear { + display: block; + clear: both; + font-size: 1px; + line-height: 1px; + background: transparent; +} diff --git a/phpBB/styles/prosilver/theme/content.css b/phpBB/styles/prosilver/theme/content.css new file mode 100644 index 0000000000..2affe2a89d --- /dev/null +++ b/phpBB/styles/prosilver/theme/content.css @@ -0,0 +1,742 @@ +/* proSilver Content Styles +---------------------------------------- */ + +ul.topiclist { + display: block; + list-style-type: none; + margin: 0; +} + +ul.forums { + background: #f9f9f9 none repeat-x 0 0; +} + +ul.topiclist li { + display: block; + list-style-type: none; + color: #777777; + margin: 0; +} + +ul.topiclist dl { + position: relative; +} + +ul.topiclist li.row dl { + padding: 2px 0; +} + +ul.topiclist dt { + display: block; + float: left; + width: 50%; + font-size: 1.1em; + padding-left: 5px; + padding-right: 5px; +} + +ul.topiclist dd { + display: block; + float: left; + border-left: 1px solid #FFFFFF; + padding: 4px 0; +} + +ul.topiclist dfn { + /* Labels for post/view counts */ + display: none; +} + +ul.topiclist li.row dt a.subforum { + background-image: none; + background-position: 0 50%; + background-repeat: no-repeat; + position: relative; + white-space: nowrap; + padding: 0 0 0 12px; +} + +li.row { + border-top: 1px solid #FFFFFF; + border-bottom: 1px solid #8f8f8f; +} + +li.row strong { + font-weight: normal; + color: #000000; +} + +li.row:hover { + background-color: #f6f6f6; +} + +li.row:hover dd { + border-left-color: #CCCCCC; +} + +li.header dt, li.header dd { + line-height: 1em; + border-left-width: 0; + margin: 2px 0 4px 0; + color: #FFFFFF; + padding-top: 2px; + padding-bottom: 2px; + font-size: 1em; + font-family: Arial, Helvetica, sans-serif; + text-transform: uppercase; +} + +li.header dt { + font-weight: bold; +} + +li.header dd { + margin-left: 1px; +} + +li.header dl.icon { + min-height: 0; +} + +li.header dl.icon dt { + /* Tweak for headers alignment when folder icon used */ + padding-left: 0; + padding-right: 44px; +} + +/* Forum list column styles */ +dl.icon { + min-height: 35px; + background-position: 10px 50%; /* Position of folder icon */ + background-repeat: no-repeat; +} + +dl.icon dt { + padding-left: 45px; /* Space for folder icon */ + background-repeat: no-repeat; + background-position: 5px 95%; /* Position of topic icon */ +} + +dd.posts, dd.topics, dd.views { + width: 8%; + text-align: center; + line-height: 2.2em; + font-size: 1.2em; +} + +dd.lastpost { + width: 25%; + font-size: 1.1em; +} + +dd.redirect { + font-size: 1.1em; + line-height: 2.5em; +} + +dd.moderation { + font-size: 1.1em; +} + +dd.lastpost span, ul.topiclist dd.searchby span, ul.topiclist dd.info span, ul.topiclist dd.time span, dd.redirect span, dd.moderation span { + display: block; + padding-left: 5px; +} + +dd.time { + width: auto; + line-height: 200%; + font-size: 1.1em; +} + +dd.extra { + width: 65px; + line-height: 200%; + text-align: center; + font-size: 1.1em; +} + +dd.mark { + float: right !important; + width: 9%; + text-align: center; + line-height: 200%; + font-size: 1.2em; +} + +dd.info { + width: 30%; +} + +dd.option { + width: 15%; + line-height: 200%; + text-align: center; + font-size: 1.1em; +} + +dd.searchby { + width: 47%; + font-size: 1.1em; + line-height: 1em; +} + +ul.topiclist dd.searchextra { + margin-left: 5px; + padding: 0.2em 0; + font-size: 1.1em; + color: #333333; + border-left: none; + clear: both; + width: 98%; + overflow: hidden; +} + +/* Container for post/reply buttons and pagination */ +.topic-actions { + margin-bottom: 3px; + font-size: 1.1em; + height: 28px; + min-height: 28px; +} +div[class].topic-actions { + height: auto; +} + +/* Post body styles +----------------------------------------*/ +.postbody { + padding: 0; + line-height: 1.48em; + color: #333333; + width: 76%; + float: left; + clear: both; +} + +.postbody .ignore { + font-size: 1.1em; +} + +.postbody h3.first { + /* The first post on the page uses this */ + font-size: 1.7em; +} + +.postbody h3 { + /* Postbody requires a different h3 format - so change it here */ + font-size: 1.5em; + padding: 2px 0 0 0; + margin: 0 0 0.3em 0 !important; + text-transform: none; + border: none; + font-family: "Trebuchet MS", Verdana, Helvetica, Arial, sans-serif; + line-height: 125%; +} + +.postbody h3 img { + /* Also see tweaks.css */ + vertical-align: bottom; +} + +.postbody .content { + font-size: 1.3em; +} + +.search .postbody { + width: 68% +} + +/* Topic review panel +----------------------------------------*/ +#review { + margin-top: 2em; +} + +#topicreview { + padding-right: 5px; + overflow: auto; + height: 300px; +} + +#topicreview .postbody { + width: auto; + float: none; + margin: 0; + height: auto; +} + +#topicreview .post { + height: auto; +} + +#topicreview h2 { + border-bottom-width: 0; +} + +/* Content container styles +----------------------------------------*/ +.content { + min-height: 3em; + overflow: hidden; + line-height: 1.4em; + font-family: "Lucida Grande", "Trebuchet MS", Verdana, Helvetica, Arial, sans-serif; + font-size: 1em; + color: #333333; +} + +.content h2, .panel h2 { + font-weight: normal; + color: #989898; + border-bottom: 1px solid #CCCCCC; + font-size: 1.6em; + margin-top: 0.5em; + margin-bottom: 0.5em; + padding-bottom: 0.5em; +} + +.panel h3 { + margin: 0.5em 0; +} + +.panel p { + font-size: 1.2em; + margin-bottom: 1em; + line-height: 1.4em; +} + +.content p { + font-family: "Lucida Grande", "Trebuchet MS", Verdana, Helvetica, Arial, sans-serif; + font-size: 1.2em; + margin-bottom: 1em; + line-height: 1.4em; +} + +dl.faq { + font-family: "Lucida Grande", Verdana, Helvetica, Arial, sans-serif; + font-size: 1.1em; + margin-top: 1em; + margin-bottom: 2em; + line-height: 1.4em; +} + +dl.faq dt { + font-weight: bold; + color: #333333; +} + +.content dl.faq { + font-size: 1.2em; + margin-bottom: 0.5em; +} + +.content li { + list-style-type: inherit; +} + +.content ul, .content ol { + margin-bottom: 1em; + margin-left: 3em; +} + +.posthilit { + background-color: #f3f3f3; + color: #BCBCBC; + padding: 0 2px 1px 2px; +} + +.announce, .unreadpost { + /* Highlight the announcements & unread posts box */ + border-left-color: #BCBCBC; + border-right-color: #BCBCBC; +} + +/* Post author */ +p.author { + margin: 0 15em 0.6em 0; + padding: 0 0 5px 0; + font-family: Verdana, Helvetica, Arial, sans-serif; + font-size: 1em; + line-height: 1.2em; +} + +/* Post signature */ +.signature { + margin-top: 1.5em; + padding-top: 0.2em; + font-size: 1.1em; + border-top: 1px solid #CCCCCC; + clear: left; + line-height: 140%; + overflow: hidden; + width: 100%; +} + +dd .signature { + margin: 0; + padding: 0; + clear: none; + border: none; +} + +/* Post noticies */ +.notice { + font-family: "Lucida Grande", Verdana, Helvetica, Arial, sans-serif; + width: auto; + margin-top: 1.5em; + padding-top: 0.2em; + font-size: 1em; + border-top: 1px dashed #CCCCCC; + clear: left; + line-height: 130%; +} + +/* Jump to post link for now */ +ul.searchresults { + list-style: none; + text-align: right; + clear: both; +} + +/* BB Code styles +----------------------------------------*/ +/* Quote block */ +blockquote { + /* Also see tweaks.css */ + margin: 1em 1px 1em 25px; + padding: 5px; + background: #ebebeb none 6px 8px no-repeat; + border:1px solid #dbdbdb; + font-size:0.95em; + margin:1em 1px 1em 25px; + overflow:hidden; + padding:5px; +} + +blockquote blockquote { + /* Nested quotes */ + background-color:#bababa; + font-size:1em; + margin:0.5em 1px 0pt 15px; +} + +blockquote blockquote blockquote { + /* Nested quotes */ + background-color: #e4e4e4; +} + +blockquote cite { + /* Username/source of quoter */ + font-style: normal; + font-weight: bold; + margin-left: 20px; + display: block; + font-size: 0.9em; +} + +blockquote cite cite { + font-size: 1em; +} + +blockquote.uncited { + padding-top: 25px; +} + +/* Code block */ +dl.codebox { + padding: 3px; + background-color: #FFFFFF; + border: 1px solid #d8d8d8; + font-size: 1em; +} + +dl.codebox dt { + text-transform: uppercase; + border-bottom: 1px solid #CCCCCC; + margin-bottom: 3px; + font-size: 0.8em; + font-weight: bold; + display: block; +} + +blockquote dl.codebox { + margin-left: 0; +} + +dl.codebox code { + /* Also see tweaks.css */ + overflow: auto; + display: block; + height: auto; + max-height: 200px; + white-space: normal; + padding-top: 5px; + font: 0.9em Monaco, "Andale Mono","Courier New", Courier, mono; + line-height: 1.3em; + color: #8b8b8b; + margin: 2px 0; +} + +.syntaxbg { color: #FFFFFF; } +.syntaxcomment { color: #000000; } +.syntaxdefault { color: #bcbcbc; } +.syntaxhtml { color: #000000; } +.syntaxkeyword { color: #585858; } +.syntaxstring { color: #a7a7a7; } + +/* Attachments +----------------------------------------*/ +.attachbox { + float: left; + width: auto; + margin: 5px 5px 5px 0; + padding: 6px; + background-color: #FFFFFF; + border: 1px dashed #d8d8d8; + clear: left; +} + +.pm-message .attachbox { + background-color: #f3f3f3; +} + +.attachbox dt { + font-family: Arial, Helvetica, sans-serif; + text-transform: uppercase; +} + +.attachbox dd { + margin-top: 4px; + padding-top: 4px; + clear: left; + border-top: 1px solid #d8d8d8; +} + +.attachbox dd dd { + border: none; +} + +.attachbox p { + line-height: 110%; + color: #666666; + font-weight: normal; + clear: left; +} + +.attachbox p.stats +{ + line-height: 110%; + color: #666666; + font-weight: normal; + clear: left; +} + +.attach-image { + margin: 3px 0; + width: 100%; + max-height: 350px; + overflow: auto; +} + +.attach-image img { + border: 1px solid #999999; +/* cursor: move; */ + cursor: default; +} + +/* Inline image thumbnails */ +div.inline-attachment dl.thumbnail, div.inline-attachment dl.file { + display: block; + margin-bottom: 4px; +} + +div.inline-attachment p { + font-size: 100%; +} + +dl.file { + font-family: Verdana, Arial, Helvetica, sans-serif; + display: block; +} + +dl.file dt { + text-transform: none; + margin: 0; + padding: 0; + font-weight: bold; + font-family: Verdana, Arial, Helvetica, sans-serif; +} + +dl.file dd { + color: #666666; + margin: 0; + padding: 0; +} + +dl.thumbnail img { + padding: 3px; + border: 1px solid #666666; + display: block; + background-color: #FFF; +} + +dl.thumbnail dd { + color: #666666; + font-style: italic; + font-family: Verdana, Arial, Helvetica, sans-serif; +} + +.attachbox dl.thumbnail dd { + font-size: 100%; +} + +dl.thumbnail dt a:hover { + background-color: #EEEEEE; +} + +dl.thumbnail dt a:hover img { + border: 1px solid #d2d2d2; +} + +/* Post poll styles +----------------------------------------*/ +fieldset.polls { + font-family: "Trebuchet MS", Verdana, Helvetica, Arial, sans-serif; +} + +fieldset.polls dl { + margin-top: 5px; + border-top: 1px solid #e2e2e2; + padding: 5px 0 0 0; + line-height: 120%; + color: #666666; +} + +fieldset.polls dl.voted { + font-weight: bold; + color: #000000; +} + +fieldset.polls dt { + text-align: left; + float: left; + display: block; + width: 30%; + border-right: none; + padding: 0; + margin: 0; + font-size: 1.1em; +} + +fieldset.polls dd { + float: left; + width: 10%; + border-left: none; + padding: 0 5px; + margin-left: 0; + font-size: 1.1em; +} + +fieldset.polls dd.resultbar { + width: 50%; +} + +fieldset.polls dd input { + margin: 2px 0; +} + +fieldset.polls dd div { + text-align: right; + font-family: Arial, Helvetica, sans-serif; + color: #FFFFFF; + font-weight: bold; + padding: 0 2px; + overflow: visible; + min-width: 2%; +} + +.pollbar1 { + background-color: #aaaaaa; + border-bottom: 1px solid #747474; + border-right: 1px solid #747474; +} + +.pollbar2 { + background-color: #bebebe; + border-bottom: 1px solid #8c8c8c; + border-right: 1px solid #8c8c8c; +} + +.pollbar3 { + background-color: #D1D1D1; + border-bottom: 1px solid #aaaaaa; + border-right: 1px solid #aaaaaa; +} + +.pollbar4 { + background-color: #e4e4e4; + border-bottom: 1px solid #bebebe; + border-right: 1px solid #bebebe; +} + +.pollbar5 { + background-color: #f8f8f8; + border-bottom: 1px solid #D1D1D1; + border-right: 1px solid #D1D1D1; +} + +/* Poster profile block +----------------------------------------*/ +.postprofile { + /* Also see tweaks.css */ + margin: 5px 0 10px 0; + min-height: 80px; + color: #666666; + border-left: 1px solid #FFFFFF; + width: 22%; + float: right; + display: inline; +} +.pm .postprofile { + border-left: 1px solid #DDDDDD; +} + +.postprofile dd, .postprofile dt { + line-height: 1.2em; + margin-left: 8px; +} + +.postprofile strong { + font-weight: normal; + color: #000000; +} + +.avatar { + border: none; + margin-bottom: 3px; +} + +.online { + background-image: none; + background-position: 100% 0; + background-repeat: no-repeat; +} + +/* Poster profile used by search*/ +.search .postprofile { + width: 30%; +} + +/* pm list in compose message if mass pm is enabled */ +dl.pmlist dt { + width: 60% !important; +} + +dl.pmlist dt textarea { + width: 95%; +} + +dl.pmlist dd { + margin-left: 61% !important; + margin-bottom: 2px; +} diff --git a/phpBB/styles/prosilver/theme/cp.css b/phpBB/styles/prosilver/theme/cp.css new file mode 100644 index 0000000000..fa8899bae8 --- /dev/null +++ b/phpBB/styles/prosilver/theme/cp.css @@ -0,0 +1,424 @@ +/* proSilver Control Panel Styles +---------------------------------------- */ + + +/* Main CP box +----------------------------------------*/ +#cp-menu { + float:left; + width: 19%; + margin-top: 1em; + margin-bottom: 5px; +} + +#cp-main { + float: left; + width: 81%; +} + +#cp-main .content { + padding: 0; +} + +#cp-main h3, #cp-main hr, #cp-menu hr { + border-color: #bfbfbf; +} + +#cp-main .panel p { + font-size: 1.1em; +} + +#cp-main .panel ol { + margin-left: 2em; + font-size: 1.1em; +} + +#cp-main .panel li.row { + border-bottom: 1px solid #cbcbcb; + border-top: 1px solid #F9F9F9; +} + +ul.cplist { + margin-bottom: 5px; + border-top: 1px solid #cbcbcb; +} + +#cp-main .panel li.header dd, #cp-main .panel li.header dt { + color: #000000; + margin-bottom: 2px; +} + +#cp-main table.table1 { + margin-bottom: 1em; +} + +#cp-main table.table1 thead th { + color: #333333; + font-weight: bold; + border-bottom: 1px solid #333333; + padding: 5px; +} + +#cp-main table.table1 tbody th { + font-style: italic; + background-color: transparent !important; + border-bottom: none; +} + +#cp-main .pagination { + float: right; + width: auto; + padding-top: 1px; +} + +#cp-main .postbody p { + font-size: 1.1em; +} + +#cp-main .pm-message { + border: 1px solid #e2e2e2; + margin: 10px 0; + background-color: #FFFFFF; + width: auto; + float: none; +} + +.pm-message h2 { + padding-bottom: 5px; +} + +#cp-main .postbody h3, #cp-main .box2 h3 { + margin-top: 0; +} + +#cp-main .buttons { + margin-left: 0; +} + +#cp-main ul.linklist { + margin: 0; +} + +/* MCP Specific tweaks */ +.mcp-main .postbody { + width: 100%; +} + +/* CP tabbed menu +----------------------------------------*/ +#tabs { + line-height: normal; + margin: 20px 0 -1px 7px; + min-width: 570px; +} + +#tabs ul { + margin:0; + padding: 0; + list-style: none; +} + +#tabs li { + display: inline; + margin: 0; + padding: 0; + font-size: 1em; + font-weight: bold; +} + +#tabs a { + float: left; + background: none no-repeat 0% -35px; + margin: 0 1px 0 0; + padding: 0 0 0 5px; + text-decoration: none; + position: relative; + cursor: pointer; +} + +#tabs a span { + float: left; + display: block; + background: none no-repeat 100% -35px; + padding: 6px 10px 6px 5px; + color: #828282; + white-space: nowrap; +} + +#tabs a:hover span { + color: #bcbcbc; +} + +#tabs .activetab a { + background-position: 0 0; + border-bottom: 1px solid #ebebeb; +} + +#tabs .activetab a span { + background-position: 100% 0; + padding-bottom: 7px; + color: #333333; +} + +#tabs a:hover { + background-position: 0 -70px; +} + +#tabs a:hover span { + background-position:100% -70px; +} + +#tabs .activetab a:hover { + background-position: 0 0; +} + +#tabs .activetab a:hover span { + color: #000000; + background-position: 100% 0; +} + +/* Mini tabbed menu used in MCP +----------------------------------------*/ +#minitabs { + line-height: normal; + margin: -20px 7px 0 0; +} + +#minitabs ul { + margin:0; + padding: 0; + list-style: none; +} + +#minitabs li { + display: block; + float: right; + padding: 0 10px 4px 10px; + font-size: 1em; + font-weight: bold; + background-color: #f2f2f2; + margin-left: 2px; +} + +#minitabs a { +} + +#minitabs a:hover { + text-decoration: none; +} + +#minitabs li.activetab { + background-color: #F9F9F9; +} + +#minitabs li.activetab a, #minitabs li.activetab a:hover { + color: #333333; +} + +/* UCP navigation menu +----------------------------------------*/ +/* Container for sub-navigation list */ +#navigation { + width: 100%; + padding-top: 36px; +} + +#navigation ul { + list-style:none; +} + +/* Default list state */ +#navigation li { + margin: 1px 0; + padding: 0; + font-weight: bold; + display: inline; +} + +/* Link styles for the sub-section links */ +#navigation a { + display: block; + padding: 5px; + margin: 1px 0; + text-decoration: none; + font-weight: bold; + color: #333; + background: #cfcfcf none repeat-y 100% 0; +} + +#navigation a:hover { + text-decoration: none; + background-color: #c6c6c6; + color: #bcbcbc; + background-image: none; +} + +#navigation #active-subsection a { + display: block; + color: #d3d3d3; + background-color: #F9F9F9; + background-image: none; +} + +#navigation #active-subsection a:hover { + color: #d3d3d3; +} + +/* Preferences pane layout +----------------------------------------*/ +#cp-main h2 { + border-bottom: none; + padding: 0; + margin-left: 10px; + color: #333333; +} + +#cp-main .panel { + background-color: #F9F9F9; +} + +#cp-main .pm { + background-color: #FFFFFF; +} + +#cp-main span.corners-top, #cp-menu span.corners-top { + background-image: none; +} + +#cp-main span.corners-top span, #cp-menu span.corners-top span { + background-image: none; +} + +#cp-main span.corners-bottom, #cp-menu span.corners-bottom { + background-image: none; +} + +#cp-main span.corners-bottom span, #cp-menu span.corners-bottom span { + background-image: none; +} + +/* Topicreview */ +#cp-main .panel #topicreview span.corners-top, #cp-menu .panel #topicreview span.corners-top { + background-image: none; +} + +#cp-main .panel #topicreview span.corners-top span, #cp-menu .panel #topicreview span.corners-top span { + background-image: none; +} + +#cp-main .panel #topicreview span.corners-bottom, #cp-menu .panel #topicreview span.corners-bottom { + background-image: none; +} + +#cp-main .panel #topicreview span.corners-bottom span, #cp-menu .panel #topicreview span.corners-bottom span { + background-image: none; +} + +/* Friends list */ +.cp-mini { + background-color: #f9f9f9; + padding: 0 5px; + margin: 10px 15px 10px 5px; +} + +.cp-mini span.corners-top, .cp-mini span.corners-bottom { + margin: 0 -5px; +} + +dl.mini dt { + font-weight: bold; + color: #676767; +} + +dl.mini dd { + padding-top: 4px; +} + +.friend-online { + font-weight: bold; +} + +.friend-offline { + font-style: italic; +} + +/* PM Styles +----------------------------------------*/ +#pm-menu { + line-height: 2.5em; +} + +/* PM Message history */ +.current { + color: #999999; +} + +/* Defined rules list for PM options */ +ol.def-rules { + padding-left: 0; +} + +ol.def-rules li { + line-height: 180%; + padding: 1px; +} + +/* PM marking colours */ +.pmlist li.bg1 { + border: solid 3px transparent; + border-width: 0 3px; +} + +.pmlist li.bg2 { + border: solid 3px transparent; + border-width: 0 3px; +} + +.pmlist li.pm_message_reported_colour, .pm_message_reported_colour { + border-left-color: #bcbcbc; + border-right-color: #bcbcbc; +} + +.pmlist li.pm_marked_colour, .pm_marked_colour { + border: solid 3px #ffffff; + border-width: 0 3px; +} + +.pmlist li.pm_replied_colour, .pm_replied_colour { + border: solid 3px #c2c2c2; + border-width: 0 3px; +} + +.pmlist li.pm_friend_colour, .pm_friend_colour { + border: solid 3px #bdbdbd; + border-width: 0 3px; +} + +.pmlist li.pm_foe_colour, .pm_foe_colour { + border: solid 3px #000000; + border-width: 0 3px; +} + +.pm-legend { + border-left-width: 10px; + border-left-style: solid; + border-right-width: 0; + margin-bottom: 3px; + padding-left: 3px; +} + +/* Avatar gallery */ +#gallery label { + position: relative; + float: left; + margin: 10px; + padding: 5px; + width: auto; + background: #FFFFFF; + border: 1px solid #CCC; + text-align: center; +} + +#gallery label:hover { + background-color: #EEE; +} diff --git a/phpBB/styles/prosilver/theme/forms.css b/phpBB/styles/prosilver/theme/forms.css new file mode 100644 index 0000000000..0ef5743698 --- /dev/null +++ b/phpBB/styles/prosilver/theme/forms.css @@ -0,0 +1,370 @@ +/* proSilver Form Styles +---------------------------------------- */ + +/* General form styles +----------------------------------------*/ +fieldset { + border-width: 0; + font-family: Verdana, Helvetica, Arial, sans-serif; + font-size: 1.1em; +} + +input { + font-weight: normal; + cursor: pointer; + vertical-align: middle; + padding: 0 3px; + font-size: 1em; + font-family: Verdana, Helvetica, Arial, sans-serif; +} + +select { + font-family: Verdana, Helvetica, Arial, sans-serif; + font-weight: normal; + cursor: pointer; + vertical-align: middle; + border: 1px solid #666666; + padding: 1px; + background-color: #FAFAFA; +} + +option { + padding-right: 1em; +} + +textarea { + font-family: "Lucida Grande", Verdana, Helvetica, Arial, sans-serif; + width: 60%; + padding: 2px; + font-size: 1em; + line-height: 1.4em; +} + +label { + cursor: default; + padding-right: 5px; + color: #676767; +} + +label input { + vertical-align: middle; +} + +label img { + vertical-align: middle; +} + +/* Definition list layout for forms +---------------------------------------- */ +fieldset dl { + padding: 4px 0; +} + +fieldset dt { + float: left; + width: 40%; + text-align: left; + display: block; +} + +fieldset dd { + margin-left: 41%; + vertical-align: top; + margin-bottom: 3px; +} + +/* Specific layout 1 */ +fieldset.fields1 dt { + width: 10em; + border-right-width: 0; +} + +fieldset.fields1 dd { + margin-left: 10em; + border-left-width: 0; +} + +fieldset.fields1 { + background-color: transparent; +} + +fieldset.fields1 div { + margin-bottom: 3px; +} + +/* Specific layout 2 */ +fieldset.fields2 dt { + width: 15em; + border-right-width: 0; +} + +fieldset.fields2 dd { + margin-left: 16em; + border-left-width: 0; +} + +/* Form elements */ +dt label { + font-weight: bold; + text-align: left; +} + +dd label { + white-space: nowrap; + color: #333; +} + +dd input, dd textarea { + margin-right: 3px; +} + +dd select { + width: auto; +} + +dd textarea { + width: 85%; +} + +/* Hover effects */ +fieldset dl:hover dt label { + color: #000000; +} + +fieldset.fields2 dl:hover dt label { + color: inherit; +} + +#timezone { + width: 95%; +} + +* html #timezone { + width: 50%; +} + +/* Quick-login on index page */ +fieldset.quick-login { + margin-top: 5px; +} + +fieldset.quick-login input { + width: 15%; + vertical-align: middle; + margin-right: 5px; + background-color: #f3f3f3; +} + +fieldset.quick-login label { + white-space: nowrap; + padding-right: 2px; +} + +/* Display options on viewtopic/viewforum pages */ +fieldset.display-options { + text-align: center; + margin: 3px 0 5px 0; +} + +fieldset.display-options label { + white-space: nowrap; + padding-right: 2px; +} + +fieldset.display-options a { + margin-top: 3px; +} + +/* Display actions for ucp and mcp pages */ +fieldset.display-actions { + text-align: right; + line-height: 2em; + white-space: nowrap; + padding-right: 1em; +} + +fieldset.display-actions label { + white-space: nowrap; + padding-right: 2px; +} + +fieldset.sort-options { + line-height: 2em; +} + +/* MCP forum selection*/ +fieldset.forum-selection { + margin: 5px 0 3px 0; + float: right; +} + +fieldset.forum-selection2 { + margin: 13px 0 3px 0; + float: right; +} + +/* Jumpbox */ +fieldset.jumpbox { + text-align: right; + margin-top: 15px; + height: 2.5em; +} + +fieldset.quickmod { + width: 50%; + float: right; + text-align: right; + height: 2.5em; +} + +/* Submit button fieldset */ +fieldset.submit-buttons { + text-align: center; + vertical-align: middle; + margin: 5px 0; +} + +fieldset.submit-buttons input { + vertical-align: middle; + padding-top: 3px; + padding-bottom: 3px; +} + +/* Posting page styles +----------------------------------------*/ + +/* Buttons used in the editor */ +#format-buttons { + margin: 15px 0 2px 0; +} + +#format-buttons input, #format-buttons select { + vertical-align: middle; +} + +/* Main message box */ +#message-box { + width: 80%; +} + +#message-box textarea { + font-family: "Trebuchet MS", Verdana, Helvetica, Arial, sans-serif; + width: 100%; + font-size: 1.2em; + color: #333333; +} + +/* Emoticons panel */ +#smiley-box { + width: 18%; + float: right; +} + +#smiley-box img { + margin: 3px; +} + +/* Input field styles +---------------------------------------- */ +.inputbox { + background-color: #FFFFFF; + border: 1px solid #c0c0c0; + color: #333333; + padding: 2px; + cursor: text; +} + +.inputbox:hover { + border: 1px solid #eaeaea; +} + +.inputbox:focus { + border: 1px solid #eaeaea; + color: #4b4b4b; +} + +input.checkbox { + width: auto !important; + background-color: transparent !important; +} + +input.inputbox { width: 85%; } +input.medium { width: 50%; } +input.narrow { width: 25%; } +input.tiny { width: 110px; } + +textarea.inputbox { + width: 85%; +} + +.autowidth { + width: auto !important; +} + +/* Form button styles +---------------------------------------- */ +input.button1, input.button2 { + font-size: 1em; +} + +a.button1, input.button1, input.button3, a.button2, input.button2 { + width: auto !important; + padding-top: 1px; + padding-bottom: 1px; + font-family: "Lucida Grande", Verdana, Helvetica, Arial, sans-serif; + color: #000; + background: #FAFAFA none repeat-x top; +} + +a.button1, input.button1 { + font-weight: bold; + border: 1px solid #666666; +} + +input.button3 { + padding: 0; + margin: 0; + line-height: 5px; + height: 12px; + background-image: none; + font-variant: small-caps; +} + +/* Alternative button */ +a.button2, input.button2, input.button3 { + border: 1px solid #666666; +} + +/* button in the style of the form buttons */ +a.button1, a.button1:link, a.button1:visited, a.button1:active, a.button2, a.button2:link, a.button2:visited, a.button2:active { + text-decoration: none; + color: #000000; + padding: 2px 8px; + line-height: 250%; + vertical-align: text-bottom; + background-position: 0 1px; +} + +/* Hover states */ +a.button1:hover, input.button1:hover, a.button2:hover, input.button2:hover, input.button3:hover { + border: 1px solid #BCBCBC; + background-position: 0 100%; + color: #BCBCBC; +} + +/* Topic and forum Search */ +.search-box { + margin-top: 3px; + margin-left: 5px; + float: left; +} + +.search-box input { +} + +input.search { + background-image: none; + background-repeat: no-repeat; + background-position: left 1px; + padding-left: 17px; +} diff --git a/phpBB/styles/prosilver/theme/images/arrow_down.gif b/phpBB/styles/prosilver/theme/images/arrow_down.gif new file mode 100644 index 0000000000..e45c365ecc Binary files /dev/null and b/phpBB/styles/prosilver/theme/images/arrow_down.gif differ diff --git a/phpBB/styles/prosilver/theme/images/arrow_left.gif b/phpBB/styles/prosilver/theme/images/arrow_left.gif new file mode 100644 index 0000000000..076a5596f1 Binary files /dev/null and b/phpBB/styles/prosilver/theme/images/arrow_left.gif differ diff --git a/phpBB/styles/prosilver/theme/images/arrow_right.gif b/phpBB/styles/prosilver/theme/images/arrow_right.gif new file mode 100644 index 0000000000..c5827a401f Binary files /dev/null and b/phpBB/styles/prosilver/theme/images/arrow_right.gif differ diff --git a/phpBB/styles/prosilver/theme/images/arrow_up.gif b/phpBB/styles/prosilver/theme/images/arrow_up.gif new file mode 100644 index 0000000000..38b5a62c17 Binary files /dev/null and b/phpBB/styles/prosilver/theme/images/arrow_up.gif differ diff --git a/phpBB/styles/prosilver/theme/images/bg_button.gif b/phpBB/styles/prosilver/theme/images/bg_button.gif new file mode 100644 index 0000000000..03172ff5c6 Binary files /dev/null and b/phpBB/styles/prosilver/theme/images/bg_button.gif differ diff --git a/phpBB/styles/prosilver/theme/images/bg_header.gif b/phpBB/styles/prosilver/theme/images/bg_header.gif new file mode 100644 index 0000000000..351de9f46a Binary files /dev/null and b/phpBB/styles/prosilver/theme/images/bg_header.gif differ diff --git a/phpBB/styles/prosilver/theme/images/bg_list.gif b/phpBB/styles/prosilver/theme/images/bg_list.gif new file mode 100644 index 0000000000..89f8963fde Binary files /dev/null and b/phpBB/styles/prosilver/theme/images/bg_list.gif differ diff --git a/phpBB/styles/prosilver/theme/images/bg_menu.gif b/phpBB/styles/prosilver/theme/images/bg_menu.gif new file mode 100644 index 0000000000..4a9f5a9174 Binary files /dev/null and b/phpBB/styles/prosilver/theme/images/bg_menu.gif differ diff --git a/phpBB/styles/prosilver/theme/images/bg_tabs1.gif b/phpBB/styles/prosilver/theme/images/bg_tabs1.gif new file mode 100644 index 0000000000..335a72c711 Binary files /dev/null and b/phpBB/styles/prosilver/theme/images/bg_tabs1.gif differ diff --git a/phpBB/styles/prosilver/theme/images/bg_tabs2.gif b/phpBB/styles/prosilver/theme/images/bg_tabs2.gif new file mode 100644 index 0000000000..a2142d5432 Binary files /dev/null and b/phpBB/styles/prosilver/theme/images/bg_tabs2.gif differ diff --git a/phpBB/styles/prosilver/theme/images/corners_left.gif b/phpBB/styles/prosilver/theme/images/corners_left.gif new file mode 100644 index 0000000000..206e50368d Binary files /dev/null and b/phpBB/styles/prosilver/theme/images/corners_left.gif differ diff --git a/phpBB/styles/prosilver/theme/images/corners_left.png b/phpBB/styles/prosilver/theme/images/corners_left.png new file mode 100644 index 0000000000..256bde3daa Binary files /dev/null and b/phpBB/styles/prosilver/theme/images/corners_left.png differ diff --git a/phpBB/styles/prosilver/theme/images/corners_left2.gif b/phpBB/styles/prosilver/theme/images/corners_left2.gif new file mode 100644 index 0000000000..fa27ce3ba2 Binary files /dev/null and b/phpBB/styles/prosilver/theme/images/corners_left2.gif differ diff --git a/phpBB/styles/prosilver/theme/images/corners_right.gif b/phpBB/styles/prosilver/theme/images/corners_right.gif new file mode 100644 index 0000000000..0ba66d50b2 Binary files /dev/null and b/phpBB/styles/prosilver/theme/images/corners_right.gif differ diff --git a/phpBB/styles/prosilver/theme/images/corners_right.png b/phpBB/styles/prosilver/theme/images/corners_right.png new file mode 100644 index 0000000000..df41823b4c Binary files /dev/null and b/phpBB/styles/prosilver/theme/images/corners_right.png differ diff --git a/phpBB/styles/prosilver/theme/images/corners_right2.gif b/phpBB/styles/prosilver/theme/images/corners_right2.gif new file mode 100644 index 0000000000..2d689446ee Binary files /dev/null and b/phpBB/styles/prosilver/theme/images/corners_right2.gif differ diff --git a/phpBB/styles/prosilver/theme/images/created_by.jpg b/phpBB/styles/prosilver/theme/images/created_by.jpg new file mode 100644 index 0000000000..68d56e2013 Binary files /dev/null and b/phpBB/styles/prosilver/theme/images/created_by.jpg differ diff --git a/phpBB/styles/prosilver/theme/images/gradient.gif b/phpBB/styles/prosilver/theme/images/gradient.gif new file mode 100644 index 0000000000..21dc11f13b Binary files /dev/null and b/phpBB/styles/prosilver/theme/images/gradient.gif differ diff --git a/phpBB/styles/prosilver/theme/images/icon_bookmark.gif b/phpBB/styles/prosilver/theme/images/icon_bookmark.gif new file mode 100644 index 0000000000..2644293f7d Binary files /dev/null and b/phpBB/styles/prosilver/theme/images/icon_bookmark.gif differ diff --git a/phpBB/styles/prosilver/theme/images/icon_bump.gif b/phpBB/styles/prosilver/theme/images/icon_bump.gif new file mode 100644 index 0000000000..014cd9bd15 Binary files /dev/null and b/phpBB/styles/prosilver/theme/images/icon_bump.gif differ diff --git a/phpBB/styles/prosilver/theme/images/icon_faq.gif b/phpBB/styles/prosilver/theme/images/icon_faq.gif new file mode 100644 index 0000000000..4e26460629 Binary files /dev/null and b/phpBB/styles/prosilver/theme/images/icon_faq.gif differ diff --git a/phpBB/styles/prosilver/theme/images/icon_fontsize.gif b/phpBB/styles/prosilver/theme/images/icon_fontsize.gif new file mode 100644 index 0000000000..1c7d83527c Binary files /dev/null and b/phpBB/styles/prosilver/theme/images/icon_fontsize.gif differ diff --git a/phpBB/styles/prosilver/theme/images/icon_home.gif b/phpBB/styles/prosilver/theme/images/icon_home.gif new file mode 100644 index 0000000000..8ae9004534 Binary files /dev/null and b/phpBB/styles/prosilver/theme/images/icon_home.gif differ diff --git a/phpBB/styles/prosilver/theme/images/icon_logout.gif b/phpBB/styles/prosilver/theme/images/icon_logout.gif new file mode 100644 index 0000000000..b8ad5c4e5c Binary files /dev/null and b/phpBB/styles/prosilver/theme/images/icon_logout.gif differ diff --git a/phpBB/styles/prosilver/theme/images/icon_members.gif b/phpBB/styles/prosilver/theme/images/icon_members.gif new file mode 100644 index 0000000000..48e3e5f5f3 Binary files /dev/null and b/phpBB/styles/prosilver/theme/images/icon_members.gif differ diff --git a/phpBB/styles/prosilver/theme/images/icon_pages.gif b/phpBB/styles/prosilver/theme/images/icon_pages.gif new file mode 100644 index 0000000000..44cc34500e Binary files /dev/null and b/phpBB/styles/prosilver/theme/images/icon_pages.gif differ diff --git a/phpBB/styles/prosilver/theme/images/icon_print.gif b/phpBB/styles/prosilver/theme/images/icon_print.gif new file mode 100644 index 0000000000..a71dfdde70 Binary files /dev/null and b/phpBB/styles/prosilver/theme/images/icon_print.gif differ diff --git a/phpBB/styles/prosilver/theme/images/icon_register.gif b/phpBB/styles/prosilver/theme/images/icon_register.gif new file mode 100644 index 0000000000..9ecf126c4f Binary files /dev/null and b/phpBB/styles/prosilver/theme/images/icon_register.gif differ diff --git a/phpBB/styles/prosilver/theme/images/icon_search.gif b/phpBB/styles/prosilver/theme/images/icon_search.gif new file mode 100644 index 0000000000..8492cd308c Binary files /dev/null and b/phpBB/styles/prosilver/theme/images/icon_search.gif differ diff --git a/phpBB/styles/prosilver/theme/images/icon_sendemail.gif b/phpBB/styles/prosilver/theme/images/icon_sendemail.gif new file mode 100644 index 0000000000..f6b8aa10e1 Binary files /dev/null and b/phpBB/styles/prosilver/theme/images/icon_sendemail.gif differ diff --git a/phpBB/styles/prosilver/theme/images/icon_subscribe.gif b/phpBB/styles/prosilver/theme/images/icon_subscribe.gif new file mode 100644 index 0000000000..5ca18af80a Binary files /dev/null and b/phpBB/styles/prosilver/theme/images/icon_subscribe.gif differ diff --git a/phpBB/styles/prosilver/theme/images/icon_textbox_search.gif b/phpBB/styles/prosilver/theme/images/icon_textbox_search.gif new file mode 100644 index 0000000000..b3b51d8425 Binary files /dev/null and b/phpBB/styles/prosilver/theme/images/icon_textbox_search.gif differ diff --git a/phpBB/styles/prosilver/theme/images/icon_ucp.gif b/phpBB/styles/prosilver/theme/images/icon_ucp.gif new file mode 100644 index 0000000000..2a5fcc3f0c Binary files /dev/null and b/phpBB/styles/prosilver/theme/images/icon_ucp.gif differ diff --git a/phpBB/styles/prosilver/theme/images/icon_unsubscribe.gif b/phpBB/styles/prosilver/theme/images/icon_unsubscribe.gif new file mode 100644 index 0000000000..27013fc1cb Binary files /dev/null and b/phpBB/styles/prosilver/theme/images/icon_unsubscribe.gif differ diff --git a/phpBB/styles/prosilver/theme/images/index.htm b/phpBB/styles/prosilver/theme/images/index.htm new file mode 100644 index 0000000000..e69de29bb2 diff --git a/phpBB/styles/subSilver/theme/images/no_avatar.gif b/phpBB/styles/prosilver/theme/images/no_avatar.gif similarity index 100% rename from phpBB/styles/subSilver/theme/images/no_avatar.gif rename to phpBB/styles/prosilver/theme/images/no_avatar.gif diff --git a/phpBB/styles/prosilver/theme/images/quote.gif b/phpBB/styles/prosilver/theme/images/quote.gif new file mode 100644 index 0000000000..d1992273e6 Binary files /dev/null and b/phpBB/styles/prosilver/theme/images/quote.gif differ diff --git a/phpBB/styles/prosilver/theme/index.htm b/phpBB/styles/prosilver/theme/index.htm new file mode 100644 index 0000000000..e69de29bb2 diff --git a/phpBB/styles/prosilver/theme/large.css b/phpBB/styles/prosilver/theme/large.css new file mode 100644 index 0000000000..dfb1d2c2e6 --- /dev/null +++ b/phpBB/styles/prosilver/theme/large.css @@ -0,0 +1,3 @@ +body { + font-size: 12px; +} \ No newline at end of file diff --git a/phpBB/styles/prosilver/theme/links.css b/phpBB/styles/prosilver/theme/links.css new file mode 100644 index 0000000000..4c4ccd31a9 --- /dev/null +++ b/phpBB/styles/prosilver/theme/links.css @@ -0,0 +1,199 @@ +/* proSilver Link Styles +---------------------------------------- */ + +a:link { color: #898989; text-decoration: none; } +a:visited { color: #898989; text-decoration: none; } +a:hover { color: #d3d3d3; text-decoration: underline; } +a:active { color: #d2d2d2; text-decoration: none; } + +/* Coloured usernames */ +.username-coloured { + font-weight: bold; + display: inline !important; +} + +/* Links on gradient backgrounds */ +#search-box a:link, .navbg a:link, .forumbg .header a:link, .forabg .header a:link, th a:link { + color: #FFFFFF; + text-decoration: none; +} + +#search-box a:visited, .navbg a:visited, .forumbg .header a:visited, .forabg .header a:visited, th a:visited { + color: #FFFFFF; + text-decoration: none; +} + +#search-box a:hover, .navbg a:hover, .forumbg .header a:hover, .forabg .header a:hover, th a:hover { + color: #ffffff; + text-decoration: underline; +} + +#search-box a:active, .navbg a:active, .forumbg .header a:active, .forabg .header a:active, th a:active { + color: #ffffff; + text-decoration: none; +} + +/* Links for forum/topic lists */ +a.forumtitle { + font-family: "Trebuchet MS", Helvetica, Arial, Sans-serif; + font-size: 1.2em; + font-weight: bold; + color: #898989; + text-decoration: none; +} + +/* a.forumtitle:visited { color: #898989; } */ + +a.forumtitle:hover { + color: #bcbcbc; + text-decoration: underline; +} + +a.forumtitle:active { + color: #898989; +} + +a.topictitle { + font-family: "Trebuchet MS", Helvetica, Arial, Sans-serif; + font-size: 1.2em; + font-weight: bold; + color: #898989; + text-decoration: none; +} + +/* a.topictitle:visited { color: #d2d2d2; } */ + +a.topictitle:hover { + color: #bcbcbc; + text-decoration: underline; +} + +a.topictitle:active { + color: #898989; +} + +/* Post body links */ +.postlink { + text-decoration: none; + color: #d2d2d2; + border-bottom: 1px solid #d2d2d2; + padding-bottom: 0; +} + +.postlink:visited { + color: #bdbdbd; + border-bottom-style: dotted; + border-bottom-color: #666666; +} + +.postlink:active { + color: #d2d2d2; +} + +.postlink:hover { + background-color: #f6f6f6; + text-decoration: none; + color: #404040; +} + +.signature a, .signature a:visited, .signature a:active, .signature a:hover { + border: none; + text-decoration: underline; + background-color: transparent; +} + +/* Profile links */ +.postprofile a:link, .postprofile a:active, .postprofile a:visited, .postprofile dt.author a { + font-weight: bold; + color: #898989; + text-decoration: none; +} + +.postprofile a:hover, .postprofile dt.author a:hover { + text-decoration: underline; + color: #d3d3d3; +} + + +/* Profile searchresults */ +.search .postprofile a { + color: #898989; + text-decoration: none; + font-weight: normal; +} + +.search .postprofile a:hover { + color: #d3d3d3; + text-decoration: underline; +} + +/* Back to top of page */ +.back2top { + clear: both; + height: 11px; + text-align: right; +} + +a.top { + background: none no-repeat top left; + text-decoration: none; + width: {IMG_ICON_BACK_TOP_WIDTH}px; + height: {IMG_ICON_BACK_TOP_HEIGHT}px; + display: block; + float: right; + overflow: hidden; + letter-spacing: 1000px; + text-indent: 11px; +} + +a.top2 { + background: none no-repeat 0 50%; + text-decoration: none; + padding-left: 15px; +} + +/* Arrow links */ +a.up { background: none no-repeat left center; } +a.down { background: none no-repeat right center; } +a.left { background: none no-repeat 3px 60%; } +a.right { background: none no-repeat 95% 60%; } + +a.up, a.up:link, a.up:active, a.up:visited { + padding-left: 10px; + text-decoration: none; + border-bottom-width: 0; +} + +a.up:hover { + background-position: left top; + background-color: transparent; +} + +a.down, a.down:link, a.down:active, a.down:visited { + padding-right: 10px; +} + +a.down:hover { + background-position: right bottom; + text-decoration: none; +} + +a.left, a.left:active, a.left:visited { + padding-left: 12px; +} + +a.left:hover { + color: #d2d2d2; + text-decoration: none; + background-position: 0 60%; +} + +a.right, a.right:active, a.right:visited { + padding-right: 12px; +} + +a.right:hover { + color: #d2d2d2; + text-decoration: none; + background-position: 100% 60%; +} diff --git a/phpBB/styles/prosilver/theme/medium.css b/phpBB/styles/prosilver/theme/medium.css new file mode 100644 index 0000000000..4c992f9fd8 --- /dev/null +++ b/phpBB/styles/prosilver/theme/medium.css @@ -0,0 +1,3 @@ +body { + font-size: 11px; +} \ No newline at end of file diff --git a/phpBB/styles/prosilver/theme/normal.css b/phpBB/styles/prosilver/theme/normal.css new file mode 100644 index 0000000000..d0783d1882 --- /dev/null +++ b/phpBB/styles/prosilver/theme/normal.css @@ -0,0 +1,3 @@ +body { + font-size: 10px; +} \ No newline at end of file diff --git a/phpBB/styles/prosilver/theme/print.css b/phpBB/styles/prosilver/theme/print.css new file mode 100644 index 0000000000..3143b3cf9b --- /dev/null +++ b/phpBB/styles/prosilver/theme/print.css @@ -0,0 +1,129 @@ +/* proSilver Print Style Sheet +------------------------------------------------- + Author: subBlue ( http://www.subBlue.com/ ) + Version: 25 August 2004 + + Copyright 2004 phpBB Group +-------------------------------------------------*/ + + +/* Lots still TODO here! */ + +/* General markup styles */ +* { + padding: 0; + margin: 0; +} + +body { + font: 11pt Verdana, Arial, Helvetica, sans-serif; + color:#000000; +} + +a:link { color: #000000; text-decoration: none; } +a:visited { color: #000000; text-decoration: none; } +a:active { color: #000000; text-decoration: none; } + +img, .noprint, #sub-header, #sub-footer, .navbar, .box1, .divider, .signature { display: none; } + +/* Container for the main body */ +#wrap { + margin: 0 2em; +} + +p { font-size: 85%; } +.copyright { font-size: 75%; } +.page-number { float:right; width: auto; text-align: right; font-size: 75%; } + +h1, h2, h3, h1 a, h2 a, h3 a { + font-family: "Trebuchet MS",georgia,Verdana,Sans-serif; + color: #000000; + background: none; + text-decoration: none; + font-weight: bold; +} + +h1 { font-size: 20pt; } +h2 { font-size: 16pt; margin-top: 1em; } +h3 { font-size: 14pt; margin-top: 1em; } + +.content { + font-size: 11pt; + line-height: 14pt; + margin-bottom: 1em; + font-family: "Lucida Grande", "Trebuchet MS", Verdana, Arial, Helvetica, sans-serif; + overflow: hidden; +} + +/* CSS2 Print tip from: http://www.alistapart.com/articles/goingtoprint/ */ +.postbody a:link, .postbody a:visited, .postbody a:active, .postbody a:hover { + text-decoration: underline; + padding: 0.1em 0.2em; + margin: -0.1em -0.2em; + color: #666; + background: none; + font-size: 100%; +} + +html>body .postbody a:link:after, html>body .postbody a:visited:after { + content: " (" attr(href) ") "; + font-size: 90%; + text-decoration: none; +} + +hr { + height: 1px; + background-color: #999999; + border-width: 0; +} + +.author { + font-family: Verdana, Arial, Helvetica, sans-serif; + font-size: 75%; + margin-bottom: 0.6em; +} + +.date { + font-family: Verdana, Arial, Helvetica, sans-serif; + float: right; + position: relative; + text-align: right; + font-size: 75%; +} + +/* Dont want to print url for names or titles in content area */ +.postbody .author a:link, .postbody .author a:visited, +html>body .postbody .author a:link:after, +html>body .postbody .author a:visited:after, +.postquote .quote-by a:link, .postquote .quote-by a:visited, +html>body .postquote .quote-by a:link:after, +html>body .postquote .quote-by a:visited:after, +html>body .postbody h1 a:link:after, html>body .postbody h2 a:link:after { + text-decoration: none; + content: ""; +} + +/* Poster profile */ +.postprofile { display: none; } +.grip-show { display:none; } + +/* Quote */ +.postquote { + font-size: 85%; + margin: 1em 18% 1em 4%; + padding: 0.5em; + position: relative; + line-height: 1.5em; + border: 1px #999999 solid; +} + +.postquote img { display: none; } +.postquote span { display: block; } +.postquote span .postquote { font-size: 100%; } +.quote-by { font-weight: bold; } + +/* Misc page elements */ +div.spacer { clear: both; } + +/* Accessibility tweaks: Mozilla.org */ +.skip_link { display: none; } diff --git a/phpBB/styles/prosilver/theme/stylesheet.css b/phpBB/styles/prosilver/theme/stylesheet.css new file mode 100644 index 0000000000..c7db605bbb --- /dev/null +++ b/phpBB/styles/prosilver/theme/stylesheet.css @@ -0,0 +1,19 @@ +/* phpBB 3.0 Style Sheet + -------------------------------------------------------------- + Style name: proSilver + Based on style: proSilver (this is the default phpBB 3 style) + Original author: subBlue ( http://www.subBlue.com/ ) + Modified by: + + Copyright 2006 phpBB Group ( http://www.phpbb.com/ ) + -------------------------------------------------------------- +*/ + +@import url("common.css"); +@import url("links.css"); +@import url("content.css"); +@import url("buttons.css"); +@import url("cp.css"); +@import url("forms.css"); +@import url("tweaks.css"); +@import url("colours.css"); diff --git a/phpBB/styles/prosilver/theme/theme.cfg b/phpBB/styles/prosilver/theme/theme.cfg new file mode 100644 index 0000000000..19fb8517b2 --- /dev/null +++ b/phpBB/styles/prosilver/theme/theme.cfg @@ -0,0 +1,35 @@ +# +# phpBB Theme Configuration File +# +# @package phpBB3 +# @copyright (c) 2006 phpBB Group +# @license http://opensource.org/licenses/gpl-license.php GNU Public License +# +# +# At the left is the name, please do not change this +# At the right the value is entered +# For on/off options the valid values are on, off, 1, 0, true and false +# +# Values get trimmed, if you want to add a space in front or at the end of +# the value, then enclose the value with single or double quotes. +# Single and double quotes do not need to be escaped. +# +# Available and used values: +# parse_css_file +# + +# General Information about this theme +name = prosilver +copyright = © phpBB Group, 2007 +version = 3.0.0 + +# Some configuration options + +# +# You have to turn this option on if you want to use the +# path template variables ({T_IMAGESET_PATH} for example) within +# your css file. +# This is mostly the case if you want to use language specific +# images within your css file. +# +parse_css_file = 1 diff --git a/phpBB/styles/prosilver/theme/tweaks.css b/phpBB/styles/prosilver/theme/tweaks.css new file mode 100644 index 0000000000..e3a2557fc5 --- /dev/null +++ b/phpBB/styles/prosilver/theme/tweaks.css @@ -0,0 +1,64 @@ +/* proSilver Style Sheet Tweaks + +These style definitions are mainly IE specific +tweaks required due to its poor CSS support. +-------------------------------------------------*/ + +* html table, * html select, * html input { font-size: 100%; } +* html hr { margin: 0; } +* html span.corners-top, * html span.corners-bottom { background-image: url("{T_THEME_PATH}/images/corners_left.gif"); } +* html span.corners-top span, * html span.corners-bottom span { background-image: url("{T_THEME_PATH}/images/corners_right.gif"); } + +table.table1 { + width: 99%; /* IE < 6 browsers */ + /* Tantek hack */ + voice-family: "\"}\""; + voice-family: inherit; + width: 100%; +} +html>body table.table1 { width: 100%; } /* Reset 100% for opera */ + +* html ul.topiclist li { position: relative; } +* html .postbody h3 img { vertical-align: middle; } + +/* Form styles */ +html>body dd label input { vertical-align: text-bottom; } /* Align checkboxes/radio buttons nicely */ + +* html input.button1, * html input.button2 { + padding-bottom: 0; + margin-bottom: 1px; +} + +/* Misc layout styles */ +* html .column1, * html .column2 { width: 45%; } + +/* Nice method for clearing floated blocks without having to insert any extra markup (like spacer above) + From http://www.positioniseverything.net/easyclearing.html */ +#tabs:after, #minitabs:after, .post:after, .navbar:after, fieldset dl:after, ul.topiclist dl:after, ul.linklist:after, dl.polls:after { + content: "."; + display: block; + height: 0; + clear: both; + visibility: hidden; +} + +#tabs, #minitabs, .post, .navbar, fieldset dl, ul.topiclist dl, ul.linklist, dl.polls { + height: 1%; +} + +/* Simple fix so forum and topic lists always have a min-height set, even in IE6 + From http://www.dustindiaz.com/min-height-fast-hack */ +dl.icon { + min-height: 35px; + height: auto !important; + height: 35px; +} + +* html #search-box { + margin-right: 35px; +} + +* html .rtl #search-box { + margin-right: 0; + margin-left: 35px; +} \ No newline at end of file diff --git a/phpBB/styles/subSilver/imageset/site_logo.gif b/phpBB/styles/subSilver/imageset/site_logo.gif deleted file mode 100644 index f149bbc15e..0000000000 Binary files a/phpBB/styles/subSilver/imageset/site_logo.gif and /dev/null differ diff --git a/phpBB/styles/subSilver/template/mcp_footer.html b/phpBB/styles/subSilver/template/mcp_footer.html deleted file mode 100644 index 0b3680bf9e..0000000000 --- a/phpBB/styles/subSilver/template/mcp_footer.html +++ /dev/null @@ -1,27 +0,0 @@ - - - - - - - - - - - - -
     [ {TOTAL} ] 
    -
    - - - - -
    - - - -
    - -
    - - \ No newline at end of file diff --git a/phpBB/styles/subSilver/template/ucp_main_bookmarks.html b/phpBB/styles/subSilver/template/ucp_main_bookmarks.html deleted file mode 100644 index b8ab6fa30c..0000000000 --- a/phpBB/styles/subSilver/template/ucp_main_bookmarks.html +++ /dev/null @@ -1,61 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    {L_UCP}
    {L_BOOKMARKS_EXPLAIN}
    {L_BOOKMARKS}
    {L_BOOKMARKS_DISABLED}
    {topicrow.TOPIC_FOLDER_IMG}{L_DELETED_TOPIC} -

    {topicrow.ATTACH_ICON_IMG} {topicrow.TOPIC_TITLE}

    - {L_GLOBAL_ANNOUNCEMENT}{L_FORUM}: {topicrow.FORUM_NAME} - -

    [ {GOTO_PAGE_IMG}{L_GOTO_PAGE}: {topicrow.PAGINATION} ]

    - -
    -

    {topicrow.LAST_POST_TIME}

    -

    {topicrow.LAST_POST_AUTHOR_FULL} - {topicrow.LAST_POST_IMG} -

    -
     {L_MOVE_UP} | {L_MOVE_DOWN} 
    {L_NO_BOOKMARKS}
     
    - - -
    - - - \ No newline at end of file diff --git a/phpBB/styles/subSilver/template/ucp_main_subscribed.html b/phpBB/styles/subSilver/template/ucp_main_subscribed.html deleted file mode 100644 index ee05923c36..0000000000 --- a/phpBB/styles/subSilver/template/ucp_main_subscribed.html +++ /dev/null @@ -1,77 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    {L_UCP}
    {L_WATCHED_EXPLAIN}
    {L_WATCHED_FORUMS}
    {forumrow.FORUM_FOLDER_IMG}

    {forumrow.FORUM_NAME}

    {forumrow.LAST_POST_TIME}
    {forumrow.LAST_POST_AUTHOR_FULL} {forumrow.LAST_POST_IMG}{L_NO_POSTS}
    {L_NO_WATCHED_FORUMS}
    {L_WATCHED_TOPICS}
    - - - - - - -
     [ {TOTAL_TOPICS} ] 
    -
    {topicrow.TOPIC_FOLDER_IMG} -

    {topicrow.NEWEST_POST_IMG} {topicrow.ATTACH_ICON_IMG} {topicrow.TOPIC_TITLE}


    - -

    [ {GOTO_PAGE_IMG}{L_GOTO_PAGE}: {topicrow.PAGINATION} ]

    - -
    -

    {topicrow.LAST_POST_TIME}

    -

    {topicrow.LAST_POST_AUTHOR_FULL} - {topicrow.LAST_POST_IMG} -

    -
    {L_NO_WATCHED_TOPICS}
     
    - - - - \ No newline at end of file diff --git a/phpBB/styles/subSilver/imageset/announce_read.gif b/phpBB/styles/subsilver2/imageset/announce_read.gif similarity index 100% rename from phpBB/styles/subSilver/imageset/announce_read.gif rename to phpBB/styles/subsilver2/imageset/announce_read.gif diff --git a/phpBB/styles/subSilver/imageset/announce_read_locked.gif b/phpBB/styles/subsilver2/imageset/announce_read_locked.gif similarity index 100% rename from phpBB/styles/subSilver/imageset/announce_read_locked.gif rename to phpBB/styles/subsilver2/imageset/announce_read_locked.gif diff --git a/phpBB/styles/subSilver/imageset/announce_read_locked_mine.gif b/phpBB/styles/subsilver2/imageset/announce_read_locked_mine.gif similarity index 100% rename from phpBB/styles/subSilver/imageset/announce_read_locked_mine.gif rename to phpBB/styles/subsilver2/imageset/announce_read_locked_mine.gif diff --git a/phpBB/styles/subSilver/imageset/announce_read_mine.gif b/phpBB/styles/subsilver2/imageset/announce_read_mine.gif similarity index 100% rename from phpBB/styles/subSilver/imageset/announce_read_mine.gif rename to phpBB/styles/subsilver2/imageset/announce_read_mine.gif diff --git a/phpBB/styles/subSilver/imageset/announce_unread.gif b/phpBB/styles/subsilver2/imageset/announce_unread.gif similarity index 100% rename from phpBB/styles/subSilver/imageset/announce_unread.gif rename to phpBB/styles/subsilver2/imageset/announce_unread.gif diff --git a/phpBB/styles/subSilver/imageset/announce_unread_locked.gif b/phpBB/styles/subsilver2/imageset/announce_unread_locked.gif similarity index 100% rename from phpBB/styles/subSilver/imageset/announce_unread_locked.gif rename to phpBB/styles/subsilver2/imageset/announce_unread_locked.gif diff --git a/phpBB/styles/subSilver/imageset/announce_unread_locked_mine.gif b/phpBB/styles/subsilver2/imageset/announce_unread_locked_mine.gif similarity index 100% rename from phpBB/styles/subSilver/imageset/announce_unread_locked_mine.gif rename to phpBB/styles/subsilver2/imageset/announce_unread_locked_mine.gif diff --git a/phpBB/styles/subSilver/imageset/announce_unread_mine.gif b/phpBB/styles/subsilver2/imageset/announce_unread_mine.gif similarity index 100% rename from phpBB/styles/subSilver/imageset/announce_unread_mine.gif rename to phpBB/styles/subsilver2/imageset/announce_unread_mine.gif diff --git a/phpBB/styles/subSilver/imageset/en/button_pm_new.gif b/phpBB/styles/subsilver2/imageset/en/button_pm_new.gif similarity index 100% rename from phpBB/styles/subSilver/imageset/en/button_pm_new.gif rename to phpBB/styles/subsilver2/imageset/en/button_pm_new.gif diff --git a/phpBB/styles/subSilver/imageset/en/button_pm_reply.gif b/phpBB/styles/subsilver2/imageset/en/button_pm_reply.gif similarity index 100% rename from phpBB/styles/subSilver/imageset/en/button_pm_reply.gif rename to phpBB/styles/subsilver2/imageset/en/button_pm_reply.gif diff --git a/phpBB/styles/subSilver/imageset/en/button_topic_locked.gif b/phpBB/styles/subsilver2/imageset/en/button_topic_locked.gif similarity index 100% rename from phpBB/styles/subSilver/imageset/en/button_topic_locked.gif rename to phpBB/styles/subsilver2/imageset/en/button_topic_locked.gif diff --git a/phpBB/styles/subSilver/imageset/en/button_topic_new.gif b/phpBB/styles/subsilver2/imageset/en/button_topic_new.gif similarity index 100% rename from phpBB/styles/subSilver/imageset/en/button_topic_new.gif rename to phpBB/styles/subsilver2/imageset/en/button_topic_new.gif diff --git a/phpBB/styles/subSilver/imageset/en/button_topic_reply.gif b/phpBB/styles/subsilver2/imageset/en/button_topic_reply.gif similarity index 100% rename from phpBB/styles/subSilver/imageset/en/button_topic_reply.gif rename to phpBB/styles/subsilver2/imageset/en/button_topic_reply.gif diff --git a/phpBB/styles/subSilver/imageset/en/icon_contact_aim.gif b/phpBB/styles/subsilver2/imageset/en/icon_contact_aim.gif similarity index 100% rename from phpBB/styles/subSilver/imageset/en/icon_contact_aim.gif rename to phpBB/styles/subsilver2/imageset/en/icon_contact_aim.gif diff --git a/phpBB/styles/subSilver/imageset/en/icon_contact_email.gif b/phpBB/styles/subsilver2/imageset/en/icon_contact_email.gif similarity index 100% rename from phpBB/styles/subSilver/imageset/en/icon_contact_email.gif rename to phpBB/styles/subsilver2/imageset/en/icon_contact_email.gif diff --git a/phpBB/styles/subSilver/imageset/en/icon_contact_icq.gif b/phpBB/styles/subsilver2/imageset/en/icon_contact_icq.gif similarity index 100% rename from phpBB/styles/subSilver/imageset/en/icon_contact_icq.gif rename to phpBB/styles/subsilver2/imageset/en/icon_contact_icq.gif diff --git a/phpBB/styles/subSilver/imageset/en/icon_contact_jabber.gif b/phpBB/styles/subsilver2/imageset/en/icon_contact_jabber.gif similarity index 100% rename from phpBB/styles/subSilver/imageset/en/icon_contact_jabber.gif rename to phpBB/styles/subsilver2/imageset/en/icon_contact_jabber.gif diff --git a/phpBB/styles/subSilver/imageset/en/icon_contact_msnm.gif b/phpBB/styles/subsilver2/imageset/en/icon_contact_msnm.gif similarity index 100% rename from phpBB/styles/subSilver/imageset/en/icon_contact_msnm.gif rename to phpBB/styles/subsilver2/imageset/en/icon_contact_msnm.gif diff --git a/phpBB/styles/subSilver/imageset/en/icon_contact_pm.gif b/phpBB/styles/subsilver2/imageset/en/icon_contact_pm.gif similarity index 100% rename from phpBB/styles/subSilver/imageset/en/icon_contact_pm.gif rename to phpBB/styles/subsilver2/imageset/en/icon_contact_pm.gif diff --git a/phpBB/styles/subSilver/imageset/en/icon_contact_www.gif b/phpBB/styles/subsilver2/imageset/en/icon_contact_www.gif similarity index 100% rename from phpBB/styles/subSilver/imageset/en/icon_contact_www.gif rename to phpBB/styles/subsilver2/imageset/en/icon_contact_www.gif diff --git a/phpBB/styles/subSilver/imageset/en/icon_contact_yahoo.gif b/phpBB/styles/subsilver2/imageset/en/icon_contact_yahoo.gif similarity index 100% rename from phpBB/styles/subSilver/imageset/en/icon_contact_yahoo.gif rename to phpBB/styles/subsilver2/imageset/en/icon_contact_yahoo.gif diff --git a/phpBB/styles/subSilver/imageset/en/icon_post_delete.gif b/phpBB/styles/subsilver2/imageset/en/icon_post_delete.gif similarity index 100% rename from phpBB/styles/subSilver/imageset/en/icon_post_delete.gif rename to phpBB/styles/subsilver2/imageset/en/icon_post_delete.gif diff --git a/phpBB/styles/subSilver/imageset/en/icon_post_edit.gif b/phpBB/styles/subsilver2/imageset/en/icon_post_edit.gif similarity index 100% rename from phpBB/styles/subSilver/imageset/en/icon_post_edit.gif rename to phpBB/styles/subsilver2/imageset/en/icon_post_edit.gif diff --git a/phpBB/styles/subSilver/imageset/en/icon_post_info.gif b/phpBB/styles/subsilver2/imageset/en/icon_post_info.gif similarity index 100% rename from phpBB/styles/subSilver/imageset/en/icon_post_info.gif rename to phpBB/styles/subsilver2/imageset/en/icon_post_info.gif diff --git a/phpBB/styles/subSilver/imageset/en/icon_post_quote.gif b/phpBB/styles/subsilver2/imageset/en/icon_post_quote.gif similarity index 100% rename from phpBB/styles/subSilver/imageset/en/icon_post_quote.gif rename to phpBB/styles/subsilver2/imageset/en/icon_post_quote.gif diff --git a/phpBB/styles/subSilver/imageset/en/icon_post_report.gif b/phpBB/styles/subsilver2/imageset/en/icon_post_report.gif similarity index 100% rename from phpBB/styles/subSilver/imageset/en/icon_post_report.gif rename to phpBB/styles/subsilver2/imageset/en/icon_post_report.gif diff --git a/phpBB/styles/subSilver/imageset/en/icon_user_offline.gif b/phpBB/styles/subsilver2/imageset/en/icon_user_offline.gif similarity index 100% rename from phpBB/styles/subSilver/imageset/en/icon_user_offline.gif rename to phpBB/styles/subsilver2/imageset/en/icon_user_offline.gif diff --git a/phpBB/styles/subSilver/imageset/en/icon_user_online.gif b/phpBB/styles/subsilver2/imageset/en/icon_user_online.gif similarity index 100% rename from phpBB/styles/subSilver/imageset/en/icon_user_online.gif rename to phpBB/styles/subsilver2/imageset/en/icon_user_online.gif diff --git a/phpBB/styles/subSilver/imageset/en/icon_user_profile.gif b/phpBB/styles/subsilver2/imageset/en/icon_user_profile.gif similarity index 100% rename from phpBB/styles/subSilver/imageset/en/icon_user_profile.gif rename to phpBB/styles/subsilver2/imageset/en/icon_user_profile.gif diff --git a/phpBB/styles/subSilver/imageset/en/icon_user_search.gif b/phpBB/styles/subsilver2/imageset/en/icon_user_search.gif similarity index 100% rename from phpBB/styles/subSilver/imageset/en/icon_user_search.gif rename to phpBB/styles/subsilver2/imageset/en/icon_user_search.gif diff --git a/phpBB/styles/subSilver/imageset/en/icon_user_warn.gif b/phpBB/styles/subsilver2/imageset/en/icon_user_warn.gif similarity index 100% rename from phpBB/styles/subSilver/imageset/en/icon_user_warn.gif rename to phpBB/styles/subsilver2/imageset/en/icon_user_warn.gif diff --git a/phpBB/styles/subsilver2/imageset/en/imageset.cfg b/phpBB/styles/subsilver2/imageset/en/imageset.cfg new file mode 100644 index 0000000000..c0cc699737 --- /dev/null +++ b/phpBB/styles/subsilver2/imageset/en/imageset.cfg @@ -0,0 +1,47 @@ +# +# phpBB Imageset Configuration File +# +# @package phpBB3 +# @copyright (c) 2005 phpBB Group +# @license http://opensource.org/licenses/gpl-license.php GNU Public License +# +# +# At the left is the name, please do not change this +# At the right the value is entered +# For on/off options the valid values are on, off, 1, 0, true and false +# +# Values get trimmed, if you want to add a space in front or at the end of +# the value, then enclose the value with single or double quotes. +# Single and double quotes do not need to be escaped. +# +# + +# Images +img_icon_contact_aim = icon_contact_aim.gif +img_icon_contact_email = icon_contact_email.gif +img_icon_contact_icq = icon_contact_icq.gif +img_icon_contact_jabber = icon_contact_jabber.gif +img_icon_contact_msnm = icon_contact_msnm.gif +img_icon_contact_pm = icon_contact_pm.gif +img_icon_contact_yahoo = icon_contact_yahoo.gif +img_icon_contact_www = icon_contact_www.gif + +img_icon_post_delete = icon_post_delete.gif +img_icon_post_edit = icon_post_edit.gif +img_icon_post_info = icon_post_info.gif +img_icon_post_quote = icon_post_quote.gif +img_icon_post_report = icon_post_report.gif + +img_icon_user_online = icon_user_online.gif +img_icon_user_offline = icon_user_offline.gif +img_icon_user_profile = icon_user_profile.gif +img_icon_user_search = icon_user_search.gif +img_icon_user_warn = icon_user_warn.gif + +img_button_pm_forward = +img_button_pm_new = button_pm_new.gif +img_button_pm_reply = button_pm_reply.gif +img_button_topic_locked = button_topic_locked.gif +img_button_topic_new = button_topic_new.gif +img_button_topic_reply = button_topic_reply.gif + diff --git a/phpBB/styles/subSilver/imageset/forum_link.gif b/phpBB/styles/subsilver2/imageset/forum_link.gif similarity index 100% rename from phpBB/styles/subSilver/imageset/forum_link.gif rename to phpBB/styles/subsilver2/imageset/forum_link.gif diff --git a/phpBB/styles/subSilver/imageset/forum_read.gif b/phpBB/styles/subsilver2/imageset/forum_read.gif similarity index 100% rename from phpBB/styles/subSilver/imageset/forum_read.gif rename to phpBB/styles/subsilver2/imageset/forum_read.gif diff --git a/phpBB/styles/subSilver/imageset/forum_read_locked.gif b/phpBB/styles/subsilver2/imageset/forum_read_locked.gif similarity index 100% rename from phpBB/styles/subSilver/imageset/forum_read_locked.gif rename to phpBB/styles/subsilver2/imageset/forum_read_locked.gif diff --git a/phpBB/styles/subSilver/imageset/forum_read_subforum.gif b/phpBB/styles/subsilver2/imageset/forum_read_subforum.gif similarity index 100% rename from phpBB/styles/subSilver/imageset/forum_read_subforum.gif rename to phpBB/styles/subsilver2/imageset/forum_read_subforum.gif diff --git a/phpBB/styles/subSilver/imageset/forum_unread.gif b/phpBB/styles/subsilver2/imageset/forum_unread.gif similarity index 100% rename from phpBB/styles/subSilver/imageset/forum_unread.gif rename to phpBB/styles/subsilver2/imageset/forum_unread.gif diff --git a/phpBB/styles/subSilver/imageset/forum_unread_locked.gif b/phpBB/styles/subsilver2/imageset/forum_unread_locked.gif old mode 100755 new mode 100644 similarity index 100% rename from phpBB/styles/subSilver/imageset/forum_unread_locked.gif rename to phpBB/styles/subsilver2/imageset/forum_unread_locked.gif diff --git a/phpBB/styles/subSilver/imageset/forum_unread_subforum.gif b/phpBB/styles/subsilver2/imageset/forum_unread_subforum.gif similarity index 100% rename from phpBB/styles/subSilver/imageset/forum_unread_subforum.gif rename to phpBB/styles/subsilver2/imageset/forum_unread_subforum.gif diff --git a/phpBB/styles/subSilver/imageset/icon_post_target.gif b/phpBB/styles/subsilver2/imageset/icon_post_target.gif similarity index 100% rename from phpBB/styles/subSilver/imageset/icon_post_target.gif rename to phpBB/styles/subsilver2/imageset/icon_post_target.gif diff --git a/phpBB/styles/subSilver/imageset/icon_post_target_unread.gif b/phpBB/styles/subsilver2/imageset/icon_post_target_unread.gif similarity index 100% rename from phpBB/styles/subSilver/imageset/icon_post_target_unread.gif rename to phpBB/styles/subsilver2/imageset/icon_post_target_unread.gif diff --git a/phpBB/styles/subSilver/imageset/icon_topic_attach.gif b/phpBB/styles/subsilver2/imageset/icon_topic_attach.gif similarity index 100% rename from phpBB/styles/subSilver/imageset/icon_topic_attach.gif rename to phpBB/styles/subsilver2/imageset/icon_topic_attach.gif diff --git a/phpBB/styles/subSilver/imageset/icon_topic_latest.gif b/phpBB/styles/subsilver2/imageset/icon_topic_latest.gif similarity index 100% rename from phpBB/styles/subSilver/imageset/icon_topic_latest.gif rename to phpBB/styles/subsilver2/imageset/icon_topic_latest.gif diff --git a/phpBB/styles/subSilver/imageset/icon_topic_newest.gif b/phpBB/styles/subsilver2/imageset/icon_topic_newest.gif similarity index 100% rename from phpBB/styles/subSilver/imageset/icon_topic_newest.gif rename to phpBB/styles/subsilver2/imageset/icon_topic_newest.gif diff --git a/phpBB/styles/subSilver/imageset/icon_topic_reported.gif b/phpBB/styles/subsilver2/imageset/icon_topic_reported.gif similarity index 100% rename from phpBB/styles/subSilver/imageset/icon_topic_reported.gif rename to phpBB/styles/subsilver2/imageset/icon_topic_reported.gif diff --git a/phpBB/styles/subSilver/imageset/icon_topic_unapproved.gif b/phpBB/styles/subsilver2/imageset/icon_topic_unapproved.gif similarity index 100% rename from phpBB/styles/subSilver/imageset/icon_topic_unapproved.gif rename to phpBB/styles/subsilver2/imageset/icon_topic_unapproved.gif diff --git a/phpBB/styles/subSilver/imageset/imageset.cfg b/phpBB/styles/subsilver2/imageset/imageset.cfg similarity index 72% rename from phpBB/styles/subSilver/imageset/imageset.cfg rename to phpBB/styles/subsilver2/imageset/imageset.cfg index f820337323..44f44007d7 100644 --- a/phpBB/styles/subSilver/imageset/imageset.cfg +++ b/phpBB/styles/subsilver2/imageset/imageset.cfg @@ -17,9 +17,9 @@ # # General Information about this style -name = subSilver +name = subsilver2 copyright = © phpBB Group, 2003 -version = 2.1.1 +version = 3.0.0 # Images img_site_logo = site_logo.gif*94*170 @@ -81,23 +81,14 @@ img_global_unread_mine = announce_unread_mine.gif*18*19 img_global_unread_locked = announce_unread_locked.gif*18*19 img_global_unread_locked_mine = announce_unread_locked_mine.gif*18*19 +img_subforum_read = +img_subforum_unread = + img_pm_read = topic_read.gif*18*19 img_pm_unread = topic_unread.gif*18*19 -img_icon_contact_aim = {LANG}/icon_contact_aim.gif*20*72 -img_icon_contact_email = {LANG}/icon_contact_email.gif*20*72 -img_icon_contact_icq = {LANG}/icon_contact_icq.gif*20*72 -img_icon_contact_jabber = {LANG}/icon_contact_jabber.gif*20*72 -img_icon_contact_msnm = {LANG}/icon_contact_msnm.gif*20*72 -img_icon_contact_pm = {LANG}/icon_contact_pm.gif*20*72 -img_icon_contact_yahoo = {LANG}/icon_contact_yahoo.gif*20*72 -img_icon_contact_www = {LANG}/icon_contact_www.gif*20*72 +img_icon_back_top = -img_icon_post_delete = {LANG}/icon_post_delete.gif*20*20 -img_icon_post_edit = {LANG}/icon_post_edit.gif*20*90 -img_icon_post_info = {LANG}/icon_post_info.gif*20*20 -img_icon_post_quote = {LANG}/icon_post_quote.gif*20*90 -img_icon_post_report = {LANG}/icon_post_report.gif*20*20 img_icon_post_target = icon_post_target.gif*9*12 img_icon_post_target_unread = icon_post_target_unread.gif*9*12 @@ -107,16 +98,3 @@ img_icon_topic_newest = icon_topic_newest.gif*9*18 img_icon_topic_reported = icon_topic_reported.gif*18*19 img_icon_topic_unapproved = icon_topic_unapproved.gif*18*19 -img_icon_user_online = {LANG}/icon_user_online.gif*20*72 -img_icon_user_offline = {LANG}/icon_user_offline.gif*20*72 -img_icon_user_profile = {LANG}/icon_user_profile.gif*20*72 -img_icon_user_search = {LANG}/icon_user_search.gif*20*72 -img_icon_user_warn = {LANG}/icon_user_warn.gif*20*20 - -img_button_pm_forward = -img_button_pm_new = {LANG}/button_pm_new.gif*27*97 -img_button_pm_reply = {LANG}/button_pm_reply.gif*20*90 -img_button_topic_locked = {LANG}/button_topic_locked.gif*27*97 -img_button_topic_new = {LANG}/button_topic_new.gif*27*97 -img_button_topic_reply = {LANG}/button_topic_reply.gif*27*97 - diff --git a/phpBB/styles/subSilver/imageset/poll_center.gif b/phpBB/styles/subsilver2/imageset/poll_center.gif similarity index 100% rename from phpBB/styles/subSilver/imageset/poll_center.gif rename to phpBB/styles/subsilver2/imageset/poll_center.gif diff --git a/phpBB/styles/subSilver/imageset/poll_left.gif b/phpBB/styles/subsilver2/imageset/poll_left.gif similarity index 100% rename from phpBB/styles/subSilver/imageset/poll_left.gif rename to phpBB/styles/subsilver2/imageset/poll_left.gif diff --git a/phpBB/styles/subSilver/imageset/poll_right.gif b/phpBB/styles/subsilver2/imageset/poll_right.gif similarity index 100% rename from phpBB/styles/subSilver/imageset/poll_right.gif rename to phpBB/styles/subsilver2/imageset/poll_right.gif diff --git a/phpBB/styles/subsilver2/imageset/site_logo.gif b/phpBB/styles/subsilver2/imageset/site_logo.gif new file mode 100644 index 0000000000..48c3b553da Binary files /dev/null and b/phpBB/styles/subsilver2/imageset/site_logo.gif differ diff --git a/phpBB/styles/subSilver/imageset/sticky_read.gif b/phpBB/styles/subsilver2/imageset/sticky_read.gif similarity index 100% rename from phpBB/styles/subSilver/imageset/sticky_read.gif rename to phpBB/styles/subsilver2/imageset/sticky_read.gif diff --git a/phpBB/styles/subSilver/imageset/sticky_read_locked.gif b/phpBB/styles/subsilver2/imageset/sticky_read_locked.gif similarity index 100% rename from phpBB/styles/subSilver/imageset/sticky_read_locked.gif rename to phpBB/styles/subsilver2/imageset/sticky_read_locked.gif diff --git a/phpBB/styles/subSilver/imageset/sticky_read_locked_mine.gif b/phpBB/styles/subsilver2/imageset/sticky_read_locked_mine.gif similarity index 100% rename from phpBB/styles/subSilver/imageset/sticky_read_locked_mine.gif rename to phpBB/styles/subsilver2/imageset/sticky_read_locked_mine.gif diff --git a/phpBB/styles/subSilver/imageset/sticky_read_mine.gif b/phpBB/styles/subsilver2/imageset/sticky_read_mine.gif similarity index 100% rename from phpBB/styles/subSilver/imageset/sticky_read_mine.gif rename to phpBB/styles/subsilver2/imageset/sticky_read_mine.gif diff --git a/phpBB/styles/subSilver/imageset/sticky_unread.gif b/phpBB/styles/subsilver2/imageset/sticky_unread.gif similarity index 100% rename from phpBB/styles/subSilver/imageset/sticky_unread.gif rename to phpBB/styles/subsilver2/imageset/sticky_unread.gif diff --git a/phpBB/styles/subSilver/imageset/sticky_unread_locked.gif b/phpBB/styles/subsilver2/imageset/sticky_unread_locked.gif similarity index 100% rename from phpBB/styles/subSilver/imageset/sticky_unread_locked.gif rename to phpBB/styles/subsilver2/imageset/sticky_unread_locked.gif diff --git a/phpBB/styles/subSilver/imageset/sticky_unread_locked_mine.gif b/phpBB/styles/subsilver2/imageset/sticky_unread_locked_mine.gif similarity index 100% rename from phpBB/styles/subSilver/imageset/sticky_unread_locked_mine.gif rename to phpBB/styles/subsilver2/imageset/sticky_unread_locked_mine.gif diff --git a/phpBB/styles/subSilver/imageset/sticky_unread_mine.gif b/phpBB/styles/subsilver2/imageset/sticky_unread_mine.gif similarity index 100% rename from phpBB/styles/subSilver/imageset/sticky_unread_mine.gif rename to phpBB/styles/subsilver2/imageset/sticky_unread_mine.gif diff --git a/phpBB/styles/subSilver/imageset/topic_moved.gif b/phpBB/styles/subsilver2/imageset/topic_moved.gif similarity index 100% rename from phpBB/styles/subSilver/imageset/topic_moved.gif rename to phpBB/styles/subsilver2/imageset/topic_moved.gif diff --git a/phpBB/styles/subSilver/imageset/topic_read.gif b/phpBB/styles/subsilver2/imageset/topic_read.gif similarity index 100% rename from phpBB/styles/subSilver/imageset/topic_read.gif rename to phpBB/styles/subsilver2/imageset/topic_read.gif diff --git a/phpBB/styles/subSilver/imageset/topic_read_hot.gif b/phpBB/styles/subsilver2/imageset/topic_read_hot.gif similarity index 100% rename from phpBB/styles/subSilver/imageset/topic_read_hot.gif rename to phpBB/styles/subsilver2/imageset/topic_read_hot.gif diff --git a/phpBB/styles/subSilver/imageset/topic_read_hot_mine.gif b/phpBB/styles/subsilver2/imageset/topic_read_hot_mine.gif similarity index 100% rename from phpBB/styles/subSilver/imageset/topic_read_hot_mine.gif rename to phpBB/styles/subsilver2/imageset/topic_read_hot_mine.gif diff --git a/phpBB/styles/subSilver/imageset/topic_read_locked.gif b/phpBB/styles/subsilver2/imageset/topic_read_locked.gif similarity index 100% rename from phpBB/styles/subSilver/imageset/topic_read_locked.gif rename to phpBB/styles/subsilver2/imageset/topic_read_locked.gif diff --git a/phpBB/styles/subSilver/imageset/topic_read_locked_mine.gif b/phpBB/styles/subsilver2/imageset/topic_read_locked_mine.gif similarity index 100% rename from phpBB/styles/subSilver/imageset/topic_read_locked_mine.gif rename to phpBB/styles/subsilver2/imageset/topic_read_locked_mine.gif diff --git a/phpBB/styles/subSilver/imageset/topic_read_mine.gif b/phpBB/styles/subsilver2/imageset/topic_read_mine.gif similarity index 100% rename from phpBB/styles/subSilver/imageset/topic_read_mine.gif rename to phpBB/styles/subsilver2/imageset/topic_read_mine.gif diff --git a/phpBB/styles/subSilver/imageset/topic_unread.gif b/phpBB/styles/subsilver2/imageset/topic_unread.gif similarity index 100% rename from phpBB/styles/subSilver/imageset/topic_unread.gif rename to phpBB/styles/subsilver2/imageset/topic_unread.gif diff --git a/phpBB/styles/subSilver/imageset/topic_unread_hot.gif b/phpBB/styles/subsilver2/imageset/topic_unread_hot.gif similarity index 100% rename from phpBB/styles/subSilver/imageset/topic_unread_hot.gif rename to phpBB/styles/subsilver2/imageset/topic_unread_hot.gif diff --git a/phpBB/styles/subSilver/imageset/topic_unread_hot_mine.gif b/phpBB/styles/subsilver2/imageset/topic_unread_hot_mine.gif similarity index 100% rename from phpBB/styles/subSilver/imageset/topic_unread_hot_mine.gif rename to phpBB/styles/subsilver2/imageset/topic_unread_hot_mine.gif diff --git a/phpBB/styles/subSilver/imageset/topic_unread_locked.gif b/phpBB/styles/subsilver2/imageset/topic_unread_locked.gif similarity index 100% rename from phpBB/styles/subSilver/imageset/topic_unread_locked.gif rename to phpBB/styles/subsilver2/imageset/topic_unread_locked.gif diff --git a/phpBB/styles/subSilver/imageset/topic_unread_locked_mine.gif b/phpBB/styles/subsilver2/imageset/topic_unread_locked_mine.gif similarity index 100% rename from phpBB/styles/subSilver/imageset/topic_unread_locked_mine.gif rename to phpBB/styles/subsilver2/imageset/topic_unread_locked_mine.gif diff --git a/phpBB/styles/subSilver/imageset/topic_unread_mine.gif b/phpBB/styles/subsilver2/imageset/topic_unread_mine.gif similarity index 100% rename from phpBB/styles/subSilver/imageset/topic_unread_mine.gif rename to phpBB/styles/subsilver2/imageset/topic_unread_mine.gif diff --git a/phpBB/styles/subSilver/imageset/upload_bar.gif b/phpBB/styles/subsilver2/imageset/upload_bar.gif similarity index 100% rename from phpBB/styles/subSilver/imageset/upload_bar.gif rename to phpBB/styles/subsilver2/imageset/upload_bar.gif diff --git a/phpBB/styles/subSilver/style.cfg b/phpBB/styles/subsilver2/style.cfg similarity index 97% rename from phpBB/styles/subSilver/style.cfg rename to phpBB/styles/subsilver2/style.cfg index 773ddc17ee..7465d36673 100644 --- a/phpBB/styles/subSilver/style.cfg +++ b/phpBB/styles/subsilver2/style.cfg @@ -17,6 +17,6 @@ # # General Information about this style -name = subSilver +name = subsilver2 copyright = © 2005 phpBB Group version = 3.0.0 diff --git a/phpBB/styles/subSilver/template/attachment.html b/phpBB/styles/subsilver2/template/attachment.html similarity index 93% rename from phpBB/styles/subSilver/template/attachment.html rename to phpBB/styles/subsilver2/template/attachment.html index daa2bacdef..b8071bec06 100644 --- a/phpBB/styles/subSilver/template/attachment.html +++ b/phpBB/styles/subsilver2/template/attachment.html @@ -11,12 +11,12 @@ {_file.DOWNLOAD_NAME}
    - {_file.DOWNLOAD_NAME} [ {_file.FILESIZE} {_file.SIZE_LANG} | {_file.L_DOWNLOADED_VIEWED} {_file.L_DOWNLOAD_COUNT} ] + {_file.DOWNLOAD_NAME} [ {_file.FILESIZE} {_file.SIZE_LANG} | {_file.L_DOWNLOAD_COUNT} ] - {_file.DOWNLOAD_NAME}
    - {_file.DOWNLOAD_NAME} [ {_file.FILESIZE} {_file.SIZE_LANG} | {_file.L_DOWNLOADED_VIEWED} {_file.L_DOWNLOAD_COUNT} ] + {_file.DOWNLOAD_NAME}
    + {_file.DOWNLOAD_NAME} [ {_file.FILESIZE} {_file.SIZE_LANG} | {_file.L_DOWNLOAD_COUNT} ] @@ -24,7 +24,7 @@ {_file.UPLOAD_ICON} {_file.DOWNLOAD_NAME} [{_file.FILESIZE} {_file.SIZE_LANG}]
    - {_file.L_DOWNLOADED_VIEWED} {_file.L_DOWNLOAD_COUNT} + {_file.L_DOWNLOAD_COUNT} @@ -111,7 +111,7 @@
    [ {L_PLAY_QUICKTIME_FILE} ] - {_file.DOWNLOAD_NAME} [ {_file.FILESIZE} {_file.SIZE_LANG} | {_file.L_DOWNLOADED_VIEWED} {_file.L_DOWNLOAD_COUNT} ] + {_file.DOWNLOAD_NAME} [ {_file.FILESIZE} {_file.SIZE_LANG} | {_file.L_DOWNLOAD_COUNT} ]
    diff --git a/phpBB/styles/subSilver/template/bbcode.html b/phpBB/styles/subsilver2/template/bbcode.html similarity index 91% rename from phpBB/styles/subSilver/template/bbcode.html rename to phpBB/styles/subsilver2/template/bbcode.html index 1f0e8a72d2..036e7b2fd2 100644 --- a/phpBB/styles/subSilver/template/bbcode.html +++ b/phpBB/styles/subsilver2/template/bbcode.html @@ -40,15 +40,15 @@ - - + + {TEXT} -{TEXT} +{TEXT} {L_IMAGE} diff --git a/phpBB/styles/subSilver/template/breadcrumbs.html b/phpBB/styles/subsilver2/template/breadcrumbs.html similarity index 100% rename from phpBB/styles/subSilver/template/breadcrumbs.html rename to phpBB/styles/subsilver2/template/breadcrumbs.html diff --git a/phpBB/styles/subSilver/template/confirm_body.html b/phpBB/styles/subsilver2/template/confirm_body.html similarity index 84% rename from phpBB/styles/subSilver/template/confirm_body.html rename to phpBB/styles/subsilver2/template/confirm_body.html index 27d9aa0444..92c2481c2d 100644 --- a/phpBB/styles/subSilver/template/confirm_body.html +++ b/phpBB/styles/subsilver2/template/confirm_body.html @@ -23,6 +23,6 @@
    -
    +
    \ No newline at end of file diff --git a/phpBB/styles/subSilver/template/custom_profile_fields.html b/phpBB/styles/subsilver2/template/custom_profile_fields.html similarity index 100% rename from phpBB/styles/subSilver/template/custom_profile_fields.html rename to phpBB/styles/subsilver2/template/custom_profile_fields.html diff --git a/phpBB/styles/subSilver/template/editor.js b/phpBB/styles/subsilver2/template/editor.js similarity index 92% rename from phpBB/styles/subSilver/template/editor.js rename to phpBB/styles/subsilver2/template/editor.js index 2ef2853ed3..339609b56e 100644 --- a/phpBB/styles/subSilver/template/editor.js +++ b/phpBB/styles/subsilver2/template/editor.js @@ -32,11 +32,23 @@ function helpline(help) */ function initInsertions() { - var textarea = document.forms[form_name].elements[text_name]; - textarea.focus(); - if (is_ie && typeof(baseHeight) != 'number') + var doc; + + if (document.forms[form_name]) { - baseHeight = document.selection.createRange().duplicate().boundingHeight; + doc = document; + } + else + { + doc = opener.document; + } + + var textarea = doc.forms[form_name].elements[text_name]; + if (is_ie && typeof(baseHeight) != 'number') + { + textarea.focus(); + baseHeight = doc.selection.createRange().duplicate().boundingHeight; + document.body.focus(); } } @@ -48,9 +60,11 @@ function bbstyle(bbnumber) if (bbnumber != -1) { bbfontstyle(bbtags[bbnumber], bbtags[bbnumber+1]); - } else { + } + else + { insert_text('[*]'); - document.forms[form_name].elements[text_name].focus(); + document.forms[form_name].elements[text_name].focus(); } } @@ -62,6 +76,7 @@ function bbfontstyle(bbopen, bbclose) theSelection = false; var textarea = document.forms[form_name].elements[text_name]; + textarea.focus(); if ((clientVer >= 4) && is_ie && is_win) @@ -85,9 +100,10 @@ function bbfontstyle(bbopen, bbclose) theSelection = ''; return; } - + //The new position for the cursor after adding the bbcode - var new_pos = getCaretPosition(textarea).start + bbopen.length; + var caret_pos = getCaretPosition(textarea).start; + var new_pos = caret_pos + bbopen.length; // Open tag insert_text(bbopen + bbclose); @@ -103,12 +119,12 @@ function bbfontstyle(bbopen, bbclose) else if (document.selection) { var range = textarea.createTextRange(); - range.move("character", new_pos); + range.move("character", new_pos); range.select(); - storeCaret(document.forms[form_name].elements[text_name]); + storeCaret(textarea); } - document.forms[form_name].elements[text_name].focus(); + textarea.focus(); return; } @@ -122,7 +138,8 @@ function insert_text(text, spaces, popup) if (!popup) { textarea = document.forms[form_name].elements[text_name]; - } else + } + else { textarea = opener.document.forms[form_name].elements[text_name]; } @@ -152,12 +169,15 @@ function insert_text(text, spaces, popup) caret_pos.text = caret_pos.text.charAt(caret_pos.text.length - 1) == ' ' ? caret_pos.text + text + ' ' : caret_pos.text + text; } - else { textarea.value = textarea.value + text; } - document.forms[form_name].elements[text_name].focus(); + if (!popup) + { + textarea.focus(); + } + } /** @@ -209,7 +229,7 @@ function addquote(post_id, username) theSelection = theSelection.replace(//ig, '\n'); theSelection = theSelection.replace(/<\;/ig, '<'); theSelection = theSelection.replace(/>\;/ig, '>'); - theSelection = theSelection.replace(/&\;/ig, '&'); + theSelection = theSelection.replace(/&\;/ig, '&'); } else if (document.all) { @@ -280,6 +300,7 @@ function colorPalette(dir, width, height) { var r = 0, g = 0, b = 0; var numberList = new Array(6); + var color = ''; numberList[0] = '00'; numberList[1] = '40'; @@ -365,12 +386,12 @@ function getCaretPosition(txtarea) { range_all.moveStart('character', 1); } - + txtarea.sel_start = sel_start; - + // we ignore the end value for IE, this is already dirty enough and we don't need it caretPos.start = txtarea.sel_start; - caretPos.end = txtarea.sel_start; + caretPos.end = txtarea.sel_start; } return caretPos; diff --git a/phpBB/styles/subSilver/template/faq_body.html b/phpBB/styles/subsilver2/template/faq_body.html similarity index 93% rename from phpBB/styles/subSilver/template/faq_body.html rename to phpBB/styles/subsilver2/template/faq_body.html index 5d2656543b..9e324b4fd2 100644 --- a/phpBB/styles/subSilver/template/faq_body.html +++ b/phpBB/styles/subsilver2/template/faq_body.html @@ -58,6 +58,6 @@
    -
    +
    \ No newline at end of file diff --git a/phpBB/styles/subSilver/template/forumlist_body.html b/phpBB/styles/subsilver2/template/forumlist_body.html similarity index 79% rename from phpBB/styles/subSilver/template/forumlist_body.html rename to phpBB/styles/subsilver2/template/forumlist_body.html index 90e5e1e0cd..5454e63ffe 100644 --- a/phpBB/styles/subSilver/template/forumlist_body.html +++ b/phpBB/styles/subsilver2/template/forumlist_body.html @@ -1,6 +1,6 @@ - + @@ -19,7 +19,7 @@ + + + + + + - + - + - + @@ -84,15 +84,15 @@ - + - + - + diff --git a/phpBB/styles/subsilver2/template/mcp_footer.html b/phpBB/styles/subsilver2/template/mcp_footer.html new file mode 100644 index 0000000000..3105c15ae4 --- /dev/null +++ b/phpBB/styles/subsilver2/template/mcp_footer.html @@ -0,0 +1,27 @@ + + + +
    {L_MARK_FORUMS_READ} {L_MARK_FORUMS_READ} 
     {L_FORUM} {forumrow.FORUM_FOLDER_IMG} -
    {forumrow.FORUM_IMAGE}
    +
    {forumrow.FORUM_IMAGE}
    {forumrow.FORUM_NAME}

    {forumrow.FORUM_DESC}

    @@ -32,11 +32,17 @@

    {L_FORUM}

     
    {forumrow.FORUM_FOLDER_IMG} -
    {forumrow.FORUM_IMAGE}
    +
    {forumrow.FORUM_IMAGE}
    {forumrow.FORUM_NAME}

    {forumrow.FORUM_DESC}

    diff --git a/phpBB/styles/subSilver/template/index.htm b/phpBB/styles/subsilver2/template/index.htm similarity index 100% rename from phpBB/styles/subSilver/template/index.htm rename to phpBB/styles/subsilver2/template/index.htm diff --git a/phpBB/styles/subSilver/template/index_body.html b/phpBB/styles/subsilver2/template/index_body.html similarity index 100% rename from phpBB/styles/subSilver/template/index_body.html rename to phpBB/styles/subsilver2/template/index_body.html diff --git a/phpBB/styles/subSilver/template/jumpbox.html b/phpBB/styles/subsilver2/template/jumpbox.html similarity index 100% rename from phpBB/styles/subSilver/template/jumpbox.html rename to phpBB/styles/subsilver2/template/jumpbox.html diff --git a/phpBB/styles/subSilver/template/login_body.html b/phpBB/styles/subsilver2/template/login_body.html similarity index 91% rename from phpBB/styles/subSilver/template/login_body.html rename to phpBB/styles/subsilver2/template/login_body.html index 192613faa0..7243c983fe 100644 --- a/phpBB/styles/subSilver/template/login_body.html +++ b/phpBB/styles/subsilver2/template/login_body.html @@ -34,7 +34,7 @@
    style="width: 50%; text-align: right;">{L_USERNAME}:style="width: 50%; text-align: {S_CONTENT_FLOW_END};">{L_USERNAME}:
    {L_REGISTER} @@ -42,7 +42,7 @@
    style="width: 50%; text-align: right;">{L_PASSWORD}:style="width: 50%; text-align: {S_CONTENT_FLOW_END};">{L_PASSWORD}:
    {L_FORGOT_PASS} @@ -98,6 +98,6 @@
    -
    +
    \ No newline at end of file diff --git a/phpBB/styles/subSilver/template/login_forum.html b/phpBB/styles/subsilver2/template/login_forum.html similarity index 90% rename from phpBB/styles/subSilver/template/login_forum.html rename to phpBB/styles/subsilver2/template/login_forum.html index 29c85a78ed..5a194d209d 100644 --- a/phpBB/styles/subSilver/template/login_forum.html +++ b/phpBB/styles/subsilver2/template/login_forum.html @@ -42,6 +42,6 @@
    -
    +
    \ No newline at end of file diff --git a/phpBB/styles/subSilver/template/mcp_approve.html b/phpBB/styles/subsilver2/template/mcp_approve.html similarity index 100% rename from phpBB/styles/subSilver/template/mcp_approve.html rename to phpBB/styles/subsilver2/template/mcp_approve.html diff --git a/phpBB/styles/subSilver/template/mcp_ban.html b/phpBB/styles/subsilver2/template/mcp_ban.html similarity index 90% rename from phpBB/styles/subSilver/template/mcp_ban.html rename to phpBB/styles/subsilver2/template/mcp_ban.html index 1834e729ba..7441e4e71c 100644 --- a/phpBB/styles/subSilver/template/mcp_ban.html +++ b/phpBB/styles/subsilver2/template/mcp_ban.html @@ -49,7 +49,7 @@
    {L_BAN_LENGTH}:
    (YYYY-MM-DD)

    {L_YEAR_MONTH_DAY}
    {L_BAN_EXCLUDE}:
    {L_BAN_EXCLUDE_EXPLAIN}
    {L_BAN_LENGTH}:
    {L_BAN_REASON}:
    {L_BAN_GIVE_REASON}:
       
    + + + + + + + + +
     [ {TOTAL_TOPICS}{TOTAL_POSTS}{TOTAL}
    +
    + + + + +
    + + + +
    + +
    + + \ No newline at end of file diff --git a/phpBB/styles/subSilver/template/mcp_forum.html b/phpBB/styles/subsilver2/template/mcp_forum.html similarity index 80% rename from phpBB/styles/subSilver/template/mcp_forum.html rename to phpBB/styles/subsilver2/template/mcp_forum.html index 8dc7e4d5b3..cf7fe7fee3 100644 --- a/phpBB/styles/subSilver/template/mcp_forum.html +++ b/phpBB/styles/subsilver2/template/mcp_forum.html @@ -1,10 +1,10 @@ -
    +
    {L_VIEW_FORUM_LOGS} -
    +
    @@ -27,9 +27,9 @@ - [ {L_SELECT} + [ {L_SELECT_MERGE} -

    {topicrow.NEWEST_POST_IMG} {topicrow.ATTACH_ICON_IMG} {topicrow.TOPIC_TITLE} +

    {NEWEST_POST_IMG} {topicrow.ATTACH_ICON_IMG} {topicrow.TOPIC_TITLE} {topicrow.UNAPPROVED_IMG}  @@ -53,10 +53,11 @@ - + +


    -
    + - + @@ -58,7 +58,13 @@ - + @@ -69,7 +75,27 @@ - + diff --git a/phpBB/styles/subSilver/template/mcp_queue.html b/phpBB/styles/subsilver2/template/mcp_queue.html similarity index 75% rename from phpBB/styles/subSilver/template/mcp_queue.html rename to phpBB/styles/subsilver2/template/mcp_queue.html index 0cca2159bb..d85f0c3b49 100644 --- a/phpBB/styles/subSilver/template/mcp_queue.html +++ b/phpBB/styles/subsilver2/template/mcp_queue.html @@ -20,14 +20,14 @@ - - + - + @@ -39,7 +39,7 @@
    {L_POST_DETAILS}
    {RETURN_QUEUE} | {RETURN_TOPIC_SIMPLE} | {RETURN_POST}{RETURN_REPORTS}{RETURN_TOPIC}{RETURN_QUEUE} | {RETURN_TOPIC_SIMPLE} | {RETURN_POST}{RETURN_REPORTS} | {L_VIEW_TOPIC}{RETURN_TOPIC}
    {L_POST_SUBJECT}:
    {L_THIS_POST_IP}: {POST_IP}{POST_IP} [ {POST_IPADDR} ] + + {POST_IPADDR}{POST_IP} ({POST_IP}{L_LOOKUP_IP}) + + {POST_IPADDR} ({POST_IP}){POST_IP} ({L_LOOKUP_IP}) + +
    {L_PREVIEW}
    {POST_PREVIEW}
    + + +
    {POST_PREVIEW}
    + + +

    + + + + + + + + + + +
    {L_ATTACHMENTS}:
    {attachment.DISPLAY_ATTACHMENT}
    + + +

    {postrow.POST_SUBJECT}

    {L_FORUM}: {postrow.FORUM_NAME}{postrow.FORUM_NAME}
    {postrow.POST_AUTHOR_FULL}
    +
    {postrow.POST_AUTHOR_FULL}
    [ {L_VIEW_DETAILS} ]
    {postrow.POST_TIME}{postrow.POST_TIME}
    {L_NO_POSTS}{L_NO_TOPICS_QUEUE}{L_NO_POSTS}
    - +
    {L_MARK_ALL} :: {L_UNMARK_ALL}{L_MARK_ALL} :: {L_UNMARK_ALL}
    diff --git a/phpBB/styles/subSilver/template/mcp_reports.html b/phpBB/styles/subsilver2/template/mcp_reports.html similarity index 74% rename from phpBB/styles/subSilver/template/mcp_reports.html rename to phpBB/styles/subsilver2/template/mcp_reports.html index e350d96d6d..3b746c9932 100644 --- a/phpBB/styles/subSilver/template/mcp_reports.html +++ b/phpBB/styles/subsilver2/template/mcp_reports.html @@ -21,12 +21,12 @@

    {postrow.POST_SUBJECT}

    {L_FORUM}: {postrow.FORUM_NAME}{postrow.FORUM_NAME} - {postrow.POST_AUTHOR_FULL}
    + {postrow.POST_AUTHOR_FULL}
    {postrow.POST_TIME} - {postrow.REPORTER_FULL} - {postrow.REPORT_TIME}
    + {postrow.REPORTER_FULL} + {postrow.REPORT_TIME}
    [ {L_VIEW_DETAILS} ] - + @@ -48,7 +48,7 @@ - +
    {L_MARK_ALL} :: {L_UNMARK_ALL}{L_MARK_ALL} :: {L_UNMARK_ALL}
    diff --git a/phpBB/styles/subSilver/template/mcp_topic.html b/phpBB/styles/subsilver2/template/mcp_topic.html similarity index 87% rename from phpBB/styles/subSilver/template/mcp_topic.html rename to phpBB/styles/subsilver2/template/mcp_topic.html index 5d47730c22..b73190cffa 100644 --- a/phpBB/styles/subSilver/template/mcp_topic.html +++ b/phpBB/styles/subsilver2/template/mcp_topic.html @@ -96,7 +96,24 @@ - + @@ -227,7 +229,7 @@ - @@ -238,6 +240,7 @@ + @@ -250,6 +253,7 @@ +
    {postrow.MESSAGE}

    +
    {postrow.MESSAGE}
    + +

    + + + + + + + + + + +
    {L_ATTACHMENTS}:
    {postrow.attachment.DISPLAY_ATTACHMENT}
    + + +
    @@ -134,7 +151,7 @@ - +
    {L_MARK_ALL} :: {L_UNMARK_ALL}{L_MARK_ALL} :: {L_UNMARK_ALL}
    diff --git a/phpBB/styles/subSilver/template/mcp_viewlogs.html b/phpBB/styles/subsilver2/template/mcp_viewlogs.html similarity index 90% rename from phpBB/styles/subSilver/template/mcp_viewlogs.html rename to phpBB/styles/subsilver2/template/mcp_viewlogs.html index 84684e6e77..785cada6bb 100644 --- a/phpBB/styles/subSilver/template/mcp_viewlogs.html +++ b/phpBB/styles/subsilver2/template/mcp_viewlogs.html @@ -44,8 +44,8 @@ - - + +
    diff --git a/phpBB/styles/subSilver/template/mcp_warn_front.html b/phpBB/styles/subsilver2/template/mcp_warn_front.html old mode 100755 new mode 100644 similarity index 100% rename from phpBB/styles/subSilver/template/mcp_warn_front.html rename to phpBB/styles/subsilver2/template/mcp_warn_front.html diff --git a/phpBB/styles/subSilver/template/mcp_warn_list.html b/phpBB/styles/subsilver2/template/mcp_warn_list.html old mode 100755 new mode 100644 similarity index 91% rename from phpBB/styles/subSilver/template/mcp_warn_list.html rename to phpBB/styles/subsilver2/template/mcp_warn_list.html index fcf2ca5412..9b1d6c13ac --- a/phpBB/styles/subSilver/template/mcp_warn_list.html +++ b/phpBB/styles/subsilver2/template/mcp_warn_list.html @@ -32,7 +32,7 @@ - +
    {PAGE_NUMBER} [ {TOTAL_USERS} ]
    diff --git a/phpBB/styles/subSilver/template/mcp_warn_post.html b/phpBB/styles/subsilver2/template/mcp_warn_post.html old mode 100755 new mode 100644 similarity index 100% rename from phpBB/styles/subSilver/template/mcp_warn_post.html rename to phpBB/styles/subsilver2/template/mcp_warn_post.html diff --git a/phpBB/styles/subSilver/template/mcp_warn_user.html b/phpBB/styles/subsilver2/template/mcp_warn_user.html old mode 100755 new mode 100644 similarity index 86% rename from phpBB/styles/subSilver/template/mcp_warn_user.html rename to phpBB/styles/subsilver2/template/mcp_warn_user.html index 61a1a5da1d..254f020db1 --- a/phpBB/styles/subSilver/template/mcp_warn_user.html +++ b/phpBB/styles/subsilver2/template/mcp_warn_user.html @@ -28,15 +28,15 @@
    - + - + - +
    {L_JOINED}: {L_JOINED}: {JOINED}
    {L_TOTAL_POSTS}: {L_TOTAL_POSTS}: {POSTS}
    {L_WARNINGS}: {L_WARNINGS}: {WARNINGS}
    diff --git a/phpBB/styles/subSilver/template/mcp_whois.html b/phpBB/styles/subsilver2/template/mcp_whois.html similarity index 100% rename from phpBB/styles/subSilver/template/mcp_whois.html rename to phpBB/styles/subsilver2/template/mcp_whois.html diff --git a/phpBB/styles/subSilver/template/memberlist_body.html b/phpBB/styles/subsilver2/template/memberlist_body.html similarity index 58% rename from phpBB/styles/subSilver/template/memberlist_body.html rename to phpBB/styles/subsilver2/template/memberlist_body.html index d24d3792bd..cbc25a147f 100644 --- a/phpBB/styles/subSilver/template/memberlist_body.html +++ b/phpBB/styles/subsilver2/template/memberlist_body.html @@ -1,4 +1,4 @@ - + @@ -14,18 +14,18 @@ - + - - - + + +
    {L_USERNAME_BEGINS_WITH}:  {L_USERNAME_BEGINS_WITH}:   {L_FIND_USERNAME}{L_HIDE_MEMBER_SEARCH}{L_FIND_USERNAME}{L_HIDE_MEMBER_SEARCH}
    - +
    @@ -33,14 +33,14 @@ - + - + @@ -60,7 +60,7 @@ - + @@ -71,13 +71,13 @@ - + - @@ -85,7 +85,7 @@ - +
    #{L_USERNAME}{L_USERNAME} {L_JOINED} {L_POSTS} {L_RANK} {L_SEND_MESSAGE} {L_EMAIL} {L_WEBSITE}{L_MARK}{L_MARK}
     {memberrow.ROW_NUMBER} {memberrow.USERNAME_FULL}{L_SELECT} ]{memberrow.USERNAME_FULL}{L_SELECT} ]  {memberrow.JOINED}  {memberrow.POSTS} {memberrow.RANK_IMG}{memberrow.RANK_TITLE}  {memberrow.PROFILE_FIELD1_VALUE}
    + {L_NO_GROUP_MEMBERS}{L_NO_MEMBERS}
    {L_SELECT_SORT_METHOD}:   {L_ORDER}   {L_SELECT_SORT_METHOD}:   {L_ORDER}  
    @@ -94,13 +94,13 @@ - +
    {PAGE_NUMBER} [ {TOTAL_USERS} ]{L_MARK_ALL} :: {L_UNMARK_ALL}
    {L_MARK_ALL} :: {L_UNMARK_ALL}
    - +
    @@ -109,6 +109,6 @@
    -
    +
    \ No newline at end of file diff --git a/phpBB/styles/subSilver/template/memberlist_email.html b/phpBB/styles/subsilver2/template/memberlist_email.html similarity index 92% rename from phpBB/styles/subSilver/template/memberlist_email.html rename to phpBB/styles/subsilver2/template/memberlist_email.html index 40cbed9377..ebea654f58 100644 --- a/phpBB/styles/subSilver/template/memberlist_email.html +++ b/phpBB/styles/subsilver2/template/memberlist_email.html @@ -29,7 +29,7 @@ function checkForm(formObj)
    - + @@ -93,6 +93,6 @@ function checkForm(formObj)
    -
    +
    \ No newline at end of file diff --git a/phpBB/styles/subSilver/template/memberlist_group.html b/phpBB/styles/subsilver2/template/memberlist_group.html similarity index 100% rename from phpBB/styles/subSilver/template/memberlist_group.html rename to phpBB/styles/subsilver2/template/memberlist_group.html diff --git a/phpBB/styles/subSilver/template/memberlist_im.html b/phpBB/styles/subsilver2/template/memberlist_im.html similarity index 89% rename from phpBB/styles/subSilver/template/memberlist_im.html rename to phpBB/styles/subsilver2/template/memberlist_im.html index 6fc738129f..285190c3d5 100644 --- a/phpBB/styles/subSilver/template/memberlist_im.html +++ b/phpBB/styles/subsilver2/template/memberlist_im.html @@ -37,14 +37,15 @@ /** * Check whether the browser supports this and whether MSNM is connected */ - function msn_supported() { + function msn_supported() + { //Does the browser support the MSNM object? if (app.MyStatus) { //Is MSNM connected? if (app.MyStatus == 1) - { - alert('{L_IM_MSNM_CONNECT}'); + { + alert('{L_IM_MSNM_CONNECT}'); return false; } } @@ -63,7 +64,7 @@ { if (msn_supported()) { - //Could return an error while MSNM is connecting, don't want that + // Could return an error while MSNM is connecting, don't want that try { app.AddContact(0, address); @@ -83,7 +84,7 @@ { if (msn_supported()) { - //Could return an error while MSNM is connecting, don't want that + // Could return an error while MSNM is connecting, don't want that try { app.InstantMessage(address); @@ -119,9 +120,6 @@ - - - diff --git a/phpBB/styles/subSilver/template/memberlist_leaders.html b/phpBB/styles/subsilver2/template/memberlist_leaders.html similarity index 95% rename from phpBB/styles/subSilver/template/memberlist_leaders.html rename to phpBB/styles/subsilver2/template/memberlist_leaders.html index 6b7d1726cd..ba6dbde617 100644 --- a/phpBB/styles/subSilver/template/memberlist_leaders.html +++ b/phpBB/styles/subsilver2/template/memberlist_leaders.html @@ -66,6 +66,6 @@
    -
    +
    \ No newline at end of file diff --git a/phpBB/styles/subSilver/template/memberlist_search.html b/phpBB/styles/subsilver2/template/memberlist_search.html similarity index 94% rename from phpBB/styles/subSilver/template/memberlist_search.html rename to phpBB/styles/subsilver2/template/memberlist_search.html index dd104c5fd6..c64d7321d0 100644 --- a/phpBB/styles/subSilver/template/memberlist_search.html +++ b/phpBB/styles/subsilver2/template/memberlist_search.html @@ -1,6 +1,6 @@ - + @@ -212,6 +212,7 @@ + +
    {L_IM_NO_JABBER}
    {L_ATTACHMENTS}:  +  
    {BBCODE_STATUS}
    {IMG_STATUS}
    {SMILIES_STATUS}
    @@ -413,7 +417,7 @@ - +
    diff --git a/phpBB/styles/subSilver/template/posting_buttons.html b/phpBB/styles/subsilver2/template/posting_buttons.html similarity index 84% rename from phpBB/styles/subSilver/template/posting_buttons.html rename to phpBB/styles/subsilver2/template/posting_buttons.html index b07f18a5ea..eda483e48f 100644 --- a/phpBB/styles/subSilver/template/posting_buttons.html +++ b/phpBB/styles/subsilver2/template/posting_buttons.html @@ -1,12 +1,12 @@ - + - + @@ -69,16 +69,17 @@ {L_FONT_SIZE}: + - - + + onmouseover="helpline('cb_{custom_tags.BBCODE_ID}')" onmouseout="helpline('tip')" /> @@ -86,9 +87,11 @@ + colspan="2"> {L_FONT_COLOR} + diff --git a/phpBB/styles/subSilver/template/posting_poll_body.html b/phpBB/styles/subsilver2/template/posting_poll_body.html similarity index 100% rename from phpBB/styles/subSilver/template/posting_poll_body.html rename to phpBB/styles/subsilver2/template/posting_poll_body.html diff --git a/phpBB/styles/subSilver/template/posting_preview.html b/phpBB/styles/subsilver2/template/posting_preview.html similarity index 100% rename from phpBB/styles/subSilver/template/posting_preview.html rename to phpBB/styles/subsilver2/template/posting_preview.html diff --git a/phpBB/styles/subSilver/template/posting_progress_bar.html b/phpBB/styles/subsilver2/template/posting_progress_bar.html similarity index 100% rename from phpBB/styles/subSilver/template/posting_progress_bar.html rename to phpBB/styles/subsilver2/template/posting_progress_bar.html diff --git a/phpBB/styles/subSilver/template/posting_review.html b/phpBB/styles/subsilver2/template/posting_review.html similarity index 67% rename from phpBB/styles/subSilver/template/posting_review.html rename to phpBB/styles/subsilver2/template/posting_review.html index 5dae2a6c82..c3a7f7aead 100644 --- a/phpBB/styles/subSilver/template/posting_review.html +++ b/phpBB/styles/subsilver2/template/posting_review.html @@ -20,7 +20,7 @@ - + @@ -47,7 +47,24 @@ @@ -57,7 +74,7 @@
    - +
    {post_review_row.MESSAGE}
    {post_review_row.MESSAGE}
    + + +

    + + + + + + + + + + +
    {L_ATTACHMENTS}:
    {post_review_row.attachment.DISPLAY_ATTACHMENT}
    + + +
    - +
     {post_review_row.MINI_POST_IMG}{post_review_row.MINI_POST_IMG}{post_review_row.MINI_POST_IMG} {L_POSTED}: {post_review_row.POST_DATE}
    diff --git a/phpBB/styles/subSilver/template/posting_smilies.html b/phpBB/styles/subsilver2/template/posting_smilies.html similarity index 86% rename from phpBB/styles/subSilver/template/posting_smilies.html rename to phpBB/styles/subsilver2/template/posting_smilies.html index 960e6a23b4..01564c9694 100644 --- a/phpBB/styles/subSilver/template/posting_smilies.html +++ b/phpBB/styles/subsilver2/template/posting_smilies.html @@ -3,7 +3,7 @@ @@ -17,7 +17,7 @@ var text_name = 'message'; {L_SMILIES} - {smiley.SMILEY_DESC}
    {L_CLOSE_WINDOW} + {smiley.SMILEY_CODE}
    {L_CLOSE_WINDOW} diff --git a/phpBB/styles/subSilver/template/posting_topic_review.html b/phpBB/styles/subsilver2/template/posting_topic_review.html similarity index 62% rename from phpBB/styles/subSilver/template/posting_topic_review.html rename to phpBB/styles/subsilver2/template/posting_topic_review.html index 1b5e192856..9ac6f90d9e 100644 --- a/phpBB/styles/subSilver/template/posting_topic_review.html +++ b/phpBB/styles/subsilver2/template/posting_topic_review.html @@ -15,7 +15,7 @@ - + @@ -28,7 +28,7 @@ - +
      {L_POST_SUBJECT}:  {topic_review_row.POST_SUBJECT} {QUOTE_IMG} {QUOTE_IMG}
    @@ -44,8 +44,24 @@
    {topic_review_row.MESSAGE}
    + + +

    + + + + + + + + + + +
    {L_ATTACHMENTS}:
    {topic_review_row.attachment.DISPLAY_ATTACHMENT}
    + + - + @@ -56,8 +72,8 @@ - - + +
    [ {L_POST_DETAILS} ]{topic_review_row.MINI_POST_IMG}[ {L_POST_DETAILS} ]{topic_review_row.MINI_POST_IMG}{topic_review_row.MINI_POST_IMG} {L_POSTED}: {topic_review_row.POST_DATE}
    diff --git a/phpBB/styles/subSilver/template/report_body.html b/phpBB/styles/subsilver2/template/report_body.html similarity index 93% rename from phpBB/styles/subSilver/template/report_body.html rename to phpBB/styles/subsilver2/template/report_body.html index 59072606cc..83e33b4761 100644 --- a/phpBB/styles/subSilver/template/report_body.html +++ b/phpBB/styles/subsilver2/template/report_body.html @@ -35,6 +35,6 @@ -
    +
    \ No newline at end of file diff --git a/phpBB/styles/subSilver/template/search_body.html b/phpBB/styles/subsilver2/template/search_body.html similarity index 97% rename from phpBB/styles/subSilver/template/search_body.html rename to phpBB/styles/subsilver2/template/search_body.html index 20385ef753..a914e5f38d 100644 --- a/phpBB/styles/subSilver/template/search_body.html +++ b/phpBB/styles/subsilver2/template/search_body.html @@ -75,6 +75,6 @@
    -
    +
    \ No newline at end of file diff --git a/phpBB/styles/subSilver/template/search_results.html b/phpBB/styles/subsilver2/template/search_results.html similarity index 86% rename from phpBB/styles/subSilver/template/search_results.html rename to phpBB/styles/subsilver2/template/search_results.html index 79853b83af..7977665893 100644 --- a/phpBB/styles/subSilver/template/search_results.html +++ b/phpBB/styles/subsilver2/template/search_results.html @@ -8,7 +8,7 @@ {L_SEARCHED_TOPIC}: {SEARCH_TOPIC}
    {L_SEARCHED_FOR}: {SEARCH_WORDS} {L_IGNORED_TERMS}: {IGNORED_WORDS} - {L_SEARCH_IN_RESULTS}: + {L_SEARCH_IN_RESULTS}: @@ -57,7 +57,7 @@

    {searchresults.LAST_POST_TIME}

    {searchresults.LAST_POST_AUTHOR_FULL} - {searchresults.LAST_POST_IMG} + {LAST_POST_IMG}

    @@ -92,14 +92,14 @@
    -
    + -
    {L_POSTED}: {searchresults.POST_DATE} 
    +
    {L_POSTED}: {searchresults.POST_DATE} 
    @@ -132,19 +132,15 @@ -
    {PAGE_NUMBER} [ {SEARCH_MATCHES} ]
    - +
    {PAGE_NUMBER} [ {SEARCH_MATCHES} ]
    +

    - - - - -
    {S_TIMEZONE}
    +
    -
    +
    \ No newline at end of file diff --git a/phpBB/styles/subSilver/template/searchbox.html b/phpBB/styles/subsilver2/template/searchbox.html similarity index 100% rename from phpBB/styles/subSilver/template/searchbox.html rename to phpBB/styles/subsilver2/template/searchbox.html diff --git a/phpBB/styles/subSilver/template/simple_footer.html b/phpBB/styles/subsilver2/template/simple_footer.html similarity index 89% rename from phpBB/styles/subSilver/template/simple_footer.html rename to phpBB/styles/subsilver2/template/simple_footer.html index b8f1cc865b..c8b69dd5ad 100644 --- a/phpBB/styles/subSilver/template/simple_footer.html +++ b/phpBB/styles/subsilver2/template/simple_footer.html @@ -13,7 +13,7 @@ //-->
    - Powered by phpBB © 2002, 2006 phpBB Group + Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
    diff --git a/phpBB/styles/subSilver/template/simple_header.html b/phpBB/styles/subsilver2/template/simple_header.html similarity index 84% rename from phpBB/styles/subSilver/template/simple_header.html rename to phpBB/styles/subsilver2/template/simple_header.html index 3b97809f50..f3e374fac0 100644 --- a/phpBB/styles/subSilver/template/simple_header.html +++ b/phpBB/styles/subsilver2/template/simple_header.html @@ -12,7 +12,7 @@ {META} -{SITENAME} • {PAGE_TITLE} +{SITENAME} • <!-- IF S_IN_MCP -->{L_MCP} • <!-- ELSEIF S_IN_UCP -->{L_UCP} • <!-- ENDIF -->{PAGE_TITLE} diff --git a/phpBB/styles/subSilver/template/template.cfg b/phpBB/styles/subsilver2/template/template.cfg similarity index 89% rename from phpBB/styles/subSilver/template/template.cfg rename to phpBB/styles/subsilver2/template/template.cfg index 180324275e..c83a1d94ad 100644 --- a/phpBB/styles/subSilver/template/template.cfg +++ b/phpBB/styles/subsilver2/template/template.cfg @@ -1,5 +1,5 @@ # -# phpBB Templaet Configuration File +# phpBB Template Configuration File # # @package phpBB3 # @copyright (c) 2005 phpBB Group @@ -17,7 +17,7 @@ # # General Information about this template -name = subSilver +name = subsilver2 copyright = © phpBB Group, 2003 -version = 2.1.1 +version = 3.0.0 diff --git a/phpBB/styles/subSilver/template/ucp_agreement.html b/phpBB/styles/subsilver2/template/ucp_agreement.html similarity index 100% rename from phpBB/styles/subSilver/template/ucp_agreement.html rename to phpBB/styles/subsilver2/template/ucp_agreement.html diff --git a/phpBB/styles/subSilver/template/ucp_attachments.html b/phpBB/styles/subsilver2/template/ucp_attachments.html similarity index 72% rename from phpBB/styles/subSilver/template/ucp_attachments.html rename to phpBB/styles/subsilver2/template/ucp_attachments.html index f4e4fb9815..35dcd33ac4 100644 --- a/phpBB/styles/subSilver/template/ucp_attachments.html +++ b/phpBB/styles/subsilver2/template/ucp_attachments.html @@ -18,7 +18,7 @@  {PAGE_NUMBER}
     [ {TOTAL_ATTACHMENTS} ]  - + @@ -36,11 +36,11 @@ -
    {L_SORT_BY}:  
     
    +
    {L_SORT_BY}:  
     
    - + diff --git a/phpBB/styles/subSilver/template/ucp_footer.html b/phpBB/styles/subsilver2/template/ucp_footer.html similarity index 66% rename from phpBB/styles/subSilver/template/ucp_footer.html rename to phpBB/styles/subsilver2/template/ucp_footer.html index 3b40f90852..a6d1dec7a7 100644 --- a/phpBB/styles/subSilver/template/ucp_footer.html +++ b/phpBB/styles/subsilver2/template/ucp_footer.html @@ -8,6 +8,6 @@ -
    +
    \ No newline at end of file diff --git a/phpBB/styles/subSilver/template/ucp_groups_manage.html b/phpBB/styles/subsilver2/template/ucp_groups_manage.html similarity index 86% rename from phpBB/styles/subSilver/template/ucp_groups_manage.html rename to phpBB/styles/subsilver2/template/ucp_groups_manage.html index d42a4b7fc6..ed26b75140 100644 --- a/phpBB/styles/subSilver/template/ucp_groups_manage.html +++ b/phpBB/styles/subsilver2/template/ucp_groups_manage.html @@ -27,7 +27,7 @@ {L_USERGROUPS} - {L_GROUPS_EXPLAIN} + {L_GROUPS_EXPLAIN} @@ -35,7 +35,7 @@ for="group_name">{L_GROUP_NAME}: - {GROUP_NAME} + style="color: #{GROUP_COLOUR};">{GROUP_NAME}
    @@ -45,7 +45,7 @@ -
    {L_GROUP_TYPE_EXPLAIN} +
    {L_GROUP_TYPE_EXPLAIN} {L_GROUP_OPEN}   {L_GROUP_REQUEST}   @@ -92,7 +92,7 @@
    {L_LINK_REMOTE_SIZE_EXPLAIN} - px X px + px X px @@ -187,11 +187,11 @@ -
    {L_MARK_ALL} :: {L_UNMARK_ALL}
    +
    {L_MARK_ALL} :: {L_UNMARK_ALL}
    -