From c855f1b0c55362bb54b2b411548c9a0c05854f27 Mon Sep 17 00:00:00 2001 From: Bugo Date: Wed, 7 Apr 2021 21:41:38 +0500 Subject: [PATCH 01/24] Make some refactoring --- Sources/LightPortal/Helpers.php | 4 ++-- Sources/LightPortal/ManageBlocks.php | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Sources/LightPortal/Helpers.php b/Sources/LightPortal/Helpers.php index e55fd951f..b16d4d3e0 100644 --- a/Sources/LightPortal/Helpers.php +++ b/Sources/LightPortal/Helpers.php @@ -383,7 +383,7 @@ public static function getDateFormat(int $day, string $month, string $postfix): * @param string $type * @return void */ - public static function findMissingBlockTypes(string $type) + public static function prepareMissingBlockTypes(string $type) { global $txt, $context; @@ -706,7 +706,7 @@ public static function validate(string $key, $type = 'string') * Получаем число в приятном глазу формате (для чисел более 10к) * * @param int $value - * @return float + * @return int|float */ public static function getFriendlyNumber(int $value = 0) { diff --git a/Sources/LightPortal/ManageBlocks.php b/Sources/LightPortal/ManageBlocks.php index 03ed4dfdb..bcf411bca 100644 --- a/Sources/LightPortal/ManageBlocks.php +++ b/Sources/LightPortal/ManageBlocks.php @@ -90,7 +90,7 @@ public function getAll(): array $current_blocks[$row['placement']][$row['block_id']]['title'][$row['lang']] = $row['title']; - Helpers::findMissingBlockTypes($row['type']); + Helpers::prepareMissingBlockTypes($row['type']); } $smcFunc['db_free_result']($request); From 6d1f415966a3ef9b57c41898a7c7d381bddc6de5 Mon Sep 17 00:00:00 2001 From: Bugo Date: Wed, 7 Apr 2021 21:43:08 +0500 Subject: [PATCH 02/24] Fix empty teaser for BBC articles --- Sources/LightPortal/Helpers.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Sources/LightPortal/Helpers.php b/Sources/LightPortal/Helpers.php index b16d4d3e0..201ba4ee9 100644 --- a/Sources/LightPortal/Helpers.php +++ b/Sources/LightPortal/Helpers.php @@ -538,7 +538,7 @@ public static function getTeaser($text): string if (empty($text)) return '...'; - $text = strip_tags(explode('
', $text)[0]); + $text = strip_tags($text); return $text ?: '...'; } From b2462d088b7e1146b2ef67c6cdfebdd85c11c822 Mon Sep 17 00:00:00 2001 From: Bugo Date: Thu, 8 Apr 2021 23:15:54 +0500 Subject: [PATCH 03/24] Add "Save and Exit" button in the editing area of blocks/pages --- Sources/LightPortal/ManageBlocks.php | 11 ++++++----- Sources/LightPortal/ManagePages.php | 9 +++++---- Themes/default/LightPortal/ManageBlocks.template.php | 3 ++- Themes/default/LightPortal/ManagePages.template.php | 1 + Themes/default/languages/LightPortal/.english.php | 1 + Themes/default/languages/LightPortal/.russian.php | 1 + Themes/default/languages/LightPortal/.ukrainian.php | 1 + 7 files changed, 17 insertions(+), 10 deletions(-) diff --git a/Sources/LightPortal/ManageBlocks.php b/Sources/LightPortal/ManageBlocks.php index bcf411bca..8b5b6ef1f 100644 --- a/Sources/LightPortal/ManageBlocks.php +++ b/Sources/LightPortal/ManageBlocks.php @@ -390,7 +390,7 @@ private function validateData() { global $context, $modSettings; - if (Helpers::post()->has('save') || Helpers::post()->has('preview')) { + if (Helpers::post()->has('save') || Helpers::post()->has('save_exit') || Helpers::post()->has('preview')) { $args = array( 'block_id' => FILTER_VALIDATE_INT, 'icon' => FILTER_SANITIZE_STRING, @@ -453,7 +453,7 @@ private function validateData() if (!empty($context['lp_block']['options']['parameters'])) { foreach ($context['lp_block']['options']['parameters'] as $option => $value) { - if (!empty($parameters[$option]) && !empty($post_data['parameters']) && $post_data['parameters'][$option] === null) { + if (!empty($parameters[$option]) && !empty($post_data['parameters']) && !isset($post_data['parameters'][$option])) { if ($parameters[$option] == FILTER_VALIDATE_BOOLEAN) $post_data['parameters'][$option] = 0; @@ -851,11 +851,11 @@ private function getPriority(): int * @param int $item * @return int|void */ - private function setData(int $item = 0): int + private function setData(int $item = 0) { global $context; - if (!empty($context['post_errors']) || (Helpers::post()->has('save') === false && Helpers::post()->has('clone') === false)) + if (!empty($context['post_errors']) || (Helpers::post()->has('save') === false && Helpers::post()->has('save_exit') === false && Helpers::post()->has('clone') === false)) return 0; checkSubmitOnce('check'); @@ -871,7 +871,8 @@ private function setData(int $item = 0): int Helpers::cache()->flush(); - redirectexit('action=admin;area=lp_blocks;sa=main'); + if (Helpers::post()->has('save_exit')) + redirectexit('action=admin;area=lp_blocks;sa=main'); } /** diff --git a/Sources/LightPortal/ManagePages.php b/Sources/LightPortal/ManagePages.php index 1f81aaa99..603087191 100644 --- a/Sources/LightPortal/ManagePages.php +++ b/Sources/LightPortal/ManagePages.php @@ -640,7 +640,7 @@ private function validateData() { global $context, $modSettings, $user_info; - if (Helpers::post()->has('save') || Helpers::post()->has('preview')) { + if (Helpers::post()->has('save') || Helpers::post()->has('save_exit') || Helpers::post()->has('preview')) { $args = array( 'category' => FILTER_VALIDATE_INT, 'page_author' => FILTER_VALIDATE_INT, @@ -707,7 +707,7 @@ private function validateData() ); foreach ($context['lp_page']['options'] as $option => $value) { - if (!empty($parameters[$option]) && !empty($post_data) && $post_data[$option] === null) { + if (!empty($parameters[$option]) && !empty($post_data) && !isset($post_data[$option])) { if ($parameters[$option] == FILTER_VALIDATE_BOOLEAN) $post_data[$option] = 0; @@ -1176,7 +1176,7 @@ private function setData(int $item = 0) { global $context; - if (!empty($context['post_errors']) || Helpers::post()->has('save') === false) + if (!empty($context['post_errors']) || (Helpers::post()->has('save') === false && Helpers::post()->has('save_exit') === false)) return; checkSubmitOnce('check'); @@ -1192,7 +1192,8 @@ private function setData(int $item = 0) Helpers::cache()->flush(); - redirectexit('action=admin;area=lp_pages;sa=main'); + if (Helpers::post()->has('save_exit')) + redirectexit('action=admin;area=lp_pages;sa=main'); } /** diff --git a/Themes/default/LightPortal/ManageBlocks.template.php b/Themes/default/LightPortal/ManageBlocks.template.php index 3426f00c6..9324bce10 100644 --- a/Themes/default/LightPortal/ManageBlocks.template.php +++ b/Themes/default/LightPortal/ManageBlocks.template.php @@ -20,7 +20,7 @@ function template_manage_blocks() } else { foreach ($context['lp_current_blocks'] as $placement => $blocks) { $block_group_type = 'default'; - if (!in_array($placement, ['header', 'top', 'left', 'right', 'bottom', 'footer'])) + if (!in_array($placement, array_keys($context['lp_block_placements']))) $block_group_type = 'additional'; echo ' @@ -354,6 +354,7 @@ function template_block_post() echo ' + diff --git a/Themes/default/LightPortal/ManagePages.template.php b/Themes/default/LightPortal/ManagePages.template.php index 20f92bef4..52b8df83c 100644 --- a/Themes/default/LightPortal/ManagePages.template.php +++ b/Themes/default/LightPortal/ManagePages.template.php @@ -88,6 +88,7 @@ function template_page_post() echo ' + diff --git a/Themes/default/languages/LightPortal/.english.php b/Themes/default/languages/LightPortal/.english.php index 5ca46e212..2a0eddb3c 100644 --- a/Themes/default/languages/LightPortal/.english.php +++ b/Themes/default/languages/LightPortal/.english.php @@ -141,6 +141,7 @@ $txt['lp_action_clone'] = 'Clone'; $txt['lp_action_move'] = 'Move'; $txt['lp_read_more'] = 'Read more...'; +$txt['lp_save_and_exit'] = 'Save and Exit'; // Blocks $txt['lp_blocks'] = 'Blocks'; diff --git a/Themes/default/languages/LightPortal/.russian.php b/Themes/default/languages/LightPortal/.russian.php index bb8fa9efc..36e38da37 100644 --- a/Themes/default/languages/LightPortal/.russian.php +++ b/Themes/default/languages/LightPortal/.russian.php @@ -141,6 +141,7 @@ $txt['lp_action_clone'] = 'Клонировать'; $txt['lp_action_move'] = 'Переместить'; $txt['lp_read_more'] = 'Читать далее...'; +$txt['lp_save_and_exit'] = 'Сохранить и выйти'; // Blocks $txt['lp_blocks'] = 'Блоки'; diff --git a/Themes/default/languages/LightPortal/.ukrainian.php b/Themes/default/languages/LightPortal/.ukrainian.php index 2a0e33bd9..ca2e83ac2 100644 --- a/Themes/default/languages/LightPortal/.ukrainian.php +++ b/Themes/default/languages/LightPortal/.ukrainian.php @@ -141,6 +141,7 @@ $txt['lp_action_clone'] = 'Клонувати'; $txt['lp_action_move'] = 'Перемістити'; $txt['lp_read_more'] = 'Читати далі...'; +$txt['lp_save_and_exit'] = 'Зберегти і вийти'; // Blocks $txt['lp_blocks'] = 'Блоки'; From 7af9a298f6c66b070f2e04818041b29650a6f606 Mon Sep 17 00:00:00 2001 From: Bugo Date: Mon, 12 Apr 2021 23:35:02 +0500 Subject: [PATCH 04/24] Change checkbox view for plugin settings --- .../LightPortal/ManagePlugins.template.php | 5 +- .../default/css/light_portal/light_portal.css | 1449 ++++++++++++++++- .../css/light_portal/light_portal.less | 118 +- .../css/light_portal/light_portal.scss | 118 +- 4 files changed, 1569 insertions(+), 121 deletions(-) diff --git a/Themes/default/LightPortal/ManagePlugins.template.php b/Themes/default/LightPortal/ManagePlugins.template.php index 085922991..b417dab05 100644 --- a/Themes/default/LightPortal/ManagePlugins.template.php +++ b/Themes/default/LightPortal/ManagePlugins.template.php @@ -98,7 +98,7 @@ function show_plugin_settings($plugin_name, $settings) echo '
'; - if ($value[0] !== 'callback' && $value['0'] !== 'desc') { + if (!in_array($value[0], array('callback', 'desc', 'check'))) { echo ' ', $txt[$value[1]], ''; } @@ -117,7 +117,8 @@ function show_plugin_settings($plugin_name, $settings)
'; } elseif ($value[0] == 'check') { echo ' - '; + + '; } elseif ($value[0] == 'callback' && !empty($value[2])) { if (isset($value[2][0]) && isset($value[2][1]) && method_exists($value[2][0], $value[2][1])) { call_user_func($value[2]); diff --git a/Themes/default/css/light_portal/light_portal.css b/Themes/default/css/light_portal/light_portal.css index 6f107b42b..91b0853d0 100644 --- a/Themes/default/css/light_portal/light_portal.css +++ b/Themes/default/css/light_portal/light_portal.css @@ -1 +1,1448 @@ -.fa-portal::before{content:"\f0ac"}.actions .context_menu{position:relative}.actions .context_menu .roundframe{position:absolute;top:0;right:0;z-index:30}.actions .context_menu .roundframe ul{overflow:auto;position:relative;list-style:none;z-index:10}.actions .context_menu .roundframe ul a{width:100%;margin-bottom:2px}.block_bbc .videocontainer,.block_html .videocontainer,.block_md .videocontainer{margin:0 auto}.preview .button{float:none !important}.descbox{border-radius:6px}.descbox .bbc_code{overflow:hidden !important}.portal_menu_icons{font-size:.875rem;vertical-align:middle;margin:-3px 8px 0 0}#lp_blocks{margin-bottom:1em}#lp_blocks .item{cursor:pointer;height:96%}#block_icon i{vertical-align:middle}#info_center{margin-bottom:5px}#admin_form_wrapper p.errorbox{margin:0}.lp_tabs{padding:0;margin:0 auto}.lp_tabs>input{display:none;position:absolute}.lp_tabs>input:checked+label{color:#555;border-top:1px solid #f49a3a;border-bottom:1px solid #fff}.lp_tabs input:invalid,.lp_tabs textarea:invalid{border:3px double red}.lp_tabs>label{display:inline-block;margin:0 0 -1px;padding:15px 25px;font-weight:600;text-align:center;color:#aaa;border:1px solid #ddd;border-radius:3px 3px 0 0}.lp_tabs>label:hover{color:#888;cursor:pointer}.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"}@media screen and (max-width:680px){.lp_tabs>label{font-size:0}.lp_tabs>label:before{margin:0;font-size:1.125rem}}@media screen and (max-width:400px){.lp_tabs>label{padding:15px}}.lp_tabs #tab1:checked~#content-tab1,.lp_tabs #tab2:checked~#content-tab2,.lp_tabs #tab3:checked~#content-tab3,.lp_tabs #tab4:checked~#content-tab4{display:block}.lp_tabs section{display:none;padding:15px;border:1px solid #ddd;border-top-left-radius:0;border-top-right-radius:7px;border-bottom-right-radius:7px;border-bottom-left-radius:7px}.lp_tabs section>div{margin-top:1em}.lp_tabs section #post_header{display:flex;flex-wrap:wrap;flex-direction:column;line-height:1.5;-webkit-animation-duration:1s;animation-duration:1s;-webkit-animation-fill-mode:both;animation-fill-mode:both;-webkit-animation-name:fadeIn;animation-name:fadeIn}@media (max-width:600px){.lp_tabs section #post_header{flex-direction:row}}.lp_tabs section #post_header dt{width:50%}.lp_tabs section #post_header dt label{font-weight:bold}.lp_tabs section #post_header dt,.lp_tabs section #post_header dd{margin-block-start:1px;margin-block-end:1px;margin-inline-start:0;padding-top:5px;width:auto !important;float:none !important;flex:2 50%}.lp_tabs section #post_header dt:first-child,.lp_tabs section #post_header dd:first-child,.lp_tabs section #post_header dt:first-child,.lp_tabs section #post_header dd:first-child{margin-block-start:0}.lp_tabs section #post_header dt:last-child,.lp_tabs section #post_header dd:last-child,.lp_tabs section #post_header dt:last-child,.lp_tabs section #post_header dd:last-child{margin-block-end:0}.lp_tabs section #post_header dt>*:first-child,.lp_tabs section #post_header dd>*:first-child,.lp_tabs section #post_header dt>*:first-child,.lp_tabs section #post_header dd>*:first-child{margin-block-start:0}.lp_tabs section #post_header dt>*:last-child,.lp_tabs section #post_header dd>*:last-child,.lp_tabs section #post_header dt>*:last-child,.lp_tabs section #post_header dd>*:last-child{margin-block-end:0}@media (max-width:600px){.lp_tabs section #post_header dt,.lp_tabs section #post_header dd{flex:1 100%;text-align:center}}.lp_tabs section #post_header dt.pf_content,.lp_tabs section #post_header dd.pf_content{width:100%}.lp_tabs section #post_header .checkbox{vertical-align:top;margin:0 3px 0 0;width:17px;height:17px}.lp_tabs section #post_header .checkbox+.label{cursor:pointer}.lp_tabs section #post_header .checkbox:not(checked){position:absolute;opacity:0}.lp_tabs section #post_header .checkbox:not(checked)+.label{position:relative;padding:0 0 0 60px}.lp_tabs section #post_header .checkbox:not(checked)+.label:before{content:'';position:absolute;top:-4px;left:0;width:50px;height:26px;border-radius:13px;background:#cdd1da;box-shadow:inset 0 2px 3px rgba(0,0,0,0.2)}.lp_tabs section #post_header .checkbox:not(checked)+.label:after{content:'';position:absolute;top:-2px;left:2px;width:22px;height:22px;border-radius:10px;background:#fff;box-shadow:0 2px 5px rgba(0,0,0,0.3);transition:all .2s}.lp_tabs section #post_header .checkbox:checked+.label:before{background:#00cc33}.lp_tabs section #post_header .checkbox:checked+.label:after{left:26px}.lp_tabs section .choices__inner{border-radius:6px}.lp_tabs section .add_option{width:100%}.lp_tabs section .add_option select,.lp_tabs section .add_option input{width:100%}@media screen and (max-width:680px){.lp_tabs section .add_option .plugin_options td:first-child{display:none}}.errorbox{color:initial !important}#lp_layout h3:hover,#lp_layout h4:hover{white-space:normal}#lp_layout .file_content{white-space:break-spaces}#lp_layout #post_confirm_buttons{padding:12px 0 0 0 !important}#lp_layout .row>aside{margin:0 !important}#lp_layout .sticky_sidebar{position:sticky;position:-webkit-sticky;top:5px}#lp_layout aside>div>h3,#lp_layout aside>div>h4{white-space:nowrap;text-overflow:ellipsis}#lp_layout aside[id^="block"]:not(:first-child){clear:both;margin-top:4px}.likes_area{list-style:none}.related_pages{margin-top:1em}.related_pages .article_list{grid-template-columns:repeat(4, 1fr)}.related_pages .article_list .windowbg{display:flex;flex-direction:column;justify-content:space-between;text-align:center}.comments{margin-top:1em}.comments .avatar{max-width:45px;max-height:45px;border-radius:100%;box-shadow:0 0 4px #666}.comments .cat_bar{border-radius:6px}section #display_head{margin-top:.1em;margin-bottom:0}section #display_head span{margin:0}.lp_frontpage_articles{display:flex;flex-direction:row;flex-wrap:wrap}.article_view>div{margin-bottom:10px}.article_view article{transition:all .4s cubic-bezier(.175, .885, 0, 1);position:relative;border-radius:12px;overflow:hidden;padding:0;display:flex;flex-direction:column;justify-content:flex-end;height:95%;min-height:100%}.article_view article a:hover{text-decoration:none;opacity:.7}.article_view article:hover{box-shadow:0 0 10px 5px #ddd}.article_view article:hover .new_posts{display:none}.article_view article:hover .new_hover,.article_view article:hover .info_hover{opacity:1;z-index:1}.article_view article:hover .card_img_hover{opacity:.5}.article_view article:hover .card_info{background-color:transparent;position:relative}.article_view article .new_hover{position:absolute;padding:16px;top:0;left:0}.article_view article .new_hover .new_icon{position:relative;z-index:2}.article_view article .info_hover{position:absolute;padding:16px;opacity:0;top:0;right:0}.article_view article .info_hover .edit_icon{position:relative;z-index:2}.article_view article .card_img{visibility:hidden;background-size:cover;background-position:center;background-repeat:no-repeat;width:100%;height:235px}.article_view article .card_img_hover{transition:.2s all ease-out;background-size:cover;background-position:center;background-repeat:no-repeat;width:100%;position:absolute;height:235px;top:0}.article_view article .card_info{display:flex;flex-grow:1;flex-direction:column;justify-content:space-between;padding:1.2em}.article_view article .card_info div{margin-top:1em}.article_view article .card_info .card_date{font-weight:500;color:#868686}.article_view article .card_info h3{font-size:1.25rem;font-weight:700;margin:10px 0 10px 0;overflow:hidden;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;line-height:1.3em}.article_view article .card_info h3+div{display:flex;flex-wrap:wrap;flex-direction:row;justify-content:space-between}.article_view article .card_info p{margin-bottom:5px;overflow:hidden;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;line-height:1.4em}.article_view article .card_info .card_author{font-weight:600;text-decoration:none;color:#ad7d52}.article_alt_view article{transition:all .4s cubic-bezier(.175, .885, 0, 1);position:relative;padding:1em;display:flex;flex-direction:column;justify-content:space-between;height:99%}.article_alt_view article header .title_bar{padding:8px 12px}.article_alt_view article header .title_bar h3{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.article_alt_view article header .title_bar+div{padding:10px}.article_alt_view article header img{max-height:235px;width:100%}.article_alt_view article .article_body p{margin-bottom:5px;overflow:hidden;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;line-height:1.4em}.article_alt_view article .article_footer div{padding:4px}.article_alt2_view{display:flex;flex-wrap:wrap}.article_alt2_view article{display:flex;flex:1 1 300px;flex-direction:column;overflow:hidden;margin:0 10px 10px;min-height:300px;background-size:cover;border-radius:5px;box-shadow:0 3px 7px -1px rgba(0,0,0,0.1);transition:all .5s ease}.article_alt2_view article .article_image_link{display:block;position:relative;overflow:hidden;border-radius:5px 5px 0 0}.article_alt2_view article .article_image_link div{width:auto;height:200px;background-repeat:no-repeat;background-size:cover}.article_alt2_view article .article_body{display:flex;flex-grow:1;flex-direction:column;justify-content:space-between}.article_alt2_view article .article_body div{display:block;position:relative;padding:25px 25px 0}.article_alt2_view article .article_body div header time{display:block;margin-bottom:4px;line-height:1.15;font-weight:500;letter-spacing:.5px;text-transform:uppercase}.article_alt2_view article .article_body div header h3{margin:1em 0 .5em;font-size:1.2rem;line-height:1.15}.article_alt2_view article .article_body div section p{margin-bottom:5px;overflow:hidden;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;line-height:1.4em}.article_alt2_view article .article_body footer{display:flex;justify-content:space-between;align-items:flex-end;padding:0 25px 5px}.article_alt2_view article .article_body footer img{margin-right:5px;width:25px;height:25px;border-radius:100%;object-fit:cover}.article_alt2_view article .article_body footer>span{font-weight:500;letter-spacing:.5px;text-transform:uppercase}.article_alt3_view .card{display:flex;flex-direction:column;margin:1rem auto;box-shadow:0 3px 7px -1px rgba(0,0,0,0.1);line-height:1.4;font-family:sans-serif;border-radius:5px;overflow:hidden;z-index:0}.article_alt3_view .card:hover .photo{transform:scale(1.3) rotate(3deg)}.article_alt3_view .card:hover .details{left:0%}.article_alt3_view .card a{color:inherit}.article_alt3_view .card .meta{position:relative;z-index:0;height:200px}.article_alt3_view .card .photo{position:absolute;top:0;right:0;bottom:0;left:0;background-size:cover;background-position:center;transition:transform .2s}.article_alt3_view .card .details{padding:0;list-style:none;position:absolute;top:0;bottom:0;left:-100%;margin:auto;transition:left .2s;background:rgba(0,0,0,0.6);color:#fff;padding:10px;width:100%;font-size:.9rem}.article_alt3_view .card .details strong{color:inherit}.article_alt3_view .card .details ul{margin:auto;padding:0;list-style:none}.article_alt3_view .card .details ul li{display:inline-block}.article_alt3_view .card .details i{margin-right:10px}.article_alt3_view .card .details a{-webkit-text-decoration:dotted underline;text-decoration:dotted underline}.article_alt3_view .card .details a:hover{color:#5ad67d}.article_alt3_view .card .details .tags li{margin-right:2px}.article_alt3_view .card .details .tags li:first-child{margin-left:-4px}.article_alt3_view .card .description{padding:1rem;background:#fff;position:relative;z-index:1;display:flex;justify-content:space-between;flex-direction:column}.article_alt3_view .card .description a:hover{text-decoration:none}.article_alt3_view .card .description h1,.article_alt3_view .card .description h2{font-family:Poppins,sans-serif}.article_alt3_view .card .description h1{line-height:1;margin:0;font-size:1.4rem}.article_alt3_view .card .description h2{font-weight:300;text-transform:uppercase;color:#a2a2a2;margin-top:5px}.article_alt3_view .card .description p{position:relative;margin:1rem 0 0;margin-bottom:5px;overflow:hidden;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;line-height:1.4em}.article_alt3_view .card .description p:first-of-type{margin-top:1.25rem}.article_alt3_view .card .description p:first-of-type:before{content:"";position:absolute;height:5px;background:#5ad67d;width:35px;top:-0.75rem;border-radius:3px}.article_alt3_view .card .description .read_more{text-align:right}.article_alt3_view .card .description .read_more a{display:inline-block;position:relative}@media (min-width:640px){.article_alt3_view .card{flex-direction:row}.article_alt3_view .card .meta{flex-basis:40%;height:auto}.article_alt3_view .card .description{flex-basis:60%}.article_alt3_view .card .description:before{transform:skewX(-3deg);content:"";background:#fff;width:30px;position:absolute;left:-10px;top:0;bottom:-1px;z-index:-1}}.article_alt4_view{justify-content:center}.article_alt4_view article .num{margin-bottom:1.2rem}.article_alt4_view article .card{font-family:'Heebo';background-image:linear-gradient(rgba(0,0,0,0.5), rgba(0,0,0,0.5)),var(--bg-img);height:20em;width:15em;font-size:1.2rem;color:#fff;border-radius:1em;margin:2px;padding:1em;display:flex;align-items:flex-end;background-size:cover;background-position:center;transition:all,.5s;position:relative;overflow:hidden;border:5px solid #ccc;text-decoration:none}.article_alt4_view article .card:hover{transform:rotate(0);color:#3c3163}.article_alt4_view article .card:hover .tags .tag{background:#3c3163;color:#fff}.article_alt4_view article .card:hover:before,.article_alt4_view article .card:hover:after{transform:scale(1)}.article_alt4_view article .card:before,.article_alt4_view article .card:after{content:'';transform:scale(0);transform-origin:top left;border-radius:50%;position:absolute;left:-50%;top:-50%;z-index:-5;transition:all,.5s;transition-timing-function:ease-in-out}.article_alt4_view article .card:before{background:#ddd;width:250%;height:250%}.article_alt4_view article .card:after{background:#fff;width:200%;height:200%}.article_alt4_view article .card h1{margin:0;font-size:1.6rem;line-height:1.2em;color:inherit}.article_alt4_view article .card p{font-size:1rem;font-family:'Open Sans';line-height:2em;margin-top:.5em;margin-bottom:5px;overflow:hidden;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical}.article_alt4_view article .card .tags{display:flex}.article_alt4_view article .card .tags .tag{font-size:.8rem;background:rgba(255,255,255,0.5);border-radius:.3rem;padding:0 .5em;margin-right:.5em;line-height:1.5em;transition:all,.5s}.article_alt4_view article .card .date{position:absolute;top:0;right:0;font-size:.9rem;padding:1em;line-height:1em;opacity:.8}.article_alt4_view article .card .date strong{color:inherit}@media screen and (max-width:500px){.article_alt4_view article .card{max-width:calc(100vw - 4rem)}}.comment_list{list-style:none}.comment_list li{clear:both;width:100%}.comment_list li .comment_avatar{position:absolute;width:74px;vertical-align:top;padding-right:10px}.comment_list li .comment_wrapper{width:100%;padding-left:55px}.comment_list li .comment_wrapper .entry{display:block;position:relative;padding:0 12px 8px;border:1px solid #ddd;border-radius:7px;box-shadow:0 2px 5px rgba(0,0,0,0.1)}.comment_list li .comment_wrapper .entry .title{display:block;font-size:.7rem;margin:-1px -13px -11px;line-height:20px;text-align:justify}.comment_list li .comment_wrapper .entry .title::after{display:inline-block;content:'';width:100%;height:0;visibility:hidden;overflow:hidden}.comment_list li .comment_wrapper .entry .title>span{font-weight:bold;border:1px solid #ddd;border-top-left-radius:7px;border-top-right-radius:0;border-bottom-right-radius:7px;border-bottom-left-radius:0;display:inline-block;vertical-align:top;padding:6px 11px}.comment_list li .comment_wrapper .entry .title .comment_date{border:1px solid #ddd;border-top-left-radius:0;border-top-right-radius:7px;border-bottom-right-radius:0;border-bottom-left-radius:7px;display:inline-block;vertical-align:top;padding:6px 11px;opacity:.8}.comment_list li .comment_wrapper .entry .content{padding:0 14px}.comment_list li .comment_wrapper .entry .content .bbc_list{list-style-type:initial}.comment_list li .comment_wrapper .entry .content .bbc_code{overflow:hidden !important}.comment_list li .comment_wrapper .entry .reply_button,.comment_list li .comment_wrapper .entry .modify_button,.comment_list li .comment_wrapper .entry .update_button,.comment_list li .comment_wrapper .entry .cancel_button,.comment_list li .comment_wrapper .entry .remove_button{opacity:.6;margin-right:5px}.comment_list li .comment_wrapper .entry .reply_button:hover,.comment_list li .comment_wrapper .entry .modify_button:hover,.comment_list li .comment_wrapper .entry .update_button:hover,.comment_list li .comment_wrapper .entry .cancel_button:hover,.comment_list li .comment_wrapper .entry .remove_button:hover{cursor:pointer;opacity:1}.comment_list li .comment_wrapper .entry .update_button,.comment_list li .comment_wrapper .entry .cancel_button{display:none}.comment_list li .comment_wrapper .entry .smalltext{margin-top:6px;padding-top:6px;border-top:1px dashed #bfbfbf}#comment_form .toolbar{display:none}#comment_form textarea{width:100%;height:30px}#comment_form button[name="comment"]{margin-top:10px;float:right;display:none}.sceditor-container{position:relative;min-height:300px !important}.priority span,.status span,.actions span{cursor:pointer}#page_comments .row{margin-right:0 !important;margin-left:0 !important}#page_comments_toggle{cursor:pointer}.lp_default_blocks th.icon,.lp_additional_blocks th.icon,.lp_default_blocks th.actions,.lp_additional_blocks th.actions{width:8%}.features .floatleft{width:80%}.features .fa-toggle-on{color:#00cc33}.lp_plugin_toggle,.lp_plugin_settings{cursor:pointer}.lp_plugin_settings{position:relative;top:-3px;vertical-align:baseline !important}.form_settings>div{margin:10px}.form_settings input[type="text"],.form_settings input[type="url"]{width:100%}.lp_categories input{width:100%}.lp_categories textarea{width:100%;resize:none;margin-top:1px}.lp_categories dt .handle{cursor:grab}.lp_categories dt td.handle{font-size:1.2rem}.lp_categories dt span.floatright{font-size:1.4rem;font-weight:bold;cursor:pointer}.lp_categories dd .roundframe{margin-top:0}@media (max-width:480px){.lp_default_blocks th.icon,.lp_additional_blocks th.icon,.lp_default_blocks td.icon,.lp_additional_blocks td.icon,.lp_default_blocks th.type,.lp_additional_blocks th.type,.lp_default_blocks td.type,.lp_additional_blocks td.type,.lp_default_blocks th.areas,.lp_additional_blocks th.areas,.lp_default_blocks td.areas,.lp_additional_blocks td.areas{display:none}#lp_pages th.date,#lp_pages td.date{display:none}.related_pages .article_list{grid-template-columns:1fr}}@media (min-width:481px) and (max-width:600px){.lp_default_blocks th.title,.lp_additional_blocks th.title,.lp_default_blocks td.title,.lp_additional_blocks td.title,.lp_default_blocks th.areas,.lp_additional_blocks th.areas,.lp_default_blocks td.areas,.lp_additional_blocks td.areas{display:none}.related_pages .article_list{grid-template-columns:repeat(2, 1fr)}}@media (max-width:600px){.comment_avatar{display:none}.comment_wrapper{padding:0 !important}.comment_wrapper .title .bg{padding:4px !important}.comment_list .col-xs-12{flex-basis:95%;margin-left:10px}#lp_post .button{float:none !important;width:100%;margin-left:0 !important}}@media (max-width:720px){#lp_layout input[type="radio"]{width:auto}}@media (max-width:800px){#lp_pages th.num_views,#lp_pages td.num_views{display:none}}@media (max-width:887px){.information .righttext{text-align:center}#lp_pages th.alias,#lp_pages td.alias{display:none}}@media (min-width:1022px) and (max-width:1200px){.article_info div{text-align:center;display:block}.article_info .floatleft,.article_info .floatright{float:none}}@-webkit-keyframes fadeIn{from{opacity:0}to{opacity:1}}@keyframes fadeIn{from{opacity:0}to{opacity:1}}.block_user_info ul{list-style:none;padding-left:0}.block_user_info ul .avatar{margin:1em}@media (min-width:769px) and (max-width:1241px){.block_user_info span.floatleft,.block_user_info span.floatright{float:none;margin:0 auto;display:block}}.likely__widget{opacity:.5 !important;filter:grayscale(100%)}.likely__widget:hover{opacity:1 !important;filter:grayscale(0%)}.recent_posts,.recent_topics,.random_topics{list-style:none;padding-left:0}.recent_posts li,.recent_topics li,.random_topics li{margin:4px 0 0 0;padding:6px 12px}.recent_posts .poster_avatar,.recent_topics .poster_avatar{float:left;padding:3px 11px 0 0}.recent_posts .avatar,.recent_topics .avatar{width:40px;height:40px}dl.top_posters dt img{width:24px;vertical-align:middle}.themeswitcher select{cursor:pointer;width:100%}.page_md .bbc_code,.block_md .bbc_code{overflow:auto !important;white-space:pre}.page_md .task-list-item,.block_md .task-list-item{list-style:none;margin-left:-20px}.page_md blockquote{width:100% !important}.recent_attachments{display:flex;flex-direction:row;justify-content:space-evenly}.recent_attachments .item{margin:5px}.recent_attachments .item img{object-fit:cover;width:100%;height:100%}.column_direction{flex-direction:column !important}#vk_comments{margin-top:1em}.block_current_month table{width:100%;margin-bottom:10px;border-collapse:collapse;background:#f0f4f7;border:1px solid #ddd;text-align:center}.block_current_month table .windowbg{box-shadow:none;border-radius:0;box-sizing:content-box;margin:0}.block_current_month th{padding:2px;background:#e7eaef;font-size:smaller}.block_current_month td{padding:2px;width:12.5%;vertical-align:top;border-right:1px solid #ddd;border-bottom:1px solid #ddd}.block_current_month td.disabled{background:#eee;border:1px solid #ddd}.block_current_month td.events{background:rgba(30,245,20,0.1)}.block_current_month td.holidays{background:rgba(23,110,245,0.1)}.block_current_month td.birthdays{background:rgba(102,0,255,0.1)}.block_current_month td.events:hover,.block_current_month td.calendar_today.events{background:rgba(30,245,20,0.2)}.block_current_month td.holidays:hover,.block_current_month td.calendar_today.holidays{background:rgba(23,110,245,0.2)}.block_current_month td.birthdays:hover,.block_current_month td.calendar_today.birthdays{background:rgba(153,51,255,0.2)}.block_current_month td.calendar_today{font-weight:bold}.block_current_month td a{display:block}.block_current_month td a:hover{text-decoration:none;background:rgba(97,135,166,0.2)}.block_board_list ul{padding-left:10px}.article_list{display:grid;grid-template-columns:repeat(auto-fit, minmax(150px, 1fr));grid-gap:0 10px}.article_list>div{display:flex;flex-direction:column;justify-content:space-between;text-align:center}.block_flarum_style nav ul{list-style:none;padding-left:0}.block_flarum_style nav ul .roundframe{margin-top:0}.block_flarum_style nav ul .roundframe i{padding-right:4px}.block_board_stats .board_stats_areas{display:grid;grid-template-columns:repeat(auto-fit, minmax(150px, 1fr));grid-gap:0 10px}.block_board_stats .board_stats_areas div{display:flex;flex-direction:column;margin-top:2px}.block_board_stats .board_stats_areas div h4{margin-top:4px;margin-bottom:4px}.block_board_stats .board_stats_areas div ul{margin-left:-1em}.comment_avatar svg{max-width:50px}.block_todays details{display:contents;position:relative;margin-bottom:.5rem;min-height:1rem;max-height:3rem;transition:min-height .15s linear,max-height .5s linear;will-change:max-height;overflow:hidden}.block_todays details summary{display:inline-block;cursor:pointer;outline:0;transition:color .12s}.block_todays details summary::-webkit-details-marker{display:none}.block_todays details summary::-moz-list-bullet{list-style-type:none}.block_todays details summary span{border-bottom:1px currentColor dotted}.block_todays details summary:hover{color:#d06c6c}.block_todays details summary~*{display:none;transition:opacity .15s linear}.block_todays details[open]{min-height:2em;max-height:20em}.block_todays details[open] summary{color:#d06c6c}.block_todays details[open] summary~*{display:block}.block_tiny_slider .item{text-align:center}.block_tiny_slider .tns-nav{text-align:center;margin:10px 0}.block_tiny_slider .tns-nav>[aria-controls]{width:9px;height:9px;padding:0;margin:0 5px;border-radius:50%;background:#ddd;border:0}.block_tiny_slider .tns-nav>.tns-nav-active{background:#999}.block_tiny_slider .customize-tools{position:relative}.block_tiny_slider .customize-tools[hidden]{display:none}.block_tiny_slider .customize-tools .thumbnails{margin:20px 0 0;text-align:center}.block_tiny_slider .customize-tools .thumbnails li{display:inline-block;cursor:pointer;border:5px solid #fff;width:50px}.block_tiny_slider .customize-tools .thumbnails img{vertical-align:bottom;height:auto;max-height:50px}.block_tiny_slider .customize-tools .thumbnails .tns-nav-active{background:none;border-color:#000}@media (max-width:640px){.block_tiny_slider .customize-tools .thumbnails{margin-bottom:10px}}.block_tiny_slider .customize-tools .controls{text-align:center;margin-top:10px}.block_tiny_slider .customize-tools .controls li{display:block;padding:0 15px;cursor:pointer;transition:background .3s}.block_tiny_slider .customize-tools .controls li span::selection{text-shadow:none;background:initial;color:inherit}@media (max-width:640px){.block_tiny_slider .customize-tools .controls li{display:inline-block;position:relative;padding:0}} \ No newline at end of file +/* Light Portal ~ less file */ +.fa-portal::before { + content: "\f0ac"; +} +.actions .context_menu { + position: relative; +} +.actions .context_menu .roundframe { + position: absolute; + top: 0; + right: 0; + z-index: 30; +} +.actions .context_menu .roundframe ul { + overflow: auto; + position: relative; + list-style: none; + z-index: 10; +} +.actions .context_menu .roundframe ul a { + width: 100%; + margin-bottom: 2px; +} +.block_bbc .videocontainer, +.block_html .videocontainer, +.block_md .videocontainer { + margin: 0 auto; +} +.preview .button { + float: none !important; +} +.descbox { + border-radius: 6px; +} +.descbox .bbc_code { + overflow: hidden !important; +} +.portal_menu_icons { + font-size: 0.875rem; + vertical-align: middle; + margin: -3px 8px 0 0; +} +#lp_blocks { + margin-bottom: 1em; +} +#lp_blocks .item { + cursor: pointer; + height: 96%; +} +#block_icon i { + vertical-align: middle; +} +#info_center { + margin-bottom: 5px; +} +#admin_form_wrapper p.errorbox { + margin: 0; +} +/* Tabs for settings */ +.lp_tabs { + padding: 0; + margin: 0 auto; +} +.lp_tabs > input { + display: none; + position: absolute; +} +.lp_tabs > input:checked + label { + color: #555; + border-top: 1px solid #f49a3a; + border-bottom: 1px solid #fff; +} +.lp_tabs input:invalid, +.lp_tabs textarea:invalid { + border: 3px double red; +} +.lp_tabs > label { + display: inline-block; + margin: 0 0 -1px; + padding: 15px 25px; + font-weight: 600; + text-align: center; + color: #aaa; + border: 1px solid #ddd; + border-radius: 3px 3px 0 0; +} +.lp_tabs > label:hover { + color: #888; + cursor: pointer; +} +.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"; +} +@media screen and (max-width: 680px) { + .lp_tabs > label { + font-size: 0; + } + .lp_tabs > label:before { + margin: 0; + font-size: 1.125rem; + } +} +@media screen and (max-width: 400px) { + .lp_tabs > label { + padding: 15px; + } +} +.lp_tabs #tab1:checked ~ #content-tab1, +.lp_tabs #tab2:checked ~ #content-tab2, +.lp_tabs #tab3:checked ~ #content-tab3, +.lp_tabs #tab4:checked ~ #content-tab4 { + display: block; +} +.lp_tabs section { + display: none; + padding: 15px; + border: 1px solid #ddd; + border-top-left-radius: 0; + border-top-right-radius: 7px; + border-bottom-right-radius: 7px; + border-bottom-left-radius: 7px; +} +.lp_tabs section > div { + margin-top: 1em; +} +.lp_tabs section #post_header { + display: flex; + flex-wrap: wrap; + flex-direction: column; + line-height: 1.5; + -webkit-animation-duration: 1s; + animation-duration: 1s; + -webkit-animation-fill-mode: both; + animation-fill-mode: both; + -webkit-animation-name: fadeIn; + animation-name: fadeIn; +} +@media (max-width: 600px) { + .lp_tabs section #post_header { + flex-direction: row; + } +} +.lp_tabs section #post_header dt { + width: 50%; +} +.lp_tabs section #post_header dt label { + font-weight: bold; +} +.lp_tabs section #post_header dt, +.lp_tabs section #post_header dd { + margin-block-start: 1px; + margin-block-end: 1px; + margin-inline-start: 0; + padding-top: 5px; + width: auto !important; + float: none !important; + flex: 2 50%; +} +.lp_tabs section #post_header dt:first-child, +.lp_tabs section #post_header dd:first-child, +.lp_tabs section #post_header dt:first-child, +.lp_tabs section #post_header dd:first-child { + margin-block-start: 0; +} +.lp_tabs section #post_header dt:last-child, +.lp_tabs section #post_header dd:last-child, +.lp_tabs section #post_header dt:last-child, +.lp_tabs section #post_header dd:last-child { + margin-block-end: 0; +} +.lp_tabs section #post_header dt > *:first-child, +.lp_tabs section #post_header dd > *:first-child, +.lp_tabs section #post_header dt > *:first-child, +.lp_tabs section #post_header dd > *:first-child { + margin-block-start: 0; +} +.lp_tabs section #post_header dt > *:last-child, +.lp_tabs section #post_header dd > *:last-child, +.lp_tabs section #post_header dt > *:last-child, +.lp_tabs section #post_header dd > *:last-child { + margin-block-end: 0; +} +@media (max-width: 600px) { + .lp_tabs section #post_header dt, + .lp_tabs section #post_header dd { + flex: 1 100%; + text-align: center; + } +} +.lp_tabs section #post_header dt.pf_content, +.lp_tabs section #post_header dd.pf_content { + width: 100%; +} +.lp_tabs section .choices__inner { + border-radius: 6px; +} +.lp_tabs section .add_option { + width: 100%; +} +.lp_tabs section .add_option select, +.lp_tabs section .add_option input { + width: 100%; +} +@media screen and (max-width: 680px) { + .lp_tabs section .add_option .plugin_options td:first-child { + display: none; + } +} +/* Checkbox toggler */ +.checkbox { + vertical-align: top; + margin: 0 3px 0 0; + width: 17px; + height: 17px; +} +.checkbox + .label { + cursor: pointer; +} +.checkbox:not(checked) { + position: absolute; + opacity: 0; +} +.checkbox:not(checked) + .label { + position: relative; + padding: 0 0 0 60px; +} +.checkbox:not(checked) + .label:before { + content: ''; + position: absolute; + top: -4px; + left: 0; + width: 50px; + height: 26px; + border-radius: 13px; + background: #cdd1da; + box-shadow: inset 0 2px 3px rgba(0, 0, 0, 0.2); +} +.checkbox:not(checked) + .label:after { + content: ''; + position: absolute; + top: -2px; + left: 2px; + width: 22px; + height: 22px; + border-radius: 10px; + background: #fff; + box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3); + transition: all 0.2s; +} +.checkbox:checked + .label:before { + background: #00cc33; +} +.checkbox:checked + .label:after { + left: 26px; +} +.errorbox { + color: initial !important; +} +#lp_layout h3:hover, +#lp_layout h4:hover { + white-space: normal; +} +#lp_layout .file_content { + white-space: break-spaces; +} +#lp_layout #post_confirm_buttons { + padding: 12px 0 0 0 !important; +} +#lp_layout .row > aside { + margin: 0 !important; +} +#lp_layout .sticky_sidebar { + position: sticky; + position: -webkit-sticky; + top: 5px; +} +#lp_layout aside > div > h3, +#lp_layout aside > div > h4 { + white-space: nowrap; + text-overflow: ellipsis; +} +#lp_layout aside[id^="block"]:not(:first-child) { + clear: both; + margin-top: 4px; +} +.likes_area { + list-style: none; +} +.related_pages { + margin-top: 1em; +} +.related_pages .article_list { + grid-template-columns: repeat(4, 1fr); +} +.related_pages .article_list .windowbg { + display: flex; + flex-direction: column; + justify-content: space-between; + text-align: center; +} +.comments { + margin-top: 1em; +} +.comments .avatar { + max-width: 45px; + max-height: 45px; + border-radius: 100%; + box-shadow: 0 0 4px #666; +} +.comments .cat_bar { + border-radius: 6px; +} +section #display_head { + margin-top: 0.1em; + margin-bottom: 0; +} +section #display_head span { + margin: 0; +} +/* The frontpage style */ +.lp_frontpage_articles { + display: flex; + flex-direction: row; + flex-wrap: wrap; +} +.article_view > div { + margin-bottom: 10px; +} +.article_view article { + transition: all 0.4s cubic-bezier(0.175, 0.885, 0, 1); + position: relative; + border-radius: 12px; + overflow: hidden; + padding: 0; + display: flex; + flex-direction: column; + justify-content: flex-end; + height: 95%; + min-height: 100%; +} +.article_view article a:hover { + text-decoration: none; + opacity: 0.7; +} +.article_view article:hover { + box-shadow: 0 0 10px 5px #dddddd; +} +.article_view article:hover .new_posts { + display: none; +} +.article_view article:hover .new_hover, +.article_view article:hover .info_hover { + opacity: 1; + z-index: 1; +} +.article_view article:hover .card_img_hover { + opacity: 0.5; +} +.article_view article:hover .card_info { + background-color: transparent; + position: relative; +} +.article_view article .new_hover { + position: absolute; + padding: 16px; + top: 0; + left: 0; +} +.article_view article .new_hover .new_icon { + position: relative; + z-index: 2; +} +.article_view article .info_hover { + position: absolute; + padding: 16px; + opacity: 0; + top: 0; + right: 0; +} +.article_view article .info_hover .edit_icon { + position: relative; + z-index: 2; +} +.article_view article .card_img { + visibility: hidden; + background-size: cover; + background-position: center; + background-repeat: no-repeat; + width: 100%; + height: 235px; +} +.article_view article .card_img_hover { + transition: 0.2s all ease-out; + background-size: cover; + background-position: center; + background-repeat: no-repeat; + width: 100%; + position: absolute; + height: 235px; + top: 0; +} +.article_view article .card_info { + display: flex; + flex-grow: 1; + flex-direction: column; + justify-content: space-between; + padding: 1.2em; +} +.article_view article .card_info div { + margin-top: 1em; +} +.article_view article .card_info .card_date { + font-weight: 500; + color: #868686; +} +.article_view article .card_info h3 { + font-size: 1.25rem; + font-weight: 700; + margin: 10px 0 10px 0; + overflow: hidden; + display: -webkit-box; + -webkit-line-clamp: 2; + -webkit-box-orient: vertical; + line-height: 1.3em; +} +.article_view article .card_info h3 + div { + display: flex; + flex-wrap: wrap; + flex-direction: row; + justify-content: space-between; +} +.article_view article .card_info p { + margin-bottom: 5px; + overflow: hidden; + display: -webkit-box; + -webkit-line-clamp: 3; + -webkit-box-orient: vertical; + line-height: 1.4em; +} +.article_view article .card_info .card_author { + font-weight: 600; + text-decoration: none; + color: #ad7d52; +} +.article_alt_view article { + transition: all 0.4s cubic-bezier(0.175, 0.885, 0, 1); + position: relative; + padding: 1em; + display: flex; + flex-direction: column; + justify-content: space-between; + height: 99%; +} +.article_alt_view article header .title_bar { + padding: 8px 12px; +} +.article_alt_view article header .title_bar h3 { + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; +} +.article_alt_view article header .title_bar + div { + padding: 10px; +} +.article_alt_view article header img { + max-height: 235px; + width: 100%; +} +.article_alt_view article .article_body p { + margin-bottom: 5px; + overflow: hidden; + display: -webkit-box; + -webkit-line-clamp: 3; + -webkit-box-orient: vertical; + line-height: 1.4em; +} +.article_alt_view article .article_footer div { + padding: 4px; +} +.article_alt2_view { + display: flex; + flex-wrap: wrap; +} +.article_alt2_view article { + display: flex; + flex: 1 1 300px; + flex-direction: column; + overflow: hidden; + margin: 0 10px 10px; + min-height: 300px; + background-size: cover; + border-radius: 5px; + box-shadow: 0 3px 7px -1px rgba(0, 0, 0, 0.1); + transition: all 0.5s ease; +} +.article_alt2_view article .article_image_link { + display: block; + position: relative; + overflow: hidden; + border-radius: 5px 5px 0 0; +} +.article_alt2_view article .article_image_link div { + width: auto; + height: 200px; + background-repeat: no-repeat; + background-size: cover; +} +.article_alt2_view article .article_body { + display: flex; + flex-grow: 1; + flex-direction: column; + justify-content: space-between; +} +.article_alt2_view article .article_body div { + display: block; + position: relative; + padding: 25px 25px 0; +} +.article_alt2_view article .article_body div header time { + display: block; + margin-bottom: 4px; + line-height: 1.15; + font-weight: 500; + letter-spacing: 0.5px; + text-transform: uppercase; +} +.article_alt2_view article .article_body div header h3 { + margin: 1em 0 0.5em; + font-size: 1.2rem; + line-height: 1.15; +} +.article_alt2_view article .article_body div section p { + margin-bottom: 5px; + overflow: hidden; + display: -webkit-box; + -webkit-line-clamp: 3; + -webkit-box-orient: vertical; + line-height: 1.4em; +} +.article_alt2_view article .article_body footer { + display: flex; + justify-content: space-between; + align-items: flex-end; + padding: 0 25px 5px; +} +.article_alt2_view article .article_body footer img { + margin-right: 5px; + width: 25px; + height: 25px; + border-radius: 100%; + object-fit: cover; +} +.article_alt2_view article .article_body footer > span { + font-weight: 500; + letter-spacing: 0.5px; + text-transform: uppercase; +} +.article_alt3_view .card { + display: flex; + flex-direction: column; + margin: 1rem auto; + box-shadow: 0 3px 7px -1px rgba(0, 0, 0, 0.1); + line-height: 1.4; + font-family: sans-serif; + border-radius: 5px; + overflow: hidden; + z-index: 0; +} +.article_alt3_view .card:hover .photo { + transform: scale(1.3) rotate(3deg); +} +.article_alt3_view .card:hover .details { + left: 0%; +} +.article_alt3_view .card a { + color: inherit; +} +.article_alt3_view .card .meta { + position: relative; + z-index: 0; + height: 200px; +} +.article_alt3_view .card .photo { + position: absolute; + top: 0; + right: 0; + bottom: 0; + left: 0; + background-size: cover; + background-position: center; + transition: transform 0.2s; +} +.article_alt3_view .card .details { + padding: 0; + list-style: none; + position: absolute; + top: 0; + bottom: 0; + left: -100%; + margin: auto; + transition: left 0.2s; + background: rgba(0, 0, 0, 0.6); + color: #fff; + padding: 10px; + width: 100%; + font-size: 0.9rem; +} +.article_alt3_view .card .details strong { + color: inherit; +} +.article_alt3_view .card .details ul { + margin: auto; + padding: 0; + list-style: none; +} +.article_alt3_view .card .details ul li { + display: inline-block; +} +.article_alt3_view .card .details i { + margin-right: 10px; +} +.article_alt3_view .card .details a { + -webkit-text-decoration: dotted underline; + text-decoration: dotted underline; +} +.article_alt3_view .card .details a:hover { + color: #5ad67d; +} +.article_alt3_view .card .details .tags li { + margin-right: 2px; +} +.article_alt3_view .card .details .tags li:first-child { + margin-left: -4px; +} +.article_alt3_view .card .description { + padding: 1rem; + background: #fff; + position: relative; + z-index: 1; + display: flex; + justify-content: space-between; + flex-direction: column; +} +.article_alt3_view .card .description a:hover { + text-decoration: none; +} +.article_alt3_view .card .description h1, +.article_alt3_view .card .description h2 { + font-family: Poppins, sans-serif; +} +.article_alt3_view .card .description h1 { + line-height: 1; + margin: 0; + font-size: 1.4rem; +} +.article_alt3_view .card .description h2 { + font-weight: 300; + text-transform: uppercase; + color: #a2a2a2; + margin-top: 5px; +} +.article_alt3_view .card .description p { + position: relative; + margin: 1rem 0 0; + margin-bottom: 5px; + overflow: hidden; + display: -webkit-box; + -webkit-line-clamp: 3; + -webkit-box-orient: vertical; + line-height: 1.4em; +} +.article_alt3_view .card .description p:first-of-type { + margin-top: 1.25rem; +} +.article_alt3_view .card .description p:first-of-type:before { + content: ""; + position: absolute; + height: 5px; + background: #5ad67d; + width: 35px; + top: -0.75rem; + border-radius: 3px; +} +.article_alt3_view .card .description .read_more { + text-align: right; +} +.article_alt3_view .card .description .read_more a { + display: inline-block; + position: relative; +} +@media (min-width: 640px) { + .article_alt3_view .card { + flex-direction: row; + } + .article_alt3_view .card .meta { + flex-basis: 40%; + height: auto; + } + .article_alt3_view .card .description { + flex-basis: 60%; + } + .article_alt3_view .card .description:before { + transform: skewX(-3deg); + content: ""; + background: #fff; + width: 30px; + position: absolute; + left: -10px; + top: 0; + bottom: -1px; + z-index: -1; + } +} +/* .alt { + flex-direction: row-reverse !important; + + .description { + &:before { + left: inherit; + right: -10px; + transform: skew(3deg); + } + } + + .details { + padding-left: 25px; + } +} */ +.article_alt4_view { + justify-content: center; +} +.article_alt4_view article .num { + margin-bottom: 1.2rem; +} +.article_alt4_view article .card { + font-family: 'Heebo'; + background-image: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), var(--bg-img); + height: 20em; + width: 15em; + font-size: 1.2rem; + color: #fff; + border-radius: 1em; + margin: 2px; + padding: 1em; + display: flex; + align-items: flex-end; + background-size: cover; + background-position: center; + transition: all, 0.5s; + position: relative; + overflow: hidden; + border: 5px solid #ccc; + text-decoration: none; +} +.article_alt4_view article .card:hover { + transform: rotate(0); + color: #3c3163; +} +.article_alt4_view article .card:hover .tags .tag { + background: #3c3163; + color: #fff; +} +.article_alt4_view article .card:hover:before, +.article_alt4_view article .card:hover:after { + transform: scale(1); +} +.article_alt4_view article .card:before, +.article_alt4_view article .card:after { + content: ''; + transform: scale(0); + transform-origin: top left; + border-radius: 50%; + position: absolute; + left: -50%; + top: -50%; + z-index: -5; + transition: all, 0.5s; + transition-timing-function: ease-in-out; +} +.article_alt4_view article .card:before { + background: #ddd; + width: 250%; + height: 250%; +} +.article_alt4_view article .card:after { + background: #fff; + width: 200%; + height: 200%; +} +.article_alt4_view article .card h1 { + margin: 0; + font-size: 1.6rem; + line-height: 1.2em; + color: inherit; +} +.article_alt4_view article .card p { + font-size: 1rem; + font-family: 'Open Sans'; + line-height: 2em; + margin-top: 0.5em; + margin-bottom: 5px; + overflow: hidden; + display: -webkit-box; + -webkit-line-clamp: 3; + -webkit-box-orient: vertical; +} +.article_alt4_view article .card .tags { + display: flex; +} +.article_alt4_view article .card .tags .tag { + font-size: 0.8rem; + background: rgba(255, 255, 255, 0.5); + border-radius: 0.3rem; + padding: 0 0.5em; + margin-right: 0.5em; + line-height: 1.5em; + transition: all, 0.5s; +} +.article_alt4_view article .card .date { + position: absolute; + top: 0; + right: 0; + font-size: 0.9rem; + padding: 1em; + line-height: 1em; + opacity: 0.8; +} +.article_alt4_view article .card .date strong { + color: inherit; +} +@media screen and (max-width: 500px) { + .article_alt4_view article .card { + max-width: calc(100vw - 4rem); + } +} +.comment_list { + list-style: none; +} +.comment_list li { + clear: both; + width: 100%; +} +.comment_list li .comment_avatar { + position: absolute; + width: 74px; + vertical-align: top; + padding-right: 10px; +} +.comment_list li .comment_wrapper { + width: 100%; + padding-left: 55px; +} +.comment_list li .comment_wrapper .entry { + display: block; + position: relative; + padding: 0 12px 8px; + border: 1px solid #ddd; + border-radius: 7px; + box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1); +} +.comment_list li .comment_wrapper .entry .title { + display: block; + font-size: 0.7rem; + margin: -1px -13px -11px; + line-height: 20px; + text-align: justify; +} +.comment_list li .comment_wrapper .entry .title::after { + display: inline-block; + content: ''; + width: 100%; + height: 0; + visibility: hidden; + overflow: hidden; +} +.comment_list li .comment_wrapper .entry .title > span { + font-weight: bold; + border: 1px solid #ddd; + border-top-left-radius: 7px; + border-top-right-radius: 0; + border-bottom-right-radius: 7px; + border-bottom-left-radius: 0; + display: inline-block; + vertical-align: top; + padding: 6px 11px; +} +.comment_list li .comment_wrapper .entry .title .comment_date { + border: 1px solid #ddd; + border-top-left-radius: 0; + border-top-right-radius: 7px; + border-bottom-right-radius: 0; + border-bottom-left-radius: 7px; + display: inline-block; + vertical-align: top; + padding: 6px 11px; + opacity: 0.8; +} +.comment_list li .comment_wrapper .entry .content { + padding: 0 14px; +} +.comment_list li .comment_wrapper .entry .content .bbc_list { + list-style-type: initial; +} +.comment_list li .comment_wrapper .entry .content .bbc_code { + overflow: hidden !important; +} +.comment_list li .comment_wrapper .entry .reply_button, +.comment_list li .comment_wrapper .entry .modify_button, +.comment_list li .comment_wrapper .entry .update_button, +.comment_list li .comment_wrapper .entry .cancel_button, +.comment_list li .comment_wrapper .entry .remove_button { + opacity: 0.6; + margin-right: 5px; +} +.comment_list li .comment_wrapper .entry .reply_button:hover, +.comment_list li .comment_wrapper .entry .modify_button:hover, +.comment_list li .comment_wrapper .entry .update_button:hover, +.comment_list li .comment_wrapper .entry .cancel_button:hover, +.comment_list li .comment_wrapper .entry .remove_button:hover { + cursor: pointer; + opacity: 1; +} +.comment_list li .comment_wrapper .entry .update_button, +.comment_list li .comment_wrapper .entry .cancel_button { + display: none; +} +.comment_list li .comment_wrapper .entry .smalltext { + margin-top: 6px; + padding-top: 6px; + border-top: 1px dashed #bfbfbf; +} +#comment_form .toolbar { + display: none; +} +#comment_form textarea { + width: 100%; + height: 30px; +} +#comment_form button[name="comment"] { + margin-top: 10px; + float: right; + display: none; +} +.sceditor-container { + position: relative; + min-height: 300px !important; +} +.priority span, +.status span, +.actions span { + cursor: pointer; +} +#page_comments .row { + margin-right: 0 !important; + margin-left: 0 !important; +} +#page_comments_toggle { + cursor: pointer; +} +.lp_default_blocks th.icon, +.lp_additional_blocks th.icon, +.lp_default_blocks th.actions, +.lp_additional_blocks th.actions { + width: 8%; +} +.features .floatleft { + width: 80%; +} +.features .fa-toggle-on { + color: #00cc33; +} +.lp_plugin_toggle, +.lp_plugin_settings { + cursor: pointer; +} +.lp_plugin_settings { + position: relative; + top: -3px; + vertical-align: baseline !important; +} +.form_settings > div { + margin: 10px; +} +.form_settings input[type="text"], +.form_settings input[type="url"] { + width: 100%; +} +.lp_categories input { + width: 100%; +} +.lp_categories textarea { + width: 100%; + resize: none; + margin-top: 1px; +} +.lp_categories dt .handle { + cursor: grab; +} +.lp_categories dt td.handle { + font-size: 1.2rem; +} +.lp_categories dt span.floatright { + font-size: 1.4rem; + font-weight: bold; + cursor: pointer; +} +.lp_categories dd .roundframe { + margin-top: 0; +} +/* Common media queriers */ +@media (max-width: 480px) { + .lp_default_blocks th.icon, + .lp_additional_blocks th.icon, + .lp_default_blocks td.icon, + .lp_additional_blocks td.icon, + .lp_default_blocks th.type, + .lp_additional_blocks th.type, + .lp_default_blocks td.type, + .lp_additional_blocks td.type, + .lp_default_blocks th.areas, + .lp_additional_blocks th.areas, + .lp_default_blocks td.areas, + .lp_additional_blocks td.areas { + display: none; + } + #lp_pages th.date, + #lp_pages td.date { + display: none; + } + .related_pages .article_list { + grid-template-columns: 1fr; + } +} +@media (min-width: 481px) and (max-width: 600px) { + .lp_default_blocks th.title, + .lp_additional_blocks th.title, + .lp_default_blocks td.title, + .lp_additional_blocks td.title, + .lp_default_blocks th.areas, + .lp_additional_blocks th.areas, + .lp_default_blocks td.areas, + .lp_additional_blocks td.areas { + display: none; + } + .related_pages .article_list { + grid-template-columns: repeat(2, 1fr); + } +} +@media (max-width: 600px) { + .comment_avatar { + display: none; + } + .comment_wrapper { + padding: 0 !important; + } + .comment_wrapper .title .bg { + padding: 4px !important; + } + .comment_list .col-xs-12 { + flex-basis: 95%; + margin-left: 10px; + } + #lp_post .button { + float: none !important; + width: 100%; + margin-left: 0 !important; + } +} +@media (max-width: 720px) { + #lp_layout input[type="radio"] { + width: auto; + } +} +@media (max-width: 800px) { + #lp_pages th.num_views, + #lp_pages td.num_views { + display: none; + } +} +@media (max-width: 887px) { + .information .righttext { + text-align: center; + } + #lp_pages th.alias, + #lp_pages td.alias { + display: none; + } +} +@media (min-width: 1022px) and (max-width: 1200px) { + .article_info div { + text-align: center; + display: block; + } + .article_info .floatleft, + .article_info .floatright { + float: none; + } +} +/* Animations */ +@-webkit-keyframes fadeIn { + from { + opacity: 0; + } + to { + opacity: 1; + } +} +@keyframes fadeIn { + from { + opacity: 0; + } + to { + opacity: 1; + } +} +/* Addons */ +/* UserInfo */ +.block_user_info ul { + list-style: none; + padding-left: 0; +} +.block_user_info ul .avatar { + margin: 1em; +} +@media (min-width: 769px) and (max-width: 1241px) { + .block_user_info span.floatleft, + .block_user_info span.floatright { + float: none; + margin: 0 auto; + display: block; + } +} +/* Likely */ +.likely__widget { + opacity: 0.5 !important; + filter: grayscale(100%); +} +.likely__widget:hover { + opacity: 1 !important; + filter: grayscale(0%); +} +/* RecentPosts, RecentTopics, RandomTopics */ +.recent_posts, +.recent_topics, +.random_topics { + list-style: none; + padding-left: 0; +} +.recent_posts li, +.recent_topics li, +.random_topics li { + margin: 4px 0 0 0; + padding: 6px 12px; +} +.recent_posts .poster_avatar, +.recent_topics .poster_avatar { + float: left; + padding: 3px 11px 0 0; +} +.recent_posts .avatar, +.recent_topics .avatar { + width: 40px; + height: 40px; +} +/* TopPosters */ +dl.top_posters dt img { + width: 24px; + vertical-align: middle; +} +/* ThemeSwitcher */ +.themeswitcher select { + cursor: pointer; + width: 100%; +} +/* Markdown */ +.page_md .bbc_code, +.block_md .bbc_code { + overflow: auto !important; + white-space: pre; +} +.page_md .task-list-item, +.block_md .task-list-item { + list-style: none; + margin-left: -20px; +} +.page_md blockquote { + width: 100% !important; +} +/* RecentAttachments */ +.recent_attachments { + display: flex; + flex-direction: row; + justify-content: space-evenly; +} +.recent_attachments .item { + margin: 5px; +} +.recent_attachments .item img { + object-fit: cover; + width: 100%; + height: 100%; +} +.column_direction { + flex-direction: column !important; +} +/* VkComments */ +#vk_comments { + margin-top: 1em; +} +/* CurrentMonth */ +.block_current_month table { + width: 100%; + margin-bottom: 10px; + border-collapse: collapse; + background: #f0f4f7; + border: 1px solid #ddd; + text-align: center; +} +.block_current_month table .windowbg { + box-shadow: none; + border-radius: 0; + box-sizing: content-box; + margin: 0; +} +.block_current_month th { + padding: 2px; + background: #e7eaef; + font-size: smaller; +} +.block_current_month td { + padding: 2px; + width: 12.5%; + vertical-align: top; + border-right: 1px solid #ddd; + border-bottom: 1px solid #ddd; +} +.block_current_month td.disabled { + background: #eee; + border: 1px solid #ddd; +} +.block_current_month td.events { + background: rgba(30, 245, 20, 0.1); +} +.block_current_month td.holidays { + background: rgba(23, 110, 245, 0.1); +} +.block_current_month td.birthdays { + background: rgba(102, 0, 255, 0.1); +} +.block_current_month td.events:hover, +.block_current_month td.calendar_today.events { + background: rgba(30, 245, 20, 0.2); +} +.block_current_month td.holidays:hover, +.block_current_month td.calendar_today.holidays { + background: rgba(23, 110, 245, 0.2); +} +.block_current_month td.birthdays:hover, +.block_current_month td.calendar_today.birthdays { + background: rgba(153, 51, 255, 0.2); +} +.block_current_month td.calendar_today { + font-weight: bold; +} +.block_current_month td a { + display: block; +} +.block_current_month td a:hover { + text-decoration: none; + background: rgba(97, 135, 166, 0.2); +} +/* BoardList */ +.block_board_list ul { + padding-left: 10px; +} +/* ArticleList */ +.article_list { + display: grid; + grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); + grid-gap: 0 10px; +} +.article_list > div { + display: flex; + flex-direction: column; + justify-content: space-between; + text-align: center; +} +/* FrontpageFlarumStyle */ +.block_flarum_style nav ul { + list-style: none; + padding-left: 0; +} +.block_flarum_style nav ul .roundframe { + margin-top: 0; +} +.block_flarum_style nav ul .roundframe i { + padding-right: 4px; +} +/* BoardStats */ +.block_board_stats .board_stats_areas { + display: grid; + grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); + grid-gap: 0 10px; +} +.block_board_stats .board_stats_areas div { + display: flex; + flex-direction: column; + margin-top: 2px; +} +.block_board_stats .board_stats_areas div h4 { + margin-top: 4px; + margin-bottom: 4px; +} +.block_board_stats .board_stats_areas div ul { + margin-left: -1em; +} +/* AvatarGenerator */ +.comment_avatar svg { + max-width: 50px; +} +/* Todays */ +.block_todays details { + display: contents; + position: relative; + margin-bottom: 0.5rem; + min-height: 1rem; + max-height: 3rem; + transition: min-height 0.15s linear, max-height 0.5s linear; + will-change: max-height; + overflow: hidden; +} +.block_todays details summary { + display: inline-block; + cursor: pointer; + outline: 0; + transition: color 0.12s; +} +.block_todays details summary::-webkit-details-marker { + display: none; +} +.block_todays details summary::-moz-list-bullet { + list-style-type: none; +} +.block_todays details summary span { + border-bottom: 1px currentColor dotted; +} +.block_todays details summary:hover { + color: #d06c6c; +} +.block_todays details summary ~ * { + display: none; + transition: opacity 0.15s linear; +} +.block_todays details[open] { + min-height: 2em; + max-height: 20em; +} +.block_todays details[open] summary { + color: #d06c6c; +} +.block_todays details[open] summary ~ * { + display: block; +} +/* TinySlider */ +.block_tiny_slider .item { + text-align: center; +} +.block_tiny_slider .tns-nav { + text-align: center; + margin: 10px 0; +} +.block_tiny_slider .tns-nav > [aria-controls] { + width: 9px; + height: 9px; + padding: 0; + margin: 0 5px; + border-radius: 50%; + background: #ddd; + border: 0; +} +.block_tiny_slider .tns-nav > .tns-nav-active { + background: #999; +} +.block_tiny_slider .customize-tools { + position: relative; +} +.block_tiny_slider .customize-tools[hidden] { + display: none; +} +.block_tiny_slider .customize-tools .thumbnails { + margin: 20px 0 0; + text-align: center; +} +.block_tiny_slider .customize-tools .thumbnails li { + display: inline-block; + cursor: pointer; + border: 5px solid #fff; + width: 50px; +} +.block_tiny_slider .customize-tools .thumbnails img { + vertical-align: bottom; + height: auto; + max-height: 50px; +} +.block_tiny_slider .customize-tools .thumbnails .tns-nav-active { + background: none; + border-color: #000; +} +@media (max-width: 640px) { + .block_tiny_slider .customize-tools .thumbnails { + margin-bottom: 10px; + } +} +.block_tiny_slider .customize-tools .controls { + text-align: center; + margin-top: 10px; +} +.block_tiny_slider .customize-tools .controls li { + display: block; + padding: 0 15px; + cursor: pointer; + transition: background 0.3s; +} +.block_tiny_slider .customize-tools .controls li span::selection { + text-shadow: none; + background: initial; + color: inherit; +} +@media (max-width: 640px) { + .block_tiny_slider .customize-tools .controls li { + display: inline-block; + position: relative; + padding: 0; + } +} diff --git a/Themes/default/css/light_portal/light_portal.less b/Themes/default/css/light_portal/light_portal.less index 61e68cf3a..f3a809d48 100644 --- a/Themes/default/css/light_portal/light_portal.less +++ b/Themes/default/css/light_portal/light_portal.less @@ -305,65 +305,6 @@ dt.pf_content, dd.pf_content { width: 100%; } - - /* Checkbox toggler */ - .checkbox { - .valign(top); - margin: 0 3px 0 0; - width: 17px; - height: 17px; - - & + .label { - .pointer; - } - - &:not(checked) { - position: absolute; - opacity: 0; - - & + .label { - position: relative; - padding: 0 0 0 60px; - - &:before { - content: ''; - position: absolute; - top: -4px; - left: 0; - width: 50px; - height: 26px; - border-radius: 13px; - background: #cdd1da; - box-shadow: inset 0 2px 3px rgba(0, 0, 0, .2); - } - - &:after { - content: ''; - position: absolute; - top: -2px; - left: 2px; - width: 22px; - height: 22px; - border-radius: 10px; - background: @color-white; - box-shadow: 0 2px 5px rgba(0, 0, 0, .3); - transition: all .2s; - } - } - } - - &:checked { - & + .label { - &:before { - background: @color-checked; - } - - &:after { - left: 26px; - } - } - } - } } .choices__inner { @@ -389,6 +330,65 @@ } } +/* Checkbox toggler */ +.checkbox { + .valign(top); + margin: 0 3px 0 0; + width: 17px; + height: 17px; + + & + .label { + .pointer; + } + + &:not(checked) { + position: absolute; + opacity: 0; + + & + .label { + position: relative; + padding: 0 0 0 60px; + + &:before { + content: ''; + position: absolute; + top: -4px; + left: 0; + width: 50px; + height: 26px; + border-radius: 13px; + background: #cdd1da; + box-shadow: inset 0 2px 3px rgba(0, 0, 0, .2); + } + + &:after { + content: ''; + position: absolute; + top: -2px; + left: 2px; + width: 22px; + height: 22px; + border-radius: 10px; + background: @color-white; + box-shadow: 0 2px 5px rgba(0, 0, 0, .3); + transition: all .2s; + } + } + } + + &:checked { + & + .label { + &:before { + background: @color-checked; + } + + &:after { + left: 26px; + } + } + } +} + .errorbox { color: initial !important; } diff --git a/Themes/default/css/light_portal/light_portal.scss b/Themes/default/css/light_portal/light_portal.scss index 31a974511..9de6361f4 100644 --- a/Themes/default/css/light_portal/light_portal.scss +++ b/Themes/default/css/light_portal/light_portal.scss @@ -276,65 +276,6 @@ $tabs-label-hover-color: #888; dt.pf_content, dd.pf_content { width: 100%; } - - /* Checkbox toggler */ - .checkbox { - @include valign(top); - margin: 0 3px 0 0; - width: 17px; - height: 17px; - - & + .label { - @include pointer; - } - - &:not(checked) { - position: absolute; - opacity: 0; - - & + .label { - position: relative; - padding: 0 0 0 60px; - - &:before { - content: ''; - position: absolute; - top: -4px; - left: 0; - width: 50px; - height: 26px; - @include border-radius(13px); - background: #cdd1da; - @include box-shadow(inset 0 2px 3px rgba(0, 0, 0, .2)); - } - - &:after { - content: ''; - position: absolute; - top: -2px; - left: 2px; - width: 22px; - height: 22px; - @include border-radius(10px); - background: $color-white; - @include box-shadow(0 2px 5px rgba(0, 0, 0, .3)); - transition: all .2s; - } - } - } - - &:checked { - & + .label { - &:before { - background: $color-checked; - } - - &:after { - left: 26px; - } - } - } - } } .choices__inner { @@ -360,6 +301,65 @@ $tabs-label-hover-color: #888; } } +/* Checkbox toggler */ +.checkbox { + @include valign(top); + margin: 0 3px 0 0; + width: 17px; + height: 17px; + + & + .label { + @include pointer; + } + + &:not(checked) { + position: absolute; + opacity: 0; + + & + .label { + position: relative; + padding: 0 0 0 60px; + + &:before { + content: ''; + position: absolute; + top: -4px; + left: 0; + width: 50px; + height: 26px; + @include border-radius(13px); + background: #cdd1da; + @include box-shadow(inset 0 2px 3px rgba(0, 0, 0, .2)); + } + + &:after { + content: ''; + position: absolute; + top: -2px; + left: 2px; + width: 22px; + height: 22px; + @include border-radius(10px); + background: $color-white; + @include box-shadow(0 2px 5px rgba(0, 0, 0, .3)); + transition: all .2s; + } + } + } + + &:checked { + & + .label { + &:before { + background: $color-checked; + } + + &:after { + left: 26px; + } + } + } +} + .errorbox { color: initial !important; } From 07a4c643a02c4b9bdc9543ade2ff4ba5929a39ec Mon Sep 17 00:00:00 2001 From: Bugo Date: Wed, 14 Apr 2021 18:19:27 +0500 Subject: [PATCH 05/24] Refactor code --- Sources/LightPortal/Block.php | 4 ++-- Sources/LightPortal/Category.php | 6 ++++-- Sources/LightPortal/Comment.php | 2 +- Sources/LightPortal/Credits.php | 2 +- Sources/LightPortal/FrontPage.php | 16 ++++++++-------- Sources/LightPortal/Helpers.php | 5 +---- Sources/LightPortal/Integration.php | 6 ++++-- Sources/LightPortal/ManagePlugins.php | 12 ++++++------ Sources/LightPortal/Notify.php | 2 +- Sources/LightPortal/Page.php | 3 ++- Sources/LightPortal/Subs.php | 10 +++++----- Sources/LightPortal/Tag.php | 6 ++++-- Sources/LightPortal/front/ChosenPageArticle.php | 4 +++- Sources/LightPortal/front/ChosenTopicArticle.php | 4 +++- Sources/LightPortal/front/PageArticle.php | 7 ++++--- Sources/LightPortal/front/TopicArticle.php | 5 ++++- Sources/LightPortal/impex/BlockExport.php | 8 ++------ Sources/LightPortal/impex/PageExport.php | 16 ++++++---------- Sources/LightPortal/impex/PageImport.php | 4 ++-- 19 files changed, 63 insertions(+), 59 deletions(-) diff --git a/Sources/LightPortal/Block.php b/Sources/LightPortal/Block.php index 4bea69b1f..2fc7cc7a8 100644 --- a/Sources/LightPortal/Block.php +++ b/Sources/LightPortal/Block.php @@ -66,10 +66,10 @@ public function show() loadTemplate('LightPortal/ViewBlock'); $counter = 0; - foreach ($context['template_layers'] as $position => $name) { + foreach ($context['template_layers'] as $layer) { $counter++; - if ($name == 'body') + if ($layer === 'body') break; } diff --git a/Sources/LightPortal/Category.php b/Sources/LightPortal/Category.php index 433c1edaf..f442fa87b 100644 --- a/Sources/LightPortal/Category.php +++ b/Sources/LightPortal/Category.php @@ -2,6 +2,8 @@ namespace Bugo\LightPortal; +use Exception; + /** * Category.php * @@ -25,7 +27,7 @@ class Category implements PageListInterface * Отображение всех страниц портала внутри выбранной рубрики * * @return void - * @throws \Exception + * @throws Exception */ public function show() { @@ -100,7 +102,7 @@ public function show() * @param int $items_per_page * @param string $sort * @return array - * @throws \Exception + * @throws Exception */ public function getPages(int $start, int $items_per_page, string $sort): array { diff --git a/Sources/LightPortal/Comment.php b/Sources/LightPortal/Comment.php index 8be8a1ff5..c9868c924 100644 --- a/Sources/LightPortal/Comment.php +++ b/Sources/LightPortal/Comment.php @@ -433,7 +433,7 @@ public function getAll(int $page_id = 0): array 'message' => empty($context['lp_allowed_bbc']) ? $row['message'] : parse_bbc($row['message'], true, 'light_portal_comments_' . $page_id, $context['lp_allowed_bbc']), 'raw_message' => un_preparsecode($row['message']), 'created_at' => $row['created_at'], - 'can_edit' => !empty($modSettings['lp_time_to_change_comments']) ? (time() - $row['created_at'] <= (int) $modSettings['lp_time_to_change_comments'] * 60) : false + 'can_edit' => !empty($modSettings['lp_time_to_change_comments']) && time() - $row['created_at'] <= (int) $modSettings['lp_time_to_change_comments'] * 60 ); } diff --git a/Sources/LightPortal/Credits.php b/Sources/LightPortal/Credits.php index a2d05b8fd..7b3bc6a10 100644 --- a/Sources/LightPortal/Credits.php +++ b/Sources/LightPortal/Credits.php @@ -58,7 +58,7 @@ public function getCopyrights(): string } /** - * Prepare information about contrubutors and third party components + * Prepare information about contributors and third party components * * Формируем информацию о внесших вклад в развитие портала и об используемых компонентах */ diff --git a/Sources/LightPortal/FrontPage.php b/Sources/LightPortal/FrontPage.php index 1047a5f84..a42684de9 100644 --- a/Sources/LightPortal/FrontPage.php +++ b/Sources/LightPortal/FrontPage.php @@ -188,13 +188,13 @@ public function getLayouts(): array $layouts = $values = []; - $all_funcs = get_defined_functions()['user']; + $allFunctions = get_defined_functions()['user']; require_once($settings['default_theme_dir'] . '/LightPortal/ViewFrontPage.template.php'); - $fp_funcs = array_values(array_diff(get_defined_functions()['user'], $all_funcs)); + $frontPageFunctions = array_values(array_diff(get_defined_functions()['user'], $allFunctions)); - preg_match_all('/template_show_([a-z]+)(.*)/', implode("\n", $fp_funcs), $matches); + preg_match_all('/template_show_([a-z]+)(.*)/', implode("\n", $frontPageFunctions), $matches); if (!empty($matches[1])) { foreach ($matches[1] as $k => $v) { @@ -216,7 +216,7 @@ public function getLayouts(): array * @param int $date * @return string */ - public function getCardDate($date): string + public function getCardDate(int $date): string { global $modSettings; @@ -238,9 +238,9 @@ public function getCardDate($date): string * * Получаем условие сортировки для SQL * - * @return void + * @return string */ - public function getOrderBy() + public function getOrderBy(): string { global $context; @@ -271,7 +271,7 @@ public function getOrderBy() * @param array $articles * @return array */ - private function postProcess($entity, $articles) + private function postProcess(string $entity, array $articles): array { return array_map(function ($article) use ($entity) { global $context, $modSettings; @@ -282,7 +282,7 @@ private function postProcess($entity, $articles) if (!empty($article['date'])) { $article['datetime'] = date('Y-m-d', $article['date']); - $article['date'] = $this->getCardDate($article['date']); + $article['date'] = $this->getCardDate((int) $article['date']); } $article['msg_link'] = $article['msg_link'] ?? $article['link']; diff --git a/Sources/LightPortal/Helpers.php b/Sources/LightPortal/Helpers.php index 201ba4ee9..6d3005d82 100644 --- a/Sources/LightPortal/Helpers.php +++ b/Sources/LightPortal/Helpers.php @@ -533,11 +533,8 @@ public static function getSnakeName(string $value, string $delimiter = '_'): str * @param string $text * @return string */ - public static function getTeaser($text): string + public static function getTeaser(string $text): string { - if (empty($text)) - return '...'; - $text = strip_tags($text); return $text ?: '...'; diff --git a/Sources/LightPortal/Integration.php b/Sources/LightPortal/Integration.php index e6b98fddd..ec8d5bb8d 100644 --- a/Sources/LightPortal/Integration.php +++ b/Sources/LightPortal/Integration.php @@ -2,6 +2,8 @@ namespace Bugo\LightPortal; +use Likes; + /** * Integration.php * @@ -489,10 +491,10 @@ public function validLikes(string $type, int $content) * * Обновляем кэш при лайке/дизлайке страниц * - * @param \Likes $obj + * @param Likes $obj * @return void */ - public function issueLike(\Likes $obj) + public function issueLike(Likes $obj) { if ($obj->get('type') !== 'lpp') return; diff --git a/Sources/LightPortal/ManagePlugins.php b/Sources/LightPortal/ManagePlugins.php index 036f57dc0..f92028335 100644 --- a/Sources/LightPortal/ManagePlugins.php +++ b/Sources/LightPortal/ManagePlugins.php @@ -85,7 +85,7 @@ public function main() checkSession(); $plugin_options = []; - foreach ($config_vars as $id => $var) { + foreach ($config_vars as $var) { if (Helpers::post()->has($var[1])) { if ($var[0] == 'check') { $plugin_options[$var[1]] = (int) Helpers::validate(Helpers::post($var[1]), 'bool'); @@ -560,7 +560,7 @@ private function setData() EOF; } - foreach ($context['lp_plugin']['options'] as $id => $option) { + foreach ($context['lp_plugin']['options'] as $option) { if (!empty($option['default'])) { switch ($option['type']) { case 'int'; @@ -621,7 +621,7 @@ public function addSettings(&$config_vars) EOF; - foreach ($context['lp_plugin']['options'] as $id => $option) { + foreach ($context['lp_plugin']['options'] as $option) { if (!empty($option['default'])) { $class_content .= << $option) { + foreach ($context['lp_plugin']['options'] as $option) { if ($option['type'] == 'text') $class_content .= << $option) { + foreach ($context['lp_plugin']['options'] as $option) { foreach ($option['translations'] as $lang => $value) { $lang_file = << empty($modSettings['lp_frontpage_article_sorting']) && !empty($row['comment_date']) ? $row['comment_date'] : $row['created_at'], 'link' => $scripturl . '?page=' . $row['alias'], 'views' => array( - 'num' => $row['num_views'], + 'num' => $row['num_views'], 'title' => $txt['lp_views'] ), 'replies' => array( - 'num' => !empty($modSettings['lp_show_comment_block']) && $modSettings['lp_show_comment_block'] == 'default' ? $row['num_comments'] : 0, + 'num' => !empty($modSettings['lp_show_comment_block']) && $modSettings['lp_show_comment_block'] == 'default' ? $row['num_comments'] : 0, 'title' => $txt['lp_comments'] ), 'is_new' => $user_info['last_login'] < $row['date'] && $row['author_id'] != $user_info['id'], diff --git a/Sources/LightPortal/front/TopicArticle.php b/Sources/LightPortal/front/TopicArticle.php index 4ba6cfa9f..2854a7710 100644 --- a/Sources/LightPortal/front/TopicArticle.php +++ b/Sources/LightPortal/front/TopicArticle.php @@ -2,6 +2,7 @@ namespace Bugo\LightPortal\Front; +use Exception; use Bugo\LightPortal\{Helpers, Subs}; /** @@ -66,7 +67,7 @@ public function init() * @param int $start * @param int $limit * @return array - * @throws \Exception + * @throws Exception */ public function getData(int $start, int $limit): array { @@ -121,6 +122,8 @@ public function getData(int $start, int $limit): array censorText($row['subject']); + $body = $last_body = ''; + if (!empty($modSettings['lp_show_teaser'])) { censorText($row['body']); censorText($row['last_body']); diff --git a/Sources/LightPortal/impex/BlockExport.php b/Sources/LightPortal/impex/BlockExport.php index 640984f31..25ce8f5b0 100644 --- a/Sources/LightPortal/impex/BlockExport.php +++ b/Sources/LightPortal/impex/BlockExport.php @@ -52,13 +52,9 @@ public function main() } /** - * Creating data in XML format - * - * Формируем данные в XML-формате - * * @return array */ - protected function getData() + protected function getData(): array { global $smcFunc; @@ -137,7 +133,7 @@ protected function getXmlFile() $xmlName = $xmlElement->appendChild(in_array($key, ['block_id', 'priority', 'permissions', 'status']) ? $xml->createAttribute($key) : $xml->createElement($key)); if (in_array($key, ['titles', 'params'])) { - foreach ($item[$key] as $k => $v) { + foreach ($val as $k => $v) { $xmlTitle = $xmlName->appendChild($xml->createElement($k)); $xmlTitle->appendChild($xml->createTextNode($v)); } diff --git a/Sources/LightPortal/impex/PageExport.php b/Sources/LightPortal/impex/PageExport.php index 03725bf8f..27e3b30af 100644 --- a/Sources/LightPortal/impex/PageExport.php +++ b/Sources/LightPortal/impex/PageExport.php @@ -139,13 +139,9 @@ public function main() } /** - * Creating data in XML format - * - * Формируем данные в XML-формате - * * @return array */ - protected function getData() + protected function getData(): array { global $smcFunc; @@ -217,7 +213,7 @@ protected function getData() * * @return array */ - protected function getCategories() + protected function getCategories(): array { $categories = (new \Bugo\LightPortal\Category)->getList(); @@ -235,7 +231,7 @@ protected function getCategories() * * @return array */ - protected function getTags() + protected function getTags(): array { $tags = (new \Bugo\LightPortal\Tag)->getList(); @@ -251,7 +247,7 @@ protected function getTags() * * @return string */ - protected function getXmlFile() + protected function getXmlFile(): string { if (empty($items = $this->getData())) return ''; @@ -294,14 +290,14 @@ protected function getXmlFile() ); if (in_array($key, ['titles', 'params'])) { - foreach ($item[$key] as $k => $v) { + foreach ($val as $k => $v) { $xmlTitle = $xmlName->appendChild($xml->createElement($k)); $xmlTitle->appendChild($xml->createTextNode($v)); } } elseif (in_array($key, ['description', 'content'])) { $xmlName->appendChild($xml->createCDATASection($val)); } elseif ($key == 'comments') { - foreach ($item[$key] as $k => $comment) { + foreach ($val as $comment) { $xmlComment = $xmlName->appendChild($xml->createElement('comment')); foreach ($comment as $label => $text) { $xmlCommentElem = $xmlComment->appendChild($label == 'message' ? $xml->createElement($label) : $xml->createAttribute($label)); diff --git a/Sources/LightPortal/impex/PageImport.php b/Sources/LightPortal/impex/PageImport.php index be2598322..04ec60f06 100644 --- a/Sources/LightPortal/impex/PageImport.php +++ b/Sources/LightPortal/impex/PageImport.php @@ -134,11 +134,11 @@ protected function run() if (!empty($item->comments)) { foreach ($item->comments as $comment) { - foreach ($comment as $k => $v) { + foreach ($comment as $v) { $comments[] = [ 'id' => intval($v['id']), 'parent_id' => intval($v['parent_id']), - 'page_id' => intval($page_id), + 'page_id' => $page_id, 'author_id' => intval($v['author_id']), 'message' => $v->message, 'created_at' => intval($v['created_at']) From 65dfef54c162b0bbeb911747ebaee8b75e4b1eb9 Mon Sep 17 00:00:00 2001 From: Bugo Date: Thu, 15 Apr 2021 16:45:09 +0500 Subject: [PATCH 06/24] Update DevTools languages --- Sources/LightPortal/addons/DevTools/langs/english.php | 2 +- Sources/LightPortal/addons/DevTools/langs/russian.php | 2 +- Sources/LightPortal/addons/DevTools/langs/ukrainian.php | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Sources/LightPortal/addons/DevTools/langs/english.php b/Sources/LightPortal/addons/DevTools/langs/english.php index 378ac91eb..d93472285 100644 --- a/Sources/LightPortal/addons/DevTools/langs/english.php +++ b/Sources/LightPortal/addons/DevTools/langs/english.php @@ -3,7 +3,7 @@ $txt['lp_dev_tools_description'] = 'Tools for template and plugin developers.'; $txt['lp_dev_tools_addon_show_template_switcher'] = 'Display a list of template layouts for article cards'; -$txt['lp_dev_tools_addon_fake_cards'] = 'Generating fake cards'; +$txt['lp_dev_tools_addon_fake_cards'] = 'Display fake cards'; $txt['lp_dev_tools_addon_fake_cards_subtext'] = 'The plugin generates 6 fake cards on the frontpage, for testing templates.'; $txt['lp_dev_tools_addon_template'] = 'Template'; \ No newline at end of file diff --git a/Sources/LightPortal/addons/DevTools/langs/russian.php b/Sources/LightPortal/addons/DevTools/langs/russian.php index 72150c5ab..399c6da21 100644 --- a/Sources/LightPortal/addons/DevTools/langs/russian.php +++ b/Sources/LightPortal/addons/DevTools/langs/russian.php @@ -3,7 +3,7 @@ $txt['lp_dev_tools_description'] = 'Инструменты для разработчиков шаблонов и плагинов.'; $txt['lp_dev_tools_addon_show_template_switcher'] = 'Отображать список шаблонов для оформления карточек'; -$txt['lp_dev_tools_addon_fake_cards'] = 'Генерация фейковых карточек'; +$txt['lp_dev_tools_addon_fake_cards'] = 'Отображать фейковые карточки'; $txt['lp_dev_tools_addon_fake_cards_subtext'] = 'Плагин генерирует 6 фейковых карточек на главной странице портала, для тестирования шаблонов.'; $txt['lp_dev_tools_addon_template'] = 'Шаблон'; \ No newline at end of file diff --git a/Sources/LightPortal/addons/DevTools/langs/ukrainian.php b/Sources/LightPortal/addons/DevTools/langs/ukrainian.php index 3ba85d93f..f38598c16 100644 --- a/Sources/LightPortal/addons/DevTools/langs/ukrainian.php +++ b/Sources/LightPortal/addons/DevTools/langs/ukrainian.php @@ -3,7 +3,7 @@ $txt['lp_dev_tools_description'] = 'Інструменти для розробників шаблонів і плагінів.'; $txt['lp_dev_tools_addon_show_template_switcher'] = 'Відображати список шаблонів для оформлення карток'; -$txt['lp_dev_tools_addon_fake_cards'] = 'Генерація фейкових карток'; +$txt['lp_dev_tools_addon_fake_cards'] = 'Відображати фейкових карток'; $txt['lp_dev_tools_addon_fake_cards_subtext'] = 'Плагін генерує 6 фейкових карток на головній сторінці порталу, для тестування шаблонів.'; $txt['lp_dev_tools_addon_template'] = 'Шаблон'; \ No newline at end of file From 73c319f929413803594b8c453926a0e832d8f130 Mon Sep 17 00:00:00 2001 From: Bugo Date: Fri, 16 Apr 2021 12:54:54 +0500 Subject: [PATCH 07/24] Update languages --- Themes/default/languages/LightPortal/.russian.php | 2 +- Themes/default/languages/LightPortal/.ukrainian.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Themes/default/languages/LightPortal/.russian.php b/Themes/default/languages/LightPortal/.russian.php index 36e38da37..95b1fa9a8 100644 --- a/Themes/default/languages/LightPortal/.russian.php +++ b/Themes/default/languages/LightPortal/.russian.php @@ -23,7 +23,7 @@ // Settings $txt['lp_settings'] = 'Настройки портала'; $txt['lp_base'] = 'Настройки главной страницы и статей'; -$txt['lp_base_info'] = 'Версия мода: %1$s, версия PHP: %2$s, версия %3$s: %4$s.
Обсудить на русском баги и фичи портала можно на форуме разработчика.
Вы также можете стать спонсором на Boosty.to или купить разработчику чашку кофе.'; +$txt['lp_base_info'] = 'Версия мода: %1$s, версия PHP: %2$s, версия %3$s: %4$s.
Обсудить на русском баги и фичи портала можно на форуме разработчика.
Вы также можете стать спонсором на Boosty.to, купить разработчику чашку кофе или пожертвовать любую сумму на QIWI Кошелёк.'; $txt['lp_frontpage_title'] = 'Заголовок главной страницы'; $txt['lp_frontpage_mode'] = 'Первая страница портала'; diff --git a/Themes/default/languages/LightPortal/.ukrainian.php b/Themes/default/languages/LightPortal/.ukrainian.php index ca2e83ac2..82d17d4f5 100644 --- a/Themes/default/languages/LightPortal/.ukrainian.php +++ b/Themes/default/languages/LightPortal/.ukrainian.php @@ -23,7 +23,7 @@ // Settings $txt['lp_settings'] = 'Налаштування порталу'; $txt['lp_base'] = 'Налаштування головної сторінки і статей'; -$txt['lp_base_info'] = 'Версія моду: %1$s, версія PHP: %2$s, версія %3$s: %4$s.
Обговорити баги і фічі порталу можна на форумі розробника.
Ви також можете стати спонсором на Patreon або на Boosty.to.'; +$txt['lp_base_info'] = 'Версія моду: %1$s, версія PHP: %2$s, версія %3$s: %4$s.
Обговорити баги і фічі порталу можна на форумі розробника.
Ви також можете стати спонсором на Patreon або на Boosty.to, купити розробнику чашку кави або пожертвувати будь-яку суму на QIWI Гаманець.'; $txt['lp_frontpage_title'] = 'Заголовок головної сторінки'; $txt['lp_frontpage_mode'] = 'Перша сторінка порталу'; From f4ddce1e399923df62c8f0765dc42a8ab8df21fc Mon Sep 17 00:00:00 2001 From: Bugo Date: Thu, 29 Apr 2021 09:26:09 +0500 Subject: [PATCH 08/24] Refactor code --- Sources/LightPortal/ManageBlocks.php | 2 +- Sources/LightPortal/ManagePages.php | 2 +- Sources/LightPortal/utils/AbstractArray.php | 51 +-------------------- 3 files changed, 4 insertions(+), 51 deletions(-) diff --git a/Sources/LightPortal/ManageBlocks.php b/Sources/LightPortal/ManageBlocks.php index 8b5b6ef1f..3afd2138b 100644 --- a/Sources/LightPortal/ManageBlocks.php +++ b/Sources/LightPortal/ManageBlocks.php @@ -390,7 +390,7 @@ private function validateData() { global $context, $modSettings; - if (Helpers::post()->has('save') || Helpers::post()->has('save_exit') || Helpers::post()->has('preview')) { + if (Helpers::post()->only(['save', 'save_exit', 'preview'])) { $args = array( 'block_id' => FILTER_VALIDATE_INT, 'icon' => FILTER_SANITIZE_STRING, diff --git a/Sources/LightPortal/ManagePages.php b/Sources/LightPortal/ManagePages.php index 603087191..847b33e0e 100644 --- a/Sources/LightPortal/ManagePages.php +++ b/Sources/LightPortal/ManagePages.php @@ -640,7 +640,7 @@ private function validateData() { global $context, $modSettings, $user_info; - if (Helpers::post()->has('save') || Helpers::post()->has('save_exit') || Helpers::post()->has('preview')) { + if (Helpers::post()->only(['save', 'save_exit', 'preview'])) { $args = array( 'category' => FILTER_VALIDATE_INT, 'page_author' => FILTER_VALIDATE_INT, diff --git a/Sources/LightPortal/utils/AbstractArray.php b/Sources/LightPortal/utils/AbstractArray.php index 3753f4fb3..9180d5cb8 100644 --- a/Sources/LightPortal/utils/AbstractArray.php +++ b/Sources/LightPortal/utils/AbstractArray.php @@ -76,17 +76,15 @@ public static function all() * * Получаем значения только запрошенных ключей $keys в $obj * - * @param array|string $keys + * @param array $keys * @return array */ public static function only($keys) { $result = []; - if (is_string($keys)) - $keys = explode(',', $keys); - foreach ($keys as $key) { + $key = trim($key); if (isset(static::$obj[$key])) $result[$key] = static::$obj[$key]; } @@ -94,51 +92,6 @@ public static function only($keys) return $result; } - /** - * Get only the request keys that not defined in $keys - * - * Получаем значения только тех ключей в $obj, которые не перечислены в $keys - * - * @param array|string $keys - * @return array - */ - public static function except($keys) - { - $result = []; - - if (is_string($keys)) - $keys = explode(',', $keys); - - foreach ($keys as $key) { - if (isset(static::$obj[$key])) - $result[$key] = static::$obj[$key]; - } - - return array_diff(static::$obj, $result); - } - - /** - * Push a value into the key-array - * - * Сохраняем значение $value в переменную-массив $key - * - * @param string $key - * @param mixed $value - * @return void - */ - public static function push(string $key, $value) - { - if (!static::has($key) || !is_array(static::$obj[$key])) - return; - - if (strpos($key, '.') !== false) { - $subKey = explode('.', $key)[0]; - static::$obj[$key][$subKey] = $value; - } else { - static::$obj[$key][] = $value; - } - } - /** * Unset the $obj key * From bfbb5386639d70beaa709826ff354985ba31abc4 Mon Sep 17 00:00:00 2001 From: Bugo Date: Tue, 11 May 2021 08:27:59 +0500 Subject: [PATCH 09/24] Update FlarumStyle --- Sources/LightPortal/addons/FlarumStyle/Template.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Sources/LightPortal/addons/FlarumStyle/Template.php b/Sources/LightPortal/addons/FlarumStyle/Template.php index aada7c75a..0371e40ba 100644 --- a/Sources/LightPortal/addons/FlarumStyle/Template.php +++ b/Sources/LightPortal/addons/FlarumStyle/Template.php @@ -120,7 +120,7 @@ function template_show_topics_as_flarum_style() if (!empty($article['author']['id'])) { echo ' - ', $article['author']['name'], ', '; + ', $article['author']['name'], ', '; } else { echo ' ', $article['author']['name'], ', '; From 16b114d1ff36f5adc5a02ade6ad426895674ea98 Mon Sep 17 00:00:00 2001 From: Bugo Date: Tue, 25 May 2021 16:09:37 +0500 Subject: [PATCH 10/24] Add the list of plugins for sponsors --- Sources/LightPortal/ManagePlugins.php | 38 ++++++++++++++++--- .../LightPortal/ManagePlugins.template.php | 9 ++++- .../languages/LightPortal/.english.php | 3 +- .../default/languages/LightPortal/.french.php | 3 +- .../default/languages/LightPortal/.polish.php | 3 +- .../languages/LightPortal/.russian.php | 3 +- .../languages/LightPortal/.spanish_es.php | 3 +- .../languages/LightPortal/.spanish_latin.php | 3 +- .../languages/LightPortal/.turkish.php | 3 +- .../languages/LightPortal/.ukrainian.php | 3 +- 10 files changed, 57 insertions(+), 14 deletions(-) diff --git a/Sources/LightPortal/ManagePlugins.php b/Sources/LightPortal/ManagePlugins.php index f92028335..48748db8f 100644 --- a/Sources/LightPortal/ManagePlugins.php +++ b/Sources/LightPortal/ManagePlugins.php @@ -53,6 +53,8 @@ public function main() $context['lp_plugins'] = Subs::getAddons(); + $this->addPluginsForSponsors(); + asort($context['lp_plugins']); $txt['lp_plugins_extra'] = $txt['lp_plugins'] . ' (' . count($context['lp_plugins']) . ')'; @@ -64,8 +66,14 @@ public function main() Subs::runAddons('addSettings', array(&$config_vars), $context['lp_plugins']); $context['all_lp_plugins'] = array_map(function ($item) use ($txt, $context, $config_vars) { - $addonClass = new \ReflectionClass(__NAMESPACE__ . '\Addons\\' . $item . '\\' . $item); - $comments = explode('* ', $addonClass->getDocComment()); + $donate = false; + + try { + $addonClass = new \ReflectionClass(__NAMESPACE__ . '\Addons\\' . $item . '\\' . $item); + $comments = explode('* ', $addonClass->getDocComment()); + } catch (\Exception $e) { + $donate = true; + } return [ 'name' => $item, @@ -74,7 +82,7 @@ public function main() 'link' => !empty($comments[3]) ? trim(explode(' ', $comments[3])[1]) : '', 'author' => !empty($comments[4]) ? trim(explode(' ', $comments[4])[1]) : '', 'status' => in_array($item, $context['lp_enabled_plugins']) ? 'on' : 'off', - 'types' => $this->getTypes($snake_name), + 'types' => $donate ? $txt['lp_sponsors_only'] : $this->getTypes($snake_name), 'settings' => $this->getSettings($config_vars, $item) ]; }, $context['lp_plugins']); @@ -815,11 +823,31 @@ class {$context['lp_plugin']['name']} redirectexit('action=admin;area=lp_plugins;sa=main'); } + /** + * @return void + */ + private function addPluginsForSponsors() + { + global $context; + + $context['lp_plugins'] = array_merge( + $context['lp_plugins'], + array( + 'AvatarGenerator', + 'ExtUpload', + 'GoogleAmp', + 'Jodit', + 'PageScroll', + 'YandexTurbo' + ) + ); + } + /** * @param string $snake_name * @return string */ - private static function getTypes(string $snake_name): string + private function getTypes(string $snake_name): string { global $txt, $context; @@ -848,7 +876,7 @@ private static function getTypes(string $snake_name): string * @param string $name * @return array */ - private static function getSettings(array $config_vars, $name = ''): array + private function getSettings(array $config_vars, $name = ''): array { if (empty($config_vars)) return []; diff --git a/Themes/default/LightPortal/ManagePlugins.template.php b/Themes/default/LightPortal/ManagePlugins.template.php index b417dab05..b1f88a2bc 100644 --- a/Themes/default/LightPortal/ManagePlugins.template.php +++ b/Themes/default/LightPortal/ManagePlugins.template.php @@ -52,8 +52,15 @@ function template_manage_plugins() ', $txt['settings'], ''; } + if ($plugin['types'] === $txt['lp_sponsors_only'] ) { + echo ' + '; + } else { + echo ' + '; + } + echo ' -
'; if (!empty($plugin['settings'])) diff --git a/Themes/default/languages/LightPortal/.english.php b/Themes/default/languages/LightPortal/.english.php index 2a0eddb3c..e11edfc3a 100644 --- a/Themes/default/languages/LightPortal/.english.php +++ b/Themes/default/languages/LightPortal/.english.php @@ -19,11 +19,12 @@ $txt['lp_views'] = $txt['views']; $txt['lp_replies'] = $txt['replies']; $txt['lp_default'] = 'Default'; +$txt['lp_sponsors_only'] = 'For sponsors of the portal'; // Settings $txt['lp_settings'] = 'Portal settings'; $txt['lp_base'] = 'Settings for the frontpage and articles'; -$txt['lp_base_info'] = 'The mod version: %1$s, PHP version: %2$s, %3$s version: %4$s.
One can discuss bugs and features of the portal at simplemachines.com.
You can also become a sponsor on Patreon or buy a cup of coffee as a thank.'; +$txt['lp_base_info'] = 'The mod version: %1$s, PHP version: %2$s, %3$s version: %4$s.
One can discuss bugs and features of the portal at simplemachines.com.
You can also buy a cup of coffee as a thank.'; $txt['lp_frontpage_title'] = 'The frontpage title'; $txt['lp_frontpage_mode'] = 'The portal frontpage'; diff --git a/Themes/default/languages/LightPortal/.french.php b/Themes/default/languages/LightPortal/.french.php index 5bc5525ab..7e58c0c2c 100644 --- a/Themes/default/languages/LightPortal/.french.php +++ b/Themes/default/languages/LightPortal/.french.php @@ -19,11 +19,12 @@ $txt['lp_views'] = $txt['vues']; $txt['lp_replies'] = $txt['réponses']; $txt['lp_default'] = 'Page par défaut'; +$txt['lp_sponsors_only'] = 'For sponsors of the portal'; // Settings $txt['lp_settings'] = 'Paramètres du portail'; $txt['lp_base'] = 'Paramètres de la page d\'accueil et des articles'; -$txt['lp_base_info'] = 'La version mod: %1$s, version PHP: %2$s, %3$s version: %4$s.
On peut discuter des bogues et des fonctionnalités du portail à simplemachines.com.
Vous pouvez également devenir sponsor sur Patreon ou acheter une tasse de café en guise de remerciement.'; +$txt['lp_base_info'] = 'La version mod: %1$s, version PHP: %2$s, %3$s version: %4$s.
On peut discuter des bogues et des fonctionnalités du portail à simplemachines.com.
Vous pouvez également acheter une tasse de café en guise de remerciement.'; $txt['lp_frontpage_title'] = 'Le titre de la page d\'accueil'; $txt['lp_frontpage_mode'] = 'La page d\'accueil du portail'; diff --git a/Themes/default/languages/LightPortal/.polish.php b/Themes/default/languages/LightPortal/.polish.php index dcd218da4..ce10d2d45 100644 --- a/Themes/default/languages/LightPortal/.polish.php +++ b/Themes/default/languages/LightPortal/.polish.php @@ -19,11 +19,12 @@ $txt['lp_views'] = $txt['views']; $txt['lp_replies'] = $txt['replies']; $txt['lp_default'] = 'Default'; +$txt['lp_sponsors_only'] = 'For sponsors of the portal'; // Settings $txt['lp_settings'] = 'Ustawienia portalu'; $txt['lp_base'] = 'Ustawienia strony głównej i artykułów'; -$txt['lp_base_info'] = 'Wersja modyfikacji: %1$s, Wersja PHP: %2$s, Wersja %3$s: %4$s.
One can discuss bugs and features of the portal at simplemachines.com.
You can also become a sponsor on Patreon or buy a cup of coffee as a thank.'; +$txt['lp_base_info'] = 'Wersja modyfikacji: %1$s, Wersja PHP: %2$s, Wersja %3$s: %4$s.
One can discuss bugs and features of the portal at simplemachines.com.
You can also buy a cup of coffee as a thank.'; $txt['lp_frontpage_title'] = 'Tytuł strony głównej'; $txt['lp_frontpage_mode'] = 'Strona główna portalu'; diff --git a/Themes/default/languages/LightPortal/.russian.php b/Themes/default/languages/LightPortal/.russian.php index 95b1fa9a8..8d55822d5 100644 --- a/Themes/default/languages/LightPortal/.russian.php +++ b/Themes/default/languages/LightPortal/.russian.php @@ -19,11 +19,12 @@ $txt['lp_views'] = 'Просмотры'; $txt['lp_replies'] = 'Ответы'; $txt['lp_default'] = 'По умолчанию'; +$txt['lp_sponsors_only'] = 'Для спонсоров портала'; // Settings $txt['lp_settings'] = 'Настройки портала'; $txt['lp_base'] = 'Настройки главной страницы и статей'; -$txt['lp_base_info'] = 'Версия мода: %1$s, версия PHP: %2$s, версия %3$s: %4$s.
Обсудить на русском баги и фичи портала можно на форуме разработчика.
Вы также можете стать спонсором на Boosty.to, купить разработчику чашку кофе или пожертвовать любую сумму на QIWI Кошелёк.'; +$txt['lp_base_info'] = 'Версия мода: %1$s, версия PHP: %2$s, версия %3$s: %4$s.
Обсудить на русском баги и фичи портала можно на форуме разработчика.
Вы также можете купить разработчику чашку кофе или пожертвовать любую сумму на QIWI Кошелёк.'; $txt['lp_frontpage_title'] = 'Заголовок главной страницы'; $txt['lp_frontpage_mode'] = 'Первая страница портала'; diff --git a/Themes/default/languages/LightPortal/.spanish_es.php b/Themes/default/languages/LightPortal/.spanish_es.php index 8b5128ba5..ce5ef4a4a 100644 --- a/Themes/default/languages/LightPortal/.spanish_es.php +++ b/Themes/default/languages/LightPortal/.spanish_es.php @@ -19,11 +19,12 @@ $txt['lp_views'] = $txt['views']; $txt['lp_replies'] = $txt['replies']; $txt['lp_default'] = 'Default'; +$txt['lp_sponsors_only'] = 'For sponsors of the portal'; // Settings $txt['lp_settings'] = 'Configuración del portal'; $txt['lp_base'] = 'Configuraciones para la portada y los artículos'; -$txt['lp_base_info'] = 'La versión del mod: %1$s,Versión PHP: %2$s, %3$s versión: %4$s.
One can discuss bugs and features of the portal at simplemachines.com.
You can also become a sponsor on Patreon or buy a cup of coffee as a thank.'; +$txt['lp_base_info'] = 'La versión del mod: %1$s,Versión PHP: %2$s, %3$s versión: %4$s.
One can discuss bugs and features of the portal at simplemachines.com.
You can also buy a cup of coffee as a thank.'; $txt['lp_frontpage_title'] = 'El título de la portada'; $txt['lp_frontpage_mode'] = 'La primera página del portal'; diff --git a/Themes/default/languages/LightPortal/.spanish_latin.php b/Themes/default/languages/LightPortal/.spanish_latin.php index 8b5128ba5..ce5ef4a4a 100644 --- a/Themes/default/languages/LightPortal/.spanish_latin.php +++ b/Themes/default/languages/LightPortal/.spanish_latin.php @@ -19,11 +19,12 @@ $txt['lp_views'] = $txt['views']; $txt['lp_replies'] = $txt['replies']; $txt['lp_default'] = 'Default'; +$txt['lp_sponsors_only'] = 'For sponsors of the portal'; // Settings $txt['lp_settings'] = 'Configuración del portal'; $txt['lp_base'] = 'Configuraciones para la portada y los artículos'; -$txt['lp_base_info'] = 'La versión del mod: %1$s,Versión PHP: %2$s, %3$s versión: %4$s.
One can discuss bugs and features of the portal at simplemachines.com.
You can also become a sponsor on Patreon or buy a cup of coffee as a thank.'; +$txt['lp_base_info'] = 'La versión del mod: %1$s,Versión PHP: %2$s, %3$s versión: %4$s.
One can discuss bugs and features of the portal at simplemachines.com.
You can also buy a cup of coffee as a thank.'; $txt['lp_frontpage_title'] = 'El título de la portada'; $txt['lp_frontpage_mode'] = 'La primera página del portal'; diff --git a/Themes/default/languages/LightPortal/.turkish.php b/Themes/default/languages/LightPortal/.turkish.php index 6c174c378..28c70bc98 100644 --- a/Themes/default/languages/LightPortal/.turkish.php +++ b/Themes/default/languages/LightPortal/.turkish.php @@ -19,11 +19,12 @@ $txt['lp_views'] = $txt['views']; $txt['lp_replies'] = $txt['replies']; $txt['lp_default'] = 'Varsayılan'; +$txt['lp_sponsors_only'] = 'For sponsors of the portal'; // Ayarlar $txt['lp_settings'] = 'Portal ayarları'; $txt['lp_base'] = 'Ön sayfa ve makaleler için ayarlar'; -$txt['lp_base_info'] = 'Mod sürümü: %1$s, PHP sürümü: %2$s, %3$s sürümü: %4$s.
Portalın hataları ve özellikleri simplemachines.com.
adresinde tartışılabilir. Ayrıca Patreo\'da sponsor olabilirsiniz veya bağış yapabilirsiniz.'; +$txt['lp_base_info'] = 'Mod sürümü: %1$s, PHP sürümü: %2$s, %3$s sürümü: %4$s.
Portalın hataları ve özellikleri simplemachines.com.
You can also buy a cup of coffee as a thank.'; $txt['lp_frontpage_title'] = 'Ön sayfa başlığı'; $txt['lp_frontpage_mode'] = 'Portal ön sayfası'; diff --git a/Themes/default/languages/LightPortal/.ukrainian.php b/Themes/default/languages/LightPortal/.ukrainian.php index 82d17d4f5..617cc8032 100644 --- a/Themes/default/languages/LightPortal/.ukrainian.php +++ b/Themes/default/languages/LightPortal/.ukrainian.php @@ -19,11 +19,12 @@ $txt['lp_views'] = $txt['views']; $txt['lp_replies'] = $txt['replies']; $txt['lp_default'] = 'За замовчуванням'; +$txt['lp_sponsors_only'] = 'Для спонсорів порталу'; // Settings $txt['lp_settings'] = 'Налаштування порталу'; $txt['lp_base'] = 'Налаштування головної сторінки і статей'; -$txt['lp_base_info'] = 'Версія моду: %1$s, версія PHP: %2$s, версія %3$s: %4$s.
Обговорити баги і фічі порталу можна на форумі розробника.
Ви також можете стати спонсором на Patreon або на Boosty.to, купити розробнику чашку кави або пожертвувати будь-яку суму на QIWI Гаманець.'; +$txt['lp_base_info'] = 'Версія моду: %1$s, версія PHP: %2$s, версія %3$s: %4$s.
Обговорити баги і фічі порталу можна на форумі розробника.
Ви також можете купити розробнику чашку кави або пожертвувати будь-яку суму на QIWI Гаманець.'; $txt['lp_frontpage_title'] = 'Заголовок головної сторінки'; $txt['lp_frontpage_mode'] = 'Перша сторінка порталу'; From 2b8c4204cfca619d6ad81036685b8ce985c677ad Mon Sep 17 00:00:00 2001 From: Bugo Date: Tue, 25 May 2021 20:22:29 +0500 Subject: [PATCH 11/24] Update FUNDING --- .github/FUNDING.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml index fe898660a..cf85918dd 100644 --- a/.github/FUNDING.yml +++ b/.github/FUNDING.yml @@ -1,3 +1,2 @@ -patreon: bugo ko_fi: dragomano -custom: ["https://boosty.to/bugo"] +custom: ["https://qiwi.com/n/DRAGOMANO"] From 9259114f02e5ffd6aebd2f0ab9c6c3a9d5beba76 Mon Sep 17 00:00:00 2001 From: Bugo Date: Sun, 30 May 2021 15:44:16 +0500 Subject: [PATCH 12/24] Make plugin list unique --- Sources/LightPortal/ManagePlugins.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Sources/LightPortal/ManagePlugins.php b/Sources/LightPortal/ManagePlugins.php index 48748db8f..6866a9343 100644 --- a/Sources/LightPortal/ManagePlugins.php +++ b/Sources/LightPortal/ManagePlugins.php @@ -841,6 +841,8 @@ private function addPluginsForSponsors() 'YandexTurbo' ) ); + + $context['lp_plugins'] = array_unique($context['lp_plugins']); } /** From ee62269bf8b8725bacd63af71ceebe9e057d5f33 Mon Sep 17 00:00:00 2001 From: Bugo Date: Sun, 30 May 2021 18:15:03 +0500 Subject: [PATCH 13/24] Improve separate style loading for plugins --- Sources/LightPortal/Subs.php | 22 ++++++ .../LightPortal/addons/ArticleList/style.css | 11 +++ .../LightPortal/addons/BoardList/style.css | 3 + .../LightPortal/addons/BoardStats/style.css | 17 +++++ .../LightPortal/addons/CurrentMonth/style.css | 61 ++++++++++++++++ .../LightPortal/addons/FlarumStyle/style.css | 10 +++ Sources/LightPortal/addons/Likely/style.css | 8 +++ Sources/LightPortal/addons/Markdown/style.css | 13 ++++ .../LightPortal/addons/RandomTopics/style.css | 8 +++ .../addons/RecentAttachments/style.css | 16 +++++ .../LightPortal/addons/RecentPosts/style.css | 16 +++++ .../LightPortal/addons/RecentTopics/style.css | 16 +++++ .../addons/ThemeSwitcher/style.css | 4 ++ .../LightPortal/addons/TinySlider/style.css | 71 +++++++++++++++++++ Sources/LightPortal/addons/Todays/style.css | 42 +++++++++++ .../LightPortal/addons/TopPosters/style.css | 4 ++ Sources/LightPortal/addons/UserInfo/style.css | 15 ++++ .../LightPortal/addons/VkComments/style.css | 3 + database.php | 5 +- 19 files changed, 344 insertions(+), 1 deletion(-) create mode 100644 Sources/LightPortal/addons/ArticleList/style.css create mode 100644 Sources/LightPortal/addons/BoardList/style.css create mode 100644 Sources/LightPortal/addons/BoardStats/style.css create mode 100644 Sources/LightPortal/addons/CurrentMonth/style.css create mode 100644 Sources/LightPortal/addons/FlarumStyle/style.css create mode 100644 Sources/LightPortal/addons/Likely/style.css create mode 100644 Sources/LightPortal/addons/Markdown/style.css create mode 100644 Sources/LightPortal/addons/RandomTopics/style.css create mode 100644 Sources/LightPortal/addons/RecentAttachments/style.css create mode 100644 Sources/LightPortal/addons/RecentPosts/style.css create mode 100644 Sources/LightPortal/addons/RecentTopics/style.css create mode 100644 Sources/LightPortal/addons/ThemeSwitcher/style.css create mode 100644 Sources/LightPortal/addons/TinySlider/style.css create mode 100644 Sources/LightPortal/addons/Todays/style.css create mode 100644 Sources/LightPortal/addons/TopPosters/style.css create mode 100644 Sources/LightPortal/addons/UserInfo/style.css create mode 100644 Sources/LightPortal/addons/VkComments/style.css diff --git a/Sources/LightPortal/Subs.php b/Sources/LightPortal/Subs.php index 65262c6c6..1ba3e1de9 100644 --- a/Sources/LightPortal/Subs.php +++ b/Sources/LightPortal/Subs.php @@ -210,6 +210,27 @@ public static function loadAddonLanguage(string $addon = '') } } + /** + * @param string $addon + * @return void + */ + public static function loadAddonCss(string $addon = '') + { + global $settings; + + $style = LP_ADDON_DIR . '/' . $addon . '/style.css'; + + if (!is_file($style)) + return; + + $addon = Helpers::getSnakeName($addon); + + if (!@is_writable($settings['default_theme_dir'] . '/css/light_portal') || !@copy($style, $settings['default_theme_dir'] . '/css/light_portal/addon_' . $addon . '.css')) + return; + + loadCSSFile('light_portal/addon_' . $addon . '.css'); + } + /** * @see https://github.com/dragomano/Light-Portal/wiki/Available-hooks * @@ -234,6 +255,7 @@ public static function runAddons(string $hook = '', array $vars = [], array $plu foreach ($addons as $id => $addon) { self::loadAddonLanguage($addon); + self::loadAddonCss($addon); $className = __NAMESPACE__ . '\Addons\\' . $addon . '\\' . $addon; diff --git a/Sources/LightPortal/addons/ArticleList/style.css b/Sources/LightPortal/addons/ArticleList/style.css new file mode 100644 index 000000000..6481553d5 --- /dev/null +++ b/Sources/LightPortal/addons/ArticleList/style.css @@ -0,0 +1,11 @@ +.article_list { + display: grid; + grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); + grid-gap: 0 10px; +} +.article_list > div { + display: flex; + flex-direction: column; + justify-content: space-between; + text-align: center; +} diff --git a/Sources/LightPortal/addons/BoardList/style.css b/Sources/LightPortal/addons/BoardList/style.css new file mode 100644 index 000000000..1c5e66f2b --- /dev/null +++ b/Sources/LightPortal/addons/BoardList/style.css @@ -0,0 +1,3 @@ +.block_board_list ul { + padding-left: 10px; +} diff --git a/Sources/LightPortal/addons/BoardStats/style.css b/Sources/LightPortal/addons/BoardStats/style.css new file mode 100644 index 000000000..2faad562d --- /dev/null +++ b/Sources/LightPortal/addons/BoardStats/style.css @@ -0,0 +1,17 @@ +.block_board_stats .board_stats_areas { + display: grid; + grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); + grid-gap: 0 10px; +} +.block_board_stats .board_stats_areas div { + display: flex; + flex-direction: column; + margin-top: 2px; +} +.block_board_stats .board_stats_areas div h4 { + margin-top: 4px; + margin-bottom: 4px; +} +.block_board_stats .board_stats_areas div ul { + margin-left: -1em; +} diff --git a/Sources/LightPortal/addons/CurrentMonth/style.css b/Sources/LightPortal/addons/CurrentMonth/style.css new file mode 100644 index 000000000..2d5ef7a71 --- /dev/null +++ b/Sources/LightPortal/addons/CurrentMonth/style.css @@ -0,0 +1,61 @@ +.block_current_month table { + width: 100%; + margin-bottom: 10px; + border-collapse: collapse; + background: #f0f4f7; + border: 1px solid #ddd; + text-align: center; +} +.block_current_month table .windowbg { + box-shadow: none; + border-radius: 0; + box-sizing: content-box; + margin: 0; +} +.block_current_month th { + padding: 2px; + background: #e7eaef; + font-size: smaller; +} +.block_current_month td { + padding: 2px; + width: 12.5%; + vertical-align: top; + border-right: 1px solid #ddd; + border-bottom: 1px solid #ddd; +} +.block_current_month td.disabled { + background: #eee; + border: 1px solid #ddd; +} +.block_current_month td.events { + background: rgba(30, 245, 20, 0.1); +} +.block_current_month td.holidays { + background: rgba(23, 110, 245, 0.1); +} +.block_current_month td.birthdays { + background: rgba(102, 0, 255, 0.1); +} +.block_current_month td.events:hover, +.block_current_month td.calendar_today.events { + background: rgba(30, 245, 20, 0.2); +} +.block_current_month td.holidays:hover, +.block_current_month td.calendar_today.holidays { + background: rgba(23, 110, 245, 0.2); +} +.block_current_month td.birthdays:hover, +.block_current_month td.calendar_today.birthdays { + background: rgba(153, 51, 255, 0.2); +} +.block_current_month td.calendar_today { + font-weight: bold; +} +.block_current_month td a { + display: block; +} +.block_current_month td a:hover { + text-decoration: none; + background: rgba(97, 135, 166, 0.2); +} diff --git a/Sources/LightPortal/addons/FlarumStyle/style.css b/Sources/LightPortal/addons/FlarumStyle/style.css new file mode 100644 index 000000000..fbfaf8d64 --- /dev/null +++ b/Sources/LightPortal/addons/FlarumStyle/style.css @@ -0,0 +1,10 @@ +.block_flarum_style nav ul { + list-style: none; + padding-left: 0; +} +.block_flarum_style nav ul .roundframe { + margin-top: 0; +} +.block_flarum_style nav ul .roundframe i { + padding-right: 4px; +} diff --git a/Sources/LightPortal/addons/Likely/style.css b/Sources/LightPortal/addons/Likely/style.css new file mode 100644 index 000000000..7795c61fe --- /dev/null +++ b/Sources/LightPortal/addons/Likely/style.css @@ -0,0 +1,8 @@ +.likely__widget { + opacity: 0.5 !important; + filter: grayscale(100%); +} +.likely__widget:hover { + opacity: 1 !important; + filter: grayscale(0%); +} diff --git a/Sources/LightPortal/addons/Markdown/style.css b/Sources/LightPortal/addons/Markdown/style.css new file mode 100644 index 000000000..b269fec2d --- /dev/null +++ b/Sources/LightPortal/addons/Markdown/style.css @@ -0,0 +1,13 @@ +.page_md .bbc_code, +.block_md .bbc_code { + overflow: auto !important; + white-space: pre; +} +.page_md .task-list-item, +.block_md .task-list-item { + list-style: none; + margin-left: -20px; +} +.page_md blockquote { + width: 100% !important; +} diff --git a/Sources/LightPortal/addons/RandomTopics/style.css b/Sources/LightPortal/addons/RandomTopics/style.css new file mode 100644 index 000000000..227c5b030 --- /dev/null +++ b/Sources/LightPortal/addons/RandomTopics/style.css @@ -0,0 +1,8 @@ +.random_topics { + list-style: none; + padding-left: 0; +} +.random_topics li { + margin: 4px 0 0 0; + padding: 6px 12px; +} diff --git a/Sources/LightPortal/addons/RecentAttachments/style.css b/Sources/LightPortal/addons/RecentAttachments/style.css new file mode 100644 index 000000000..32978a657 --- /dev/null +++ b/Sources/LightPortal/addons/RecentAttachments/style.css @@ -0,0 +1,16 @@ +.recent_attachments { + display: flex; + flex-direction: row; + justify-content: space-evenly; +} +.recent_attachments .item { + margin: 5px; +} +.recent_attachments .item img { + object-fit: cover; + width: 100%; + height: 100%; +} +.column_direction { + flex-direction: column !important; +} diff --git a/Sources/LightPortal/addons/RecentPosts/style.css b/Sources/LightPortal/addons/RecentPosts/style.css new file mode 100644 index 000000000..8d072d433 --- /dev/null +++ b/Sources/LightPortal/addons/RecentPosts/style.css @@ -0,0 +1,16 @@ +.recent_posts { + list-style: none; + padding-left: 0; +} +.recent_posts li { + margin: 4px 0 0 0; + padding: 6px 12px; +} +.recent_posts .poster_avatar { + float: left; + padding: 3px 11px 0 0; +} +.recent_posts .avatar { + width: 40px; + height: 40px; +} diff --git a/Sources/LightPortal/addons/RecentTopics/style.css b/Sources/LightPortal/addons/RecentTopics/style.css new file mode 100644 index 000000000..610b67392 --- /dev/null +++ b/Sources/LightPortal/addons/RecentTopics/style.css @@ -0,0 +1,16 @@ +.recent_topics { + list-style: none; + padding-left: 0; +} +.recent_topics li { + margin: 4px 0 0 0; + padding: 6px 12px; +} +.recent_topics .poster_avatar { + float: left; + padding: 3px 11px 0 0; +} +.recent_topics .avatar { + width: 40px; + height: 40px; +} diff --git a/Sources/LightPortal/addons/ThemeSwitcher/style.css b/Sources/LightPortal/addons/ThemeSwitcher/style.css new file mode 100644 index 000000000..19c4b289c --- /dev/null +++ b/Sources/LightPortal/addons/ThemeSwitcher/style.css @@ -0,0 +1,4 @@ +.themeswitcher select { + cursor: pointer; + width: 100%; +} diff --git a/Sources/LightPortal/addons/TinySlider/style.css b/Sources/LightPortal/addons/TinySlider/style.css new file mode 100644 index 000000000..0457e1fe8 --- /dev/null +++ b/Sources/LightPortal/addons/TinySlider/style.css @@ -0,0 +1,71 @@ +.block_tiny_slider .item { + text-align: center; +} +.block_tiny_slider .tns-nav { + text-align: center; + margin: 10px 0; +} +.block_tiny_slider .tns-nav > [aria-controls] { + width: 9px; + height: 9px; + padding: 0; + margin: 0 5px; + border-radius: 50%; + background: #ddd; + border: 0; +} +.block_tiny_slider .tns-nav > .tns-nav-active { + background: #999; +} +.block_tiny_slider .customize-tools { + position: relative; +} +.block_tiny_slider .customize-tools[hidden] { + display: none; +} +.block_tiny_slider .customize-tools .thumbnails { + margin: 20px 0 0; + text-align: center; +} +.block_tiny_slider .customize-tools .thumbnails li { + display: inline-block; + cursor: pointer; + border: 5px solid #fff; + width: 50px; +} +.block_tiny_slider .customize-tools .thumbnails img { + vertical-align: bottom; + height: auto; + max-height: 50px; +} +.block_tiny_slider .customize-tools .thumbnails .tns-nav-active { + background: none; + border-color: #000; +} +@media (max-width: 640px) { + .block_tiny_slider .customize-tools .thumbnails { + margin-bottom: 10px; + } +} +.block_tiny_slider .customize-tools .controls { + text-align: center; + margin-top: 10px; +} +.block_tiny_slider .customize-tools .controls li { + display: block; + padding: 0 15px; + cursor: pointer; + transition: background 0.3s; +} +.block_tiny_slider .customize-tools .controls li span::selection { + text-shadow: none; + background: initial; + color: inherit; +} +@media (max-width: 640px) { + .block_tiny_slider .customize-tools .controls li { + display: inline-block; + position: relative; + padding: 0; + } +} diff --git a/Sources/LightPortal/addons/Todays/style.css b/Sources/LightPortal/addons/Todays/style.css new file mode 100644 index 000000000..da22017c2 --- /dev/null +++ b/Sources/LightPortal/addons/Todays/style.css @@ -0,0 +1,42 @@ +.block_todays details { + display: contents; + position: relative; + margin-bottom: 0.5rem; + min-height: 1rem; + max-height: 3rem; + transition: min-height 0.15s linear, max-height 0.5s linear; + will-change: max-height; + overflow: hidden; +} +.block_todays details summary { + display: inline-block; + cursor: pointer; + outline: 0; + transition: color 0.12s; +} +.block_todays details summary::-webkit-details-marker { + display: none; +} +.block_todays details summary::-moz-list-bullet { + list-style-type: none; +} +.block_todays details summary span { + border-bottom: 1px currentColor dotted; +} +.block_todays details summary:hover { + color: #d06c6c; +} +.block_todays details summary ~ * { + display: none; + transition: opacity 0.15s linear; +} +.block_todays details[open] { + min-height: 2em; + max-height: 20em; +} +.block_todays details[open] summary { + color: #d06c6c; +} +.block_todays details[open] summary ~ * { + display: block; +} diff --git a/Sources/LightPortal/addons/TopPosters/style.css b/Sources/LightPortal/addons/TopPosters/style.css new file mode 100644 index 000000000..6d733fbce --- /dev/null +++ b/Sources/LightPortal/addons/TopPosters/style.css @@ -0,0 +1,4 @@ +dl.top_posters dt img { + width: 24px; + vertical-align: middle; +} diff --git a/Sources/LightPortal/addons/UserInfo/style.css b/Sources/LightPortal/addons/UserInfo/style.css new file mode 100644 index 000000000..6a446e968 --- /dev/null +++ b/Sources/LightPortal/addons/UserInfo/style.css @@ -0,0 +1,15 @@ +.block_user_info ul { + list-style: none; + padding-left: 0; +} +.block_user_info ul .avatar { + margin: 1em; +} +@media (min-width: 769px) and (max-width: 1241px) { + .block_user_info span.floatleft, + .block_user_info span.floatright { + float: none; + margin: 0 auto; + display: block; + } +} diff --git a/Sources/LightPortal/addons/VkComments/style.css b/Sources/LightPortal/addons/VkComments/style.css new file mode 100644 index 000000000..7bea50fb4 --- /dev/null +++ b/Sources/LightPortal/addons/VkComments/style.css @@ -0,0 +1,3 @@ +#vk_comments { + margin-top: 1em; +} diff --git a/database.php b/database.php index 4e2a856f2..9932090f8 100644 --- a/database.php +++ b/database.php @@ -8,7 +8,7 @@ if (version_compare(PHP_VERSION, '7.3', '<')) die('This mod needs PHP 7.3 or greater. You will not be able to install/use this mod, contact your host and ask for a php upgrade.'); -global $user_info, $mbname, $modSettings; +global $user_info, $mbname, $modSettings, $settings; if ((SMF == 'SSI') && !$user_info['is_admin']) die('Admin privileges required.'); @@ -461,5 +461,8 @@ if (!isset($modSettings['lp_enabled_plugins'])) updateSettings(array('lp_enabled_plugins' => 'EasyMarkdownEditor, Markdown, Trumbowyg, UserInfo')); +if (!@is_writable($css_dir = $settings['default_theme_dir'] . '/css/light_portal')) + smf_chmod($css_dir, 0755); + if (SMF == 'SSI') echo 'Database changes are complete! Please wait...'; From 3bbe49cd7ea50e072f15ae11de96bfdd89210620 Mon Sep 17 00:00:00 2001 From: Bugo Date: Sun, 30 May 2021 18:19:38 +0500 Subject: [PATCH 14/24] Remove plugin style definitions from base styles --- .../default/css/light_portal/light_portal.css | 320 -------------- .../css/light_portal/light_portal.less | 407 ------------------ .../css/light_portal/light_portal.scss | 407 ------------------ 3 files changed, 1134 deletions(-) diff --git a/Themes/default/css/light_portal/light_portal.css b/Themes/default/css/light_portal/light_portal.css index 91b0853d0..c7544b7f8 100644 --- a/Themes/default/css/light_portal/light_portal.css +++ b/Themes/default/css/light_portal/light_portal.css @@ -1126,323 +1126,3 @@ section #display_head span { opacity: 1; } } -/* Addons */ -/* UserInfo */ -.block_user_info ul { - list-style: none; - padding-left: 0; -} -.block_user_info ul .avatar { - margin: 1em; -} -@media (min-width: 769px) and (max-width: 1241px) { - .block_user_info span.floatleft, - .block_user_info span.floatright { - float: none; - margin: 0 auto; - display: block; - } -} -/* Likely */ -.likely__widget { - opacity: 0.5 !important; - filter: grayscale(100%); -} -.likely__widget:hover { - opacity: 1 !important; - filter: grayscale(0%); -} -/* RecentPosts, RecentTopics, RandomTopics */ -.recent_posts, -.recent_topics, -.random_topics { - list-style: none; - padding-left: 0; -} -.recent_posts li, -.recent_topics li, -.random_topics li { - margin: 4px 0 0 0; - padding: 6px 12px; -} -.recent_posts .poster_avatar, -.recent_topics .poster_avatar { - float: left; - padding: 3px 11px 0 0; -} -.recent_posts .avatar, -.recent_topics .avatar { - width: 40px; - height: 40px; -} -/* TopPosters */ -dl.top_posters dt img { - width: 24px; - vertical-align: middle; -} -/* ThemeSwitcher */ -.themeswitcher select { - cursor: pointer; - width: 100%; -} -/* Markdown */ -.page_md .bbc_code, -.block_md .bbc_code { - overflow: auto !important; - white-space: pre; -} -.page_md .task-list-item, -.block_md .task-list-item { - list-style: none; - margin-left: -20px; -} -.page_md blockquote { - width: 100% !important; -} -/* RecentAttachments */ -.recent_attachments { - display: flex; - flex-direction: row; - justify-content: space-evenly; -} -.recent_attachments .item { - margin: 5px; -} -.recent_attachments .item img { - object-fit: cover; - width: 100%; - height: 100%; -} -.column_direction { - flex-direction: column !important; -} -/* VkComments */ -#vk_comments { - margin-top: 1em; -} -/* CurrentMonth */ -.block_current_month table { - width: 100%; - margin-bottom: 10px; - border-collapse: collapse; - background: #f0f4f7; - border: 1px solid #ddd; - text-align: center; -} -.block_current_month table .windowbg { - box-shadow: none; - border-radius: 0; - box-sizing: content-box; - margin: 0; -} -.block_current_month th { - padding: 2px; - background: #e7eaef; - font-size: smaller; -} -.block_current_month td { - padding: 2px; - width: 12.5%; - vertical-align: top; - border-right: 1px solid #ddd; - border-bottom: 1px solid #ddd; -} -.block_current_month td.disabled { - background: #eee; - border: 1px solid #ddd; -} -.block_current_month td.events { - background: rgba(30, 245, 20, 0.1); -} -.block_current_month td.holidays { - background: rgba(23, 110, 245, 0.1); -} -.block_current_month td.birthdays { - background: rgba(102, 0, 255, 0.1); -} -.block_current_month td.events:hover, -.block_current_month td.calendar_today.events { - background: rgba(30, 245, 20, 0.2); -} -.block_current_month td.holidays:hover, -.block_current_month td.calendar_today.holidays { - background: rgba(23, 110, 245, 0.2); -} -.block_current_month td.birthdays:hover, -.block_current_month td.calendar_today.birthdays { - background: rgba(153, 51, 255, 0.2); -} -.block_current_month td.calendar_today { - font-weight: bold; -} -.block_current_month td a { - display: block; -} -.block_current_month td a:hover { - text-decoration: none; - background: rgba(97, 135, 166, 0.2); -} -/* BoardList */ -.block_board_list ul { - padding-left: 10px; -} -/* ArticleList */ -.article_list { - display: grid; - grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); - grid-gap: 0 10px; -} -.article_list > div { - display: flex; - flex-direction: column; - justify-content: space-between; - text-align: center; -} -/* FrontpageFlarumStyle */ -.block_flarum_style nav ul { - list-style: none; - padding-left: 0; -} -.block_flarum_style nav ul .roundframe { - margin-top: 0; -} -.block_flarum_style nav ul .roundframe i { - padding-right: 4px; -} -/* BoardStats */ -.block_board_stats .board_stats_areas { - display: grid; - grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); - grid-gap: 0 10px; -} -.block_board_stats .board_stats_areas div { - display: flex; - flex-direction: column; - margin-top: 2px; -} -.block_board_stats .board_stats_areas div h4 { - margin-top: 4px; - margin-bottom: 4px; -} -.block_board_stats .board_stats_areas div ul { - margin-left: -1em; -} -/* AvatarGenerator */ -.comment_avatar svg { - max-width: 50px; -} -/* Todays */ -.block_todays details { - display: contents; - position: relative; - margin-bottom: 0.5rem; - min-height: 1rem; - max-height: 3rem; - transition: min-height 0.15s linear, max-height 0.5s linear; - will-change: max-height; - overflow: hidden; -} -.block_todays details summary { - display: inline-block; - cursor: pointer; - outline: 0; - transition: color 0.12s; -} -.block_todays details summary::-webkit-details-marker { - display: none; -} -.block_todays details summary::-moz-list-bullet { - list-style-type: none; -} -.block_todays details summary span { - border-bottom: 1px currentColor dotted; -} -.block_todays details summary:hover { - color: #d06c6c; -} -.block_todays details summary ~ * { - display: none; - transition: opacity 0.15s linear; -} -.block_todays details[open] { - min-height: 2em; - max-height: 20em; -} -.block_todays details[open] summary { - color: #d06c6c; -} -.block_todays details[open] summary ~ * { - display: block; -} -/* TinySlider */ -.block_tiny_slider .item { - text-align: center; -} -.block_tiny_slider .tns-nav { - text-align: center; - margin: 10px 0; -} -.block_tiny_slider .tns-nav > [aria-controls] { - width: 9px; - height: 9px; - padding: 0; - margin: 0 5px; - border-radius: 50%; - background: #ddd; - border: 0; -} -.block_tiny_slider .tns-nav > .tns-nav-active { - background: #999; -} -.block_tiny_slider .customize-tools { - position: relative; -} -.block_tiny_slider .customize-tools[hidden] { - display: none; -} -.block_tiny_slider .customize-tools .thumbnails { - margin: 20px 0 0; - text-align: center; -} -.block_tiny_slider .customize-tools .thumbnails li { - display: inline-block; - cursor: pointer; - border: 5px solid #fff; - width: 50px; -} -.block_tiny_slider .customize-tools .thumbnails img { - vertical-align: bottom; - height: auto; - max-height: 50px; -} -.block_tiny_slider .customize-tools .thumbnails .tns-nav-active { - background: none; - border-color: #000; -} -@media (max-width: 640px) { - .block_tiny_slider .customize-tools .thumbnails { - margin-bottom: 10px; - } -} -.block_tiny_slider .customize-tools .controls { - text-align: center; - margin-top: 10px; -} -.block_tiny_slider .customize-tools .controls li { - display: block; - padding: 0 15px; - cursor: pointer; - transition: background 0.3s; -} -.block_tiny_slider .customize-tools .controls li span::selection { - text-shadow: none; - background: initial; - color: inherit; -} -@media (max-width: 640px) { - .block_tiny_slider .customize-tools .controls li { - display: inline-block; - position: relative; - padding: 0; - } -} diff --git a/Themes/default/css/light_portal/light_portal.less b/Themes/default/css/light_portal/light_portal.less index f3a809d48..b9164e4ec 100644 --- a/Themes/default/css/light_portal/light_portal.less +++ b/Themes/default/css/light_portal/light_portal.less @@ -1470,410 +1470,3 @@ section { opacity: 1; } } - -/* Addons */ - -/* UserInfo */ -.block_user_info { - ul { - list-style: none; - padding-left: 0; - - .avatar { - margin: 1em; - } - } - - @media (min-width: 769px) and (max-width: 1241px) { - span { - &.floatleft, - &.floatright { - float: none; - margin: 0 auto; - display: block; - } - } - } -} - -/* Likely */ -.likely__widget { - opacity: .5 !important; - filter: grayscale(100%); - - &:hover { - opacity: 1 !important; - filter: grayscale(0%); - } -} - -/* RecentPosts, RecentTopics, RandomTopics */ -.recent_posts, -.recent_topics, -.random_topics { - list-style: none; - padding-left: 0; - - li { - margin: 4px 0 0 0; - padding: 6px 12px; - } -} - -.recent_posts, -.recent_topics { - .poster_avatar { - float: left; - padding: 3px 11px 0 0; - } - - .avatar { - width: 40px; - height: 40px; - } -} - -/* TopPosters */ -dl { - &.top_posters { - dt { - img { - width: 24px; - .valign; - } - } - } -} - -/* ThemeSwitcher */ -.themeswitcher { - select { - .pointer; - width: 100%; - } -} - -/* Markdown */ -.page_md, -.block_md { - .bbc_code { - overflow: auto !important; - white-space: pre; - } - - .task-list-item { - list-style: none; - margin-left: -20px; - } -} - -.page_md { - blockquote { - width: 100% !important; - } -} - -/* RecentAttachments */ -.recent_attachments { - display: flex; - flex-direction: row; - justify-content: space-evenly; - - .item { - margin: 5px; - - img { - object-fit: cover; - width: 100%; - height: 100%; - } - } -} - -.column_direction { - flex-direction: column !important; -} - -/* VkComments */ -#vk_comments { - margin-top: 1em; -} - -/* CurrentMonth */ -@table-bgcolor: #f0f4f7; -@th-bgcolor: #e7eaef; -@td-disabled-bgcolor: #eee; - -.block_current_month { - table { - width: 100%; - margin-bottom: 10px; - border-collapse: collapse; - background: @table-bgcolor; - border: 1px solid @color-light-gray; - text-align: center; - - .windowbg { - box-shadow: none; - .border-radius(0); - box-sizing: content-box; - margin: 0; - } - } - - th { - padding: 2px; - background: @th-bgcolor; - font-size: smaller; - } - - td { - padding: 2px; - width: 12.5%; - .valign(top); - border-right: 1px solid @color-light-gray; - border-bottom: 1px solid @color-light-gray; - - &.disabled { - background: @td-disabled-bgcolor; - border: 1px solid @color-light-gray; - } - &.events { - background: rgba(30, 245, 20, .1); - } - &.holidays { - background: rgba(23, 110, 245, .1); - } - &.birthdays { - background: rgba(102, 0, 255, .1); - } - &.events:hover, - &.calendar_today.events { - background: rgba(30, 245, 20, .2); - } - &.holidays:hover, - &.calendar_today.holidays { - background: rgba(23, 110, 245, .2); - } - &.birthdays:hover, - &.calendar_today.birthdays { - background: rgba(153, 51, 255, .2); - } - &.calendar_today { - font-weight: bold; - } - - a { - display: block; - - &:hover { - text-decoration: none; - background: rgba(97, 135, 166, .2); - } - } - } -} - -/* BoardList */ -.block_board_list { - ul { - padding-left: 10px; - } -} - -/* ArticleList */ -.article_list { - display: grid; - grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); - grid-gap: 0 10px; - - > div { - display: flex; - flex-direction: column; - justify-content: space-between; - text-align: center; - } -} - -/* FrontpageFlarumStyle */ -.block_flarum_style { - nav { - ul { - list-style: none; - padding-left: 0; - - .roundframe { - margin-top: 0; - - i { - padding-right: 4px; - } - } - } - } -} - -/* BoardStats */ -.block_board_stats { - .board_stats_areas { - display: grid; - grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); - grid-gap: 0 10px; - - div { - display: flex; - flex-direction: column; - margin-top: 2px; - - h4 { - margin-top: 4px; - margin-bottom: 4px; - } - - ul { - margin-left: -1em; - } - } - } -} - -/* AvatarGenerator */ -.comment_avatar { - svg { - max-width: 50px; - } -} - -/* Todays */ -.block_todays { - details { - display: contents; - position: relative; - margin-bottom: .5rem; - min-height: 1rem; - max-height: 3rem; - transition: min-height .15s linear, max-height .5s linear; - will-change: max-height; - overflow: hidden; - - summary { - &::-webkit-details-marker { display: none; } - &::-moz-list-bullet { list-style-type: none; } - display: inline-block; - cursor: pointer; - outline: 0; - transition: color .12s; - - span { - border-bottom: 1px currentColor dotted; - } - - &:hover { - color: #d06c6c; - } - - & ~ * { - display: none; - transition: opacity .15s linear; - } - } - - &[open] { - min-height: 2em; - max-height: 20em; - - summary { - color: #d06c6c; - - & ~ * { - display: block; - } - } - } - } -} - -/* TinySlider */ -.block_tiny_slider { - .item { - text-align: center; - } - - .tns-nav { - text-align: center; - margin: 10px 0; - - & > [aria-controls] { - width: 9px; - height: 9px; - padding: 0; - margin: 0 5px; - border-radius: 50%; - background: @color-light-gray; - border: 0; - } - - & > .tns-nav-active { - background: #999; - } - } - - .customize-tools { - position: relative; - - &[hidden] { - display: none; - } - - .thumbnails { - margin: 20px 0 0; - text-align: center; - - li { - display: inline-block; - cursor: pointer; - border: 5px solid @color-white; - width: 50px; - } - - img { - .valign(bottom); - height: auto; - max-height: 50px; - } - - .tns-nav-active { - background: none; - border-color: @color-black; - } - - @media (max-width: 640px) { - margin-bottom: 10px; - } - } - - .controls { - text-align: center; - margin-top: 10px; - - li { - display: block; - padding: 0 15px; - cursor: pointer; - transition: background .3s; - - span::selection { - text-shadow: none; - background: initial; - color: inherit; - } - - @media (max-width: 640px) { - display: inline-block; - position: relative; - padding: 0; - } - } - } - } -} diff --git a/Themes/default/css/light_portal/light_portal.scss b/Themes/default/css/light_portal/light_portal.scss index 9de6361f4..989347261 100644 --- a/Themes/default/css/light_portal/light_portal.scss +++ b/Themes/default/css/light_portal/light_portal.scss @@ -1441,410 +1441,3 @@ section { opacity: 1; } } - -/* Addons */ - -/* UserInfo */ -.block_user_info { - ul { - list-style: none; - padding-left: 0; - - .avatar { - margin: 1em; - } - } - - @media (min-width: 769px) and (max-width: 1241px) { - span { - &.floatleft, - &.floatright { - float: none; - margin: 0 auto; - display: block; - } - } - } -} - -/* Likely */ -.likely__widget { - opacity: .5 !important; - filter: grayscale(100%); - - &:hover { - opacity: 1 !important; - filter: grayscale(0%); - } -} - -/* RecentPosts, RecentTopics, RandomTopics */ -.recent_posts, -.recent_topics, -.random_topics { - list-style: none; - padding-left: 0; - - li { - margin: 4px 0 0 0; - padding: 6px 12px; - } -} - -.recent_posts, -.recent_topics { - .poster_avatar { - float: left; - padding: 3px 11px 0 0; - } - - .avatar { - width: 40px; - height: 40px; - } -} - -/* TopPosters */ -dl { - &.top_posters { - dt { - img { - width: 24px; - @include valign; - } - } - } -} - -/* ThemeSwitcher */ -.themeswitcher { - select { - @include pointer; - width: 100%; - } -} - -/* Markdown */ -.page_md, -.block_md { - .bbc_code { - overflow: auto !important; - white-space: pre; - } - - .task-list-item { - list-style: none; - margin-left: -20px; - } -} - -.page_md { - blockquote { - width: 100% !important; - } -} - -/* RecentAttachments */ -.recent_attachments { - display: flex; - flex-direction: row; - justify-content: space-evenly; - - .item { - margin: 5px; - - img { - object-fit: cover; - width: 100%; - height: 100%; - } - } -} - -.column_direction { - flex-direction: column !important; -} - -/* VkComments */ -#vk_comments { - margin-top: 1em; -} - -/* CurrentMonth */ -$table-bgcolor: #f0f4f7; -$th-bgcolor: #e7eaef; -$td-disabled-bgcolor: #eee; - -.block_current_month { - table { - width: 100%; - margin-bottom: 10px; - border-collapse: collapse; - background: $table-bgcolor; - border: 1px solid $color-light-gray; - text-align: center; - - .windowbg { - @include box-shadow(none); - @include border-radius(0); - box-sizing: content-box; - margin: 0; - } - } - - th { - padding: 2px; - background: $th-bgcolor; - font-size: smaller; - } - - td { - padding: 2px; - width: 12.5%; - @include valign(top); - border-right: 1px solid $color-light-gray; - border-bottom: 1px solid $color-light-gray; - - &.disabled { - background: $td-disabled-bgcolor; - border: 1px solid $color-light-gray; - } - &.events { - background: rgba(30, 245, 20, .1); - } - &.holidays { - background: rgba(23, 110, 245, .1); - } - &.birthdays { - background: rgba(102, 0, 255, .1); - } - &.events:hover, - &.calendar_today.events { - background: rgba(30, 245, 20, .2); - } - &.holidays:hover, - &.calendar_today.holidays { - background: rgba(23, 110, 245, .2); - } - &.birthdays:hover, - &.calendar_today.birthdays { - background: rgba(153, 51, 255, .2); - } - &.calendar_today { - font-weight: bold; - } - - a { - display: block; - - &:hover { - text-decoration: none; - background: rgba(97, 135, 166, .2); - } - } - } -} - -/* BoardList */ -.block_board_list { - ul { - padding-left: 10px; - } -} - -/* ArticleList */ -.article_list { - display: grid; - grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); - grid-gap: 0 10px; - - > div { - display: flex; - flex-direction: column; - justify-content: space-between; - text-align: center; - } -} - -/* FrontpageFlarumStyle */ -.block_flarum_style { - nav { - ul { - list-style: none; - padding-left: 0; - - .roundframe { - margin-top: 0; - - i { - padding-right: 4px; - } - } - } - } -} - -/* BoardStats */ -.block_board_stats { - .board_stats_areas { - display: grid; - grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); - grid-gap: 0 10px; - - div { - display: flex; - flex-direction: column; - margin-top: 2px; - - h4 { - margin-top: 4px; - margin-bottom: 4px; - } - - ul { - margin-left: -1em; - } - } - } -} - -/* AvatarGenerator */ -.comment_avatar { - svg { - max-width: 50px; - } -} - -/* Todays */ -.block_todays { - details { - display: contents; - position: relative; - margin-bottom: .5rem; - min-height: 1rem; - max-height: 3rem; - transition: min-height .15s linear, max-height .5s linear; - will-change: max-height; - overflow: hidden; - - summary { - &::-webkit-details-marker { display: none; } - &::-moz-list-bullet { list-style-type: none; } - display: inline-block; - cursor: pointer; - outline: 0; - transition: color .12s; - - span { - border-bottom: 1px currentColor dotted; - } - - &:hover { - color: #d06c6c; - } - - & ~ * { - display: none; - transition: opacity .15s linear; - } - } - - &[open] { - min-height: 2em; - max-height: 20em; - - summary { - color: #d06c6c; - - & ~ * { - display: block; - } - } - } - } -} - -/* TinySlider */ -.block_tiny_slider { - .item { - text-align: center; - } - - .tns-nav { - text-align: center; - margin: 10px 0; - - & > [aria-controls] { - width: 9px; - height: 9px; - padding: 0; - margin: 0 5px; - @include border-radius(50%); - background: $color-light-gray; - border: 0; - } - - & > .tns-nav-active { - background: #999; - } - } - - .customize-tools { - position: relative; - - &[hidden] { - display: none; - } - - .thumbnails { - margin: 20px 0 0; - text-align: center; - - li { - display: inline-block; - cursor: pointer; - border: 5px solid $color-white; - width: 50px; - } - - img { - @include valign(bottom); - height: auto; - max-height: 50px; - } - - .tns-nav-active { - background: none; - border-color: $color-black; - } - - @media (max-width: 640px) { - margin-bottom: 10px; - } - } - - .controls { - text-align: center; - margin-top: 10px; - - li { - display: block; - padding: 0 15px; - cursor: pointer; - transition: background .3s; - - span::selection { - text-shadow: none; - background: initial; - color: inherit; - } - - @media (max-width: 640px) { - display: inline-block; - position: relative; - padding: 0; - } - } - } - } -} From b1df5c43ab49a465c149a9cf340298f048fd0b1f Mon Sep 17 00:00:00 2001 From: Bugo Date: Mon, 31 May 2021 06:54:01 +0500 Subject: [PATCH 15/24] Update addons --- .../LightPortal/addons/DevTools/functions.php | 20 - .../addons/TinyPortal/BlockImport.php | 427 ++++++++++++++++++ .../TinyPortal/{Import.php => PageImport.php} | 4 +- .../addons/TinyPortal/TinyPortal.php | 24 +- .../addons/TinyPortal/langs/english.php | 11 +- .../addons/TinyPortal/langs/russian.php | 11 +- .../addons/TinyPortal/langs/ukrainian.php | 11 +- 7 files changed, 468 insertions(+), 40 deletions(-) delete mode 100644 Sources/LightPortal/addons/DevTools/functions.php create mode 100644 Sources/LightPortal/addons/TinyPortal/BlockImport.php rename Sources/LightPortal/addons/TinyPortal/{Import.php => PageImport.php} (99%) diff --git a/Sources/LightPortal/addons/DevTools/functions.php b/Sources/LightPortal/addons/DevTools/functions.php deleted file mode 100644 index e7a25c7c3..000000000 --- a/Sources/LightPortal/addons/DevTools/functions.php +++ /dev/null @@ -1,20 +0,0 @@ -
' . print_r($var, true) . '
'; - } - } -} - -if (!function_exists('dd')) { - function dd(...$data) - { - dump(...$data); - die; - } -} - -?> \ No newline at end of file diff --git a/Sources/LightPortal/addons/TinyPortal/BlockImport.php b/Sources/LightPortal/addons/TinyPortal/BlockImport.php new file mode 100644 index 000000000..08000eaf8 --- /dev/null +++ b/Sources/LightPortal/addons/TinyPortal/BlockImport.php @@ -0,0 +1,427 @@ + + * @copyright 2019-2021 Bugo + * @license https://spdx.org/licenses/GPL-3.0-or-later.html GPL-3.0-or-later + * + * @version 1.7 + */ + +if (!defined('SMF')) + die('Hacking attempt...'); + +class BlockImport extends AbstractImport +{ + /** + * @var array + */ + private $supported_types = [5, 10, 11]; + + /** + * TinyPortal blocks import + * + * Импорт блоков TinyPortal + * + * @return void + */ + public function main() + { + global $context, $txt, $scripturl; + + $context['page_title'] = $txt['lp_portal'] . ' - ' . $txt['lp_tiny_portal_addon_label_name']; + $context['page_area_title'] = $txt['lp_blocks_import']; + $context['canonical_url'] = $scripturl . '?action=admin;area=lp_blocks;sa=import_from_tp'; + + $context[$context['admin_menu_name']]['tab_data'] = array( + 'title' => LP_NAME, + 'description' => $txt['lp_tiny_portal_addon_block_import_description'] + ); + + $this->run(); + + $listOptions = array( + 'id' => 'lp_blocks', + 'items_per_page' => 50, + 'title' => $txt['lp_blocks_import'], + 'no_items_label' => $txt['lp_no_items'], + 'base_href' => $context['canonical_url'], + 'default_sort_col' => 'id', + 'get_items' => array( + 'function' => array($this, 'getAll') + ), + 'get_count' => array( + 'function' => array($this, 'getTotalCount') + ), + 'columns' => array( + 'id' => array( + 'header' => array( + 'value' => '#', + 'style' => 'width: 5%' + ), + 'data' => array( + 'db' => 'id', + 'class' => 'centertext' + ), + 'sort' => array( + 'default' => 'id', + 'reverse' => 'id DESC' + ) + ), + 'title' => array( + 'header' => array( + 'value' => $txt['lp_title'] + ), + 'data' => array( + 'db' => 'title', + 'class' => 'word_break' + ), + 'sort' => array( + 'default' => 'title DESC', + 'reverse' => 'title' + ) + ), + 'type' => array( + 'header' => array( + 'value' => $txt['lp_block_type'] + ), + 'data' => array( + 'db' => 'type', + 'class' => 'centertext' + ), + 'sort' => array( + 'default' => 'type DESC', + 'reverse' => 'type' + ) + ), + 'placement' => array( + 'header' => array( + 'value' => $txt['lp_block_placement'] + ), + 'data' => array( + 'db' => 'placement', + 'class' => 'centertext' + ), + 'sort' => array( + 'default' => 'bar DESC', + 'reverse' => 'bar' + ) + ), + 'actions' => array( + 'header' => array( + 'value' => '' + ), + 'data' => array( + 'function' => function ($entry) + { + return ''; + }, + 'class' => 'centertext' + ) + ) + ), + 'form' => array( + 'href' => $context['canonical_url'] + ), + 'additional_rows' => array( + array( + 'position' => 'below_table_data', + 'value' => ' + + + ' + ) + ) + ); + + Helpers::require('Subs-List'); + createList($listOptions); + + $context['sub_template'] = 'show_list'; + $context['default_list'] = 'lp_blocks'; + } + + /** + * Get the list of blocks + * + * Получаем список блоков + * + * @param int $start + * @param int $items_per_page + * @param string $sort + * @return array + */ + public function getAll(int $start = 0, int $items_per_page = 0, string $sort = 'id') + { + global $smcFunc, $db_prefix, $txt, $context; + + db_extend(); + + if (empty($smcFunc['db_list_tables'](false, $db_prefix . 'tp_blocks'))) + return []; + + $request = $smcFunc['db_query']('', ' + SELECT id, type, title, bar + FROM {db_prefix}tp_blocks + WHERE type IN ({array_int:types}) + ORDER BY {raw:sort} + LIMIT {int:start}, {int:limit}', + array( + 'types' => $this->supported_types, + 'sort' => $sort, + 'start' => $start, + 'limit' => $items_per_page + ) + ); + + $items = []; + while ($row = $smcFunc['db_fetch_assoc']($request)) { + $items[$row['id']] = array( + 'id' => $row['id'], + 'type' => $txt['lp_block_types'][$this->getType($row['type'])], + 'title' => $row['title'], + 'placement' => $context['lp_block_placements'][$this->getPlacement($row['bar'])] + ); + } + + $smcFunc['db_free_result']($request); + $smcFunc['lp_num_queries']++; + + return $items; + } + + /** + * Get the total number of blocks + * + * Подсчитываем общее количество блоков + * + * @return int + */ + public function getTotalCount() + { + global $smcFunc, $db_prefix; + + db_extend(); + + if (empty($smcFunc['db_list_tables'](false, $db_prefix . 'tp_blocks'))) + return 0; + + $request = $smcFunc['db_query']('', ' + SELECT COUNT(*) + FROM {db_prefix}tp_blocks + WHERE type IN ({array_int:types})', + array( + 'types' => $this->supported_types + ) + ); + + [$num_blocks] = $smcFunc['db_fetch_row']($request); + + $smcFunc['db_free_result']($request); + $smcFunc['lp_num_queries']++; + + return (int) $num_blocks; + } + + /** + * Start importing data + * + * Запускаем импорт + * + * @return void + */ + protected function run() + { + global $db_temp_cache, $db_cache, $language, $modSettings, $smcFunc; + + if (Helpers::post()->isEmpty('blocks') && Helpers::post()->has('import_all') === false) + return; + + // Might take some time. + @set_time_limit(600); + + // Don't allow the cache to get too full + $db_temp_cache = $db_cache; + $db_cache = []; + + $blocks = !empty(Helpers::post('blocks')) && Helpers::post()->has('import_all') === false ? Helpers::post('blocks') : null; + + $items = $this->getItems($blocks); + + $titles = []; + foreach ($items as $block_id => $item) { + $titles[] = [ + 'item_id' => $block_id, + 'type' => 'block', + 'lang' => $language, + 'title' => $item['title'] + ]; + + if ($language != 'english' && !empty($modSettings['userLanguage'])) { + $titles[] = [ + 'item_id' => $block_id, + 'type' => 'block', + 'lang' => 'english', + 'title' => $item['title'] + ]; + } + + unset($items[$block_id]['title']); + } + + if (!empty($items)) { + $items = array_chunk($items, 100); + $count = sizeof($items); + + for ($i = 0; $i < $count; $i++) { + $result = $smcFunc['db_insert']('replace', + '{db_prefix}lp_blocks', + array( + 'block_id' => 'int', + 'type' => 'string', + 'content' => 'string-65534', + 'placement' => 'string-10', + 'permissions' => 'int', + 'status' => 'int' + ), + $items[$i], + array('block_id'), + 2 + ); + + $smcFunc['lp_num_queries']++; + } + } + + if (!empty($titles) && !empty($result)) { + $titles = array_chunk($titles, 100); + $count = sizeof($titles); + + for ($i = 0; $i < $count; $i++) { + $result = $smcFunc['db_insert']('replace', + '{db_prefix}lp_titles', + array( + 'item_id' => 'int', + 'type' => 'string', + 'lang' => 'string', + 'title' => 'string' + ), + $titles[$i], + array('item_id', 'type', 'lang'), + 2 + ); + + $smcFunc['lp_num_queries']++; + } + } + + if (empty($result)) + fatal_lang_error('lp_import_failed', false); + + // Restore the cache + $db_cache = $db_temp_cache; + + Helpers::cache()->flush(); + } + + /** + * @param array|null $blocks + * @return array + */ + private function getItems($blocks) + { + global $smcFunc; + + $request = $smcFunc['db_query']('', ' + SELECT id, type, title, body, access, bar + FROM {db_prefix}tp_blocks + WHERE type IN ({array_int:types})' . (!empty($blocks) ? ' + AND id IN ({array_int:blocks})' : ''), + array( + 'types' => $this->supported_types, + 'blocks' => $blocks + ) + ); + + $items = []; + while ($row = $smcFunc['db_fetch_assoc']($request)) { + $permissions = explode(',', $row['access']); + + $perm = 0; + if (count($permissions) == 1 && $permissions[0] == -1) { + $perm = 1; + } elseif (count($permissions) == 1 && $permissions[0] == 0) { + $perm = 2; + } elseif (in_array(-1, $permissions)) { + $perm = 3; + } elseif (in_array(0, $permissions)) { + $perm = 3; + } + + $items[$row['id']] = array( + 'block_id' => $row['id'], + 'type' => $this->getType($row['type']), + 'title' => $row['title'], + 'content' => $row['body'], + 'placement' => $this->getPlacement($row['bar']), + 'permissions' => $perm, + 'status' => 0 + ); + } + + $smcFunc['db_free_result']($request); + $smcFunc['lp_num_queries']++; + + return $items; + } + + /** + * @param int $type + * @return string + */ + private function getType($type) + { + switch ($type) { + case 5: + return 'bbc'; + case 10: + return 'php'; + case 11: + default: + return 'html'; + } + } + + /** + * @param int $bar + * @return string + */ + private function getPlacement($bar) + { + switch ($bar) { + case 1: + return 'left'; + case 2: + return 'right'; + case 5: + return 'footer'; + case 6: + return 'header'; + case 7: + return 'bottom'; + case 3: + case 4: + default: + return 'top'; + } + } +} diff --git a/Sources/LightPortal/addons/TinyPortal/Import.php b/Sources/LightPortal/addons/TinyPortal/PageImport.php similarity index 99% rename from Sources/LightPortal/addons/TinyPortal/Import.php rename to Sources/LightPortal/addons/TinyPortal/PageImport.php index 70acddcf2..c2ebce738 100644 --- a/Sources/LightPortal/addons/TinyPortal/Import.php +++ b/Sources/LightPortal/addons/TinyPortal/PageImport.php @@ -20,7 +20,7 @@ if (!defined('SMF')) die('Hacking attempt...'); -class Import extends AbstractImport +class PageImport extends AbstractImport { /** * TinyPortal pages import @@ -39,7 +39,7 @@ public function main() $context[$context['admin_menu_name']]['tab_data'] = array( 'title' => LP_NAME, - 'description' => $txt['lp_tiny_portal_addon_description'] + 'description' => $txt['lp_tiny_portal_addon_page_import_description'] ); $this->run(); diff --git a/Sources/LightPortal/addons/TinyPortal/TinyPortal.php b/Sources/LightPortal/addons/TinyPortal/TinyPortal.php index dfdf78be9..b89754d55 100644 --- a/Sources/LightPortal/addons/TinyPortal/TinyPortal.php +++ b/Sources/LightPortal/addons/TinyPortal/TinyPortal.php @@ -44,12 +44,30 @@ public function adminAreas(array &$admin_areas) { global $user_info, $txt; + if ($user_info['is_admin']) { + $admin_areas['lp_portal']['areas']['lp_blocks']['subsections']['import_from_tp'] = array($txt['lp_tiny_portal_addon_label_name']); + $admin_areas['lp_portal']['areas']['lp_pages']['subsections']['import_from_tp'] = array($txt['lp_tiny_portal_addon_label_name']); + } + } + + /** + * Add "Import from TinyPortal" tab for Blocks area + * + * Добавляем вкладку «Импорт из TinyPortal» + * + * @param array $subActions + * @return void + */ + public function addBlockAreas(&$subActions) + { + global $user_info; + if ($user_info['is_admin']) - $admin_areas['lp_portal']['areas']['lp_pages']['subsections']['import_from_tp'] = array($txt['lp_tiny_portal_addon_label_name']); + $subActions['import_from_tp'] = array(new BlockImport, 'main'); } /** - * Add "Import from TinyPortal" tab + * Add "Import from TinyPortal" tab for Pages area * * Добавляем вкладку «Импорт из TinyPortal» * @@ -61,6 +79,6 @@ public function addPageAreas(&$subActions) global $user_info; if ($user_info['is_admin']) - $subActions['import_from_tp'] = array(new Import, 'main'); + $subActions['import_from_tp'] = array(new PageImport, 'main'); } } diff --git a/Sources/LightPortal/addons/TinyPortal/langs/english.php b/Sources/LightPortal/addons/TinyPortal/langs/english.php index fa76d3b4c..6c028eaf9 100644 --- a/Sources/LightPortal/addons/TinyPortal/langs/english.php +++ b/Sources/LightPortal/addons/TinyPortal/langs/english.php @@ -1,8 +1,9 @@ Date: Mon, 31 May 2021 19:47:39 +0500 Subject: [PATCH 16/24] Add support for "large_text" option --- Themes/default/LightPortal/ManagePlugins.template.php | 5 ++++- Themes/default/css/light_portal/light_portal.css | 3 +++ Themes/default/css/light_portal/light_portal.less | 6 ++++++ Themes/default/css/light_portal/light_portal.scss | 6 ++++++ 4 files changed, 19 insertions(+), 1 deletion(-) diff --git a/Themes/default/LightPortal/ManagePlugins.template.php b/Themes/default/LightPortal/ManagePlugins.template.php index b1f88a2bc..c6f5c0add 100644 --- a/Themes/default/LightPortal/ManagePlugins.template.php +++ b/Themes/default/LightPortal/ManagePlugins.template.php @@ -101,7 +101,7 @@ function show_plugin_settings($plugin_name, $settings) '; - foreach ($settings as $id => $value) { + foreach ($settings as $value) { echo '
'; @@ -113,6 +113,9 @@ function show_plugin_settings($plugin_name, $settings) if ($value[0] == 'text') { echo '
'; + } elseif ($value[0] == 'large_text') { + echo ' +
'; } elseif ($value[0] == 'url') { echo '
'; diff --git a/Themes/default/css/light_portal/light_portal.css b/Themes/default/css/light_portal/light_portal.css index c7544b7f8..8afb02145 100644 --- a/Themes/default/css/light_portal/light_portal.css +++ b/Themes/default/css/light_portal/light_portal.css @@ -982,6 +982,9 @@ section #display_head span { .features .fa-toggle-on { color: #00cc33; } +.features form textarea { + width: 100%; +} .lp_plugin_toggle, .lp_plugin_settings { cursor: pointer; diff --git a/Themes/default/css/light_portal/light_portal.less b/Themes/default/css/light_portal/light_portal.less index b9164e4ec..afb6f0067 100644 --- a/Themes/default/css/light_portal/light_portal.less +++ b/Themes/default/css/light_portal/light_portal.less @@ -1280,6 +1280,12 @@ section { .fa-toggle-on { color: @color-checked; } + + form { + textarea { + width: 100%; + } + } } .lp_plugin_toggle, diff --git a/Themes/default/css/light_portal/light_portal.scss b/Themes/default/css/light_portal/light_portal.scss index 989347261..7f72ef282 100644 --- a/Themes/default/css/light_portal/light_portal.scss +++ b/Themes/default/css/light_portal/light_portal.scss @@ -1251,6 +1251,12 @@ section { .fa-toggle-on { color: $color-checked; } + + form { + textarea { + width: 100%; + } + } } .lp_plugin_toggle, From ecceadb075659f6d03b7515d3c70b4260a97c61b Mon Sep 17 00:00:00 2001 From: Bugo Date: Tue, 1 Jun 2021 18:43:09 +0500 Subject: [PATCH 17/24] Update some addons --- Sources/LightPortal/addons/DevTools/DevTools.php | 6 ++++-- Sources/LightPortal/addons/FlarumStyle/FlarumStyle.php | 10 +++++----- Sources/LightPortal/addons/FlarumStyle/Template.php | 6 +----- 3 files changed, 10 insertions(+), 12 deletions(-) diff --git a/Sources/LightPortal/addons/DevTools/DevTools.php b/Sources/LightPortal/addons/DevTools/DevTools.php index dde488268..28a60be1c 100644 --- a/Sources/LightPortal/addons/DevTools/DevTools.php +++ b/Sources/LightPortal/addons/DevTools/DevTools.php @@ -2,6 +2,7 @@ namespace Bugo\LightPortal\Addons\DevTools; +use Exception; use Bugo\LightPortal\{Helpers, FrontPage}; /** @@ -30,7 +31,7 @@ class DevTools * @param array $config_vars * @return void */ - public function addSettings(&$config_vars) + public function addSettings(array &$config_vars) { global $txt; @@ -40,6 +41,7 @@ public function addSettings(&$config_vars) /** * @return void + * @throws Exception */ public function frontCustomTemplate() { @@ -130,7 +132,7 @@ public function getUsers() * @param array $links * @return void */ - public function credits(&$links) + public function credits(array &$links) { $links[] = array( 'title' => 'Reqres', diff --git a/Sources/LightPortal/addons/FlarumStyle/FlarumStyle.php b/Sources/LightPortal/addons/FlarumStyle/FlarumStyle.php index 09c0b7e9b..08825a3cf 100644 --- a/Sources/LightPortal/addons/FlarumStyle/FlarumStyle.php +++ b/Sources/LightPortal/addons/FlarumStyle/FlarumStyle.php @@ -37,18 +37,18 @@ public function frontCustomTemplate() { global $modSettings, $context; - if (empty($modSettings['lp_frontpage_mode']) || !in_array($modSettings['lp_frontpage_mode'], ['all_topics', 'chosen_topics', 'all_pages', 'chosen_pages'])) + if (!in_array($modSettings['lp_frontpage_mode'], ['all_topics', 'chosen_topics', 'all_pages', 'chosen_pages'])) return; $context['is_portal'] = in_array($modSettings['lp_frontpage_mode'], ['all_pages', 'chosen_pages']); - $context['lp_all_categories'] = $this->getCategoryList(); + $context['lp_all_categories'] = $this->getCategories(); require_once(__DIR__ . '/Template.php'); $this->prepareFantomBLock(); - $context['sub_template'] = 'show_topics_as_flarum_style'; + $context['sub_template'] = 'show_articles_as_flarum_style'; } /** @@ -81,7 +81,7 @@ private function prepareFantomBLock() * * @return array */ - private function getCategoryList() + private function getCategories() { global $context, $txt, $modSettings; @@ -90,7 +90,7 @@ private function getCategoryList() $categories = array( array( - 'name' => $txt['lp_categories'], + 'name' => $txt['lp_categories'], 'boards' => [] ) ); diff --git a/Sources/LightPortal/addons/FlarumStyle/Template.php b/Sources/LightPortal/addons/FlarumStyle/Template.php index 0371e40ba..6c11c88b3 100644 --- a/Sources/LightPortal/addons/FlarumStyle/Template.php +++ b/Sources/LightPortal/addons/FlarumStyle/Template.php @@ -71,13 +71,9 @@ function show_ffs_sidebar() } /** - * Topics from selected boards as sources of articles (Flarum style) - * - * Темы из выбранных разделов в виде статей - * * @return void */ -function template_show_topics_as_flarum_style() +function template_show_articles_as_flarum_style() { global $context, $txt; From 9fa9a1d26228237317766b8f7ca114dd2bb75eba Mon Sep 17 00:00:00 2001 From: Bugo Date: Tue, 1 Jun 2021 18:45:19 +0500 Subject: [PATCH 18/24] Add some fixes --- Sources/LightPortal/Integration.php | 8 +++++--- Sources/LightPortal/ManagePlugins.php | 4 ++-- Themes/default/LightPortal/ManagePlugins.template.php | 10 +++++----- 3 files changed, 12 insertions(+), 10 deletions(-) diff --git a/Sources/LightPortal/Integration.php b/Sources/LightPortal/Integration.php index ec8d5bb8d..b18f12d1e 100644 --- a/Sources/LightPortal/Integration.php +++ b/Sources/LightPortal/Integration.php @@ -144,10 +144,12 @@ public function redirect(string &$setLocation) */ public function actions(array &$actions) { - global $context, $modSettings; + global $modSettings, $context; + + if (!empty($modSettings['lp_frontpage_mode'])) + $actions['portal'] = array('LightPortal/FrontPage.php', array(new FrontPage, 'show')); - $actions['portal'] = array('LightPortal/FrontPage.php', array(new FrontPage, 'show')); - $actions['forum'] = array('BoardIndex.php', 'BoardIndex'); + $actions['forum'] = array('BoardIndex.php', 'BoardIndex'); if (Helpers::request()->is('portal') && $context['current_subaction'] == 'categories') return call_user_func(array(new Category, 'show')); diff --git a/Sources/LightPortal/ManagePlugins.php b/Sources/LightPortal/ManagePlugins.php index 6866a9343..c4f795c4b 100644 --- a/Sources/LightPortal/ManagePlugins.php +++ b/Sources/LightPortal/ManagePlugins.php @@ -36,7 +36,6 @@ class ManagePlugins * Управление плагинами * * @return void - * @throws ReflectionException */ public function main() { @@ -838,6 +837,7 @@ private function addPluginsForSponsors() 'GoogleAmp', 'Jodit', 'PageScroll', + 'SiteList', 'YandexTurbo' ) ); @@ -878,7 +878,7 @@ private function getTypes(string $snake_name): string * @param string $name * @return array */ - private function getSettings(array $config_vars, $name = ''): array + private function getSettings(array $config_vars, string $name = ''): array { if (empty($config_vars)) return []; diff --git a/Themes/default/LightPortal/ManagePlugins.template.php b/Themes/default/LightPortal/ManagePlugins.template.php index c6f5c0add..8ffbc8e81 100644 --- a/Themes/default/LightPortal/ManagePlugins.template.php +++ b/Themes/default/LightPortal/ManagePlugins.template.php @@ -207,9 +207,9 @@ function show_plugin_settings($plugin_name, $settings) } /** - * The page creation/editing template + * The plugin creation/editing template * - * Шаблон создания/редактирования страницы + * Шаблон создания/редактирования плагина * * @return void */ @@ -282,7 +282,7 @@ function template_plugin_post() - @@ -361,9 +361,9 @@ function template_plugin_post() - + - + From 1a4228216bf9bd195c47b909c25d6dfa03083f74 Mon Sep 17 00:00:00 2001 From: Bugo Date: Wed, 2 Jun 2021 11:25:08 +0500 Subject: [PATCH 19/24] Add a new option - "show pagination" --- Sources/LightPortal/Settings.php | 1 + .../addons/FlarumStyle/Template.php | 18 ++--- .../LightPortal/ViewFrontPage.template.php | 75 ++++++++++--------- .../languages/LightPortal/.english.php | 2 + .../languages/LightPortal/.russian.php | 2 + .../languages/LightPortal/.ukrainian.php | 2 + 6 files changed, 52 insertions(+), 48 deletions(-) diff --git a/Sources/LightPortal/Settings.php b/Sources/LightPortal/Settings.php index 2e1bbf3f8..0113c8947 100644 --- a/Sources/LightPortal/Settings.php +++ b/Sources/LightPortal/Settings.php @@ -246,6 +246,7 @@ public function basic(bool $return_config = false) array('select', 'lp_frontpage_article_sorting', $txt['lp_frontpage_article_sorting_set'], 'help' => 'lp_frontpage_article_sorting_help'), array('select', 'lp_frontpage_layout', $context['lp_frontpage_layout']), array('select', 'lp_frontpage_num_columns', $txt['lp_frontpage_num_columns_set']), + array('select', 'lp_show_pagination', $txt['lp_show_pagination_set']), array('int', 'lp_num_items_per_page'), array('title', 'lp_standalone_mode_title'), array('check', 'lp_standalone_mode', 'label' => $txt['lp_action_on']), diff --git a/Sources/LightPortal/addons/FlarumStyle/Template.php b/Sources/LightPortal/addons/FlarumStyle/Template.php index 6c11c88b3..77b425bb9 100644 --- a/Sources/LightPortal/addons/FlarumStyle/Template.php +++ b/Sources/LightPortal/addons/FlarumStyle/Template.php @@ -79,7 +79,11 @@ function template_show_articles_as_flarum_style() echo '
-
+
'; + + show_pagination(); + + echo '

', $context['page_title'], '

'; @@ -158,17 +162,9 @@ function template_show_articles_as_flarum_style() } } - echo ' -
'; - - if (!empty($context['page_index'])) - echo ' -
-
- -
-
'; + show_pagination('bottom'); echo ' +
'; } diff --git a/Themes/default/LightPortal/ViewFrontPage.template.php b/Themes/default/LightPortal/ViewFrontPage.template.php index 95820d9a8..5b3f809a0 100644 --- a/Themes/default/LightPortal/ViewFrontPage.template.php +++ b/Themes/default/LightPortal/ViewFrontPage.template.php @@ -39,14 +39,16 @@ function template_wrong_template() */ function template_show_articles() { - global $context, $txt, $modSettings; + global $context, $modSettings, $txt; if (empty($context['lp_active_blocks'])) echo '
'; echo ' -
'; +
'; + + show_pagination(); foreach ($context['lp_frontpage_articles'] as $article) { echo ' @@ -156,13 +158,7 @@ function template_show_articles()
'; } - if (!empty($context['page_index'])) - echo ' -
-
- -
-
'; + show_pagination('bottom'); echo '
'; @@ -190,6 +186,8 @@ function template_show_articles_alt() echo '
'; + show_pagination(); + foreach ($context['lp_frontpage_articles'] as $article) { echo '
@@ -272,13 +270,7 @@ function template_show_articles_alt()
'; } - if (!empty($context['page_index'])) - echo ' -
-
- -
-
'; + show_pagination('bottom'); echo '
'; @@ -306,6 +298,8 @@ function template_show_articles_alt2() echo '
'; + show_pagination(); + foreach ($context['lp_frontpage_articles'] as $article) { echo '
'; @@ -371,13 +365,7 @@ function template_show_articles_alt2()
'; } - if (!empty($context['page_index'])) - echo ' -
-
- -
-
'; + show_pagination('bottom'); echo '
'; @@ -405,6 +393,8 @@ function template_show_articles_alt3() echo '
'; + show_pagination(); + $i = 0; foreach ($context['lp_frontpage_articles'] as $article) { $i++; @@ -483,13 +473,7 @@ function template_show_articles_alt3()
'; } - if (!empty($context['page_index'])) - echo ' -
-
- -
-
'; + show_pagination('bottom'); echo '
'; @@ -517,6 +501,8 @@ function template_show_articles_alt4() echo '
'; + show_pagination(); + foreach ($context['lp_frontpage_articles'] as $article) { echo '
@@ -550,13 +536,7 @@ function template_show_articles_alt4()
'; } - if (!empty($context['page_index'])) - echo ' -
-
- -
-
'; + show_pagination('bottom'); echo '
'; @@ -612,3 +592,24 @@ function template_sorting_above() function template_sorting_below() { } + +/** + * @param string $position + * @return void + */ +function show_pagination($position = 'top') +{ + global $context, $modSettings; + + $show_on_top = $position == 'top' && !empty($modSettings['lp_show_pagination']); + + $show_on_bottom = $position == 'bottom' && (empty($modSettings['lp_show_pagination']) || ($modSettings['lp_show_pagination'] == 1)); + + if (!empty($context['page_index']) && ($show_on_top || $show_on_bottom)) + echo ' +
+
+ +
+
'; +} diff --git a/Themes/default/languages/LightPortal/.english.php b/Themes/default/languages/LightPortal/.english.php index e11edfc3a..a0811dcd6 100644 --- a/Themes/default/languages/LightPortal/.english.php +++ b/Themes/default/languages/LightPortal/.english.php @@ -57,6 +57,8 @@ $txt['lp_frontpage_layout'] = 'Template layout for article cards'; $txt['lp_frontpage_num_columns'] = 'Number of columns for displaying articles'; $txt['lp_frontpage_num_columns_set'] = array('1 column', '2 columns', '3 columns', '4 columns', '6 columns'); +$txt['lp_show_pagination'] = 'Show the pagination'; +$txt['lp_show_pagination_set'] = array('Bottom only', 'Top and bottom', 'Top only'); $txt['lp_num_items_per_page'] = 'Number of items per page (for pagination)'; $txt['lp_standalone_mode_title'] = 'Standalone mode'; diff --git a/Themes/default/languages/LightPortal/.russian.php b/Themes/default/languages/LightPortal/.russian.php index 8d55822d5..995ae16ed 100644 --- a/Themes/default/languages/LightPortal/.russian.php +++ b/Themes/default/languages/LightPortal/.russian.php @@ -57,6 +57,8 @@ $txt['lp_frontpage_layout'] = 'Шаблон оформления карточек статей'; $txt['lp_frontpage_num_columns'] = 'Количество колонок для вывода статей'; $txt['lp_frontpage_num_columns_set'] = array('1 колонка', '2 колонки', '3 колонки', '4 колонки', '6 колонок'); +$txt['lp_show_pagination'] = 'Отображать пагинацию'; +$txt['lp_show_pagination_set'] = array('Только внизу', 'Вверху и внизу', 'Только вверху'); $txt['lp_num_items_per_page'] = 'Количество элементов на странице (для пагинации)'; $txt['lp_standalone_mode_title'] = 'Автономный режим'; diff --git a/Themes/default/languages/LightPortal/.ukrainian.php b/Themes/default/languages/LightPortal/.ukrainian.php index 617cc8032..d24caffcb 100644 --- a/Themes/default/languages/LightPortal/.ukrainian.php +++ b/Themes/default/languages/LightPortal/.ukrainian.php @@ -57,6 +57,8 @@ $txt['lp_frontpage_layout'] = 'Шаблон оформлення карток статей'; $txt['lp_frontpage_num_columns'] = 'Кількість колонок для виведення статей'; $txt['lp_frontpage_num_columns_set'] = array('1 колонка', '2 колонки', '3 колонки', '4 колонки', '6 колонок'); +$txt['lp_show_pagination'] = 'Відображати пагінацію'; +$txt['lp_show_pagination_set'] = array('Тільки внизу', 'Вгорі і внизу', 'Тільки вгорі'); $txt['lp_num_items_per_page'] = 'Кількість елементів на сторінці (для пагінації)'; $txt['lp_standalone_mode_title'] = 'Автономний режим'; From c04b4015a798be25ba72d4227b11b40eb5a8f35d Mon Sep 17 00:00:00 2001 From: Bugo Date: Wed, 2 Jun 2021 11:38:40 +0500 Subject: [PATCH 20/24] Add plugin counter --- Themes/default/LightPortal/ManagePlugins.template.php | 1 + 1 file changed, 1 insertion(+) diff --git a/Themes/default/LightPortal/ManagePlugins.template.php b/Themes/default/LightPortal/ManagePlugins.template.php index 8ffbc8e81..0799547bc 100644 --- a/Themes/default/LightPortal/ManagePlugins.template.php +++ b/Themes/default/LightPortal/ManagePlugins.template.php @@ -30,6 +30,7 @@ function template_manage_plugins()
+ ', $id + 1, '

', $plugin['name'], '

From 93f74196601405be3defffef2af1613b06b69e37 Mon Sep 17 00:00:00 2001 From: Bugo Date: Thu, 3 Jun 2021 11:32:53 +0500 Subject: [PATCH 21/24] Remove dependence on identifiers when importing blocks --- .../addons/TinyPortal/BlockImport.php | 64 +++++++++---------- 1 file changed, 32 insertions(+), 32 deletions(-) diff --git a/Sources/LightPortal/addons/TinyPortal/BlockImport.php b/Sources/LightPortal/addons/TinyPortal/BlockImport.php index 08000eaf8..32ed1cc4d 100644 --- a/Sources/LightPortal/addons/TinyPortal/BlockImport.php +++ b/Sources/LightPortal/addons/TinyPortal/BlockImport.php @@ -241,7 +241,7 @@ public function getTotalCount() */ protected function run() { - global $db_temp_cache, $db_cache, $language, $modSettings, $smcFunc; + global $db_temp_cache, $db_cache, $language, $smcFunc; if (Helpers::post()->isEmpty('blocks') && Helpers::post()->has('import_all') === false) return; @@ -260,38 +260,31 @@ protected function run() $titles = []; foreach ($items as $block_id => $item) { $titles[] = [ - 'item_id' => $block_id, - 'type' => 'block', - 'lang' => $language, - 'title' => $item['title'] + 'type' => 'block', + 'lang' => $language, + 'title' => $item['title'] ]; - if ($language != 'english' && !empty($modSettings['userLanguage'])) { - $titles[] = [ - 'item_id' => $block_id, - 'type' => 'block', - 'lang' => 'english', - 'title' => $item['title'] - ]; - } - unset($items[$block_id]['title']); } + $result = []; + if (!empty($items)) { $items = array_chunk($items, 100); $count = sizeof($items); for ($i = 0; $i < $count; $i++) { - $result = $smcFunc['db_insert']('replace', + $temp = $smcFunc['db_insert']('', '{db_prefix}lp_blocks', array( - 'block_id' => 'int', - 'type' => 'string', - 'content' => 'string-65534', - 'placement' => 'string-10', - 'permissions' => 'int', - 'status' => 'int' + 'type' => 'string', + 'content' => 'string-65534', + 'placement' => 'string-10', + 'permissions' => 'int', + 'status' => 'int', + 'title_class' => 'string', + 'content_class' => 'string' ), $items[$i], array('block_id'), @@ -299,21 +292,27 @@ protected function run() ); $smcFunc['lp_num_queries']++; + + $result = array_merge($result, $temp); } } if (!empty($titles) && !empty($result)) { + foreach ($result as $key => $value) { + $titles[$key]['item_id'] = $value; + } + $titles = array_chunk($titles, 100); $count = sizeof($titles); for ($i = 0; $i < $count; $i++) { - $result = $smcFunc['db_insert']('replace', + $result = $smcFunc['db_insert']('', '{db_prefix}lp_titles', array( - 'item_id' => 'int', 'type' => 'string', 'lang' => 'string', - 'title' => 'string' + 'title' => 'string', + 'item_id' => 'int' ), $titles[$i], array('item_id', 'type', 'lang'), @@ -339,7 +338,7 @@ protected function run() */ private function getItems($blocks) { - global $smcFunc; + global $smcFunc, $context; $request = $smcFunc['db_query']('', ' SELECT id, type, title, body, access, bar @@ -368,13 +367,14 @@ private function getItems($blocks) } $items[$row['id']] = array( - 'block_id' => $row['id'], - 'type' => $this->getType($row['type']), - 'title' => $row['title'], - 'content' => $row['body'], - 'placement' => $this->getPlacement($row['bar']), - 'permissions' => $perm, - 'status' => 0 + 'type' => $this->getType($row['type']), + 'title' => $row['title'], + 'content' => $row['body'], + 'placement' => $this->getPlacement($row['bar']), + 'permissions' => $perm, + 'status' => 0, + 'title_class' => array_key_first($context['lp_all_title_classes']), + 'content_class' => array_key_first($context['lp_all_content_classes']) ); } From b9d19621b93f67465c98d1b37dc5a47e46d13663 Mon Sep 17 00:00:00 2001 From: Bugo Date: Thu, 3 Jun 2021 11:33:56 +0500 Subject: [PATCH 22/24] Fix issue when blocks do not have titles in database --- Themes/default/LightPortal/ManageBlocks.template.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Themes/default/LightPortal/ManageBlocks.template.php b/Themes/default/LightPortal/ManageBlocks.template.php index 9324bce10..c4e74f59f 100644 --- a/Themes/default/LightPortal/ManageBlocks.template.php +++ b/Themes/default/LightPortal/ManageBlocks.template.php @@ -143,7 +143,7 @@ function show_block_entry($id, $data) echo ' - ', $title = $data['note'] ?: $data['title'][$context['user']['language']] ?: $data['title'][$language] ?: $data['title']['english']; + ', $title = $data['note'] ?: ($data['title'][$context['user']['language']] ?? $data['title'][$language] ?? $data['title']['english'] ?? ''); if (empty($title)) echo '

'; From b885302f3a63cb79c64aa4db3f9deb564e30163e Mon Sep 17 00:00:00 2001 From: Bugo Date: Fri, 4 Jun 2021 08:40:02 +0500 Subject: [PATCH 23/24] Add filter by plugins --- Sources/LightPortal/ManagePlugins.php | 15 ++++++++++++ .../LightPortal/ManagePlugins.template.php | 24 +++++++++++++++++-- 2 files changed, 37 insertions(+), 2 deletions(-) diff --git a/Sources/LightPortal/ManagePlugins.php b/Sources/LightPortal/ManagePlugins.php index c4f795c4b..af0a9c214 100644 --- a/Sources/LightPortal/ManagePlugins.php +++ b/Sources/LightPortal/ManagePlugins.php @@ -41,6 +41,7 @@ public function main() { global $context, $txt, $scripturl; + loadLanguage('ManageMaintenance'); loadTemplate('LightPortal/ManagePlugins'); $context['page_title'] = $txt['lp_portal'] . ' - ' . $txt['lp_plugins_manage']; @@ -86,6 +87,20 @@ public function main() ]; }, $context['lp_plugins']); + // Sort plugin list + $context['current_filter'] = Helpers::post('filter', 'all'); + + if (Helpers::post()->has('filter')) { + $context['all_lp_plugins'] = array_filter($context['all_lp_plugins'], function ($item) use ($context) + { + $filter = Helpers::post('filter'); + + if (!in_array($filter, array_keys($context['lp_plugin_types'])) || strpos($item['types'], $context['lp_plugin_types'][$filter]) !== false) { + return true; + } + }); + } + $context['sub_template'] = 'manage_plugins'; if (Helpers::request()->has('save')) { diff --git a/Themes/default/LightPortal/ManagePlugins.template.php b/Themes/default/LightPortal/ManagePlugins.template.php index 0799547bc..03b81f565 100644 --- a/Themes/default/LightPortal/ManagePlugins.template.php +++ b/Themes/default/LightPortal/ManagePlugins.template.php @@ -22,15 +22,35 @@ function template_manage_plugins() ', $txt['lp_plugins_extra'], '
-

', $txt['lp_plugins_desc'], '

'; +
+ ', $txt['lp_plugins_desc']; + + echo ' +
+
+ + +
+
+
'; // This is a magic! Пошла магия! + $i = 0; foreach ($context['all_lp_plugins'] as $id => $plugin) { echo '
- ', $id + 1, ' + ', ++$i, '

', $plugin['name'], '

From 738dfd79c50b14754910d99400850dd0b51f2acd Mon Sep 17 00:00:00 2001 From: Bugo Date: Sun, 6 Jun 2021 06:28:22 +0500 Subject: [PATCH 24/24] Prepare for release --- README.md | 2 +- Sources/LightPortal/Block.php | 2 +- Sources/LightPortal/Category.php | 2 +- Sources/LightPortal/Comment.php | 2 +- Sources/LightPortal/Credits.php | 2 +- Sources/LightPortal/FrontPage.php | 2 +- Sources/LightPortal/Helpers.php | 2 +- Sources/LightPortal/Integration.php | 10 +++++----- Sources/LightPortal/ManageBlocks.php | 2 +- Sources/LightPortal/ManagePages.php | 2 +- Sources/LightPortal/ManagePlugins.php | 2 +- Sources/LightPortal/Notify.php | 2 +- Sources/LightPortal/Page.php | 2 +- Sources/LightPortal/PageListInterface.php | 2 +- Sources/LightPortal/Settings.php | 2 +- Sources/LightPortal/Subs.php | 12 ++++++------ Sources/LightPortal/Tag.php | 2 +- Sources/LightPortal/addons/AdsBlock/AdsBlock.php | 2 +- .../LightPortal/addons/ArticleList/ArticleList.php | 2 +- Sources/LightPortal/addons/BoardIndex/BoardIndex.php | 2 +- Sources/LightPortal/addons/BoardList/BoardList.php | 2 +- Sources/LightPortal/addons/BoardNews/BoardNews.php | 2 +- Sources/LightPortal/addons/BoardStats/BoardStats.php | 2 +- Sources/LightPortal/addons/CodeMirror/CodeMirror.php | 2 +- .../LightPortal/addons/CurrentMonth/CurrentMonth.php | 2 +- Sources/LightPortal/addons/DevTools/DevTools.php | 2 +- Sources/LightPortal/addons/DevTools/Lorem.php | 2 +- Sources/LightPortal/addons/Disqus/Disqus.php | 2 +- .../addons/EasyMarkdownEditor/EasyMarkdownEditor.php | 2 +- Sources/LightPortal/addons/EhPortal/EhPortal.php | 2 +- Sources/LightPortal/addons/EhPortal/Import.php | 2 +- Sources/LightPortal/addons/EzPortal/EzPortal.php | 2 +- Sources/LightPortal/addons/EzPortal/Import.php | 2 +- .../LightPortal/addons/FaBoardIcons/FaBoardIcons.php | 2 +- .../addons/FacebookComments/FacebookComments.php | 2 +- .../LightPortal/addons/FlarumStyle/FlarumStyle.php | 2 +- .../LightPortal/addons/HidingBlocks/HidingBlocks.php | 2 +- .../addons/InstagramFeed/InstagramFeed.php | 2 +- .../addons/KarmaPostRating/KarmaPostRating.php | 2 +- .../addons/LanguageAccess/LanguageAccess.php | 2 +- Sources/LightPortal/addons/Likely/Likely.php | 2 +- Sources/LightPortal/addons/Markdown/Markdown.php | 2 +- .../addons/Markdown/Michelf/MarkdownSMF.php | 2 +- Sources/LightPortal/addons/News/News.php | 2 +- Sources/LightPortal/addons/Optimus/Optimus.php | 2 +- Sources/LightPortal/addons/PageList/PageList.php | 2 +- Sources/LightPortal/addons/Polls/Polls.php | 2 +- Sources/LightPortal/addons/PrettyUrls/PrettyUrls.php | 2 +- .../LightPortal/addons/RandomTopics/RandomTopics.php | 2 +- .../addons/RecentAttachments/RecentAttachments.php | 2 +- .../LightPortal/addons/RecentPosts/RecentPosts.php | 2 +- .../LightPortal/addons/RecentTopics/RecentTopics.php | 2 +- Sources/LightPortal/addons/RssFeed/RssFeed.php | 2 +- Sources/LightPortal/addons/Search/Search.php | 2 +- Sources/LightPortal/addons/TagList/TagList.php | 2 +- .../addons/ThemeSwitcher/ThemeSwitcher.php | 2 +- .../LightPortal/addons/TinyPortal/BlockImport.php | 2 +- Sources/LightPortal/addons/TinyPortal/PageImport.php | 2 +- Sources/LightPortal/addons/TinyPortal/TinyPortal.php | 2 +- Sources/LightPortal/addons/TinySlider/TinySlider.php | 2 +- Sources/LightPortal/addons/Todays/Todays.php | 2 +- Sources/LightPortal/addons/TopBoards/TopBoards.php | 2 +- Sources/LightPortal/addons/TopPages/TopPages.php | 2 +- Sources/LightPortal/addons/TopPosters/TopPosters.php | 2 +- Sources/LightPortal/addons/TopTopics/TopTopics.php | 2 +- .../addons/TopicRatingBar/TopicRatingBar.php | 2 +- Sources/LightPortal/addons/Translator/Translator.php | 2 +- Sources/LightPortal/addons/Trumbowyg/Trumbowyg.php | 2 +- Sources/LightPortal/addons/UserInfo/UserInfo.php | 2 +- Sources/LightPortal/addons/VkComments/VkComments.php | 2 +- Sources/LightPortal/addons/WhosOnline/WhosOnline.php | 2 +- Sources/LightPortal/front/AbstractArticle.php | 2 +- Sources/LightPortal/front/BoardArticle.php | 2 +- Sources/LightPortal/front/ChosenPageArticle.php | 2 +- Sources/LightPortal/front/ChosenTopicArticle.php | 2 +- Sources/LightPortal/front/PageArticle.php | 2 +- Sources/LightPortal/front/TopicArticle.php | 2 +- Sources/LightPortal/impex/AbstractExport.php | 2 +- Sources/LightPortal/impex/AbstractImport.php | 2 +- Sources/LightPortal/impex/BlockExport.php | 2 +- Sources/LightPortal/impex/BlockImport.php | 2 +- Sources/LightPortal/impex/ExportInterface.php | 2 +- Sources/LightPortal/impex/ImportInterface.php | 2 +- Sources/LightPortal/impex/PageExport.php | 2 +- Sources/LightPortal/impex/PageImport.php | 2 +- Sources/LightPortal/utils/AbstractArray.php | 2 +- Sources/LightPortal/utils/Cache.php | 2 +- Sources/LightPortal/utils/Post.php | 2 +- Sources/LightPortal/utils/Request.php | 2 +- Sources/LightPortal/utils/Server.php | 2 +- Sources/LightPortal/utils/Session.php | 2 +- package-info.xml | 2 +- 92 files changed, 101 insertions(+), 101 deletions(-) diff --git a/README.md b/README.md index ca6d35c7a..047d7dc6f 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ * **Author:** Bugo [dragomano.ru](https://dragomano.ru/mods/light-portal) * **License:** [GNU GPLv3](https://github.com/dragomano/Light-Portal/blob/master/LICENSE) * **Compatible with:** SMF 2.1 RC3+ / PHP 7.3+ -* **Tested on:** PHP 7.3.27, 7.4.16, 8.0.3 / MariaDB 10.5.6 / MySQL 5.7.25 / PostgreSQL 9.6.18 +* **Tested on:** PHP 8.0.6 / MariaDB 10.5.6 / MySQL 5.7.25 / PostgreSQL 9.6.18 * **Hooks only:** Yes * **Languages:** English, Russian, Ukrainian, Polish, Spanish, French, Turkish diff --git a/Sources/LightPortal/Block.php b/Sources/LightPortal/Block.php index 2fc7cc7a8..6797e2182 100644 --- a/Sources/LightPortal/Block.php +++ b/Sources/LightPortal/Block.php @@ -11,7 +11,7 @@ * @copyright 2019-2021 Bugo * @license https://spdx.org/licenses/GPL-3.0-or-later.html GPL-3.0-or-later * - * @version 1.7 + * @version 1.8 */ if (!defined('SMF')) diff --git a/Sources/LightPortal/Category.php b/Sources/LightPortal/Category.php index f442fa87b..6c37780e4 100644 --- a/Sources/LightPortal/Category.php +++ b/Sources/LightPortal/Category.php @@ -13,7 +13,7 @@ * @copyright 2019-2021 Bugo * @license https://spdx.org/licenses/GPL-3.0-or-later.html GPL-3.0-or-later * - * @version 1.7 + * @version 1.8 */ if (!defined('SMF')) diff --git a/Sources/LightPortal/Comment.php b/Sources/LightPortal/Comment.php index c9868c924..fe5a1b07f 100644 --- a/Sources/LightPortal/Comment.php +++ b/Sources/LightPortal/Comment.php @@ -13,7 +13,7 @@ * @copyright 2019-2021 Bugo * @license https://spdx.org/licenses/GPL-3.0-or-later.html GPL-3.0-or-later * - * @version 1.7 + * @version 1.8 */ if (!defined('SMF')) diff --git a/Sources/LightPortal/Credits.php b/Sources/LightPortal/Credits.php index 7b3bc6a10..fbaf75e2b 100644 --- a/Sources/LightPortal/Credits.php +++ b/Sources/LightPortal/Credits.php @@ -11,7 +11,7 @@ * @copyright 2019-2021 Bugo * @license https://spdx.org/licenses/GPL-3.0-or-later.html GPL-3.0-or-later * - * @version 1.7 + * @version 1.8 */ if (!defined('SMF')) diff --git a/Sources/LightPortal/FrontPage.php b/Sources/LightPortal/FrontPage.php index a42684de9..e9644e097 100644 --- a/Sources/LightPortal/FrontPage.php +++ b/Sources/LightPortal/FrontPage.php @@ -13,7 +13,7 @@ * @copyright 2019-2021 Bugo * @license https://spdx.org/licenses/GPL-3.0-or-later.html GPL-3.0-or-later * - * @version 1.7 + * @version 1.8 */ class FrontPage diff --git a/Sources/LightPortal/Helpers.php b/Sources/LightPortal/Helpers.php index 6d3005d82..a8d1f807b 100644 --- a/Sources/LightPortal/Helpers.php +++ b/Sources/LightPortal/Helpers.php @@ -13,7 +13,7 @@ * @copyright 2019-2021 Bugo * @license https://spdx.org/licenses/GPL-3.0-or-later.html GPL-3.0-or-later * - * @version 1.7 + * @version 1.8 */ if (!defined('SMF')) diff --git a/Sources/LightPortal/Integration.php b/Sources/LightPortal/Integration.php index b18f12d1e..b9b359344 100644 --- a/Sources/LightPortal/Integration.php +++ b/Sources/LightPortal/Integration.php @@ -13,7 +13,7 @@ * @copyright 2019-2021 Bugo * @license https://spdx.org/licenses/GPL-3.0-or-later.html GPL-3.0-or-later * - * @version 1.7 + * @version 1.8 */ if (!defined('SMF')) @@ -75,8 +75,8 @@ public function userInfo() $lp_constants = [ 'LP_NAME' => 'Light Portal', - 'LP_VERSION' => '1.7.1', - 'LP_RELEASE_DATE' => '2021-04-04', + 'LP_VERSION' => '1.8', + 'LP_RELEASE_DATE' => '2021-06-06', 'LP_DEBUG' => !empty($modSettings['lp_show_debug_info']) && !empty($user_info['is_admin']), 'LP_CACHE_TIME' => $modSettings['lp_cache_update_interval'] ?? 3600, 'LP_ADDON_DIR' => $sourcedir . '/LightPortal/addons' @@ -158,9 +158,9 @@ public function actions(array &$actions) return call_user_func(array(new Tag, 'show')); if (!empty($modSettings['lp_standalone_mode'])) { - $disabled_actions = Subs::unsetDisabledActions($actions); + Subs::unsetDisabledActions($actions); - if (!empty($context['current_action']) && array_key_exists($context['current_action'], $disabled_actions)) + if (!empty($context['current_action']) && array_key_exists($context['current_action'], $context['lp_disabled_actions'])) redirectexit(); } } diff --git a/Sources/LightPortal/ManageBlocks.php b/Sources/LightPortal/ManageBlocks.php index 3afd2138b..5a4270afd 100644 --- a/Sources/LightPortal/ManageBlocks.php +++ b/Sources/LightPortal/ManageBlocks.php @@ -11,7 +11,7 @@ * @copyright 2019-2021 Bugo * @license https://spdx.org/licenses/GPL-3.0-or-later.html GPL-3.0-or-later * - * @version 1.7 + * @version 1.8 */ if (!defined('SMF')) diff --git a/Sources/LightPortal/ManagePages.php b/Sources/LightPortal/ManagePages.php index 847b33e0e..873ac1fe6 100644 --- a/Sources/LightPortal/ManagePages.php +++ b/Sources/LightPortal/ManagePages.php @@ -11,7 +11,7 @@ * @copyright 2019-2021 Bugo * @license https://spdx.org/licenses/GPL-3.0-or-later.html GPL-3.0-or-later * - * @version 1.7 + * @version 1.8 */ if (!defined('SMF')) diff --git a/Sources/LightPortal/ManagePlugins.php b/Sources/LightPortal/ManagePlugins.php index af0a9c214..d8cf47eb8 100644 --- a/Sources/LightPortal/ManagePlugins.php +++ b/Sources/LightPortal/ManagePlugins.php @@ -13,7 +13,7 @@ * @copyright 2019-2021 Bugo * @license https://spdx.org/licenses/GPL-3.0-or-later.html GPL-3.0-or-later * - * @version 1.7 + * @version 1.8 */ if (!defined('SMF')) diff --git a/Sources/LightPortal/Notify.php b/Sources/LightPortal/Notify.php index 2e3998050..8be6f9940 100644 --- a/Sources/LightPortal/Notify.php +++ b/Sources/LightPortal/Notify.php @@ -11,7 +11,7 @@ * @copyright 2019-2021 Bugo * @license https://spdx.org/licenses/GPL-3.0-or-later.html GPL-3.0-or-later * - * @version 1.7 + * @version 1.8 */ class Notify extends \SMF_BackgroundTask diff --git a/Sources/LightPortal/Page.php b/Sources/LightPortal/Page.php index 45e315c07..f9ee96c79 100644 --- a/Sources/LightPortal/Page.php +++ b/Sources/LightPortal/Page.php @@ -13,7 +13,7 @@ * @copyright 2019-2021 Bugo * @license https://spdx.org/licenses/GPL-3.0-or-later.html GPL-3.0-or-later * - * @version 1.7 + * @version 1.8 */ if (!defined('SMF')) diff --git a/Sources/LightPortal/PageListInterface.php b/Sources/LightPortal/PageListInterface.php index 2fb9ae1ab..346914378 100644 --- a/Sources/LightPortal/PageListInterface.php +++ b/Sources/LightPortal/PageListInterface.php @@ -11,7 +11,7 @@ * @copyright 2019-2021 Bugo * @license https://spdx.org/licenses/GPL-3.0-or-later.html GPL-3.0-or-later * - * @version 1.7 + * @version 1.8 */ interface PageListInterface diff --git a/Sources/LightPortal/Settings.php b/Sources/LightPortal/Settings.php index 0113c8947..6c864c834 100644 --- a/Sources/LightPortal/Settings.php +++ b/Sources/LightPortal/Settings.php @@ -11,7 +11,7 @@ * @copyright 2019-2021 Bugo * @license https://spdx.org/licenses/GPL-3.0-or-later.html GPL-3.0-or-later * - * @version 1.7 + * @version 1.8 */ if (!defined('SMF')) diff --git a/Sources/LightPortal/Subs.php b/Sources/LightPortal/Subs.php index 1ba3e1de9..0cf1a9e45 100644 --- a/Sources/LightPortal/Subs.php +++ b/Sources/LightPortal/Subs.php @@ -11,7 +11,7 @@ * @copyright 2019-2021 Bugo * @license https://spdx.org/licenses/GPL-3.0-or-later.html GPL-3.0-or-later * - * @version 1.7 + * @version 1.8 */ if (!defined('SMF')) @@ -140,14 +140,14 @@ public static function getActiveBlocks(): array } /** - * Remove unnecessary areas for the standalone mode and return the list of these areas + * Remove unnecessary areas for the standalone mode * - * Удаляем ненужные в автономном режиме области и возвращаем список этих областей + * Удаляем ненужные в автономном режиме области * * @param array $data - * @return array + * @return void */ - public static function unsetDisabledActions(array &$data): array + public static function unsetDisabledActions(array &$data) { global $modSettings, $context; @@ -172,7 +172,7 @@ public static function unsetDisabledActions(array &$data): array if (array_key_exists('mlist', $disabled_actions)) $context['allow_memberlist'] = false; - return $disabled_actions; + $context['lp_disabled_actions'] = $disabled_actions; } /** diff --git a/Sources/LightPortal/Tag.php b/Sources/LightPortal/Tag.php index 345317462..4a76cb1f1 100644 --- a/Sources/LightPortal/Tag.php +++ b/Sources/LightPortal/Tag.php @@ -13,7 +13,7 @@ * @copyright 2019-2021 Bugo * @license https://spdx.org/licenses/GPL-3.0-or-later.html GPL-3.0-or-later * - * @version 1.7 + * @version 1.8 */ if (!defined('SMF')) diff --git a/Sources/LightPortal/addons/AdsBlock/AdsBlock.php b/Sources/LightPortal/addons/AdsBlock/AdsBlock.php index 93e8654c0..c20ba1a94 100644 --- a/Sources/LightPortal/addons/AdsBlock/AdsBlock.php +++ b/Sources/LightPortal/addons/AdsBlock/AdsBlock.php @@ -13,7 +13,7 @@ * @copyright 2019-2021 Bugo * @license https://spdx.org/licenses/GPL-3.0-or-later.html GPL-3.0-or-later * - * @version 1.7 + * @version 1.8 */ if (!defined('SMF')) diff --git a/Sources/LightPortal/addons/ArticleList/ArticleList.php b/Sources/LightPortal/addons/ArticleList/ArticleList.php index 9a84642e8..060955f86 100644 --- a/Sources/LightPortal/addons/ArticleList/ArticleList.php +++ b/Sources/LightPortal/addons/ArticleList/ArticleList.php @@ -13,7 +13,7 @@ * @copyright 2019-2021 Bugo * @license https://spdx.org/licenses/GPL-3.0-or-later.html GPL-3.0-or-later * - * @version 1.7 + * @version 1.8 */ if (!defined('SMF')) diff --git a/Sources/LightPortal/addons/BoardIndex/BoardIndex.php b/Sources/LightPortal/addons/BoardIndex/BoardIndex.php index d3bf733ca..b39a64356 100644 --- a/Sources/LightPortal/addons/BoardIndex/BoardIndex.php +++ b/Sources/LightPortal/addons/BoardIndex/BoardIndex.php @@ -11,7 +11,7 @@ * @copyright 2019-2021 Bugo * @license https://spdx.org/licenses/GPL-3.0-or-later.html GPL-3.0-or-later * - * @version 1.7 + * @version 1.8 */ if (!defined('SMF')) diff --git a/Sources/LightPortal/addons/BoardList/BoardList.php b/Sources/LightPortal/addons/BoardList/BoardList.php index 183a6d48d..ee55f6d8e 100644 --- a/Sources/LightPortal/addons/BoardList/BoardList.php +++ b/Sources/LightPortal/addons/BoardList/BoardList.php @@ -13,7 +13,7 @@ * @copyright 2019-2021 Bugo * @license https://spdx.org/licenses/GPL-3.0-or-later.html GPL-3.0-or-later * - * @version 1.7 + * @version 1.8 */ if (!defined('SMF')) diff --git a/Sources/LightPortal/addons/BoardNews/BoardNews.php b/Sources/LightPortal/addons/BoardNews/BoardNews.php index 0ad8b1f56..bc5df2ad3 100644 --- a/Sources/LightPortal/addons/BoardNews/BoardNews.php +++ b/Sources/LightPortal/addons/BoardNews/BoardNews.php @@ -13,7 +13,7 @@ * @copyright 2019-2021 Bugo * @license https://spdx.org/licenses/GPL-3.0-or-later.html GPL-3.0-or-later * - * @version 1.7 + * @version 1.8 */ if (!defined('SMF')) diff --git a/Sources/LightPortal/addons/BoardStats/BoardStats.php b/Sources/LightPortal/addons/BoardStats/BoardStats.php index 3cd3b2b99..45f0934b5 100644 --- a/Sources/LightPortal/addons/BoardStats/BoardStats.php +++ b/Sources/LightPortal/addons/BoardStats/BoardStats.php @@ -13,7 +13,7 @@ * @copyright 2019-2021 Bugo * @license https://spdx.org/licenses/GPL-3.0-or-later.html GPL-3.0-or-later * - * @version 1.7 + * @version 1.8 */ if (!defined('SMF')) diff --git a/Sources/LightPortal/addons/CodeMirror/CodeMirror.php b/Sources/LightPortal/addons/CodeMirror/CodeMirror.php index 6ce1b510e..c620a89ab 100644 --- a/Sources/LightPortal/addons/CodeMirror/CodeMirror.php +++ b/Sources/LightPortal/addons/CodeMirror/CodeMirror.php @@ -11,7 +11,7 @@ * @copyright 2019-2021 Bugo * @license https://spdx.org/licenses/GPL-3.0-or-later.html GPL-3.0-or-later * - * @version 1.7 + * @version 1.8 */ if (!defined('SMF')) diff --git a/Sources/LightPortal/addons/CurrentMonth/CurrentMonth.php b/Sources/LightPortal/addons/CurrentMonth/CurrentMonth.php index 60d590f8a..a20457df5 100644 --- a/Sources/LightPortal/addons/CurrentMonth/CurrentMonth.php +++ b/Sources/LightPortal/addons/CurrentMonth/CurrentMonth.php @@ -13,7 +13,7 @@ * @copyright 2019-2021 Bugo * @license https://spdx.org/licenses/GPL-3.0-or-later.html GPL-3.0-or-later * - * @version 1.7 + * @version 1.8 */ if (!defined('SMF')) diff --git a/Sources/LightPortal/addons/DevTools/DevTools.php b/Sources/LightPortal/addons/DevTools/DevTools.php index 28a60be1c..4fac88d6e 100644 --- a/Sources/LightPortal/addons/DevTools/DevTools.php +++ b/Sources/LightPortal/addons/DevTools/DevTools.php @@ -14,7 +14,7 @@ * @copyright 2019-2021 Bugo * @license https://spdx.org/licenses/GPL-3.0-or-later.html GPL-3.0-or-later * - * @version 1.7 + * @version 1.8 */ if (!defined('SMF')) diff --git a/Sources/LightPortal/addons/DevTools/Lorem.php b/Sources/LightPortal/addons/DevTools/Lorem.php index ab23c7b87..bcd68f1d7 100644 --- a/Sources/LightPortal/addons/DevTools/Lorem.php +++ b/Sources/LightPortal/addons/DevTools/Lorem.php @@ -11,7 +11,7 @@ * @copyright 2019-2021 Bugo * @license https://spdx.org/licenses/GPL-3.0-or-later.html GPL-3.0-or-later * - * @version 1.7 + * @version 1.8 */ /** diff --git a/Sources/LightPortal/addons/Disqus/Disqus.php b/Sources/LightPortal/addons/Disqus/Disqus.php index 90f1f34f8..feeaa72dc 100644 --- a/Sources/LightPortal/addons/Disqus/Disqus.php +++ b/Sources/LightPortal/addons/Disqus/Disqus.php @@ -11,7 +11,7 @@ * @copyright 2019-2021 Bugo * @license https://spdx.org/licenses/GPL-3.0-or-later.html GPL-3.0-or-later * - * @version 1.7 + * @version 1.8 */ if (!defined('SMF')) diff --git a/Sources/LightPortal/addons/EasyMarkdownEditor/EasyMarkdownEditor.php b/Sources/LightPortal/addons/EasyMarkdownEditor/EasyMarkdownEditor.php index 971e36136..37a35d893 100644 --- a/Sources/LightPortal/addons/EasyMarkdownEditor/EasyMarkdownEditor.php +++ b/Sources/LightPortal/addons/EasyMarkdownEditor/EasyMarkdownEditor.php @@ -11,7 +11,7 @@ * @copyright 2019-2021 Bugo * @license https://spdx.org/licenses/GPL-3.0-or-later.html GPL-3.0-or-later * - * @version 1.7 + * @version 1.8 */ if (!defined('SMF')) diff --git a/Sources/LightPortal/addons/EhPortal/EhPortal.php b/Sources/LightPortal/addons/EhPortal/EhPortal.php index fda01f9bf..59ec72844 100644 --- a/Sources/LightPortal/addons/EhPortal/EhPortal.php +++ b/Sources/LightPortal/addons/EhPortal/EhPortal.php @@ -11,7 +11,7 @@ * @copyright 2019-2021 Bugo * @license https://spdx.org/licenses/GPL-3.0-or-later.html GPL-3.0-or-later * - * @version 1.7 + * @version 1.8 */ if (!defined('SMF')) diff --git a/Sources/LightPortal/addons/EhPortal/Import.php b/Sources/LightPortal/addons/EhPortal/Import.php index c2cd9d368..d3940bb64 100644 --- a/Sources/LightPortal/addons/EhPortal/Import.php +++ b/Sources/LightPortal/addons/EhPortal/Import.php @@ -14,7 +14,7 @@ * @copyright 2019-2021 Bugo * @license https://spdx.org/licenses/GPL-3.0-or-later.html GPL-3.0-or-later * - * @version 1.7 + * @version 1.8 */ if (!defined('SMF')) diff --git a/Sources/LightPortal/addons/EzPortal/EzPortal.php b/Sources/LightPortal/addons/EzPortal/EzPortal.php index 8c4b4f021..244e166f7 100644 --- a/Sources/LightPortal/addons/EzPortal/EzPortal.php +++ b/Sources/LightPortal/addons/EzPortal/EzPortal.php @@ -11,7 +11,7 @@ * @copyright 2019-2021 Bugo * @license https://spdx.org/licenses/GPL-3.0-or-later.html GPL-3.0-or-later * - * @version 1.7 + * @version 1.8 */ if (!defined('SMF')) diff --git a/Sources/LightPortal/addons/EzPortal/Import.php b/Sources/LightPortal/addons/EzPortal/Import.php index 96fab023f..58702d3d7 100644 --- a/Sources/LightPortal/addons/EzPortal/Import.php +++ b/Sources/LightPortal/addons/EzPortal/Import.php @@ -14,7 +14,7 @@ * @copyright 2019-2021 Bugo * @license https://spdx.org/licenses/GPL-3.0-or-later.html GPL-3.0-or-later * - * @version 1.7 + * @version 1.8 */ if (!defined('SMF')) diff --git a/Sources/LightPortal/addons/FaBoardIcons/FaBoardIcons.php b/Sources/LightPortal/addons/FaBoardIcons/FaBoardIcons.php index eac7989a2..cf7d5a7d2 100644 --- a/Sources/LightPortal/addons/FaBoardIcons/FaBoardIcons.php +++ b/Sources/LightPortal/addons/FaBoardIcons/FaBoardIcons.php @@ -11,7 +11,7 @@ * @copyright 2019-2021 Bugo * @license https://spdx.org/licenses/GPL-3.0-or-later.html GPL-3.0-or-later * - * @version 1.7 + * @version 1.8 */ if (!defined('SMF')) diff --git a/Sources/LightPortal/addons/FacebookComments/FacebookComments.php b/Sources/LightPortal/addons/FacebookComments/FacebookComments.php index bbbeeeec1..21259563a 100644 --- a/Sources/LightPortal/addons/FacebookComments/FacebookComments.php +++ b/Sources/LightPortal/addons/FacebookComments/FacebookComments.php @@ -13,7 +13,7 @@ * @copyright 2019-2021 Bugo * @license https://spdx.org/licenses/GPL-3.0-or-later.html GPL-3.0-or-later * - * @version 1.7 + * @version 1.8 */ if (!defined('SMF')) diff --git a/Sources/LightPortal/addons/FlarumStyle/FlarumStyle.php b/Sources/LightPortal/addons/FlarumStyle/FlarumStyle.php index 08825a3cf..57f1a05aa 100644 --- a/Sources/LightPortal/addons/FlarumStyle/FlarumStyle.php +++ b/Sources/LightPortal/addons/FlarumStyle/FlarumStyle.php @@ -13,7 +13,7 @@ * @copyright 2019-2021 Bugo * @license https://spdx.org/licenses/GPL-3.0-or-later.html GPL-3.0-or-later * - * @version 1.7 + * @version 1.8 */ if (!defined('SMF')) diff --git a/Sources/LightPortal/addons/HidingBlocks/HidingBlocks.php b/Sources/LightPortal/addons/HidingBlocks/HidingBlocks.php index f5fdecbfe..400bc5250 100644 --- a/Sources/LightPortal/addons/HidingBlocks/HidingBlocks.php +++ b/Sources/LightPortal/addons/HidingBlocks/HidingBlocks.php @@ -11,7 +11,7 @@ * @copyright 2019-2021 Bugo * @license https://spdx.org/licenses/GPL-3.0-or-later.html GPL-3.0-or-later * - * @version 1.7 + * @version 1.8 */ if (!defined('SMF')) diff --git a/Sources/LightPortal/addons/InstagramFeed/InstagramFeed.php b/Sources/LightPortal/addons/InstagramFeed/InstagramFeed.php index d29a071df..5660c19d5 100644 --- a/Sources/LightPortal/addons/InstagramFeed/InstagramFeed.php +++ b/Sources/LightPortal/addons/InstagramFeed/InstagramFeed.php @@ -11,7 +11,7 @@ * @copyright 2019-2021 Bugo * @license https://spdx.org/licenses/GPL-3.0-or-later.html GPL-3.0-or-later * - * @version 1.7 + * @version 1.8 */ if (!defined('SMF')) diff --git a/Sources/LightPortal/addons/KarmaPostRating/KarmaPostRating.php b/Sources/LightPortal/addons/KarmaPostRating/KarmaPostRating.php index 21118ba2b..8f810ad4c 100644 --- a/Sources/LightPortal/addons/KarmaPostRating/KarmaPostRating.php +++ b/Sources/LightPortal/addons/KarmaPostRating/KarmaPostRating.php @@ -11,7 +11,7 @@ * @copyright 2019-2021 Bugo * @license https://spdx.org/licenses/GPL-3.0-or-later.html GPL-3.0-or-later * - * @version 1.7 + * @version 1.8 */ if (!defined('SMF')) diff --git a/Sources/LightPortal/addons/LanguageAccess/LanguageAccess.php b/Sources/LightPortal/addons/LanguageAccess/LanguageAccess.php index 878831fc4..fad157607 100644 --- a/Sources/LightPortal/addons/LanguageAccess/LanguageAccess.php +++ b/Sources/LightPortal/addons/LanguageAccess/LanguageAccess.php @@ -11,7 +11,7 @@ * @copyright 2019-2021 Bugo * @license https://spdx.org/licenses/GPL-3.0-or-later.html GPL-3.0-or-later * - * @version 1.7 + * @version 1.8 */ if (!defined('SMF')) diff --git a/Sources/LightPortal/addons/Likely/Likely.php b/Sources/LightPortal/addons/Likely/Likely.php index 04ac1f906..b171dc591 100644 --- a/Sources/LightPortal/addons/Likely/Likely.php +++ b/Sources/LightPortal/addons/Likely/Likely.php @@ -11,7 +11,7 @@ * @copyright 2019-2021 Bugo * @license https://spdx.org/licenses/GPL-3.0-or-later.html GPL-3.0-or-later * - * @version 1.7 + * @version 1.8 */ if (!defined('SMF')) diff --git a/Sources/LightPortal/addons/Markdown/Markdown.php b/Sources/LightPortal/addons/Markdown/Markdown.php index dd97df883..cbc343b8e 100644 --- a/Sources/LightPortal/addons/Markdown/Markdown.php +++ b/Sources/LightPortal/addons/Markdown/Markdown.php @@ -11,7 +11,7 @@ * @copyright 2019-2021 Bugo * @license https://spdx.org/licenses/GPL-3.0-or-later.html GPL-3.0-or-later * - * @version 1.7 + * @version 1.8 */ if (!defined('SMF')) diff --git a/Sources/LightPortal/addons/Markdown/Michelf/MarkdownSMF.php b/Sources/LightPortal/addons/Markdown/Michelf/MarkdownSMF.php index ebd99eb42..612488664 100644 --- a/Sources/LightPortal/addons/Markdown/Michelf/MarkdownSMF.php +++ b/Sources/LightPortal/addons/Markdown/Michelf/MarkdownSMF.php @@ -11,7 +11,7 @@ * @copyright 2019-2021 Bugo * @license https://spdx.org/licenses/GPL-3.0-or-later.html GPL-3.0-or-later * - * @version 1.7 + * @version 1.8 */ class MarkdownSMF extends \Michelf\MarkdownExtra diff --git a/Sources/LightPortal/addons/News/News.php b/Sources/LightPortal/addons/News/News.php index cdc83635c..d5a181a23 100644 --- a/Sources/LightPortal/addons/News/News.php +++ b/Sources/LightPortal/addons/News/News.php @@ -11,7 +11,7 @@ * @copyright 2019-2021 Bugo * @license https://spdx.org/licenses/GPL-3.0-or-later.html GPL-3.0-or-later * - * @version 1.7 + * @version 1.8 */ if (!defined('SMF')) diff --git a/Sources/LightPortal/addons/Optimus/Optimus.php b/Sources/LightPortal/addons/Optimus/Optimus.php index 695aa9fda..471d48dd7 100644 --- a/Sources/LightPortal/addons/Optimus/Optimus.php +++ b/Sources/LightPortal/addons/Optimus/Optimus.php @@ -13,7 +13,7 @@ * @copyright 2019-2021 Bugo * @license https://spdx.org/licenses/GPL-3.0-or-later.html GPL-3.0-or-later * - * @version 1.7 + * @version 1.8 */ if (!defined('SMF')) diff --git a/Sources/LightPortal/addons/PageList/PageList.php b/Sources/LightPortal/addons/PageList/PageList.php index a84ba28ee..cb60c8cf0 100644 --- a/Sources/LightPortal/addons/PageList/PageList.php +++ b/Sources/LightPortal/addons/PageList/PageList.php @@ -13,7 +13,7 @@ * @copyright 2019-2021 Bugo * @license https://spdx.org/licenses/GPL-3.0-or-later.html GPL-3.0-or-later * - * @version 1.7 + * @version 1.8 */ if (!defined('SMF')) diff --git a/Sources/LightPortal/addons/Polls/Polls.php b/Sources/LightPortal/addons/Polls/Polls.php index 631f4d7dc..80c77d9a8 100644 --- a/Sources/LightPortal/addons/Polls/Polls.php +++ b/Sources/LightPortal/addons/Polls/Polls.php @@ -11,7 +11,7 @@ * @copyright 2019-2021 Bugo * @license https://spdx.org/licenses/GPL-3.0-or-later.html GPL-3.0-or-later * - * @version 1.7 + * @version 1.8 */ if (!defined('SMF')) diff --git a/Sources/LightPortal/addons/PrettyUrls/PrettyUrls.php b/Sources/LightPortal/addons/PrettyUrls/PrettyUrls.php index b3b4f7c98..1b970a858 100644 --- a/Sources/LightPortal/addons/PrettyUrls/PrettyUrls.php +++ b/Sources/LightPortal/addons/PrettyUrls/PrettyUrls.php @@ -11,7 +11,7 @@ * @copyright 2019-2021 Bugo * @license https://spdx.org/licenses/GPL-3.0-or-later.html GPL-3.0-or-later * - * @version 1.7 + * @version 1.8 */ if (!defined('SMF')) diff --git a/Sources/LightPortal/addons/RandomTopics/RandomTopics.php b/Sources/LightPortal/addons/RandomTopics/RandomTopics.php index 1fe923031..f33ee25ba 100644 --- a/Sources/LightPortal/addons/RandomTopics/RandomTopics.php +++ b/Sources/LightPortal/addons/RandomTopics/RandomTopics.php @@ -13,7 +13,7 @@ * @copyright 2019-2021 Bugo * @license https://spdx.org/licenses/GPL-3.0-or-later.html GPL-3.0-or-later * - * @version 1.7 + * @version 1.8 */ if (!defined('SMF')) diff --git a/Sources/LightPortal/addons/RecentAttachments/RecentAttachments.php b/Sources/LightPortal/addons/RecentAttachments/RecentAttachments.php index 29a3709fa..4bdea5dbd 100644 --- a/Sources/LightPortal/addons/RecentAttachments/RecentAttachments.php +++ b/Sources/LightPortal/addons/RecentAttachments/RecentAttachments.php @@ -13,7 +13,7 @@ * @copyright 2019-2021 Bugo * @license https://spdx.org/licenses/GPL-3.0-or-later.html GPL-3.0-or-later * - * @version 1.7 + * @version 1.8 */ if (!defined('SMF')) diff --git a/Sources/LightPortal/addons/RecentPosts/RecentPosts.php b/Sources/LightPortal/addons/RecentPosts/RecentPosts.php index ba1b5dc52..76506d95a 100644 --- a/Sources/LightPortal/addons/RecentPosts/RecentPosts.php +++ b/Sources/LightPortal/addons/RecentPosts/RecentPosts.php @@ -13,7 +13,7 @@ * @copyright 2019-2021 Bugo * @license https://spdx.org/licenses/GPL-3.0-or-later.html GPL-3.0-or-later * - * @version 1.7 + * @version 1.8 */ if (!defined('SMF')) diff --git a/Sources/LightPortal/addons/RecentTopics/RecentTopics.php b/Sources/LightPortal/addons/RecentTopics/RecentTopics.php index 55a1d0e23..b879dbe9a 100644 --- a/Sources/LightPortal/addons/RecentTopics/RecentTopics.php +++ b/Sources/LightPortal/addons/RecentTopics/RecentTopics.php @@ -13,7 +13,7 @@ * @copyright 2019-2021 Bugo * @license https://spdx.org/licenses/GPL-3.0-or-later.html GPL-3.0-or-later * - * @version 1.7 + * @version 1.8 */ if (!defined('SMF')) diff --git a/Sources/LightPortal/addons/RssFeed/RssFeed.php b/Sources/LightPortal/addons/RssFeed/RssFeed.php index 763df1644..f11a45e5e 100644 --- a/Sources/LightPortal/addons/RssFeed/RssFeed.php +++ b/Sources/LightPortal/addons/RssFeed/RssFeed.php @@ -13,7 +13,7 @@ * @copyright 2019-2021 Bugo * @license https://spdx.org/licenses/GPL-3.0-or-later.html GPL-3.0-or-later * - * @version 1.7 + * @version 1.8 */ if (!defined('SMF')) diff --git a/Sources/LightPortal/addons/Search/Search.php b/Sources/LightPortal/addons/Search/Search.php index ee0df3157..979344ff0 100644 --- a/Sources/LightPortal/addons/Search/Search.php +++ b/Sources/LightPortal/addons/Search/Search.php @@ -13,7 +13,7 @@ * @copyright 2019-2021 Bugo * @license https://spdx.org/licenses/GPL-3.0-or-later.html GPL-3.0-or-later * - * @version 1.7 + * @version 1.8 */ if (!defined('SMF')) diff --git a/Sources/LightPortal/addons/TagList/TagList.php b/Sources/LightPortal/addons/TagList/TagList.php index 727477fff..b1a070477 100644 --- a/Sources/LightPortal/addons/TagList/TagList.php +++ b/Sources/LightPortal/addons/TagList/TagList.php @@ -13,7 +13,7 @@ * @copyright 2019-2021 Bugo * @license https://spdx.org/licenses/GPL-3.0-or-later.html GPL-3.0-or-later * - * @version 1.7 + * @version 1.8 */ if (!defined('SMF')) diff --git a/Sources/LightPortal/addons/ThemeSwitcher/ThemeSwitcher.php b/Sources/LightPortal/addons/ThemeSwitcher/ThemeSwitcher.php index 38c8d086d..88cd21244 100644 --- a/Sources/LightPortal/addons/ThemeSwitcher/ThemeSwitcher.php +++ b/Sources/LightPortal/addons/ThemeSwitcher/ThemeSwitcher.php @@ -13,7 +13,7 @@ * @copyright 2019-2021 Bugo * @license https://spdx.org/licenses/GPL-3.0-or-later.html GPL-3.0-or-later * - * @version 1.7 + * @version 1.8 */ if (!defined('SMF')) diff --git a/Sources/LightPortal/addons/TinyPortal/BlockImport.php b/Sources/LightPortal/addons/TinyPortal/BlockImport.php index 32ed1cc4d..a0a05fbb4 100644 --- a/Sources/LightPortal/addons/TinyPortal/BlockImport.php +++ b/Sources/LightPortal/addons/TinyPortal/BlockImport.php @@ -14,7 +14,7 @@ * @copyright 2019-2021 Bugo * @license https://spdx.org/licenses/GPL-3.0-or-later.html GPL-3.0-or-later * - * @version 1.7 + * @version 1.8 */ if (!defined('SMF')) diff --git a/Sources/LightPortal/addons/TinyPortal/PageImport.php b/Sources/LightPortal/addons/TinyPortal/PageImport.php index c2ebce738..47cca1039 100644 --- a/Sources/LightPortal/addons/TinyPortal/PageImport.php +++ b/Sources/LightPortal/addons/TinyPortal/PageImport.php @@ -14,7 +14,7 @@ * @copyright 2019-2021 Bugo * @license https://spdx.org/licenses/GPL-3.0-or-later.html GPL-3.0-or-later * - * @version 1.7 + * @version 1.8 */ if (!defined('SMF')) diff --git a/Sources/LightPortal/addons/TinyPortal/TinyPortal.php b/Sources/LightPortal/addons/TinyPortal/TinyPortal.php index b89754d55..15a6c6248 100644 --- a/Sources/LightPortal/addons/TinyPortal/TinyPortal.php +++ b/Sources/LightPortal/addons/TinyPortal/TinyPortal.php @@ -11,7 +11,7 @@ * @copyright 2019-2021 Bugo * @license https://spdx.org/licenses/GPL-3.0-or-later.html GPL-3.0-or-later * - * @version 1.7 + * @version 1.8 */ if (!defined('SMF')) diff --git a/Sources/LightPortal/addons/TinySlider/TinySlider.php b/Sources/LightPortal/addons/TinySlider/TinySlider.php index 431d2751c..a370a9c3b 100644 --- a/Sources/LightPortal/addons/TinySlider/TinySlider.php +++ b/Sources/LightPortal/addons/TinySlider/TinySlider.php @@ -13,7 +13,7 @@ * @copyright 2019-2021 Bugo * @license https://spdx.org/licenses/GPL-3.0-or-later.html GPL-3.0-or-later * - * @version 1.7 + * @version 1.8 */ if (!defined('SMF')) diff --git a/Sources/LightPortal/addons/Todays/Todays.php b/Sources/LightPortal/addons/Todays/Todays.php index 0efca313a..8f74cee1e 100644 --- a/Sources/LightPortal/addons/Todays/Todays.php +++ b/Sources/LightPortal/addons/Todays/Todays.php @@ -13,7 +13,7 @@ * @copyright 2019-2021 Bugo * @license https://spdx.org/licenses/GPL-3.0-or-later.html GPL-3.0-or-later * - * @version 1.7 + * @version 1.8 */ if (!defined('SMF')) diff --git a/Sources/LightPortal/addons/TopBoards/TopBoards.php b/Sources/LightPortal/addons/TopBoards/TopBoards.php index 5c12e5766..45023f895 100644 --- a/Sources/LightPortal/addons/TopBoards/TopBoards.php +++ b/Sources/LightPortal/addons/TopBoards/TopBoards.php @@ -13,7 +13,7 @@ * @copyright 2019-2021 Bugo * @license https://spdx.org/licenses/GPL-3.0-or-later.html GPL-3.0-or-later * - * @version 1.7 + * @version 1.8 */ if (!defined('SMF')) diff --git a/Sources/LightPortal/addons/TopPages/TopPages.php b/Sources/LightPortal/addons/TopPages/TopPages.php index 11368f9e6..6663000d9 100644 --- a/Sources/LightPortal/addons/TopPages/TopPages.php +++ b/Sources/LightPortal/addons/TopPages/TopPages.php @@ -13,7 +13,7 @@ * @copyright 2019-2021 Bugo * @license https://spdx.org/licenses/GPL-3.0-or-later.html GPL-3.0-or-later * - * @version 1.7 + * @version 1.8 */ if (!defined('SMF')) diff --git a/Sources/LightPortal/addons/TopPosters/TopPosters.php b/Sources/LightPortal/addons/TopPosters/TopPosters.php index a0dbe77cb..43d797b68 100644 --- a/Sources/LightPortal/addons/TopPosters/TopPosters.php +++ b/Sources/LightPortal/addons/TopPosters/TopPosters.php @@ -13,7 +13,7 @@ * @copyright 2019-2021 Bugo * @license https://spdx.org/licenses/GPL-3.0-or-later.html GPL-3.0-or-later * - * @version 1.7 + * @version 1.8 */ if (!defined('SMF')) diff --git a/Sources/LightPortal/addons/TopTopics/TopTopics.php b/Sources/LightPortal/addons/TopTopics/TopTopics.php index 4460265af..bf0b3de4c 100644 --- a/Sources/LightPortal/addons/TopTopics/TopTopics.php +++ b/Sources/LightPortal/addons/TopTopics/TopTopics.php @@ -13,7 +13,7 @@ * @copyright 2019-2021 Bugo * @license https://spdx.org/licenses/GPL-3.0-or-later.html GPL-3.0-or-later * - * @version 1.7 + * @version 1.8 */ if (!defined('SMF')) diff --git a/Sources/LightPortal/addons/TopicRatingBar/TopicRatingBar.php b/Sources/LightPortal/addons/TopicRatingBar/TopicRatingBar.php index 8cb463017..431fc88e0 100644 --- a/Sources/LightPortal/addons/TopicRatingBar/TopicRatingBar.php +++ b/Sources/LightPortal/addons/TopicRatingBar/TopicRatingBar.php @@ -11,7 +11,7 @@ * @copyright 2019-2021 Bugo * @license https://spdx.org/licenses/GPL-3.0-or-later.html GPL-3.0-or-later * - * @version 1.7 + * @version 1.8 */ if (!defined('SMF')) diff --git a/Sources/LightPortal/addons/Translator/Translator.php b/Sources/LightPortal/addons/Translator/Translator.php index 154e383ef..c7ac83b2a 100644 --- a/Sources/LightPortal/addons/Translator/Translator.php +++ b/Sources/LightPortal/addons/Translator/Translator.php @@ -11,7 +11,7 @@ * @copyright 2019-2021 Bugo * @license https://spdx.org/licenses/GPL-3.0-or-later.html GPL-3.0-or-later * - * @version 1.7 + * @version 1.8 */ if (!defined('SMF')) diff --git a/Sources/LightPortal/addons/Trumbowyg/Trumbowyg.php b/Sources/LightPortal/addons/Trumbowyg/Trumbowyg.php index 5dc66dda0..be42440bc 100644 --- a/Sources/LightPortal/addons/Trumbowyg/Trumbowyg.php +++ b/Sources/LightPortal/addons/Trumbowyg/Trumbowyg.php @@ -13,7 +13,7 @@ * @copyright 2019-2021 Bugo * @license https://spdx.org/licenses/GPL-3.0-or-later.html GPL-3.0-or-later * - * @version 1.7 + * @version 1.8 */ if (!defined('SMF')) diff --git a/Sources/LightPortal/addons/UserInfo/UserInfo.php b/Sources/LightPortal/addons/UserInfo/UserInfo.php index 9672318a4..5867e8147 100644 --- a/Sources/LightPortal/addons/UserInfo/UserInfo.php +++ b/Sources/LightPortal/addons/UserInfo/UserInfo.php @@ -13,7 +13,7 @@ * @copyright 2019-2021 Bugo * @license https://spdx.org/licenses/GPL-3.0-or-later.html GPL-3.0-or-later * - * @version 1.7 + * @version 1.8 */ if (!defined('SMF')) diff --git a/Sources/LightPortal/addons/VkComments/VkComments.php b/Sources/LightPortal/addons/VkComments/VkComments.php index 367bfa182..a48fc2bd2 100644 --- a/Sources/LightPortal/addons/VkComments/VkComments.php +++ b/Sources/LightPortal/addons/VkComments/VkComments.php @@ -11,7 +11,7 @@ * @copyright 2019-2021 Bugo * @license https://spdx.org/licenses/GPL-3.0-or-later.html GPL-3.0-or-later * - * @version 1.7 + * @version 1.8 */ if (!defined('SMF')) diff --git a/Sources/LightPortal/addons/WhosOnline/WhosOnline.php b/Sources/LightPortal/addons/WhosOnline/WhosOnline.php index 87b1fd561..48103f934 100644 --- a/Sources/LightPortal/addons/WhosOnline/WhosOnline.php +++ b/Sources/LightPortal/addons/WhosOnline/WhosOnline.php @@ -13,7 +13,7 @@ * @copyright 2019-2021 Bugo * @license https://spdx.org/licenses/GPL-3.0-or-later.html GPL-3.0-or-later * - * @version 1.7 + * @version 1.8 */ if (!defined('SMF')) diff --git a/Sources/LightPortal/front/AbstractArticle.php b/Sources/LightPortal/front/AbstractArticle.php index 18ebd9790..5c52d8b3c 100644 --- a/Sources/LightPortal/front/AbstractArticle.php +++ b/Sources/LightPortal/front/AbstractArticle.php @@ -11,7 +11,7 @@ * @copyright 2019-2021 Bugo * @license https://spdx.org/licenses/GPL-3.0-or-later.html GPL-3.0-or-later * - * @version 1.7 + * @version 1.8 */ if (!defined('SMF')) diff --git a/Sources/LightPortal/front/BoardArticle.php b/Sources/LightPortal/front/BoardArticle.php index 79b07f631..b0585e8f6 100644 --- a/Sources/LightPortal/front/BoardArticle.php +++ b/Sources/LightPortal/front/BoardArticle.php @@ -13,7 +13,7 @@ * @copyright 2019-2021 Bugo * @license https://spdx.org/licenses/GPL-3.0-or-later.html GPL-3.0-or-later * - * @version 1.7 + * @version 1.8 */ if (!defined('SMF')) diff --git a/Sources/LightPortal/front/ChosenPageArticle.php b/Sources/LightPortal/front/ChosenPageArticle.php index 178c490df..146634baa 100644 --- a/Sources/LightPortal/front/ChosenPageArticle.php +++ b/Sources/LightPortal/front/ChosenPageArticle.php @@ -13,7 +13,7 @@ * @copyright 2019-2021 Bugo * @license https://spdx.org/licenses/GPL-3.0-or-later.html GPL-3.0-or-later * - * @version 1.7 + * @version 1.8 */ if (!defined('SMF')) diff --git a/Sources/LightPortal/front/ChosenTopicArticle.php b/Sources/LightPortal/front/ChosenTopicArticle.php index 2de6d26a4..5b518652b 100644 --- a/Sources/LightPortal/front/ChosenTopicArticle.php +++ b/Sources/LightPortal/front/ChosenTopicArticle.php @@ -13,7 +13,7 @@ * @copyright 2019-2021 Bugo * @license https://spdx.org/licenses/GPL-3.0-or-later.html GPL-3.0-or-later * - * @version 1.7 + * @version 1.8 */ if (!defined('SMF')) diff --git a/Sources/LightPortal/front/PageArticle.php b/Sources/LightPortal/front/PageArticle.php index fd8fd473c..af5082281 100644 --- a/Sources/LightPortal/front/PageArticle.php +++ b/Sources/LightPortal/front/PageArticle.php @@ -14,7 +14,7 @@ * @copyright 2019-2021 Bugo * @license https://spdx.org/licenses/GPL-3.0-or-later.html GPL-3.0-or-later * - * @version 1.7 + * @version 1.8 */ if (!defined('SMF')) diff --git a/Sources/LightPortal/front/TopicArticle.php b/Sources/LightPortal/front/TopicArticle.php index 2854a7710..43265d898 100644 --- a/Sources/LightPortal/front/TopicArticle.php +++ b/Sources/LightPortal/front/TopicArticle.php @@ -14,7 +14,7 @@ * @copyright 2019-2021 Bugo * @license https://spdx.org/licenses/GPL-3.0-or-later.html GPL-3.0-or-later * - * @version 1.7 + * @version 1.8 */ if (!defined('SMF')) diff --git a/Sources/LightPortal/impex/AbstractExport.php b/Sources/LightPortal/impex/AbstractExport.php index 296bf2924..e0f0b126d 100644 --- a/Sources/LightPortal/impex/AbstractExport.php +++ b/Sources/LightPortal/impex/AbstractExport.php @@ -11,7 +11,7 @@ * @copyright 2019-2021 Bugo * @license https://spdx.org/licenses/GPL-3.0-or-later.html GPL-3.0-or-later * - * @version 1.7 + * @version 1.8 */ abstract class AbstractExport implements ExportInterface diff --git a/Sources/LightPortal/impex/AbstractImport.php b/Sources/LightPortal/impex/AbstractImport.php index 0e68e39f6..bd3277e3f 100644 --- a/Sources/LightPortal/impex/AbstractImport.php +++ b/Sources/LightPortal/impex/AbstractImport.php @@ -11,7 +11,7 @@ * @copyright 2019-2021 Bugo * @license https://spdx.org/licenses/GPL-3.0-or-later.html GPL-3.0-or-later * - * @version 1.7 + * @version 1.8 */ abstract class AbstractImport implements ImportInterface diff --git a/Sources/LightPortal/impex/BlockExport.php b/Sources/LightPortal/impex/BlockExport.php index 25ce8f5b0..a7add8c54 100644 --- a/Sources/LightPortal/impex/BlockExport.php +++ b/Sources/LightPortal/impex/BlockExport.php @@ -13,7 +13,7 @@ * @copyright 2019-2021 Bugo * @license https://spdx.org/licenses/GPL-3.0-or-later.html GPL-3.0-or-later * - * @version 1.7 + * @version 1.8 */ if (!defined('SMF')) diff --git a/Sources/LightPortal/impex/BlockImport.php b/Sources/LightPortal/impex/BlockImport.php index 171a1e078..da7c4b5cc 100644 --- a/Sources/LightPortal/impex/BlockImport.php +++ b/Sources/LightPortal/impex/BlockImport.php @@ -13,7 +13,7 @@ * @copyright 2019-2021 Bugo * @license https://spdx.org/licenses/GPL-3.0-or-later.html GPL-3.0-or-later * - * @version 1.7 + * @version 1.8 */ if (!defined('SMF')) diff --git a/Sources/LightPortal/impex/ExportInterface.php b/Sources/LightPortal/impex/ExportInterface.php index 14b673876..93d1da7c2 100644 --- a/Sources/LightPortal/impex/ExportInterface.php +++ b/Sources/LightPortal/impex/ExportInterface.php @@ -11,7 +11,7 @@ * @copyright 2019-2021 Bugo * @license https://spdx.org/licenses/GPL-3.0-or-later.html GPL-3.0-or-later * - * @version 1.7 + * @version 1.8 */ interface ExportInterface diff --git a/Sources/LightPortal/impex/ImportInterface.php b/Sources/LightPortal/impex/ImportInterface.php index 0b1324171..e2d6b1718 100644 --- a/Sources/LightPortal/impex/ImportInterface.php +++ b/Sources/LightPortal/impex/ImportInterface.php @@ -11,7 +11,7 @@ * @copyright 2019-2021 Bugo * @license https://spdx.org/licenses/GPL-3.0-or-later.html GPL-3.0-or-later * - * @version 1.7 + * @version 1.8 */ interface ImportInterface diff --git a/Sources/LightPortal/impex/PageExport.php b/Sources/LightPortal/impex/PageExport.php index 27e3b30af..57d5805a4 100644 --- a/Sources/LightPortal/impex/PageExport.php +++ b/Sources/LightPortal/impex/PageExport.php @@ -13,7 +13,7 @@ * @copyright 2019-2021 Bugo * @license https://spdx.org/licenses/GPL-3.0-or-later.html GPL-3.0-or-later * - * @version 1.7 + * @version 1.8 */ if (!defined('SMF')) diff --git a/Sources/LightPortal/impex/PageImport.php b/Sources/LightPortal/impex/PageImport.php index 04ec60f06..b09165a6f 100644 --- a/Sources/LightPortal/impex/PageImport.php +++ b/Sources/LightPortal/impex/PageImport.php @@ -13,7 +13,7 @@ * @copyright 2019-2021 Bugo * @license https://spdx.org/licenses/GPL-3.0-or-later.html GPL-3.0-or-later * - * @version 1.7 + * @version 1.8 */ if (!defined('SMF')) diff --git a/Sources/LightPortal/utils/AbstractArray.php b/Sources/LightPortal/utils/AbstractArray.php index 9180d5cb8..16bf8f73f 100644 --- a/Sources/LightPortal/utils/AbstractArray.php +++ b/Sources/LightPortal/utils/AbstractArray.php @@ -11,7 +11,7 @@ * @copyright 2019-2021 Bugo * @license https://spdx.org/licenses/GPL-3.0-or-later.html GPL-3.0-or-later * - * @version 1.7 + * @version 1.8 */ abstract class AbstractArray diff --git a/Sources/LightPortal/utils/Cache.php b/Sources/LightPortal/utils/Cache.php index eb7accc02..002c91a2b 100644 --- a/Sources/LightPortal/utils/Cache.php +++ b/Sources/LightPortal/utils/Cache.php @@ -11,7 +11,7 @@ * @copyright 2019-2021 Bugo * @license https://spdx.org/licenses/GPL-3.0-or-later.html GPL-3.0-or-later * - * @version 1.7 + * @version 1.8 */ if (!defined('SMF')) diff --git a/Sources/LightPortal/utils/Post.php b/Sources/LightPortal/utils/Post.php index aaead703f..61d9792f8 100644 --- a/Sources/LightPortal/utils/Post.php +++ b/Sources/LightPortal/utils/Post.php @@ -11,7 +11,7 @@ * @copyright 2019-2021 Bugo * @license https://spdx.org/licenses/GPL-3.0-or-later.html GPL-3.0-or-later * - * @version 1.7 + * @version 1.8 */ class Post extends AbstractArray diff --git a/Sources/LightPortal/utils/Request.php b/Sources/LightPortal/utils/Request.php index dbed66dad..313c6fc06 100644 --- a/Sources/LightPortal/utils/Request.php +++ b/Sources/LightPortal/utils/Request.php @@ -11,7 +11,7 @@ * @copyright 2019-2021 Bugo * @license https://spdx.org/licenses/GPL-3.0-or-later.html GPL-3.0-or-later * - * @version 1.7 + * @version 1.8 */ class Request extends AbstractArray diff --git a/Sources/LightPortal/utils/Server.php b/Sources/LightPortal/utils/Server.php index 19a53e5fa..5613594f9 100644 --- a/Sources/LightPortal/utils/Server.php +++ b/Sources/LightPortal/utils/Server.php @@ -11,7 +11,7 @@ * @copyright 2019-2021 Bugo * @license https://spdx.org/licenses/GPL-3.0-or-later.html GPL-3.0-or-later * - * @version 1.7 + * @version 1.8 */ class Server extends AbstractArray diff --git a/Sources/LightPortal/utils/Session.php b/Sources/LightPortal/utils/Session.php index f1f9f3f76..6d508e9b1 100644 --- a/Sources/LightPortal/utils/Session.php +++ b/Sources/LightPortal/utils/Session.php @@ -11,7 +11,7 @@ * @copyright 2019-2021 Bugo * @license https://spdx.org/licenses/GPL-3.0-or-later.html GPL-3.0-or-later * - * @version 1.7 + * @version 1.8 */ class Session extends AbstractArray diff --git a/package-info.xml b/package-info.xml index 9bfe353bd..f303b6543 100644 --- a/package-info.xml +++ b/package-info.xml @@ -3,7 +3,7 @@ Bugo:LightPortal Light Portal - 1.7.1 + 1.8 modification