';
+
+ if (!empty($block['title_style']))
+ $style = ' style="' . $block['title_style'] . '"';
+
if (!empty($block['title_class']))
- echo sprintf($context['lp_all_title_classes'][$block['title_class']], $block['title'], $block['title_style']);
+ echo sprintf($context['lp_all_title_classes'][$block['title_class']], $block['title'], $style ?? '', $edit_link ?? '');
else
echo $block['title'];
+ $style = '';
+ if (!empty($block['content_style']))
+ $style = ' style="' . $block['content_style'] . '"';
+
if (!empty($block['content_class']))
- echo sprintf($context['lp_all_content_classes'][$block['content_class']], $block['content'], $block['content_style']);
+ echo sprintf($context['lp_all_content_classes'][$block['content_class']], $block['content'], $style);
else
echo $block['content'];
diff --git a/Themes/default/LightPortal/ViewPage.template.php b/Themes/default/LightPortal/ViewPage.template.php
index 2be73d443..fc240a39c 100644
--- a/Themes/default/LightPortal/ViewPage.template.php
+++ b/Themes/default/LightPortal/ViewPage.template.php
@@ -7,9 +7,9 @@ function template_show_page()
echo '
+
', $context['lp_page']['content'], '
';
}
diff --git a/Themes/default/languages/LightPortal/.english.php b/Themes/default/languages/LightPortal/.english.php
index d239ff689..fbe355034 100644
--- a/Themes/default/languages/LightPortal/.english.php
+++ b/Themes/default/languages/LightPortal/.english.php
@@ -1,126 +1,129 @@
-%1$s, PHP version:
%2$s, %3$s version:
%4$s.';
-$txt['lp_main_page_title'] = 'The main page title';
-$txt['lp_main_page_disable'] = 'Disable the main page';
-$txt['lp_standalone'] = 'Standalone mode';
-$txt['lp_standalone_help'] = 'Everything except portal pages and ignored areas will be disabled.';
-$txt['lp_standalone_excluded_actions'] = 'Ignored actions';
-$txt['lp_standalone_excluded_actions_subtext'] = 'Specify the areas that should remain available offline.';
-$txt['lp_page_editor_type_default'] = 'The type of page editor by default';
-$txt['lp_num_per_page'] = 'Maximum number of items in the page list (for pagination)';
-$txt['groups_light_portal_view'] = 'Who can view the portal elements';
-$txt['groups_light_portal_manage'] = 'Who can manage the portal';
-
-// Actions
-$txt['lp_title'] = 'Title';
-$txt['lp_actions'] = 'Actions';
-$txt['lp_action_on'] = 'Enable';
-$txt['lp_action_off'] = 'Disable';
-$txt['lp_action_move'] = 'Move';
-
-// Blocks
-$txt['lp_blocks'] = 'Blocks';
-$txt['lp_blocks_manage'] = 'Manage blocks';
-$txt['lp_blocks_manage_tab_description'] = 'All created portal blocks are listed here. To add an additional block, use the corresponding button.';
-$txt['lp_blocks_add'] = 'Add block';
-$txt['lp_blocks_add_title'] = 'Adding block';
-$txt['lp_blocks_add_tab_description'] = 'There are not many blocks yet, but the most universal ones are exist - play with them :)';
-$txt['lp_blocks_add_instruction'] = 'Select the desired block by clicking on it.';
-$txt['lp_blocks_edit_title'] = 'Editing block';
-$txt['lp_blocks_edit_tab_description'] = $txt['lp_blocks_add_tab_description'];
-$txt['lp_block_content'] = 'Content';
-$txt['lp_block_icon_cheatsheet'] = '
';
-$txt['lp_block_type'] = 'Block type';
-$txt['lp_block_priority'] = 'Priority';
-$txt['lp_block_placement'] = 'Placement';
-
-$txt['lp_block_placement_set'] = array(
- 'header' => 'Header',
- 'top' => 'Center (top)',
- 'left' => 'Left side',
- 'right' => 'Right side',
- 'bottom' => 'Center (bottom)',
- 'footer' => 'Footer'
-);
-
-$txt['lp_block_areas'] = 'Actions';
-$txt['lp_block_areas_subtext'] = '
Specify one or more areas (separate by comma) to display the block in:
-
- - all — display everywhere
- - forum — display only on the forum area
- - portal — display only on the portal area (including pages)
- - custom_action — display on area index.php?action=custom_action
- - page=alias — display on page index.php?page=alias
-
';
-$txt['lp_block_title_class'] = 'CSS title class';
-$txt['lp_block_title_style'] = 'CSS title style';
-$txt['lp_block_content_class'] = 'CSS content class';
-$txt['lp_block_content_style'] = 'CSS content class';
-
-$txt['lp_block_types'] = array(
- 'bbc' => 'Custom BBC',
- 'html' => 'Custom HTML',
- 'php' => 'Custom PHP'
-);
-$txt['lp_block_types_descriptions'] = array(
- 'bbc' => 'In this block, any BB tags of the forum can be used as content.',
- 'html' => 'In this block, you can use any HTML tags as content.',
- 'php' => 'In this block, you can use any PHP code as content.'
-);
-
-// Pages
-$txt['lp_pages'] = 'Pages';
-$txt['lp_pages_main'] = 'The main page';
-$txt['lp_pages_manage'] = 'Manage pages';
-$txt['lp_pages_manage_tab_description'] = 'All created portal pages are listed here. To add a new page, use the corresponding button.';
-$txt['lp_pages_add'] = 'Add page';
-$txt['lp_pages_add_title'] = 'Adding page';
-$txt['lp_pages_add_tab_description'] = 'Pay special attention to the
page alias — it is used in the address bar and can only contain Latin characters and numbers!
The main page always has an alias equal to "/".';
-$txt['lp_pages_edit_title'] = 'Editing page';
-$txt['lp_pages_edit_tab_description'] = $txt['lp_pages_add_tab_description'];
-$txt['lp_extra_pages'] = 'Additional pages';
-$txt['lp_page_types'] = array('bbc' => 'BBC', 'html' => 'HTML', 'php' => 'PHP');
-$txt['lp_page_alias'] = 'Alias';
-$txt['lp_page_content'] = $txt['lp_block_content'];
-$txt['lp_page_type'] = 'Page type';
-$txt['lp_page_description'] = 'Description';
-$txt['lp_page_keywords'] = 'Keywords';
-$txt['lp_permissions'] = array('Show to admins', 'Show to guests', 'Show to members', 'Show to everybody');
-$txt['lp_no_items'] = 'There is nothing yet. Let\'s add?';
-
-// Errors
-$txt['lp_page_not_found'] = 'Page not found!';
-$txt['lp_block_not_found'] = 'Block not found!';
-$txt['lp_post_error_no_title'] = 'The
title field was not filled out. It is required.';
-$txt['lp_post_error_no_alias'] = 'The
alias field was not filled out. It is required.';
-$txt['lp_post_error_no_valid_alias'] = 'The specified alias is not correct!';
-$txt['lp_post_error_no_unique_alias'] = 'A page with this alias already exists!';
-$txt['lp_post_error_no_content'] = 'The content not specified! It is required.';
-$txt['lp_post_error_no_areas'] = 'The
areas field was not filled out. It is required.';
-
-// Who
-$txt['lp_who_main'] = 'Viewing
the main portal page.';
-$txt['lp_who_page'] = 'Viewing
the portal page.';
-
-// Permissions
-$txt['permissiongroup_light_portal'] = LP_NAME;
-$txt['permissionname_light_portal_view'] = $txt['group_perms_name_light_portal_view'] = 'View the portal';
-$txt['permissionname_light_portal_manage'] = $txt['group_perms_name_light_portal_manage'] = 'Manage the portal';
-$txt['permissionhelp_light_portal_view'] = 'Ability to view portal pages and blocks.';
-$txt['permissionhelp_light_portal_manage'] = 'Access to manage portal pages and blocks, as well as its settings.';
-$txt['cannot_light_portal_view'] = 'Sorry, you are not allowed to view the portal!';
-$txt['cannot_light_portal_manage'] = 'Sorry, you are not allowed to manage the portal!';
-$txt['cannot_light_portal_view_page'] = 'Sorry, you are not allowed to view this page!';
+%1$s, PHP version:
%2$s, %3$s version:
%4$s.';
+$txt['lp_main_page_title'] = 'The main page title';
+$txt['lp_main_page_disable'] = 'Disable the main page';
+$txt['lp_standalone'] = 'Standalone mode';
+$txt['lp_standalone_help'] = 'Everything except portal pages and ignored areas will be disabled.';
+$txt['lp_standalone_excluded_actions'] = 'Ignored actions';
+$txt['lp_standalone_excluded_actions_subtext'] = 'Specify the areas that should remain available offline.';
+$txt['lp_page_editor_type_default'] = 'The type of page editor by default';
+$txt['lp_num_per_page'] = 'Maximum number of items in the page list (for pagination)';
+$txt['lp_page_og_image'] = 'Use an image within the page content for the
og-image metatag';
+$txt['lp_page_og_image_set'] = array('None', 'First found', 'Last found');
+$txt['groups_light_portal_view'] = 'Who can view the portal elements';
+$txt['groups_light_portal_manage'] = 'Who can manage the portal';
+
+// Actions
+$txt['lp_title'] = 'Title';
+$txt['lp_actions'] = 'Actions';
+$txt['lp_action_on'] = 'Enable';
+$txt['lp_action_off'] = 'Disable';
+$txt['lp_action_move'] = 'Move';
+
+// Blocks
+$txt['lp_blocks'] = 'Blocks';
+$txt['lp_blocks_manage'] = 'Manage blocks';
+$txt['lp_blocks_manage_tab_description'] = 'All created portal blocks are listed here. To add an additional block, use the corresponding button.';
+$txt['lp_blocks_add'] = 'Add block';
+$txt['lp_blocks_add_title'] = 'Adding block';
+$txt['lp_blocks_add_tab_description'] = 'There are not many blocks yet, but the most universal ones are exist - play with them :)';
+$txt['lp_blocks_add_instruction'] = 'Select the desired block by clicking on it.';
+$txt['lp_blocks_edit_title'] = 'Editing block';
+$txt['lp_blocks_edit_tab_description'] = $txt['lp_blocks_add_tab_description'];
+$txt['lp_block_content'] = 'Content';
+$txt['lp_block_icon_cheatsheet'] = '
';
+$txt['lp_block_type'] = 'Block type';
+$txt['lp_block_priority'] = 'Priority';
+$txt['lp_block_placement'] = 'Placement';
+
+$txt['lp_block_placement_set'] = array(
+ 'header' => 'Header',
+ 'top' => 'Center (top)',
+ 'left' => 'Left side',
+ 'right' => 'Right side',
+ 'bottom' => 'Center (bottom)',
+ 'footer' => 'Footer'
+);
+
+$txt['lp_block_areas'] = 'Actions';
+$txt['lp_block_areas_subtext'] = '
Specify one or more areas (separate by comma) to display the block in:
+
+ - all — display everywhere
+ - forum — display only on the forum area
+ - portal — display only on the portal area (including pages)
+ - custom_action — display on area index.php?action=custom_action
+ - page=alias — display on page index.php?page=alias
+
';
+$txt['lp_block_title_class'] = 'CSS title class';
+$txt['lp_block_title_style'] = 'CSS title style';
+$txt['lp_block_content_class'] = 'CSS content class';
+$txt['lp_block_content_style'] = 'CSS content class';
+
+$txt['lp_block_types'] = array(
+ 'bbc' => 'Custom BBC',
+ 'html' => 'Custom HTML',
+ 'php' => 'Custom PHP'
+);
+$txt['lp_block_types_descriptions'] = array(
+ 'bbc' => 'In this block, any BB tags of the forum can be used as content.',
+ 'html' => 'In this block, you can use any HTML tags as content.',
+ 'php' => 'In this block, you can use any PHP code as content.'
+);
+
+// Pages
+$txt['lp_pages'] = 'Pages';
+$txt['lp_pages_main'] = 'The main page';
+$txt['lp_pages_manage'] = 'Manage pages';
+$txt['lp_pages_manage_tab_description'] = 'All created portal pages are listed here. To add a new page, use the corresponding button.';
+$txt['lp_pages_add'] = 'Add page';
+$txt['lp_pages_add_title'] = 'Adding page';
+$txt['lp_pages_add_tab_description'] = 'Pay special attention to the
page alias — it is used in the address bar and can only contain Latin characters and numbers!
The main page always has an alias equal to "/".';
+$txt['lp_pages_edit_title'] = 'Editing page';
+$txt['lp_pages_edit_tab_description'] = $txt['lp_pages_add_tab_description'];
+$txt['lp_extra_pages'] = 'Additional pages';
+$txt['lp_page_types'] = array('bbc' => 'BBC', 'html' => 'HTML', 'php' => 'PHP');
+$txt['lp_page_alias'] = 'Alias';
+$txt['lp_page_content'] = $txt['lp_block_content'];
+$txt['lp_page_type'] = 'Page type';
+$txt['lp_page_description'] = 'Description';
+$txt['lp_page_keywords'] = 'Keywords';
+$txt['lp_permissions'] = array('Show to admins', 'Show to guests', 'Show to members', 'Show to everybody');
+$txt['lp_no_items'] = 'There is nothing yet. Let\'s add?';
+
+// Errors
+$txt['lp_page_not_found'] = 'Page not found!';
+$txt['lp_block_not_found'] = 'Block not found!';
+$txt['lp_post_error_no_title'] = 'The
title field was not filled out. It is required.';
+$txt['lp_post_error_no_alias'] = 'The
alias field was not filled out. It is required.';
+$txt['lp_post_error_no_valid_alias'] = 'The specified alias is not correct!';
+$txt['lp_post_error_no_unique_alias'] = 'A page with this alias already exists!';
+$txt['lp_post_error_no_content'] = 'The content not specified! It is required.';
+$txt['lp_post_error_no_areas'] = 'The
areas field was not filled out. It is required.';
+$txt['lp_page_not_editable'] = 'You are not allowed to edit this page!';
+
+// Who
+$txt['lp_who_main'] = 'Viewing
the main portal page.';
+$txt['lp_who_page'] = 'Viewing
the portal page.';
+
+// Permissions
+$txt['permissiongroup_light_portal'] = LP_NAME;
+$txt['permissionname_light_portal_view'] = $txt['group_perms_name_light_portal_view'] = 'View the portal';
+$txt['permissionname_light_portal_manage'] = $txt['group_perms_name_light_portal_manage'] = 'Manage the portal';
+$txt['permissionhelp_light_portal_view'] = 'Ability to view portal pages and blocks.';
+$txt['permissionhelp_light_portal_manage'] = 'Access to manage portal pages and blocks.';
+$txt['cannot_light_portal_view'] = 'Sorry, you are not allowed to view the portal!';
+$txt['cannot_light_portal_manage'] = 'Sorry, you are not allowed to manage the portal!';
+$txt['cannot_light_portal_view_page'] = 'Sorry, you are not allowed to view this page!';
diff --git a/Themes/default/languages/LightPortal/.russian.php b/Themes/default/languages/LightPortal/.russian.php
index 72fb28348..a5e2dc59b 100644
--- a/Themes/default/languages/LightPortal/.russian.php
+++ b/Themes/default/languages/LightPortal/.russian.php
@@ -1,126 +1,129 @@
-%1$s, версия PHP:
%2$s, версия %3$s:
%4$s.';
-$txt['lp_main_page_title'] = 'Заголовок главной страницы';
-$txt['lp_main_page_disable'] = 'Отключить главную страницу';
-$txt['lp_standalone'] = 'Автономный режим';
-$txt['lp_standalone_help'] = 'Будет отключено всё, кроме страниц портала и игнорируемых областей.';
-$txt['lp_standalone_excluded_actions'] = 'Игнорируемые области';
-$txt['lp_standalone_excluded_actions_subtext'] = 'Укажите области, которые должны оставаться доступными в автономном режиме.';
-$txt['lp_page_editor_type_default'] = 'Тип редактора страниц по умолчанию';
-$txt['lp_num_per_page'] = 'Максимальное количество элементов в списке страниц (для пагинации)';
-$txt['groups_light_portal_view'] = 'Кто может просматривать элементы портала';
-$txt['groups_light_portal_manage'] = 'Кто может управлять порталом';
-
-// Actions
-$txt['lp_title'] = 'Заголовок';
-$txt['lp_actions'] = 'Действия';
-$txt['lp_action_on'] = 'Включить';
-$txt['lp_action_off'] = 'Отключить';
-$txt['lp_action_move'] = 'Переместить';
-
-// Blocks
-$txt['lp_blocks'] = 'Блоки';
-$txt['lp_blocks_manage'] = 'Управление блоками';
-$txt['lp_blocks_manage_tab_description'] = 'Здесь перечислены все используемые блоки портала. Для добавления дополнительного блока воспользуйтесь соответствующей кнопкой.';
-$txt['lp_blocks_add'] = 'Добавить блок';
-$txt['lp_blocks_add_title'] = 'Добавление блока';
-$txt['lp_blocks_add_tab_description'] = 'Блоков пока немного, но самые универсальные есть — играйтесь :)';
-$txt['lp_blocks_add_instruction'] = 'Выберите нужный блок, нажав на него.';
-$txt['lp_blocks_edit_title'] = 'Редактирование блока';
-$txt['lp_blocks_edit_tab_description'] = $txt['lp_blocks_add_tab_description'];
-$txt['lp_block_content'] = 'Содержимое';
-$txt['lp_block_icon_cheatsheet'] = '
';
-$txt['lp_block_type'] = 'Тип блока';
-$txt['lp_block_priority'] = 'Приоритет';
-$txt['lp_block_placement'] = 'Расположение';
-
-$txt['lp_block_placement_set'] = array(
- 'header' => 'Шапка',
- 'top' => 'Центральная часть (верх)',
- 'left' => 'Левая панель',
- 'right' => 'Правая панель',
- 'bottom' => 'Центральная часть (низ)',
- 'footer' => 'Подвал'
-);
-
-$txt['lp_block_areas'] = 'Области';
-$txt['lp_block_areas_subtext'] = '
Укажите одну или несколько областей (через запятую) для отображения в них блока:
-
- - all — отображать везде
- - forum — отображать только на форуме
- - portal — отображать только на портале (включая страницы)
- - custom_action — отображать в области index.php?action=custom_action
- - page=alias — отображать на странице index.php?page=alias
-
';
-$txt['lp_block_title_class'] = 'CSS класс заголовка';
-$txt['lp_block_title_style'] = 'CSS стили заголовка';
-$txt['lp_block_content_class'] = 'CSS класс содержимого';
-$txt['lp_block_content_style'] = 'CSS стили содержимого';
-
-$txt['lp_block_types'] = array(
- 'bbc' => 'Блок с ББ-кодом',
- 'html' => 'Блок с HTML-кодом',
- 'php' => 'Блок с PHP-кодом'
-);
-$txt['lp_block_types_descriptions'] = array(
- 'bbc' => 'В этом блоке в качестве контента можно использовать любые ББ-теги форума.',
- 'html' => 'В этом блоке в качестве контента можно использовать любые теги HTML.',
- 'php' => 'В этом блоке в качестве контента можно использовать произвольный код PHP.'
-);
-
-// Pages
-$txt['lp_pages'] = 'Страницы';
-$txt['lp_pages_main'] = 'Главная страница';
-$txt['lp_pages_manage'] = 'Управление страницами';
-$txt['lp_pages_manage_tab_description'] = 'Здесь перечислены все страницы портала. Для добавления новой страницы воспользуйтесь соответствующей кнопкой.';
-$txt['lp_pages_add'] = 'Добавить страницу';
-$txt['lp_pages_add_title'] = 'Добавление страницы';
-$txt['lp_pages_add_tab_description'] = 'Обратите особое внимание на
алиас страницы — он используется в адресной строке и может содержать только латинские символы и цифры!
У главной страницы алиас всегда равен "/".';
-$txt['lp_pages_edit_title'] = 'Редактирование страницы';
-$txt['lp_pages_edit_tab_description'] = $txt['lp_pages_add_tab_description'];
-$txt['lp_extra_pages'] = 'Дополнительные страницы';
-$txt['lp_page_types'] = array('bbc' => 'ББ-код', 'html' => 'HTML', 'php' => 'PHP');
-$txt['lp_page_alias'] = 'Алиас';
-$txt['lp_page_content'] = $txt['lp_block_content'];
-$txt['lp_page_type'] = 'Тип страницы';
-$txt['lp_page_description'] = 'Описание';
-$txt['lp_page_keywords'] = 'Ключевые слова';
-$txt['lp_permissions'] = array('Показывать админам', 'Показывать гостям', 'Показывать пользователям', 'Показывать всем');
-$txt['lp_no_items'] = 'Пока ничего нет. Давайте добавим?';
-
-// Errors
-$txt['lp_page_not_found'] = 'Страница не найдена!';
-$txt['lp_block_not_found'] = 'Блок не найден!';
-$txt['lp_post_error_no_title'] = 'Не указан заголовок!';
-$txt['lp_post_error_no_alias'] = 'Не указан алиас!';
-$txt['lp_post_error_no_valid_alias'] = 'Указанный алиас не правильный!';
-$txt['lp_post_error_no_unique_alias'] = 'Страница с таким алиасом уже существует!';
-$txt['lp_post_error_no_content'] = 'Не указано содержание!';
-$txt['lp_post_error_no_areas'] = 'Не указана область размещения!';
-
-// Who
-$txt['lp_who_main'] = 'Просматривает
главную страницу портала.';
-$txt['lp_who_page'] = 'Просматривает
страницу портала.';
-
-// Permissions
-$txt['permissiongroup_light_portal'] = LP_NAME;
-$txt['permissionname_light_portal_view'] = $txt['group_perms_name_light_portal_view'] = 'Просмотр портала';
-$txt['permissionname_light_portal_manage'] = $txt['group_perms_name_light_portal_manage'] = 'Управление порталом';
-$txt['permissionhelp_light_portal_view'] = 'Возможность просматривать страницы и блоки портала.';
-$txt['permissionhelp_light_portal_manage'] = 'Доступ к управлению страницами и блоками портала, а также к его настройкам.';
-$txt['cannot_light_portal_view'] = 'Извините, вам запрещен просмотр портала!';
-$txt['cannot_light_portal_manage'] = 'Извините, вам запрещено управление порталом!';
-$txt['cannot_light_portal_view_page'] = 'Извините, вам не разрешен просмотр этой страницы!';
+%1$s, версия PHP:
%2$s, версия %3$s:
%4$s.';
+$txt['lp_main_page_title'] = 'Заголовок главной страницы';
+$txt['lp_main_page_disable'] = 'Отключить главную страницу';
+$txt['lp_standalone'] = 'Автономный режим';
+$txt['lp_standalone_help'] = 'Будет отключено всё, кроме страниц портала и игнорируемых областей.';
+$txt['lp_standalone_excluded_actions'] = 'Игнорируемые области';
+$txt['lp_standalone_excluded_actions_subtext'] = 'Укажите области, которые должны оставаться доступными в автономном режиме.';
+$txt['lp_page_editor_type_default'] = 'Тип редактора страниц по умолчанию';
+$txt['lp_num_per_page'] = 'Максимальное количество элементов в списке страниц (для пагинации)';
+$txt['lp_page_og_image'] = 'Использовать изображение в тексте статьи для мета-тега
og-image';
+$txt['lp_page_og_image_set'] = array('Нет', 'Первое найденное', 'Последнее найденное');
+$txt['groups_light_portal_view'] = 'Кто может просматривать элементы портала';
+$txt['groups_light_portal_manage'] = 'Кто может управлять порталом';
+
+// Actions
+$txt['lp_title'] = 'Заголовок';
+$txt['lp_actions'] = 'Действия';
+$txt['lp_action_on'] = 'Включить';
+$txt['lp_action_off'] = 'Отключить';
+$txt['lp_action_move'] = 'Переместить';
+
+// Blocks
+$txt['lp_blocks'] = 'Блоки';
+$txt['lp_blocks_manage'] = 'Управление блоками';
+$txt['lp_blocks_manage_tab_description'] = 'Здесь перечислены все используемые блоки портала. Для добавления дополнительного блока воспользуйтесь соответствующей кнопкой.';
+$txt['lp_blocks_add'] = 'Добавить блок';
+$txt['lp_blocks_add_title'] = 'Добавление блока';
+$txt['lp_blocks_add_tab_description'] = 'Блоков пока немного, но самые универсальные есть — играйтесь :)';
+$txt['lp_blocks_add_instruction'] = 'Выберите нужный блок, нажав на него.';
+$txt['lp_blocks_edit_title'] = 'Редактирование блока';
+$txt['lp_blocks_edit_tab_description'] = $txt['lp_blocks_add_tab_description'];
+$txt['lp_block_content'] = 'Содержимое';
+$txt['lp_block_icon_cheatsheet'] = '
';
+$txt['lp_block_type'] = 'Тип блока';
+$txt['lp_block_priority'] = 'Приоритет';
+$txt['lp_block_placement'] = 'Расположение';
+
+$txt['lp_block_placement_set'] = array(
+ 'header' => 'Шапка',
+ 'top' => 'Центральная часть (верх)',
+ 'left' => 'Левая панель',
+ 'right' => 'Правая панель',
+ 'bottom' => 'Центральная часть (низ)',
+ 'footer' => 'Подвал'
+);
+
+$txt['lp_block_areas'] = 'Области';
+$txt['lp_block_areas_subtext'] = '
Укажите одну или несколько областей (через запятую) для отображения в них блока:
+
+ - all — отображать везде
+ - forum — отображать только на форуме
+ - portal — отображать только на портале (включая страницы)
+ - custom_action — отображать в области index.php?action=custom_action
+ - page=alias — отображать на странице index.php?page=alias
+
';
+$txt['lp_block_title_class'] = 'CSS класс заголовка';
+$txt['lp_block_title_style'] = 'CSS стили заголовка';
+$txt['lp_block_content_class'] = 'CSS класс содержимого';
+$txt['lp_block_content_style'] = 'CSS стили содержимого';
+
+$txt['lp_block_types'] = array(
+ 'bbc' => 'Блок с ББ-кодом',
+ 'html' => 'Блок с HTML-кодом',
+ 'php' => 'Блок с PHP-кодом'
+);
+$txt['lp_block_types_descriptions'] = array(
+ 'bbc' => 'В этом блоке в качестве контента можно использовать любые ББ-теги форума.',
+ 'html' => 'В этом блоке в качестве контента можно использовать любые теги HTML.',
+ 'php' => 'В этом блоке в качестве контента можно использовать произвольный код PHP.'
+);
+
+// Pages
+$txt['lp_pages'] = 'Страницы';
+$txt['lp_pages_main'] = 'Главная страница';
+$txt['lp_pages_manage'] = 'Управление страницами';
+$txt['lp_pages_manage_tab_description'] = 'Здесь перечислены все страницы портала. Для добавления новой страницы воспользуйтесь соответствующей кнопкой.';
+$txt['lp_pages_add'] = 'Добавить страницу';
+$txt['lp_pages_add_title'] = 'Добавление страницы';
+$txt['lp_pages_add_tab_description'] = 'Обратите особое внимание на
алиас страницы — он используется в адресной строке и может содержать только латинские символы и цифры!
У главной страницы алиас всегда равен "/".';
+$txt['lp_pages_edit_title'] = 'Редактирование страницы';
+$txt['lp_pages_edit_tab_description'] = $txt['lp_pages_add_tab_description'];
+$txt['lp_extra_pages'] = 'Дополнительные страницы';
+$txt['lp_page_types'] = array('bbc' => 'ББ-код', 'html' => 'HTML', 'php' => 'PHP');
+$txt['lp_page_alias'] = 'Алиас';
+$txt['lp_page_content'] = $txt['lp_block_content'];
+$txt['lp_page_type'] = 'Тип страницы';
+$txt['lp_page_description'] = 'Описание';
+$txt['lp_page_keywords'] = 'Ключевые слова';
+$txt['lp_permissions'] = array('Показывать админам', 'Показывать гостям', 'Показывать пользователям', 'Показывать всем');
+$txt['lp_no_items'] = 'Пока ничего нет. Давайте добавим?';
+
+// Errors
+$txt['lp_page_not_found'] = 'Страница не найдена!';
+$txt['lp_block_not_found'] = 'Блок не найден!';
+$txt['lp_post_error_no_title'] = 'Не указан заголовок!';
+$txt['lp_post_error_no_alias'] = 'Не указан алиас!';
+$txt['lp_post_error_no_valid_alias'] = 'Указанный алиас не правильный!';
+$txt['lp_post_error_no_unique_alias'] = 'Страница с таким алиасом уже существует!';
+$txt['lp_post_error_no_content'] = 'Не указано содержание!';
+$txt['lp_post_error_no_areas'] = 'Не указана область размещения!';
+$txt['lp_page_not_editable'] = 'Вам запрещено редактирование этой страницы!';
+
+// Who
+$txt['lp_who_main'] = 'Просматривает
главную страницу портала.';
+$txt['lp_who_page'] = 'Просматривает
страницу портала.';
+
+// Permissions
+$txt['permissiongroup_light_portal'] = LP_NAME;
+$txt['permissionname_light_portal_view'] = $txt['group_perms_name_light_portal_view'] = 'Просмотр портала';
+$txt['permissionname_light_portal_manage'] = $txt['group_perms_name_light_portal_manage'] = 'Управление порталом';
+$txt['permissionhelp_light_portal_view'] = 'Возможность просматривать страницы и блоки портала.';
+$txt['permissionhelp_light_portal_manage'] = 'Доступ к управлению страницами и блоками портала.';
+$txt['cannot_light_portal_view'] = 'Извините, вам запрещен просмотр портала!';
+$txt['cannot_light_portal_manage'] = 'Извините, вам запрещено управление порталом!';
+$txt['cannot_light_portal_view_page'] = 'Извините, вам не разрешен просмотр этой страницы!';
diff --git a/Themes/default/languages/LightPortal/.ukrainian.php b/Themes/default/languages/LightPortal/.ukrainian.php
index 569a2bb30..57e61c42b 100644
--- a/Themes/default/languages/LightPortal/.ukrainian.php
+++ b/Themes/default/languages/LightPortal/.ukrainian.php
@@ -110,6 +110,7 @@
$txt['lp_post_error_no_unique_alias'] = 'Сторінка з таким аліасом вже існує!';
$txt['lp_post_error_no_content'] = 'Не вказано зміст!';
$txt['lp_post_error_no_areas'] = 'Не вказана область разташування!';
+$txt['lp_page_not_editable'] = 'Вам заборонено редагування цієї сторінки!';
// Who
$txt['lp_who_main'] = 'Переглядає
головну сторінку порталу.';
@@ -120,7 +121,7 @@
$txt['permissionname_light_portal_view'] = $txt['group_perms_name_light_portal_view'] = 'Перегляд порталу';
$txt['permissionname_light_portal_manage'] = $txt['group_perms_name_light_portal_manage'] = 'Керування порталом';
$txt['permissionhelp_light_portal_view'] = 'Можливість переглядати сторінки і блоки порталу';
-$txt['permissionhelp_light_portal_manage'] = 'Доступ до керування сторінками і блоками порталу, а також до його налаштувань.';
+$txt['permissionhelp_light_portal_manage'] = 'Доступ до керування сторінками і блоками порталу.';
$txt['cannot_light_portal_view'] = 'Вибачте, вам заборонений перегляд порталу!';
$txt['cannot_light_portal_manage'] = 'Вибачте, вам заборонено керування порталом!';
$txt['cannot_light_portal_view_page'] = 'Вибачте, вам заборонений перегляд цієї сторінки!';
diff --git a/database.php b/database.php
index 6f3652315..e84181e02 100644
--- a/database.php
+++ b/database.php
@@ -8,11 +8,11 @@
if (version_compare(PHP_VERSION, '7.2', '<'))
die('This mod needs PHP 7.2 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;
+
if ((SMF == 'SSI') && !$user_info['is_admin'])
die('Admin privileges required.');
-global $mbname;
-
$tables[] = array(
'name' => 'lp_blocks',
'columns' => array(
@@ -171,6 +171,13 @@
'unsigned' => true,
'auto' => true
),
+ array(
+ 'name' => 'author_id',
+ 'type' => 'mediumint',
+ 'size' => 8,
+ 'unsigned' => true,
+ 'default' => 0
+ ),
array(
'name' => 'title',
'type' => 'varchar',
@@ -252,6 +259,7 @@
'default' => array(
'columns' => array(
'page_id' => 'int',
+ 'author_id' => 'int',
'title' => 'string-255',
'alias' => 'string-255',
'content' => 'string',
@@ -260,7 +268,7 @@
'created_at' => 'int'
),
'values' => array(
- array(1, $mbname, '/', 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nunc porttitor posuere accumsan. Aliquam erat volutpat. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Phasellus vel blandit dui. Aliquam nunc est, vehicula sit amet eleifend in, scelerisque quis sem. In aliquam nec lorem nec volutpat. Sed eu blandit erat. Suspendisse elementum lectus a ligula commodo, at lobortis justo accumsan. Aliquam mollis lectus ultricies, semper urna eu, fermentum eros. Sed a interdum odio. Quisque sit amet feugiat enim. Curabitur aliquam lectus at metus tristique tempus. Sed vitae nisi ultricies, tincidunt lacus non, ultrices ante.
+ array(1, $user_info['id'], $mbname, '/', 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nunc porttitor posuere accumsan. Aliquam erat volutpat. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Phasellus vel blandit dui. Aliquam nunc est, vehicula sit amet eleifend in, scelerisque quis sem. In aliquam nec lorem nec volutpat. Sed eu blandit erat. Suspendisse elementum lectus a ligula commodo, at lobortis justo accumsan. Aliquam mollis lectus ultricies, semper urna eu, fermentum eros. Sed a interdum odio. Quisque sit amet feugiat enim. Curabitur aliquam lectus at metus tristique tempus. Sed vitae nisi ultricies, tincidunt lacus non, ultrices ante.
Duis ac ex sed dolor suscipit vulputate at eu ligula. Aliquam efficitur ac ante convallis ultricies. Nullam pretium vitae purus dapibus tempor. Aenean vel fringilla eros. Proin lectus velit, tristique ut condimentum eu, semper sed ipsum. Duis venenatis dolor lectus, et ullamcorper tortor varius eu. Vestibulum quis nisi ut nunc mollis fringilla. Sed consectetur semper magna, eget blandit nulla commodo sed. Aenean sem ipsum, auctor eget enim id, scelerisque malesuada nibh. Nulla ornare pharetra laoreet. Phasellus dignissim nisl nec arcu cursus luctus.
diff --git a/package-info.xml b/package-info.xml
index 2a6d3761e..ea31dd916 100644
--- a/package-info.xml
+++ b/package-info.xml
@@ -3,10 +3,10 @@
Bugo:LightPortal
Light Portal
- 0.2
+ 0.3
modification
-
+
readme/english.txt
readme/russian.txt
readme/ukrainian.txt
@@ -18,7 +18,7 @@
-
+