Very simple plugin for Joomla to get you started.

I see a need of basic functional Joomla plugin example. New developers can use this to get them started.

I made simple plugin for this that looks for tag in article and replaces it. Param’s, field and fieldset are also used.

Download install package for joomla 1.7 and 1.6 here


// No direct access.
defined('_JEXEC') or die;


class plgContentSimpleplugin extends JPlugin

        public function __construct(& $subject, $config)
                parent::__construct($subject, $config);

        public function onContentPrepare($context, &$article, &$params, $page=0)
                $orig='/' . $this->params->get('original') . '/';

                $article->text = preg_replace($orig, $repl, $article->text);

                return true;


<?xml version="1.0" encoding="utf-8"?>
<extension version="1.7" type="plugin" group="content">
        <name>Content - Simple plugin</name>
        <author>Margus Pala</author>
        <description>Simple plugin that modifies article and helps you to get started. See</description>
                <filename plugin="simpleplugin">simpleplugin.php</filename>
                <fields name="params">
                        <fieldset name="basic">
                                <field name="original" type="text" default="replaceme" label="Original regex" description="Regex of what to replace" ></field>
                                <field name="replaced" type="text" default="youarereplaced" label="Replaced value" description="What must be written instead of original" ></field>


Leave a Reply

Your email address will not be published.