From 9ccf4b81e923e99d4dd1792b7f3b96bdd8fd3af1 Mon Sep 17 00:00:00 2001 From: Marc Alexander Date: Mon, 20 Feb 2023 20:51:58 +0100 Subject: [PATCH] Improve module icons and update language for icons --- acp/portal_module.php | 4 ++-- adm/style/portal/acp_editor.js | 2 +- language/de/portal_acp.php | 2 +- language/de_x_sie/portal_acp.php | 2 +- language/en/portal_acp.php | 2 +- migrations/v230_fa.php | 21 +++++++++++++++++- modules/announcements.php | 2 +- modules/custom.php | 2 +- modules/news.php | 2 +- modules/recent.php | 2 +- modules/welcome.php | 2 +- styles/all/theme/images/portal/b3p.png | Bin 0 -> 680 bytes .../images/portal/portal_announcement.png | Bin 0 -> 539 bytes .../images/portal/portal_latest_news.png | Bin 0 -> 411 bytes .../all/theme/images/portal/portal_recent.png | Bin 0 -> 456 bytes .../theme/images/portal/portal_welcome.png | Bin 0 -> 323 bytes .../modules/announcements_center_compact.html | 2 +- .../portal/modules/calendar_side.html | 2 +- .../portal/modules/news_compact_center.html | 2 +- styles/prosilver/theme/portal.css | 5 +++-- 20 files changed, 37 insertions(+), 17 deletions(-) create mode 100644 styles/all/theme/images/portal/b3p.png create mode 100644 styles/all/theme/images/portal/portal_announcement.png create mode 100644 styles/all/theme/images/portal/portal_latest_news.png create mode 100644 styles/all/theme/images/portal/portal_recent.png create mode 100644 styles/all/theme/images/portal/portal_welcome.png diff --git a/acp/portal_module.php b/acp/portal_module.php index c1673d91..34e58708 100644 --- a/acp/portal_module.php +++ b/acp/portal_module.php @@ -275,8 +275,8 @@ class portal_module $sql_ary = array( 'module_image_src' => $this->request->variable('module_image', ''), - 'module_image_width' => $this->request->variable('module_img_width', 0), - 'module_image_height' => $this->request->variable('module_img_height', 0), + 'module_image_width' => $this->request->variable('module_img_width', 16), + 'module_image_height' => $this->request->variable('module_img_height', 16), 'module_fa_icon' => $this->request->variable('module_fa', ''), 'module_fa_size' => $this->request->variable('module_fa_size', 16), 'module_group_ids' => $module_permission, diff --git a/adm/style/portal/acp_editor.js b/adm/style/portal/acp_editor.js index 5b3b687b..907b6c83 100644 --- a/adm/style/portal/acp_editor.js +++ b/adm/style/portal/acp_editor.js @@ -283,7 +283,7 @@ function split_lines(text) j++; } } - while(splitAt != -1) + while (splitAt != -1) } } return splitLines; diff --git a/language/de/portal_acp.php b/language/de/portal_acp.php index 3d1cac35..45c82ab6 100644 --- a/language/de/portal_acp.php +++ b/language/de/portal_acp.php @@ -63,7 +63,7 @@ $lang = array_merge($lang, array( 'MODULE_NAME' => 'Modul Name', 'MODULE_NAME_EXP' => 'Gebe den Namen ein der für das Modul in der Modul Konfiguration angezeigt werden soll.', 'MODULE_IMAGE' => 'Modul Bild', - 'MODULE_IMAGE_EXP' => 'Gebe den Dateinamen des Modul Bildes ein. Das Bild muss sich in allen styles/{Dein Style}/theme/images/portal/ Ordnern befinden.', + 'MODULE_IMAGE_EXP' => 'Gebe den Dateinamen des Modul Bildes ein. Das Bild muss sich im Verzeichnis styles/all/theme/images/ oder zusätzlich in styles/{Dein Style}/theme/images/portal/ befinden.', 'MODULE_PERMISSIONS' => 'Modul Berechtigungen', 'MODULE_PERMISSIONS_EXP' => 'Wähle die Gruppen aus, die berechtigt sein sollen, das Modul zu sehen. Sollen alle Benutzer das Modul sehen können, wähle nichts aus.
An- / abwählen mehrerer Gruppen indem man Strg gedrückt hält und klickt.', 'MODULE_IMAGE_WIDTH' => 'Modul Bild Breite', diff --git a/language/de_x_sie/portal_acp.php b/language/de_x_sie/portal_acp.php index 6104fd9c..0c433d25 100644 --- a/language/de_x_sie/portal_acp.php +++ b/language/de_x_sie/portal_acp.php @@ -62,7 +62,7 @@ $lang = array_merge($lang, [ 'MODULE_NAME' => 'Modul Name', 'MODULE_NAME_EXP' => 'Geben Sie hier den Namen ein der für das Modul in der Modul Konfiguration angezeigt werden soll.', 'MODULE_IMAGE' => 'Modul Bild', - 'MODULE_IMAGE_EXP' => 'Geben Sie hier den Dateinamen des Modul Bildes ein. Das Bild muss sich in allen styles/{Dein Style}/theme/images/portal/ Ordnern befinden.', + 'MODULE_IMAGE_EXP' => 'Geben Sie hier den Dateinamen des Modul Bildes ein. Das Bild muss sich im Verzeichnis styles/all/theme/images/ oder zusätzlich in styles/{Dein Style}/theme/images/portal/ befinden.', 'MODULE_PERMISSIONS' => 'Modul Berechtigungen', 'MODULE_PERMISSIONS_EXP' => 'Wählen Sie die Gruppen aus, die berechtigt sein sollen, das Modul zu sehen. Sollen alle Benutzer das Modul sehen können, wählen Sie nichts aus.
An- / abwählen mehrerer Gruppen indem man Strg gedrückt hält und klickt.', 'MODULE_IMAGE_WIDTH' => 'Modul Bild Breite', diff --git a/language/en/portal_acp.php b/language/en/portal_acp.php index f7adc3b3..85b0b743 100644 --- a/language/en/portal_acp.php +++ b/language/en/portal_acp.php @@ -62,7 +62,7 @@ $lang = array_merge($lang, array( 'MODULE_NAME' => 'Module name', 'MODULE_NAME_EXP' => 'Enter the name of the Module that should be displayed in the Module configuration.', 'MODULE_IMAGE' => 'Module image', - 'MODULE_IMAGE_EXP' => 'Enter the filename of the module image. Images need to be in all styles/{yourstyle}/theme/images/portal/ folders', + 'MODULE_IMAGE_EXP' => 'Enter the filename of the module image. Images need to be in the styles/all/theme/images/ folder or additionally in styles/{yourstyle}/theme/images/portal/ folders', 'MODULE_PERMISSIONS' => 'Module permissions', 'MODULE_PERMISSIONS_EXP' => 'Select the groups that should be authorized to view the module. If you want all users to be able to view the module, don’t select anything.
Select/Deselect multiple groups by holding CTRL and clicking.', 'MODULE_IMAGE_WIDTH' => 'Module image width', diff --git a/migrations/v230_fa.php b/migrations/v230_fa.php index b244f9f4..3bdcff54 100644 --- a/migrations/v230_fa.php +++ b/migrations/v230_fa.php @@ -54,7 +54,13 @@ class v230_fa extends migration '\board3\portal\modules\calendar' => 'fa-calendar', '\board3\portal\modules\leaders' => 'fa-users', '\board3\portal\modules\latest_bots' => 'fa-android', - '\board3\portal\modules\links' => 'fa-link', + '\board3\portal\modules\links' => 'fa-link', + '\board3\portal\modules\welcome' => 'fa-hand-spock-o', + '\board3\portal\modules\recent' => 'fa-newspaper-o', + '\board3\portal\modules\announcements' => 'fa-bullhorn', + '\board3\portal\modules\news' => 'fa-file-text', + '\board3\portal\modules\poll' => 'fa-area-chart', + '\board3\portal\modules\whois_online' => 'fa-group', ]; foreach ($fa_icons as $key => $value) { @@ -63,5 +69,18 @@ class v230_fa extends migration WHERE module_classname = '" . $this->db->sql_escape($key) . "'"; $this->db->sql_query($query); } + $module_image = [ + '\board3\portal\modules\welcome' => 'portal_welcome.png', + '\board3\portal\modules\recent' => 'portal_recent.png', + '\board3\portal\modules\news' => 'portal_latest_news.png', + '\board3\portal\modules\announcements' => 'portal_announcement.png', + ]; + foreach ($module_image as $key => $value) + { + $query = 'UPDATE ' . $this->table_prefix . "portal_modules + SET module_image_src = '" . $value . "' + WHERE module_classname = '" . $this->db->sql_escape($key) . "'"; + $this->db->sql_query($query); + } } } diff --git a/modules/announcements.php b/modules/announcements.php index 82e4cbd7..bbbe051d 100644 --- a/modules/announcements.php +++ b/modules/announcements.php @@ -33,7 +33,7 @@ class announcements extends module_base * Default module-image: * file must be in "{T_THEME_PATH}/images/portal/" */ - public $image_src = 'portal_custom.png'; + public $image_src = 'portal_announcement.png'; /** * module-language file diff --git a/modules/custom.php b/modules/custom.php index b965d2e3..7b324618 100644 --- a/modules/custom.php +++ b/modules/custom.php @@ -266,7 +266,7 @@ class custom extends module_base // first check for obvious errors, we don't want to waste server resources if (empty($custom_code)) { - trigger_error($this->user->lang['ACP_PORTAL_CUSTOM_CODE_SHORT']. adm_back_link($u_action), E_USER_WARNING); + trigger_error($this->user->lang['TOO_FEW_CHARS']. adm_back_link($u_action), E_USER_WARNING); } if ($custom_bbcode) diff --git a/modules/news.php b/modules/news.php index fc20a21d..bee130e4 100644 --- a/modules/news.php +++ b/modules/news.php @@ -33,7 +33,7 @@ class news extends module_base * Default module-image: * file must be in "{T_THEME_PATH}/images/portal/" */ - public $image_src = 'portal_custom.png'; + public $image_src = 'portal_latest_news.png'; /** * module-language file diff --git a/modules/recent.php b/modules/recent.php index e1a488b6..cb7a9130 100644 --- a/modules/recent.php +++ b/modules/recent.php @@ -33,7 +33,7 @@ class recent extends module_base * Default module-image: * file must be in "{T_THEME_PATH}/images/portal/" */ - public $image_src = 'portal_custom.png'; + public $image_src = 'portal_recent.png'; /** * module-language file diff --git a/modules/welcome.php b/modules/welcome.php index fac82ec8..07a0fb8b 100644 --- a/modules/welcome.php +++ b/modules/welcome.php @@ -33,7 +33,7 @@ class welcome extends module_base * Default module-image: * file must be in "{T_THEME_PATH}/images/portal/" */ - public $image_src = 'portal_custom.png'; + public $image_src = 'portal_welcome.png'; /** * module-language file diff --git a/styles/all/theme/images/portal/b3p.png b/styles/all/theme/images/portal/b3p.png new file mode 100644 index 0000000000000000000000000000000000000000..e1f948ad95a9a7bd882d213563efe1e8f986e4d3 GIT binary patch literal 680 zcmV;Z0$2TsP)blR0k_Q51#0`{vDfyvBB%7=j!UmJkUcL<1EP1szaR z!aty+prS@dREUZn0SyQWQcyrDilC5Hi6bk!<9LE6p5;A?gr!A@BOTr5>YS^ibKxH$ z_SyY1t4mqR&YnD;I{aG!jd7py;KeP%?ykMv`%W6Sv1vdW2PAPo9Czsl9S*u3b~oF! z7TWYWd${EldGb2YRBJGHah0j*4lm!Hqu>ovDI9XOQK6g_vZa(_C1uoyLP^Nv0PV1~ z@h*Dw>bXW|B4C;3QXbv$I7|{YQ_aWLHkaz7lrtF$C4nkvW6;Wyt0w8h^&75FU7=MB z>>&FCjQJjCGFir@La9B-+WZbtVDK!sBKR4hSPS6H_;QYt1Ir`Jyj>zKLz;`#$uz?zW_sNese zrF+|ltnQs}btZ26&)&7|eF0c=RnPq9S!)h_U%2V`|Jwc~pJ5u24d~kTPOo$82NSSM zw!JR_8P>J!ePGXyx3Ub4lUFW*DQ=p)`~x-vKpK0te~9ea`cbWO*K4Wn?eBx?_y6bU z-tj(>XaoNL|IgUH{X+)Wux%gG;B+Gi26S!zkdACX*Vgx`L>thx<3m*Eu8*p{o8L%- z{15iRws-Li<-H4I<4dVPHEg%gF$*3F6_!! z{qHU5nn8L%dKoTkOdyTBuR?O&w!^}L~bIu)v8VsmCT@r0b zBPA{@ql;nv;0)D+e#`Jeuy4#5V>YNFxUX2)3YS1;W}YS5Q)S!XewD9#!f=+Sm@?Gs zz;hHhfkf^DX3ccfF|B)yPAM~D^2?P@glpquVK~9uK%7qUcQVF;QGWZcamSL&>XDTfFO4EtiIiR-rk5sJs19Ofnzca3lljmIz zU~)4MqBH!^&$G$EWFysdwgBs%G%UHUVa=UxnJn7CWFyr={Z@%>8$g3riQkh2{?wqY y0d&Cs8r1;rh+81%LP00009q&L+MtD~j#<472ra=JlzU zCw8_ktDj$4bgw?C;Nz@oss+riUca7MH0|2+E$`-hn5Dy#>u&7*dl+cewJ+T5E7BQw8s@l8 z6JNn4=6h>r`r}2(KtsCKa#puzv#749ygR#?FK_p^U+1p+|L;6_I{l5i%8GllRCjf& zzqcxS_+#_?6iEi=?B{ZIMb92A{(t1b(%^DsBT=4`DY{qQXvQV@i0DOWF)`F6yj#w^ TH~$wf02n-7{an^LB{Ts5#fOhN literal 0 HcmV?d00001 diff --git a/styles/prosilver/template/portal/modules/announcements_center_compact.html b/styles/prosilver/template/portal/modules/announcements_center_compact.html index f754bff9..256b9b59 100644 --- a/styles/prosilver/template/portal/modules/announcements_center_compact.html +++ b/styles/prosilver/template/portal/modules/announcements_center_compact.html @@ -19,7 +19,7 @@ {% if center_row.S_FIRST_ROW %} {{ definition.CC_BLOCK_H_L }}{% if definition.S_BLOCK_ICON %} {% if definition.FA_ENABLED %} -
 {{ definition.TITLE }}
+
 {{ definition.TITLE }}
{% if announcements.S_DISPLAY_ANNOUNCEMENTS_RVS %}
{{ lang('REPLIES') }}
{{ lang('VIEWS') }}
diff --git a/styles/prosilver/template/portal/modules/calendar_side.html b/styles/prosilver/template/portal/modules/calendar_side.html index a2706c48..e5ff52bc 100644 --- a/styles/prosilver/template/portal/modules/calendar_side.html +++ b/styles/prosilver/template/portal/modules/calendar_side.html @@ -1,6 +1,6 @@ {% for minical in loops.minical %} {% if minical.MODULE_ID eq definition.MODULE_ID %} - + {{ definition.LR_BLOCK_H_L }}{% if definition.S_BLOCK_ICON %} {% if definition.FA_ENABLED %} diff --git a/styles/prosilver/template/portal/modules/news_compact_center.html b/styles/prosilver/template/portal/modules/news_compact_center.html index 50d818b7..9bbfade9 100644 --- a/styles/prosilver/template/portal/modules/news_compact_center.html +++ b/styles/prosilver/template/portal/modules/news_compact_center.html @@ -19,7 +19,7 @@ {% if news_row.S_FIRST_ROW %} {{ definition.CC_BLOCK_H_L }}{% if definition.S_BLOCK_ICON %} {% if definition.FA_ENABLED %} -
 {{ definition.TITLE }}
+
 {{ definition.TITLE }}
{% if news.S_DISPLAY_NEWS_RVS %}
{{ lang('REPLIES') }}
{{ lang('VIEWS') }}
diff --git a/styles/prosilver/theme/portal.css b/styles/prosilver/theme/portal.css index 8ee31392..e71e8722 100644 --- a/styles/prosilver/theme/portal.css +++ b/styles/prosilver/theme/portal.css @@ -5,7 +5,7 @@ } a { - display: inline; + display: inline-block; } ul { @@ -13,7 +13,8 @@ ul { } .b3p-icon { - vertical-align: sub; + vertical-align: middle; + padding: 0 1px 3px 2px; } .portal-navigation{