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(-) 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 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(-) 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(-) 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(+) 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(-) 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(-) 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 e1fc008d15b14b383934c6a0291105377a852b53 Mon Sep 17 00:00:00 2001 From: Marc Alexander Date: Thu, 17 Oct 2013 14:20:59 +0200 Subject: [ticket/11930] Use \phpbb\path_helper for avatar URLs This will ensure that avatars still properly display on extension pages supplied via app.php. PHPBB3-11930 --- phpBB/config/avatars.yml | 4 ++++ phpBB/phpbb/avatar/driver/driver.php | 9 ++++++++- phpBB/phpbb/avatar/driver/local.php | 2 +- phpBB/phpbb/avatar/driver/upload.php | 2 +- 4 files changed, 14 insertions(+), 3 deletions(-) diff --git a/phpBB/config/avatars.yml b/phpBB/config/avatars.yml index 31ae1ecef9..5dae067642 100644 --- a/phpBB/config/avatars.yml +++ b/phpBB/config/avatars.yml @@ -6,6 +6,7 @@ services: - %core.root_path% - %core.php_ext% - @cache.driver + - @path_helper calls: - [set_name, [avatar.driver.gravatar]] tags: @@ -18,6 +19,7 @@ services: - %core.root_path% - %core.php_ext% - @cache.driver + - @path_helper calls: - [set_name, [avatar.driver.local]] tags: @@ -30,6 +32,7 @@ services: - %core.root_path% - %core.php_ext% - @cache.driver + - @path_helper calls: - [set_name, [avatar.driver.remote]] tags: @@ -42,6 +45,7 @@ services: - %core.root_path% - %core.php_ext% - @cache.driver + - @path_helper calls: - [set_name, [avatar.driver.upload]] tags: diff --git a/phpBB/phpbb/avatar/driver/driver.php b/phpBB/phpbb/avatar/driver/driver.php index 0c54951cbd..95585ab13f 100644 --- a/phpBB/phpbb/avatar/driver/driver.php +++ b/phpBB/phpbb/avatar/driver/driver.php @@ -53,6 +53,12 @@ abstract class driver implements \phpbb\avatar\driver\driver_interface */ protected $cache; + /** + * Path Helper + * @var \phpbb\path_helper + */ + protected $path_helper; + /** * Array of allowed avatar image extensions * Array is used for setting the allowed extensions in the fileupload class @@ -77,12 +83,13 @@ abstract class driver implements \phpbb\avatar\driver\driver_interface * @param string $php_ext PHP file extension * @param \phpbb\cache\driver\driver_interface $cache Cache driver */ - public function __construct(\phpbb\config\config $config, $phpbb_root_path, $php_ext, \phpbb\cache\driver\driver_interface $cache = null) + public function __construct(\phpbb\config\config $config, $phpbb_root_path, $php_ext, \phpbb\cache\driver\driver_interface $cache = null, \phpbb\path_helper $path_helper) { $this->config = $config; $this->phpbb_root_path = $phpbb_root_path; $this->php_ext = $php_ext; $this->cache = $cache; + $this->path_helper = $path_helper; } /** diff --git a/phpBB/phpbb/avatar/driver/local.php b/phpBB/phpbb/avatar/driver/local.php index d779099c46..0686ffe79a 100644 --- a/phpBB/phpbb/avatar/driver/local.php +++ b/phpBB/phpbb/avatar/driver/local.php @@ -29,7 +29,7 @@ class local extends \phpbb\avatar\driver\driver public function get_data($row) { return array( - 'src' => $this->phpbb_root_path . $this->config['avatar_gallery_path'] . '/' . $row['avatar'], + 'src' => $this->path_helper->get_web_root_path() . $this->config['avatar_gallery_path'] . '/' . $row['avatar'], 'width' => $row['avatar_width'], 'height' => $row['avatar_height'], ); diff --git a/phpBB/phpbb/avatar/driver/upload.php b/phpBB/phpbb/avatar/driver/upload.php index 377c9a0b04..bda872df7a 100644 --- a/phpBB/phpbb/avatar/driver/upload.php +++ b/phpBB/phpbb/avatar/driver/upload.php @@ -29,7 +29,7 @@ class upload extends \phpbb\avatar\driver\driver public function get_data($row, $ignore_config = false) { return array( - 'src' => $this->phpbb_root_path . 'download/file.' . $this->php_ext . '?avatar=' . $row['avatar'], + 'src' => $this->path_helper->get_web_root_path() . 'download/file.' . $this->php_ext . '?avatar=' . $row['avatar'], 'width' => $row['avatar_width'], 'height' => $row['avatar_height'], ); -- cgit v1.2.1 From 3f0ce78a25e433287e36bb92ff2c531e5a5b4743 Mon Sep 17 00:00:00 2001 From: Marc Alexander Date: Thu, 17 Oct 2013 20:49:10 +0200 Subject: [ticket/11930] Fix tests after adding phpbb\path_helper to avatar drivers PHPBB3-11930 --- tests/avatar/manager_test.php | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/tests/avatar/manager_test.php b/tests/avatar/manager_test.php index ba1fb04b33..ccb6a1085c 100644 --- a/tests/avatar/manager_test.php +++ b/tests/avatar/manager_test.php @@ -25,9 +25,17 @@ class phpbb_avatar_manager_test extends PHPUnit_Framework_TestCase $config = new \phpbb\config\config(array()); $request = $this->getMock('\phpbb\request\request'); $cache = $this->getMock('\phpbb\cache\driver\driver_interface'); + $path_helper = new \phpbb\path_helper( + new \phpbb\symfony_request( + new phpbb_mock_request() + ), + new \phpbb\filesystem(), + $this->phpbb_root_path, + $this->phpEx + ); // $this->avatar_foobar will be needed later on - $this->avatar_foobar = $this->getMock('\phpbb\avatar\driver\foobar', array('get_name'), array($config, $phpbb_root_path, $phpEx, $cache)); + $this->avatar_foobar = $this->getMock('\phpbb\avatar\driver\foobar', array('get_name'), array($config, $phpbb_root_path, $phpEx, $cache, $path_helper)); $this->avatar_foobar->expects($this->any()) ->method('get_name') ->will($this->returnValue('avatar.driver.foobar')); @@ -40,7 +48,7 @@ class phpbb_avatar_manager_test extends PHPUnit_Framework_TestCase foreach ($this->avatar_drivers() as $driver) { - $cur_avatar = $this->getMock('\phpbb\avatar\driver\\' . $driver, array('get_name'), array($config, $phpbb_root_path, $phpEx, $cache)); + $cur_avatar = $this->getMock('\phpbb\avatar\driver\\' . $driver, array('get_name'), array($config, $phpbb_root_path, $phpEx, $cache, $path_helper)); $cur_avatar->expects($this->any()) ->method('get_name') ->will($this->returnValue('avatar.driver.' . $driver)); -- cgit v1.2.1 From 3cc2e619d2a3293aebfdef06f6298a71648112b1 Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Sat, 19 Oct 2013 12:11:09 +0200 Subject: [ticket/11948] Add second routing file to tests PHPBB3-11948 --- tests/controller/controller_test.php | 2 +- tests/controller/ext/foo/config/routing_2.yml | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) create mode 100644 tests/controller/ext/foo/config/routing_2.yml diff --git a/tests/controller/controller_test.php b/tests/controller/controller_test.php index 10fced05a2..0e7cac05ec 100644 --- a/tests/controller/controller_test.php +++ b/tests/controller/controller_test.php @@ -37,7 +37,7 @@ class phpbb_controller_controller_test extends phpbb_test_case ->find('./tests/controller/'); // This will need to be updated if any new routes are defined - $this->assertEquals(2, sizeof($routes)); + $this->assertEquals(3, sizeof($routes)); } public function test_controller_resolver() diff --git a/tests/controller/ext/foo/config/routing_2.yml b/tests/controller/ext/foo/config/routing_2.yml new file mode 100644 index 0000000000..35fff27037 --- /dev/null +++ b/tests/controller/ext/foo/config/routing_2.yml @@ -0,0 +1,3 @@ +controller2: + pattern: /bar + defaults: { _controller: foo.controller:handle } -- cgit v1.2.1 From d45582d32afede64c6a9fa18a76eff6a17544043 Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Sat, 19 Oct 2013 12:12:14 +0200 Subject: [ticket/11948] Allow multiple routing files for extensions PHPBB3-11948 --- phpBB/phpbb/controller/provider.php | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/phpBB/phpbb/controller/provider.php b/phpBB/phpbb/controller/provider.php index 3aad08e3aa..683253fdf8 100644 --- a/phpBB/phpbb/controller/provider.php +++ b/phpBB/phpbb/controller/provider.php @@ -31,17 +31,17 @@ class provider * YAML file(s) containing route information * @var array */ - protected $routing_paths; + protected $routing_files; /** * Construct method * - * @param array() $routing_paths Array of strings containing paths + * @param array() $routing_files Array of strings containing paths * to YAML files holding route information */ - public function __construct($routing_paths = array()) + public function __construct($routing_files = array()) { - $this->routing_paths = $routing_paths; + $this->routing_files = $routing_files; } /** @@ -54,12 +54,12 @@ class provider { // We hardcode the path to the core config directory // because the finder cannot find it - $this->routing_paths = array_merge(array('config'), array_map('dirname', array_keys($finder + $this->routing_files = array_merge(array('config/routing.yml'), array_keys($finder ->directory('config') ->prefix('routing') - ->suffix('yml') + ->suffix('.yml') ->find() - ))); + )); return $this; } @@ -73,10 +73,14 @@ class provider public function find($base_path = '') { $routes = new RouteCollection; - foreach ($this->routing_paths as $path) + foreach ($this->routing_files as $file_path) { + $path_info = explode('/', $file_path); + $file_name = array_pop($path_info); + $path = implode('/', $path_info) . '/'; + $loader = new YamlFileLoader(new FileLocator($base_path . $path)); - $routes->addCollection($loader->load('routing.yml')); + $routes->addCollection($loader->load($file_name)); } return $routes; -- cgit v1.2.1 From 6de519431db33e22fee845c36179f1c65ad02110 Mon Sep 17 00:00:00 2001 From: Andreas Fischer Date: Sat, 19 Oct 2013 23:05:27 +0200 Subject: [ticket/11951] Add MariaDB to supported DBMSes in requirement section. PHPBB3-11951 --- phpBB/docs/INSTALL.html | 1 + 1 file changed, 1 insertion(+) diff --git a/phpBB/docs/INSTALL.html b/phpBB/docs/INSTALL.html index 3fa0597fc8..74c017ecff 100644 --- a/phpBB/docs/INSTALL.html +++ b/phpBB/docs/INSTALL.html @@ -139,6 +139,7 @@
  • A SQL database system, one of:
    • MySQL 3.23 or above (MySQLi supported)
    • +
    • MariaDB 5.1 or above
    • PostgreSQL 7.3+
    • SQLite 2.8.2+ (SQLite 3 is not supported)
    • Firebird 2.1+
    • -- cgit v1.2.1 From 7df35a288a639102fa0f908f052d3eb06a1728b6 Mon Sep 17 00:00:00 2001 From: Andreas Fischer Date: Sat, 19 Oct 2013 23:08:04 +0200 Subject: [ticket/11951] Add MariaDB to platforms we test on. PHPBB3-11951 --- phpBB/docs/README.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/phpBB/docs/README.html b/phpBB/docs/README.html index 89f573de04..d54c58eca6 100644 --- a/phpBB/docs/README.html +++ b/phpBB/docs/README.html @@ -329,7 +329,7 @@

      Please remember that running any application on a development (unstable, e.g. a beta release) version of PHP can lead to strange/unexpected results which may appear to be bugs in the application. Therefore, we recommend you upgrade to the newest stable version of PHP before running phpBB3. If you are running a development version of PHP please check any bugs you find on a system running a stable release before submitting.

      -

      This board has been developed and tested under Linux and Windows (amongst others) running Apache using MySQL 3.23, 4.x, 5.x, MSSQL Server 2000, PostgreSQL 7.x, Oracle 8, SQLite 2 and Firebird. Versions of PHP used range from 4.3.3 to 5.4.x without problem.

      +

      This board has been developed and tested under Linux and Windows (amongst others) running Apache using MySQL 3.23, 4.x, 5.x, MariaDB 5.x, MSSQL Server 2000, PostgreSQL 7.x, Oracle 8, SQLite 2 and Firebird. Versions of PHP used range from 4.3.3 to 5.4.x without problem.

      7.i. Notice on PHP security issues

      -- cgit v1.2.1 From bd86dea16c2f2d0d8ac6677777d612480186764a Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Sun, 20 Oct 2013 00:00:39 +0200 Subject: [ticket/11948] Use basename and dirname PHPBB3-11948 --- phpBB/phpbb/controller/provider.php | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/phpBB/phpbb/controller/provider.php b/phpBB/phpbb/controller/provider.php index 683253fdf8..7ea0c973fe 100644 --- a/phpBB/phpbb/controller/provider.php +++ b/phpBB/phpbb/controller/provider.php @@ -75,12 +75,8 @@ class provider $routes = new RouteCollection; foreach ($this->routing_files as $file_path) { - $path_info = explode('/', $file_path); - $file_name = array_pop($path_info); - $path = implode('/', $path_info) . '/'; - - $loader = new YamlFileLoader(new FileLocator($base_path . $path)); - $routes->addCollection($loader->load($file_name)); + $loader = new YamlFileLoader(new FileLocator(dirname($base_path . $file_path))); + $routes->addCollection($loader->load(basename($file_path))); } return $routes; -- cgit v1.2.1 From d7bf50bc8073dbfe52c686066fcdd156550ab7f0 Mon Sep 17 00:00:00 2001 From: Marc Alexander Date: Mon, 21 Oct 2013 10:20:12 +0200 Subject: [ticket/11930] Move path_helper in front of optional cache argument Optional method arguments should be after any mandatory ones. PHPBB3-11930 --- phpBB/config/avatars.yml | 8 ++++---- phpBB/phpbb/avatar/driver/driver.php | 2 +- tests/avatar/manager_test.php | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/phpBB/config/avatars.yml b/phpBB/config/avatars.yml index 5dae067642..d22a5db2ae 100644 --- a/phpBB/config/avatars.yml +++ b/phpBB/config/avatars.yml @@ -5,8 +5,8 @@ services: - @config - %core.root_path% - %core.php_ext% - - @cache.driver - @path_helper + - @cache.driver calls: - [set_name, [avatar.driver.gravatar]] tags: @@ -18,8 +18,8 @@ services: - @config - %core.root_path% - %core.php_ext% - - @cache.driver - @path_helper + - @cache.driver calls: - [set_name, [avatar.driver.local]] tags: @@ -31,8 +31,8 @@ services: - @config - %core.root_path% - %core.php_ext% - - @cache.driver - @path_helper + - @cache.driver calls: - [set_name, [avatar.driver.remote]] tags: @@ -44,8 +44,8 @@ services: - @config - %core.root_path% - %core.php_ext% - - @cache.driver - @path_helper + - @cache.driver calls: - [set_name, [avatar.driver.upload]] tags: diff --git a/phpBB/phpbb/avatar/driver/driver.php b/phpBB/phpbb/avatar/driver/driver.php index 95585ab13f..d682d7d114 100644 --- a/phpBB/phpbb/avatar/driver/driver.php +++ b/phpBB/phpbb/avatar/driver/driver.php @@ -83,7 +83,7 @@ abstract class driver implements \phpbb\avatar\driver\driver_interface * @param string $php_ext PHP file extension * @param \phpbb\cache\driver\driver_interface $cache Cache driver */ - public function __construct(\phpbb\config\config $config, $phpbb_root_path, $php_ext, \phpbb\cache\driver\driver_interface $cache = null, \phpbb\path_helper $path_helper) + public function __construct(\phpbb\config\config $config, $phpbb_root_path, $php_ext, \phpbb\path_helper $path_helper, \phpbb\cache\driver\driver_interface $cache = null) { $this->config = $config; $this->phpbb_root_path = $phpbb_root_path; diff --git a/tests/avatar/manager_test.php b/tests/avatar/manager_test.php index ccb6a1085c..4afa594beb 100644 --- a/tests/avatar/manager_test.php +++ b/tests/avatar/manager_test.php @@ -35,7 +35,7 @@ class phpbb_avatar_manager_test extends PHPUnit_Framework_TestCase ); // $this->avatar_foobar will be needed later on - $this->avatar_foobar = $this->getMock('\phpbb\avatar\driver\foobar', array('get_name'), array($config, $phpbb_root_path, $phpEx, $cache, $path_helper)); + $this->avatar_foobar = $this->getMock('\phpbb\avatar\driver\foobar', array('get_name'), array($config, $phpbb_root_path, $phpEx, $path_helper, $cache)); $this->avatar_foobar->expects($this->any()) ->method('get_name') ->will($this->returnValue('avatar.driver.foobar')); @@ -48,7 +48,7 @@ class phpbb_avatar_manager_test extends PHPUnit_Framework_TestCase foreach ($this->avatar_drivers() as $driver) { - $cur_avatar = $this->getMock('\phpbb\avatar\driver\\' . $driver, array('get_name'), array($config, $phpbb_root_path, $phpEx, $cache, $path_helper)); + $cur_avatar = $this->getMock('\phpbb\avatar\driver\\' . $driver, array('get_name'), array($config, $phpbb_root_path, $phpEx, $path_helper, $cache)); $cur_avatar->expects($this->any()) ->method('get_name') ->will($this->returnValue('avatar.driver.' . $driver)); -- cgit v1.2.1 From acbb1ed3ee4c01f4379dfdefbec40f59e427c95f Mon Sep 17 00:00:00 2001 From: Marc Alexander Date: Mon, 21 Oct 2013 10:47:40 +0200 Subject: [ticket/11930] Modify order of properties to fit constructor method PHPBB3-11930 --- phpBB/phpbb/avatar/driver/driver.php | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/phpBB/phpbb/avatar/driver/driver.php b/phpBB/phpbb/avatar/driver/driver.php index d682d7d114..68c30d36a5 100644 --- a/phpBB/phpbb/avatar/driver/driver.php +++ b/phpBB/phpbb/avatar/driver/driver.php @@ -47,18 +47,18 @@ abstract class driver implements \phpbb\avatar\driver\driver_interface */ protected $php_ext; - /** - * Cache driver - * @var \phpbb\cache\driver\driver_interface - */ - protected $cache; - /** * Path Helper * @var \phpbb\path_helper */ protected $path_helper; + /** + * Cache driver + * @var \phpbb\cache\driver\driver_interface + */ + protected $cache; + /** * Array of allowed avatar image extensions * Array is used for setting the allowed extensions in the fileupload class @@ -88,8 +88,8 @@ abstract class driver implements \phpbb\avatar\driver\driver_interface $this->config = $config; $this->phpbb_root_path = $phpbb_root_path; $this->php_ext = $php_ext; - $this->cache = $cache; $this->path_helper = $path_helper; + $this->cache = $cache; } /** -- cgit v1.2.1 From a80d5c93e354aa1e4dff548a89129ccd7f5488ee Mon Sep 17 00:00:00 2001 From: Marc Alexander Date: Mon, 21 Oct 2013 11:02:59 +0200 Subject: [ticket/11930] Update docblock of avatar driver constructor PHPBB3-11930 --- phpBB/phpbb/avatar/driver/driver.php | 1 + 1 file changed, 1 insertion(+) diff --git a/phpBB/phpbb/avatar/driver/driver.php b/phpBB/phpbb/avatar/driver/driver.php index 68c30d36a5..206df86543 100644 --- a/phpBB/phpbb/avatar/driver/driver.php +++ b/phpBB/phpbb/avatar/driver/driver.php @@ -81,6 +81,7 @@ abstract class driver implements \phpbb\avatar\driver\driver_interface * @param \phpbb\request\request $request Request object * @param string $phpbb_root_path Path to the phpBB root * @param string $php_ext PHP file extension + * @param \phpbb_path_helper $path_helper phpBB path helper * @param \phpbb\cache\driver\driver_interface $cache Cache driver */ public function __construct(\phpbb\config\config $config, $phpbb_root_path, $php_ext, \phpbb\path_helper $path_helper, \phpbb\cache\driver\driver_interface $cache = null) -- cgit v1.2.1 From 51561ed538450d0e3d8392f3073004751e0b03f1 Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Mon, 21 Oct 2013 21:52:48 +0200 Subject: [ticket/11948] Allow resource importing for routing PHPBB3-11948 --- phpBB/includes/functions_url_matcher.php | 8 ++++---- phpBB/phpbb/controller/provider.php | 7 +++---- tests/controller/controller_test.php | 2 +- tests/controller/ext/foo/config/routing.yml | 4 ++++ 4 files changed, 12 insertions(+), 9 deletions(-) diff --git a/phpBB/includes/functions_url_matcher.php b/phpBB/includes/functions_url_matcher.php index fdde302e3b..c5d6815119 100644 --- a/phpBB/includes/functions_url_matcher.php +++ b/phpBB/includes/functions_url_matcher.php @@ -32,7 +32,7 @@ function phpbb_get_url_matcher(\phpbb\extension\finder $finder, RequestContext $ { if (defined('DEBUG')) { - return phpbb_create_url_matcher($finder, $context); + return phpbb_create_url_matcher($finder, $context, $root_path); } if (!phpbb_url_matcher_dumped($root_path, $php_ext)) @@ -54,7 +54,7 @@ function phpbb_get_url_matcher(\phpbb\extension\finder $finder, RequestContext $ function phpbb_create_dumped_url_matcher(\phpbb\extension\finder $finder, $root_path, $php_ext) { $provider = new \phpbb\controller\provider(); - $routes = $provider->import_paths_from_finder($finder)->find(); + $routes = $provider->import_paths_from_finder($finder)->find($root_path); $dumper = new PhpMatcherDumper($routes); $cached_url_matcher_dump = $dumper->dump(array( 'class' => 'phpbb_url_matcher', @@ -70,10 +70,10 @@ function phpbb_create_dumped_url_matcher(\phpbb\extension\finder $finder, $root_ * @param RequestContext $context Symfony RequestContext object * @return UrlMatcher */ -function phpbb_create_url_matcher(\phpbb\extension\finder $finder, RequestContext $context) +function phpbb_create_url_matcher(\phpbb\extension\finder $finder, RequestContext $context, $root_path) { $provider = new \phpbb\controller\provider(); - $routes = $provider->import_paths_from_finder($finder)->find(); + $routes = $provider->import_paths_from_finder($finder)->find($root_path); return new UrlMatcher($routes, $context); } diff --git a/phpBB/phpbb/controller/provider.php b/phpBB/phpbb/controller/provider.php index 7ea0c973fe..048ca72084 100644 --- a/phpBB/phpbb/controller/provider.php +++ b/phpBB/phpbb/controller/provider.php @@ -56,8 +56,7 @@ class provider // because the finder cannot find it $this->routing_files = array_merge(array('config/routing.yml'), array_keys($finder ->directory('config') - ->prefix('routing') - ->suffix('.yml') + ->suffix('routing.yml') ->find() )); @@ -75,8 +74,8 @@ class provider $routes = new RouteCollection; foreach ($this->routing_files as $file_path) { - $loader = new YamlFileLoader(new FileLocator(dirname($base_path . $file_path))); - $routes->addCollection($loader->load(basename($file_path))); + $loader = new YamlFileLoader(new FileLocator($base_path)); + $routes->addCollection($loader->load($file_path)); } return $routes; diff --git a/tests/controller/controller_test.php b/tests/controller/controller_test.php index 0e7cac05ec..c71fc92170 100644 --- a/tests/controller/controller_test.php +++ b/tests/controller/controller_test.php @@ -34,7 +34,7 @@ class phpbb_controller_controller_test extends phpbb_test_case $provider = new \phpbb\controller\provider; $routes = $provider ->import_paths_from_finder($this->extension_manager->get_finder()) - ->find('./tests/controller/'); + ->find(__DIR__); // This will need to be updated if any new routes are defined $this->assertEquals(3, sizeof($routes)); diff --git a/tests/controller/ext/foo/config/routing.yml b/tests/controller/ext/foo/config/routing.yml index 4799fec37d..6cc275d96d 100644 --- a/tests/controller/ext/foo/config/routing.yml +++ b/tests/controller/ext/foo/config/routing.yml @@ -1,3 +1,7 @@ controller1: pattern: /foo defaults: { _controller: foo.controller:handle } + +include_controller2: + resource: "routing_2.yml" + prefix: /foo -- cgit v1.2.1 From 96317b2c4518976c683dd67f38a8a6f8faabdf15 Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Mon, 21 Oct 2013 22:18:03 +0200 Subject: [ticket/11948] Check actual result of routes PHPBB3-11948 --- tests/controller/controller_test.php | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/tests/controller/controller_test.php b/tests/controller/controller_test.php index c71fc92170..588adbcfb1 100644 --- a/tests/controller/controller_test.php +++ b/tests/controller/controller_test.php @@ -37,7 +37,14 @@ class phpbb_controller_controller_test extends phpbb_test_case ->find(__DIR__); // This will need to be updated if any new routes are defined - $this->assertEquals(3, sizeof($routes)); + $this->assertInstanceOf('Symfony\Component\Routing\Route', $routes->get('core_controller')); + $this->assertEquals('/core_foo', $routes->get('core_controller')->getPath()); + + $this->assertInstanceOf('Symfony\Component\Routing\Route', $routes->get('controller1')); + $this->assertEquals('/foo', $routes->get('controller1')->getPath()); + + $this->assertInstanceOf('Symfony\Component\Routing\Route', $routes->get('controller2')); + $this->assertEquals('/foo/bar', $routes->get('controller2')->getPath()); } public function test_controller_resolver() -- cgit v1.2.1 From c810f1934ec1a167f934cf2c1d43f12c851f2fd6 Mon Sep 17 00:00:00 2001 From: Marc Alexander Date: Wed, 23 Oct 2013 11:49:32 +0200 Subject: [ticket/11916] Remove files from hidden attach list after deletion The hidden attachment_data list needs to be updated if a file got removed. This was not done until now and caused a general error after submitting a post if a file was removed after uploading it. PHPBB3-11916 --- phpBB/assets/javascript/plupload.js | 63 +++++++++++++++++++++++++------------ 1 file changed, 43 insertions(+), 20 deletions(-) diff --git a/phpBB/assets/javascript/plupload.js b/phpBB/assets/javascript/plupload.js index 32ff178896..1befb88eb6 100644 --- a/phpBB/assets/javascript/plupload.js +++ b/phpBB/assets/javascript/plupload.js @@ -62,6 +62,47 @@ function phpbb_plupload_clear_params(obj) { } } +/** + * Update hidden attachment inputs in posting form + * Pre-existing hidden inputs will be removed by comparing the old attachment + * data (old_data) to the new attachment data (data) that has been sent back + * by plupload. + * + * @param object form Posting form + * @param object data Current attachment_data + * @param object old_date Previous attachment_data (before submission) + * + * @return void + */ +phpbb.update_hidden_attachment_inputs = function(form, data, old_data) { + // Update already existing hidden inputs + for (var i = 0; i < form.length; i++) { + if (data.hasOwnProperty(form[i].name)) { + form[i].value = data[form[i].name]; + delete data[form[i].name]; + } else if (typeof old_data !== 'undefined' && old_data.hasOwnProperty(form[i].name)) { + var inputRegex = /\b^[a-z_]+[+[0-9]+]/; + var inputName = inputRegex.exec(form[i].name); + if (typeof inputName !== 'undefined' && inputName[0] !== '') { + $("input[type='hidden'][name^='" + inputName[0] + "']").remove(); + } + } + } + + // Append new inputs + for (var key in data) { + if (!data.hasOwnProperty(key)) { + continue; + } + + var input = $('') + .attr('type', 'hidden') + .attr('name', key) + .attr('value', data[key]); + $(form).append(input); + } +} + jQuery(function($) { $(phpbb.plupload.config.element_hook).pluploadQueue(phpbb.plupload.config); var uploader = $(phpbb.plupload.config.element_hook).pluploadQueue(); @@ -208,26 +249,7 @@ jQuery(function($) { var form = $(phpbb.plupload.config.form_hook)[0]; var data = phpbb_plupload_attachment_data_serialize(); - // Update already existing hidden inputs - for (var i = 0; i < form.length; i++) { - if (data.hasOwnProperty(form[i].name)) { - form[i].value = data[form[i].name]; - delete data[form[i].name]; - } - } - - // Append new inputs - for (var key in data) { - if (!data.hasOwnProperty(key)) { - continue; - } - - var input = $('') - .attr('type', 'hidden') - .attr('name', key) - .attr('value', data[key]); - $(form).append(input); - } + phpbb.update_hidden_attachment_inputs(form, data); files.forEach(function(file) { if (file.status !== plupload.DONE) { @@ -257,6 +279,7 @@ jQuery(function($) { var done = function(response) { up.removeFile(file); plupload.attachment_data = response; + phpbb.update_hidden_attachment_inputs(form, phpbb_plupload_attachment_data_serialize(), data); phpbb_plupload_clear_params(up.settings.multipart_params); up.settings.multipart_params = $.extend( up.settings.multipart_params, -- cgit v1.2.1 From cb21c33a14937a87551a0b39c2f814dca187a134 Mon Sep 17 00:00:00 2001 From: Vjacheslav Trushkin Date: Fri, 27 Sep 2013 16:56:06 +0300 Subject: [ticket/11872] Template syntax typos in oauth templates PHPBB3-11872 --- phpBB/styles/prosilver/template/ucp_auth_link_oauth.html | 2 +- phpBB/styles/subsilver2/template/ucp_auth_link_oauth.html | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/phpBB/styles/prosilver/template/ucp_auth_link_oauth.html b/phpBB/styles/prosilver/template/ucp_auth_link_oauth.html index a3e27328cd..18316613b0 100644 --- a/phpBB/styles/prosilver/template/ucp_auth_link_oauth.html +++ b/phpBB/styles/prosilver/template/ucp_auth_link_oauth.html @@ -20,7 +20,7 @@
       
      - + {oauth.HIDDEN_FIELDS} {S_HIDDEN_FIELDS} diff --git a/phpBB/styles/subsilver2/template/ucp_auth_link_oauth.html b/phpBB/styles/subsilver2/template/ucp_auth_link_oauth.html index 56a4c89125..80564d207b 100644 --- a/phpBB/styles/subsilver2/template/ucp_auth_link_oauth.html +++ b/phpBB/styles/subsilver2/template/ucp_auth_link_oauth.html @@ -23,7 +23,7 @@ - + {oauth.HIDDEN_FIELDS} {S_HIDDEN_FIELDS} -- cgit v1.2.1 From 7ab90c6c828a512662a323f1401f39766d3d6f8d Mon Sep 17 00:00:00 2001 From: Cesar G Date: Wed, 23 Oct 2013 22:32:37 -0700 Subject: [ticket/11138] Increase AJAX timeout period to 15 seconds. PHPBB3-11138 --- phpBB/assets/javascript/core.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/phpBB/assets/javascript/core.js b/phpBB/assets/javascript/core.js index ab0891e70c..7bd3b85d7d 100644 --- a/phpBB/assets/javascript/core.js +++ b/phpBB/assets/javascript/core.js @@ -27,12 +27,12 @@ phpbb.loadingAlert = function() { } else { loadingAlert.show(); dark.fadeIn(phpbb.alertTime, function() { - // Wait five seconds and display an error if nothing has been returned by then. + // Wait fifteen seconds and display an error if nothing has been returned by then. phpbbAlertTimer = setTimeout(function() { if (loadingAlert.is(':visible')) { phpbb.alert($('#phpbb_alert').attr('data-l-err'), $('#phpbb_alert').attr('data-l-timeout-processing-req')); } - }, 5000); + }, 15000); }); } -- cgit v1.2.1 From 963dbed106bf4662fe5317baf1c56e901a3d7ba6 Mon Sep 17 00:00:00 2001 From: Cesar G Date: Wed, 23 Oct 2013 22:47:44 -0700 Subject: [ticket/11138] Do not use AJAX for ACP resync features. PHPBB3-11138 --- phpBB/adm/style/acp_main.html | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/phpBB/adm/style/acp_main.html b/phpBB/adm/style/acp_main.html index b644862ce1..d9e7fb7eeb 100644 --- a/phpBB/adm/style/acp_main.html +++ b/phpBB/adm/style/acp_main.html @@ -168,21 +168,21 @@ -
      +

      {L_RESYNC_STATS_EXPLAIN}
      -
      +

      {L_RESYNC_POSTCOUNTS_EXPLAIN}
      -
      +

      {L_RESYNC_POST_MARKING_EXPLAIN}
      -- cgit v1.2.1 From 8c5101a7297ebec1c9cc3ca849f604e5b39ccd9b Mon Sep 17 00:00:00 2001 From: Vjacheslav Trushkin Date: Mon, 21 Oct 2013 13:25:27 +0300 Subject: [ticket/11956] Responsive AJAX alerts PHPBB3-11956 --- phpBB/styles/prosilver/theme/common.css | 13 +++++++++++-- phpBB/styles/prosilver/theme/responsive.css | 5 +++++ 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/phpBB/styles/prosilver/theme/common.css b/phpBB/styles/prosilver/theme/common.css index 2c61ecfdea..19077bbc86 100644 --- a/phpBB/styles/prosilver/theme/common.css +++ b/phpBB/styles/prosilver/theme/common.css @@ -670,13 +670,22 @@ li.pagination ul { position: fixed; display: none; top: 150px; - left: 25%; - width: 50%; + left: 0; + right: 0; + max-width: 640px; + margin: 0 auto; z-index: 50; padding: 25px; padding: 0 25px 20px 25px; } +@media only screen and (max-height: 500px), only screen and (max-device-width: 500px) +{ + .phpbb_alert { + top: 25px; + } +} + .phpbb_alert .alert_close { display: block; float: right; diff --git a/phpBB/styles/prosilver/theme/responsive.css b/phpBB/styles/prosilver/theme/responsive.css index a9d7b1abc7..c15d9bee4e 100644 --- a/phpBB/styles/prosilver/theme/responsive.css +++ b/phpBB/styles/prosilver/theme/responsive.css @@ -482,6 +482,11 @@ fieldset.display-actions { white-space: normal; } +.phpbb_alert { + max-width: none; + margin: 0 25px; +} + @media only screen and (max-width: 500px), only screen and (max-device-width: 500px) { p.responsive-center { -- cgit v1.2.1 From b196c9e8fff17703a37ed4b8ceea8b0f7a3eb625 Mon Sep 17 00:00:00 2001 From: Vjacheslav Trushkin Date: Mon, 21 Oct 2013 13:26:48 +0300 Subject: [ticket/11956] Add assets_version to responsive.css link PHPBB3-11556 --- phpBB/styles/prosilver/template/overall_header.html | 2 +- phpBB/styles/prosilver/template/simple_header.html | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/phpBB/styles/prosilver/template/overall_header.html b/phpBB/styles/prosilver/template/overall_header.html index 6ab0b3d553..e885503d90 100644 --- a/phpBB/styles/prosilver/template/overall_header.html +++ b/phpBB/styles/prosilver/template/overall_header.html @@ -29,7 +29,7 @@ - + diff --git a/phpBB/styles/prosilver/template/simple_header.html b/phpBB/styles/prosilver/template/simple_header.html index e922893588..53c86689e0 100644 --- a/phpBB/styles/prosilver/template/simple_header.html +++ b/phpBB/styles/prosilver/template/simple_header.html @@ -12,7 +12,7 @@ - + -- cgit v1.2.1 From e660c1a5543c96d299b477731dedf3d144b685a0 Mon Sep 17 00:00:00 2001 From: Vjacheslav Trushkin Date: Mon, 21 Oct 2013 15:17:48 +0300 Subject: [ticket/11956] Fix member list page PHPBB3-11956 --- phpBB/styles/prosilver/template/forum_fn.js | 6 +++++- phpBB/styles/prosilver/theme/responsive.css | 4 ++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/phpBB/styles/prosilver/template/forum_fn.js b/phpBB/styles/prosilver/template/forum_fn.js index a2758de9dc..b71ff45a27 100644 --- a/phpBB/styles/prosilver/template/forum_fn.js +++ b/phpBB/styles/prosilver/template/forum_fn.js @@ -546,7 +546,7 @@ function insert_single_user(formId, user) i, headersLength; // Find each header - th.each(function() { + th.each(function(column) { var cell = $(this), colspan = parseInt(cell.attr('colspan')), dfn = cell.attr('data-dfn'), @@ -558,6 +558,10 @@ function insert_single_user(formId, user) headers.push(text); } totalHeaders ++; + + if (dfn && !column) { + $this.addClass('show-header'); + } }); headersLength = headers.length; diff --git a/phpBB/styles/prosilver/theme/responsive.css b/phpBB/styles/prosilver/theme/responsive.css index c15d9bee4e..8578e50d1c 100644 --- a/phpBB/styles/prosilver/theme/responsive.css +++ b/phpBB/styles/prosilver/theme/responsive.css @@ -262,6 +262,10 @@ table.responsive.show-header thead, table.responsive.show-header th:first-child text-align: left !important; } +table.responsive.show-header th:first-child span.rank-img { + display: none; +} + table.responsive tr { margin: 2px 0; } -- cgit v1.2.1 From af5e25cdf59f5c3e64d18810f1972dfb89be5506 Mon Sep 17 00:00:00 2001 From: Vjacheslav Trushkin Date: Mon, 21 Oct 2013 15:38:58 +0300 Subject: [ticket/11956] Scale down large avatars Prevent large avatars from breaking layout on any resolution. PHPBB3-11956 --- phpBB/styles/prosilver/theme/content.css | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/phpBB/styles/prosilver/theme/content.css b/phpBB/styles/prosilver/theme/content.css index 7d91d331d6..ad6f27665d 100644 --- a/phpBB/styles/prosilver/theme/content.css +++ b/phpBB/styles/prosilver/theme/content.css @@ -711,6 +711,11 @@ fieldset.polls dd div { margin-bottom: 3px; } +.postprofile .avatar img { + max-width: 90%; + height: auto !important; +} + .online { background-image: none; background-position: 100% 0; -- cgit v1.2.1 From 4188d178f340f5784dfc762d64db29f38eb814f7 Mon Sep 17 00:00:00 2001 From: Vjacheslav Trushkin Date: Mon, 21 Oct 2013 15:42:35 +0300 Subject: [ticket/11956] Scale down online image for HD display Scale down online image for HD displays PHPBB3-11956 --- phpBB/styles/prosilver/theme/responsive.css | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/phpBB/styles/prosilver/theme/responsive.css b/phpBB/styles/prosilver/theme/responsive.css index 8578e50d1c..aadb98e188 100644 --- a/phpBB/styles/prosilver/theme/responsive.css +++ b/phpBB/styles/prosilver/theme/responsive.css @@ -442,6 +442,14 @@ fieldset.polls dd.resultbar, fieldset.polls dd.poll_option_percent { max-height: 32px; } +@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi), (min-resolution: 1.5dppx) +{ + /* Scale online image for HD displays */ + .online { + background-size: 40px; + } +} + /* Misc stuff ----------------------------------------*/ h2 { -- cgit v1.2.1 From 08811daa74dec097c5194f14dca2b30a6e11a631 Mon Sep 17 00:00:00 2001 From: Vjacheslav Trushkin Date: Mon, 21 Oct 2013 16:53:57 +0300 Subject: [ticket/11956] Hide author on mobile devices Hide duplicate author name in posts on mobile devices PHPBB3-11956 --- phpBB/styles/prosilver/template/viewtopic_body.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/phpBB/styles/prosilver/template/viewtopic_body.html b/phpBB/styles/prosilver/template/viewtopic_body.html index 82c380354b..763d7edb16 100644 --- a/phpBB/styles/prosilver/template/viewtopic_body.html +++ b/phpBB/styles/prosilver/template/viewtopic_body.html @@ -193,7 +193,7 @@ -

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

      +

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

      -- cgit v1.2.1 From 3016e5227b4256b9930e5515dbe849fbdc03e377 Mon Sep 17 00:00:00 2001 From: Vjacheslav Trushkin Date: Mon, 21 Oct 2013 17:15:32 +0300 Subject: [ticket/11956] Fix responsive jumpbox PHPBB3-11956 --- phpBB/styles/prosilver/theme/forms.css | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/phpBB/styles/prosilver/theme/forms.css b/phpBB/styles/prosilver/theme/forms.css index adb8c5e521..f128450955 100644 --- a/phpBB/styles/prosilver/theme/forms.css +++ b/phpBB/styles/prosilver/theme/forms.css @@ -206,7 +206,11 @@ fieldset.forum-selection2 { fieldset.jumpbox { text-align: right; margin-top: 15px; - height: 2.5em; + min-height: 2.5em; +} + +fieldset.jumpbox select { + max-width: 50%; } fieldset.quickmod { -- cgit v1.2.1 From 9833354578d9f2dfb9f1438718d84505880438e2 Mon Sep 17 00:00:00 2001 From: Vjacheslav Trushkin Date: Mon, 21 Oct 2013 17:19:37 +0300 Subject: [ticket/11956] Fix topic actions layout Fix topic actions layout on mobile devices PHPBB3-11956 --- phpBB/styles/prosilver/theme/responsive.css | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/phpBB/styles/prosilver/theme/responsive.css b/phpBB/styles/prosilver/theme/responsive.css index aadb98e188..fc24cd7ed2 100644 --- a/phpBB/styles/prosilver/theme/responsive.css +++ b/phpBB/styles/prosilver/theme/responsive.css @@ -480,6 +480,12 @@ fieldset.quickmod { text-align: center; } +fieldset.display-options label { + display: block; + clear: both; + margin-bottom: 5px; +} + dl.mini dd.pm-legend { float: left; min-width: 200px; -- cgit v1.2.1 From 9b789662119c2893385801f5c746bedbed52c882 Mon Sep 17 00:00:00 2001 From: Vjacheslav Trushkin Date: Mon, 21 Oct 2013 21:22:42 +0300 Subject: [ticket/11956] Fix errors in drafts.html PHPBB3-11956 --- phpBB/styles/prosilver/template/drafts.html | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/phpBB/styles/prosilver/template/drafts.html b/phpBB/styles/prosilver/template/drafts.html index b6e6a7f5b7..7620f2374c 100644 --- a/phpBB/styles/prosilver/template/drafts.html +++ b/phpBB/styles/prosilver/template/drafts.html @@ -13,26 +13,28 @@
      -
        +
        • {L_LOAD_DRAFT}
          -
          {L_SAVE_DATE}
          +
          {L_SAVE_DATE}
        -
          +
          • - {draftrow.DRAFT_SUBJECT}
            - {L_TOPIC}{L_COLON} {draftrow.TITLE} - {L_FORUM}{L_COLON} {draftrow.TITLE} - {L_NO_TOPIC_FORUM} +
            + {draftrow.DRAFT_SUBJECT}
            + {L_TOPIC}{L_COLON} {draftrow.TITLE} + {L_FORUM}{L_COLON} {draftrow.TITLE} + {L_NO_TOPIC_FORUM} +
            -
            {draftrow.DATE}
            +
            {draftrow.DATE}
          • -- cgit v1.2.1 From 5c5137818607777367f6d9a970f668c0c6d061e7 Mon Sep 17 00:00:00 2001 From: Vjacheslav Trushkin Date: Mon, 21 Oct 2013 21:28:32 +0300 Subject: [ticket/11956] Move responsive *CP navigation Move responsive *CP navigation to cp.css because layout has to change at width higher than 700px PHPBB3-11956 --- phpBB/styles/prosilver/theme/cp.css | 38 +++++++++++++++++++++++++++++ phpBB/styles/prosilver/theme/responsive.css | 35 -------------------------- 2 files changed, 38 insertions(+), 35 deletions(-) diff --git a/phpBB/styles/prosilver/theme/cp.css b/phpBB/styles/prosilver/theme/cp.css index e0863f7458..f6bb1d0623 100644 --- a/phpBB/styles/prosilver/theme/cp.css +++ b/phpBB/styles/prosilver/theme/cp.css @@ -417,3 +417,41 @@ ol.def-rules li { border: 1px solid transparent; text-align: center; } + +/* Responsive *CP navigation +----------------------------------------*/ +@media only screen and (max-width: 900px), only screen and (max-device-width: 900px) +{ + .nojs #tabs a span, .nojs #minitabs a span { + max-width: 40px; + overflow: hidden; + text-overflow: ellipsis; + letter-spacing: -.5px; + } + + #cp-menu, #navigation, #cp-main { + float: none; + width: auto; + margin: 0; + } + + #navigation { + padding: 0; + margin: 0 auto; + max-width: 320px; + } + + #navigation a { + background-image: none; + } + + #navigation li:first-child a { + border-top-left-radius: 5px; + border-top-right-radius: 5px; + } + + #navigation li:last-child a { + border-bottom-left-radius: 5px; + border-bottom-right-radius: 5px; + } +} diff --git a/phpBB/styles/prosilver/theme/responsive.css b/phpBB/styles/prosilver/theme/responsive.css index fc24cd7ed2..83233bf6aa 100644 --- a/phpBB/styles/prosilver/theme/responsive.css +++ b/phpBB/styles/prosilver/theme/responsive.css @@ -211,41 +211,6 @@ ul.topiclist.forums dd.topics dfn, ul.topiclist.topics dd.posts dfn { margin: 5px 0; } -/* *CP navigation -----------------------------------------*/ -.nojs #tabs a span, .nojs #minitabs a span { - max-width: 40px; - overflow: hidden; - text-overflow: ellipsis; - letter-spacing: -.5px; -} - -#cp-menu, #navigation, #cp-main { - float: none; - width: auto; - margin: 0; -} - -#navigation { - padding: 0; - margin: 0 auto; - max-width: 320px; -} - -#navigation a { - background-image: none; -} - -#navigation li:first-child a { - border-top-left-radius: 5px; - border-top-right-radius: 5px; -} - -#navigation li:last-child a { - border-bottom-left-radius: 5px; - border-bottom-right-radius: 5px; -} - /* Responsive tables ----------------------------------------*/ table.responsive, table.responsive tbody, table.responsive tr, table.responsive td { -- cgit v1.2.1 From d2d4438db50e54b9ad61731b5d92d01bd057309c Mon Sep 17 00:00:00 2001 From: Vjacheslav Trushkin Date: Tue, 22 Oct 2013 00:11:48 +0300 Subject: [ticket/11956] Adjustments to responsive topiclist lists Changes behavior of topiclist lists on mobile devices. Shows/hides certain elements in each row to present all important information to visitor on mobile devices, such as last post when viewing forum instead of first post. Also fixes topiclist layout bug in drafts.html PHPBB3-11956 --- phpBB/styles/prosilver/template/drafts.html | 3 + phpBB/styles/prosilver/template/forum_fn.js | 76 ++++++++++++++++++++++ .../styles/prosilver/template/forumlist_body.html | 10 +++ phpBB/styles/prosilver/template/mcp_forum.html | 10 ++- phpBB/styles/prosilver/template/mcp_front.html | 6 +- phpBB/styles/prosilver/template/mcp_queue.html | 2 +- phpBB/styles/prosilver/template/mcp_reports.html | 7 ++ .../styles/prosilver/template/ucp_attachments.html | 2 +- .../prosilver/template/ucp_groups_manage.html | 2 +- .../prosilver/template/ucp_main_bookmarks.html | 10 ++- .../styles/prosilver/template/ucp_main_drafts.html | 4 ++ .../styles/prosilver/template/ucp_main_front.html | 9 ++- .../prosilver/template/ucp_main_subscribed.html | 21 +++++- .../prosilver/template/ucp_pm_viewfolder.html | 2 +- .../styles/prosilver/template/viewforum_body.html | 15 ++++- phpBB/styles/prosilver/theme/responsive.css | 28 ++------ 16 files changed, 170 insertions(+), 37 deletions(-) diff --git a/phpBB/styles/prosilver/template/drafts.html b/phpBB/styles/prosilver/template/drafts.html index 7620f2374c..4b2e1bf0c6 100644 --- a/phpBB/styles/prosilver/template/drafts.html +++ b/phpBB/styles/prosilver/template/drafts.html @@ -32,6 +32,9 @@ {L_TOPIC}{L_COLON} {draftrow.TITLE} {L_FORUM}{L_COLON} {draftrow.TITLE} {L_NO_TOPIC_FORUM} +
      {draftrow.DATE}
      diff --git a/phpBB/styles/prosilver/template/forum_fn.js b/phpBB/styles/prosilver/template/forum_fn.js index b71ff45a27..a425e9e1ad 100644 --- a/phpBB/styles/prosilver/template/forum_fn.js +++ b/phpBB/styles/prosilver/template/forum_fn.js @@ -536,6 +536,82 @@ function insert_single_user(formId, user) $(window).resize(check); }); + // Responsive topic lists + $('.topiclist.responsive-show-all > li > dl').each(function() { + var $this = $(this), + block = $this.find('dt .responsive-show:last-child'), + first = true; + + if (!block.length) { + $this.find('dt > .list-inner').append('
    - {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} +
    + diff --git a/phpBB/styles/prosilver/template/mcp_front.html b/phpBB/styles/prosilver/template/mcp_front.html index 402cfe029a..6826b0af52 100644 --- a/phpBB/styles/prosilver/template/mcp_front.html +++ b/phpBB/styles/prosilver/template/mcp_front.html @@ -21,7 +21,7 @@
  • -
      +
      • @@ -75,7 +75,7 @@
      -
        +
        • @@ -116,7 +116,7 @@
        -
          +
          • diff --git a/phpBB/styles/prosilver/template/mcp_queue.html b/phpBB/styles/prosilver/template/mcp_queue.html index c2d39eff98..461d5982db 100644 --- a/phpBB/styles/prosilver/template/mcp_queue.html +++ b/phpBB/styles/prosilver/template/mcp_queue.html @@ -35,7 +35,7 @@
          -
            +
              diff --git a/phpBB/styles/prosilver/template/mcp_reports.html b/phpBB/styles/prosilver/template/mcp_reports.html index 902744fe25..ffa82d5e0e 100644 --- a/phpBB/styles/prosilver/template/mcp_reports.html +++ b/phpBB/styles/prosilver/template/mcp_reports.html @@ -48,6 +48,9 @@ {postrow.PM_SUBJECT} {postrow.ATTACH_ICON_IMG}
              {L_MESSAGE_BY_AUTHOR} {postrow.PM_AUTHOR_FULL} » {postrow.PM_TIME}
              {L_MESSAGE_TO} {postrow.RECIPIENTS} +
              @@ -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(-) 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 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 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(-) 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(-) 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(+) 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(-) 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(-) 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(-) 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(-) 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(-) 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(-) 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;