Это мой плагин:Joomla событие не получает срабатывает
// no direct access
defined('_JEXEC') or die('Restricted access');
// Import library dependencies
jimport('joomla.plugin.plugin');
class plgContentEya extends JPlugin
{
function plgContentEya(&$subject, $config)
{
parent::__construct($subject, $config);
}
/**
* Plugin method with the same name as the event will be called automatically.
*/
function onAfterDisplayContent(&$article, &$params, $limitstart)
{//Echo script there
echo "script works";
// Plugin code goes here.
// You can access parameters via $this->params.
return "<script src='http://widget.eya.com/sprk.1.0.2.js' type='text/javascript'></script>";
}
}
http://docs.joomla.org/Plugin/Events/Content
По их documenation
Return Value
String. Returned value from this event will be displayed in a placeholder. Most templates display this placeholder after the article separator.
Плагин получает отображается и оленья кожа выдаст ошибку, когда я установить его .. Но событие никогда срабатывает. Я не вижу его в документе
<install version="2.5" type="plugin" group="content">
<name>plg_content_eya</name>
<author>eya</author>
<creationDate>February 2013</creationDate>
<copyright>(C) 2013 Open Source Matters. All rights reserved.</copyright>
<license>GNU General Public License version 2 or later; see LICENSE.txt</license>
<authorEmail>[email protected]</authorEmail>
<authorUrl>www.eya.com</authorUrl>
<version>2.5.0</version>
<description>Adds eya plugin ot your site</description>
<files>
<filename plugin="eya">eya.php</filename>
</files>
</install>
Ваш конструктор должен называться plgContentEya, то же, что и имя класса. Вероятно, это приводит к тому, что родительский конструктор не вызывается. Не совсем уверен, хотя, но стоит попробовать. –
нет, извините, это моя опечатка .. я не уверен, что это такое .. может быть, это xml? – BlackFire27