Improve module icons and update language for icons

This commit is contained in:
Marc Alexander
2023-02-20 20:51:58 +01:00
parent ecc95254f1
commit 9ccf4b81e9
20 changed files with 37 additions and 17 deletions

View File

@@ -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,

View File

@@ -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.<br />An- / abwählen mehrerer Gruppen indem man <samp>Strg</samp> gedrückt hält und klickt.',
'MODULE_IMAGE_WIDTH' => 'Modul Bild Breite',

View File

@@ -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.<br />An- / abwählen mehrerer Gruppen indem man <samp>Strg</samp> gedrückt hält und klickt.',
'MODULE_IMAGE_WIDTH' => 'Modul Bild Breite',

View File

@@ -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, dont select anything.<br />Select/Deselect multiple groups by holding <samp>CTRL</samp> and clicking.',
'MODULE_IMAGE_WIDTH' => 'Module image width',

View File

@@ -55,6 +55,12 @@ class v230_fa extends migration
'\board3\portal\modules\leaders' => 'fa-users',
'\board3\portal\modules\latest_bots' => 'fa-android',
'\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);
}
}
}

View File

@@ -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

View File

@@ -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)

View File

@@ -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

View File

@@ -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

View File

@@ -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

Binary file not shown.

After

Width:  |  Height:  |  Size: 680 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 539 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 411 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 456 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 323 B

View File

@@ -19,7 +19,7 @@
{% if center_row.S_FIRST_ROW %}
{{ definition.CC_BLOCK_H_L }}{% if definition.S_BLOCK_ICON %}
{% if definition.FA_ENABLED %}
<dt style="margin-top: 1px;" id="a_{{ definition.MODULE_ID }}"><i class="icon b3p-icon fa {{ definition.FA_ICON }}" style="font-size: {{ definition.FA_SIZE }}px;" aria-hidden="true"></i>&nbsp;{{ definition.TITLE }}</dt>
<dt style="margin-top: -1px;" id="a_{{ definition.MODULE_ID }}"><i class="icon b3p-icon fa {{ definition.FA_ICON }}" style="font-size: {{ definition.FA_SIZE }}px;" aria-hidden="true"></i>&nbsp;{{ definition.TITLE }}</dt>
{% if announcements.S_DISPLAY_ANNOUNCEMENTS_RVS %}
<dd class="posts responsive-portal-announcements">{{ lang('REPLIES') }}</dd>
<dd class="views responsive-portal-announcements">{{ lang('VIEWS') }}</dd>

View File

@@ -1,6 +1,6 @@
{% for minical in loops.minical %}
{% if minical.MODULE_ID eq definition.MODULE_ID %}
<a id="minical{{ minical.MODULE_ID }}"></a>
<a style="display: inline;" id="minical{{ minical.MODULE_ID }}"></a>
{{ definition.LR_BLOCK_H_L }}{% if definition.S_BLOCK_ICON %}
{% if definition.FA_ENABLED %}
<i class="icon b3p-icon fa {{ definition.FA_ICON }}" style="font-size: {{ definition.FA_SIZE }}px;" aria-hidden="true"></i>

View File

@@ -19,7 +19,7 @@
{% if news_row.S_FIRST_ROW %}
{{ definition.CC_BLOCK_H_L }}{% if definition.S_BLOCK_ICON %}
{% if definition.FA_ENABLED %}
<dt style="margin-top: 1px;" id="a_{{ definition.MODULE_ID }}"><i class="icon b3p-icon fa {{ definition.FA_ICON }}" style="font-size: {{ definition.FA_SIZE }}px;" aria-hidden="true"></i>&nbsp;{{ definition.TITLE }}</dt>
<dt style="margin-top: -1px;" id="a_{{ definition.MODULE_ID }}"><i class="icon b3p-icon fa {{ definition.FA_ICON }}" style="font-size: {{ definition.FA_SIZE }}px;" aria-hidden="true"></i>&nbsp;{{ definition.TITLE }}</dt>
{% if news.S_DISPLAY_NEWS_RVS %}
<dd class="posts responsive-portal-news">{{ lang('REPLIES') }}</dd>
<dd class="views responsive-portal-news">{{ lang('VIEWS') }}</dd>

View File

@@ -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{