A to Z of Joomla Plugin

25 May 2014, 12:00 am Written by  Golam Rabbani
Published in Blog
Read 96873 times

What is joomla?


Joomla is a free and open source content management system (CMS) designed to assist users in building websites and other online applications. It is offered under the General Public License (GPL) version 2.0.Joomla is a continuation of the work of the development team that unanimously resigned from the Mambo project in August 2005.Joomla version 1.0 is derived from Mambo 4.5.2.3 but includes many additional bug fixes and security patches.
            
The Joomla Web CMS is considered to be a popular choice for many types of websites, such as: personal sites, corporate sites, small business sites, news or blogs, government applications and sites where secure logins are required. The ecosystem of Joomla developers and users provide products and services to the Joomla community which has more than 1.5 million members and more than 20,000 developers.


What does "Joomla version" means?


Joomla version means the  every updated release of joomla in several times. Those updates or changes are done due to make joomla more useable, secure & user-friendly. the following chart shows the history of joomla version:



                 Joomla versions

Version       Release date        Supported until

1.0       2005-09-22        2009-07-22  Release no longer supported
1.5 (LTS)  2008-01-22        2012-12-01     "    "    "      "      
1.6       2011-01-10        2011-08-19     "    "    "      "        
1.7        2011-07-19        2012-02-24     "    "    "      "    

2.5 (LTS)  2012-01-24        2014-12-31  Release still supported        

3.0       2012-09-27        2013-04     Release no longer supported
3.1       2013-04-24        2013-10        "    "    "      "
3.2       2013-11-06        2014-04        "    "    "      "
3.3       2014-04-30        2014-10     Release still supported
3.5 (LTS)  2014-09                      Future release    

4.0       2015-03                      "      "    
4.1       2015-09                      "      "
4.2       2016-03                      "      "
4.5 (LTS)  2016-09                      "      "

                     


                  
What is Joomla plugin?


A Joomla plugin is a small, but important combination of relevant code that manipulates a default Joomla function before it’s looked or worked. Joomla plugins are generally created by 3rd party developers like us, and are widely used to extend and customize the users experience. In other words, Plugins provide functions which are associated with trigger events.



How do joomla Plugins Work?


Plugins work in three steps, as follows:

1. One or more plugin files are included into the current script, usually with the JPluginHelper::importPlugin() method. Because plugins are normally class declarations, no code is executed at this point.

2. An event is triggered, usually with the $dispatcher->trigger() method (where $dispatcher is a JDispatcher object). Each event has a name, such as onBeforeInitialise or onContentBeforeSave.

3. The event processing code looks for any enabled plugins that are currently loaded that have a method that matches the event name. If any matching methods are found, they are executed.



How to create my first joomla plugin for 2.5?




Step 1: Create the Plugin Files

All Joomla 2.5 plugins contain a xml file. These xml files contain information such as who wrote the plugin and when, what files should be included with the plugin, and any plugin settings that can be adjusted. The first thing you should do is copy the following text and save it as  "helloworld.xml"


<?xml version="1.0" encoding="utf-8"?>
<extension version="2.5" type="plugin" group="content">
        <name>plg_content_helloworld</name>
        <author>Brad Markle</author>
        <creationDate>June 18th, 2012</creationDate>
        <copyright>InMotion Hosting</copyright>
        <license>GNU General Public License</license>
        <authorEmail>This email address is being protected from spambots. You need JavaScript enabled to view it.</authorEmail>
        <authorUrl>http://www.inmotionhosting.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>


Step 2: After creating the XML file, we now need to create our php file, which does all of the work. The following code should be saved to "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>";
        }
}

?>



Step 3: The last file we need to create is one named "index.html". You don't need to place any code in the file, you simply need to create it.


At this stage, you should have the following files:


   helloworld.xml
   helloworld.php
   index.html

Step 4: Compress all of these files into a zip file named "helloworld.zip"


credit: http://www.inmotionhosting.com/support/edu/joomla-25/create-plugin/hello-world



How to install Joomla Plugin for 2.5?



step 1: Log into your Joomla Dashboard

step 2: In the top menu, hover over Extensions and click Extension Manager

step 3: Under Upload Package Manager, click Browse and find the plugin you downloaded to your computer. After clicking on the plugin          name, click Open, and then click Upload & Install.When the plugin has been uploaded and installed successfully, you will see          a confirmation message

step 4: At this point you have successfully uploaded and installed a plugin! Plugins are not enabled by default, so our next step is          to configure and enabled our plugin. In the top menu, hover over Extensions and click Plug-In Manager

step 5: Use the Filter feature to find your plugin, and then click on the plugin in the list below

step 6: On the Plug-in Manager page, set Status to Enabled, configure any of the other settings available with the plugin, and then           click Save & Close

Congratulations, you have just downloaded, installed, configured, and enabled a Joomla 2.5 Plugin!


credit: http://www.inmotionhosting.com/support/edu/joomla-25/extensions/how-to-install-a-plugin



15 most rated joomla Pluging ever made!



    (1) JSitemap
    (2) Advanced Module Manager
    (3) Recently Hit Articles
    (4) Tabs
    (5) Commedia
    (6) Sourcerer
    (7) Modals
    (8) EasySocial
    (9) Articles Anywhere
   (10) Ads Elite
   (11) Multiple Customfields Filter for Virtuemart
   (12) QuickSell File Seller
   (13) Modules Anywhere
   (14) Autostand
   (15) Product Share

click here (url: http://extensions.joomla.org/extensions/top-rated) to download them.    




credit: http://extensions.joomla.org/extensions/top-rated



Reference:

credit:http://www.webopedia.com/TERM/J/Joomla.html
credit: http://en.wikipedia.org/wiki/Joomla  

credit: http://my.safaribooksonline.com/book/web-development/joomla/9780132780841/extending-joomla-with-plugins/ch05lev1sec2


Thank you for for reading our article. If you are satisfied, then share your feelings with us in comment box.

Rate this item
(0 votes)
Login to post comments
Google+