From 3a9d992b12305984ea1d6de2567f796a5747e72b Mon Sep 17 00:00:00 2001 From: Sergey Tolkachyov Date: Mon, 22 Jul 2024 12:10:45 +0400 Subject: [PATCH] Hot fix language constants --- fields/componentparams.php | 158 +++--- fields/plugininfo.php | 208 ++++---- .../en-GB.plg_jlsitemap_phocadownload.ini | 76 +-- .../en-GB.plg_jlsitemap_phocadownload.sys.ini | 24 +- .../ru-RU.plg_jlsitemap_phocadownload.ini | 78 +-- .../ru-RU.plg_jlsitemap_phocadownload.sys.ini | 22 +- phocadownload.php | 496 +++++++++--------- phocadownload.xml | 212 ++++---- script.php | 252 ++++----- 9 files changed, 763 insertions(+), 763 deletions(-) diff --git a/fields/componentparams.php b/fields/componentparams.php index a4de823..9db7b72 100644 --- a/fields/componentparams.php +++ b/fields/componentparams.php @@ -1,80 +1,80 @@ -get('display_file_view','0'); - $files_in_sitemap = 0; - $css_class = 'danger'; - if($display_file_view == 1){ - $files_in_sitemap = 1; - $css_class = 'success'; - } - return $html = ' - -
- '.Text::sprintf('PLG_JLSITEMAP_PHOCADOWNLOAD_COMPONENT_PARAM_DISPLAY_FILE_VIEW',Text::_('PLG_JLSITEMAP_PHOCADOWNLOAD_COMPONENT_PARAM_DISPLAY_FILE_VIEW_'.$display_file_view)).' -
-
- '.Text::sprintf('PLG_JLSITEMAP_PHOCADOWNLOAD_FILES_IN_SITEMAP',Text::_('PLG_JLSITEMAP_PHOCADOWNLOAD_FILES_IN_SITEMAP_'.$files_in_sitemap)).' -
-
- '; - } - - /** - * @return string The field label markup. - * - * @since 1.7.0 - */ - protected function getLabel() - { - return ' '; - - } - - /** - * Method to get the field title. - * - * @return string The field title. - * - * @since 1.7.0 - */ - protected function getTitle() - { - return $this->getLabel(); - } - -} +get('display_file_view','0'); + $files_in_sitemap = 0; + $css_class = 'danger'; + if($display_file_view == 1){ + $files_in_sitemap = 1; + $css_class = 'success'; + } + return $html = ' +
+
+ '.Text::sprintf('PLG_PHOCADOWNLOAD_COMPONENT_PARAM_DISPLAY_FILE_VIEW',Text::_('PLG_PHOCADOWNLOAD_COMPONENT_PARAM_DISPLAY_FILE_VIEW_'.$display_file_view)).' +
+
+ '.Text::sprintf('PLG_PHOCADOWNLOAD_FILES_IN_SITEMAP',Text::_('PLG_PHOCADOWNLOAD_FILES_IN_SITEMAP_'.$files_in_sitemap)).' +
+
+ '; + } + + /** + * @return string The field label markup. + * + * @since 1.7.0 + */ + protected function getLabel() + { + return ' '; + + } + + /** + * Method to get the field title. + * + * @return string The field title. + * + * @since 1.7.0 + */ + protected function getTitle() + { + return $this->getLabel(); + } + +} ?> \ No newline at end of file diff --git a/fields/plugininfo.php b/fields/plugininfo.php index da78a63..6608dd6 100644 --- a/fields/plugininfo.php +++ b/fields/plugininfo.php @@ -1,105 +1,105 @@ -form->getData(); - $element = $data->get('element'); - $folder = $data->get('folder'); - - - $doc = Factory::getDocument(); - $doc->addStyleDeclaration(" - .wt-b24-plugin-info{ - box-shadow: 0 .5rem 1rem rgba(0,0,0,.15); - padding:1rem; - margin-bottom: 2rem; - display:flex; - - } - .plugin-info-img{ - max-width: 100%; - } - .plugin-info-img svg:hover * { - cursor:pointer; - } - "); - - $wt_plugin_info = simplexml_load_file(JPATH_SITE."/plugins/".$folder."/".$element."/".$element.".xml"); - - $html = '
-
- -
- v.'. $wt_plugin_info->version.' - '. Text::_("PLG_".$element."_DESC") .' -
-
'; - - return $html; - } - - /** - * @return string The field label markup. - * - * @since 1.7.0 - */ - protected function getLabel() - { - - return ' '; - - } - - /** - * Method to get the field title. - * - * @return string The field title. - * - * @since 1.7.0 - */ - protected function getTitle() - { - return $this->getLabel(); - } - +form->getData(); + $element = $data->get('element'); + $folder = $data->get('folder'); + + + $doc = Factory::getDocument(); + $doc->addStyleDeclaration(" + .wt-b24-plugin-info{ + box-shadow: 0 .5rem 1rem rgba(0,0,0,.15); + padding:1rem; + margin-bottom: 2rem; + display:flex; + + } + .plugin-info-img{ + max-width: 100%; + } + .plugin-info-img svg:hover * { + cursor:pointer; + } + "); + + $wt_plugin_info = simplexml_load_file(JPATH_SITE."/plugins/".$folder."/".$element."/".$element.".xml"); + + $html = '
+
+ +
+ v.'. $wt_plugin_info->version.' + '. Text::_("PLG_".$element."_DESC") .' +
+
'; + + return $html; + } + + /** + * @return string The field label markup. + * + * @since 1.7.0 + */ + protected function getLabel() + { + + return ' '; + + } + + /** + * Method to get the field title. + * + * @return string The field title. + * + * @since 1.7.0 + */ + protected function getTitle() + { + return $this->getLabel(); + } + } \ No newline at end of file diff --git a/language/en-GB/en-GB.plg_jlsitemap_phocadownload.ini b/language/en-GB/en-GB.plg_jlsitemap_phocadownload.ini index 1063930..4bcde55 100644 --- a/language/en-GB/en-GB.plg_jlsitemap_phocadownload.ini +++ b/language/en-GB/en-GB.plg_jlsitemap_phocadownload.ini @@ -1,39 +1,39 @@ -PLG_PHOCADOWNLOAD = "JLSitemap - Phoca Download" -PLG_PHOCADOWNLOAD_DESC = "Plugin provider of the Phoca Download component data for the JL Sitemap static XML site map component" - -; Categories -PLG_JLSITEMAP_PHOCADOWNLOAD_CATEGORIES_FIELDSET_LABEL = "Categories" -PLG_JLSITEMAP_PHOCADOWNLOAD_CATEGORIES_ENABLE = "Include categories in the site map?" -PLG_JLSITEMAP_PHOCADOWNLOAD_CATEGORIES_CHANGEFREQ = "Changes frequency" -PLG_JLSITEMAP_PHOCADOWNLOAD_CATEGORIES_PRIORITY = "Priority" - -; Files -PLG_JLSITEMAP_PHOCADOWNLOAD_FILES_FIELDSET_LABEL = "Files" -PLG_JLSITEMAP_PHOCADOWNLOAD_FILES_ENABLE = "Include files in the site map?" -PLG_JLSITEMAP_PHOCADOWNLOAD_FILES_CHANGEFREQ = "Changes frequency" -PLG_JLSITEMAP_PHOCADOWNLOAD_FILES_PRIORITY = "Priority" -PLG_JLSITEMAP_PHOCADOWNLOAD_COMPONENT_PARAM_DISPLAY_FILE_VIEW = "The Display File View parameter of the Phoca Download component is %s. Including files in the sitemap makes sense only if users have the opportunity to go to a detailed page of information about the file. If this feature is not available or the information is shown only in a pop-up (modal) window, do not include files in the sitemap." -PLG_JLSITEMAP_PHOCADOWNLOAD_COMPONENT_PARAM_DISPLAY_FILE_VIEW_0 = "No" -PLG_JLSITEMAP_PHOCADOWNLOAD_COMPONENT_PARAM_DISPLAY_FILE_VIEW_1 = "Yes" -PLG_JLSITEMAP_PHOCADOWNLOAD_COMPONENT_PARAM_DISPLAY_FILE_VIEW_2 = "Yes (Only Modalbox - Category View)" -PLG_JLSITEMAP_PHOCADOWNLOAD_FILES_IN_SITEMAP = "Adding files to the site map %s."; -PLG_JLSITEMAP_PHOCADOWNLOAD_FILES_IN_SITEMAP_0 = "forcibly disabled" -PLG_JLSITEMAP_PHOCADOWNLOAD_FILES_IN_SITEMAP_1 = "can be enabled" - -; Other -PLG_PHOCADOWNLOAD_TYPES_CATEGORY = "Category" -PLG_PHOCADOWNLOAD_EXCLUDE_CATEGORY = "Phoca Gallery - Category exclude" -PLG_PHOCADOWNLOAD_EXCLUDE_CATEGORY_ROBOTS = "Robots noindex" -PLG_PHOCADOWNLOAD_EXCLUDE_CATEGORY_UNPUBLISH = "Not published" -PLG_PHOCADOWNLOAD_EXCLUDE_CATEGORY_TRASH = "Trashed" -PLG_PHOCADOWNLOAD_EXCLUDE_CATEGORY_ACCESS = "Access Rights" - -PLG_PHOCADOWNLOAD_TYPES_FILE = "File" -PLG_PHOCADOWNLOAD_EXCLUDE_FILE = "Phoca Gallery - File exclude" -PLG_PHOCADOWNLOAD_EXCLUDE_FILE_ROBOTS = "Robots noindex" -PLG_PHOCADOWNLOAD_EXCLUDE_FILE_UNPUBLISH = "Unpublished" -PLG_PHOCADOWNLOAD_EXCLUDE_FILE_TRASH = "Trashed" -PLG_PHOCADOWNLOAD_EXCLUDE_FILE_ACCESS = "Access Rights" -PLG_PHOCADOWNLOAD_EXCLUDE_FILE_PUBLISH_UP = "The file puflish time has not come yet" -PLG_PHOCADOWNLOAD_EXCLUDE_FILE_PUBLISH_DOWN = "The file publish time has expired" +PLG_PHOCADOWNLOAD = "JLSitemap - Phoca Download" +PLG_PHOCADOWNLOAD_DESC = "Plugin provider of the Phoca Download component data for the JL Sitemap static XML site map component" + +; Categories +PLG_PHOCADOWNLOAD_CATEGORIES_FIELDSET_LABEL = "Categories" +PLG_PHOCADOWNLOAD_CATEGORIES_ENABLE = "Include categories in the site map?" +PLG_PHOCADOWNLOAD_CATEGORIES_CHANGEFREQ = "Changes frequency" +PLG_PHOCADOWNLOAD_CATEGORIES_PRIORITY = "Priority" + +; Files +PLG_PHOCADOWNLOAD_FILES_FIELDSET_LABEL = "Files" +PLG_PHOCADOWNLOAD_FILES_ENABLE = "Include files in the site map?" +PLG_PHOCADOWNLOAD_FILES_CHANGEFREQ = "Changes frequency" +PLG_PHOCADOWNLOAD_FILES_PRIORITY = "Priority" +PLG_PHOCADOWNLOAD_COMPONENT_PARAM_DISPLAY_FILE_VIEW = "The Display File View parameter of the Phoca Download component is %s. Including files in the sitemap makes sense only if users have the opportunity to go to a detailed page of information about the file. If this feature is not available or the information is shown only in a pop-up (modal) window, do not include files in the sitemap." +PLG_PHOCADOWNLOAD_COMPONENT_PARAM_DISPLAY_FILE_VIEW_0 = "No" +PLG_PHOCADOWNLOAD_COMPONENT_PARAM_DISPLAY_FILE_VIEW_1 = "Yes" +PLG_PHOCADOWNLOAD_COMPONENT_PARAM_DISPLAY_FILE_VIEW_2 = "Yes (Only Modalbox - Category View)" +PLG_PHOCADOWNLOAD_FILES_IN_SITEMAP = "Adding files to the site map %s."; +PLG_PHOCADOWNLOAD_FILES_IN_SITEMAP_0 = "forcibly disabled" +PLG_PHOCADOWNLOAD_FILES_IN_SITEMAP_1 = "can be enabled" + +; Other +PLG_PHOCADOWNLOAD_TYPES_CATEGORY = "Category" +PLG_PHOCADOWNLOAD_EXCLUDE_CATEGORY = "Phoca Gallery - Category exclude" +PLG_PHOCADOWNLOAD_EXCLUDE_CATEGORY_ROBOTS = "Robots noindex" +PLG_PHOCADOWNLOAD_EXCLUDE_CATEGORY_UNPUBLISH = "Not published" +PLG_PHOCADOWNLOAD_EXCLUDE_CATEGORY_TRASH = "Trashed" +PLG_PHOCADOWNLOAD_EXCLUDE_CATEGORY_ACCESS = "Access Rights" + +PLG_PHOCADOWNLOAD_TYPES_FILE = "File" +PLG_PHOCADOWNLOAD_EXCLUDE_FILE = "Phoca Gallery - File exclude" +PLG_PHOCADOWNLOAD_EXCLUDE_FILE_ROBOTS = "Robots noindex" +PLG_PHOCADOWNLOAD_EXCLUDE_FILE_UNPUBLISH = "Unpublished" +PLG_PHOCADOWNLOAD_EXCLUDE_FILE_TRASH = "Trashed" +PLG_PHOCADOWNLOAD_EXCLUDE_FILE_ACCESS = "Access Rights" +PLG_PHOCADOWNLOAD_EXCLUDE_FILE_PUBLISH_UP = "The file puflish time has not come yet" +PLG_PHOCADOWNLOAD_EXCLUDE_FILE_PUBLISH_DOWN = "The file publish time has expired" PLG_PHOCADOWNLOAD_EXCLUDE_FILE_NOT_APPROVED = "File not authorized" \ No newline at end of file diff --git a/language/en-GB/en-GB.plg_jlsitemap_phocadownload.sys.ini b/language/en-GB/en-GB.plg_jlsitemap_phocadownload.sys.ini index a56d8b2..e062284 100644 --- a/language/en-GB/en-GB.plg_jlsitemap_phocadownload.sys.ini +++ b/language/en-GB/en-GB.plg_jlsitemap_phocadownload.sys.ini @@ -1,13 +1,13 @@ -PLG_PHOCADOWNLOAD = "JLSitemap - Phoca Download" -PLG_PHOCADOWNLOAD_DESC = "Plugin provider of the Phoca Download component data for the JL Sitemap static XML site map component" -PLG_PHOCADOWNLOAD_DESC = "Library for work with Cdek REST API with a plugin for configuring the library. For Joomla 4 and higher." -PLG_PHOCADOWNLOAD_AFTER_INSTALL = "Thank you for installing the extension" -PLG_PHOCADOWNLOAD_AFTER_DISCOVER_INSTALL = "Thank you for installing the extension" -PLG_PHOCADOWNLOAD_AFTER_UPDATE = "Thank you for updating the extension" -PLG_PHOCADOWNLOAD_AFTER_UNINSTALL = ":(" -PLG_PHOCADOWNLOAD_MAYBE_INTERESTING="

It may be interesting

" -PLG_PHOCADOWNLOAD_WHATS_NEW="

v.0.9.0 What's new?

Initial version

First extension version for Joomla 3.

Download Phoca Download

" -PLG_PHOCADOWNLOAD_JOOMLARU_TELEGRAM_CHAT = "Joomla community in Telegram" -PLG_PHOCADOWNLOAD_WEBTOLK_TELEGRAM_CHANNEL = "@WebTolkRu in Telegram" -PLG_PHOCADOWNLOAD_ERROR_COMPATIBLE_PHP = "This version is compatible only with PHP %s and later" +PLG_PHOCADOWNLOAD = "JLSitemap - Phoca Download" +PLG_PHOCADOWNLOAD_DESC = "Plugin provider of the Phoca Download component data for the JL Sitemap static XML site map component" +PLG_PHOCADOWNLOAD_DESC = "Library for work with Cdek REST API with a plugin for configuring the library. For Joomla 4 and higher." +PLG_PHOCADOWNLOAD_AFTER_INSTALL = "Thank you for installing the extension" +PLG_PHOCADOWNLOAD_AFTER_DISCOVER_INSTALL = "Thank you for installing the extension" +PLG_PHOCADOWNLOAD_AFTER_UPDATE = "Thank you for updating the extension" +PLG_PHOCADOWNLOAD_AFTER_UNINSTALL = ":(" +PLG_PHOCADOWNLOAD_MAYBE_INTERESTING="

It may be interesting

" +PLG_PHOCADOWNLOAD_WHATS_NEW="

v.0.9.0 What's new?

Initial version

First extension version for Joomla 3.

Download Phoca Download

" +PLG_PHOCADOWNLOAD_JOOMLARU_TELEGRAM_CHAT = "Joomla community in Telegram" +PLG_PHOCADOWNLOAD_WEBTOLK_TELEGRAM_CHANNEL = "@WebTolkRu in Telegram" +PLG_PHOCADOWNLOAD_ERROR_COMPATIBLE_PHP = "This version is compatible only with PHP %s and later" PLG_PHOCADOWNLOAD_ERROR_COMPATIBLE_JOOMLA = "This version is compatible only with Joomla %s and later" \ No newline at end of file diff --git a/language/ru-RU/ru-RU.plg_jlsitemap_phocadownload.ini b/language/ru-RU/ru-RU.plg_jlsitemap_phocadownload.ini index 3a9ff31..2a0bd84 100644 --- a/language/ru-RU/ru-RU.plg_jlsitemap_phocadownload.ini +++ b/language/ru-RU/ru-RU.plg_jlsitemap_phocadownload.ini @@ -1,40 +1,40 @@ -PLG_PHOCADOWNLOAD = "JLSitemap - Phoca Download" -PLG_PHOCADOWNLOAD_DESC = "Плагин-провайдер данных компонента Phoca Download для компонента статической XML карты сайта JL Sitemap" - -; Categories -PLG_PHOCADOWNLOAD_CATEGORIES_FIELDSET_LABEL = "Категории" -PLG_PHOCADOWNLOAD_CATEGORIES_ENABLE = "Включить категории в карту сайта?" -PLG_PHOCADOWNLOAD_CATEGORIES_CHANGEFREQ = "Частота изменений" -PLG_PHOCADOWNLOAD_CATEGORIES_PRIORITY = "Приоритет" - -; Files -PLG_PHOCADOWNLOAD_FILES_FIELDSET_LABEL = "Файлы" -PLG_PHOCADOWNLOAD_FILES_ENABLE = "Включить файлы в карту сайта?" -PLG_PHOCADOWNLOAD_FILES_CHANGEFREQ = "Частота изменений" -PLG_PHOCADOWNLOAD_FILES_PRIORITY = "Приоритет" -PLG_PHOCADOWNLOAD_COMPONENT_PARAM_DISPLAY_FILE_VIEW = "Параметр Display File View компонента Phoca Download равен %s. Включение файлов в карту сайта имеет смысл только в том случае, если у пользователей есть возможность перейти на подробную страницу информации о файле. Если этой возможности нет или информация показывается только во всплывающем (модальном) окне - не включайте файлы в карту сайта." -PLG_PHOCADOWNLOAD_COMPONENT_PARAM_DISPLAY_FILE_VIEW_0 = "No" -PLG_PHOCADOWNLOAD_COMPONENT_PARAM_DISPLAY_FILE_VIEW_1 = "Yes" -PLG_PHOCADOWNLOAD_COMPONENT_PARAM_DISPLAY_FILE_VIEW_2 = "Yes (Only Modalbox - Category View)" -PLG_PHOCADOWNLOAD_FILES_IN_SITEMAP = "Добавление файлов в карту сайта %s."; -PLG_PHOCADOWNLOAD_FILES_IN_SITEMAP_0 = "принудительно отключено" -PLG_PHOCADOWNLOAD_FILES_IN_SITEMAP_1 = "может быть включено" - -; Other -PLG_PHOCADOWNLOAD_TYPES_CATEGORY = "Категория" -PLG_PHOCADOWNLOAD_EXCLUDE_CATEGORY = "Phoca Gallery - Исключение категории" -PLG_PHOCADOWNLOAD_EXCLUDE_CATEGORY_ROBOTS = "Robots noindex" -PLG_PHOCADOWNLOAD_EXCLUDE_CATEGORY_UNPUBLISH = "Не опубликована" -PLG_PHOCADOWNLOAD_EXCLUDE_CATEGORY_TRASH = "В корзине" -PLG_PHOCADOWNLOAD_EXCLUDE_CATEGORY_ARCHIVE = "В архиве" -PLG_PHOCADOWNLOAD_EXCLUDE_CATEGORY_ACCESS = "Права доступа" - -PLG_PHOCADOWNLOAD_TYPES_FILE = "Файл" -PLG_PHOCADOWNLOAD_EXCLUDE_FILE = "Phoca Gallery - Исключение файла" -PLG_PHOCADOWNLOAD_EXCLUDE_FILE_ROBOTS = "Robots noindex" -PLG_PHOCADOWNLOAD_EXCLUDE_FILE_UNPUBLISH = "Не опубликован" -PLG_PHOCADOWNLOAD_EXCLUDE_FILE_TRASH = "В корзине" -PLG_PHOCADOWNLOAD_EXCLUDE_FILE_ACCESS = "Права доступа" -PLG_PHOCADOWNLOAD_EXCLUDE_FILE_PUBLISH_UP = "Время публикации еще не настало" -PLG_PHOCADOWNLOAD_EXCLUDE_FILE_PUBLISH_DOWN = "Время публикации истекло" +PLG_PHOCADOWNLOAD = "JLSitemap - Phoca Download" +PLG_PHOCADOWNLOAD_DESC = "Плагин-провайдер данных компонента Phoca Download для компонента статической XML карты сайта JL Sitemap" + +; Categories +PLG_PHOCADOWNLOAD_CATEGORIES_FIELDSET_LABEL = "Категории" +PLG_PHOCADOWNLOAD_CATEGORIES_ENABLE = "Включить категории в карту сайта?" +PLG_PHOCADOWNLOAD_CATEGORIES_CHANGEFREQ = "Частота изменений" +PLG_PHOCADOWNLOAD_CATEGORIES_PRIORITY = "Приоритет" + +; Files +PLG_PHOCADOWNLOAD_FILES_FIELDSET_LABEL = "Файлы" +PLG_PHOCADOWNLOAD_FILES_ENABLE = "Включить файлы в карту сайта?" +PLG_PHOCADOWNLOAD_FILES_CHANGEFREQ = "Частота изменений" +PLG_PHOCADOWNLOAD_FILES_PRIORITY = "Приоритет" +PLG_PHOCADOWNLOAD_COMPONENT_PARAM_DISPLAY_FILE_VIEW = "Параметр Display File View компонента Phoca Download равен %s. Включение файлов в карту сайта имеет смысл только в том случае, если у пользователей есть возможность перейти на подробную страницу информации о файле. Если этой возможности нет или информация показывается только во всплывающем (модальном) окне - не включайте файлы в карту сайта." +PLG_PHOCADOWNLOAD_COMPONENT_PARAM_DISPLAY_FILE_VIEW_0 = "No" +PLG_PHOCADOWNLOAD_COMPONENT_PARAM_DISPLAY_FILE_VIEW_1 = "Yes" +PLG_PHOCADOWNLOAD_COMPONENT_PARAM_DISPLAY_FILE_VIEW_2 = "Yes (Only Modalbox - Category View)" +PLG_PHOCADOWNLOAD_FILES_IN_SITEMAP = "Добавление файлов в карту сайта %s."; +PLG_PHOCADOWNLOAD_FILES_IN_SITEMAP_0 = "принудительно отключено" +PLG_PHOCADOWNLOAD_FILES_IN_SITEMAP_1 = "может быть включено" + +; Other +PLG_PHOCADOWNLOAD_TYPES_CATEGORY = "Категория" +PLG_PHOCADOWNLOAD_EXCLUDE_CATEGORY = "Phoca Gallery - Исключение категории" +PLG_PHOCADOWNLOAD_EXCLUDE_CATEGORY_ROBOTS = "Robots noindex" +PLG_PHOCADOWNLOAD_EXCLUDE_CATEGORY_UNPUBLISH = "Не опубликована" +PLG_PHOCADOWNLOAD_EXCLUDE_CATEGORY_TRASH = "В корзине" +PLG_PHOCADOWNLOAD_EXCLUDE_CATEGORY_ARCHIVE = "В архиве" +PLG_PHOCADOWNLOAD_EXCLUDE_CATEGORY_ACCESS = "Права доступа" + +PLG_PHOCADOWNLOAD_TYPES_FILE = "Файл" +PLG_PHOCADOWNLOAD_EXCLUDE_FILE = "Phoca Gallery - Исключение файла" +PLG_PHOCADOWNLOAD_EXCLUDE_FILE_ROBOTS = "Robots noindex" +PLG_PHOCADOWNLOAD_EXCLUDE_FILE_UNPUBLISH = "Не опубликован" +PLG_PHOCADOWNLOAD_EXCLUDE_FILE_TRASH = "В корзине" +PLG_PHOCADOWNLOAD_EXCLUDE_FILE_ACCESS = "Права доступа" +PLG_PHOCADOWNLOAD_EXCLUDE_FILE_PUBLISH_UP = "Время публикации еще не настало" +PLG_PHOCADOWNLOAD_EXCLUDE_FILE_PUBLISH_DOWN = "Время публикации истекло" PLG_PHOCADOWNLOAD_EXCLUDE_FILE_NOT_APPROVED = "Файл не одобрен" \ No newline at end of file diff --git a/language/ru-RU/ru-RU.plg_jlsitemap_phocadownload.sys.ini b/language/ru-RU/ru-RU.plg_jlsitemap_phocadownload.sys.ini index 4dde4ad..4e71234 100644 --- a/language/ru-RU/ru-RU.plg_jlsitemap_phocadownload.sys.ini +++ b/language/ru-RU/ru-RU.plg_jlsitemap_phocadownload.sys.ini @@ -1,12 +1,12 @@ -PLG_PHOCADOWNLOAD = "JLSitemap - Phoca Download" -PLG_PHOCADOWNLOAD_DESC = "Плагин-провайдер данных компонента Phoca Download для компонента статической XML карты сайта JL Sitemap" -PLG_PHOCADOWNLOAD_AFTER_INSTALL = "Спасибо за установку расширения" -PLG_PHOCADOWNLOAD_AFTER_DISCOVER_INSTALL = "Спасибо за установку расширения" -PLG_PHOCADOWNLOAD_AFTER_UPDATE = "Спасибо за обновление расширения" -PLG_PHOCADOWNLOAD_AFTER_UNINSTALL = ":(" -PLG_PHOCADOWNLOAD_MAYBE_INTERESTING="

Может быть интересно

" -PLG_PHOCADOWNLOAD_WHATS_NEW="

v.0.9.0 Что нового?

Первая версия

Первая версия расширения для Joomla 3.

Скачать Phoca Download

" -PLG_PHOCADOWNLOAD_JOOMLARU_TELEGRAM_CHAT="Joomla сообщество в Телеграм" -PLG_PHOCADOWNLOAD_WEBTOLK_TELEGRAM_CHANNEL = "@WebTolkRu в Telegram" -PLG_PHOCADOWNLOAD_ERROR_COMPATIBLE_JOOMLA = "Эта версия совместима только с Joomla %s и выше." +PLG_PHOCADOWNLOAD = "JLSitemap - Phoca Download" +PLG_PHOCADOWNLOAD_DESC = "Плагин-провайдер данных компонента Phoca Download для компонента статической XML карты сайта JL Sitemap" +PLG_PHOCADOWNLOAD_AFTER_INSTALL = "Спасибо за установку расширения" +PLG_PHOCADOWNLOAD_AFTER_DISCOVER_INSTALL = "Спасибо за установку расширения" +PLG_PHOCADOWNLOAD_AFTER_UPDATE = "Спасибо за обновление расширения" +PLG_PHOCADOWNLOAD_AFTER_UNINSTALL = ":(" +PLG_PHOCADOWNLOAD_MAYBE_INTERESTING="

Может быть интересно

" +PLG_PHOCADOWNLOAD_WHATS_NEW="

v.0.9.0 Что нового?

Первая версия

Первая версия расширения для Joomla 3.

Скачать Phoca Download

" +PLG_PHOCADOWNLOAD_JOOMLARU_TELEGRAM_CHAT="Joomla сообщество в Телеграм" +PLG_PHOCADOWNLOAD_WEBTOLK_TELEGRAM_CHANNEL = "@WebTolkRu в Telegram" +PLG_PHOCADOWNLOAD_ERROR_COMPATIBLE_JOOMLA = "Эта версия совместима только с Joomla %s и выше." PLG_PHOCADOWNLOAD_ERROR_COMPATIBLE_PHP = "Эта версия совместима только с PHP %s и выше." \ No newline at end of file diff --git a/phocadownload.php b/phocadownload.php index 3158dcf..a4d4683 100644 --- a/phocadownload.php +++ b/phocadownload.php @@ -1,248 +1,248 @@ -input->get('debug'); - $categoryExcludeStates = [ - 0 => Text::_('PLG_PHOCADOWNLOAD_EXCLUDE_CATEGORY_UNPUBLISH'), - -2 => Text::_('PLG_PHOCADOWNLOAD_EXCLUDE_CATEGORY_TRASH'), - ]; - - $filesExcludeStates = [ - 0 => Text::_('PLG_PHOCADOWNLOAD_EXCLUDE_FILE_UNPUBLISH'), - -2 => Text::_('PLG_PHOCADOWNLOAD_EXCLUDE_FILE_TRASH'), - 2 => Text::_('PLG_PHOCADOWNLOAD_EXCLUDE_FILE_ARCHIVE') - ]; - - $multilanguage = $config->get('multilanguage'); - - - $db = Factory::getDbo(); - /** - * Categories - */ - if ($this->params->get('categories_enable', 0) == 1) { - - $query = $db->getQuery(true); - $query->select('*') - ->from('#__phocadownload_categories'); - - if(!$debug_mode) - { - $query->where($db->quoteName('published') .' = '. $db->quote('1')); - } - - $query->order('ordering'); - - $db->setQuery($query); - $rows = $db->loadObjectList(); - - $nullDate = $db->getNullDate(); - $changefreq = $this->params->get('categories_changefreq', $config->get('changefreq', 'weekly')); - $priority = $this->params->get('categories_priority', $config->get('priority', '0.5')); - - // Add categories to arrays - $categories = []; - $alternates = []; - - JLoader::register('PhocaDownloadRoute', JPATH_ADMINISTRATOR . '/components/com_phocadownload/libraries/phocadownload/path/route.php'); - - foreach ($rows as $row) { - // Prepare loc attribute - - $loc = PhocaDownloadRoute::getCategoryRoute($row->id . ':' . $row->alias); - - // Prepare exclude attribute - $metadata = new Registry($row->metadata); - $exclude = []; - if (preg_match('/noindex/', $metadata->get('robots', $config->get('siteRobots')))) { - $exclude[] = array('type' => Text::_('PLG_PHOCADOWNLOAD_EXCLUDE_CATEGORY'), - 'msg' => Text::_('PLG_PHOCADOWNLOAD_EXCLUDE_CATEGORY_ROBOTS')); - } - - if (isset($categoryExcludeStates[$row->published])) { - $exclude[] = array('type' => Text::_('PLG_PHOCADOWNLOAD_EXCLUDE_CATEGORY'), - 'msg' => $categoryExcludeStates[$row->published]); - } - - if (!in_array($row->access, $config->get('guestAccess', []))) { - $exclude[] = array('type' => Text::_('PLG_PHOCADOWNLOAD_EXCLUDE_CATEGORY'), - 'msg' => Text::_('PLG_PHOCADOWNLOAD_EXCLUDE_CATEGORY_ACCESS')); - } - - // Prepare lastmod attribute - $lastmod = (!empty($row->date) && $row->date != $nullDate) ? $row->date : false; - - // Prepare category object - $category = new \stdClass(); - $category->type = Text::_('PLG_PHOCADOWNLOAD_TYPES_CATEGORY'); - $category->title = $row->title; - $category->loc = $loc; - $category->changefreq = $changefreq; - $category->priority = $priority; - $category->lastmod = $lastmod; - $category->exclude = (!empty($exclude)) ? $exclude : false; - $category->alternates = ($multilanguage && !empty($row->association)) ? $row->association : false; - - // Add category to array - $categories[] = $category; - - // Add category to alternates array - if ($multilanguage && !empty($row->association) && empty($exclude)) { - if (!isset($alternates[$row->association])) { - $alternates[$row->association] = []; - } - - $alternates[$row->association][$row->language] = $loc; - } - } - - // Add alternates to categories - if (!empty($alternates)) { - foreach ($categories as &$category) { - $category->alternates = ($category->alternates) ? $alternates[$category->alternates] : false; - } - } - - // Add categories to urls - $urls = array_merge($urls, $categories); - unset($alternates); - } - /** - * FILES - */ - if ($this->params->get('files_enable', 0) == 1 && $componentParams->get('display_file_view','0') == 1) { - $now = JFactory::getDate('now', 'UTC')->toSql(); - $query = 'SELECT * FROM ' . $db->quoteName('#__phocadownload', 'file'); - - if (!$debug_mode) { - $query .= 'WHERE ' . $db->quoteName('file.published') . ' = ' . $db->quote('1') . ' - AND ' . $db->quoteName('file.catid') . ' IN (SELECT `id` FROM ' . $db->quoteName('#__phocadownload_categories') . ' WHERE ' . $db->quoteName('published') . ' = ' . $db->quote('1') . ') - AND ( - ' . $db->quoteName('file.publish_up') . ' = ' . $db->quote($db->getNullDate()) . ' - OR ' . $db->quoteName('file.publish_up') . ' <= ' . $db->quote($now) . ') - AND (' . $db->quoteName('file.publish_down') . ' = ' . $db->quote($db->getNullDate()) . ' - OR ' . $db->quoteName('file.publish_down') . ' >= ' . $db->quote($now) . ')'; - } - - - $db->setQuery($query); - $rows = $db->loadObjectList(); - - $nullDate = $db->getNullDate(); - $changefreq = $this->params->get('files_changefreq', $config->get('changefreq', 'weekly')); - $priority = $this->params->get('files_priority', $config->get('priority', '0.5')); - - // Add categories to arrays - $files = []; - $alternates = []; - - foreach ($rows as $row) { - // Prepare loc attribute - /** - * $id, $catid = 0, $idAlias = '', $catidAlias = '', $sectionid = 0, $type = 'file' - */ - $loc = PhocaDownloadRoute::getFileRoute($row->id, $row->catid, $row->alias); - - // Prepare exclude attribute - $metadata = new Registry($row->metadata); - $exclude = []; - if (preg_match('/noindex/', $metadata->get('robots', $config->get('siteRobots')))) { - $exclude[] = ['type' => Text::_('PLG_PHOCADOWNLOAD_EXCLUDE_FILE'), - 'msg' => Text::_('PLG_PHOCADOWNLOAD_EXCLUDE_FILE_ROBOTS')]; - } - - if (isset($filesExcludeStates[$row->published])) { - $exclude[] = ['type' => Text::_('PLG_PHOCADOWNLOAD_EXCLUDE_FILE'), - 'msg' => $filesExcludeStates[$row->published]]; - } - - if ($row->approved == 0) { - $exclude[] = ['type' => Text::_('PLG_PHOCADOWNLOAD_EXCLUDE_FILE'), - 'msg' => Text::_('PLG_PHOCADOWNLOAD_EXCLUDE_FILE_NOT_APPROVED')]; - } - - if (!in_array($row->access, $config->get('guestAccess', []))) { - $exclude[] = ['type' => Text::_('PLG_PHOCADOWNLOAD_EXCLUDE_FILE'), - 'msg' => Text::_('PLG_PHOCADOWNLOAD_EXCLUDE_FILE_ACCESS')]; - } - - // Prepare lastmod attribute - $lastmod = (!empty($row->date) && $row->date != $nullDate) ? $row->date : false; - - // Prepare category object - $file = new \stdClass(); - $file->type = Text::_('PLG_PHOCADOWNLOAD_TYPES_FILE'); - $file->title = $row->title; - $file->loc = $loc; - $file->changefreq = $changefreq; - $file->priority = $priority; - $file->lastmod = $lastmod; - $file->exclude = (!empty($exclude)) ? $exclude : false; - $file->alternates = ($multilanguage && !empty($row->association)) ? $row->association : false; - - // Add category to array - $files[] = $file; - - // Add category to alternates array - if ($multilanguage && !empty($row->association) && empty($exclude)) { - if (!isset($alternates[$row->association])) { - $alternates[$row->association] = []; - } - - $alternates[$row->association][$row->language] = $loc; - } - } - - // Add alternates to categories - if (!empty($alternates)) { - foreach ($files as &$file) { - $file->alternates = ($file->alternates) ? $alternates[$file->alternates] : false; - } - } - - // Add categories to urls - $urls = array_merge($urls, $files); - } - - return $urls; - } -} +input->get('debug'); + $categoryExcludeStates = [ + 0 => Text::_('PLG_PHOCADOWNLOAD_EXCLUDE_CATEGORY_UNPUBLISH'), + -2 => Text::_('PLG_PHOCADOWNLOAD_EXCLUDE_CATEGORY_TRASH'), + ]; + + $filesExcludeStates = [ + 0 => Text::_('PLG_PHOCADOWNLOAD_EXCLUDE_FILE_UNPUBLISH'), + -2 => Text::_('PLG_PHOCADOWNLOAD_EXCLUDE_FILE_TRASH'), + 2 => Text::_('PLG_PHOCADOWNLOAD_EXCLUDE_FILE_ARCHIVE') + ]; + + $multilanguage = $config->get('multilanguage'); + + + $db = Factory::getDbo(); + /** + * Categories + */ + if ($this->params->get('categories_enable', 0) == 1) { + + $query = $db->getQuery(true); + $query->select('*') + ->from('#__phocadownload_categories'); + + if(!$debug_mode) + { + $query->where($db->quoteName('published') .' = '. $db->quote('1')); + } + + $query->order('ordering'); + + $db->setQuery($query); + $rows = $db->loadObjectList(); + + $nullDate = $db->getNullDate(); + $changefreq = $this->params->get('categories_changefreq', $config->get('changefreq', 'weekly')); + $priority = $this->params->get('categories_priority', $config->get('priority', '0.5')); + + // Add categories to arrays + $categories = []; + $alternates = []; + + JLoader::register('PhocaDownloadRoute', JPATH_ADMINISTRATOR . '/components/com_phocadownload/libraries/phocadownload/path/route.php'); + + foreach ($rows as $row) { + // Prepare loc attribute + + $loc = PhocaDownloadRoute::getCategoryRoute($row->id . ':' . $row->alias); + + // Prepare exclude attribute + $metadata = new Registry($row->metadata); + $exclude = []; + if (preg_match('/noindex/', $metadata->get('robots', $config->get('siteRobots')))) { + $exclude[] = array('type' => Text::_('PLG_PHOCADOWNLOAD_EXCLUDE_CATEGORY'), + 'msg' => Text::_('PLG_PHOCADOWNLOAD_EXCLUDE_CATEGORY_ROBOTS')); + } + + if (isset($categoryExcludeStates[$row->published])) { + $exclude[] = array('type' => Text::_('PLG_PHOCADOWNLOAD_EXCLUDE_CATEGORY'), + 'msg' => $categoryExcludeStates[$row->published]); + } + + if (!in_array($row->access, $config->get('guestAccess', []))) { + $exclude[] = array('type' => Text::_('PLG_PHOCADOWNLOAD_EXCLUDE_CATEGORY'), + 'msg' => Text::_('PLG_PHOCADOWNLOAD_EXCLUDE_CATEGORY_ACCESS')); + } + + // Prepare lastmod attribute + $lastmod = (!empty($row->date) && $row->date != $nullDate) ? $row->date : false; + + // Prepare category object + $category = new \stdClass(); + $category->type = Text::_('PLG_PHOCADOWNLOAD_TYPES_CATEGORY'); + $category->title = $row->title; + $category->loc = $loc; + $category->changefreq = $changefreq; + $category->priority = $priority; + $category->lastmod = $lastmod; + $category->exclude = (!empty($exclude)) ? $exclude : false; + $category->alternates = ($multilanguage && !empty($row->association)) ? $row->association : false; + + // Add category to array + $categories[] = $category; + + // Add category to alternates array + if ($multilanguage && !empty($row->association) && empty($exclude)) { + if (!isset($alternates[$row->association])) { + $alternates[$row->association] = []; + } + + $alternates[$row->association][$row->language] = $loc; + } + } + + // Add alternates to categories + if (!empty($alternates)) { + foreach ($categories as &$category) { + $category->alternates = ($category->alternates) ? $alternates[$category->alternates] : false; + } + } + + // Add categories to urls + $urls = array_merge($urls, $categories); + unset($alternates); + } + /** + * FILES + */ + if ($this->params->get('files_enable', 0) == 1 && $componentParams->get('display_file_view','0') == 1) { + $now = JFactory::getDate('now', 'UTC')->toSql(); + $query = 'SELECT * FROM ' . $db->quoteName('#__phocadownload', 'file'); + + if (!$debug_mode) { + $query .= 'WHERE ' . $db->quoteName('file.published') . ' = ' . $db->quote('1') . ' + AND ' . $db->quoteName('file.catid') . ' IN (SELECT `id` FROM ' . $db->quoteName('#__phocadownload_categories') . ' WHERE ' . $db->quoteName('published') . ' = ' . $db->quote('1') . ') + AND ( + ' . $db->quoteName('file.publish_up') . ' = ' . $db->quote($db->getNullDate()) . ' + OR ' . $db->quoteName('file.publish_up') . ' <= ' . $db->quote($now) . ') + AND (' . $db->quoteName('file.publish_down') . ' = ' . $db->quote($db->getNullDate()) . ' + OR ' . $db->quoteName('file.publish_down') . ' >= ' . $db->quote($now) . ')'; + } + + + $db->setQuery($query); + $rows = $db->loadObjectList(); + + $nullDate = $db->getNullDate(); + $changefreq = $this->params->get('files_changefreq', $config->get('changefreq', 'weekly')); + $priority = $this->params->get('files_priority', $config->get('priority', '0.5')); + + // Add categories to arrays + $files = []; + $alternates = []; + + foreach ($rows as $row) { + // Prepare loc attribute + /** + * $id, $catid = 0, $idAlias = '', $catidAlias = '', $sectionid = 0, $type = 'file' + */ + $loc = PhocaDownloadRoute::getFileRoute($row->id, $row->catid, $row->alias); + + // Prepare exclude attribute + $metadata = new Registry($row->metadata); + $exclude = []; + if (preg_match('/noindex/', $metadata->get('robots', $config->get('siteRobots')))) { + $exclude[] = ['type' => Text::_('PLG_PHOCADOWNLOAD_EXCLUDE_FILE'), + 'msg' => Text::_('PLG_PHOCADOWNLOAD_EXCLUDE_FILE_ROBOTS')]; + } + + if (isset($filesExcludeStates[$row->published])) { + $exclude[] = ['type' => Text::_('PLG_PHOCADOWNLOAD_EXCLUDE_FILE'), + 'msg' => $filesExcludeStates[$row->published]]; + } + + if ($row->approved == 0) { + $exclude[] = ['type' => Text::_('PLG_PHOCADOWNLOAD_EXCLUDE_FILE'), + 'msg' => Text::_('PLG_PHOCADOWNLOAD_EXCLUDE_FILE_NOT_APPROVED')]; + } + + if (!in_array($row->access, $config->get('guestAccess', []))) { + $exclude[] = ['type' => Text::_('PLG_PHOCADOWNLOAD_EXCLUDE_FILE'), + 'msg' => Text::_('PLG_PHOCADOWNLOAD_EXCLUDE_FILE_ACCESS')]; + } + + // Prepare lastmod attribute + $lastmod = (!empty($row->date) && $row->date != $nullDate) ? $row->date : false; + + // Prepare category object + $file = new \stdClass(); + $file->type = Text::_('PLG_PHOCADOWNLOAD_TYPES_FILE'); + $file->title = $row->title; + $file->loc = $loc; + $file->changefreq = $changefreq; + $file->priority = $priority; + $file->lastmod = $lastmod; + $file->exclude = (!empty($exclude)) ? $exclude : false; + $file->alternates = ($multilanguage && !empty($row->association)) ? $row->association : false; + + // Add category to array + $files[] = $file; + + // Add category to alternates array + if ($multilanguage && !empty($row->association) && empty($exclude)) { + if (!isset($alternates[$row->association])) { + $alternates[$row->association] = []; + } + + $alternates[$row->association][$row->language] = $loc; + } + } + + // Add alternates to categories + if (!empty($alternates)) { + foreach ($files as &$file) { + $file->alternates = ($file->alternates) ? $alternates[$file->alternates] : false; + } + } + + // Add categories to urls + $urls = array_merge($urls, $files); + } + + return $urls; + } +} diff --git a/phocadownload.xml b/phocadownload.xml index 7e8dc2c..49acb6d 100644 --- a/phocadownload.xml +++ b/phocadownload.xml @@ -1,106 +1,106 @@ - - - PLG_PHOCADOWNLOAD - Sergey Tolkachyov - July 2024 - Copyright (c) 2024 Sergey Tolkachyov. All rights reserved. - GNU General Public License v3.0 - info@web-tolk.ru - https://web-tolk.ru - 0.9.0 - PLG_PHOCADOWNLOAD_DESC - script.php - - en-GB/en-GB.plg_jlsitemap_phocadownload.ini - en-GB/en-GB.plg_jlsitemap_phocadownload.sys.ini - ru-RU/ru-RU.plg_jlsitemap_phocadownload.ini - ru-RU/ru-RU.plg_jlsitemap_phocadownload.sys.ini - - - phocadownload.php - phocadownload.xml - fields - language - - - -
- -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
-
- - https://web-tolk.ru/component/swjprojects/jupdate?element=jl_sitemap_phocadownload - -
+ + + PLG_PHOCADOWNLOAD + Sergey Tolkachyov + 18.07.2024 + Copyright (c) 2024 Sergey Tolkachyov. All rights reserved. + GNU General Public License v3.0 + info@web-tolk.ru + https://web-tolk.ru + 0.9.0.1 + PLG_PHOCADOWNLOAD_DESC + script.php + + en-GB/en-GB.plg_jlsitemap_phocadownload.ini + en-GB/en-GB.plg_jlsitemap_phocadownload.sys.ini + ru-RU/ru-RU.plg_jlsitemap_phocadownload.ini + ru-RU/ru-RU.plg_jlsitemap_phocadownload.sys.ini + + + phocadownload.php + phocadownload.xml + fields + language + + + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+
+ + https://web-tolk.ru/component/swjprojects/jupdate?element=jl_sitemap_phocadownload + +
diff --git a/script.php b/script.php index 16bf605..a90e59d 100644 --- a/script.php +++ b/script.php @@ -1,127 +1,127 @@ -script.php - * - * @package Joomla.Administrator - * @subpackage com_helloworld - * - * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. - * @license GNU General Public License version 2 or later; see LICENSE.txt - */ -class plgJlsitemapPhocadownloadInstallerScript -{ - /** - * This method is called after a component is installed. - * - * @param \stdClass $parent - Parent object calling this method. - * - * @return void - */ - public function install($parent) - { - - } - - /** - * This method is called after a component is uninstalled. - * - * @param \stdClass $parent - Parent object calling this method. - * - * @return void - */ - public function uninstall($parent) - { - - - } - - /** - * This method is called after a component is updated. - * - * @param \stdClass $parent - Parent object calling object. - * - * @return void - */ - public function update($parent) - { - - } - - /** - * Runs just before any installation action is performed on the component. - * Verifications and pre-requisites should run in this function. - * - * @param string $type - Type of PreFlight action. Possible values are: - * - * install - * - * update - * - * discover_install - * @param \stdClass $parent - Parent object calling object. - * - * @return void - */ - public function preflight($type, $parent) - { - - } - - - - /** - * Runs right after any installation action is performed on the component. - * - * @param string $type - Type of PostFlight action. Possible values are: - * - * install - * - * update - * - * discover_install - * @param \stdClass $parent - Parent object calling object. - * - * @return void - */ - function postflight($type, $parent) - { - $element = strtoupper($parent->get("element")); - - echo " -
-
-

".JText::_("PLG_".$element."_AFTER_".strtoupper($type))."
".JText::_("PLG_".$element)."

- ".Text::_("PLG_".$element."_DESC"); - - if($type == "update"){ - echo JText::_("PLG_".$element."_WHATS_NEW"); - } - - echo "
- - - - "; - - } +script.php + * + * @package Joomla.Administrator + * @subpackage com_helloworld + * + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. + * @license GNU General Public License version 2 or later; see LICENSE.txt + */ +class plgJlsitemapPhocadownloadInstallerScript +{ + /** + * This method is called after a component is installed. + * + * @param \stdClass $parent - Parent object calling this method. + * + * @return void + */ + public function install($parent) + { + + } + + /** + * This method is called after a component is uninstalled. + * + * @param \stdClass $parent - Parent object calling this method. + * + * @return void + */ + public function uninstall($parent) + { + + + } + + /** + * This method is called after a component is updated. + * + * @param \stdClass $parent - Parent object calling object. + * + * @return void + */ + public function update($parent) + { + + } + + /** + * Runs just before any installation action is performed on the component. + * Verifications and pre-requisites should run in this function. + * + * @param string $type - Type of PreFlight action. Possible values are: + * - * install + * - * update + * - * discover_install + * @param \stdClass $parent - Parent object calling object. + * + * @return void + */ + public function preflight($type, $parent) + { + + } + + + + /** + * Runs right after any installation action is performed on the component. + * + * @param string $type - Type of PostFlight action. Possible values are: + * - * install + * - * update + * - * discover_install + * @param \stdClass $parent - Parent object calling object. + * + * @return void + */ + function postflight($type, $parent) + { + $element = strtoupper($parent->get("element")); + + echo " +
+
+

".JText::_("PLG_".$element."_AFTER_".strtoupper($type))."
".JText::_("PLG_".$element)."

+ ".Text::_("PLG_".$element."_DESC"); + + if($type == "update"){ + echo JText::_("PLG_".$element."_WHATS_NEW"); + } + + echo "
+ + + + "; + + } } \ No newline at end of file