I am new to Joomla plugin development and I am trying to build a basic Hello World plugin.
What I want is for the text "Hello World" to appear in the front-end after the article title.
I am running Joomla 3.3.6.
The following is my code base:
/helloworld/
helloworld.xml
<?xml version="1.0" encoding="utf-8"?>
<extension version="3.3" type="plugin" group="content" method="upgrade">
<name>plg_content_helloworld</name>
<author>Test Author</author>
<creationDate>04/02/2015</creationDate>
<copyright>None</copyright>
<license>GNU General Public License</license>
<authorEmail>me@memail.com</authorEmail>
<authorUrl>http://www.example.com</authorUrl>
<version>1.0</version>
<description>Simple Hello World Plugin that prints "Hello World" at the beginning of every article.</description>
<files>
<filename plugin="helloworld">helloworld.php</filename>
<filename>index.html</filename>
</files>
</extension>
- helloworld.php
<?php
// no direct access
defined('_JEXEC') or die;
class plgContentHelloworld extends JPlugin
{
public function onContentAfterTitle($context, &$article, &$params, $limitstart)
{
return "<p>Hello World!</p>";
}
}
?>
- Empty index.html
I have set the "Show Intro Text" value on the article to all possible values and it still does not work. I am also struggling to find any decent resources online for Joomla Plugin creation. Does anyone know of any?