Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
  • How to create joomla plugins

    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 42
    Comment on it

    Plugin is an extension which provides a function that is associated with any trigger events. Following are the files required for creating a simple custom plugin in Joomla.

    1 myfirsttest.xml
    2 myfirsttest.php
    3 index.html

    First for creating a custom plugin we need to create an xml file which includes information about the author of plugin and what files are required for that plugin.

    <extension version="2.5" type="plugin" group="content">
            <author>Kshitiz dixit</author>
            <creationdate>december 18th, 2015</creationDate>   
            <license>GNU General Public License</license>
            <description>Simple custom plugin which prints text  in any article content.</description>
                    <filename plugin="myfirsttest">myfirsttest.php</filename>

    Next step is to create a php file which does all the work. As we are creating a content based plugin name my firsttest, so file should be saved as myfirsttest.php.

    defined('__JEXEC') or die;
    class plgContentMyfirsttest extends JPlugin
        public function onContentAfterTitle($context, &amp;$article, &amp;$params, $limitstart)
                    return "my first test plugin created successfully!";

    Next and last step is to create an index.html file in which we don't need to place any code inside that file and compress into a zip file name as

 0 Comment(s)

Sign In

Sign up using

Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: