From 2dff929782eb5c5c3289b22f64616071c086c7c9 Mon Sep 17 00:00:00 2001 From: Bugo Date: Wed, 29 Sep 2021 07:53:37 +0500 Subject: [PATCH 01/16] Add missing commas --- Sources/LightPortal/addons/TagList/langs/spanish_es.php | 5 ++--- Sources/LightPortal/addons/TagList/langs/spanish_latin.php | 5 ++--- Sources/LightPortal/addons/TopBoards/langs/spanish_es.php | 4 ++-- Sources/LightPortal/addons/TopBoards/langs/spanish_latin.php | 4 ++-- 4 files changed, 8 insertions(+), 10 deletions(-) diff --git a/Sources/LightPortal/addons/TagList/langs/spanish_es.php b/Sources/LightPortal/addons/TagList/langs/spanish_es.php index 7cfc46cf9..973e6066b 100644 --- a/Sources/LightPortal/addons/TagList/langs/spanish_es.php +++ b/Sources/LightPortal/addons/TagList/langs/spanish_es.php @@ -5,8 +5,7 @@ 'title' => 'Lista de etiquetas', 'description' => 'Muestra una lista de etiquetas de las páginas del portal (o temas del foro, si Optimus está instalado).', 'source' => 'Fuente de etiqueta', - 'source_set' => array('Etiquetas de la página del portal', 'Tema de palabras claves') + 'source_set' => array('Etiquetas de la página del portal', 'Tema de palabras claves'), 'sorting' => 'Clasificación de etiquetas', - 'sorting_set' => array('Por nombre', 'Por frecuencia') - + 'sorting_set' => array('Por nombre', 'Por frecuencia'), ]; diff --git a/Sources/LightPortal/addons/TagList/langs/spanish_latin.php b/Sources/LightPortal/addons/TagList/langs/spanish_latin.php index 7cfc46cf9..973e6066b 100644 --- a/Sources/LightPortal/addons/TagList/langs/spanish_latin.php +++ b/Sources/LightPortal/addons/TagList/langs/spanish_latin.php @@ -5,8 +5,7 @@ 'title' => 'Lista de etiquetas', 'description' => 'Muestra una lista de etiquetas de las páginas del portal (o temas del foro, si Optimus está instalado).', 'source' => 'Fuente de etiqueta', - 'source_set' => array('Etiquetas de la página del portal', 'Tema de palabras claves') + 'source_set' => array('Etiquetas de la página del portal', 'Tema de palabras claves'), 'sorting' => 'Clasificación de etiquetas', - 'sorting_set' => array('Por nombre', 'Por frecuencia') - + 'sorting_set' => array('Por nombre', 'Por frecuencia'), ]; diff --git a/Sources/LightPortal/addons/TopBoards/langs/spanish_es.php b/Sources/LightPortal/addons/TopBoards/langs/spanish_es.php index fbe7fb0b4..c94f44301 100644 --- a/Sources/LightPortal/addons/TopBoards/langs/spanish_es.php +++ b/Sources/LightPortal/addons/TopBoards/langs/spanish_es.php @@ -8,6 +8,6 @@ 'entity_type' => 'Qué mostrar en las barras', 'entity_type_set' => array('Varios temas', 'Varias publicaciones'), 'show_numbers_only' => 'Solo mostrar números', - 'topics' => 'tema, temas' - 'posts' => 'publicacion, publicaciones' + 'topics' => 'tema, temas', + 'posts' => 'publicacion, publicaciones', ]; diff --git a/Sources/LightPortal/addons/TopBoards/langs/spanish_latin.php b/Sources/LightPortal/addons/TopBoards/langs/spanish_latin.php index fbe7fb0b4..c94f44301 100644 --- a/Sources/LightPortal/addons/TopBoards/langs/spanish_latin.php +++ b/Sources/LightPortal/addons/TopBoards/langs/spanish_latin.php @@ -8,6 +8,6 @@ 'entity_type' => 'Qué mostrar en las barras', 'entity_type_set' => array('Varios temas', 'Varias publicaciones'), 'show_numbers_only' => 'Solo mostrar números', - 'topics' => 'tema, temas' - 'posts' => 'publicacion, publicaciones' + 'topics' => 'tema, temas', + 'posts' => 'publicacion, publicaciones', ]; From 9ddaff6f0280af0741ce259273789b4e03257289 Mon Sep 17 00:00:00 2001 From: Bugo Date: Thu, 30 Sep 2021 07:35:12 +0500 Subject: [PATCH 02/16] Update UserInfo addon --- .../LightPortal/addons/UserInfo/UserInfo.php | 24 +++++++++++++------ 1 file changed, 17 insertions(+), 7 deletions(-) diff --git a/Sources/LightPortal/addons/UserInfo/UserInfo.php b/Sources/LightPortal/addons/UserInfo/UserInfo.php index 4f478b093..5df046a73 100644 --- a/Sources/LightPortal/addons/UserInfo/UserInfo.php +++ b/Sources/LightPortal/addons/UserInfo/UserInfo.php @@ -96,11 +96,13 @@ public function getData(): array */ public function prepareContent(string $type, int $block_id, int $cache_time, array $parameters) { - global $context, $txt, $scripturl; + global $context, $txt, $scripturl, $modSettings; if ($type !== 'user_info') return; + $fa = !empty($parameters['use_fa_icons']); + if ($context['user']['is_logged']) { $userData = Helpers::cache('user_info_addon_u' . $context['user']['id']) ->setLifeTime($cache_time) @@ -115,8 +117,6 @@ public function prepareContent(string $type, int $block_id, int $cache_time, arr
  • ', $userData['avatar']['image'], '
  • '; } - $fa = !empty($parameters['use_fa_icons']); - echo '
  • ', $userData['primary_group'] ?: ($userData['post_group'] ?: ''), '
  • ', $userData['group_icons'], '
  • '; @@ -148,14 +148,24 @@ public function prepareContent(string $type, int $block_id, int $cache_time, arr ', $fa ? '' : '', ' ', $txt['profile'], ' - ', $fa ? '' : '', ' ', $txt['logout'], ' + ', $fa ? '' : '', ' ', $txt['logout'], ' '; } else { - $this->loadSsi(); - - ssi_welcome(); + echo ' + '; } } } From cf1368cb9bc6e919ecb68ebbb05ed8fb3004e998 Mon Sep 17 00:00:00 2001 From: Bugo Date: Thu, 30 Sep 2021 07:37:06 +0500 Subject: [PATCH 03/16] Add support for OG article tag property --- Sources/LightPortal/Page.php | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/Sources/LightPortal/Page.php b/Sources/LightPortal/Page.php index ca300b9c7..49550ecb4 100644 --- a/Sources/LightPortal/Page.php +++ b/Sources/LightPortal/Page.php @@ -151,8 +151,8 @@ private function setMeta() if (empty($context['lp_page'])) return; + $keywords = []; if (!empty($context['lp_page']['keywords'])) { - $keywords = []; foreach ($context['lp_page']['keywords'] as $id => $key) { $keywords[] = $key['name']; } @@ -165,12 +165,11 @@ private function setMeta() $context['optimus_og_type']['article'] = array( 'published_time' => date('Y-m-d\TH:i:s', $context['lp_page']['created_at']), 'modified_time' => !empty($context['lp_page']['updated_at']) ? date('Y-m-d\TH:i:s', $context['lp_page']['updated_at']) : null, - 'author' => $context['lp_page']['author'] + 'author' => $context['lp_page']['author'], + 'section' => $context['lp_page']['category'] ?? null, + //'tag' => $keywords ); - if (!empty($context['lp_page']['category'])) - $context['optimus_og_type']['article']['section'] = $context['lp_page']['category']; - if (!empty($modSettings['lp_page_og_image']) && !empty($context['lp_page']['image'])) $settings['og_image'] = $context['lp_page']['image']; } From 606aeb2d06be8feeb3d2216f5abec9b4f5e38a51 Mon Sep 17 00:00:00 2001 From: Bugo Date: Thu, 30 Sep 2021 07:37:30 +0500 Subject: [PATCH 04/16] Refactor getText helper --- Sources/LightPortal/Helpers.php | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/Sources/LightPortal/Helpers.php b/Sources/LightPortal/Helpers.php index 475d3bbd4..8b43812e0 100644 --- a/Sources/LightPortal/Helpers.php +++ b/Sources/LightPortal/Helpers.php @@ -219,13 +219,11 @@ public static function getText(int $num, $str): string $str = array_map('trim', $str); // Plural rule #0 (Chinese, Japanese, Persian, Turkish, Thai, Indonesian, Malay) - $rule_zero = array('zh', 'ja', 'fa', 'tr', 'th', 'id', 'ms'); - if (in_array($txt['lang_dictionary'], $rule_zero)) + if (in_array($txt['lang_dictionary'], array('zh', 'ja', 'fa', 'tr', 'th', 'id', 'ms'))) return $num . ' ' . $str[0]; // Plural rule #2 (French, Portuguese_brazilian) - $rule_two = array('fr', 'pt'); - if (in_array($txt['lang_dictionary'], $rule_two)) + if (in_array($txt['lang_dictionary'], array('fr', 'pt'))) return $num . ' ' . $str[($num == 0 || $num == 1) ? 0 : 1]; // Just in case @@ -247,15 +245,13 @@ public static function getText(int $num, $str): string } // Plural rule #7 (Bosnian, Croatian, Serbian, Russian, Ukrainian) - $rule_seven = array('bs', 'hr', 'sr', 'ru', 'uk'); - if (in_array($txt['lang_dictionary'], $rule_seven)) { + if (in_array($txt['lang_dictionary'], array('bs', 'hr', 'sr', 'ru', 'uk'))) { $cases = array(2, 0, 1, 1, 1, 2); return $num . ' ' . $str[($num % 100 > 4 && $num % 100 < 20) ? 2 : $cases[min($num % 10, 5)]]; } // Plural rule #8 (Czech, Slovak) - $rule_eight = array('cs', 'sk'); - if (in_array($txt['lang_dictionary'], $rule_eight)) + if (in_array($txt['lang_dictionary'], array('cs', 'sk'))) return $num . ' ' . $str[$num == 1 ? 0 : (in_array($num, array(2, 3, 4)) ? 1 : 2)]; // Plural rule #9 (Polish) From 1b3286314fcd6f5f5fe8e6a3731a06e64f09376d Mon Sep 17 00:00:00 2001 From: Bugo Date: Thu, 30 Sep 2021 12:50:42 +0500 Subject: [PATCH 05/16] Update UserInfo addon --- Sources/LightPortal/addons/UserInfo/UserInfo.php | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/Sources/LightPortal/addons/UserInfo/UserInfo.php b/Sources/LightPortal/addons/UserInfo/UserInfo.php index 5df046a73..48810b8b9 100644 --- a/Sources/LightPortal/addons/UserInfo/UserInfo.php +++ b/Sources/LightPortal/addons/UserInfo/UserInfo.php @@ -156,12 +156,18 @@ public function prepareContent(string $type, int $block_id, int $cache_time, arr echo '
    • ', $txt['hello_member'], ' ', $txt['guest'], '
    • -
    • ', $txt['avatar'], '
    • -
    • +
    • *
    • +
    • '; + + if ($context['can_register']) { + echo ' ', $fa ? '' : '', ' ', $txt['register'], ' - - + '; + } + + echo ' + ', $fa ? '' : '', ' ', $txt['login'], '
    • From fc8a8db8a5bfd0e8bb77e5ea450d4ee37571c4ff Mon Sep 17 00:00:00 2001 From: Bugo Date: Thu, 30 Sep 2021 12:50:53 +0500 Subject: [PATCH 06/16] Update CONTRIBUTING --- CONTRIBUTING.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index d3609e769..c96c4c08b 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -12,6 +12,7 @@ * Use bug report or feature request templates. ## How to submit a pull request +* Check if the develop branch exists. If it exist use it to pull your request into. * If you want to send a bug fix, use `Fix` word in the title of your PR (i.e. "Fix page permissions"). * If you want to send a new feature or a new translation, use `Add` word in the title of your PR (i.e `Add a new frontpage template`, `Add Chinese translation`). In any case, the title of each of your commits should continue such a phrase — `If applied, this commit will ...` (`Update Polish`, etc.) @@ -67,7 +68,7 @@ $test = isset($variable) ? $variable : 'default_value'; * Use [HTML5](https://www.w3schools.com/html/html5_syntax.asp) ### CSS Styleguide -* You can use CSS or LESS +* Use LESS (portal.less) to modify desired rules. ```less #comment_form { From 1fb0eabefce7d69d2f195d13849ed89e8186b350 Mon Sep 17 00:00:00 2001 From: Bugo Date: Sat, 2 Oct 2021 17:10:20 +0500 Subject: [PATCH 07/16] Add new addons types (block_options and page_options) --- Sources/LightPortal/ManagePlugins.php | 2 +- Sources/LightPortal/Subs.php | 2 +- Themes/default/css/light_portal/portal.css | 6 ++++++ Themes/default/css/light_portal/portal.less | 9 ++++++++- Themes/default/languages/LightPortal/.english.php | 4 +++- Themes/default/languages/LightPortal/.russian.php | 4 +++- 6 files changed, 22 insertions(+), 5 deletions(-) diff --git a/Sources/LightPortal/ManagePlugins.php b/Sources/LightPortal/ManagePlugins.php index abff166ea..96e0df2d1 100644 --- a/Sources/LightPortal/ManagePlugins.php +++ b/Sources/LightPortal/ManagePlugins.php @@ -309,7 +309,7 @@ private function prepareAddonChart() labels: ["' . implode('", "', $context['lp_plugin_types']) . '"], datasets: [{ data: [' . implode(', ', $typeCount) . '], - backgroundColor: ["#667d99", "#48bf83", "#9354ca", "#91ae26", "#ef564f", "#d68b4f", "#4b93d1", "#414141"] + backgroundColor: ["#667d99", "#48bf83", "#9354ca", "#91ae26", "#ef564f", "#d68b4f", "#4b93d1", "#414141", "#8597ad", "#52647a"] }] }, options: { diff --git a/Sources/LightPortal/Subs.php b/Sources/LightPortal/Subs.php index 03f59ea6f..5721daec4 100644 --- a/Sources/LightPortal/Subs.php +++ b/Sources/LightPortal/Subs.php @@ -311,7 +311,7 @@ public static function getPluginTypes(): array { global $txt; - return array_combine(array('block', 'editor', 'comment', 'parser', 'article', 'frontpage', 'impex', 'other'), $txt['lp_plugins_types']); + return array_combine(array('block', 'editor', 'comment', 'parser', 'article', 'frontpage', 'impex', 'other', 'block_options', 'page_options'), $txt['lp_plugins_types']); } /** diff --git a/Themes/default/css/light_portal/portal.css b/Themes/default/css/light_portal/portal.css index 5c8de52a5..42c8a1eae 100644 --- a/Themes/default/css/light_portal/portal.css +++ b/Themes/default/css/light_portal/portal.css @@ -1203,6 +1203,12 @@ section #display_head span { .new_posts.lp_type_other { background: #414141; } +.new_posts.lp_type_block_options { + background: #8597ad; +} +.new_posts.lp_type_page_options { + background: #52647a; +} .lp_categories input { width: 100%; } diff --git a/Themes/default/css/light_portal/portal.less b/Themes/default/css/light_portal/portal.less index a69790665..cf3b26091 100644 --- a/Themes/default/css/light_portal/portal.less +++ b/Themes/default/css/light_portal/portal.less @@ -1486,8 +1486,9 @@ section { } .new_posts { + @block_color: #667d99; &.lp_type_block { - background: #667d99; + background: @block_color; } &.lp_type_editor { background: #48bf83; @@ -1510,6 +1511,12 @@ section { &.lp_type_other { background: #414141; } + &.lp_type_block_options { + background: lighten(@block_color, 10%); + } + &.lp_type_page_options { + background: darken(@block_color, 10%); + } } .lp_categories { diff --git a/Themes/default/languages/LightPortal/.english.php b/Themes/default/languages/LightPortal/.english.php index ee0aea44a..6ed8f865c 100644 --- a/Themes/default/languages/LightPortal/.english.php +++ b/Themes/default/languages/LightPortal/.english.php @@ -269,7 +269,9 @@ $txt['lp_plugins_manage'] = 'Manage plugins'; $txt['lp_plugins_manage_description'] = 'The installed portal plugins are listed here. You can always create a new one using the instructions.'; $txt['lp_plugins_desc'] = 'Plugins extend the capabilities of the portal and its components, providing additional features that are not available in the core.'; -$txt['lp_plugins_types'] = array('Block', 'Editor', 'Comment widget', 'Content parser', 'Processing articles', 'The layout of the frontpage', 'Import and export', 'Other'); +$txt['lp_plugins_types'] = array( + 'Block', 'Editor', 'Comment widget', 'Content parser', 'Processing articles', 'The layout of the frontpage', 'Import and export', 'Other', 'Block options', 'Page options' +); $txt['lp_plugins_requires'] = 'Required plugins for work'; // Tags diff --git a/Themes/default/languages/LightPortal/.russian.php b/Themes/default/languages/LightPortal/.russian.php index d81531e5d..de40d5c6d 100644 --- a/Themes/default/languages/LightPortal/.russian.php +++ b/Themes/default/languages/LightPortal/.russian.php @@ -269,7 +269,9 @@ $txt['lp_plugins_manage'] = 'Управление плагинами'; $txt['lp_plugins_manage_description'] = 'Здесь перечислены установленные плагины портала. Вы всегда можете создать новый, воспользовавшись инструкцией.'; $txt['lp_plugins_desc'] = 'Плагины расширяют возможности портала и его компонентов, предоставляя дополнительные функции, которых нет в ядре.'; -$txt['lp_plugins_types'] = array('Блок', 'Редактор', 'Виджет комментариев', 'Парсер контента', 'Обработка статей', 'Макет главной страницы', 'Импорт и экспорт', 'Разное'); +$txt['lp_plugins_types'] = array( + 'Блок', 'Редактор', 'Виджет комментариев', 'Парсер контента', 'Обработка статей', 'Макет главной страницы', 'Импорт и экспорт', 'Разное', 'Параметры блоков', 'Параметры страниц' +); $txt['lp_plugins_requires'] = 'Требуемые плагины для работы'; // Tags From 7826585d651fd4d80609e5a597835c303711f50a Mon Sep 17 00:00:00 2001 From: Bugo Date: Sat, 2 Oct 2021 17:11:29 +0500 Subject: [PATCH 08/16] Add ids for fa assets --- Sources/LightPortal/Subs.php | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) diff --git a/Sources/LightPortal/Subs.php b/Sources/LightPortal/Subs.php index 5721daec4..f5866fbc5 100644 --- a/Sources/LightPortal/Subs.php +++ b/Sources/LightPortal/Subs.php @@ -78,15 +78,27 @@ public static function loadCssFiles() global $modSettings; if (empty($modSettings['lp_fa_source']) || $modSettings['lp_fa_source'] == 'css_cdn') { - loadCSSFile('https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free@5/css/all.min.css', array('external' => true, 'seed' => false)); + loadCSSFile( + 'https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free@5/css/all.min.css', + array('external' => true, 'seed' => false), + 'portal_fontawesome' + ); } elseif ($modSettings['lp_fa_source'] == 'js_cdn') { - loadJavaScriptFile('https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free@5/js/all.min.js', array('external' => true, 'defer' => true, 'seed' => false)); + loadJavaScriptFile( + 'https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free@5/js/all.min.js', + array('external' => true, 'defer' => true, 'seed' => false), + 'portal_fontawesome' + ); } elseif ($modSettings['lp_fa_source'] == 'css_local') { - loadCSSFile('all.min.css'); + loadCSSFile('all.min.css', [], 'portal_fontawesome'); } elseif ($modSettings['lp_fa_source'] == 'js_local') { - loadJavaScriptFile('all.min.js', array('defer' => true)); + loadJavaScriptFile('all.min.js', array('defer' => true), 'portal_fontawesome'); } elseif ($modSettings['lp_fa_source'] == 'custom' && !empty($modSettings['lp_fa_custom'])) { - loadJavaScriptFile($modSettings['lp_fa_custom'], array('external' => true, 'defer' => true, 'seed' => false, 'attributes' => array('crossorigin' => 'anonymous'))); + loadJavaScriptFile( + $modSettings['lp_fa_custom'], + array('external' => true, 'defer' => true, 'seed' => false, 'attributes' => array('crossorigin' => 'anonymous')), + 'portal_fontawesome' + ); } loadCSSFile('light_portal/flexboxgrid.css'); From c8e6ff5c4251456637e2d3ebf0f731ddb12a4645 Mon Sep 17 00:00:00 2001 From: Bugo Date: Sun, 3 Oct 2021 08:19:44 +0500 Subject: [PATCH 09/16] Improve work with page meta tags --- Sources/LightPortal/Page.php | 36 +++++++++++++++++++++++++----------- 1 file changed, 25 insertions(+), 11 deletions(-) diff --git a/Sources/LightPortal/Page.php b/Sources/LightPortal/Page.php index 49550ecb4..12b22ef4a 100644 --- a/Sources/LightPortal/Page.php +++ b/Sources/LightPortal/Page.php @@ -151,25 +151,39 @@ private function setMeta() if (empty($context['lp_page'])) return; + $context['meta_description'] = $context['lp_page']['description']; + $keywords = []; if (!empty($context['lp_page']['keywords'])) { - foreach ($context['lp_page']['keywords'] as $id => $key) { - $keywords[] = $key['name']; - } + $keywords = array_column($context['lp_page']['keywords'], 'name'); $modSettings['meta_keywords'] = implode(', ', $keywords); } - $context['meta_description'] = $context['lp_page']['description']; - - $context['optimus_og_type']['article'] = array( - 'published_time' => date('Y-m-d\TH:i:s', $context['lp_page']['created_at']), - 'modified_time' => !empty($context['lp_page']['updated_at']) ? date('Y-m-d\TH:i:s', $context['lp_page']['updated_at']) : null, - 'author' => $context['lp_page']['author'], - 'section' => $context['lp_page']['category'] ?? null, - //'tag' => $keywords + $context['meta_tags'][] = array('prefix' => 'article: http://ogp.me/ns/article#', 'property' => 'og:type', 'content' => 'article'); + $context['meta_tags'][] = array('prefix' => 'article: http://ogp.me/ns/article#', 'property' => 'article:author', 'content' => $context['lp_page']['author']); + $context['meta_tags'][] = array( + 'prefix' => 'article: http://ogp.me/ns/article#', + 'property' => 'article:published_time', + 'content' => date('Y-m-d\TH:i:s', $context['lp_page']['created_at']) ); + if (!empty($context['lp_page']['updated_at'])) + $context['meta_tags'][] = array( + 'prefix' => 'article: http://ogp.me/ns/article#', + 'property' => 'article:modified_time', + 'content' => date('Y-m-d\TH:i:s', $context['lp_page']['updated_at']) + ); + + if (!empty($context['lp_page']['category'])) + $context['meta_tags'][] = array('prefix' => 'article: http://ogp.me/ns/article#', 'property' => 'article:section', 'content' => $context['lp_page']['category']); + + if (!empty($keywords)) { + foreach ($keywords as $value) { + $context['meta_tags'][] = array('prefix' => 'article: http://ogp.me/ns/article#', 'property' => 'article:tag', 'content' => $value); + } + } + if (!empty($modSettings['lp_page_og_image']) && !empty($context['lp_page']['image'])) $settings['og_image'] = $context['lp_page']['image']; } From bf9a92ba4b77f246fec88d2c6a272b058abc6cfa Mon Sep 17 00:00:00 2001 From: Bugo Date: Sun, 3 Oct 2021 08:20:37 +0500 Subject: [PATCH 10/16] Update page/block templates --- .../LightPortal/ManageBlocks.template.php | 15 +++----- .../LightPortal/ManagePages.template.php | 15 +++----- Themes/default/css/light_portal/portal.css | 28 +++++---------- Themes/default/css/light_portal/portal.less | 36 ++++--------------- 4 files changed, 25 insertions(+), 69 deletions(-) diff --git a/Themes/default/LightPortal/ManageBlocks.template.php b/Themes/default/LightPortal/ManageBlocks.template.php index 9b08d32eb..efd36fbdf 100644 --- a/Themes/default/LightPortal/ManageBlocks.template.php +++ b/Themes/default/LightPortal/ManageBlocks.template.php @@ -290,16 +290,16 @@ function template_block_post()
      - + - + - '; + '; if ($context['lp_block_tab_tuning']) { echo ' - '; + '; } echo ' @@ -309,12 +309,7 @@ function template_block_post() if (!empty($context['lp_block']['options']['content']) && $context['lp_block']['type'] === 'bbc') { echo ' -
      '; - - template_control_richedit($context['post_box_name'], 'smileyBox_message', 'bbcBox_message'); - - echo ' -
      '; +
      ', template_control_richedit($context['post_box_name'], 'smileyBox_message', 'bbcBox_message'), '
      '; } echo ' diff --git a/Themes/default/LightPortal/ManagePages.template.php b/Themes/default/LightPortal/ManagePages.template.php index 5d65ed6fa..5a9a98e3c 100644 --- a/Themes/default/LightPortal/ManagePages.template.php +++ b/Themes/default/LightPortal/ManagePages.template.php @@ -48,25 +48,20 @@ function template_page_post()
      - + - + - + - +
      '; template_post_tab($fields); if ($context['lp_page']['type'] == 'bbc') { echo ' -
      '; - - template_control_richedit($context['post_box_name'], 'smileyBox_message', 'bbcBox_message'); - - echo ' -
      '; +
      ', template_control_richedit($context['post_box_name'], 'smileyBox_message', 'bbcBox_message'), '
      '; } echo ' diff --git a/Themes/default/css/light_portal/portal.css b/Themes/default/css/light_portal/portal.css index 42c8a1eae..ab109fb23 100644 --- a/Themes/default/css/light_portal/portal.css +++ b/Themes/default/css/light_portal/portal.css @@ -92,29 +92,17 @@ cursor: pointer; color: #888; } -.lp_tabs > label:before { - font-family: "Font Awesome 5 Free"; - margin-right: 10px; -} -.lp_tabs > label[for*="1"]:before { - content: "\f15c"; -} -.lp_tabs > label[for*="2"]:before { - content: "\f084"; -} -.lp_tabs > label[for*="3"]:before { - content: "\f53f"; -} -.lp_tabs > label[for*="4"]:before { - content: "\f509"; +.lp_tabs > label i, +.lp_tabs > label svg { + font-size: 1.2em !important; } @media screen and (max-width: 680px) { - .lp_tabs > label { - font-size: 0; + .lp_tabs > label i, + .lp_tabs > label svg { + font-size: 1.6em !important; } - .lp_tabs > label:before { - margin: 0; - font-size: 1.125rem; + .lp_tabs > label span { + font-size: 0; } } @media screen and (max-width: 400px) { diff --git a/Themes/default/css/light_portal/portal.less b/Themes/default/css/light_portal/portal.less index cf3b26091..863840738 100644 --- a/Themes/default/css/light_portal/portal.less +++ b/Themes/default/css/light_portal/portal.less @@ -193,38 +193,16 @@ color: @tabs-label-hover-color; } - &:before { - font-family: "Font Awesome 5 Free"; - margin-right: 10px; - } - - &[for*="1"] { - &:before { - content: "\f15c"; - } - } - &[for*="2"] { - &:before { - content: "\f084"; - } - } - &[for*="3"] { - &:before { - content: "\f53f"; - } - } - &[for*="4"] { - &:before { - content: "\f509"; - } + i, svg { + font-size: 1.2em !important; } @media screen and (max-width: 680px) { - font-size: 0; - - &:before { - margin: 0; - font-size: 1.125rem; + i, svg { + font-size: 1.6em !important; + } + span { + font-size: 0; } } From 16cfc990e187fe2c791deb0048cfba48494a5cf2 Mon Sep 17 00:00:00 2001 From: Bugo Date: Mon, 4 Oct 2021 22:36:04 +0500 Subject: [PATCH 11/16] Update docs --- docs/plugins/create_new.md | 3 ++- docs/ru/plugins/create_new.md | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/docs/plugins/create_new.md b/docs/plugins/create_new.md index 5351c9021..ded940bcb 100644 --- a/docs/plugins/create_new.md +++ b/docs/plugins/create_new.md @@ -16,6 +16,7 @@ Currently, the following types of addons are available: * 'frontpage' — addons for changing the main page of the portal * 'impex' — addons for importing and exporting various portal elements * 'other' — addons that are not related to any of the categories above +* 'block_options' and 'page_options' — addons that add additional parameters for the corresponding entity (block or page) ## Creating an addon directory Create a separate folder for your addon files, inside `/Sources/LightPortal/addons`. For example, if your addon is called `MyAddon`, the folder structure should look like this: @@ -30,7 +31,7 @@ Create a separate folder for your addon files, inside `/Sources/LightPortal/addo MyAddon.php ``` -The `langs` directory is optional and is intended for language files if they are used in your addon. File `index.php` can be copied from folders of other addons. The file `MyAddon.php` contains addon logic: +File `index.php` can be copied from folders of other addons. The file `MyAddon.php` contains addon logic: ```php Date: Tue, 5 Oct 2021 06:27:42 +0500 Subject: [PATCH 12/16] Update some addons --- Sources/LightPortal/addons/Disqus/langs/english.php | 1 + Sources/LightPortal/addons/Disqus/langs/russian.php | 1 + .../LightPortal/addons/FacebookComments/langs/english.php | 1 + .../LightPortal/addons/FacebookComments/langs/russian.php | 1 + Sources/LightPortal/addons/HidingBlocks/HidingBlocks.php | 2 +- Sources/LightPortal/addons/LanguageAccess/LanguageAccess.php | 2 +- Sources/LightPortal/addons/VkComments/langs/english.php | 5 +++-- Sources/LightPortal/addons/VkComments/langs/russian.php | 1 + 8 files changed, 10 insertions(+), 4 deletions(-) diff --git a/Sources/LightPortal/addons/Disqus/langs/english.php b/Sources/LightPortal/addons/Disqus/langs/english.php index 15cd5e6da..e8cf8acec 100644 --- a/Sources/LightPortal/addons/Disqus/langs/english.php +++ b/Sources/LightPortal/addons/Disqus/langs/english.php @@ -1,6 +1,7 @@ 'Adds the ability to display Disqus comments on portal pages.', 'shortname' => 'Website shortname', 'shortname_subtext' => 'This is used to uniquely identify your website on Disqus.
      Copy your site shortname from the Disqus settings and paste here.', ]; diff --git a/Sources/LightPortal/addons/Disqus/langs/russian.php b/Sources/LightPortal/addons/Disqus/langs/russian.php index 6738fc24c..24ff4b0bb 100644 --- a/Sources/LightPortal/addons/Disqus/langs/russian.php +++ b/Sources/LightPortal/addons/Disqus/langs/russian.php @@ -1,6 +1,7 @@ 'Добавляет возможность отображать комментарии Disqus на страницах портала.', 'shortname' => 'Короткое имя сайта', 'shortname_subtext' => 'Используется для идентификации вашего сайта в Disqus.
      Скопируйте значение shortname из настроек сайта в Disqus и вставьте сюда.', ]; diff --git a/Sources/LightPortal/addons/FacebookComments/langs/english.php b/Sources/LightPortal/addons/FacebookComments/langs/english.php index ef8fd8288..4ee0dd0dc 100644 --- a/Sources/LightPortal/addons/FacebookComments/langs/english.php +++ b/Sources/LightPortal/addons/FacebookComments/langs/english.php @@ -1,6 +1,7 @@ 'Adds the ability to display Facebook comments on portal pages.', 'num_comments_per_page' => 'Number of comments per page', 'dark_themes' => 'Select themes for which the color scheme of the widget should be dark', ]; diff --git a/Sources/LightPortal/addons/FacebookComments/langs/russian.php b/Sources/LightPortal/addons/FacebookComments/langs/russian.php index bb81cbf30..9b289208e 100644 --- a/Sources/LightPortal/addons/FacebookComments/langs/russian.php +++ b/Sources/LightPortal/addons/FacebookComments/langs/russian.php @@ -1,6 +1,7 @@ 'Добавляет возможность отображать комментарии Facebook на страницах портала.', 'num_comments_per_page' => 'Количество комментариев на странице', 'dark_themes' => 'Отметьте темы, при выборе которых цветовая схема виджета должна быть тёмной', ]; diff --git a/Sources/LightPortal/addons/HidingBlocks/HidingBlocks.php b/Sources/LightPortal/addons/HidingBlocks/HidingBlocks.php index 026d1c4b3..089118f54 100644 --- a/Sources/LightPortal/addons/HidingBlocks/HidingBlocks.php +++ b/Sources/LightPortal/addons/HidingBlocks/HidingBlocks.php @@ -21,7 +21,7 @@ class HidingBlocks extends Plugin /** * @var string */ - public $type = 'other'; + public $type = 'block_options'; /** * @var array diff --git a/Sources/LightPortal/addons/LanguageAccess/LanguageAccess.php b/Sources/LightPortal/addons/LanguageAccess/LanguageAccess.php index 64c5915fa..ca0606ddd 100644 --- a/Sources/LightPortal/addons/LanguageAccess/LanguageAccess.php +++ b/Sources/LightPortal/addons/LanguageAccess/LanguageAccess.php @@ -21,7 +21,7 @@ class LanguageAccess extends Plugin /** * @var string */ - public $type = 'other'; + public $type = 'block_options'; /** * Fill additional block classes diff --git a/Sources/LightPortal/addons/VkComments/langs/english.php b/Sources/LightPortal/addons/VkComments/langs/english.php index 84a2e4a5f..6edd1fe98 100644 --- a/Sources/LightPortal/addons/VkComments/langs/english.php +++ b/Sources/LightPortal/addons/VkComments/langs/english.php @@ -1,9 +1,10 @@ 'VKontakte API ID', + 'description' => 'Adds the ability to display VK comments on portal pages.', + 'api_id' => 'VK API ID', 'api_id_subtext' => 'Create application and copy its ID (apiId), to enter here.', 'num_comments_per_page' => 'Number of comments per page', 'allow_attachments' => 'Allow attachments', - 'auto_publish' => 'Post comments on VKontakte user\'s page', + 'auto_publish' => 'Post comments on VK user\'s page', ]; diff --git a/Sources/LightPortal/addons/VkComments/langs/russian.php b/Sources/LightPortal/addons/VkComments/langs/russian.php index d92a88b14..2169d6911 100644 --- a/Sources/LightPortal/addons/VkComments/langs/russian.php +++ b/Sources/LightPortal/addons/VkComments/langs/russian.php @@ -1,6 +1,7 @@ 'Добавляет возможность отображать комментарии ВКонтакте на страницах портала.', 'api_id' => 'ВКонтакте API ID', 'api_id_subtext' => 'Создайте приложение, указав название, адрес и тематику своего форума.
      Затем сохраните изменения и из кода для вставки ниже скопируйте сюда ID приложения (apiId).', 'num_comments_per_page' => 'Количество комментариев на странице', From 0ee60863215dc2aeaeb2964183d4580008a9969d Mon Sep 17 00:00:00 2001 From: Bugo Date: Tue, 5 Oct 2021 06:28:01 +0500 Subject: [PATCH 13/16] Add BootstrapIcons addon --- .../addons/BootstrapIcons/BootstrapIcons.php | 81 +++++++++++++++++++ .../addons/BootstrapIcons/index.php | 9 +++ .../addons/BootstrapIcons/langs/english.php | 5 ++ .../addons/BootstrapIcons/langs/index.php | 9 +++ .../addons/BootstrapIcons/langs/russian.php | 5 ++ 5 files changed, 109 insertions(+) create mode 100644 Sources/LightPortal/addons/BootstrapIcons/BootstrapIcons.php create mode 100644 Sources/LightPortal/addons/BootstrapIcons/index.php create mode 100644 Sources/LightPortal/addons/BootstrapIcons/langs/english.php create mode 100644 Sources/LightPortal/addons/BootstrapIcons/langs/index.php create mode 100644 Sources/LightPortal/addons/BootstrapIcons/langs/russian.php diff --git a/Sources/LightPortal/addons/BootstrapIcons/BootstrapIcons.php b/Sources/LightPortal/addons/BootstrapIcons/BootstrapIcons.php new file mode 100644 index 000000000..204645702 --- /dev/null +++ b/Sources/LightPortal/addons/BootstrapIcons/BootstrapIcons.php @@ -0,0 +1,81 @@ + + * @copyright 2021 Bugo + * @license https://spdx.org/licenses/GPL-3.0-or-later.html GPL-3.0-or-later + * + * @version 1.9 + */ + +namespace Bugo\LightPortal\Addons\BootstrapIcons; + +use Bugo\LightPortal\Addons\Plugin; +use Bugo\LightPortal\Helpers; + +/** + * Generated by Plugin Maker + */ +class BootstrapIcons extends Plugin +{ + /** @var string */ + public $type = 'other'; + + /** + * @return void + */ + public function init() + { + loadCSSFile('https://cdn.jsdelivr.net/npm/bootstrap-icons@1/font/bootstrap-icons.min.css', array('external' => true, 'seed' => false)); + } + + /** + * @param string $template + * @param string $icon + * @return void + */ + public function prepareIconTemplate(string &$template, string $icon) + { + $template = ' '; + } + + /** + * @param array $all_icons + * @param string $template + * @return void + */ + public function prepareIconList(array &$all_icons, string &$template) + { + $content = file_get_contents('https://raw.githubusercontent.com/twbs/icons/main/font/bootstrap-icons.json'); + $icons = json_decode($content); + + if (!empty($icons)) { + foreach ($icons as $icon => $id) { + $all_icons[] = $icon; + } + } + + $template = ' %1$s'; + } + + /** + * @param array $links + * @return void + */ + public function credits(array &$links) + { + $links[] = array( + 'title' => 'Bootstrap Icons', + 'link' => 'https://github.com/twbs/icons', + 'author' => 'The Bootstrap Authors', + 'license' => array( + 'name' => 'the MIT License', + 'link' => 'https://github.com/twbs/icons/blob/main/LICENSE.md' + ) + ); + } +} diff --git a/Sources/LightPortal/addons/BootstrapIcons/index.php b/Sources/LightPortal/addons/BootstrapIcons/index.php new file mode 100644 index 000000000..69278ce68 --- /dev/null +++ b/Sources/LightPortal/addons/BootstrapIcons/index.php @@ -0,0 +1,9 @@ + \ No newline at end of file diff --git a/Sources/LightPortal/addons/BootstrapIcons/langs/english.php b/Sources/LightPortal/addons/BootstrapIcons/langs/english.php new file mode 100644 index 000000000..24747edde --- /dev/null +++ b/Sources/LightPortal/addons/BootstrapIcons/langs/english.php @@ -0,0 +1,5 @@ + 'Support for Bootstrap Icons.', +]; diff --git a/Sources/LightPortal/addons/BootstrapIcons/langs/index.php b/Sources/LightPortal/addons/BootstrapIcons/langs/index.php new file mode 100644 index 000000000..69278ce68 --- /dev/null +++ b/Sources/LightPortal/addons/BootstrapIcons/langs/index.php @@ -0,0 +1,9 @@ + \ No newline at end of file diff --git a/Sources/LightPortal/addons/BootstrapIcons/langs/russian.php b/Sources/LightPortal/addons/BootstrapIcons/langs/russian.php new file mode 100644 index 000000000..d10302b81 --- /dev/null +++ b/Sources/LightPortal/addons/BootstrapIcons/langs/russian.php @@ -0,0 +1,5 @@ + 'Поддержка иконок Bootstrap.', +]; From a7bb9942fbb126f68939842428f236e6cd75fd2a Mon Sep 17 00:00:00 2001 From: Bugo Date: Tue, 5 Oct 2021 06:28:25 +0500 Subject: [PATCH 14/16] Add ExtendedMetaTags addon --- .../ExtendedMetaTags/ExtendedMetaTags.php | 144 ++++++++++++++++++ .../addons/ExtendedMetaTags/index.php | 9 ++ .../addons/ExtendedMetaTags/langs/english.php | 9 ++ .../addons/ExtendedMetaTags/langs/index.php | 9 ++ .../addons/ExtendedMetaTags/langs/russian.php | 9 ++ 5 files changed, 180 insertions(+) create mode 100644 Sources/LightPortal/addons/ExtendedMetaTags/ExtendedMetaTags.php create mode 100644 Sources/LightPortal/addons/ExtendedMetaTags/index.php create mode 100644 Sources/LightPortal/addons/ExtendedMetaTags/langs/english.php create mode 100644 Sources/LightPortal/addons/ExtendedMetaTags/langs/index.php create mode 100644 Sources/LightPortal/addons/ExtendedMetaTags/langs/russian.php diff --git a/Sources/LightPortal/addons/ExtendedMetaTags/ExtendedMetaTags.php b/Sources/LightPortal/addons/ExtendedMetaTags/ExtendedMetaTags.php new file mode 100644 index 000000000..b37f7bd88 --- /dev/null +++ b/Sources/LightPortal/addons/ExtendedMetaTags/ExtendedMetaTags.php @@ -0,0 +1,144 @@ + + * @copyright 2021 Bugo + * @license https://spdx.org/licenses/GPL-3.0-or-later.html GPL-3.0-or-later + * + * @version 1.9.3 + */ + +namespace Bugo\LightPortal\Addons\ExtendedMetaTags; + +use Bugo\LightPortal\Addons\Plugin; +use Bugo\LightPortal\Helpers; + +/** + * Generated by PluginMaker + */ +class ExtendedMetaTags extends Plugin +{ + /** @var string */ + public $type = 'page_options'; + + /** + * @var array + */ + private $meta_robots = ['', 'index, follow', 'index, nofollow', 'noindex, follow', 'noindex, nofollow']; + + /** + * @var array + */ + private $meta_rating = ['', '14 years', 'adult', 'general', 'mature', 'restricted', 'save for kids']; + + /** + * @return void + */ + public function init() + { + add_integration_function('integrate_theme_context', __CLASS__ . '::themeContext#', false, __FILE__); + } + + /** + * @return void + */ + public function themeContext() + { + global $context; + + if (Helpers::request()->has('page') === false || empty($context['lp_page']['options'])) + return; + + if (!empty($context['lp_page']['options']['meta_robots'])) { + $context['meta_tags'][] = array('name' => 'robots', 'content' => $context['lp_page']['options']['meta_robots']); + } + + if (!empty($context['lp_page']['options']['meta_rating'])) { + $context['meta_tags'][] = array('name' => 'rating', 'content' => $context['lp_page']['options']['meta_rating']); + } + } + + /** + * @param array $options + * @return void + */ + public function pageOptions(&$options) + { + $options['meta_robots'] = ''; + $options['meta_rating'] = ''; + } + + /** + * @param array $parameters + * @return void + */ + public function validatePageData(&$parameters) + { + $parameters += array( + 'meta_robots' => FILTER_SANITIZE_STRING, + 'meta_rating' => FILTER_SANITIZE_STRING, + ); + } + + /** + * @return void + */ + public function preparePageFields() + { + global $context, $txt; + + // Meta robots + $context['posting_fields']['meta_robots']['label']['text'] = $txt['lp_extended_meta_tags']['meta_robots']; + $context['posting_fields']['meta_robots']['input'] = array( + 'type' => 'select', + 'tab' => 'seo' + ); + + $robots_variants = array_combine($this->meta_robots, $txt['lp_extended_meta_tags']['meta_robots_set']); + + foreach ($robots_variants as $value => $title) { + $context['posting_fields']['meta_robots']['input']['options'][$title] = array( + 'value' => $value, + 'selected' => $value == $context['lp_page']['options']['meta_robots'] + ); + } + + addInlineJavaScript(' + new SlimSelect({ + select: "#meta_robots", + showSearch: false, + hideSelectedOption: true, + closeOnSelect: true, + showContent: "down" + });', true); + + // Meta rating + $context['posting_fields']['meta_rating']['label']['text'] = $txt['lp_extended_meta_tags']['meta_rating']; + $context['posting_fields']['meta_rating']['input'] = array( + 'type' => 'select', + 'tab' => 'seo' + ); + + $rating_variants = array_combine($this->meta_rating, $txt['lp_extended_meta_tags']['meta_rating_set']); + + foreach ($rating_variants as $value => $title) { + $context['posting_fields']['meta_rating']['input']['options'][$title] = array( + 'value' => $value, + 'selected' => $value == $context['lp_page']['options']['meta_rating'] + ); + } + + addInlineJavaScript(' + new SlimSelect({ + select: "#meta_rating", + showSearch: false, + hideSelectedOption: true, + closeOnSelect: true, + showContent: "down" + });', true); + } +} diff --git a/Sources/LightPortal/addons/ExtendedMetaTags/index.php b/Sources/LightPortal/addons/ExtendedMetaTags/index.php new file mode 100644 index 000000000..69278ce68 --- /dev/null +++ b/Sources/LightPortal/addons/ExtendedMetaTags/index.php @@ -0,0 +1,9 @@ + \ No newline at end of file diff --git a/Sources/LightPortal/addons/ExtendedMetaTags/langs/english.php b/Sources/LightPortal/addons/ExtendedMetaTags/langs/english.php new file mode 100644 index 000000000..f08baedb4 --- /dev/null +++ b/Sources/LightPortal/addons/ExtendedMetaTags/langs/english.php @@ -0,0 +1,9 @@ + 'Adds additional meta tags for portal pages.', + 'meta_robots' => 'Robots (bot behavior management)', + 'meta_robots_set' => array($txt['no'], 'index, follow', 'index, nofollow', 'noindex, follow', 'noindex, nofollow'), + 'meta_rating' => 'Age rating', + 'meta_rating_set' => array($txt['no'], '14-year-old audience', 'adults (18+)', 'general category', 'mature (17+)', 'restricted', 'safe for kids'), +]; diff --git a/Sources/LightPortal/addons/ExtendedMetaTags/langs/index.php b/Sources/LightPortal/addons/ExtendedMetaTags/langs/index.php new file mode 100644 index 000000000..69278ce68 --- /dev/null +++ b/Sources/LightPortal/addons/ExtendedMetaTags/langs/index.php @@ -0,0 +1,9 @@ + \ No newline at end of file diff --git a/Sources/LightPortal/addons/ExtendedMetaTags/langs/russian.php b/Sources/LightPortal/addons/ExtendedMetaTags/langs/russian.php new file mode 100644 index 000000000..7b2076c6e --- /dev/null +++ b/Sources/LightPortal/addons/ExtendedMetaTags/langs/russian.php @@ -0,0 +1,9 @@ + 'Добавляет дополнительные мета-теги для страниц портала.', + 'meta_robots' => 'Robots (управление поведением ботов)', + 'meta_robots_set' => array($txt['no'], 'index, follow', 'index, nofollow', 'noindex, follow', 'noindex, nofollow'), + 'meta_rating' => 'Возрастной рейтинг', + 'meta_rating_set' => array($txt['no'], '14-летняя аудитория', 'для взрослых (18+)', 'общая категория', '17+', 'ограниченная', 'безопасно для детей'), +]; From a99e79904c13dd88a0376682664fa8c79a8204f6 Mon Sep 17 00:00:00 2001 From: Bugo Date: Tue, 5 Oct 2021 06:28:50 +0500 Subject: [PATCH 15/16] Update languages --- Themes/default/languages/LightPortal/.english.php | 2 +- Themes/default/languages/LightPortal/.french.php | 2 +- Themes/default/languages/LightPortal/.polish.php | 4 +++- Themes/default/languages/LightPortal/.spanish_es.php | 4 ++-- Themes/default/languages/LightPortal/.spanish_latin.php | 4 ++-- Themes/default/languages/LightPortal/.turkish.php | 4 +++- Themes/default/languages/LightPortal/.ukrainian.php | 4 +++- 7 files changed, 15 insertions(+), 9 deletions(-) diff --git a/Themes/default/languages/LightPortal/.english.php b/Themes/default/languages/LightPortal/.english.php index 6ed8f865c..3eb42a802 100644 --- a/Themes/default/languages/LightPortal/.english.php +++ b/Themes/default/languages/LightPortal/.english.php @@ -225,7 +225,7 @@ $txt['lp_pages_manage_description'] = 'Use the corresponding button to add a new page.'; $txt['lp_pages_add'] = 'Add page'; $txt['lp_pages_add_title'] = 'Adding a page'; -$txt['lp_pages_add_description'] = 'Fill the page title. After that, you can change its type, use preview and save.'; +$txt['lp_pages_add_description'] = 'Fill in the page title. After that, you can change its type, use preview and save.'; $txt['lp_pages_edit_title'] = 'Editing page'; $txt['lp_pages_edit_description'] = 'Make the necessary changes.'; $txt['lp_pages_extra'] = 'Portal pages'; diff --git a/Themes/default/languages/LightPortal/.french.php b/Themes/default/languages/LightPortal/.french.php index bf63161bb..f7c124c0a 100644 --- a/Themes/default/languages/LightPortal/.french.php +++ b/Themes/default/languages/LightPortal/.french.php @@ -240,7 +240,7 @@ $txt['lp_plugins_manage'] = 'Gérer les plugins'; $txt['lp_plugins_manage_description'] = 'Les plugins de portail installés sont répertoriés ici. Vous pouvez toujours en créer un nouveau en utilisant les instructions ou le bouton "+" ci-dessous.'; $txt['lp_plugins_desc'] = 'Les plugins étendent les capacités du portail et de ses composants, en fournissant des fonctionnalités supplémentaires qui ne sont pas disponibles dans le système de base'; -$txt['lp_plugins_types'] = array('Bloc', 'Editeur', 'Widget des commenatires', 'Analyseur de contenu', 'Gestion des articles', 'La mise en page de la page d\'accueil', 'Importer et exporter', 'Autre'); +$txt['lp_plugins_types'] = array('Bloc', 'Editeur', 'Widget des commenatires', 'Analyseur de contenu', 'Gestion des articles', 'La mise en page de la page d\'accueil', 'Importer et exporter', 'Autre', 'Block options', 'Page options'); // Tags $txt['lp_all_page_tags'] = 'Toutes les balises de page de portail'; diff --git a/Themes/default/languages/LightPortal/.polish.php b/Themes/default/languages/LightPortal/.polish.php index f21b87727..35a765a11 100644 --- a/Themes/default/languages/LightPortal/.polish.php +++ b/Themes/default/languages/LightPortal/.polish.php @@ -242,7 +242,9 @@ $txt['lp_plugins_manage'] = 'Manage plugins'; $txt['lp_plugins_manage_description'] = 'Tutaj znajdują się zainstalowane wtyczki portalu. You can always create a new one using the instructions or the "+" button below.'; $txt['lp_plugins_desc'] = 'Plugins extend the capabilities of the portal and its components, providing additional features that are not available in the core.'; -$txt['lp_plugins_types'] = array('Blok', 'Edytor', 'Widget komentarzy', 'Parser zawartości', 'Przetwarzanie artykułów', 'The layout of the frontpage', 'Import and export', 'Inne'); +$txt['lp_plugins_types'] = array( + 'Blok', 'Edytor', 'Widget komentarzy', 'Parser zawartości', 'Przetwarzanie artykułów', 'The layout of the frontpage', 'Import and export', 'Inne', 'Block options', 'Page options' +); // Tags $txt['lp_all_page_tags'] = 'Wszystkie tagi stron portalu'; diff --git a/Themes/default/languages/LightPortal/.spanish_es.php b/Themes/default/languages/LightPortal/.spanish_es.php index 210da1aa4..019e504ec 100644 --- a/Themes/default/languages/LightPortal/.spanish_es.php +++ b/Themes/default/languages/LightPortal/.spanish_es.php @@ -258,9 +258,9 @@ // Plugins $txt['lp_plugins'] = 'Complementos'; $txt['lp_plugins_manage'] = 'Administrar complementos'; -$txt['lp_plugins_manage_description'] = 'Los plugins instalados portal se enumeran aquí. Siempre puedes crear uno nuevo usando las instrucciones. or the "+" button below.'; +$txt['lp_plugins_manage_description'] = 'Los plugins instalados portal se enumeran aquí. Siempre puedes crear uno nuevo usando las instrucciones or the "+" button below.'; $txt['lp_plugins_desc'] = 'Los complementos amplían las capacidades del portal y sus componentes, proporcionando características adicionales que no están disponibles en el núcleo.'; -$txt['lp_plugins_types'] = array('Bloque', 'Editor', 'Widget de comentarios', 'Analizador de contenido', 'Procesamiento de artículos', 'El diseño de la página principal', 'Importar y exportar', 'Otros'); +$txt['lp_plugins_types'] = array('Bloque', 'Editor', 'Widget de comentarios', 'Analizador de contenido', 'Procesamiento de artículos', 'El diseño de la página principal', 'Importar y exportar', 'Otros', 'Opciones de bloque', 'Opciones de página'); $txt['lp_plugins_requires'] = 'Complementos necesarios para trabajar'; // Tags diff --git a/Themes/default/languages/LightPortal/.spanish_latin.php b/Themes/default/languages/LightPortal/.spanish_latin.php index 210da1aa4..019e504ec 100644 --- a/Themes/default/languages/LightPortal/.spanish_latin.php +++ b/Themes/default/languages/LightPortal/.spanish_latin.php @@ -258,9 +258,9 @@ // Plugins $txt['lp_plugins'] = 'Complementos'; $txt['lp_plugins_manage'] = 'Administrar complementos'; -$txt['lp_plugins_manage_description'] = 'Los plugins instalados portal se enumeran aquí. Siempre puedes crear uno nuevo usando las instrucciones. or the "+" button below.'; +$txt['lp_plugins_manage_description'] = 'Los plugins instalados portal se enumeran aquí. Siempre puedes crear uno nuevo usando las instrucciones or the "+" button below.'; $txt['lp_plugins_desc'] = 'Los complementos amplían las capacidades del portal y sus componentes, proporcionando características adicionales que no están disponibles en el núcleo.'; -$txt['lp_plugins_types'] = array('Bloque', 'Editor', 'Widget de comentarios', 'Analizador de contenido', 'Procesamiento de artículos', 'El diseño de la página principal', 'Importar y exportar', 'Otros'); +$txt['lp_plugins_types'] = array('Bloque', 'Editor', 'Widget de comentarios', 'Analizador de contenido', 'Procesamiento de artículos', 'El diseño de la página principal', 'Importar y exportar', 'Otros', 'Opciones de bloque', 'Opciones de página'); $txt['lp_plugins_requires'] = 'Complementos necesarios para trabajar'; // Tags diff --git a/Themes/default/languages/LightPortal/.turkish.php b/Themes/default/languages/LightPortal/.turkish.php index 3ef50bc95..8e6e63074 100644 --- a/Themes/default/languages/LightPortal/.turkish.php +++ b/Themes/default/languages/LightPortal/.turkish.php @@ -242,7 +242,9 @@ $txt['lp_plugins_manage'] = 'Eklentileri yönet'; $txt['lp_plugins_manage_description'] = 'Yüklü portal eklentileri burada listelenmiştir. Talimatları veya aşağıdaki "+" düğmesini kullanarak yeni bir tane oluşturabilirsiniz.'; $txt['lp_plugins_desc'] = 'Eklentiler, portalın ve bileşenlerinin yeteneklerini artırarak çekirdekte bulunmayan ek özellikler sağlar.'; -$txt['lp_plugins_types'] = array('Blok', 'Düzenleyici', 'Yorum widget\'i', 'İçerik ayrıştırıcı', 'Makaleler işleniyor', 'Ön sayfanın düzeni', 'İçe ve dışa aktar', 'Diğer'); +$txt['lp_plugins_types'] = array( + 'Blok', 'Düzenleyici', 'Yorum widget\'i', 'İçerik ayrıştırıcı', 'Makaleler işleniyor', 'Ön sayfanın düzeni', 'İçe ve dışa aktar', 'Diğer', 'Block options', 'Page options' +); // Etiketler $txt['lp_all_page_tags'] = 'Tüm portal sayfası etiketleri'; diff --git a/Themes/default/languages/LightPortal/.ukrainian.php b/Themes/default/languages/LightPortal/.ukrainian.php index ca270c7ba..204cfdeaf 100644 --- a/Themes/default/languages/LightPortal/.ukrainian.php +++ b/Themes/default/languages/LightPortal/.ukrainian.php @@ -260,7 +260,9 @@ $txt['lp_plugins_manage'] = 'Управление плагинами'; $txt['lp_plugins_manage_description'] = 'Тут перераховані встановлені плагіни порталу. Ви завжди можете створити новий, скориставшись інструкцією.'; $txt['lp_plugins_desc'] = 'Плагіни розширюють можливості порталу і його компонентів, надаючи додаткові функції, яких немає в ядрі.'; -$txt['lp_plugins_types'] = array('Блок', 'Редактор', 'Віджет коментарів', 'Парсер контента', 'Обробка статей', 'Макет головної сторінки', 'Імпорт та експорт', 'Різне'); +$txt['lp_plugins_types'] = array( + 'Блок', 'Редактор', 'Віджет коментарів', 'Парсер контента', 'Обробка статей', 'Макет головної сторінки', 'Імпорт та експорт', 'Різне', 'Параметри блоків', 'Параметри сторінок' +); $txt['lp_plugins_requires'] = 'Необхідні плагіни для роботи'; // Tags From d6f8302553272d7b086ccc8a65a03cea48e54d5c Mon Sep 17 00:00:00 2001 From: Bugo Date: Tue, 5 Oct 2021 06:31:13 +0500 Subject: [PATCH 16/16] Prepare for release --- Sources/LightPortal/Integration.php | 4 ++-- package-info.xml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Sources/LightPortal/Integration.php b/Sources/LightPortal/Integration.php index 48fd12833..203c08a92 100644 --- a/Sources/LightPortal/Integration.php +++ b/Sources/LightPortal/Integration.php @@ -78,8 +78,8 @@ public function userInfo() $lp_constants = [ 'LP_NAME' => 'Light Portal', - 'LP_VERSION' => '1.9.3', - 'LP_RELEASE_DATE' => '2021-09-29', + 'LP_VERSION' => '1.9.4', + 'LP_RELEASE_DATE' => '2021-10-05', 'LP_ADDON_DIR' => $sourcedir . '/LightPortal/addons', 'LP_CACHE_TIME' => $modSettings['lp_cache_update_interval'] ?? 3600, 'LP_ACTION' => $modSettings['lp_portal_action'] ?? 'portal', diff --git a/package-info.xml b/package-info.xml index ce040e4ce..f5da41255 100644 --- a/package-info.xml +++ b/package-info.xml @@ -3,7 +3,7 @@ Bugo:LightPortal Light Portal - 1.9.3 + 1.9.4 modification