From 68cf9864c63d147efd541c0224bc061d328c0ec0 Mon Sep 17 00:00:00 2001 From: Marc Alexander Date: Mon, 13 Feb 2023 20:49:53 +0100 Subject: [PATCH] Add support for module icons in center column --- acp/portal_module.php | 4 ++-- modules/announcements.php | 2 +- modules/calendar.php | 4 ++-- modules/custom.php | 3 +-- modules/forumlist.php | 2 +- modules/news.php | 2 +- modules/recent.php | 2 +- modules/welcome.php | 2 +- .../template/portal/_block_config.html | 4 ++-- .../portal/modules/announcements_center.html | 8 ++++++- .../modules/announcements_center_compact.html | 21 ++++++++++++++++--- .../portal/modules/attachments_center.html | 8 ++++++- .../portal/modules/attachments_side.html | 2 +- .../portal/modules/birthdays_side.html | 2 +- .../portal/modules/calendar_side.html | 2 +- .../template/portal/modules/clock_side.html | 2 +- .../portal/modules/custom_center.html | 8 ++++++- .../template/portal/modules/custom_side.html | 2 +- .../portal/modules/donation_center.html | 8 ++++++- .../portal/modules/donation_side.html | 2 +- .../template/portal/modules/friends_side.html | 2 +- .../portal/modules/latest_bots_side.html | 2 +- .../portal/modules/latest_members_side.html | 2 +- .../portal/modules/leaders_ext_side.html | 2 +- .../template/portal/modules/leaders_side.html | 2 +- .../template/portal/modules/link_us_side.html | 2 +- .../template/portal/modules/links_side.html | 2 +- .../portal/modules/login_box_side.html | 2 +- .../portal/modules/main_menu_side.html | 2 +- .../template/portal/modules/news_center.html | 8 ++++++- .../portal/modules/news_compact_center.html | 21 ++++++++++++++++--- .../template/portal/modules/poll_center.html | 8 ++++++- .../template/portal/modules/poll_side.html | 2 +- .../portal/modules/random_member_side.html | 2 +- .../portal/modules/recent_center.html | 8 ++++++- .../template/portal/modules/search_side.html | 2 +- .../portal/modules/statistics_side.html | 2 +- .../portal/modules/stylechanger_side.html | 2 +- .../portal/modules/topposters_side.html | 2 +- .../portal/modules/user_menu_side.html | 2 +- .../portal/modules/welcome_center.html | 8 ++++++- .../portal/modules/whois_online_center.html | 8 ++++++- styles/prosilver/theme/portal.css | 4 ++++ 43 files changed, 137 insertions(+), 50 deletions(-) diff --git a/acp/portal_module.php b/acp/portal_module.php index 2bb8dc62..c1673d91 100644 --- a/acp/portal_module.php +++ b/acp/portal_module.php @@ -101,7 +101,7 @@ class portal_module 'board3_display_jumpbox' => array('lang' => 'PORTAL_DISPLAY_JUMPBOX', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true), 'legend2' => 'ACP_PORTAL_COLUMN_WIDTH_SETTINGS', - 'board3_left_column_width' => array('lang' => 'PORTAL_LEFT_COLUMN_WIDTH', 'validate' => 'int', 'type' => 'text:3:3', 'explain' => true), + 'board3_left_column_width' => ['lang' => 'PORTAL_LEFT_COLUMN_WIDTH', 'validate' => 'int', 'type' => 'number:150:400', 'explain' => true, 'append' => ' ' . $this->user->lang('PIXEL')], 'board3_right_column_width' => ['lang' => 'PORTAL_RIGHT_COLUMN_WIDTH', 'validate' => 'int', 'type' => 'number:150:400', 'explain' => true, 'append' => ' ' . $this->user->lang('PIXEL')], 'legend3' => 'ACP_PORTAL_SHOW_ALL', @@ -145,7 +145,7 @@ class portal_module 'MODULE_FA' => $module_data['module_fa_icon'], 'MODULE_FA_SIZE' => $module_data['module_fa_size'], 'MODULE_ENABLED' => ($module_data['module_status']) ? true : false, - 'MODULE_SHOW_IMAGE' => (in_array($this->portal_columns->number_to_string($module_data['module_column']), array('center', 'top', 'bottom'))) ? false : true, + 'MODULE_SHOW_IMAGE' => (in_array($this->portal_columns->number_to_string($module_data['module_column']), array(''))) ? false : true, )); if ($module_data['module_classname'] != '\board3\portal\modules\custom') diff --git a/modules/announcements.php b/modules/announcements.php index dced178f..82e4cbd7 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 = ''; + public $image_src = 'portal_custom.png'; /** * module-language file diff --git a/modules/calendar.php b/modules/calendar.php index a99036cf..9ca793e1 100644 --- a/modules/calendar.php +++ b/modules/calendar.php @@ -188,8 +188,8 @@ class calendar extends module_base // output our general calendar bits $down = $this->mini_cal_month - 1; $up = $this->mini_cal_month + 1; - $prev_month = ''; - $next_month = ''; + $prev_month = ''; + $next_month = ''; $this->template->assign_block_vars('minical', array( 'S_SUNDAY_FIRST' => ($this->config['board3_sunday_first_' . $module_id]) ? true : false, diff --git a/modules/custom.php b/modules/custom.php index b181aa64..b965d2e3 100644 --- a/modules/custom.php +++ b/modules/custom.php @@ -405,8 +405,7 @@ class custom extends module_base 'template' => 'custom_' . $type . '.html', 'title' => $title, 'code' => $assign_code, - // no image for center blocks - 'image_src' => ($type === 'center') ? '' : ((!empty($this->config['board3_custom_' . $module_id . '_image_src'])) ? $this->config['board3_custom_' . $module_id . '_image_src'] : $this->image_src), + 'image_src' => ((!empty($this->config['board3_custom_' . $module_id . '_image_src'])) ? $this->config['board3_custom_' . $module_id . '_image_src'] : $this->image_src), ); } } diff --git a/modules/forumlist.php b/modules/forumlist.php index 6d7c7246..31a3d72e 100644 --- a/modules/forumlist.php +++ b/modules/forumlist.php @@ -33,7 +33,7 @@ class forumlist extends module_base * Default module-image: * file must be in "{T_THEME_PATH}/images/portal/" */ - public $image_src = ''; + public $image_src = 'portal_custom.png'; /** * module-language file diff --git a/modules/news.php b/modules/news.php index 242734a3..fc20a21d 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 = ''; + public $image_src = 'portal_custom.png'; /** * module-language file diff --git a/modules/recent.php b/modules/recent.php index 9033f782..e1a488b6 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 = ''; + public $image_src = 'portal_custom.png'; /** * module-language file diff --git a/modules/welcome.php b/modules/welcome.php index b4f60246..fac82ec8 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 = ''; + public $image_src = 'portal_custom.png'; /** * module-language file diff --git a/styles/prosilver/template/portal/_block_config.html b/styles/prosilver/template/portal/_block_config.html index fc9aa34e..20c6b9b4 100644 --- a/styles/prosilver/template/portal/_block_config.html +++ b/styles/prosilver/template/portal/_block_config.html @@ -5,13 +5,13 @@ {% DEFINE LR_BLOCK_F_R = '
' %} -{% DEFINE C_BLOCK_H_L = '