From b6d6938b9fd99020dd4e5b92ef5fc8dc21a81a78 Mon Sep 17 00:00:00 2001 From: brunoais Date: Fri, 9 Aug 2013 17:01:09 +0100 Subject: [ticket/11663] Make generate_text_for_storage return the errors. generate_text_for_storage does not return anything, all returned values are outputted using the parameters so this uses the returned value with the same idea as many C language functions where the returned value is if all went well or not and if it didn't what went wrong. PHPBB3-11663 --- phpBB/includes/functions_content.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'phpBB') diff --git a/phpBB/includes/functions_content.php b/phpBB/includes/functions_content.php index 05d3c5fde2..c2cfabe983 100644 --- a/phpBB/includes/functions_content.php +++ b/phpBB/includes/functions_content.php @@ -542,7 +542,7 @@ function generate_text_for_storage(&$text, &$uid, &$bitfield, &$flags, $allow_bb $vars = array('text', 'uid', 'bitfield', 'flags'); extract($phpbb_dispatcher->trigger_event('core.modify_text_for_storage_after', compact($vars))); - return; + return $message_parser->warn_msg; } /** -- cgit v1.2.1 From 53888ec540a7f7b1aeabcb4ef2d1a6afce121c06 Mon Sep 17 00:00:00 2001 From: brunoais Date: Wed, 14 Aug 2013 10:44:45 +0100 Subject: [ticket/11663] Add the doc block about the return value. generate_text_for_storage does not return anything, all returned values are outputted using the parameters so this uses the returned value with the same idea as many C language functions where the returned value is if all went well or not and if it didn't what went wrong. PHPBB3-11663 --- phpBB/includes/functions_content.php | 2 ++ 1 file changed, 2 insertions(+) (limited to 'phpBB') diff --git a/phpBB/includes/functions_content.php b/phpBB/includes/functions_content.php index c2cfabe983..593d2eb045 100644 --- a/phpBB/includes/functions_content.php +++ b/phpBB/includes/functions_content.php @@ -481,6 +481,8 @@ function generate_text_for_display($text, $uid, $bitfield, $flags, $censor_text * For parsing custom parsed text to be stored within the database. * This function additionally returns the uid and bitfield that needs to be stored. * Expects $text to be the value directly from request_var() and in it's non-parsed form +* +* @return array An array of string with the errors that occurred while parsing */ function generate_text_for_storage(&$text, &$uid, &$bitfield, &$flags, $allow_bbcode = false, $allow_urls = false, $allow_smilies = false) { -- cgit v1.2.1 From 7a02a8bcf20b79feb996c2508e647c21f3a0ac70 Mon Sep 17 00:00:00 2001 From: brunoais Date: Sat, 17 Aug 2013 20:06:43 +0100 Subject: [ticket/11663] Add the doc block about the parameters. PHPBB3-11663 --- phpBB/includes/functions_content.php | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'phpBB') diff --git a/phpBB/includes/functions_content.php b/phpBB/includes/functions_content.php index 593d2eb045..7e501de9c8 100644 --- a/phpBB/includes/functions_content.php +++ b/phpBB/includes/functions_content.php @@ -481,6 +481,14 @@ function generate_text_for_display($text, $uid, $bitfield, $flags, $censor_text * For parsing custom parsed text to be stored within the database. * This function additionally returns the uid and bitfield that needs to be stored. * Expects $text to be the value directly from request_var() and in it's non-parsed form +* +* @param string $text The text to be replaced with the parsed one +* @param string $uid The BBCode uid for this parse +* @param string $bitfield The BBCode bitfield for this parse +* @param int $flags The allow_bbcode, allow_urls and allow_smilies compiled into a single integer. +* @param bool $allow_bbcode If BBCode is allowed (i.e. if BBCode is parsed) +* @param bool $allow_urls If urls is allowed +* @param bool $allow_smilies If smilies are allowed * * @return array An array of string with the errors that occurred while parsing */ -- cgit v1.2.1 From 5f788e40d8d2b122b92f2b02dbfdc40960a1e047 Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Wed, 16 Oct 2013 00:37:54 +0200 Subject: [ticket/11924] Bring layout of events.md to one style PHPBB3-11924 --- phpBB/docs/events.md | 28 ++++++++++++++++++---------- 1 file changed, 18 insertions(+), 10 deletions(-) (limited to 'phpBB') diff --git a/phpBB/docs/events.md b/phpBB/docs/events.md index bef4727149..17615d1405 100644 --- a/phpBB/docs/events.md +++ b/phpBB/docs/events.md @@ -21,7 +21,7 @@ acp_overall_footer_after acp_overall_header_head_append === * Location: adm/style/overall_header.html -* Add assets within the `` tags in the ACP +* Purpose: Add assets within the `` tags in the ACP acp_simple_footer_after === @@ -31,7 +31,7 @@ acp_simple_footer_after acp_simple_header_head_append === * Location: adm/style/overall_header.html -* Add assets within the `` tags in the simple header of the ACP +* Purpose: Add assets within the `` tags in the simple header of the ACP acp_users_overview_options_append === @@ -91,7 +91,8 @@ overall_footer_after overall_footer_breadcrumb_append === -* Location: styles/prosilver/template/overall_footer.html +* Locations: + + styles/prosilver/template/overall_footer.html * Purpose: Add links to the list of breadcrumbs in the footer overall_footer_copyright_append @@ -124,12 +125,14 @@ overall_header_head_append overall_header_navigation_append === -* Location: styles/prosilver/template/overall_header.html +* Locations: + + styles/prosilver/template/overall_header.html * Purpose: Add links after the navigation links in the header overall_header_navigation_prepend === -* Location: styles/prosilver/template/overall_header.html +* Locations: + + styles/prosilver/template/overall_header.html * Purpose: Add links before the navigation links in the header posting_editor_options_prepend @@ -141,7 +144,8 @@ posting_editor_options_prepend simple_footer_after === -* Location: styles/prosilver/template/simple_footer.html +* Locations: + + styles/prosilver/template/simple_footer.html * Purpose: Add content directly prior to the `` tag of the simple footer topiclist_row_prepend @@ -164,19 +168,22 @@ topiclist_row_append ucp_pm_viewmessage_custom_fields_after === -* Location: styles/prosilver/template/ucp_pm_viewmessage.html +* Locations: + + styles/prosilver/template/ucp_pm_viewmessage.html * Purpose: Add data after the custom fields on the user profile when viewing a private message ucp_pm_viewmessage_custom_fields_before === -* Location: styles/prosilver/template/ucp_pm_viewmessage.html +* Locations: + + styles/prosilver/template/ucp_pm_viewmessage.html * Purpose: Add data before the custom fields on the user profile when viewing a private message ucp_pm_viewmessage_print_head_append === -* Location: styles/prosilver/template/ucp_pm_viewmessage_print.html +* Locations: + + styles/prosilver/template/ucp_pm_viewmessage_print.html * Purpose: Add asset calls directly before the `` tag of the Print PM screen ucp_prefs_personal_prepend @@ -241,7 +248,8 @@ Display Options screen viewtopic_print_head_append === -* Location: styles/prosilver/template/viewtopic_print.html +* Locations: + + styles/prosilver/template/viewtopic_print.html * Purpose: Add asset calls directly before the `` tag of the Print Topic screen viewtopic_body_footer_before -- cgit v1.2.1 From 9cf634e517a9e1ac4dda8b8b01cc21f8680f529c Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Wed, 16 Oct 2013 00:39:52 +0200 Subject: [ticket/11924] Add script to export events.md with wiki markup PHPBB3-11924 --- phpBB/develop/export_events_for_wiki.php | 102 +++++++++++++++++++++++++++++++ 1 file changed, 102 insertions(+) create mode 100644 phpBB/develop/export_events_for_wiki.php (limited to 'phpBB') diff --git a/phpBB/develop/export_events_for_wiki.php b/phpBB/develop/export_events_for_wiki.php new file mode 100644 index 0000000000..72e5607e00 --- /dev/null +++ b/phpBB/develop/export_events_for_wiki.php @@ -0,0 +1,102 @@ + Date: Wed, 16 Oct 2013 00:45:28 +0200 Subject: [ticket/11924] Add version info of template events to events.md PHPBB3-11924 --- phpBB/develop/export_events_for_wiki.php | 5 ++-- phpBB/docs/events.md | 44 ++++++++++++++++++++++++++++++++ 2 files changed, 47 insertions(+), 2 deletions(-) (limited to 'phpBB') diff --git a/phpBB/develop/export_events_for_wiki.php b/phpBB/develop/export_events_for_wiki.php index 72e5607e00..c43d1fdfcd 100644 --- a/phpBB/develop/export_events_for_wiki.php +++ b/phpBB/develop/export_events_for_wiki.php @@ -41,7 +41,8 @@ function export_from_eventsmd($filter) if ($filter == 'acp' && strpos($event_name, 'acp_') !== 0) continue; if ($filter == 'styles' && strpos($event_name, 'acp_') === 0) continue; - list($file_details, $explanition) = explode("\n* Purpose: ", $details); + list($file_details, $details) = explode("\n* Since: ", $details); + list($version, $explanition) = explode("\n* Purpose: ", $details); echo "|- id=\"{$event_name}\"\n"; echo "| [[#{$event_name}|{$event_name}]] || "; @@ -68,7 +69,7 @@ function export_from_eventsmd($filter) { echo substr($file_details, strlen("* Location: adm/style/")); } - echo " || 3.1.0-a1 || " . str_replace("\n", ' ', $explanition) . "\n"; + echo " || {$version} || " . str_replace("\n", ' ', $explanition) . "\n"; } } diff --git a/phpBB/docs/events.md b/phpBB/docs/events.md index 17615d1405..49804a57bc 100644 --- a/phpBB/docs/events.md +++ b/phpBB/docs/events.md @@ -1,41 +1,49 @@ acp_forums_normal_settings_append === * Location: adm/style/acp_forums.html +* Since: 3.1.0-a1 * Purpose: Add settings to forums acp_main_actions_append === * Location: adm/style/acp_main.html +* Since: 3.1.0-a1 * Purpose: Add actions to the ACP main page below the cache purge action acp_main_notice_after === * Location: adm/style/acp_main.html +* Since: 3.1.0-a1 * Purpose: Add notices or other blocks in the ACP below other configuration notices acp_overall_footer_after === * Location: adm/style/overall_footer.html +* Since: 3.1.0-a1 * Purpose: Add content below the footer in the ACP acp_overall_header_head_append === * Location: adm/style/overall_header.html +* Since: 3.1.0-a1 * Purpose: Add assets within the `` tags in the ACP acp_simple_footer_after === * Location: adm/style/simple_footer.html +* Since: 3.1.0-a1 * Purpose: Add content below the simple footer in the ACP acp_simple_header_head_append === * Location: adm/style/overall_header.html +* Since: 3.1.0-a1 * Purpose: Add assets within the `` tags in the simple header of the ACP acp_users_overview_options_append === * Location: adm/style/acp_users.html +* Since: 3.1.0-a1 * Purpose: Add options and settings on user overview page forumlist_body_last_post_title_prepend @@ -43,6 +51,7 @@ forumlist_body_last_post_title_prepend * Locations: + styles/prosilver/template/forumlist_body.html + styles/subsilver2/template/forumlist_body.html +* Since: 3.1.0-a1 * Purpose: Add content before the post title of the latest post in a forum on the forum list. index_body_stat_blocks_before @@ -50,6 +59,7 @@ index_body_stat_blocks_before * Locations: + styles/prosilver/template/index_body.html + styles/subsilver2/template/index_body.html +* Since: 3.1.0-a1 * Purpose: Add new statistic blocks above the Who Is Online and Board Statistics blocks memberlist_body_username_append @@ -57,6 +67,7 @@ memberlist_body_username_append * Locations: + styles/prosilver/template/memberlist_body.html + styles/subsilver2/template/memberlist_body.html +* Since: 3.1.0-a1 * Purpose: Add information after every username in the memberlist. Works in all display modes (leader, group and normal memberlist). @@ -65,6 +76,7 @@ memberlist_body_username_prepend * Locations: + styles/prosilver/template/memberlist_body.html + styles/subsilver2/template/memberlist_body.html +* Since: 3.1.0-a1 * Purpose: Add information before every username in the memberlist. Works in all display modes (leader, group and normal memberlist). @@ -73,6 +85,7 @@ memberlist_view_user_statistics_after * Locations: + styles/prosilver/template/memberlist_view.html + styles/subsilver2/template/memberlist_view.html +* Since: 3.1.0-a1 * Purpose: Add entries after the user statistics part of any user profile memberlist_view_user_statistics_before @@ -80,6 +93,7 @@ memberlist_view_user_statistics_before * Locations: + styles/prosilver/template/memberlist_view.html + styles/subsilver2/template/memberlist_view.html +* Since: 3.1.0-a1 * Purpose: Add entries before the user statistics part of any user profile overall_footer_after @@ -87,12 +101,14 @@ overall_footer_after * Locations: + styles/prosilver/template/overall_footer.html + styles/subsilver2/template/overall_footer.html +* Since: 3.1.0-a1 * Purpose: Add content at the end of the file, directly prior to the `` tag overall_footer_breadcrumb_append === * Locations: + styles/prosilver/template/overall_footer.html +* Since: 3.1.0-a1 * Purpose: Add links to the list of breadcrumbs in the footer overall_footer_copyright_append @@ -100,6 +116,7 @@ overall_footer_copyright_append * Locations: + styles/prosilver/template/overall_footer.html + styles/subsilver2/template/overall_footer.html +* Since: 3.1.0-a1 * Purpose: Add content after the copyright line (no new line by default), before the ACP link overall_footer_copyright_prepend @@ -107,6 +124,7 @@ overall_footer_copyright_prepend * Locations: + styles/prosilver/template/overall_footer.html + styles/subsilver2/template/overall_footer.html +* Since: 3.1.0-a1 * Purpose: Add content before the copyright line overall_header_breadcrumb_append @@ -114,6 +132,7 @@ overall_header_breadcrumb_append * Locations: + styles/prosilver/template/overall_header.html + styles/subsilver2/template/breadcrumbs.html +* Since: 3.1.0-a1 * Purpose: Add links to the list of breadcrumbs in the header overall_header_head_append @@ -121,18 +140,21 @@ overall_header_head_append * Locations: + styles/prosilver/template/overall_header.html + styles/subsilver2/template/overall_header.html +* Since: 3.1.0-a1 * Purpose: Add asset calls directly before the `` tag overall_header_navigation_append === * Locations: + styles/prosilver/template/overall_header.html +* Since: 3.1.0-a1 * Purpose: Add links after the navigation links in the header overall_header_navigation_prepend === * Locations: + styles/prosilver/template/overall_header.html +* Since: 3.1.0-a1 * Purpose: Add links before the navigation links in the header posting_editor_options_prepend @@ -140,12 +162,14 @@ posting_editor_options_prepend * Locations: + styles/prosilver/template/posting_editor.html + styles/prosilver/template/posting_body.html +* Since: 3.1.0-a1 * Purpose: Add posting options on the posting screen simple_footer_after === * Locations: + styles/prosilver/template/simple_footer.html +* Since: 3.1.0-a1 * Purpose: Add content directly prior to the `` tag of the simple footer topiclist_row_prepend @@ -155,6 +179,7 @@ topiclist_row_prepend + styles/prosilver/template/viewforum_body.html + styles/subsilver2/template/search_results.html + styles/subsilver2/template/viewforum_body.html +* Since: 3.1.0-a1 * Purpose: Add content into topic rows (inside the elements containing topic titles) topiclist_row_append @@ -164,12 +189,14 @@ topiclist_row_append + styles/prosilver/template/viewforum_body.html + styles/subsilver2/template/search_results.html + styles/subsilver2/template/viewforum_body.html +* Since: 3.1.0-a1 * Purpose: Add content into topic rows (inside the elements containing topic titles) ucp_pm_viewmessage_custom_fields_after === * Locations: + styles/prosilver/template/ucp_pm_viewmessage.html +* Since: 3.1.0-a1 * Purpose: Add data after the custom fields on the user profile when viewing a private message @@ -177,6 +204,7 @@ ucp_pm_viewmessage_custom_fields_before === * Locations: + styles/prosilver/template/ucp_pm_viewmessage.html +* Since: 3.1.0-a1 * Purpose: Add data before the custom fields on the user profile when viewing a private message @@ -184,6 +212,7 @@ ucp_pm_viewmessage_print_head_append === * Locations: + styles/prosilver/template/ucp_pm_viewmessage_print.html +* Since: 3.1.0-a1 * Purpose: Add asset calls directly before the `` tag of the Print PM screen ucp_prefs_personal_prepend @@ -191,6 +220,7 @@ ucp_prefs_personal_prepend * Locations: + styles/prosilver/template/ucp_prefs_personal.html + styles/subsilver2/template/ucp_prefs_personal.html +* Since: 3.1.0-a1 * Purpose: Add user options to the top of the Edit Global Settings block ucp_prefs_personal_append @@ -198,6 +228,7 @@ ucp_prefs_personal_append * Locations: + styles/prosilver/template/ucp_prefs_personal.html + styles/subsilver2/template/ucp_prefs_personal.html +* Since: 3.1.0-a1 * Purpose: Add user options to the bottom of the Edit Global Settings block ucp_prefs_post_prepend @@ -205,6 +236,7 @@ ucp_prefs_post_prepend * Locations: + styles/prosilver/template/ucp_prefs_post.html + styles/subsilver2/template/ucp_prefs_post.html +* Since: 3.1.0-a1 * Purpose: Add user options to the top of the Edit Posting Defaults block ucp_prefs_post_append @@ -212,6 +244,7 @@ ucp_prefs_post_append * Locations: + styles/prosilver/template/ucp_prefs_post.html + styles/subsilver2/template/ucp_prefs_post.html +* Since: 3.1.0-a1 * Purpose: Add user options to the bottom of the Edit Posting Defaults block ucp_prefs_view_radio_buttons_prepend @@ -219,6 +252,7 @@ ucp_prefs_view_radio_buttons_prepend * Locations: + styles/prosilver/template/ucp_prefs_view.html + styles/subsilver2/template/ucp_prefs_view.html +* Since: 3.1.0-a1 * Purpose: Add options to the top of the radio buttons block of the Edit Display Options screen @@ -227,6 +261,7 @@ ucp_prefs_view_radio_buttons_append * Locations: + styles/prosilver/template/ucp_prefs_view.html + styles/subsilver2/template/ucp_prefs_view.html +* Since: 3.1.0-a1 * Purpose: Add options to the bottom of the radio buttons block of the Edit Display Options screen @@ -235,6 +270,7 @@ ucp_prefs_view_select_menu_prepend * Locations: + styles/prosilver/template/ucp_prefs_view.html + styles/subsilver2/template/ucp_prefs_view.html +* Since: 3.1.0-a1 * Purpose: Add options to the top of the drop-down lists block of the Edit Display Options screen @@ -243,6 +279,7 @@ ucp_prefs_view_select_menu_append * Locations: + styles/prosilver/template/ucp_prefs_view.html + styles/subsilver2/template/ucp_prefs_view.html +* Since: 3.1.0-a1 * Purpose: Add options to the bottom of the drop-down lists block of the Edit Display Options screen @@ -250,6 +287,7 @@ viewtopic_print_head_append === * Locations: + styles/prosilver/template/viewtopic_print.html +* Since: 3.1.0-a1 * Purpose: Add asset calls directly before the `` tag of the Print Topic screen viewtopic_body_footer_before @@ -257,6 +295,7 @@ viewtopic_body_footer_before * Locations: + styles/prosilver/template/viewtopic_body.html + styles/subsilver2/template/viewtopic_body.html +* Since: 3.1.0-a1 * Purpose: Add content to the bottom of the View topic screen below the posts and quick reply, directly before the jumpbox in Prosilver, breadcrumbs in Subsilver2. @@ -266,6 +305,7 @@ viewtopic_body_post_buttons_after * Locations: + styles/prosilver/template/viewtopic_body.html + styles/subsilver2/template/viewtopic_body.html +* Since: 3.1.0-a1 * Purpose: Add post button to posts (next to edit, quote etc), at the end of the list. @@ -274,6 +314,7 @@ viewtopic_body_post_buttons_before * Locations: + styles/prosilver/template/viewtopic_body.html + styles/subsilver2/template/viewtopic_body.html +* Since: 3.1.0-a1 * Purpose: Add post button to posts (next to edit, quote etc), at the start of the list. @@ -282,6 +323,7 @@ viewtopic_body_postrow_custom_fields_after * Locations: + styles/prosilver/template/viewtopic_body.html + styles/subsilver2/template/viewtopic_body.html +* Since: 3.1.0-a1 * Purpose: Add data after the custom fields on the user profile when viewing a post @@ -290,6 +332,7 @@ viewtopic_body_postrow_custom_fields_before * Locations: + styles/prosilver/template/viewtopic_body.html + styles/subsilver2/template/viewtopic_body.html +* Since: 3.1.0-a1 * Purpose: Add data before the custom fields on the user profile when viewing a post @@ -298,4 +341,5 @@ viewtopic_topic_title_prepend * Locations: + styles/prosilver/template/viewtopic_body.html + styles/subsilver2/template/viewtopic_body.html +* Since: 3.1.0-a1 * Purpose: Add content directly before the topic title link on the View topic screen -- cgit v1.2.1 From a03965554e7a286057b18a86c561f874759f8f0a Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Wed, 16 Oct 2013 00:48:51 +0200 Subject: [ticket/11924] Reduce unneccessary load PHPBB3-11924 --- phpBB/develop/export_events_for_wiki.php | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'phpBB') diff --git a/phpBB/develop/export_events_for_wiki.php b/phpBB/develop/export_events_for_wiki.php index c43d1fdfcd..5acc698a7e 100644 --- a/phpBB/develop/export_events_for_wiki.php +++ b/phpBB/develop/export_events_for_wiki.php @@ -1,17 +1,13 @@ Date: Wed, 16 Oct 2013 16:32:00 +0200 Subject: [ticket/11924] Add option to export php event list PHPBB3-11924 --- phpBB/develop/export_events_for_wiki.php | 242 +++++++++++++++++++++++++++++++ 1 file changed, 242 insertions(+) (limited to 'phpBB') diff --git a/phpBB/develop/export_events_for_wiki.php b/phpBB/develop/export_events_for_wiki.php index 5acc698a7e..48eb4224b0 100644 --- a/phpBB/develop/export_events_for_wiki.php +++ b/phpBB/develop/export_events_for_wiki.php @@ -18,6 +18,9 @@ function usage() echo "\n"; echo "styles:\n"; echo " Export all events for files in the prosilver and subsilver2 styles.\n"; + echo "\n"; + echo "php:\n"; + echo " Export all events for php-files.\n"; exit(2); } @@ -70,6 +73,241 @@ function export_from_eventsmd($filter) } } +function export_from_php() +{ + global $phpbb_root_path; + + $files = get_file_list($phpbb_root_path); + $events = array(); + foreach ($files as $file) + { + $file_events = check_for_events($file); + if (!empty($file_events)) + { + $events = array_merge($events, $file_events); + } + } + + ksort($events); + + foreach ($events as $event) + { + echo '|- id="' . $event['event'] . '"' . "\n"; + echo '| [[#' . $event['event'] . '|' . $event['event'] . ']] || ' . $event['file'] . ' || ' . implode(', ', $event['arguments']) . ' || ' . $event['since'] . ' || ' . $event['description'] . "\n"; + } +} + +function check_for_events($file) +{ + global $phpbb_root_path; + + $events = array(); + $content = file_get_contents($phpbb_root_path . $file); + + if (strpos($content, "phpbb_dispatcher->trigger_event('") || strpos($content, "phpbb_dispatcher->dispatch('")) + { + $lines = explode("\n", $content); + for ($i = 0, $num_lines = sizeof($lines); $i < $num_lines; $i++) + { + if ($found_trigger_event = strpos($lines[$i], "phpbb_dispatcher->trigger_event('")) + { + $event_line = $i; + $event_name = $lines[$event_line]; + $event_name = substr($event_name, $found_trigger_event + strlen("phpbb_dispatcher->trigger_event('")); + $event_name = substr($event_name, 0, strpos($event_name, "'")); + + // Validate @event name + $find_event_line = 1; + while (strpos($lines[$event_line - $find_event_line], '* @event ') === false) + { + $find_event_line++; + + if ($find_event_line > min(50, $event_line)) + { + throw new LogicException('Can not find @event tag for event "' . $event_name . '" in file "' . $file . '"'); + } + } + $event_name_tag = substr(trim($lines[$event_line - $find_event_line]), strlen('* @event ')); + if ($event_name_tag !== $event_name) + { + throw new LogicException('Event name does not match @event tag for event "' . $event_name . '" in file "' . $file . '"'); + } + + // Find $vars array lines + $find_varsarray_line = 1; + while (strpos($lines[$event_line - $find_varsarray_line], "vars = array('") === false) + { + $find_varsarray_line++; + + if ($find_varsarray_line > min(50, $event_line)) + { + throw new LogicException('Can not find "$vars = array()"-line for event "' . $event_name . '" in file "' . $file . '"'); + } + } + $varsarray = substr(trim($lines[$event_line - $find_varsarray_line]), strlen("\$vars = array('"), -3); + $arguments = explode("', '", $varsarray); + + // Validate $vars array with @var + $find_vars_line = 3; + $doc_vars = array(); + while (strpos(trim($lines[$event_line - $find_vars_line]), '*') === 0) + { + $var_line = trim($lines[$event_line - $find_vars_line]); + $var_line = preg_replace('!\s+!', ' ', $var_line); + if (strpos($var_line, '* @var ') === 0) + { + $doc_line = explode(' ', $var_line); + if (isset($doc_line[3])) + { + $doc_vars[] = $doc_line[3]; + } + } + $find_vars_line++; + } + if (sizeof($arguments) !== sizeof($doc_vars) && array_intersect($arguments, $doc_vars)) + { + throw new LogicException('$vars array does not match the list of @var tags for event "' . $event_name . '" in file "' . $file . '"'); + } + + // Find @since + $find_since_line = 1; + while (strpos($lines[$event_line - $find_since_line], '* @since ') === false) + { + $find_since_line++; + + if ($find_since_line > min(50, $event_line)) + { + throw new LogicException('Can not find @since tag for event "' . $event_name . '" in file "' . $file . '"'); + } + } + $since = substr(trim($lines[$event_line - $find_since_line]), strlen('* @since ')); + $since = ($since == '3.1-A1') ? '3.1.0-a1' : $since; + + // Find event description line + $find_description_line = 3; + while (strpos(trim($lines[$event_line - $find_description_line]), '*') === 0) + { + $find_description_line++; + + if ($find_description_line > min(50, $event_line)) + { + throw new LogicException('Can not find description-line for event "' . $event_name . '" in file "' . $file . '"'); + } + } + $description = substr(trim($lines[$event_line - $find_description_line + 1]), strlen('* ')); + + $events[$event_name] = array( + 'event' => $event_name, + 'file' => $file, + 'arguments' => $arguments, + 'since' => $since, + 'description' => $description, + ); + } + if ($found_trigger_event = strpos($lines[$i], "phpbb_dispatcher->dispatch('")) + { + $event_line = $i; + $event_name = $lines[$event_line]; + $event_name = substr($event_name, $found_trigger_event + strlen("phpbb_dispatcher->dispatch('")); + $event_name = substr($event_name, 0, strpos($event_name, "'")); + + // Validate @event name + $find_event_line = 1; + while (strpos($lines[$event_line - $find_event_line], '* @event ') === false) + { + $find_event_line++; + } + $event_name_tag = substr(trim($lines[$event_line - $find_event_line]), strlen('* @event ')); + if ($event_name_tag !== $event_name) + { + throw new LogicException('Event name does not match @event tag for event "' . $event_name . '" in file "' . $file . '"'); + } + + // Find @since + $find_since_line = 1; + while (strpos($lines[$event_line - $find_since_line], '* @since ') === false) + { + $find_since_line++; + } + $since = substr(trim($lines[$event_line - $find_since_line]), strlen('* @since ')); + $since = ($since == '3.1-A1') ? '3.1.0-a1' : $since; + + // Find event description line + $find_description_line = 3; + while (strpos(trim($lines[$event_line - $find_description_line]), '*') === 0) + { + $find_description_line++; + } + $description = substr(trim($lines[$event_line - $find_description_line + 1]), strlen('* ')); + + $events[$event_name] = array( + 'event' => $event_name, + 'file' => $file, + 'arguments' => array(), + 'since' => $since, + 'description' => $description, + ); + } + } + } + + return $events; +} + +/** +* Returns a list of files in that directory +* +* Works recursive with any depth +* +* @param string $dir Directory to go through +* @return array List of files (including directories from within $dir +*/ +function get_file_list($dir, $path = '') +{ + try + { + $iterator = new \DirectoryIterator($dir); + } + catch (Exception $e) + { + return array(); + } + + $files = array(); + foreach ($iterator as $file_info) + { + if ($file_info->isDot()) + { + continue; + } + + // Do not scan some directories + if ($file_info->isDir() && ( + ($path == '' && in_array($file_info->getFilename(), array('cache', 'develop', 'ext', 'files', 'language', 'store', 'vendor'))) + || ($path == '/includes' && in_array($file_info->getFilename(), array('utf'))) + || ($path == '/phpbb/db/migration' && in_array($file_info->getFilename(), array('data'))) + || ($path == '/phpbb' && in_array($file_info->getFilename(), array('event'))) + )) + { + continue; + } + else if ($file_info->isDir()) + { + $sub_dir = get_file_list($file_info->getPath() . '/' . $file_info->getFilename(), $path . '/' . $file_info->getFilename()); + foreach ($sub_dir as $file) + { + $files[] = $file_info->getFilename() . '/' . $file; + } + } + else if ($file_info->getExtension() == 'php') + { + $files[] = $file_info->getFilename(); + } + } + + return $files; +} + function validate_argument_count($count) { global $argv; @@ -94,6 +332,10 @@ switch ($action) export_from_eventsmd('styles'); break; + case 'php': + export_from_php(); + break; + default: usage(); } -- cgit v1.2.1 From 3c9a8a3788f4dda1ef16430f16d6392a9e6f8dad Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Wed, 16 Oct 2013 16:32:40 +0200 Subject: [ticket/11924] Fix some minor issues with the php event docs PHPBB3-11924 --- phpBB/includes/acp/acp_forums.php | 2 +- phpBB/includes/functions.php | 12 ++++++------ phpBB/includes/ucp/ucp_zebra.php | 2 +- phpBB/posting.php | 2 +- 4 files changed, 9 insertions(+), 9 deletions(-) (limited to 'phpBB') diff --git a/phpBB/includes/acp/acp_forums.php b/phpBB/includes/acp/acp_forums.php index 258aabcc0d..029f4b23c9 100644 --- a/phpBB/includes/acp/acp_forums.php +++ b/phpBB/includes/acp/acp_forums.php @@ -1470,7 +1470,7 @@ class acp_forums /** * Event when we move content from one forum to another * - * @event core.acp_manage_forums_move_children + * @event core.acp_manage_forums_move_content * @var int from_id If of the current parent forum * @var int to_id If of the new parent forum * @var bool sync Shall we sync the "to"-forum's data diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php index 947e29ea02..a077dd4078 100644 --- a/phpBB/includes/functions.php +++ b/phpBB/includes/functions.php @@ -5609,14 +5609,14 @@ function garbage_collection() global $cache, $db; global $phpbb_dispatcher; - /** - * Unload some objects, to free some memory, before we finish our task - * - * @event core.garbage_collection - * @since 3.1-A1 - */ if (!empty($phpbb_dispatcher)) { + /** + * Unload some objects, to free some memory, before we finish our task + * + * @event core.garbage_collection + * @since 3.1-A1 + */ $phpbb_dispatcher->dispatch('core.garbage_collection'); } diff --git a/phpBB/includes/ucp/ucp_zebra.php b/phpBB/includes/ucp/ucp_zebra.php index 6bb3cdc145..090f9bf34c 100644 --- a/phpBB/includes/ucp/ucp_zebra.php +++ b/phpBB/includes/ucp/ucp_zebra.php @@ -64,7 +64,7 @@ class ucp_zebra * @var array user_ids User ids we remove * @since 3.1-A1 */ - $vars = array('user_ids'); + $vars = array('mode', 'user_ids'); extract($phpbb_dispatcher->trigger_event('core.ucp_remove_zebra', compact($vars))); $sql = 'DELETE FROM ' . ZEBRA_TABLE . ' diff --git a/phpBB/posting.php b/phpBB/posting.php index 396b320eac..e29b74af65 100644 --- a/phpBB/posting.php +++ b/phpBB/posting.php @@ -1525,7 +1525,7 @@ $template->assign_vars(array( * @event core.posting_modify_template_vars * @since 3.1-A1 */ -$phpbb_dispatcher->trigger_event('core.posting_modify_template_vars'); +$phpbb_dispatcher->dispatch('core.posting_modify_template_vars'); // Build custom bbcodes array display_custom_bbcodes(); -- cgit v1.2.1 From 91eeebfb07e416d21d9c4fe57e0387f3b075024d Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Wed, 16 Oct 2013 16:38:22 +0200 Subject: [ticket/11924] Remove duplicated code PHPBB3-11924 --- phpBB/develop/export_events_for_wiki.php | 76 +++++++++----------------------- 1 file changed, 22 insertions(+), 54 deletions(-) (limited to 'phpBB') diff --git a/phpBB/develop/export_events_for_wiki.php b/phpBB/develop/export_events_for_wiki.php index 48eb4224b0..cce5939f48 100644 --- a/phpBB/develop/export_events_for_wiki.php +++ b/phpBB/develop/export_events_for_wiki.php @@ -109,6 +109,7 @@ function check_for_events($file) $lines = explode("\n", $content); for ($i = 0, $num_lines = sizeof($lines); $i < $num_lines; $i++) { + $event_line = 0; if ($found_trigger_event = strpos($lines[$i], "phpbb_dispatcher->trigger_event('")) { $event_line = $i; @@ -116,23 +117,6 @@ function check_for_events($file) $event_name = substr($event_name, $found_trigger_event + strlen("phpbb_dispatcher->trigger_event('")); $event_name = substr($event_name, 0, strpos($event_name, "'")); - // Validate @event name - $find_event_line = 1; - while (strpos($lines[$event_line - $find_event_line], '* @event ') === false) - { - $find_event_line++; - - if ($find_event_line > min(50, $event_line)) - { - throw new LogicException('Can not find @event tag for event "' . $event_name . '" in file "' . $file . '"'); - } - } - $event_name_tag = substr(trim($lines[$event_line - $find_event_line]), strlen('* @event ')); - if ($event_name_tag !== $event_name) - { - throw new LogicException('Event name does not match @event tag for event "' . $event_name . '" in file "' . $file . '"'); - } - // Find $vars array lines $find_varsarray_line = 1; while (strpos($lines[$event_line - $find_varsarray_line], "vars = array('") === false) @@ -168,54 +152,28 @@ function check_for_events($file) { throw new LogicException('$vars array does not match the list of @var tags for event "' . $event_name . '" in file "' . $file . '"'); } - - // Find @since - $find_since_line = 1; - while (strpos($lines[$event_line - $find_since_line], '* @since ') === false) - { - $find_since_line++; - - if ($find_since_line > min(50, $event_line)) - { - throw new LogicException('Can not find @since tag for event "' . $event_name . '" in file "' . $file . '"'); - } - } - $since = substr(trim($lines[$event_line - $find_since_line]), strlen('* @since ')); - $since = ($since == '3.1-A1') ? '3.1.0-a1' : $since; - - // Find event description line - $find_description_line = 3; - while (strpos(trim($lines[$event_line - $find_description_line]), '*') === 0) - { - $find_description_line++; - - if ($find_description_line > min(50, $event_line)) - { - throw new LogicException('Can not find description-line for event "' . $event_name . '" in file "' . $file . '"'); - } - } - $description = substr(trim($lines[$event_line - $find_description_line + 1]), strlen('* ')); - - $events[$event_name] = array( - 'event' => $event_name, - 'file' => $file, - 'arguments' => $arguments, - 'since' => $since, - 'description' => $description, - ); } - if ($found_trigger_event = strpos($lines[$i], "phpbb_dispatcher->dispatch('")) + else if ($found_trigger_event = strpos($lines[$i], "phpbb_dispatcher->dispatch('")) { $event_line = $i; $event_name = $lines[$event_line]; $event_name = substr($event_name, $found_trigger_event + strlen("phpbb_dispatcher->dispatch('")); $event_name = substr($event_name, 0, strpos($event_name, "'")); + $arguments = array(); + } + if ($event_line) + { // Validate @event name $find_event_line = 1; while (strpos($lines[$event_line - $find_event_line], '* @event ') === false) { $find_event_line++; + + if ($find_event_line > min(50, $event_line)) + { + throw new LogicException('Can not find @event tag for event "' . $event_name . '" in file "' . $file . '"'); + } } $event_name_tag = substr(trim($lines[$event_line - $find_event_line]), strlen('* @event ')); if ($event_name_tag !== $event_name) @@ -228,6 +186,11 @@ function check_for_events($file) while (strpos($lines[$event_line - $find_since_line], '* @since ') === false) { $find_since_line++; + + if ($find_since_line > min(50, $event_line)) + { + throw new LogicException('Can not find @since tag for event "' . $event_name . '" in file "' . $file . '"'); + } } $since = substr(trim($lines[$event_line - $find_since_line]), strlen('* @since ')); $since = ($since == '3.1-A1') ? '3.1.0-a1' : $since; @@ -237,13 +200,18 @@ function check_for_events($file) while (strpos(trim($lines[$event_line - $find_description_line]), '*') === 0) { $find_description_line++; + + if ($find_description_line > min(50, $event_line)) + { + throw new LogicException('Can not find description-line for event "' . $event_name . '" in file "' . $file . '"'); + } } $description = substr(trim($lines[$event_line - $find_description_line + 1]), strlen('* ')); $events[$event_name] = array( 'event' => $event_name, 'file' => $file, - 'arguments' => array(), + 'arguments' => $arguments, 'since' => $since, 'description' => $description, ); -- cgit v1.2.1 From 403da5d38d7feb1fd65e40c9907dd922f4401c90 Mon Sep 17 00:00:00 2001 From: Cesar G Date: Wed, 16 Oct 2013 23:50:23 -0700 Subject: [ticket/11280] Prevent duplicate entry in forums_track table. Enforcing a time limit prevents all rows from being selected, thus a new row is inserted resulting in a duplicate entry. PHPBB3-11280 --- phpBB/includes/functions.php | 1 - 1 file changed, 1 deletion(-) (limited to 'phpBB') diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php index ad5e3c05ce..c88e78c91f 100644 --- a/phpBB/includes/functions.php +++ b/phpBB/includes/functions.php @@ -1478,7 +1478,6 @@ function markread($mode, $forum_id = false, $topic_id = false, $post_time = 0, $ $sql = 'SELECT forum_id FROM ' . FORUMS_TRACK_TABLE . " WHERE user_id = {$user->data['user_id']} - AND mark_time < $post_time AND " . $db->sql_in_set('forum_id', $forum_id); $result = $db->sql_query($sql); -- cgit v1.2.1 From 42a4305f19d45dae8fda57d47809ab301f944f21 Mon Sep 17 00:00:00 2001 From: Cesar G Date: Tue, 15 Oct 2013 21:42:08 -0700 Subject: [ticket/11899] Give indication of activity after voting in poll. PHPBB3-11899 --- phpBB/styles/prosilver/template/viewtopic_body.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'phpBB') diff --git a/phpBB/styles/prosilver/template/viewtopic_body.html b/phpBB/styles/prosilver/template/viewtopic_body.html index e678ea8f8c..d2862c2ba3 100644 --- a/phpBB/styles/prosilver/template/viewtopic_body.html +++ b/phpBB/styles/prosilver/template/viewtopic_body.html @@ -60,7 +60,7 @@
-
+
-- cgit v1.2.1 From 6fce4b44a8daaad76e9f819c69699d78d1d763b4 Mon Sep 17 00:00:00 2001 From: Matt Friedman Date: Sat, 19 Oct 2013 08:47:12 -0700 Subject: [ticket/11935] Fix

tags not allowed inside tags PHPBB3-11935 --- phpBB/language/en/acp/extensions.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'phpBB') diff --git a/phpBB/language/en/acp/extensions.php b/phpBB/language/en/acp/extensions.php index 0adaff10c8..369397ead2 100644 --- a/phpBB/language/en/acp/extensions.php +++ b/phpBB/language/en/acp/extensions.php @@ -39,7 +39,7 @@ $lang = array_merge($lang, array( 'EXTENSIONS' => 'Extensions', 'EXTENSIONS_ADMIN' => 'Extensions Manager', 'EXTENSIONS_EXPLAIN' => 'The Extensions Manager is a tool in your phpBB Board which allows you to manage all of your extensions statuses and view information about them.', - 'EXTENSION_INVALID_LIST' => 'The "%s" extension is not valid.

%s

', + 'EXTENSION_INVALID_LIST' => 'The "%s" extension is not valid.
%s

', 'EXTENSION_NOT_AVAILABLE' => 'The selected extension is not available for this board, please verify your phpBB and PHP versions are allowed (see the details page).', 'DETAILS' => 'Details', -- cgit v1.2.1 From 2b7120508b81300134557bfc2cba39a4bc160055 Mon Sep 17 00:00:00 2001 From: Matt Friedman Date: Sat, 19 Oct 2013 08:48:41 -0700 Subject: [ticket/11935] Fix incorrect alt tags that should be title tags PHPBB3-11935 --- phpBB/adm/style/acp_ext_list.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'phpBB') diff --git a/phpBB/adm/style/acp_ext_list.html b/phpBB/adm/style/acp_ext_list.html index 53de0b4d12..4e13b1974a 100644 --- a/phpBB/adm/style/acp_ext_list.html +++ b/phpBB/adm/style/acp_ext_list.html @@ -28,7 +28,7 @@ {L_DETAILS} - {enabled.actions.L_ACTION} + {enabled.actions.L_ACTION}  |  @@ -48,7 +48,7 @@ - {disabled.actions.L_ACTION} + {disabled.actions.L_ACTION}  |  -- cgit v1.2.1 From 8816664d8abbcf319e9bdfd5e3c1618131a419cf Mon Sep 17 00:00:00 2001 From: Matt Friedman Date: Sat, 19 Oct 2013 08:49:18 -0700 Subject: [ticket/11935] Fix stray tags PHPBB3-11935 --- phpBB/adm/style/acp_ext_list.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'phpBB') diff --git a/phpBB/adm/style/acp_ext_list.html b/phpBB/adm/style/acp_ext_list.html index 4e13b1974a..bb50f922f7 100644 --- a/phpBB/adm/style/acp_ext_list.html +++ b/phpBB/adm/style/acp_ext_list.html @@ -24,7 +24,7 @@ - {enabled.META_DISPLAY_NAME} + {enabled.META_DISPLAY_NAME} {L_DETAILS} @@ -42,7 +42,7 @@ - {disabled.META_DISPLAY_NAME} + {disabled.META_DISPLAY_NAME} {L_DETAILS} -- cgit v1.2.1 From 5d49a8f06e7cb79c4ef3c5ad8ef5cac67e135b68 Mon Sep 17 00:00:00 2001 From: Matt Friedman Date: Sat, 19 Oct 2013 08:51:08 -0700 Subject: [ticket/11935] Fix invalid HTML usage of
@@ -58,6 +61,10 @@
{postrow.POST_SUBJECT} {postrow.ATTACH_ICON_IMG}
{L_POSTED} {L_POST_BY_AUTHOR} {postrow.POST_AUTHOR_FULL} » {postrow.POST_TIME} +
diff --git a/phpBB/styles/prosilver/template/ucp_attachments.html b/phpBB/styles/prosilver/template/ucp_attachments.html index feb04278dc..ed39e80c12 100644 --- a/phpBB/styles/prosilver/template/ucp_attachments.html +++ b/phpBB/styles/prosilver/template/ucp_attachments.html @@ -31,7 +31,7 @@ -
    +
    • diff --git a/phpBB/styles/prosilver/template/ucp_groups_manage.html b/phpBB/styles/prosilver/template/ucp_groups_manage.html index a785d18082..3053330f61 100644 --- a/phpBB/styles/prosilver/template/ucp_groups_manage.html +++ b/phpBB/styles/prosilver/template/ucp_groups_manage.html @@ -214,7 +214,7 @@
    -
      +
      • diff --git a/phpBB/styles/prosilver/template/ucp_main_bookmarks.html b/phpBB/styles/prosilver/template/ucp_main_bookmarks.html index 017fadad77..477b06249e 100644 --- a/phpBB/styles/prosilver/template/ucp_main_bookmarks.html +++ b/phpBB/styles/prosilver/template/ucp_main_bookmarks.html @@ -54,7 +54,15 @@
- {topicrow.ATTACH_ICON_IMG} {L_POST_BY_AUTHOR} {topicrow.TOPIC_AUTHOR_FULL} » {topicrow.FIRST_POST_TIME} +
+ {topicrow.ATTACH_ICON_IMG} + {L_POST_BY_AUTHOR} {topicrow.TOPIC_AUTHOR_FULL} » {topicrow.FIRST_POST_TIME} +
+
{L_LAST_POST} {L_POST_BY_AUTHOR} {topicrow.LAST_POST_AUTHOR_FULL} diff --git a/phpBB/styles/prosilver/template/ucp_main_drafts.html b/phpBB/styles/prosilver/template/ucp_main_drafts.html index 723186e20c..52ad5b503b 100644 --- a/phpBB/styles/prosilver/template/ucp_main_drafts.html +++ b/phpBB/styles/prosilver/template/ucp_main_drafts.html @@ -45,6 +45,10 @@ {L_FORUM}{L_COLON} {draftrow.TITLE} {L_NO_TOPIC_FORUM} +
{draftrow.DATE}
{L_LOAD_DRAFT}{L_VIEW_EDIT}
diff --git a/phpBB/styles/prosilver/template/ucp_main_front.html b/phpBB/styles/prosilver/template/ucp_main_front.html index 1e26e43772..fa3291cd6c 100644 --- a/phpBB/styles/prosilver/template/ucp_main_front.html +++ b/phpBB/styles/prosilver/template/ucp_main_front.html @@ -31,7 +31,14 @@ - {topicrow.ATTACH_ICON_IMG} {L_POST_BY_AUTHOR} {topicrow.TOPIC_AUTHOR_FULL} » {topicrow.FIRST_POST_TIME} +
+ {topicrow.ATTACH_ICON_IMG} + {L_POST_BY_AUTHOR} {topicrow.TOPIC_AUTHOR_FULL} » {topicrow.FIRST_POST_TIME} +
+
{L_LAST_POST} {L_POST_BY_AUTHOR} {topicrow.LAST_POST_AUTHOR_FULL} diff --git a/phpBB/styles/prosilver/template/ucp_main_subscribed.html b/phpBB/styles/prosilver/template/ucp_main_subscribed.html index 90fa76cefc..7344a4af1a 100755 --- a/phpBB/styles/prosilver/template/ucp_main_subscribed.html +++ b/phpBB/styles/prosilver/template/ucp_main_subscribed.html @@ -23,7 +23,17 @@
  • -
    {forumrow.FORUM_NAME}
    {forumrow.FORUM_DESC}
    +
    +
    + {forumrow.FORUM_NAME}
    + {forumrow.FORUM_DESC} + + + +
    +
    {L_LAST_POST} {L_POST_BY_AUTHOR} {forumrow.LAST_POST_AUTHOR_FULL} {LAST_POST_IMG}
    {forumrow.LAST_POST_TIME}
    {L_NO_POSTS}
      @@ -79,7 +89,14 @@ - {topicrow.ATTACH_ICON_IMG} {L_POST_BY_AUTHOR} {topicrow.TOPIC_AUTHOR_FULL} » {topicrow.FIRST_POST_TIME} +
    + {topicrow.ATTACH_ICON_IMG} + {L_POST_BY_AUTHOR} {topicrow.TOPIC_AUTHOR_FULL} » {topicrow.FIRST_POST_TIME} +
    +
    {L_LAST_POST} {L_POST_BY_AUTHOR} {topicrow.LAST_POST_AUTHOR_FULL} diff --git a/phpBB/styles/prosilver/template/ucp_pm_viewfolder.html b/phpBB/styles/prosilver/template/ucp_pm_viewfolder.html index 9cbff64a6a..a1012689f0 100644 --- a/phpBB/styles/prosilver/template/ucp_pm_viewfolder.html +++ b/phpBB/styles/prosilver/template/ucp_pm_viewfolder.html @@ -53,7 +53,7 @@
  • -
      +
      • diff --git a/phpBB/styles/prosilver/template/viewforum_body.html b/phpBB/styles/prosilver/template/viewforum_body.html index 04dc00aae2..360d9ae789 100644 --- a/phpBB/styles/prosilver/template/viewforum_body.html +++ b/phpBB/styles/prosilver/template/viewforum_body.html @@ -163,8 +163,19 @@
      - {topicrow.ATTACH_ICON_IMG} {L_POST_BY_AUTHOR} {topicrow.TOPIC_AUTHOR_FULL} » {topicrow.FIRST_POST_TIME} - » {L_IN} {topicrow.FORUM_NAME} +
      + {topicrow.ATTACH_ICON_IMG} + {L_POST_BY_AUTHOR} {topicrow.TOPIC_AUTHOR_FULL} » {topicrow.FIRST_POST_TIME} + » {L_IN} {topicrow.FORUM_NAME} +
      + + + + diff --git a/phpBB/styles/prosilver/theme/responsive.css b/phpBB/styles/prosilver/theme/responsive.css index 83233bf6aa..322f11e291 100644 --- a/phpBB/styles/prosilver/theme/responsive.css +++ b/phpBB/styles/prosilver/theme/responsive.css @@ -133,35 +133,12 @@ ul.topiclist.forums dt, ul.topiclist.topics dt { } ul.topiclist.forums dt .list-inner, ul.topiclist.topics dt .list-inner { margin-right: 250px; - padding-bottom: 18px; } ul.topiclist.forums dd.lastpost, ul.topiclist.topics dd.lastpost { display: block; } -ul.topiclist.forums dd.topics, ul.topiclist.topics dd.posts { - display: block; - position: absolute; - left: 45px; - right: 0; - bottom: 0; - white-space: nowrap; - overflow: hidden; - text-overflow: ellipsis; - min-height: 0; - height: auto; - border-width: 0; - margin: 0; - padding: 5px 0; - width: auto; - min-width: 0; - text-align: left; - font-weight: bold; - font-size: 1.2em; - line-height: 1em; -} - ul.topiclist dd.mark { display: block; position: absolute; @@ -196,6 +173,11 @@ ul.topiclist.forums dd.topics dfn, ul.topiclist.topics dd.posts dfn { } } +li.row .responsive-show strong { + font-weight: bold; + color: inherit; +} + /* Notifications list ----------------------------------------*/ @media only screen and (max-width: 350px), only screen and (max-device-width: 350px) -- cgit v1.2.1 From 431b4acb36a2087b58795f0951a786008dc3b943 Mon Sep 17 00:00:00 2001 From: Vjacheslav Trushkin Date: Tue, 22 Oct 2013 00:41:05 +0300 Subject: [ticket/11956] Move JS to reusable function Move JS to reusable function that can be ran for all content added with JavaScript such as results of AJAX forms PHPBB3-11956 --- phpBB/styles/prosilver/template/forum_fn.js | 797 +++++++++++++++------------- 1 file changed, 424 insertions(+), 373 deletions(-) (limited to 'phpBB') diff --git a/phpBB/styles/prosilver/template/forum_fn.js b/phpBB/styles/prosilver/template/forum_fn.js index a425e9e1ad..cb8ee2f9df 100644 --- a/phpBB/styles/prosilver/template/forum_fn.js +++ b/phpBB/styles/prosilver/template/forum_fn.js @@ -410,138 +410,203 @@ function insert_single_user(formId, user) } /** -* Run onload functions +* Parse document block */ -(function($) { - $(document).ready(function() { - // Swap .nojs and .hasjs - $('#phpbb.nojs').toggleClass('nojs hasjs'); - - // Focus forms - $('form[data-focus]:first').each(function() { - $('#' + this.getAttribute('data-focus')).focus(); - }); +function parse_document(container) +{ + var test = document.createElement('div'), + oldBrowser = (typeof test.style.borderRadius == 'undefined'); - // Reset avatar dimensions when changing URL or EMAIL - $('input[data-reset-on-edit]').bind('keyup', function() { - $(this.getAttribute('data-reset-on-edit')).val(''); - }); + delete test; - // Pagination - $('a.pagination-trigger').click(function() { - jumpto($(this)); - }); + /** + * Reset avatar dimensions when changing URL or EMAIL + */ + container.find('input[data-reset-on-edit]').bind('keyup', function() { + $(this.getAttribute('data-reset-on-edit')).val(''); + }); - // Adjust HTML code for IE8 and older versions - var test = document.createElement('div'), - oldBrowser = (typeof test.style.borderRadius == 'undefined'); - delete test; + /** + * Pagination + */ + container.find('a.pagination-trigger').click(function() { + jumpto($(this)); + }); - if (oldBrowser) { - // Fix .linklist.bulletin lists - $('ul.linklist.bulletin li:first-child, ul.linklist.bulletin li.rightside:last-child').addClass('no-bulletin'); + /** + * Adjust HTML code for IE8 and older versions + */ + if (oldBrowser) { + // Fix .linklist.bulletin lists + container.find('ul.linklist.bulletin li:first-child, ul.linklist.bulletin li.rightside:last-child').addClass('no-bulletin'); - // Do not run functions below for old browsers - return; - } + // Do not run functions below for old browsers + return; + } - // Adjust topiclist lists with check boxes - $('ul.topiclist dd.mark').siblings('dt').children('.list-inner').addClass('with-mark'); + /** + * Resize navigation block to keep all links on same line + */ + container.find('.navlinks').each(function() { + var $this = $(this), + left = $this.children().not('.rightside'), + right = $this.children('.rightside'); - // Resize navigation block to keep all links on same line - $('.navlinks').each(function() { - var $this = $(this), - left = $this.children().not('.rightside'), - right = $this.children('.rightside'); + if (left.length !== 1 || !right.length) return; - if (left.length !== 1 || !right.length) return; + function resize() { + var width = 0, + diff = left.outerWidth(true) - left.width(); - function resize() { - var width = 0, - diff = left.outerWidth(true) - left.width(); + right.each(function() { + width += $(this).outerWidth(true); + }); + left.css('max-width', Math.floor($this.width() - width - diff) + 'px'); + } - right.each(function() { - width += $(this).outerWidth(true); - }); - left.css('max-width', Math.floor($this.width() - width - diff) + 'px'); - } + resize(); + $(window).resize(resize); + }); - resize(); - $(window).resize(resize); + /** + * Makes breadcrumbs responsive + */ + container.find('.breadcrumbs:not(.skip-responsive, .linklist.leftside .breadcrumbs)').each(function() { + var $this = $(this), + $body = $('body'), + links = $this.find('.crumb'), + length = links.length, + classes = ['wrapped-wide', 'wrapped-medium', 'wrapped-small'], + classesLength = classes.length, + maxHeight = 0, + lastWidth = false, + wrapped = false; + + // Test height by setting nowrap + $this.css('white-space', 'nowrap'); + maxHeight = $this.height() + 1; + $this.css('white-space', ''); + + // Set tooltips + $this.find('a').each(function() { + var $link = $(this); + $link.attr('title', $link.text()); }); - // Responsive breadcrumbs - $('.breadcrumbs:not(.skip-responsive, .linklist.leftside .breadcrumbs)').each(function() { - var $this = $(this), - $body = $('body'), - links = $this.find('.crumb'), - length = links.length, - classes = ['wrapped-wide', 'wrapped-medium', 'wrapped-small'], - classesLength = classes.length, - maxHeight = 0, - lastWidth = false, - wrapped = false; - - // Test height by setting nowrap - $this.css('white-space', 'nowrap'); - maxHeight = $this.height() + 1; - $this.css('white-space', ''); - - // Set tooltips - $this.find('a').each(function() { - var $link = $(this); - $link.attr('title', $link.text()); - }); + // Funciton that checks breadcrumbs + function check() { + var height = $this.height(), + width = $body.width(), + link, i, j; - // Funciton that checks breadcrumbs - function check() { - var height = $this.height(), - width = $body.width(), - link, i, j; + if (height <= maxHeight) { + if (!wrapped || lastWidth === false || lastWidth >= width) { + lastWidth = width; + return; + } + } + lastWidth = width; - if (height <= maxHeight) { - if (!wrapped || lastWidth === false || lastWidth >= width) { - lastWidth = width; - return; - } + if (wrapped) { + $this.removeClass('wrapped').find('.crumb.wrapped').removeClass('wrapped ' + classes.join(' ')); + wrapped = false; + if ($this.height() <= maxHeight) { + return; } - lastWidth = width; + } - if (wrapped) { - $this.removeClass('wrapped').find('.crumb.wrapped').removeClass('wrapped ' + classes.join(' ')); - wrapped = false; + wrapped = true; + $this.addClass('wrapped'); + if ($this.height() <= maxHeight) { + return; + } + + for (i = 0; i < classesLength; i ++) { + for (j = length - 1; j >= 0; j --) { + links.eq(j).addClass('wrapped ' + classes[i]); if ($this.height() <= maxHeight) { return; } } + } + } - wrapped = true; - $this.addClass('wrapped'); - if ($this.height() <= maxHeight) { - return; - } + // Run function and set event + check(); + $(window).resize(check); + }); - for (i = 0; i < classesLength; i ++) { - for (j = length - 1; j >= 0; j --) { - links.eq(j).addClass('wrapped ' + classes[i]); - if ($this.height() <= maxHeight) { - return; - } - } - } + /** + * Adjust topiclist lists with check boxes + */ + container.find('ul.topiclist dd.mark').siblings('dt').children('.list-inner').addClass('with-mark'); + + /** + * Appends contents of all extra columns to first column in + * .topiclist lists for mobile devices. Copies contents as is. + * + * To add that functionality to .topiclist list simply add + * responsive-show-all to list of classes + */ + container.find('.topiclist.responsive-show-all > li > dl').each(function() { + var $this = $(this), + block = $this.find('dt .responsive-show:last-child'), + first = true; + + // Create block that is visible only on mobile devices + if (!block.length) { + $this.find('dt > .list-inner').append('
      -
      -
      - -
      -
      diff --git a/phpBB/adm/style/overall_header.html b/phpBB/adm/style/overall_header.html index b411671d59..d091e6ad07 100644 --- a/phpBB/adm/style/overall_header.html +++ b/phpBB/adm/style/overall_header.html @@ -178,8 +178,6 @@ function switch_menu()
      -
      -
      diff --git a/phpBB/adm/style/permission_mask.html b/phpBB/adm/style/permission_mask.html index 4d52b901c3..ac65754a14 100644 --- a/phpBB/adm/style/permission_mask.html +++ b/phpBB/adm/style/permission_mask.html @@ -75,7 +75,6 @@
      style="display: none;"> -
      @@ -128,7 +127,6 @@ -
      -- cgit v1.2.1 From 64e26e8c71c4f5d59e421c293f1bd6a17d13e341 Mon Sep 17 00:00:00 2001 From: Vjacheslav Trushkin Date: Thu, 24 Oct 2013 22:53:57 +0300 Subject: [ticket/11957] Remove menu toggle PHPBB3-11957 --- phpBB/adm/images/toggle.gif | Bin 788 -> 0 bytes phpBB/adm/style/admin.css | 30 ------------------- phpBB/adm/style/overall_header.html | 57 ------------------------------------ 3 files changed, 87 deletions(-) delete mode 100644 phpBB/adm/images/toggle.gif (limited to 'phpBB') diff --git a/phpBB/adm/images/toggle.gif b/phpBB/adm/images/toggle.gif deleted file mode 100644 index 8af6861bd1..0000000000 Binary files a/phpBB/adm/images/toggle.gif and /dev/null differ diff --git a/phpBB/adm/style/admin.css b/phpBB/adm/style/admin.css index bbd2844689..87f430c077 100644 --- a/phpBB/adm/style/admin.css +++ b/phpBB/adm/style/admin.css @@ -326,36 +326,6 @@ li { /* Sub-navigation Menu ---------------------------------------- */ -/* Toggle */ -#toggle { - padding: 5px; - width: 5%; - height: 100px; - position: absolute; - left: 15%; - top: 28px; - margin-left: 2px; -} - -.rtl #toggle { - left: 75%; - margin-right: 0; - margin-left: 6px; -} - -#toggle-handle { - display: block; - width: 18px; - height: 19px; - float: right; - background-image: url(../images/toggle.gif); -} - -.rtl #toggle-handle { - background-image: url(../images/toggle.gif); - background-position: 100% 50%; -} - /* Menu */ #menu { float: left; diff --git a/phpBB/adm/style/overall_header.html b/phpBB/adm/style/overall_header.html index d091e6ad07..0636f9bb26 100644 --- a/phpBB/adm/style/overall_header.html +++ b/phpBB/adm/style/overall_header.html @@ -15,9 +15,6 @@ var on_page = '{ON_PAGE}'; var per_page = '{PER_PAGE}'; var base_url = '{BASE_URL|e('js')}'; -var menu_state = 'shown'; - - /** * Jump to page */ @@ -104,56 +101,6 @@ function popup(url, width, height, name) 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.width = '20px'; - handle.style.backgroundImage = 'url(images/toggle.gif)'; - handle.style.backgroundRepeat = 'no-repeat'; - - - handle.style.backgroundPosition = '0% 50%'; - toggle.style.left = '96%'; - - handle.style.backgroundPosition = '100% 50%'; - toggle.style.left = '0'; - - break; - - // show - case 'hidden': - main.style.width = '76%'; - menu_state = 'shown'; - menu.style.display = 'block'; - toggle.style.width = '5%'; - handle.style.backgroundImage = 'url(images/toggle.gif)'; - handle.style.backgroundRepeat = 'no-repeat'; - - - handle.style.backgroundPosition = '100% 50%'; - toggle.style.left = '75%'; - - handle.style.backgroundPosition = '0% 50%'; - toggle.style.left = '15%'; - - break; - } -} - // ]]> @@ -179,10 +126,6 @@ function switch_menu()
      - -
      -
      - -- cgit v1.2.1 From 8567adf5dbfc1d6363deb78b6ebf25a76857c9ac Mon Sep 17 00:00:00 2001 From: Vjacheslav Trushkin Date: Fri, 25 Oct 2013 18:32:31 +0300 Subject: [ticket/11957] Include admin.js in footer Include admin.js in footer, swap .hasjs and .nojs PHPBB3-11957 --- phpBB/adm/style/admin.js | 18 ++++++++++++++++++ phpBB/adm/style/install_footer.html | 2 ++ phpBB/adm/style/install_header.html | 2 +- phpBB/adm/style/overall_footer.html | 1 + phpBB/adm/style/overall_header.html | 2 +- 5 files changed, 23 insertions(+), 2 deletions(-) create mode 100644 phpBB/adm/style/admin.js (limited to 'phpBB') diff --git a/phpBB/adm/style/admin.js b/phpBB/adm/style/admin.js new file mode 100644 index 0000000000..9b2c9313ac --- /dev/null +++ b/phpBB/adm/style/admin.js @@ -0,0 +1,18 @@ +/** +* phpBB3 ACP functions +*/ + +/** +* Run onload functions +*/ +(function($) { + $(document).ready(function() { + // Swap .nojs and .hasjs + $('body.nojs').toggleClass('nojs hasjs'); + + // Focus forms + $('form[data-focus]:first').each(function() { + $('#' + this.getAttribute('data-focus')).focus(); + }); + }); +})(jQuery); diff --git a/phpBB/adm/style/install_footer.html b/phpBB/adm/style/install_footer.html index cbb28407c1..7a5fc666f8 100644 --- a/phpBB/adm/style/install_footer.html +++ b/phpBB/adm/style/install_footer.html @@ -11,6 +11,8 @@ + +{$SCRIPTS} diff --git a/phpBB/adm/style/install_header.html b/phpBB/adm/style/install_header.html index 13f4a6dbf4..182abe8875 100644 --- a/phpBB/adm/style/install_header.html +++ b/phpBB/adm/style/install_header.html @@ -35,7 +35,7 @@ function dE(n, s, type) - +
      +
      diff --git a/phpBB/adm/style/admin.css b/phpBB/adm/style/admin.css index 79b88cf52f..2cd8d0005c 100644 --- a/phpBB/adm/style/admin.css +++ b/phpBB/adm/style/admin.css @@ -754,6 +754,104 @@ td.name { color: #BC2A4D; } +@media only screen and (max-width: 700px), only screen and (max-device-width: 700px) +{ + table.responsive, table.responsive tbody, table.responsive tr, table.responsive td { + display: block; + } + + table.responsive thead, table.responsive th, table.responsive colgroup { + display: none; + } + + table.responsive.show-header thead, table.responsive.show-header th:first-child, table.responsive caption { + display: block; + width: auto !important; + text-align: left !important; + margin: 0; + } + + table.responsive { + background: transparent none; + border-width: 0; + } + + table.responsive caption { + 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; + font-weight: bold; + text-transform: uppercase; + } + + table.responsive.show-header th:first-child span.rank-img, table.responsive.no-caption caption, table.responsive.no-header thead { + display: none; + } + + table.responsive tr { + margin: 2px 0; + border: 1px solid #CCCFD3; + background-color: #FFFFFF; + padding: 1px 1px 0; + overflow: hidden; + } + + table.responsive tr.row1 td { background-color: #F9F9F9; } + table.responsive tr.row2 td { background-color: #DCEBFE; } + table.responsive tr.row3 td { background-color: #DBDFE2; } + table.responsive tr.row4 td { background-color: #E4E8EB; } + table.responsive tr.col1 td { background-color: #DCEBFE; } + table.responsive tr.col2 td { background-color: #F9F9F9; } + table.responsive tr.row1a td { background-color: #F9F9F9; } + table.responsive tr.row1b td { background-color: #F6F6F6; } + table.responsive tr.row2a td { background-color: #E7EEF4; } + table.responsive tr.row2b td { background-color: #E3EBF2; } + + table.responsive td { + width: auto !important; + text-align: left !important; + padding: 4px; + margin-bottom: 1px; + } + + table.responsive td.empty { + display: none !important; + } + + table.responsive td > dfn { + display: inline-block !important; + } + + table.responsive td > dfn:after { + content: ':'; + padding-right: 5px; + } + + table.responsive.two-columns td { + width: 50% !important; + float: left; + -moz-box-sizing: border-box; + box-sizing: border-box; + } + + table.responsive.two-columns td:nth-child(2n+1) { + clear: left; + } + + table.responsive span.rank-img { + float: none; + padding-right: 5px; + } + + table.responsive#memberlist td:first-child input[type="checkbox"] { + float: right; + } +} + /* General form styles ----------------------------------------*/ fieldset { diff --git a/phpBB/adm/style/admin.js b/phpBB/adm/style/admin.js index a9e00ab9d7..385e49dc87 100644 --- a/phpBB/adm/style/admin.js +++ b/phpBB/adm/style/admin.js @@ -36,6 +36,103 @@ function parse_document(container) blocks.filter(':first').addClass('active'); } }); + + /** + * Responsive tables + */ + container.find('table').not('.not-responsive').each(function() { + var $this = $(this), + th = $this.find('thead > tr > th'), + columns = th.length, + headers = [], + totalHeaders = 0, + i, headersLength; + + // Find columns + $this.find('colgroup:first').children().each(function(i) { + var column = $(this); + if (column.hasClass('col1')) { + $this.find('td:nth-child(' + (i + 1) + ')').addClass('col1'); + } + if (column.hasClass('col2')) { + $this.find('td:nth-child(' + (i + 1) + ')').addClass('col2'); + } + }); + + // Find each header + if (!$this.data('no-responsive-header')) + { + th.each(function(column) { + var cell = $(this), + colspan = parseInt(cell.attr('colspan')), + dfn = cell.attr('data-dfn'), + text = dfn ? dfn : cell.text(); + + colspan = isNaN(colspan) || colspan < 1 ? 1 : colspan; + + for (i=0; i + $this.addClass('responsive'); + + if (totalHeaders < 2) { + $this.addClass('show-header'); + return; + } + + $this.find('tbody > tr').each(function() { + var row = $(this), + cells = row.children('td'), + column = 0; + + if (cells.length == 1) { + row.addClass('big-column'); + return; + } + + cells.each(function() { + var cell = $(this), + colspan = parseInt(cell.attr('colspan')), + text = cell.text().trim(); + + if (headersLength <= column) { + return; + } + + if (text.length && text !== '-') { + cell.prepend('' + headers[column] + ''); + } + else { + cell.addClass('empty'); + } + + colspan = isNaN(colspan) || colspan < 1 ? 1 : colspan; + column += colspan; + }); + }); + }); + + /** + * Hide empty responsive tables + */ + container.find('table.responsive > tbody').each(function() { + var items = $(this).children('tr'); + if (items.length == 0) + { + $(this).parent('table:first').addClass('responsive-hide'); + } + }); } /** -- cgit v1.2.1 From 9a8b463c334c27ca958ab4de8e660fd591bf4e95 Mon Sep 17 00:00:00 2001 From: Vjacheslav Trushkin Date: Sat, 26 Oct 2013 00:58:36 +0300 Subject: [ticket/11957] Remove IE6 hacks PHPBB3-11957 --- phpBB/adm/style/admin.css | 23 ----------------------- 1 file changed, 23 deletions(-) (limited to 'phpBB') diff --git a/phpBB/adm/style/admin.css b/phpBB/adm/style/admin.css index 2cd8d0005c..68c5645d9c 100644 --- a/phpBB/adm/style/admin.css +++ b/phpBB/adm/style/admin.css @@ -221,10 +221,6 @@ li { margin: 0 210px 0 0; } -* html #main { - height: 350px; -} - #page-body.simple-page-body { padding: 0; padding-right: 10px; @@ -873,10 +869,6 @@ fieldset { border-left: 1px solid #CCCCCC; } -* html fieldset { - padding: 0 10px 5px 10px; -} - fieldset p { font-size: 0.85em; } @@ -895,18 +887,6 @@ legend { vertical-align: middle; } -* 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; @@ -1245,7 +1225,6 @@ textarea.full { width: 99%; } -* html input.full, * html textarea.full { width: 95%;} input.medium { width: 50%;} input.narrow { width: 25%;} input.tiny { width: 10%;} @@ -1472,8 +1451,6 @@ li.pagination ul { 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; -- cgit v1.2.1 From c23c64cb6d848382542fc5d50899f9a921ffe805 Mon Sep 17 00:00:00 2001 From: Vjacheslav Trushkin Date: Sat, 26 Oct 2013 01:07:04 +0300 Subject: [ticket/11957] Responsive jQuery popups PHPBB3-11957 --- phpBB/adm/style/admin.css | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) (limited to 'phpBB') diff --git a/phpBB/adm/style/admin.css b/phpBB/adm/style/admin.css index 68c5645d9c..f644adb0d4 100644 --- a/phpBB/adm/style/admin.css +++ b/phpBB/adm/style/admin.css @@ -1288,8 +1288,10 @@ input.button1:focus, input.button2:focus, input.button3:focus { position: fixed; display: none; top: 150px; - left: 25%; - width: 50%; + left: 0; + right: 0; + max-width: 600px; + margin: 0 auto; z-index: 50; padding: 25px; padding: 0 25px 20px 25px; @@ -1345,6 +1347,21 @@ input.button1:focus, input.button2:focus, input.button3:focus { opacity: 0.5; } +@media only screen and (max-height: 500px), only screen and (max-device-width: 500px) +{ + .phpbb_alert { + top: 25px; + } +} + +@media only screen and (max-width: 700px), only screen and (max-device-width: 700px) +{ + .phpbb_alert { + max-width: none; + margin: 0 25px; + } +} + /* Pagination ---------------------------------------- */ .pagination { -- cgit v1.2.1 From 365d07ff6c481e604cd83425abe128eff3af70f0 Mon Sep 17 00:00:00 2001 From: Vjacheslav Trushkin Date: Sat, 26 Oct 2013 09:51:07 +0300 Subject: [ticket/11957] Responsive forms PHPBB3-11957 --- phpBB/adm/style/admin.css | 60 +++++++++++++++++++++++++++++++++++++++++++++++ phpBB/adm/style/admin.js | 11 +++++++++ 2 files changed, 71 insertions(+) (limited to 'phpBB') diff --git a/phpBB/adm/style/admin.css b/phpBB/adm/style/admin.css index f644adb0d4..a98bcffe3b 100644 --- a/phpBB/adm/style/admin.css +++ b/phpBB/adm/style/admin.css @@ -1053,6 +1053,13 @@ select#full_folder_action { width: 95%; } +@media only screen and (max-width: 700px), only screen and (max-device-width: 700px) +{ + fieldset { + padding: 5px; + } +} + /* Definition list layout for forms Other general def. list properties defined in prosilver_main.css ---------------------------------------- */ @@ -1184,6 +1191,51 @@ input:focus, textarea:focus { outline-style: none; } +@media only screen and (max-width: 700px), only screen and (max-device-width: 700px) +{ + fieldset dl { + margin-bottom: 5px; + padding-bottom: 5px; + border-bottom: 1px solid #e8e8e8; + } + + fieldset > dl:last-child, fieldset > form:last-child > dl:last-child { + border-bottom-width: 0; + margin-bottom: 0; + } + + fieldset dt, .rtl fieldset dt, fieldset dd, .rtl fieldset dd { + border-width: 0; + margin-left: 0; + margin-right: 0; + float: none; + width: auto; + } + + .ltr fieldset dd { + padding-left: 20px; + } + + .rtl fieldset dd { + padding-right: 20px; + } + + dd select, dd input { + max-width: 300px; + } + + dd input[type="number"] { + max-width: 70px; + } +} + +@media only screen and (max-width: 400px), only screen and (max-device-width: 400px) +{ + dd select, dd input { + max-width: 240px; + } +} + /* Submit button fieldset or paragraph ---------------------------------------- */ fieldset.submit-buttons { @@ -1926,3 +1978,11 @@ fieldset.permissions .padding { color: #FFFFFF; font-size: 1.4em; } + +@media only screen and (max-width: 700px), only screen and (max-device-width: 700px) +{ + .responsive-hide { display: none !important; } + .responsive-show { display: block !important; } + .responsive-show-inline { display: inline !important; } + .responsive-show-inline-block { display: inline-block !important; } +} diff --git a/phpBB/adm/style/admin.js b/phpBB/adm/style/admin.js index 385e49dc87..342859ce54 100644 --- a/phpBB/adm/style/admin.js +++ b/phpBB/adm/style/admin.js @@ -133,6 +133,17 @@ function parse_document(container) $(this).parent('table:first').addClass('responsive-hide'); } }); + + /** + * Fieldsets with empty + */ + container.find('fieldset dt > span:last-child').each(function() { + var $this = $(this); + if ($this.html() == ' ') { + $this.addClass('responsive-hide'); + } + + }); } /** -- cgit v1.2.1 From 10f0c8b3337001743fc310539da43363873dcf0a Mon Sep 17 00:00:00 2001 From: Vjacheslav Trushkin Date: Sat, 26 Oct 2013 10:12:12 +0300 Subject: [ticket/11957] Change avatars gallery from table to list PHPBB3-11957 --- phpBB/adm/style/acp_avatar_options_local.html | 20 ++++++++---------- phpBB/adm/style/admin.css | 29 +++++++++++++++++++++++++++ 2 files changed, 37 insertions(+), 12 deletions(-) (limited to 'phpBB') diff --git a/phpBB/adm/style/acp_avatar_options_local.html b/phpBB/adm/style/acp_avatar_options_local.html index 148efd051b..0cdb3644d7 100644 --- a/phpBB/adm/style/acp_avatar_options_local.html +++ b/phpBB/adm/style/acp_avatar_options_local.html @@ -8,18 +8,14 @@   -
      {L_FORUM_STATS}
      + - - - - - - - - - + +
    • + +
    • + -
      {avatar_local_row.avatar_local_col.AVATAR_NAME}
      +
    diff --git a/phpBB/adm/style/admin.css b/phpBB/adm/style/admin.css index a98bcffe3b..b3f086b6d2 100644 --- a/phpBB/adm/style/admin.css +++ b/phpBB/adm/style/admin.css @@ -1956,6 +1956,35 @@ fieldset.permissions .padding { padding: 0; } +/* Avatars gallery +---------------------------------------- */ +#gallery { + display: block; + margin: 0 -5px; + padding: 0; + overflow: hidden; +} + +#gallery li { + display: block; + float: left; + border: 1px solid #ccc; + border-radius: 2px; + background: #fff; + padding: 5px; + margin: 5px; +} + +#gallery li:hover { + background-color: #eee; +} + +#gallery li label { + display: block; + text-align: center; + padding: 0; +} + /* Classes for additional tasks ---------------------------------------- */ -- cgit v1.2.1 From b107b4c0e2ff5f946e71eb962622295ded7f54ea Mon Sep 17 00:00:00 2001 From: Vjacheslav Trushkin Date: Sat, 26 Oct 2013 11:01:23 +0300 Subject: [ticket/11957] Responsive forums list PHPBB3-11957 --- phpBB/adm/style/acp_forums.html | 8 ++++---- phpBB/adm/style/admin.css | 43 +++++++++++++++++++++++++++++++++++++++++ phpBB/adm/style/admin.js | 7 +------ 3 files changed, 48 insertions(+), 10 deletions(-) (limited to 'phpBB') diff --git a/phpBB/adm/style/acp_forums.html b/phpBB/adm/style/acp_forums.html index 7b1466cfbd..3fd2f18d67 100644 --- a/phpBB/adm/style/acp_forums.html +++ b/phpBB/adm/style/acp_forums.html @@ -440,19 +440,19 @@

    {NAVIGATION} [{L_EDIT} | {L_DELETE} | {L_RESYNC}]

    - +
    - - + -
    {forums.FOLDER_IMAGE} + {forums.FOLDER_IMAGE}
    {forums.FORUM_IMAGE}
    {forums.FORUM_NAME}{forums.FORUM_NAME}
    {forums.FORUM_DESCRIPTION}

    {L_TOPICS}{L_COLON} {forums.FORUM_TOPICS} / {L_POSTS}{L_COLON} {forums.FORUM_POSTS}
    + {ICON_MOVE_UP_DISABLED} {ICON_MOVE_DOWN} diff --git a/phpBB/adm/style/admin.css b/phpBB/adm/style/admin.css index b3f086b6d2..48b1712871 100644 --- a/phpBB/adm/style/admin.css +++ b/phpBB/adm/style/admin.css @@ -750,6 +750,19 @@ td.name { color: #BC2A4D; } +/* Forums list */ +table.forums td.folder { + width: 27px; + text-align: center; +} + +table.forums td.actions { + vertical-align: middle; + width: 100px; + text-align: right; + white-space: nowrap; +} + @media only screen and (max-width: 700px), only screen and (max-device-width: 700px) { table.responsive, table.responsive tbody, table.responsive tr, table.responsive td { @@ -846,6 +859,36 @@ td.name { table.responsive#memberlist td:first-child input[type="checkbox"] { float: right; } + + /* Forums list */ + table.responsive.forums td.folder { + float: left; + width: 27px; + background: transparent; + } + .rtl table.responsive.forums td.folder { + float: right; + } + + table.responsive.forums td.forum-desc { + margin-left: 35px; + min-height: 27px; + background: transparent; + } + + .rtl table.responsive.forums td.forum-desc { + margin-left: 0; + margin-right: 35px; + } + + table.responsive.forums td.actions { + clear: both; + text-align: right !important; + } + + .rtl table.responsive.forums td.actions { + text-align: left !important; + } } /* General form styles diff --git a/phpBB/adm/style/admin.js b/phpBB/adm/style/admin.js index 342859ce54..648d542325 100644 --- a/phpBB/adm/style/admin.js +++ b/phpBB/adm/style/admin.js @@ -51,12 +51,7 @@ function parse_document(container) // Find columns $this.find('colgroup:first').children().each(function(i) { var column = $(this); - if (column.hasClass('col1')) { - $this.find('td:nth-child(' + (i + 1) + ')').addClass('col1'); - } - if (column.hasClass('col2')) { - $this.find('td:nth-child(' + (i + 1) + ')').addClass('col2'); - } + $this.find('td:nth-child(' + (i + 1) + ')').addClass(column.prop('className')); }); // Find each header -- cgit v1.2.1 From 7b3f63e8a37375b3ab087f775fdfbc54cd902380 Mon Sep 17 00:00:00 2001 From: Vjacheslav Trushkin Date: Sat, 26 Oct 2013 11:02:16 +0300 Subject: [ticket/11957] More responsive forms adjustments PHPBB3-11957 --- phpBB/adm/style/admin.css | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'phpBB') diff --git a/phpBB/adm/style/admin.css b/phpBB/adm/style/admin.css index 48b1712871..1d3c78c1da 100644 --- a/phpBB/adm/style/admin.css +++ b/phpBB/adm/style/admin.css @@ -934,7 +934,6 @@ input, textarea { font-family: Verdana, Helvetica, Arial, sans-serif; font-size: 0.90em; font-weight: normal; - cursor: text; vertical-align: middle; padding: 2px; color: #111111; @@ -1101,6 +1100,10 @@ select#full_folder_action { fieldset { padding: 5px; } + + fieldset.quick, p.quick { + text-align: center; + } } /* Definition list layout for forms @@ -1305,6 +1308,13 @@ fieldset.submit-buttons legend { display: none; } +@media only screen and (max-width: 700px), only screen and (max-device-width: 700px) +{ + p.submit-buttons { + margin-top: 0; + } +} + /* Input field styles ---------------------------------------- */ -- cgit v1.2.1 From 49e30b12432966711e31a884feb8460dd3555d92 Mon Sep 17 00:00:00 2001 From: Vjacheslav Trushkin Date: Sat, 26 Oct 2013 11:56:03 +0300 Subject: [ticket/11957] Responsive styles list PHPBB3-11957 --- phpBB/adm/style/acp_styles.html | 12 ++++++------ phpBB/adm/style/admin.css | 15 +++++++++++++++ phpBB/adm/style/admin.js | 10 ++++++++++ 3 files changed, 31 insertions(+), 6 deletions(-) (limited to 'phpBB') diff --git a/phpBB/adm/style/acp_styles.html b/phpBB/adm/style/acp_styles.html index 3dc4c2d616..55904253a9 100644 --- a/phpBB/adm/style/acp_styles.html +++ b/phpBB/adm/style/acp_styles.html @@ -79,7 +79,7 @@ - +
    @@ -97,9 +97,9 @@ - - + - {styles_list.EXTRA} -
    {L_STYLE_NAME} + - {styles_list.USERS}{styles_list.USERS} + | @@ -129,7 +129,7 @@ + diff --git a/phpBB/adm/style/admin.css b/phpBB/adm/style/admin.css index 1d3c78c1da..e225a6752c 100644 --- a/phpBB/adm/style/admin.css +++ b/phpBB/adm/style/admin.css @@ -763,6 +763,11 @@ table.forums td.actions { white-space: nowrap; } +/* Styles list */ +table.styles td.users, table.styles td.actions, table.styles td.mark { + text-align: center; +} + @media only screen and (max-width: 700px), only screen and (max-device-width: 700px) { table.responsive, table.responsive tbody, table.responsive tr, table.responsive td { @@ -889,6 +894,16 @@ table.forums td.actions { .rtl table.responsive.forums td.actions { text-align: left !important; } + + /* Styles list */ + table.responsive.styles tr.responsive-style-row td:first-child { + padding-left: 4px !important; + padding-right: 4px !important; + } + + table.responsive.styles td:first-child > dfn, table.responsive.styles td.actions > dfn { + display: none !important; + } } /* General form styles diff --git a/phpBB/adm/style/admin.js b/phpBB/adm/style/admin.js index 648d542325..b466c02071 100644 --- a/phpBB/adm/style/admin.js +++ b/phpBB/adm/style/admin.js @@ -54,6 +54,16 @@ function parse_document(container) $this.find('td:nth-child(' + (i + 1) + ')').addClass(column.prop('className')); }); + // Styles table + if ($this.hasClass('styles')) { + $this.find('td:first-child[style]').each(function() { + var style = $(this).attr('style'); + if (style.length) { + $(this).parent('tr').attr('style', style.toLowerCase().replace('padding', 'margin')).addClass('responsive-style-row'); + } + }); + } + // Find each header if (!$this.data('no-responsive-header')) { -- cgit v1.2.1 From c1ca57fcdb60ee772434e577de34107b2aa88cb1 Mon Sep 17 00:00:00 2001 From: Vjacheslav Trushkin Date: Sat, 26 Oct 2013 12:21:38 +0300 Subject: [ticket/11957] Misc responsive changes PHPBB3-11957 --- phpBB/adm/style/admin.css | 19 +++++++++++++++++++ phpBB/adm/style/admin.js | 2 +- 2 files changed, 20 insertions(+), 1 deletion(-) (limited to 'phpBB') diff --git a/phpBB/adm/style/admin.css b/phpBB/adm/style/admin.css index e225a6752c..a4fef1f4ec 100644 --- a/phpBB/adm/style/admin.css +++ b/phpBB/adm/style/admin.css @@ -788,6 +788,7 @@ table.styles td.users, table.styles td.actions, table.styles td.mark { table.responsive { background: transparent none; border-width: 0; + padding: 0; } table.responsive caption { @@ -1119,6 +1120,10 @@ select#full_folder_action { fieldset.quick, p.quick { text-align: center; } + + fieldset.display-options { + clear: both; + } } /* Definition list layout for forms @@ -1563,6 +1568,20 @@ li.pagination ul { border-color: #B4BAC0; } +@media only screen and (max-width: 700px), only screen and (max-device-width: 700px) +{ + .pagination, .rtl .pagination { + float: none; + text-align: center; + margin: 5px 0; + } + + .pagination li a, .pagination li span { + display: inline-block; + min-width: 10px; + } +} + /* Action Highlighting ---------------------------------------- */ .successbox, .errorbox { diff --git a/phpBB/adm/style/admin.js b/phpBB/adm/style/admin.js index b466c02071..45cec5f716 100644 --- a/phpBB/adm/style/admin.js +++ b/phpBB/adm/style/admin.js @@ -115,7 +115,7 @@ function parse_document(container) return; } - if (text.length && text !== '-') { + if ((text.length && text !== '-') || cell.children().length) { cell.prepend('' + headers[column] + ''); } else { -- cgit v1.2.1 From 2a1db92955d9c1d20cfa3e49da158a10961eb081 Mon Sep 17 00:00:00 2001 From: Vjacheslav Trushkin Date: Sat, 26 Oct 2013 12:51:10 +0300 Subject: [ticket/11957] Wrap content in double div PHPBB3-11957 --- phpBB/adm/style/admin.css | 18 +++++++++++++++--- phpBB/adm/style/install_footer.html | 6 +++--- phpBB/adm/style/install_header.html | 1 + phpBB/adm/style/install_update_diff.html | 2 +- phpBB/adm/style/overall_footer.html | 6 +++--- phpBB/adm/style/overall_header.html | 1 + 6 files changed, 24 insertions(+), 10 deletions(-) (limited to 'phpBB') diff --git a/phpBB/adm/style/admin.css b/phpBB/adm/style/admin.css index a4fef1f4ec..9d281d4703 100644 --- a/phpBB/adm/style/admin.css +++ b/phpBB/adm/style/admin.css @@ -214,11 +214,23 @@ li { } #main { - margin: 0 0 0 210px; + float: right; + width: 100%; + margin: 0 0 0 -210px; } .rtl #main { - margin: 0 210px 0 0; + float: right; + margin: 0 -210px 0 0; +} + +.main { + margin-left: 210px; +} + +.rtl .main { + margin-left: 0; + margin-right: 210px; } #page-body.simple-page-body { @@ -258,7 +270,7 @@ li { margin-top: 5px; } - #main, .rtl #main { + #main, .rtl #main, .main, .rtl .main { float: none; width: auto; margin: 0; diff --git a/phpBB/adm/style/install_footer.html b/phpBB/adm/style/install_footer.html index 7a5fc666f8..c5356e7b9d 100644 --- a/phpBB/adm/style/install_footer.html +++ b/phpBB/adm/style/install_footer.html @@ -1,7 +1,7 @@ - - + + - +
    +
    \ No newline at end of file diff --git a/phpBB/adm/style/install_update_diff.html b/phpBB/adm/style/install_update_diff.html index 3f2d1b71f4..c27304a425 100644 --- a/phpBB/adm/style/install_update_diff.html +++ b/phpBB/adm/style/install_update_diff.html @@ -34,7 +34,7 @@ window.onresize = resize_panel; - - - - - - - - diff --git a/phpBB/adm/swatch.php b/phpBB/adm/swatch.php deleted file mode 100644 index e9d46d65b5..0000000000 --- a/phpBB/adm/swatch.php +++ /dev/null @@ -1,50 +0,0 @@ -session_begin(false); -$auth->acl($user->data); -$user->setup(); - -// Set custom template for admin area -$template->set_custom_style('adm', $phpbb_admin_path . 'style'); - -$template->set_filenames(array( - 'body' => 'colour_swatch.html') -); - -$form = request_var('form', ''); -$name = request_var('name', ''); - -// We validate form and name here, only id/class allowed -$form = (!preg_match('/^[a-z0-9_-]+$/i', $form)) ? '' : $form; -$name = (!preg_match('/^[a-z0-9_-]+$/i', $name)) ? '' : $name; - -$template->assign_vars(array( - 'OPENER' => $form, - 'NAME' => $name, - 'T_IMAGES_PATH' => "{$phpbb_root_path}images/", - - 'S_USER_LANG' => $user->lang['USER_LANG'], - 'S_CONTENT_DIRECTION' => $user->lang['DIRECTION'], - 'S_CONTENT_ENCODING' => 'UTF-8', -)); - -$template->display('body'); - -garbage_collection(); diff --git a/phpBB/includes/acp/acp_groups.php b/phpBB/includes/acp/acp_groups.php index ad29a5521b..6ad1f12813 100644 --- a/phpBB/includes/acp/acp_groups.php +++ b/phpBB/includes/acp/acp_groups.php @@ -657,7 +657,6 @@ class acp_groups 'GROUP_HIDDEN' => $type_hidden, 'U_BACK' => $u_back, - 'U_SWATCH' => append_sid("{$phpbb_admin_path}swatch.$phpEx", 'form=settings&name=group_colour'), 'U_ACTION' => "{$this->u_action}&action=$action&g=$group_id", 'L_AVATAR_EXPLAIN' => phpbb_avatar_explanation_string(), )); diff --git a/phpBB/includes/ucp/ucp_groups.php b/phpBB/includes/ucp/ucp_groups.php index a75d2e9bfc..1d08a8263b 100644 --- a/phpBB/includes/ucp/ucp_groups.php +++ b/phpBB/includes/ucp/ucp_groups.php @@ -699,7 +699,6 @@ class ucp_groups 'GROUP_CLOSED' => $type_closed, 'GROUP_HIDDEN' => $type_hidden, - 'U_SWATCH' => append_sid("{$phpbb_admin_path}swatch.$phpEx", 'form=ucp&name=group_colour'), 'S_UCP_ACTION' => $this->u_action . "&action=$action&g=$group_id", 'L_AVATAR_EXPLAIN' => phpbb_avatar_explanation_string(), )); -- cgit v1.2.1 From f4cff08a1943d2bd7f1fc18318fa73018bcf6499 Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Wed, 13 Nov 2013 14:29:24 +0100 Subject: [ticket/12015] Add more parameters to core.viewtopic_get_post_data PHPBB3-12015 --- phpBB/viewtopic.php | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'phpBB') diff --git a/phpBB/viewtopic.php b/phpBB/viewtopic.php index 3a7e633c99..e6019c1ed6 100644 --- a/phpBB/viewtopic.php +++ b/phpBB/viewtopic.php @@ -1001,10 +1001,17 @@ $sql_ary = array( * Event to modify the SQL query before the post and poster data is retrieved * * @event core.viewtopic_get_post_data +* @var int forum_id Forum ID +* @var int topic_id Topic ID +* @var array topic_data Array with topic data +* @var array post_list Array with post_ids we are going to retrieve +* @var int sort_days Display posts of previous x days +* @var string sort_key Key the posts are sorted by +* @var string sort_dir Direction the posts are sorted by * @var array sql_ary The SQL array to get the data of posts and posters * @since 3.1-A1 */ -$vars = array('sql_ary'); +$vars = array('forum_id', 'topic_id', 'topic_data', 'post_list', 'sort_days', 'sort_key', 'sort_dir', 'sql_ary'); extract($phpbb_dispatcher->trigger_event('core.viewtopic_get_post_data', compact($vars))); $sql = $db->sql_build_query('SELECT', $sql_ary); -- cgit v1.2.1 From e3b70c4c08c82cbf365e9f5e8e402b1f4888cc53 Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Wed, 13 Nov 2013 14:30:20 +0100 Subject: [ticket/12015] Add attachments to core.viewtopic_modify_post_row PHPBB3-12015 --- phpBB/viewtopic.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'phpBB') diff --git a/phpBB/viewtopic.php b/phpBB/viewtopic.php index e6019c1ed6..c453e3c2a6 100644 --- a/phpBB/viewtopic.php +++ b/phpBB/viewtopic.php @@ -1706,11 +1706,12 @@ for ($i = 0, $end = sizeof($post_list); $i < $end; ++$i) * @event core.viewtopic_modify_post_row * @var array row Array with original post and user data * @var array cp_row Custom profile field data of the poster + * @var array attachments List of attachments * @var array user_poster_data Poster's data from user cache * @var array post_row Template block array of the post * @since 3.1-A1 */ - $vars = array('row', 'cp_row', 'user_poster_data', 'post_row'); + $vars = array('row', 'cp_row', 'attachments', 'user_poster_data', 'post_row'); extract($phpbb_dispatcher->trigger_event('core.viewtopic_modify_post_row', compact($vars))); if (isset($cp_row['row']) && sizeof($cp_row['row'])) -- cgit v1.2.1 From 1efab9ec772f0b62572d28d1c2d57fdb998c5f8f Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Wed, 13 Nov 2013 14:31:51 +0100 Subject: [ticket/12015] Add an event after the post has been assigned to the template PHPBB3-12015 --- phpBB/viewtopic.php | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'phpBB') diff --git a/phpBB/viewtopic.php b/phpBB/viewtopic.php index c453e3c2a6..2f9a869bc6 100644 --- a/phpBB/viewtopic.php +++ b/phpBB/viewtopic.php @@ -1747,6 +1747,20 @@ for ($i = 0, $end = sizeof($post_list); $i < $end; ++$i) } } + /** + * Event after the post data has been assigned to the template + * + * @event core.viewtopic_post_row_after + * @var array row Array with original post and user data + * @var array cp_row Custom profile field data of the poster + * @var array attachments List of attachments + * @var array user_poster_data Poster's data from user cache + * @var array post_row Template block array of the post + * @since 3.1-A2 + */ + $vars = array('row', 'cp_row', 'attachments', 'user_poster_data', 'post_row'); + extract($phpbb_dispatcher->trigger_event('core.viewtopic_post_row_after', compact($vars))); + $prev_post_id = $row['post_id']; unset($rowset[$post_list[$i]]); -- cgit v1.2.1 From c2c976fe031b2904b3acbefb73f03827c55aa441 Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Wed, 13 Nov 2013 16:24:25 +0100 Subject: [ticket/12015] Add post counting information to event PHPBB3-12015 --- phpBB/viewtopic.php | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'phpBB') diff --git a/phpBB/viewtopic.php b/phpBB/viewtopic.php index 2f9a869bc6..36669e7383 100644 --- a/phpBB/viewtopic.php +++ b/phpBB/viewtopic.php @@ -1008,10 +1008,11 @@ $sql_ary = array( * @var int sort_days Display posts of previous x days * @var string sort_key Key the posts are sorted by * @var string sort_dir Direction the posts are sorted by +* @var int start Pagination information * @var array sql_ary The SQL array to get the data of posts and posters * @since 3.1-A1 */ -$vars = array('forum_id', 'topic_id', 'topic_data', 'post_list', 'sort_days', 'sort_key', 'sort_dir', 'sql_ary'); +$vars = array('forum_id', 'topic_id', 'topic_data', 'post_list', 'sort_days', 'sort_key', 'sort_dir', 'start', 'sql_ary'); extract($phpbb_dispatcher->trigger_event('core.viewtopic_get_post_data', compact($vars))); $sql = $db->sql_build_query('SELECT', $sql_ary); @@ -1704,6 +1705,9 @@ for ($i = 0, $end = sizeof($post_list); $i < $end; ++$i) * Modify the posts template block * * @event core.viewtopic_modify_post_row + * @var int start Start item of this page + * @var int i Number of the post on this page + * @var int end Number of posts on this page * @var array row Array with original post and user data * @var array cp_row Custom profile field data of the poster * @var array attachments List of attachments @@ -1711,7 +1715,7 @@ for ($i = 0, $end = sizeof($post_list); $i < $end; ++$i) * @var array post_row Template block array of the post * @since 3.1-A1 */ - $vars = array('row', 'cp_row', 'attachments', 'user_poster_data', 'post_row'); + $vars = array('start', 'i', 'end', 'row', 'cp_row', 'attachments', 'user_poster_data', 'post_row'); extract($phpbb_dispatcher->trigger_event('core.viewtopic_modify_post_row', compact($vars))); if (isset($cp_row['row']) && sizeof($cp_row['row'])) @@ -1751,6 +1755,9 @@ for ($i = 0, $end = sizeof($post_list); $i < $end; ++$i) * Event after the post data has been assigned to the template * * @event core.viewtopic_post_row_after + * @var int start Start item of this page + * @var int i Number of the post on this page + * @var int end Number of posts on this page * @var array row Array with original post and user data * @var array cp_row Custom profile field data of the poster * @var array attachments List of attachments @@ -1758,7 +1765,7 @@ for ($i = 0, $end = sizeof($post_list); $i < $end; ++$i) * @var array post_row Template block array of the post * @since 3.1-A2 */ - $vars = array('row', 'cp_row', 'attachments', 'user_poster_data', 'post_row'); + $vars = array('start', 'i', 'end', 'row', 'cp_row', 'attachments', 'user_poster_data', 'post_row'); extract($phpbb_dispatcher->trigger_event('core.viewtopic_post_row_after', compact($vars))); $prev_post_id = $row['post_id']; -- cgit v1.2.1 From ecda590b8657588b6b3719ca0d59ee824e5fc4b2 Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Wed, 13 Nov 2013 17:07:30 +0100 Subject: [ticket/12015] Add @change to events that got changed PHPBB3-12015 --- phpBB/viewtopic.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'phpBB') diff --git a/phpBB/viewtopic.php b/phpBB/viewtopic.php index 36669e7383..bfe131dbc3 100644 --- a/phpBB/viewtopic.php +++ b/phpBB/viewtopic.php @@ -1011,6 +1011,7 @@ $sql_ary = array( * @var int start Pagination information * @var array sql_ary The SQL array to get the data of posts and posters * @since 3.1-A1 +* @change 3.1.0-a2 Added vars forum_id, topic_id, topic_data, post_list, sort_days, sort_key, sort_dir, start */ $vars = array('forum_id', 'topic_id', 'topic_data', 'post_list', 'sort_days', 'sort_key', 'sort_dir', 'start', 'sql_ary'); extract($phpbb_dispatcher->trigger_event('core.viewtopic_get_post_data', compact($vars))); @@ -1714,6 +1715,7 @@ for ($i = 0, $end = sizeof($post_list); $i < $end; ++$i) * @var array user_poster_data Poster's data from user cache * @var array post_row Template block array of the post * @since 3.1-A1 + * @change 3.1.0-a2 Added vars start, i, end and attachments */ $vars = array('start', 'i', 'end', 'row', 'cp_row', 'attachments', 'user_poster_data', 'post_row'); extract($phpbb_dispatcher->trigger_event('core.viewtopic_modify_post_row', compact($vars))); @@ -1763,7 +1765,7 @@ for ($i = 0, $end = sizeof($post_list); $i < $end; ++$i) * @var array attachments List of attachments * @var array user_poster_data Poster's data from user cache * @var array post_row Template block array of the post - * @since 3.1-A2 + * @since 3.1.0-a2 */ $vars = array('start', 'i', 'end', 'row', 'cp_row', 'attachments', 'user_poster_data', 'post_row'); extract($phpbb_dispatcher->trigger_event('core.viewtopic_post_row_after', compact($vars))); -- cgit v1.2.1 From d3f9a51709d538824f4ec7afe8a2d6934dabb13c Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Wed, 13 Nov 2013 17:34:06 +0100 Subject: [ticket/12016] Use a service provider for event listeners This allows them to use dependency injection PHPBB3-12016 --- phpBB/config/services.yml | 9 ++++++++- phpBB/phpbb/event/extension_subscriber_loader.php | 20 ++++++++------------ 2 files changed, 16 insertions(+), 13 deletions(-) (limited to 'phpBB') diff --git a/phpBB/config/services.yml b/phpBB/config/services.yml index 7e3202d86b..8961ef0606 100644 --- a/phpBB/config/services.yml +++ b/phpBB/config/services.yml @@ -140,10 +140,17 @@ services: class: phpbb\event\extension_subscriber_loader arguments: - @dispatcher - - @ext.manager + - @event.listener_collection calls: - [load, []] + event.listener_collection: + class: phpbb\di\service_collection + arguments: + - @service_container + tags: + - { name: service_collection, tag: event.listener } + ext.manager: class: phpbb\extension\manager arguments: diff --git a/phpBB/phpbb/event/extension_subscriber_loader.php b/phpBB/phpbb/event/extension_subscriber_loader.php index df8e093f4a..6408f93e2a 100644 --- a/phpBB/phpbb/event/extension_subscriber_loader.php +++ b/phpBB/phpbb/event/extension_subscriber_loader.php @@ -14,26 +14,22 @@ use Symfony\Component\EventDispatcher\EventDispatcherInterface; class extension_subscriber_loader { private $dispatcher; - private $extension_manager; + private $listener_collection; - public function __construct(EventDispatcherInterface $dispatcher, \phpbb\extension\manager $extension_manager) + public function __construct(EventDispatcherInterface $dispatcher, \phpbb\di\service_collection $listener_collection) { $this->dispatcher = $dispatcher; - $this->extension_manager = $extension_manager; + $this->listener_collection = $listener_collection; } public function load() { - $finder = $this->extension_manager->get_finder(); - $subscriber_classes = $finder - ->extension_directory('/event') - ->core_path('event/') - ->get_classes(); - - foreach ($subscriber_classes as $class) + if (!empty($this->listener_collection)) { - $subscriber = new $class(); - $this->dispatcher->addSubscriber($subscriber); + foreach ($this->listener_collection as $listener) + { + $this->dispatcher->addSubscriber($listener); + } } } } -- cgit v1.2.1 From 13a4ceedb18ba938d3cd18e2f68707385bc9283a Mon Sep 17 00:00:00 2001 From: Marc Alexander Date: Wed, 13 Nov 2013 18:27:40 +0100 Subject: [ticket/11525] Use foreach instead of array_walk in method clean_row() This approach is cleaner and probably even faster the previous ways that included using array_walk() or array_map() and other helper functions and methods. PHPBB3-11525 --- phpBB/phpbb/avatar/manager.php | 32 +++++++++----------------------- 1 file changed, 9 insertions(+), 23 deletions(-) (limited to 'phpBB') diff --git a/phpBB/phpbb/avatar/manager.php b/phpBB/phpbb/avatar/manager.php index 9f6a5fb089..12d7861cdf 100644 --- a/phpBB/phpbb/avatar/manager.php +++ b/phpBB/phpbb/avatar/manager.php @@ -195,33 +195,19 @@ class manager return self::$default_row; } - $keys = array_keys($row); - $values = array_values($row); - - array_walk($keys, array('\phpbb\avatar\manager', 'strip_prefix'), $prefix); - $row = array_combine($keys, $values); - - if ($prefix == 'group') + $output = array(); + foreach ($row as $key => $value) { - $row['id'] = 'g' . $row['id']; + $key = preg_replace("#^(?:{$prefix}_)#", '', $key); + $output[$key] = $value; } - return $row; - } + if ($prefix === 'group' && isset($output['id'])) + { + $output['id'] = 'g' . $output['id']; + } - /** - * Strip prepending user_ or group_ prefix from key - * - * @param string $key Array key - * @param string $null Parameter is ignored by the function, just required by the array_walk - * @param string $prefix Prefix that should be stripped off from the keys (e.g. user) - * Should not include the trailing underscore - * @return null - */ - static protected function strip_prefix(&$key, $null, $prefix) - { - $regex = ($prefix !== '') ? "#^(?:{$prefix}_)#" : '#^(?:user_|group_)#'; - $key = preg_replace($regex, '', $key); + return $output; } /** -- cgit v1.2.1 From 39be6ab5211c4ebaaa0642a1d664cbcd001c9a1e Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Wed, 13 Nov 2013 23:44:57 +0100 Subject: [ticket/12015] Add some parameters to viewonline events PHPBB3-12015 --- phpBB/viewonline.php | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'phpBB') diff --git a/phpBB/viewonline.php b/phpBB/viewonline.php index 6b26a3f5d6..d6a6a79342 100644 --- a/phpBB/viewonline.php +++ b/phpBB/viewonline.php @@ -139,9 +139,12 @@ $sql_ary = array( * @event core.viewonline_modify_sql * @var array sql_ary The SQL array * @var bool show_guests Do we display guests in the list +* @var int guest_counter Number of guests displayed +* @var array forum_data Array with forum data * @since 3.1-A1 +* @change 3.1.0-a2 Added vars guest_counter and forum_data */ -$vars = array('sql_ary', 'show_guests'); +$vars = array('sql_ary', 'show_guests', 'guest_counter', 'forum_data'); extract($phpbb_dispatcher->trigger_event('core.viewonline_modify_sql', compact($vars))); $result = $db->sql_query($db->sql_build_query('SELECT', $sql_ary)); @@ -345,9 +348,11 @@ while ($row = $db->sql_fetchrow($result)) * @var array row Array with the users sql row * @var string location Page name to displayed in the list * @var string location_url Page url to displayed in the list + * @var array forum_data Array with forum data * @since 3.1-A1 + * @change 3.1.0-a2 Added var forum_data */ - $vars = array('on_page', 'row', 'location', 'location_url'); + $vars = array('on_page', 'row', 'location', 'location_url', 'forum_data'); extract($phpbb_dispatcher->trigger_event('core.viewonline_overwrite_location', compact($vars))); $template->assign_block_vars('user_row', array( -- cgit v1.2.1 From 50896305fa9b5b0db733ae4a401c9bd0a85cabe9 Mon Sep 17 00:00:00 2001 From: Cesar G Date: Wed, 13 Nov 2013 23:57:39 -0800 Subject: [ticket/12008] The read_notification_last_gc config setting should be dynamic. PHPBB3-12008 --- phpBB/install/schemas/schema_data.sql | 2 +- .../migration/data/v310/notifications_cron_p2.php | 27 ++++++++++++++++++++++ 2 files changed, 28 insertions(+), 1 deletion(-) create mode 100644 phpBB/phpbb/db/migration/data/v310/notifications_cron_p2.php (limited to 'phpBB') diff --git a/phpBB/install/schemas/schema_data.sql b/phpBB/install/schemas/schema_data.sql index 794def40dc..095415b175 100644 --- a/phpBB/install/schemas/schema_data.sql +++ b/phpBB/install/schemas/schema_data.sql @@ -232,7 +232,6 @@ INSERT INTO phpbb_config (config_name, config_value) VALUES ('print_pm', '1'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('queue_interval', '60'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('ranks_path', 'images/ranks'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('read_notification_expire_days', '30'); -INSERT INTO phpbb_config (config_name, config_value) VALUES ('read_notification_last_gc', '0'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('read_notification_gc', '86400'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('require_activation', '0'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('referer_validation', '1'); @@ -288,6 +287,7 @@ INSERT INTO phpbb_config (config_name, config_value, is_dynamic) VALUES ('num_us INSERT INTO phpbb_config (config_name, config_value, is_dynamic) VALUES ('plupload_last_gc', '0', 1); INSERT INTO phpbb_config (config_name, config_value, is_dynamic) VALUES ('rand_seed', '0', 1); INSERT INTO phpbb_config (config_name, config_value, is_dynamic) VALUES ('rand_seed_last_update', '0', 1); +INSERT INTO phpbb_config (config_name, config_value, is_dynamic) VALUES ('read_notification_last_gc', '0', 1); INSERT INTO phpbb_config (config_name, config_value, is_dynamic) VALUES ('record_online_date', '0', 1); INSERT INTO phpbb_config (config_name, config_value, is_dynamic) VALUES ('record_online_users', '0', 1); INSERT INTO phpbb_config (config_name, config_value, is_dynamic) VALUES ('search_indexing_state', '', 1); diff --git a/phpBB/phpbb/db/migration/data/v310/notifications_cron_p2.php b/phpBB/phpbb/db/migration/data/v310/notifications_cron_p2.php new file mode 100644 index 0000000000..050e679cc0 --- /dev/null +++ b/phpBB/phpbb/db/migration/data/v310/notifications_cron_p2.php @@ -0,0 +1,27 @@ + Date: Wed, 13 Nov 2013 23:58:21 -0800 Subject: [ticket/12008] Update the run time value for the prune notifications cron task PHPBB3-12008 --- phpBB/config/services.yml | 1 + phpBB/phpbb/notification/manager.php | 9 ++++++++- 2 files changed, 9 insertions(+), 1 deletion(-) (limited to 'phpBB') diff --git a/phpBB/config/services.yml b/phpBB/config/services.yml index 4280f90375..84143a2362 100644 --- a/phpBB/config/services.yml +++ b/phpBB/config/services.yml @@ -244,6 +244,7 @@ services: - @notification.method_collection - @service_container - @user_loader + - @config - @dbal.conn - @cache - @user diff --git a/phpBB/phpbb/notification/manager.php b/phpBB/phpbb/notification/manager.php index d77a936413..2e8652771b 100644 --- a/phpBB/phpbb/notification/manager.php +++ b/phpBB/phpbb/notification/manager.php @@ -27,6 +27,9 @@ class manager /** @var \phpbb\user_loader */ protected $user_loader; + /** @var \phpbb\config\config */ + protected $config; + /** @var \phpbb\db\driver\driver */ protected $db; @@ -58,6 +61,7 @@ class manager * @param array $notification_methods * @param ContainerBuilder $phpbb_container * @param \phpbb\user_loader $user_loader + * @param \phpbb\config\config $config * @param \phpbb\db\driver\driver $db * @param \phpbb\user $user * @param string $phpbb_root_path @@ -67,13 +71,14 @@ class manager * @param string $user_notifications_table * @return \phpbb\notification\manager */ - public function __construct($notification_types, $notification_methods, $phpbb_container, \phpbb\user_loader $user_loader, \phpbb\db\driver\driver $db, \phpbb\cache\service $cache, $user, $phpbb_root_path, $php_ext, $notification_types_table, $notifications_table, $user_notifications_table) + public function __construct($notification_types, $notification_methods, $phpbb_container, \phpbb\user_loader $user_loader, \phpbb\config\config $config, \phpbb\db\driver\driver $db, \phpbb\cache\service $cache, $user, $phpbb_root_path, $php_ext, $notification_types_table, $notifications_table, $user_notifications_table) { $this->notification_types = $notification_types; $this->notification_methods = $notification_methods; $this->phpbb_container = $phpbb_container; $this->user_loader = $user_loader; + $this->config = $config; $this->db = $db; $this->cache = $cache; $this->user = $user; @@ -797,6 +802,8 @@ class manager WHERE notification_time < ' . (int) $timestamp . (($only_read) ? ' AND notification_read = 1' : ''); $this->db->sql_query($sql); + + $this->config->set('read_notification_last_gc', time(), false); } /** -- cgit v1.2.1 From 23e2f920f5ed52cf9b354f61fcff548a03335ecc Mon Sep 17 00:00:00 2001 From: Marc Alexander Date: Thu, 14 Nov 2013 15:55:04 +0100 Subject: [ticket/12018] Use path_helper for admin style CSS in sql report The path to the admin style CSS is currently created with $phpbb_admin_path. We should however use the path_helper to correctly link to this file in order to have a correct link on pages like extensions PHPBB3-12018 --- phpBB/phpbb/db/driver/driver.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'phpBB') diff --git a/phpBB/phpbb/db/driver/driver.php b/phpBB/phpbb/db/driver/driver.php index 58d0b61519..d721ed2eb7 100644 --- a/phpBB/phpbb/db/driver/driver.php +++ b/phpBB/phpbb/db/driver/driver.php @@ -816,7 +816,7 @@ class driver */ function sql_report($mode, $query = '') { - global $cache, $starttime, $phpbb_root_path, $phpbb_admin_path, $user; + global $cache, $starttime, $phpbb_root_path, $phpbb_path_helper, $user; global $request; if (is_object($request) && !$request->variable('explain', false)) @@ -846,7 +846,7 @@ class driver SQL Report - +
    -- cgit v1.2.1 From 0d3396487e58091053778c9eb40ebcb6fa86536f Mon Sep 17 00:00:00 2001 From: Marc Alexander Date: Thu, 14 Nov 2013 18:16:29 +0100 Subject: [ticket/11896] Use $form_time and fix out of bounds $form_time PHPBB3-11896 --- phpBB/includes/ucp/ucp_notifications.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'phpBB') diff --git a/phpBB/includes/ucp/ucp_notifications.php b/phpBB/includes/ucp/ucp_notifications.php index de9352a322..63dbe79666 100644 --- a/phpBB/includes/ucp/ucp_notifications.php +++ b/phpBB/includes/ucp/ucp_notifications.php @@ -27,7 +27,8 @@ class ucp_notifications add_form_key('ucp_notification'); $start = $request->variable('start', 0); - $form_time = min($request->variable('form_time', 0), time()); + $form_time = $request->variable('form_time', 0); + $form_time = ($form_time <= 0 || $form_time > time()) ? time() : $form_time; $phpbb_notifications = $phpbb_container->get('notification_manager'); @@ -103,7 +104,7 @@ class ucp_notifications { confirm_box(false, 'NOTIFICATIONS_MARK_ALL_READ', build_hidden_fields(array( 'mark' => 'all', - 'form_time' => time(), + 'form_time' => $form_time, ))); } } -- cgit v1.2.1 From 5fe822021bc284f756ca9361f15220dbbefb31d4 Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Tue, 19 Nov 2013 00:23:49 +0100 Subject: [ticket/12023] Correctly compare the size of the array in ignore_new_files PHPBB3-12023 --- phpBB/includes/functions_install.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'phpBB') diff --git a/phpBB/includes/functions_install.php b/phpBB/includes/functions_install.php index 10e9878cc8..deb304b838 100644 --- a/phpBB/includes/functions_install.php +++ b/phpBB/includes/functions_install.php @@ -569,7 +569,7 @@ function phpbb_ignore_new_file_on_update($phpbb_root_path, $file) if (!$ignore_new_file && strpos($file, 'styles/') === 0) { $dirs = explode('/', $file); - if ($dirs >= 5) + if (sizeof($dirs) >= 5) { list($styles_dir, $style_name, $template_component, $language_iso) = explode('/', $file); if ($template_component == 'theme' && $language_iso !== 'images') -- cgit v1.2.1 From 6ee05d369e5aa0acb307bf88f0ac15fb33aade2b Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Wed, 13 Nov 2013 17:50:57 +0100 Subject: [prep-release-3.1.0-a2] Update version to 3.1.0-a2 --- phpBB/includes/constants.php | 2 +- phpBB/install/convertors/convert_phpbb20.php | 2 +- phpBB/install/schemas/schema_data.sql | 2 +- phpBB/styles/prosilver/style.cfg | 4 ++-- phpBB/styles/subsilver2/style.cfg | 4 ++-- 5 files changed, 7 insertions(+), 7 deletions(-) (limited to 'phpBB') diff --git a/phpBB/includes/constants.php b/phpBB/includes/constants.php index e1da41d106..546cd9e6d4 100644 --- a/phpBB/includes/constants.php +++ b/phpBB/includes/constants.php @@ -24,7 +24,7 @@ if (!defined('IN_PHPBB')) */ // phpBB Version -define('PHPBB_VERSION', '3.1.0-a2-dev'); +define('PHPBB_VERSION', '3.1.0-a2'); // QA-related // define('PHPBB_QA', 1); diff --git a/phpBB/install/convertors/convert_phpbb20.php b/phpBB/install/convertors/convert_phpbb20.php index de4e04a8e5..dd4ef13e49 100644 --- a/phpBB/install/convertors/convert_phpbb20.php +++ b/phpBB/install/convertors/convert_phpbb20.php @@ -33,7 +33,7 @@ $dbms = phpbb_convert_30_dbms_to_31($dbms); $convertor_data = array( 'forum_name' => 'phpBB 2.0.x', 'version' => '1.0.3', - 'phpbb_version' => '3.1.0-a2-dev', + 'phpbb_version' => '3.1.0-a2', 'author' => 'phpBB Group', 'dbms' => $dbms, 'dbhost' => $dbhost, diff --git a/phpBB/install/schemas/schema_data.sql b/phpBB/install/schemas/schema_data.sql index 095415b175..355dec2a54 100644 --- a/phpBB/install/schemas/schema_data.sql +++ b/phpBB/install/schemas/schema_data.sql @@ -269,7 +269,7 @@ 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 ('use_system_cron', '0'); -INSERT INTO phpbb_config (config_name, config_value) VALUES ('version', '3.1.0-a2-dev'); +INSERT INTO phpbb_config (config_name, config_value) VALUES ('version', '3.1.0-a2'); 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'); diff --git a/phpBB/styles/prosilver/style.cfg b/phpBB/styles/prosilver/style.cfg index aac9d993f5..aef7a3b12a 100644 --- a/phpBB/styles/prosilver/style.cfg +++ b/phpBB/styles/prosilver/style.cfg @@ -18,8 +18,8 @@ # General Information about this style name = prosilver copyright = © phpBB Group, 2007 -style_version = 3.1.0-a1 -phpbb_version = 3.1.0-a1 +style_version = 3.1.0-a2 +phpbb_version = 3.1.0-a2 # Defining a different template bitfield # template_bitfield = lNg= diff --git a/phpBB/styles/subsilver2/style.cfg b/phpBB/styles/subsilver2/style.cfg index 1d50352885..b588567153 100644 --- a/phpBB/styles/subsilver2/style.cfg +++ b/phpBB/styles/subsilver2/style.cfg @@ -18,8 +18,8 @@ # General Information about this style name = subsilver2 copyright = © 2005 phpBB Group -style_version = 3.1.0-a1 -phpbb_version = 3.1.0-a1 +style_version = 3.1.0-a2 +phpbb_version = 3.1.0-a2 # Defining a different template bitfield # template_bitfield = lNg= -- cgit v1.2.1 From 7678186b0907e0852eabcd1f4ed2041a8a45060d Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Wed, 13 Nov 2013 23:19:47 +0100 Subject: [prep-release-3.1.0-a2] Add migration for 3.1.0-a2 --- phpBB/phpbb/db/migration/data/v310/alpha2.php | 28 +++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 phpBB/phpbb/db/migration/data/v310/alpha2.php (limited to 'phpBB') diff --git a/phpBB/phpbb/db/migration/data/v310/alpha2.php b/phpBB/phpbb/db/migration/data/v310/alpha2.php new file mode 100644 index 0000000000..3c0853f924 --- /dev/null +++ b/phpBB/phpbb/db/migration/data/v310/alpha2.php @@ -0,0 +1,28 @@ + Date: Mon, 18 Nov 2013 12:07:11 +0100 Subject: [prep-release-3.1.0-a2] Prepare Changelog --- phpBB/docs/CHANGELOG.html | 47 +++++++++++++++++++++++++---------------------- 1 file changed, 25 insertions(+), 22 deletions(-) (limited to 'phpBB') diff --git a/phpBB/docs/CHANGELOG.html b/phpBB/docs/CHANGELOG.html index 7c96dd1b78..47a5100c26 100644 --- a/phpBB/docs/CHANGELOG.html +++ b/phpBB/docs/CHANGELOG.html @@ -46,6 +46,7 @@
    1. Changelog
        +
      1. Changes since 3.1.0-a1
      2. Changes since 3.0.x
      3. Changes since 3.0.11
      4. Changes since 3.0.10
      5. @@ -87,7 +88,9 @@
        -

        1.i. Changes since 3.0.x

        +

        1.i. Changes since 3.1.0-a1

        + +

        1.ii. Changes since 3.0.x

        Bug

          @@ -768,7 +771,7 @@
        • [PHPBB3-11913] - Apply reorganisation of download.phpbb.com to build_announcement.php
        -

        1.ii. Changes since 3.0.11

        +

        1.iii. Changes since 3.0.11

        Bug

          @@ -923,7 +926,7 @@
        • [PHPBB3-11753] - Upgrade mysql_upgrader.php schema data.
        -

        1.iii. Changes since 3.0.10

        +

        1.iv. Changes since 3.0.10

        Bug

          @@ -1048,7 +1051,7 @@
        • [PHPBB3-10909] - Update Travis Test Configuration: Travis no longer supports PHP 5.3.2
        -

        1.iv. Changes since 3.0.9

        +

        1.v. Changes since 3.0.9

        Bug

          @@ -1184,7 +1187,7 @@
        • [PHPBB3-10480] - Automate changelog building
        -

        1.v. Changes since 3.0.8

        +

        1.vi. Changes since 3.0.8

        Bug

        @@ -1552,7 +1555,7 @@ -

        1.vi. Changes since 3.0.7-PL1

        +

        1.vii. Changes since 3.0.7-PL1

        Security

          @@ -2010,13 +2013,13 @@
        -

        1.vii. Changes since 3.0.7

        +

        1.viii. Changes since 3.0.7

        • [Sec] Do not expose forum content of forums with ACL entries but no actual permission in ATOM Feeds. (Bug #58595)
        -

        1.viii. Changes since 3.0.6

        +

        1.ix. Changes since 3.0.6

        • [Fix] Allow ban reason and length to be selected and copied in ACP and subsilver2 MCP. (Bug #51095)
        • @@ -2120,7 +2123,7 @@
        -

        1.ix. Changes since 3.0.5

        +

        1.x. Changes since 3.0.5

        • [Fix] Allow whitespaces in avatar gallery names. (Bug #44955)
        • @@ -2342,7 +2345,7 @@
        • [Feature] Send anonymous statistical information to phpBB on installation and update (optional).
        -

        1.x. Changes since 3.0.4

        +

        1.xi. Changes since 3.0.4

        • [Fix] Delete user entry from ban list table upon user deletion (Bug #40015 - Patch by TerraFrost)
        • @@ -2431,7 +2434,7 @@
        • [Sec] Only use forum id supplied for posting if global announcement detected. (Reported by nickvergessen)
        -

        1.xi. Changes since 3.0.3

        +

        1.xii. Changes since 3.0.3

        • [Fix] Allow mixed-case template directories to be inherited (Bug #36725)
        • @@ -2463,7 +2466,7 @@
        • [Sec] Ask for forum password if post within passworded forum quoted in private message. (Reported by nickvergessen)
        -

        1.xii. Changes since 3.0.2

        +

        1.xiii. Changes since 3.0.2

        • [Fix] Correctly set topic starter if first post in topic removed (Bug #30575 - Patch by blueray2048)
        • @@ -2562,7 +2565,7 @@
        • [Sec Precaution] Stricter validation of the HTTP_HOST header (Thanks to Techie-Micheal et al for pointing out possible issues in derived code)
        -

        1.xiii. Changes since 3.0.1

        +

        1.xiv. Changes since 3.0.1

        • [Fix] Ability to set permissions on non-mysql dbms (Bug #24955)
        • @@ -2610,7 +2613,7 @@
        • [Sec] Only allow urls gone through redirect() being used within login_box(). (thanks nookieman)
        -

        1.xiv Changes since 3.0.0

        +

        1.xv Changes since 3.0.0

        • [Change] Validate birthdays (Bug #15004)
        • @@ -2681,7 +2684,7 @@
        • [Fix] Find and display colliding usernames correctly when converting from one database to another (Bug #23925)
        -

        1.xv. Changes since 3.0.RC8

        +

        1.xvi. Changes since 3.0.RC8

        • [Fix] Cleaned usernames contain only single spaces, so "a_name" and "a__name" are treated as the same name (Bug #15634)
        • @@ -2690,7 +2693,7 @@
        • [Fix] Call garbage_collection() within database updater to correctly close connections (affects Oracle for example)
        -

        1.xvi. Changes since 3.0.RC7

        +

        1.xvii. Changes since 3.0.RC7

        • [Fix] Fixed MSSQL related bug in the update system
        • @@ -2725,7 +2728,7 @@
        • [Fix] No duplication of active topics (Bug #15474)
        -

        1.xvii. Changes since 3.0.RC6

        +

        1.xviii. Changes since 3.0.RC6

        • [Fix] Submitting language changes using acp_language (Bug #14736)
        • @@ -2735,7 +2738,7 @@
        • [Fix] Able to request new password (Bug #14743)
        -

        1.xviii. Changes since 3.0.RC5

        +

        1.xix. Changes since 3.0.RC5

        • [Feature] Removing constant PHPBB_EMBEDDED in favor of using an exit_handler(); the constant was meant to achive this more or less.
        • @@ -2798,7 +2801,7 @@
        • [Sec] New password hashing mechanism for storing passwords (#i42)
        -

        1.xix. Changes since 3.0.RC4

        +

        1.xx. Changes since 3.0.RC4

        • [Fix] MySQL, PostgreSQL and SQLite related database fixes (Bug #13862)
        • @@ -2849,7 +2852,7 @@
        • [Fix] odbc_autocommit causing existing result sets to be dropped (Bug #14182)
        -

        1.xx. Changes since 3.0.RC3

        +

        1.xxi. Changes since 3.0.RC3

        • [Fix] Fixing some subsilver2 and prosilver style issues
        • @@ -2958,7 +2961,7 @@
        -

        1.xxi. Changes since 3.0.RC2

        +

        1.xxii. Changes since 3.0.RC2

        • [Fix] Re-allow searching within the memberlist
        • @@ -3004,7 +3007,7 @@
        -

        1.xxii. Changes since 3.0.RC1

        +

        1.xxiii. Changes since 3.0.RC1

        • [Fix] (X)HTML issues within the templates (Bug #11255, #11255)
        • -- cgit v1.2.1 From e74b5ac9e3ac0814f49fdf26a7205968d6b6581d Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Mon, 18 Nov 2013 12:07:59 +0100 Subject: [prep-release-3.1.0-a2] Add changelog for alpha2 --- phpBB/docs/CHANGELOG.html | 74 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 74 insertions(+) (limited to 'phpBB') diff --git a/phpBB/docs/CHANGELOG.html b/phpBB/docs/CHANGELOG.html index 47a5100c26..b10d2772a2 100644 --- a/phpBB/docs/CHANGELOG.html +++ b/phpBB/docs/CHANGELOG.html @@ -90,6 +90,80 @@

          1.i. Changes since 3.1.0-a1

          +

          Bug

          +
            +
          • [PHPBB3-4776] - Long post gets hidden behind posting profile
          • +
          • [PHPBB3-10449] - Lines spilling in subscriptions view
          • +
          • [PHPBB3-10948] - Color swatch in 3.1 does not display properly
          • +
          • [PHPBB3-11030] - I beam cursor in prosilver when hovering on browse button for uploading attachments
          • +
          • [PHPBB3-11073] - Reported/Unapproved moderator information in viewtopic is striked through instead of underlined
          • +
          • [PHPBB3-11138] - Resync features in ACP should not use AJAX
          • +
          • [PHPBB3-11280] - Double clicking "mark topics read" produces an error the second time
          • +
          • [PHPBB3-11525] - phpbb_avatar_manager::clean_row collapses user_id and group_id
          • +
          • [PHPBB3-11534] - Remote avatar does not properly check if remote file is an image
          • +
          • [PHPBB3-11626] - Auth ACP options should be moved to separate html file
          • +
          • [PHPBB3-11663] - In generate_text_for_storage the function does not check for errors of parse_message:parse() and act accordingly
          • +
          • [PHPBB3-11691] - Soft delete migration conversion should be staggered
          • +
          • [PHPBB3-11739] - Wrong name for UCP Module "Edit "Remember Me" login keys"
          • +
          • [PHPBB3-11842] - Create a new group Error with avatar driver
          • +
          • [PHPBB3-11857] - Avatar manager must not depend on entire container
          • +
          • [PHPBB3-11872] - MCP: Users with most warnings list is invalid
          • +
          • [PHPBB3-11896] - "Mark all notifications read" does not work
          • +
          • [PHPBB3-11899] - New ajax poll vote should give feedback while waiting for servers response
          • +
          • [PHPBB3-11916] - Remove files from hidden attach list after deletion
          • +
          • [PHPBB3-11922] - Migrator fails to remove columns on MSSQL when they have/had an index
          • +
          • [PHPBB3-11923] - UCP avatar error when user has no permissions to change his/her avatar
          • +
          • [PHPBB3-11924] - Add a script to export the events in wiki format
          • +
          • [PHPBB3-11926] - Plupload Migration has a broken dependency.
          • +
          • [PHPBB3-11927] - Missing Files after 3.1.0-A1 Automatic Updater
          • +
          • [PHPBB3-11930] - Avatar paths are incorrect when using app.php
          • +
          • [PHPBB3-11935] - Invalid HTML in "Sort By" form elements in Prosilver
          • +
          • [PHPBB3-11936] - Fixes to Notifications Window
          • +
          • [PHPBB3-11939] - Quick reply editor has unnecessary data-ajax attribute
          • +
          • [PHPBB3-11943] - $VAR = false has unexpected result
          • +
          • [PHPBB3-11945] - Focused buttons are hard to notice
          • +
          • [PHPBB3-11947] - Notification popup does not appear when clicking number in text
          • +
          • [PHPBB3-11948] - Extensions should be allowed to have more then 1 routing file
          • +
          • [PHPBB3-11949] - cannot upgrade to 3.1
          • +
          • [PHPBB3-11960] - Responsive design removed teampage names
          • +
          • [PHPBB3-11972] - Add template event posting_editor_subject_after
          • +
          • [PHPBB3-11977] - Ajax delete should disable moving options
          • +
          • [PHPBB3-11982] - Navigation is shown above AJAX background in ACP
          • +
          • [PHPBB3-11983] - Subscriptions argument missing from docblock in ucp_notifications
          • +
          • [PHPBB3-11986] - Undefined index: poster_id in file.php
          • +
          • [PHPBB3-11987] - {ROOT_PATH} in ACP leads to adm/
          • +
          • [PHPBB3-11990] - Remove result_mssqlnative from acp_database
          • +
          • [PHPBB3-11991] - PHP notices when closing reported posts entries in MCP
          • +
          • [PHPBB3-11992] - Wrong variable to close "Users with most warnings" block at MCP
          • +
          • [PHPBB3-11994] - Admin options for extensions are bad/misleading
          • +
          • [PHPBB3-11995] - Reverting a config.remove fails
          • +
          • [PHPBB3-12002] - Extension management page should use generate/check link hash
          • +
          • [PHPBB3-12007] - Default last_result of callable steps must be integer instead of false
          • +
          • [PHPBB3-12008] - "Prune notifications" cron task always ran, blocking others
          • +
          • [PHPBB3-12016] - Event listeners should be services
          • +
          • [PHPBB3-12017] - Extension tests are broken on current develop
          • +
          • [PHPBB3-12018] - Use path_helper for admin style CSS in sql report
          • +
          • [PHPBB3-12023] - New css files missing after update
          • +
          +

          Improvement

          +
            +
          • [PHPBB3-11552] - Responsive design for prosilver
          • +
          • [PHPBB3-11746] - Add "account activation required" notification for Administrators
          • +
          • [PHPBB3-11921] - Improve Notifications and PMs in the header
          • +
          • [PHPBB3-11928] - Replace AJAX loading info pop up with animation
          • +
          • [PHPBB3-11957] - Responsive design for admin control panel
          • +
          • [PHPBB3-11973] - Remove logic from language files where possible
          • +
          • [PHPBB3-11974] - All timezones should be translatable
          • +
          • [PHPBB3-11975] - Add ACP link next to MCP
          • +
          +

          Task

          + +

          1.ii. Changes since 3.0.x

          Bug

          -- cgit v1.2.1 From d67341ea0054f2694880dc6c9fda01e6048e0ed3 Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Tue, 19 Nov 2013 01:37:31 +0100 Subject: [prep-release-3.1.0-a2] Update version to 3.1.0-a3-dev in install and constant --- phpBB/includes/constants.php | 2 +- phpBB/install/schemas/schema_data.sql | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'phpBB') diff --git a/phpBB/includes/constants.php b/phpBB/includes/constants.php index 546cd9e6d4..855b6ff187 100644 --- a/phpBB/includes/constants.php +++ b/phpBB/includes/constants.php @@ -24,7 +24,7 @@ if (!defined('IN_PHPBB')) */ // phpBB Version -define('PHPBB_VERSION', '3.1.0-a2'); +define('PHPBB_VERSION', '3.1.0-a3-dev'); // QA-related // define('PHPBB_QA', 1); diff --git a/phpBB/install/schemas/schema_data.sql b/phpBB/install/schemas/schema_data.sql index 355dec2a54..8a16526f36 100644 --- a/phpBB/install/schemas/schema_data.sql +++ b/phpBB/install/schemas/schema_data.sql @@ -269,7 +269,7 @@ 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 ('use_system_cron', '0'); -INSERT INTO phpbb_config (config_name, config_value) VALUES ('version', '3.1.0-a2'); +INSERT INTO phpbb_config (config_name, config_value) VALUES ('version', '3.1.0-a3-dev'); 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'); -- cgit v1.2.1 From 9d39457e35632d2770af986f78286d239fd00c78 Mon Sep 17 00:00:00 2001 From: OpenShift guest Date: Mon, 18 Nov 2013 23:17:03 -0500 Subject: [ticket/12024] Template event overall_header_content_before http://area51.phpbb.com/phpBB/viewtopic.php?f=111&t=44959 http://tracker.phpbb.com/browse/PHPBB3-12024 PHPBB3-12024 --- phpBB/styles/prosilver/template/overall_footer.html | 1 + phpBB/styles/prosilver/template/overall_header.html | 1 + phpBB/styles/subsilver2/template/overall_footer.html | 1 + phpBB/styles/subsilver2/template/overall_header.html | 1 + 4 files changed, 4 insertions(+) (limited to 'phpBB') diff --git a/phpBB/styles/prosilver/template/overall_footer.html b/phpBB/styles/prosilver/template/overall_footer.html index bf5ce30f37..766dc93655 100644 --- a/phpBB/styles/prosilver/template/overall_footer.html +++ b/phpBB/styles/prosilver/template/overall_footer.html @@ -1,3 +1,4 @@ +
    + diff --git a/phpBB/styles/subsilver2/template/overall_footer.html b/phpBB/styles/subsilver2/template/overall_footer.html index 3a29a0d752..84a02430b9 100644 --- a/phpBB/styles/subsilver2/template/overall_footer.html +++ b/phpBB/styles/subsilver2/template/overall_footer.html @@ -1,3 +1,4 @@ + {RUN_CRON_TASK}
    diff --git a/phpBB/styles/subsilver2/template/overall_header.html b/phpBB/styles/subsilver2/template/overall_header.html index 0317d6e45c..20d06e4921 100644 --- a/phpBB/styles/subsilver2/template/overall_header.html +++ b/phpBB/styles/subsilver2/template/overall_header.html @@ -243,3 +243,4 @@ function marklist(id, name, state)
    + \ No newline at end of file -- cgit v1.2.1 From bc47455dfba70f43bf335753e0329e2eff6d7082 Mon Sep 17 00:00:00 2001 From: OpenShift guest Date: Mon, 18 Nov 2013 23:43:39 -0500 Subject: [ticket/12024] Replace newline PHPBB3-12024 --- phpBB/styles/subsilver2/template/overall_header.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'phpBB') diff --git a/phpBB/styles/subsilver2/template/overall_header.html b/phpBB/styles/subsilver2/template/overall_header.html index 20d06e4921..02e056798b 100644 --- a/phpBB/styles/subsilver2/template/overall_header.html +++ b/phpBB/styles/subsilver2/template/overall_header.html @@ -243,4 +243,4 @@ function marklist(id, name, state)
    - \ No newline at end of file + -- cgit v1.2.1 From 122e95486c8af0963316c4c46a40e9f8f19a9cad Mon Sep 17 00:00:00 2001 From: OpenShift guest Date: Mon, 18 Nov 2013 23:44:59 -0500 Subject: [ticket/12024] Update events list PHPBB3-12024 --- phpBB/docs/events.md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'phpBB') diff --git a/phpBB/docs/events.md b/phpBB/docs/events.md index f0b3b81822..ffcf0258f2 100644 --- a/phpBB/docs/events.md +++ b/phpBB/docs/events.md @@ -64,6 +64,14 @@ overall_footer_breadcrumb_append * Location: styles/prosilver/template/overall_footer.html * Purpose: Add links to the list of breadcrumbs in the footer +overall_footer_content_after +=== +* Locations: + + styles/prosilver/template/overall_footer.html + + styles/subsilver2/template/overall_footer.html +* Since: 3.1.0-a1 +* Purpose: Add content on all pages after the main content, before the footer + overall_footer_copyright_append === * Locations: @@ -85,6 +93,14 @@ overall_header_breadcrumb_append + styles/subsilver2/template/breadcrumbs.html * Purpose: Add links to the list of breadcrumbs in the header +overall_header_content_before +=== +* Locations: + + styles/prosilver/template/overall_header.html + + styles/subsilver2/template/overall_header.html +* Since: 3.1.0-a1 +* Purpose: Add content on all pages before the main content, after the header + overall_header_head_append === * Locations: -- cgit v1.2.1 From f833a42e7e6266fd946e5a739bfbf528c672a387 Mon Sep 17 00:00:00 2001 From: Cesar G Date: Thu, 14 Nov 2013 07:55:17 -0800 Subject: [ticket/11814] Remove redundant text from the topic reply email notification. PHPBB3-11814 --- phpBB/language/en/email/topic_notify.txt | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'phpBB') diff --git a/phpBB/language/en/email/topic_notify.txt b/phpBB/language/en/email/topic_notify.txt index 99865494ac..f52ce9395d 100644 --- a/phpBB/language/en/email/topic_notify.txt +++ b/phpBB/language/en/email/topic_notify.txt @@ -2,7 +2,7 @@ Subject: Topic reply notification - "{TOPIC_TITLE}" Hello {USERNAME}, -You are receiving this notification because you are watching the topic "{TOPIC_TITLE}" at "{SITENAME}". This topic has received a reply by {AUTHOR_NAME} since your last visit. You can use the following link to view the replies made, no more notifications will be sent until you visit the topic. +You are receiving this notification because you are watching the topic "{TOPIC_TITLE}" at "{SITENAME}". This topic has received a reply by {AUTHOR_NAME} since your last visit. No more notifications will be sent until you visit the topic. If you want to view the newest post made since your last visit, click the following link: {U_NEWEST_POST} @@ -14,7 +14,6 @@ If you want to view the forum, click the following link: {U_FORUM} 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} {EMAIL_SIG} \ No newline at end of file -- cgit v1.2.1 From 77dc1ac09a7e6c426ba8e07b398a3c3abeed487f Mon Sep 17 00:00:00 2001 From: OpenShift guest Date: Tue, 19 Nov 2013 09:37:00 -0500 Subject: [ticket/12024] Correct the 'since' information in event list PHPBB3-12024 --- phpBB/docs/events.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'phpBB') diff --git a/phpBB/docs/events.md b/phpBB/docs/events.md index ffcf0258f2..2eb07a5a71 100644 --- a/phpBB/docs/events.md +++ b/phpBB/docs/events.md @@ -69,7 +69,7 @@ overall_footer_content_after * Locations: + styles/prosilver/template/overall_footer.html + styles/subsilver2/template/overall_footer.html -* Since: 3.1.0-a1 +* Since: 3.1.0-a3 * Purpose: Add content on all pages after the main content, before the footer overall_footer_copyright_append @@ -98,7 +98,7 @@ overall_header_content_before * Locations: + styles/prosilver/template/overall_header.html + styles/subsilver2/template/overall_header.html -* Since: 3.1.0-a1 +* Since: 3.1.0-a3 * Purpose: Add content on all pages before the main content, after the header overall_header_head_append -- cgit v1.2.1 From 55670d75b00079a06ed1ac701786e41d7a367f89 Mon Sep 17 00:00:00 2001 From: OpenShift guest Date: Tue, 19 Nov 2013 09:55:58 -0500 Subject: [ticket/12024] Add new line PHPBB3-12024 --- phpBB/styles/prosilver/template/overall_header.html | 1 + phpBB/styles/subsilver2/template/overall_footer.html | 1 + 2 files changed, 2 insertions(+) (limited to 'phpBB') diff --git a/phpBB/styles/prosilver/template/overall_header.html b/phpBB/styles/prosilver/template/overall_header.html index 7002ebc630..809c0affcb 100644 --- a/phpBB/styles/prosilver/template/overall_header.html +++ b/phpBB/styles/prosilver/template/overall_header.html @@ -213,4 +213,5 @@
    + diff --git a/phpBB/styles/subsilver2/template/overall_footer.html b/phpBB/styles/subsilver2/template/overall_footer.html index 84a02430b9..4d69f8dff1 100644 --- a/phpBB/styles/subsilver2/template/overall_footer.html +++ b/phpBB/styles/subsilver2/template/overall_footer.html @@ -1,4 +1,5 @@ + {RUN_CRON_TASK} -- cgit v1.2.1 From a5c4e4f3cebdd75aba415b9106d554e61d55154e Mon Sep 17 00:00:00 2001 From: Vjacheslav Trushkin Date: Tue, 29 Oct 2013 01:15:44 +0200 Subject: [ticket/11984] Prevent AJAX background animation flicker in ACP PHPBB3-11984 --- phpBB/adm/style/admin.css | 2 ++ 1 file changed, 2 insertions(+) (limited to 'phpBB') diff --git a/phpBB/adm/style/admin.css b/phpBB/adm/style/admin.css index 512c714fcc..e97412da68 100644 --- a/phpBB/adm/style/admin.css +++ b/phpBB/adm/style/admin.css @@ -1587,6 +1587,8 @@ input.button1:focus, input.button2:focus, input.button3:focus { #darkenwrapper { display: none; + position: relative; + z-index: 44; } #darken { -- cgit v1.2.1 From 094da3ba167e1075a8d3e75096c7e83712d74f87 Mon Sep 17 00:00:00 2001 From: Vjacheslav Trushkin Date: Tue, 29 Oct 2013 01:16:30 +0200 Subject: [ticket/11984] Prevent AJAX background animation flicker in prosilver PHPBB3-11984 --- phpBB/styles/prosilver/theme/common.css | 3 +++ 1 file changed, 3 insertions(+) (limited to 'phpBB') diff --git a/phpBB/styles/prosilver/theme/common.css b/phpBB/styles/prosilver/theme/common.css index 225673a932..9714e87af2 100644 --- a/phpBB/styles/prosilver/theme/common.css +++ b/phpBB/styles/prosilver/theme/common.css @@ -810,6 +810,8 @@ li.pagination ul { #darkenwrapper { display: none; + position: relative; + z-index: 44; } #darken { @@ -819,6 +821,7 @@ li.pagination ul { width: 100%; height: 100%; opacity: 0.5; + z-index: 45; } #loading_indicator { -- cgit v1.2.1 From 366a224a248a9cac50a1d0df50ae91c89954aabc Mon Sep 17 00:00:00 2001 From: Vjacheslav Trushkin Date: Wed, 30 Oct 2013 01:17:11 +0200 Subject: [ticket/11984] Fix stray and active tab hover in ACP PHPBB3-11984 --- phpBB/adm/style/admin.css | 18 ++++++++---------- phpBB/adm/style/overall_header.html | 1 - 2 files changed, 8 insertions(+), 11 deletions(-) (limited to 'phpBB') diff --git a/phpBB/adm/style/admin.css b/phpBB/adm/style/admin.css index e97412da68..c7f91d9a8a 100644 --- a/phpBB/adm/style/admin.css +++ b/phpBB/adm/style/admin.css @@ -381,6 +381,14 @@ li { color: #BC2A4D; } +#tabs a:hover { + background-position: 0 -69px; +} + +#tabs a:hover span { + background-position: 100% -69px; +} + #tabs .activetab a { background-position: 0 0; border-bottom: 1px solid #DCDEE2; @@ -392,14 +400,6 @@ li { color: #23649F; } -#tabs a:hover { - background-position: 0 -69px; -} - -#tabs a:hover span { - background-position: 100% -69px; -} - #tabs .activetab a:hover span { color: #115098; } @@ -1587,8 +1587,6 @@ input.button1:focus, input.button2:focus, input.button3:focus { #darkenwrapper { display: none; - position: relative; - z-index: 44; } #darken { diff --git a/phpBB/adm/style/overall_header.html b/phpBB/adm/style/overall_header.html index 455446f8e3..fcef3bb8ac 100644 --- a/phpBB/adm/style/overall_header.html +++ b/phpBB/adm/style/overall_header.html @@ -153,7 +153,6 @@ function popup(url, width, height, name) -
    -- cgit v1.2.1 From 796e22d67557f15fe2902130eead74809b481177 Mon Sep 17 00:00:00 2001 From: Vjacheslav Trushkin Date: Wed, 30 Oct 2013 19:17:00 +0200 Subject: [ticket/11984] Hide for invalid extensions PHPBB3-11984 --- phpBB/adm/style/admin.js | 3 +++ 1 file changed, 3 insertions(+) (limited to 'phpBB') diff --git a/phpBB/adm/style/admin.js b/phpBB/adm/style/admin.js index e9f0f1e512..dd46124f97 100644 --- a/phpBB/adm/style/admin.js +++ b/phpBB/adm/style/admin.js @@ -133,6 +133,9 @@ function parse_document(container) column += colspan; }); }); + + // Remove in disabled extensions list + $this.find('tr.ext_disabled > .empty:nth-child(2) + .empty').siblings(':first-child').children('dfn').remove(); }); /** -- cgit v1.2.1 From 739f1a3bdd733a45d9192d1e0d8da4e44caa1a3d Mon Sep 17 00:00:00 2001 From: Vjacheslav Trushkin Date: Thu, 31 Oct 2013 10:29:46 +0200 Subject: [ticket/11984] Do not resize textarea on touch devices PHPBB3-11984 --- phpBB/assets/javascript/core.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'phpBB') diff --git a/phpBB/assets/javascript/core.js b/phpBB/assets/javascript/core.js index a3a6d75dd2..238bfad90b 100644 --- a/phpBB/assets/javascript/core.js +++ b/phpBB/assets/javascript/core.js @@ -15,6 +15,7 @@ var dark = $('#darkenwrapper'); var loadingIndicator = $('#loading_indicator'); var phpbbAlertTimer = null; +var isTouch = (window && typeof window.ontouchstart !== 'undefined'); /** * Display a loading screen @@ -623,8 +624,9 @@ phpbb.resizeTextArea = function(items, options) { resetCallback: function(item) { } }; - if (arguments.length > 1) - { + if (isTouch) return; + + if (arguments.length > 1) { configuration = $.extend(configuration, options); } -- cgit v1.2.1 From 44b6f45759485cc33bb71ff50a715f39a8d60089 Mon Sep 17 00:00:00 2001 From: Cesar G Date: Thu, 21 Nov 2013 08:11:17 -0800 Subject: [ticket/11484] Display login box for users following email notification link. The link used for the latest post now uses view=unread so redirecting the user using the value for the e parameter is no longer necessary. PHPBB3-11484 --- phpBB/phpbb/notification/type/post.php | 2 +- phpBB/viewtopic.php | 19 +++---------------- 2 files changed, 4 insertions(+), 17 deletions(-) (limited to 'phpBB') diff --git a/phpBB/phpbb/notification/type/post.php b/phpBB/phpbb/notification/type/post.php index 9d5c7b0a4c..c0ef184a19 100644 --- a/phpBB/phpbb/notification/type/post.php +++ b/phpBB/phpbb/notification/type/post.php @@ -234,7 +234,7 @@ class post extends \phpbb\notification\type\base 'TOPIC_TITLE' => htmlspecialchars_decode(censor_text($this->get_data('topic_title'))), 'U_VIEW_POST' => generate_board_url() . "/viewtopic.{$this->php_ext}?p={$this->item_id}#p{$this->item_id}", - 'U_NEWEST_POST' => generate_board_url() . "/viewtopic.{$this->php_ext}?f={$this->get_data('forum_id')}&t={$this->item_parent_id}&view=unread#unread", + 'U_NEWEST_POST' => generate_board_url() . "/viewtopic.{$this->php_ext}?f={$this->get_data('forum_id')}&t={$this->item_parent_id}&e=1&view=unread#unread", 'U_TOPIC' => generate_board_url() . "/viewtopic.{$this->php_ext}?f={$this->get_data('forum_id')}&t={$this->item_parent_id}", 'U_VIEW_TOPIC' => generate_board_url() . "/viewtopic.{$this->php_ext}?f={$this->get_data('forum_id')}&t={$this->item_parent_id}", 'U_FORUM' => generate_board_url() . "/viewforum.{$this->php_ext}?f={$this->get_data('forum_id')}", diff --git a/phpBB/viewtopic.php b/phpBB/viewtopic.php index 3a7e633c99..fb30be5f27 100644 --- a/phpBB/viewtopic.php +++ b/phpBB/viewtopic.php @@ -347,23 +347,10 @@ if ($topic_data['forum_password']) login_forum_box($topic_data); } -// Redirect to login or to the correct post upon emailed notification links -if (isset($_GET['e'])) +// Redirect to login upon emailed notification links if user is not logged in. +if (isset($_GET['e']) && $user->data['user_id'] == ANONYMOUS) { - $jump_to = request_var('e', 0); - - $redirect_url = append_sid("{$phpbb_root_path}viewtopic.$phpEx", "f=$forum_id&t=$topic_id"); - - if ($user->data['user_id'] == ANONYMOUS) - { - login_box($redirect_url . "&p=$post_id&e=$jump_to", $user->lang['LOGIN_NOTIFY_TOPIC']); - } - - if ($jump_to > 0) - { - // We direct the already logged in user to the correct post... - redirect($redirect_url . ((!$post_id) ? "&p=$jump_to" : "&p=$post_id") . "#p$jump_to"); - } + login_box(build_url('e') . '#unread', $user->lang['LOGIN_NOTIFY_TOPIC']); } // What is start equal to? -- cgit v1.2.1 From bcf347420e4fe400d02a6ee58e63839f18a86362 Mon Sep 17 00:00:00 2001 From: Cesar G Date: Thu, 21 Nov 2013 13:02:26 -0800 Subject: [ticket/11959] Trim the list of users from post notifications. PHPBB3-11959 --- phpBB/language/en/common.php | 3 +++ phpBB/phpbb/notification/type/post.php | 31 +++++++++++++++++++++++++++++-- 2 files changed, 32 insertions(+), 2 deletions(-) (limited to 'phpBB') diff --git a/phpBB/language/en/common.php b/phpBB/language/en/common.php index a939689f9c..2b1935dfca 100644 --- a/phpBB/language/en/common.php +++ b/phpBB/language/en/common.php @@ -416,14 +416,17 @@ $lang = array_merge($lang, array( 'NOT_WATCHING_TOPIC' => 'You are no longer subscribed to this topic.', 'NOTIFICATIONS' => 'Notifications', 'NOTIFICATION_BOOKMARK' => '%1$s replied to the topic "%2$s" you have bookmarked.', + 'NOTIFICATION_BOOKMARK_TRIMMED' => '%1$s and %3$d others replied to the topic “%2$s” you have bookmarked.', 'NOTIFICATION_GROUP_REQUEST' => '%1$s is requesting to join the group %2$s.', 'NOTIFICATION_GROUP_REQUEST_APPROVED' => 'Your request to join the group %1$s has been approved.', 'NOTIFICATION_PM' => '%1$s sent you a Private Message "%2$s".', 'NOTIFICATION_POST' => '%1$s replied to the topic "%2$s".', + 'NOTIFICATION_POST_TRIMMED' => '%1$s and %3$d others replied to the topic “%2$s”', 'NOTIFICATION_POST_APPROVED' => 'Your post was approved "%2$s".', 'NOTIFICATION_POST_DISAPPROVED' => 'Your post "%1$s" was disapproved for reason: "%2$s".', 'NOTIFICATION_POST_IN_QUEUE' => 'A new post titled "%2$s" was posted by %1$s and needs approval.', 'NOTIFICATION_QUOTE' => '%1$s quoted you in the post "%2$s".', + 'NOTIFICATION_QUOTE_TRIMMED' => '%1$s and %3$d others replied to the topic “%2$s”', 'NOTIFICATION_REPORT_PM' => '%1$s reported a Private Message "%2$s" for reason: "%3$s".', 'NOTIFICATION_REPORT_POST' => '%1$s reported a post "%2$s" for reason: "%3$s".', 'NOTIFICATION_REPORT_CLOSED' => '%1$s closed the report you made for "%2$s".', diff --git a/phpBB/phpbb/notification/type/post.php b/phpBB/phpbb/notification/type/post.php index 9d5c7b0a4c..0d07df8adf 100644 --- a/phpBB/phpbb/notification/type/post.php +++ b/phpBB/phpbb/notification/type/post.php @@ -183,6 +183,10 @@ class post extends \phpbb\notification\type\base 'username' => $this->get_data('post_username'), )), $responders); + $responders_cnt = sizeof($responders); + $responders = $this->trim_user_ary($responders); + $extra_cnt = $responders_cnt - sizeof($responders); + foreach ($responders as $responder) { if ($responder['username']) @@ -194,11 +198,18 @@ class post extends \phpbb\notification\type\base $usernames[] = $this->user_loader->get_username($responder['poster_id'], 'no_profile'); } } + $lang_key = $this->language_key; + + if ($responders_cnt > 4) + { + $lang_key .= '_TRIMMED'; + } return $this->user->lang( - $this->language_key, + $lang_key, implode(', ', $usernames), - censor_text($this->get_data('topic_title')) + censor_text($this->get_data('topic_title')), + $extra_cnt ); } @@ -272,6 +283,22 @@ class post extends \phpbb\notification\type\base } } + return $this->trim_user_ary($users); + } + + /** + * Trim the user array passed down to 3 users if the array contains + * more than 4 users. + * + * @param array $users Array of users + * @return array Trimmed array of user_ids + */ + public function trim_user_ary($users) + { + if (sizeof($users) > 4) + { + array_splice($users, 3); + } return $users; } -- cgit v1.2.1 From 43f454a6c6347827a01a1e31478a846ad05bc7f4 Mon Sep 17 00:00:00 2001 From: Cesar G Date: Thu, 21 Nov 2013 13:15:08 -0800 Subject: [ticket/11959] Use COMMA_SEPARATOR to join the user list. PHPBB3-11959 --- phpBB/phpbb/notification/type/post.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'phpBB') diff --git a/phpBB/phpbb/notification/type/post.php b/phpBB/phpbb/notification/type/post.php index 0d07df8adf..e9f9d48978 100644 --- a/phpBB/phpbb/notification/type/post.php +++ b/phpBB/phpbb/notification/type/post.php @@ -207,7 +207,7 @@ class post extends \phpbb\notification\type\base return $this->user->lang( $lang_key, - implode(', ', $usernames), + implode($this->user->lang['COMMA_SEPARATOR'], $usernames), censor_text($this->get_data('topic_title')), $extra_cnt ); -- cgit v1.2.1 From e3a28e5e2a451794b322be90e1aef9ad4aee256b Mon Sep 17 00:00:00 2001 From: Cesar G Date: Thu, 21 Nov 2013 13:18:28 -0800 Subject: [ticket/11959] Rename $extra_cnt to something more descriptive. PHPBB3-11959 --- phpBB/phpbb/notification/type/post.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'phpBB') diff --git a/phpBB/phpbb/notification/type/post.php b/phpBB/phpbb/notification/type/post.php index e9f9d48978..87bd4331b6 100644 --- a/phpBB/phpbb/notification/type/post.php +++ b/phpBB/phpbb/notification/type/post.php @@ -185,7 +185,7 @@ class post extends \phpbb\notification\type\base $responders_cnt = sizeof($responders); $responders = $this->trim_user_ary($responders); - $extra_cnt = $responders_cnt - sizeof($responders); + $trimmed_responders_cnt = $responders_cnt - sizeof($responders); foreach ($responders as $responder) { @@ -200,7 +200,7 @@ class post extends \phpbb\notification\type\base } $lang_key = $this->language_key; - if ($responders_cnt > 4) + if ($trimmed_responders_cnt) { $lang_key .= '_TRIMMED'; } @@ -209,7 +209,7 @@ class post extends \phpbb\notification\type\base $lang_key, implode($this->user->lang['COMMA_SEPARATOR'], $usernames), censor_text($this->get_data('topic_title')), - $extra_cnt + $trimmed_responders_cnt ); } -- cgit v1.2.1 From e9e667762b9c8762c77f5dcfbaeca00683a3b993 Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Thu, 21 Nov 2013 23:18:29 +0100 Subject: [ticket/12015] Fix english grammar PHPBB3-12015 --- phpBB/viewtopic.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'phpBB') diff --git a/phpBB/viewtopic.php b/phpBB/viewtopic.php index bfe131dbc3..2332b87e42 100644 --- a/phpBB/viewtopic.php +++ b/phpBB/viewtopic.php @@ -1715,7 +1715,7 @@ for ($i = 0, $end = sizeof($post_list); $i < $end; ++$i) * @var array user_poster_data Poster's data from user cache * @var array post_row Template block array of the post * @since 3.1-A1 - * @change 3.1.0-a2 Added vars start, i, end and attachments + * @change 3.1.0-a2 Added vars start, i, end, and attachments */ $vars = array('start', 'i', 'end', 'row', 'cp_row', 'attachments', 'user_poster_data', 'post_row'); extract($phpbb_dispatcher->trigger_event('core.viewtopic_modify_post_row', compact($vars))); -- cgit v1.2.1 From 263f213ffe9fa5999fff8274983daa24eec07f55 Mon Sep 17 00:00:00 2001 From: s9e Date: Thu, 21 Nov 2013 23:20:16 +0100 Subject: [ticket/12028] Replace L_COLON with literal colon Replace L_COLON with literal colon in JavaScript context. [ci skip] PHPBB3-12028 --- phpBB/styles/prosilver/template/posting_buttons.html | 2 +- phpBB/styles/subsilver2/template/posting_buttons.html | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'phpBB') diff --git a/phpBB/styles/prosilver/template/posting_buttons.html b/phpBB/styles/prosilver/template/posting_buttons.html index c5cdfad156..e8338c6c86 100644 --- a/phpBB/styles/prosilver/template/posting_buttons.html +++ b/phpBB/styles/prosilver/template/posting_buttons.html @@ -28,7 +28,7 @@ y: '{LA_BBCODE_Y_HELP}', d: '{LA_BBCODE_D_HELP}' - ,cb_{custom_tags.BBCODE_ID}{L_COLON} '{custom_tags.A_BBCODE_HELPLINE}' + ,cb_{custom_tags.BBCODE_ID}: '{custom_tags.A_BBCODE_HELPLINE}' } diff --git a/phpBB/styles/subsilver2/template/posting_buttons.html b/phpBB/styles/subsilver2/template/posting_buttons.html index 7a3a4ca73c..06de2c3169 100644 --- a/phpBB/styles/subsilver2/template/posting_buttons.html +++ b/phpBB/styles/subsilver2/template/posting_buttons.html @@ -27,7 +27,7 @@ d: '{LA_BBCODE_D_HELP}', tip: '{L_STYLES_TIP}' - ,cb_{custom_tags.BBCODE_ID}{L_COLON} '{custom_tags.A_BBCODE_HELPLINE}' + ,cb_{custom_tags.BBCODE_ID}: '{custom_tags.A_BBCODE_HELPLINE}' } -- cgit v1.2.1 From 2a154d0a1065b55bfc1cadcd2c460ddb9b95dd69 Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Thu, 21 Nov 2013 23:42:40 +0100 Subject: [ticket/12015] Fix variable name and event version PHPBB3-12015 --- phpBB/viewtopic.php | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) (limited to 'phpBB') diff --git a/phpBB/viewtopic.php b/phpBB/viewtopic.php index 358dd56de2..a182268a71 100644 --- a/phpBB/viewtopic.php +++ b/phpBB/viewtopic.php @@ -1689,12 +1689,14 @@ for ($i = 0, $end = sizeof($post_list); $i < $end; ++$i) $user_poster_data = $user_cache[$poster_id]; + $current_row_number = $i; + /** * Modify the posts template block * * @event core.viewtopic_modify_post_row * @var int start Start item of this page - * @var int i Number of the post on this page + * @var int current_row_number Number of the post on this page * @var int end Number of posts on this page * @var array row Array with original post and user data * @var array cp_row Custom profile field data of the poster @@ -1702,11 +1704,13 @@ for ($i = 0, $end = sizeof($post_list); $i < $end; ++$i) * @var array user_poster_data Poster's data from user cache * @var array post_row Template block array of the post * @since 3.1-A1 - * @change 3.1.0-a2 Added vars start, i, end, and attachments + * @change 3.1.0-a3 Added vars start, current_row_number, end, attachments */ - $vars = array('start', 'i', 'end', 'row', 'cp_row', 'attachments', 'user_poster_data', 'post_row'); + $vars = array('start', 'current_row_number', 'end', 'row', 'cp_row', 'attachments', 'user_poster_data', 'post_row'); extract($phpbb_dispatcher->trigger_event('core.viewtopic_modify_post_row', compact($vars))); + $i = $current_row_number; + if (isset($cp_row['row']) && sizeof($cp_row['row'])) { $post_row = array_merge($post_row, $cp_row['row']); @@ -1740,23 +1744,27 @@ for ($i = 0, $end = sizeof($post_list); $i < $end; ++$i) } } + $current_row_number = $i; + /** * Event after the post data has been assigned to the template * * @event core.viewtopic_post_row_after * @var int start Start item of this page - * @var int i Number of the post on this page + * @var int current_row_number Number of the post on this page * @var int end Number of posts on this page * @var array row Array with original post and user data * @var array cp_row Custom profile field data of the poster * @var array attachments List of attachments * @var array user_poster_data Poster's data from user cache * @var array post_row Template block array of the post - * @since 3.1.0-a2 + * @since 3.1.0-a3 */ - $vars = array('start', 'i', 'end', 'row', 'cp_row', 'attachments', 'user_poster_data', 'post_row'); + $vars = array('start', 'current_row_number', 'end', 'row', 'cp_row', 'attachments', 'user_poster_data', 'post_row'); extract($phpbb_dispatcher->trigger_event('core.viewtopic_post_row_after', compact($vars))); + $i = $current_row_number; + $prev_post_id = $row['post_id']; unset($rowset[$post_list[$i]]); -- cgit v1.2.1