I'm new to Joomla. The first time I create a plugin. I am trying to create a new plugin, but it does not work. Events did not react.
Joomla version 3.4.8. PHP 5.6
My Code
plgcontenttitlere.php
defined( '_JEXEC' ) or die;
jimport('joomla.plugin.plugin');
echo 'test'; // WORKING!
class plgContentTitlere extends JPlugin
{
protected $autoloadLanguage = true;
function __construct( &$subject , $config ) {
parent::__construct($subject, $config);
echo 'TEST'; // DOESN"T WORK!
}
public function onContentPrepare($context,&$row, &$params, $limitstart) {
echo 'TEST'; // DOESN"T WORK!
}
}
File plgcontenttitlere.xml
<?xml version="1.0" encoding="utf-8"?>
<extension version="3.1" type="plugin" group="content" method="upgrade">
<name>Content - TitleRe</name>
<creationDate>March 2016</creationDate>
<copyright>Copyright (C) 2016 - Vektor Media. All rights reserved.</copyright>
<license>GNU General Public License version 2 or later; see LICENSE.txt</license>
<version>0.1.0</version>
<files>
<filename plugin="plgcontenttitlere">plgcontenttitlere.php</filename>
<filename>index.html</filename>
</files>
<config>
</config>
</extension>
As you can see the output before plugin echo 'test'
the work. But inside it does not work. error_reporting does not display an error