-
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.
- Loading branch information
1 parent
ddf4522
commit 94aa6c2
Showing
11 changed files
with
775 additions
and
1 deletion.
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,3 @@ | ||
.idea | ||
.phing | ||
.packages |
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,2 +1,3 @@ | ||
# JL-Sitemap---Phoca-Download---Joomla-plugin | ||
[]() []() []() []() []() [](https://web-tolk.ru/en/dev/joomla-plugins/jlsitemap-phoca-download-joomla-plugin?utm_source=github) | ||
# JL Sitemap - Phoca-Download | ||
Plugin provider of the Phoca Download component data for the JL Sitemap static XML site map component |
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,80 @@ | ||
<?php | ||
/** | ||
* @package WebTolk plugin info field | ||
* @version 0.9.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; | ||
use Joomla\Registry\Registry; | ||
FormHelper::loadFieldClass('spacer'); | ||
|
||
class JFormFieldComponentparams extends JFormFieldSpacer | ||
{ | ||
|
||
protected $type = 'componentparams'; | ||
|
||
/** | ||
* 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() | ||
{ | ||
$componentParams = JComponentHelper::getParams('com_phocadownload'); | ||
$display_file_view = $componentParams->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 = ' | ||
</div> | ||
<div class="alert alert-info"> | ||
'.Text::sprintf('PLG_JLSITEMAP_PHOCADOWNLOAD_COMPONENT_PARAM_DISPLAY_FILE_VIEW',Text::_('PLG_JLSITEMAP_PHOCADOWNLOAD_COMPONENT_PARAM_DISPLAY_FILE_VIEW_'.$display_file_view)).' | ||
</div> | ||
<div class="alert alert-'.$css_class.'"> | ||
'.Text::sprintf('PLG_JLSITEMAP_PHOCADOWNLOAD_FILES_IN_SITEMAP',Text::_('PLG_JLSITEMAP_PHOCADOWNLOAD_FILES_IN_SITEMAP_'.$files_in_sitemap)).' | ||
</div> | ||
<div> | ||
'; | ||
} | ||
|
||
/** | ||
* @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,105 @@ | ||
<?php | ||
/** | ||
* @package WebTolk plugin info field | ||
* @version 0.9.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_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 <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_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 <strong>%s</strong>."; | ||
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_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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +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="<h4>It may be interesting</h4><ul class=\"nav nav-tabs nav-stacked list-group\"><li class=\"list-group-item\"><a href=\"https://web-tolk.ru/en/dev/web-assets\" target=\"_blank\" title=\"Go to https://web-tolk.ru\">Joomla 4 & Joomla 5 Web Assets.</a></li><li class=\"list-group-item\"><a href=\"https://web-tolk.ru/en/dev/joomshopping\" target=\"_blank\" title=\"Go to https://web-tolk.ru\">JoomShopping extensions</a></li><li class=\"list-group-item\"><a href=\"https://web-tolk.ru/en/dev/joomla-plugins\" target=\"_blank\" title=\"Go to https://web-tolk.ru\">Joomla plugins</a></li><li class=\"list-group-item\"><a href=\"https://web-tolk.ru/en/dev/joomla-modules\" target=\"_blank\" title=\"Go to https://web-tolk.ru\">Joomla modules</a></li><li class=\"list-group-item\"><a href=\"https://web-tolk.ru/en/dev/components\" target=\"_blank\" title=\"Go to https://web-tolk.ru\">Joomla components</a></li><li class=\"list-group-item\"><a href=\"https://web-tolk.ru/en/dev/joomla-libraries\" target=\"_blank\" title=\"Go to https://web-tolk.ru\">Joomla libraries for developers.</a></li></ul>" | ||
PLG_PHOCADOWNLOAD_WHATS_NEW="<h3>v.0.9.0 What's new?</h3><h4>Initial version</h4><p>First extension version for Joomla 3.</p><p>Download <a href=\"https://www.phoca.cz/phocadownload\" target=\"_blank\">Phoca Download</a></p>" | ||
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" |
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,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_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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +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="<h4>Может быть интересно</h4><ul class=\"nav nav-tabs nav-stacked list-group\"><li class=\"list-group-item\"><a href=\"https://web-tolk.ru/dev/web-assets\" target=\"_blank\" title=\"Перейти на https://web-tolk.ru\">Joomla 4 & Joomla 5 Web Assets</a></li><li class=\"list-group-item\"><a href=\"https://web-tolk.ru/dev/joomshopping\" target=\"_blank\" title=\"Перейти на https://web-tolk.ru\">Расширения для JoomShopping</a></li><li class=\"list-group-item\"><a href=\"https://web-tolk.ru/dev/joomla-plugins\" target=\"_blank\" title=\"Перейти на https://web-tolk.ru\">Плагины Joomla</a></li><li class=\"list-group-item\"><a href=\"https://web-tolk.ru/dev/joomla-modules\" target=\"_blank\" title=\"Перейти на https://web-tolk.ru\">Модули Joomla</a></li><li class=\"list-group-item\"><a href=\"https://web-tolk.ru/dev/components\" target=\"_blank\" title=\"Перейти на https://web-tolk.ru\">Компоненты Joomla</a></li><li class=\"list-group-item\"><a href=\"https://web-tolk.ru/dev/biblioteki\" target=\"_blank\" title=\"Перейти на https://web-tolk.ru\">Библиотеки Joomla для разработчиков</a></li></ul>" | ||
PLG_PHOCADOWNLOAD_WHATS_NEW="<h3>v.0.9.0 Что нового?</h3><h4>Первая версия</h4><p>Первая версия расширения для Joomla 3.</p><p>Скачать <a href=\"https://www.phoca.cz/phocadownload\" target=\"_blank\">Phoca Download</a></p>" | ||
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 и выше." |
Oops, something went wrong.