|
10 | 10 | **/ |
11 | 11 | defined('_JEXEC') or die; |
12 | 12 |
|
| 13 | +use Joomla\CMS\HTML\HTMLHelper; |
| 14 | + |
13 | 15 | jimport('joomla.plugin.plugin'); |
14 | 16 |
|
15 | 17 | if (version_compare(JVERSION, '3.5.0', 'ge')) { |
@@ -37,8 +39,8 @@ class PlgJLLikeHelper |
37 | 39 |
|
38 | 40 | /** |
39 | 41 | * Пример вывода лайков в любом месте макетов, шаблонов и т.п. |
40 | | - * require_once JPATH_ROOT .'plugins/content/jllikepro/helper.php'; |
41 | | - * $helper = PlgJLLikeProHelper::getInstance(); |
| 42 | + * require_once JPATH_ROOT .'plugins/content/jllike/helper.php'; |
| 43 | + * $helper = PlgJLLikeHelper::getInstance(); |
42 | 44 | * $helper->loadScriptAndStyle(0); //1-если в категории, 0-если в контенте |
43 | 45 | * echo $helper->ShowIN($id, $link, $title, $image, $desc, $enable_opengraph); |
44 | 46 | */ |
@@ -256,16 +258,15 @@ function loadScriptAndStyle($isCategory = 1) |
256 | 258 |
|
257 | 259 | $doc->addScriptDeclaration($script); |
258 | 260 |
|
259 | | - JHtml::_('jquery.framework'); |
260 | | - |
261 | | - $doc->addScript(JURI::base() . "plugins/content/jllike/js/buttons.min.js?12"); |
| 261 | + JHtml::_('jquery.framework'); |
| 262 | + |
| 263 | + HTMLHelper::_('script', 'plugins/content/jllike/js/buttons.min.js', array('version' => 'auto')); |
262 | 264 |
|
263 | 265 | if ($this->params->get('enable_twit', 0)) { |
264 | | - $doc->addScript(JURI::base() . "plugins/content/jllike/js/twit.min.js"); |
| 266 | + HTMLHelper::_('script', 'plugins/content/jllike/js/twit.min.js', array('version' => 'auto')); |
265 | 267 | } |
266 | 268 |
|
267 | | - |
268 | | - $doc->addStyleSheet(JURI::base() . "plugins/content/jllike/js/buttons.min.css?12"); |
| 269 | + HTMLHelper::_('stylesheet', 'plugins/content/jllike/js/buttons.min.css', array('version' => 'auto')); |
269 | 270 |
|
270 | 271 | $btn_border_radius = (int) $this->params->get('btn_border_radius', 15); |
271 | 272 | $btn_dimensions = (int) $this->params->get('btn_dimensions', 30); |
|
0 commit comments