-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/main'
# Conflicts: # fields/plugininfo.php # language/en-GB/en-GB.plg_jlsitemap_phocadownload.ini # language/en-GB/plg_jlsitemap_phocadownload.sys.ini # language/ru-RU/plg_jlsitemap_phocadownload.sys.ini # phocadownload.xml # script.php # src/Extension/Phocadownload.php # src/Fields/ComponentparamsField.php
- Loading branch information
Showing
9 changed files
with
347 additions
and
333 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,105 @@ | ||
<?php | ||
/** | ||
* @package WebTolk plugin info field | ||
* @version 1.0.0 | ||
* @Author Sergey Tolkachyov, https://web-tolk.ru | ||
* @copyright Copyright (C) 2020 Sergey Tolkachyov | ||
* @license GNU/GPL http://www.gnu.org/licenses/gpl-2.0.html | ||
* @since 1.0.0 | ||
*/ | ||
|
||
defined('_JEXEC') or die; | ||
|
||
use Joomla\CMS\Form\FormHelper; | ||
use Joomla\CMS\HTML\HTMLHelper; | ||
use Joomla\CMS\Plugin\PluginHelper; | ||
use Joomla\CMS\Language\Text; | ||
use \Joomla\CMS\Factory; | ||
FormHelper::loadFieldClass('spacer'); | ||
|
||
class JFormFieldPlugininfo extends JFormFieldSpacer | ||
{ | ||
|
||
protected $type = 'plugininfo'; | ||
|
||
/** | ||
* Method to get the field input markup for a spacer. | ||
* The spacer does not have accept input. | ||
* | ||
* @return string The field input markup. | ||
* | ||
* @since 1.7.0 | ||
*/ | ||
protected function getInput() | ||
{ | ||
$data = $this->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 = '</div> | ||
<div class="wt-b24-plugin-info"> | ||
<div class="plugin-info-img"> | ||
<a href="https://web-tolk.ru" target="_blank"> | ||
<svg width="200" height="50" xmlns="http://www.w3.org/2000/svg"> | ||
<g> | ||
<title>Go to https://web-tolk.ru</title> | ||
<text font-weight="bold" xml:space="preserve" text-anchor="start" font-family="Helvetica, Arial, sans-serif" font-size="32" id="svg_3" y="36.085949" x="8.152073" stroke-opacity="null" stroke-width="0" stroke="#000" fill="#0fa2e6">Web</text> | ||
<text font-weight="bold" xml:space="preserve" text-anchor="start" font-family="Helvetica, Arial, sans-serif" font-size="32" id="svg_4" y="36.081862" x="74.239105" stroke-opacity="null" stroke-width="0" stroke="#000" fill="#384148">Tolk</text> | ||
</g> | ||
</svg> | ||
</a> | ||
</div> | ||
<div style="padding: 0px 15px;"> | ||
<span class="label label-success">v.'. $wt_plugin_info->version.'</span> | ||
'. Text::_("PLG_".$element."_DESC") .' | ||
</div> | ||
</div><div>'; | ||
|
||
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(); | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +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_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 <code>Display File View</code> parameter of the Phoca Download component is <code>%s</code>. 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 <strong>%s</strong>."; | ||
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" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 = "Параметр <code>Display File View</code> компонента Phoca Download равен <code>%s</code>. Включение файлов в карту сайта имеет смысл только в том случае, если у пользователей есть возможность перейти на подробную страницу информации о файле. Если этой возможности нет или информация показывается только во всплывающем (модальном) окне - не включайте файлы в карту сайта." | ||
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 = "Добавление файлов в карту сайта <strong>%s</strong>."; | ||
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 = "Параметр <code>Display File View</code> компонента Phoca Download равен <code>%s</code>. Включение файлов в карту сайта имеет смысл только в том случае, если у пользователей есть возможность перейти на подробную страницу информации о файле. Если этой возможности нет или информация показывается только во всплывающем (модальном) окне - не включайте файлы в карту сайта." | ||
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 = "Добавление файлов в карту сайта <strong>%s</strong>."; | ||
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 = "Файл не одобрен" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.