Joomla 1.7 Plugin Development (Configuration)

To configure your joomla 1.7  plugin .

The basic XML we need to write as below :

<?xml version="1.0" encoding="utf-8"?>
<extension version="1.7" type="plugin" group="system">
    <name>plg_system_akaplugin</name>
    <author>Akash Chakrawarti</author>
    <creationDate>31 OCT 2011</creationDate>
    <copyright>Copyright (C) 2005 - 2011 Open Source Matters.</copyright>
    <license>GNU General Public License version 2 or later;</license>
    <authorEmail>aka.hot</authorEmail>
    <authorUrl>http://akashchakrawarti.wordpress.com</authorUrl>
    <version>1.7.0</version>
    <description>Plugin Joomla 1.7 </description>
    <files>
        <filename plugin="akaplugin">akaplugin.php</filename>
        <filename>index.html</filename>
    </files>
    <config>

    </config>

</extension>


As above xml you can see those are basic info with the file structure.
Note : The files which are mentioned in xml only those file will install into joomla .
Config Tag : This is the portion where you can write the parameters of the plugin that will be store into db from admin and you can use those in plugin function using appropriate function

Below are the tags which you need to write within config tag for advance parameters for your plugin :

<fields name="params">
<fieldset name="Joomla Configuration For Something">
<field    name="field name" type="text" default="" description="Some" label="lable">
</field>
<field    name="email" type="text" default="0" description="Email" label="Email">
</field>
</fieldset>

</fields>

And below is the function from core joomla to call the parameter value in plugin file :

$this->params->get('browsercache', false);

Hope This is useful post for you .

Enjoy coding :)
Aka…

Show Buttons
Hide Buttons