From 5c35cb9cf8064c25a993e42cedd4438c9846e37f Mon Sep 17 00:00:00 2001 From: Marc Alexander Date: Mon, 25 Aug 2014 22:49:13 +0200 Subject: [PATCH 1/4] [ticket/358] Remove use of T_EXT_THEME_PATH in attachments side Additionally, we'll now also test that the portal doesn't show errors while using subsilver. B3P-358 --- .../portal/modules/attachments_side.html | 2 +- tests/functional/portal_no_error_test.php | 18 ++++++++++++++++++ 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/styles/prosilver/template/portal/modules/attachments_side.html b/styles/prosilver/template/portal/modules/attachments_side.html index 31b4f9ff..ccaa082d 100644 --- a/styles/prosilver/template/portal/modules/attachments_side.html +++ b/styles/prosilver/template/portal/modules/attachments_side.html @@ -2,7 +2,7 @@ {L_FILENAME}
-  {attach_side.FILENAME}
+   {attach_side.FILENAME}
{L_FILESIZE}{L_COLON}{attach_side.FILESIZE}
{L_DOWNLOADS}{L_COLON}{attach_side.DOWNLOAD_COUNT}

diff --git a/tests/functional/portal_no_error_test.php b/tests/functional/portal_no_error_test.php index d12b08a8..cfd58479 100644 --- a/tests/functional/portal_no_error_test.php +++ b/tests/functional/portal_no_error_test.php @@ -24,4 +24,22 @@ class phpbb_functional_portal_no_error_test extends \board3\portal\tests\testfra { self::request('GET', 'app.php/portal'); } + + public function test_enable_subsilver() + { + $crawler = self::request('GET', 'adm/index.php?i=acp_styles&mode=install&sid=' . $this->sid); + $link = $crawler->selectLink('Install style')->link()->getUri(); + $crawler = self::request('GET', substr($link, strpos($link, '/adm') + 1)); + $this->assertContains('Style "subsilver2" has been installed', $crawler->text()); + } + + /** + * @dependsOn test_enable_subsilver + */ + public function test_portal_subsilver() + { + $crawler = self::request('GET', 'app.php/portal'); + $this->assertContains('subsilver', $crawler->text()); + self::request('GET', 'app.php/portal?style=2'); + } } From b6e39159b70e641e90ce1dae6da206ff92d6ec9f Mon Sep 17 00:00:00 2001 From: Marc Alexander Date: Mon, 25 Aug 2014 23:17:42 +0200 Subject: [PATCH 2/4] [ticket/358] Remove uses of T_EXT_THEME_PATH in prosilver files B3P-358 --- .../portal/modules/attachments_center.html | 2 +- .../portal/modules/birthdays_side.html | 8 ++----- .../template/portal/modules/clock_side.html | 8 +++---- .../portal/modules/donation_center.html | 2 +- .../template/portal/modules/friends_side.html | 4 ++-- .../portal/modules/latest_members_side.html | 4 ++-- .../portal/modules/leaders_ext_side.html | 2 +- .../template/portal/modules/leaders_side.html | 4 ++-- .../portal/modules/topposters_side.html | 4 ++-- styles/prosilver/theme/portal.css | 23 +++++++++++++++++++ 10 files changed, 40 insertions(+), 21 deletions(-) diff --git a/styles/prosilver/template/portal/modules/attachments_center.html b/styles/prosilver/template/portal/modules/attachments_center.html index cbedf531..94187a2e 100644 --- a/styles/prosilver/template/portal/modules/attachments_center.html +++ b/styles/prosilver/template/portal/modules/attachments_center.html @@ -4,7 +4,7 @@ {L_FILENAME}
-  {attach_center.FILENAME}
+   {attach_center.FILENAME}
{L_FILESIZE}{L_COLON}{attach_center.FILESIZE}
{L_DOWNLOADS}{L_COLON}{attach_center.DOWNLOAD_COUNT}

diff --git a/styles/prosilver/template/portal/modules/birthdays_side.html b/styles/prosilver/template/portal/modules/birthdays_side.html index 00806592..303ff1b6 100644 --- a/styles/prosilver/template/portal/modules/birthdays_side.html +++ b/styles/prosilver/template/portal/modules/birthdays_side.html @@ -2,9 +2,7 @@ {L_CONGRATULATIONS}{L_COLON}
- - - + {board3_birthday_list.USER} @@ -21,9 +19,7 @@
- - - + {board3_birthday_ahead_list.USER} diff --git a/styles/prosilver/template/portal/modules/clock_side.html b/styles/prosilver/template/portal/modules/clock_side.html index efb64c60..6e39e9b0 100644 --- a/styles/prosilver/template/portal/modules/clock_side.html +++ b/styles/prosilver/template/portal/modules/clock_side.html @@ -3,24 +3,24 @@
-
+
-
+
-
+
-
+
diff --git a/styles/prosilver/template/portal/modules/donation_center.html b/styles/prosilver/template/portal/modules/donation_center.html index d0396fd3..dc527fe8 100644 --- a/styles/prosilver/template/portal/modules/donation_center.html +++ b/styles/prosilver/template/portal/modules/donation_center.html @@ -5,7 +5,7 @@
{SITENAME} {L_DONATION_TEXT}
-
+
 
diff --git a/styles/prosilver/template/portal/modules/friends_side.html b/styles/prosilver/template/portal/modules/friends_side.html index 0094a685..107d3096 100644 --- a/styles/prosilver/template/portal/modules/friends_side.html +++ b/styles/prosilver/template/portal/modules/friends_side.html @@ -1,7 +1,7 @@ {$LR_BLOCK_H_L} {$TITLE}{$LR_BLOCK_H_R} {L_FRIENDS_ONLINE}
- {b3p_friends_online.USERNAME_FULL}
+ {b3p_friends_online.USERNAME_FULL}
{L_NO_FRIENDS_ONLINE}
@@ -9,7 +9,7 @@
{L_FRIENDS_OFFLINE}
- {b3p_friends_offline.USERNAME_FULL}
+ {b3p_friends_offline.USERNAME_FULL}
{L_NO_FRIENDS_OFFLINE} diff --git a/styles/prosilver/template/portal/modules/latest_members_side.html b/styles/prosilver/template/portal/modules/latest_members_side.html index 4a48225f..e47a9b01 100644 --- a/styles/prosilver/template/portal/modules/latest_members_side.html +++ b/styles/prosilver/template/portal/modules/latest_members_side.html @@ -9,9 +9,9 @@ {latest_members.JOINED} - {latest_members.USERNAME_FULL}
+  {latest_members.USERNAME_FULL}
- {latest_members.USERNAME_FULL} + {latest_members.USERNAME_FULL} {latest_members.JOINED}
diff --git a/styles/prosilver/template/portal/modules/leaders_ext_side.html b/styles/prosilver/template/portal/modules/leaders_ext_side.html index 9089ac79..3c22cbe6 100644 --- a/styles/prosilver/template/portal/modules/leaders_ext_side.html +++ b/styles/prosilver/template/portal/modules/leaders_ext_side.html @@ -2,7 +2,7 @@ style="float: right;">{group.GROUP_NAME}
- {group.member.USERNAME_FULL}
+ {group.member.USERNAME_FULL}

diff --git a/styles/prosilver/template/portal/modules/leaders_side.html b/styles/prosilver/template/portal/modules/leaders_side.html index 92205423..698c4005 100644 --- a/styles/prosilver/template/portal/modules/leaders_side.html +++ b/styles/prosilver/template/portal/modules/leaders_side.html @@ -1,14 +1,14 @@ {$LR_BLOCK_H_L} {$TITLE}{$LR_BLOCK_H_R} style="float: right;">{L_ADMINISTRATORS}
- {b3p_admins.USERNAME_FULL}
+ {b3p_admins.USERNAME_FULL}
{L_NO_ADMINISTRATORS_P}


style="float: right;">{L_MODERATORS}
- {b3p_moderator.USERNAME_FULL}
+ {b3p_moderator.USERNAME_FULL}
{L_NO_MODERATORS_P} diff --git a/styles/prosilver/template/portal/modules/topposters_side.html b/styles/prosilver/template/portal/modules/topposters_side.html index 13d8bafe..26d41706 100644 --- a/styles/prosilver/template/portal/modules/topposters_side.html +++ b/styles/prosilver/template/portal/modules/topposters_side.html @@ -8,10 +8,10 @@ - {topposters.USERNAME_FULL} + {topposters.USERNAME_FULL} {topposters.POSTER_POSTS}
- {topposters.USERNAME_FULL} + {topposters.USERNAME_FULL} {topposters.POSTER_POSTS}
diff --git a/styles/prosilver/theme/portal.css b/styles/prosilver/theme/portal.css index cfe84c32..65e1990d 100644 --- a/styles/prosilver/theme/portal.css +++ b/styles/prosilver/theme/portal.css @@ -49,6 +49,21 @@ list-style-type: none; } +.portal-user-span { + background-image: url("./images/portal/portal_user.png"); + padding-left: 16px; + padding-top: 16px; +} + +.portal-paypal-icon { + background-image: url("./images/portal/paypal.gif"); + background-repeat: no-repeat; + padding-left: 73px; + padding-top: 44px; + float: left; + margin: 5px; +} + /** * Replacement for table layout */ @@ -151,6 +166,14 @@ margin-bottom: 10px; } +.portal-clock-spacer-up { + content: url("./images/portal/spacer_up.png"); +} + +.portal-clock-spacer-down { + content: url("./images/portal/spacer_down.png"); +} + .portal-clock * img { float: left; } From c7fa3e3bddf6ca533f737741b4084455216525f8 Mon Sep 17 00:00:00 2001 From: Marc Alexander Date: Mon, 25 Aug 2014 23:38:47 +0200 Subject: [PATCH 3/4] [ticket/358] Remove uses of T_EXT_THEME_PATH in subsilver B3P-358 --- .../event/overall_header_head_append.html | 2 +- .../portal/modules/birthdays_side.html | 8 ++---- .../template/portal/modules/clock_side.html | 8 +++--- .../template/portal/modules/friends_side.html | 4 +-- .../portal/modules/latest_members_side.html | 4 +-- .../portal/modules/leaders_ext_side.html | 4 +-- .../template/portal/modules/leaders_side.html | 8 +++--- .../template/portal/modules/links_side.html | 2 +- .../portal/modules/main_menu_side.html | 2 +- .../portal/modules/recent_center.html | 6 ++--- .../portal/modules/topposters_side.html | 4 +-- .../portal/modules/user_menu_side.html | 18 ++++++------- styles/subsilver2/theme/portal.css | 26 +++++++++++++++++++ 13 files changed, 59 insertions(+), 37 deletions(-) diff --git a/styles/subsilver2/template/event/overall_header_head_append.html b/styles/subsilver2/template/event/overall_header_head_append.html index 86922c9a..bac281c9 100644 --- a/styles/subsilver2/template/event/overall_header_head_append.html +++ b/styles/subsilver2/template/event/overall_header_head_append.html @@ -1 +1 @@ - + diff --git a/styles/subsilver2/template/portal/modules/birthdays_side.html b/styles/subsilver2/template/portal/modules/birthdays_side.html index 821b8d27..a9a4b2e5 100644 --- a/styles/subsilver2/template/portal/modules/birthdays_side.html +++ b/styles/subsilver2/template/portal/modules/birthdays_side.html @@ -5,9 +5,7 @@ {L_CONGRATULATIONS}{L_COLON}
- - - + {board3_birthday_list.USER} @@ -27,9 +25,7 @@
- - - + {board3_birthday_ahead_list.USER} diff --git a/styles/subsilver2/template/portal/modules/clock_side.html b/styles/subsilver2/template/portal/modules/clock_side.html index 02595d53..78c01598 100644 --- a/styles/subsilver2/template/portal/modules/clock_side.html +++ b/styles/subsilver2/template/portal/modules/clock_side.html @@ -5,24 +5,24 @@
-
+
-
+
-
+
-
+
diff --git a/styles/subsilver2/template/portal/modules/friends_side.html b/styles/subsilver2/template/portal/modules/friends_side.html index f4b7bfe2..1a375384 100644 --- a/styles/subsilver2/template/portal/modules/friends_side.html +++ b/styles/subsilver2/template/portal/modules/friends_side.html @@ -4,7 +4,7 @@ {L_FRIENDS_ONLINE}
- {b3p_friends_online.USERNAME_FULL}
+ {b3p_friends_online.USERNAME_FULL}
{L_NO_FRIENDS_ONLINE}
@@ -12,7 +12,7 @@
{L_FRIENDS_OFFLINE}
- {b3p_friends_offline.USERNAME_FULL}
+ {b3p_friends_offline.USERNAME_FULL}
{L_NO_FRIENDS_OFFLINE} diff --git a/styles/subsilver2/template/portal/modules/latest_members_side.html b/styles/subsilver2/template/portal/modules/latest_members_side.html index 34becaa5..a8b46c1b 100644 --- a/styles/subsilver2/template/portal/modules/latest_members_side.html +++ b/styles/subsilver2/template/portal/modules/latest_members_side.html @@ -11,10 +11,10 @@ - {latest_members.USERNAME_FULL} + {latest_members.USERNAME_FULL} {latest_members.JOINED}
- {latest_members.USERNAME_FULL} + {latest_members.USERNAME_FULL} {latest_members.JOINED}
diff --git a/styles/subsilver2/template/portal/modules/leaders_ext_side.html b/styles/subsilver2/template/portal/modules/leaders_ext_side.html index 69a13465..11a600d5 100644 --- a/styles/subsilver2/template/portal/modules/leaders_ext_side.html +++ b/styles/subsilver2/template/portal/modules/leaders_ext_side.html @@ -10,9 +10,9 @@ - {group.member.USERNAME_FULL}
+ {group.member.USERNAME_FULL}
- {group.member.USERNAME_FULL}
+ {group.member.USERNAME_FULL}
diff --git a/styles/subsilver2/template/portal/modules/leaders_side.html b/styles/subsilver2/template/portal/modules/leaders_side.html index c83a034c..675709e6 100644 --- a/styles/subsilver2/template/portal/modules/leaders_side.html +++ b/styles/subsilver2/template/portal/modules/leaders_side.html @@ -9,9 +9,9 @@ - {b3p_admins.USERNAME_FULL}
+ {b3p_admins.USERNAME_FULL}
- {b3p_admins.USERNAME_FULL}
+ {b3p_admins.USERNAME_FULL}
@@ -31,9 +31,9 @@ - {b3p_moderator.USERNAME_FULL}
+ {b3p_moderator.USERNAME_FULL}
- {b3p_moderator.USERNAME_FULL}
+ {b3p_moderator.USERNAME_FULL}
diff --git a/styles/subsilver2/template/portal/modules/links_side.html b/styles/subsilver2/template/portal/modules/links_side.html index 0f331282..7230e1b1 100644 --- a/styles/subsilver2/template/portal/modules/links_side.html +++ b/styles/subsilver2/template/portal/modules/links_side.html @@ -3,7 +3,7 @@ -  onclick="window.open('{portallinks.LINK_URL}'); return false;">{portallinks.LINK_TITLE} + onclick="window.open('{portallinks.LINK_URL}'); return false;"> {portallinks.LINK_TITLE} diff --git a/styles/subsilver2/template/portal/modules/main_menu_side.html b/styles/subsilver2/template/portal/modules/main_menu_side.html index 5b901771..d9afadbe 100644 --- a/styles/subsilver2/template/portal/modules/main_menu_side.html +++ b/styles/subsilver2/template/portal/modules/main_menu_side.html @@ -10,7 +10,7 @@ - onclick="window.open('{portalmenu.links.LINK_URL}'); return false;"> {portalmenu.links.LINK_TITLE} + onclick="window.open('{portalmenu.links.LINK_URL}'); return false;"> {portalmenu.links.LINK_TITLE} diff --git a/styles/subsilver2/template/portal/modules/recent_center.html b/styles/subsilver2/template/portal/modules/recent_center.html index d6897537..e1399834 100644 --- a/styles/subsilver2/template/portal/modules/recent_center.html +++ b/styles/subsilver2/template/portal/modules/recent_center.html @@ -10,21 +10,21 @@ -  {latest_announcements.TITLE}
+  {latest_announcements.TITLE}
-  {latest_hot_topics.TITLE}
+  {latest_hot_topics.TITLE}
-  {latest_topics.TITLE}
+  {latest_topics.TITLE}
diff --git a/styles/subsilver2/template/portal/modules/topposters_side.html b/styles/subsilver2/template/portal/modules/topposters_side.html index db4bd15f..def3a290 100644 --- a/styles/subsilver2/template/portal/modules/topposters_side.html +++ b/styles/subsilver2/template/portal/modules/topposters_side.html @@ -11,10 +11,10 @@ - {topposters.USERNAME_FULL} + {topposters.USERNAME_FULL} {topposters.POSTER_POSTS}
- {topposters.USERNAME_FULL} + {topposters.USERNAME_FULL} {topposters.POSTER_POSTS}
diff --git a/styles/subsilver2/template/portal/modules/user_menu_side.html b/styles/subsilver2/template/portal/modules/user_menu_side.html index 5037a090..733ff224 100644 --- a/styles/subsilver2/template/portal/modules/user_menu_side.html +++ b/styles/subsilver2/template/portal/modules/user_menu_side.html @@ -17,31 +17,31 @@ -  {L_NEW_POSTS} +  {L_NEW_POSTS} -  {L_UNREAD_POSTS} +  {L_UNREAD_POSTS} -  {L_SELF_POSTS} +  {L_SELF_POSTS} -  {L_UM_BOOKMARKS} +  {L_UM_BOOKMARKS} -  {L_UM_MAIN_SUBSCRIBED} +  {L_UM_MAIN_SUBSCRIBED} @@ -61,26 +61,26 @@ -  {L_PROFILE} +  {L_PROFILE} -  {L_MCP} +  {L_MCP} -  {L_M_ACP}
+  {L_M_ACP}
-  {L_LOGIN_LOGOUT} +  {L_LOGIN_LOGOUT} diff --git a/styles/subsilver2/theme/portal.css b/styles/subsilver2/theme/portal.css index 1c50d828..37bc45a1 100644 --- a/styles/subsilver2/theme/portal.css +++ b/styles/subsilver2/theme/portal.css @@ -34,6 +34,16 @@ vertical-align: top; } +.portal-clock-spacer-up { + content: url("./images/portal/spacer_up.png"); + float: left; +} + +.portal-clock-spacer-down { + content: url("./images/portal/spacer_down.png"); + float: left; +} + #portal-clock-back-seconds-up-left, #portal-clock-back-seconds-up-right, #portal-clock-front-minutes-up-left, #portal-clock-front-minutes-up-right, #portal-clock-back-minutes-up-left, #portal-clock-back-minutes-up-right, @@ -172,3 +182,19 @@ font-size: 100%; line-height: normal; } + +.portal-arrow-bullet { + background: url(./images/portal/arrowbullet.gif) no-repeat; + padding-left: 12px; +} + +.rtl .portal-arrow-bullet { + background: url(./images/portal/arrowbullet_rtl.gif) no-repeat; +} + +.portal-user-span { + background-image: url("./images/portal/portal_user.png"); + padding-left: 16px; + padding-top: 16px; + margin-bottom: 2px; +} From fc6b1ef5b054e31ea78d9b51a4a1959a81c02f48 Mon Sep 17 00:00:00 2001 From: Marc Alexander Date: Tue, 26 Aug 2014 13:44:50 +0200 Subject: [PATCH 4/4] [ticket/358] Remove T_EXT_THEME_PATH from overal_header_head_append Also, the responsive CSS file for the portal has been renamed to portal_responsive.css in order to prevent conflicts with other extensions. B3P-358 --- .../event/overall_header_head_append.html | 2 +- .../{responsive.css => portal_responsive.css} | 43 ++++++++++--------- 2 files changed, 24 insertions(+), 21 deletions(-) rename styles/prosilver/theme/{responsive.css => portal_responsive.css} (60%) diff --git a/styles/prosilver/template/event/overall_header_head_append.html b/styles/prosilver/template/event/overall_header_head_append.html index d7d5b706..12a4f8ff 100644 --- a/styles/prosilver/template/event/overall_header_head_append.html +++ b/styles/prosilver/template/event/overall_header_head_append.html @@ -1,4 +1,4 @@ - + diff --git a/styles/prosilver/theme/responsive.css b/styles/prosilver/theme/portal_responsive.css similarity index 60% rename from styles/prosilver/theme/responsive.css rename to styles/prosilver/theme/portal_responsive.css index 8baaa979..61d7c2c3 100644 --- a/styles/prosilver/theme/responsive.css +++ b/styles/prosilver/theme/portal_responsive.css @@ -1,3 +1,26 @@ +@media only screen and (max-width: 1040px), only screen and (max-device-width: 1040px) +{ + .responsive-portal-announcements dd.views { display: none !important; } + dd.responsive-portal-announcements { display: none !important; } + + .responsive-portal-announcements dd.posts, .responsive-portal-announcements dd.views { + display: none !important; + } + + dt#a { width: 125% !important; } + .responsive-portal-announcements dt { width: 125% !important; } + dd.responsive-portal-news { display: none !important; } + + .responsive-portal-news dd.posts, .responsive-portal-news dd.views { + display: none !important; + } + + .responsive-portal-news dt { width: 130% !important; } + dt#n { width: 125% !important; } + .topiclist .topics, .topiclist .posts { display: none !important; } + #portal-forumlist dl.icon dt { width: 125% !important; } +} + @media only screen and (max-width: 895px), only screen and (max-device-width: 895px) { #portal-right { margin-left: 0 !important; } @@ -7,26 +30,6 @@ } } -.responsive-portal-announcements dd.views { display: none !important; } -dd.responsive-portal-announcements { display: none !important; } - -.responsive-portal-announcements dd.posts, .responsive-portal-announcements dd.views { - display: none !important; -} - -dt#a { width: 125% !important; } -.responsive-portal-announcements dt { width: 125% !important; } -dd.responsive-portal-news { display: none !important; } - -.responsive-portal-news dd.posts, .responsive-portal-news dd.views { - display: none !important; -} - -.responsive-portal-news dt { width: 130% !important; } -dt#n { width: 125% !important; } -.topiclist .topics, .topiclist .posts { display: none !important; } -#portal-forumlist dl.icon dt { width: 125% !important; } - @media only screen and (max-width: 700px), only screen and (max-device-width: 700px) { .responsive-portal-news dd.lastpost, .responsive-portal-announcements dd.lastpost { display: none !important; }