Skip to content

Commit

Permalink
Hot fix language constants
Browse files Browse the repository at this point in the history
  • Loading branch information
sergeytolkachyov authored Jul 22, 2024
1 parent dbf4227 commit 3a9d992
Show file tree
Hide file tree
Showing 9 changed files with 763 additions and 763 deletions.
158 changes: 79 additions & 79 deletions fields/componentparams.php
Original file line number Diff line number Diff line change
@@ -1,80 +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();
}

}
<?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;
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_PHOCADOWNLOAD_COMPONENT_PARAM_DISPLAY_FILE_VIEW',Text::_('PLG_PHOCADOWNLOAD_COMPONENT_PARAM_DISPLAY_FILE_VIEW_'.$display_file_view)).'
</div>
<div class="alert alert-'.$css_class.'">
'.Text::sprintf('PLG_PHOCADOWNLOAD_FILES_IN_SITEMAP',Text::_('PLG_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();
}

}
?>
208 changes: 104 additions & 104 deletions fields/plugininfo.php
Original file line number Diff line number Diff line change
@@ -1,105 +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();
}

<?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();
}

}
Loading

0 comments on commit 3a9d992

Please sign in to comment.