SlideShare a Scribd company logo
1 of 25
Joomla Plugin & Module
      Develpment
           Tim Plummer
    http://twitter.com/bfsurvey
Presented at Sydney JUG 09/04/2013
What is a plugin?
What is a module?
Tools you need
 • Web Server & PHP & MySQL
   (XAMPP)
 • Text editor or IDE (Textpad /
   Notepad++ or Eclipse / Netbeans)
 • Web browser (Firefox with firebug)
Getting started with plugins
• Can be as simple as two files
  – yourplugin.xml
  – yourplugin.php
• Located in /plugins/plugintype/yourplugin
• Triggered by events
Installation XML (aka manifest)
     • yourplugin.xml file located in your
       plugin folder
     • Used when installing your plugin –
       tells Joomla all the files used, and
       the type of plugin it is.
     • Contains information about the
       plugin, such as it’s name, author,
       version number etc.
     • Has all the parameters (aka options)
Entry point
• yourplugin.php file located in your plugin
  folder
• This code is executed when the plugin runs,
  and can call other files.
• Does all the hard work
Types of plugins
•   Authentication   •   Quick Icon
•   Captcha          •   Search
•   Content          •   Smart Search (finder)
•   Editors          •   User
•   Editors-XTD      •   System
•   Extension
Plugin Event Triggers
• Authentication               • Content
   – onUserAuthenticate          –   onContentAfterDelete
   – onUserAuthorisationFail     –   onContentAfterDisplay
     ure                         –   onContentAfterSave
• Captcha                        –   onContentAfterTitle
   – onCheckAnswer               –   onContentBeforeDelete
   – onDisplay                   –   onContentBeforeDisplay
   – onInit                      –   onContentBeforeSave
                                 –   onContentChangeState
                                 –   onContentPrepare
                                 –   onContentPrepareData
                                 –   onContentPrepareForm
                                 –   onContentSearch
                                 –   onContentSearchAreas
Plugin Event Triggers…cont
• Editors                  • Extension
   –   onDisplay             –   onExtensionAfterInstall
   –   onGetContent          –   onExtensionAfterSave
   –   onGetInsertMethod     –   onExtensionAfterUninstall
   –   onInit
                             –   onExtensionAfterUpdate
   –   onSave
                             –   onExtensionBeforeInstall
   –   onSetContent
                             –   onExtensionBeforeSave
• Editors-XTD
   – onDisplay               –   onExtensionBeforeUninstall
                             –   onExtensionBeforeUpdate
Plugin Event Triggers…cont
• Quick Icon                         • System
   – onGetIcons                        –   onAfterDispatch
• Search                               –   onAfterInitialise
                                       –   onAfterRender
   – onContentSearchAreas
                                       –   onAfterRoute
   – onContentSearch
                                     • User
• Smart Search                         –   onUserAfterDelete
   –   onFinderAfterDelete             –   onUserAfterSave
   –   onFinderAfterSave               –   onUserBeforeDelete
   –   onFinderBeforeSave              –   onUserBeforeSave
   –   onFinderCategoryChangeState     –   onUserLogin
   –   onFinderChangeState             –   onUserLogout
plg_content_joomlarocks
• Hello World sucks, so instead tonight we are
  going to create a plugin called
  plg_content_joomlarocks
• This plugin will find all the “Joomla!” text in
  articles and replace it with “Joomla Rocks” and
  turn this into a link that goes to
  www.joomla.org
Set Error Reporting to Maximum
Demo time…
Getting Started with modules
• Slightly more complex than plugins,
  but still way simpler than
  components.
• Can be as little as three files (but
  usually 4+)
  – mod_yourmodule.xml
  – mod_yourmodule.php
  – helper.php
  – /tmpl/default.php
Types of modules
• Two types
  – Frontend Module (aka site)
     • /modules/yourmodule
  – Backend Module (aka administrator)
     • /administrator/modules/yourmodule
Installation XML (aka manifest)
• mod_yourmodule.xml file located in
  your module folder
• Used when installing your module –
  tells Joomla all the files used, and the
  type of module it is.
• Contains information about the
  module, such as it’s name, author,
  version number etc.
• Has all the parameters (aka options)
Entry Point
• mod_yourmodule.php file located in your
  module folder
• This code is executed when the plugin runs,
  and can call other files.
• Is lazy and makes the helper and view do all
  the work.
Helper
• helper.php file located in module folder
• Talks to the database and prepares data for
  the view.
The View
• Located in /tmpl/default.php in the module
  folder
• Presents the data to the user
• Doesn’t know where the data came from or
  how it is stored and doesn’t care (as Sargent
  Schultz would say, I know nothing!).
mod_random_article
• Tonight we are going to create an article
  mod_random_article
• This will randomly select an article and show
  the title with a link.
Demo time…
Now you are ready to start creating
  your own plugins and modules
Questions?
Tim Plummer
       @bfsurvey
tim@tamlyncreative.com.au

More Related Content

What's hot

Functional Hostnames and Why they are Bad
Functional Hostnames and Why they are BadFunctional Hostnames and Why they are Bad
Functional Hostnames and Why they are BadPuppet
 
A site in 15 minutes with yii
A site in 15 minutes with yiiA site in 15 minutes with yii
A site in 15 minutes with yiiAndy Kelk
 
Unleashing Creative Freedom with MODX - 2015-08-26 at PHP Zwolle
Unleashing Creative Freedom with MODX - 2015-08-26 at PHP Zwolle Unleashing Creative Freedom with MODX - 2015-08-26 at PHP Zwolle
Unleashing Creative Freedom with MODX - 2015-08-26 at PHP Zwolle Mark Hamstra
 
Debugging and Testing ES Systems
Debugging and Testing ES SystemsDebugging and Testing ES Systems
Debugging and Testing ES SystemsChris Birchall
 
[2 d1] elasticsearch 성능 최적화
[2 d1] elasticsearch 성능 최적화[2 d1] elasticsearch 성능 최적화
[2 d1] elasticsearch 성능 최적화Henry Jeong
 
Unleashing Creative Freedom with MODX (2015-09-03 at GroningenPHP)
Unleashing Creative Freedom with MODX (2015-09-03 at GroningenPHP)Unleashing Creative Freedom with MODX (2015-09-03 at GroningenPHP)
Unleashing Creative Freedom with MODX (2015-09-03 at GroningenPHP)Mark Hamstra
 
Shiny, Let’s Be Bad Guys: Exploiting and Mitigating the Top 10 Web App Vulner...
Shiny, Let’s Be Bad Guys: Exploiting and Mitigating the Top 10 Web App Vulner...Shiny, Let’s Be Bad Guys: Exploiting and Mitigating the Top 10 Web App Vulner...
Shiny, Let’s Be Bad Guys: Exploiting and Mitigating the Top 10 Web App Vulner...Michael Pirnat
 
RESTful Web Services
RESTful Web ServicesRESTful Web Services
RESTful Web ServicesGreg Hines
 
Firebird Interbase Database engine hacks or rtfm
Firebird Interbase Database engine hacks or rtfmFirebird Interbase Database engine hacks or rtfm
Firebird Interbase Database engine hacks or rtfmqqlan
 
Case Study of Django: Web Frameworks that are Secure by Default
Case Study of Django: Web Frameworks that are Secure by DefaultCase Study of Django: Web Frameworks that are Secure by Default
Case Study of Django: Web Frameworks that are Secure by DefaultMohammed ALDOUB
 
How dojo works
How dojo worksHow dojo works
How dojo worksAmit Tyagi
 
MongoDB at ZPUGDC
MongoDB at ZPUGDCMongoDB at ZPUGDC
MongoDB at ZPUGDCMike Dirolf
 
CSS and image optimization
CSS and image optimizationCSS and image optimization
CSS and image optimizationStoyan Stefanov
 
An Overview of HTML5 Storage
An Overview of HTML5 StorageAn Overview of HTML5 Storage
An Overview of HTML5 StoragePaul Irish
 
Two scoops of Django - Security Best Practices
Two scoops of Django - Security Best PracticesTwo scoops of Django - Security Best Practices
Two scoops of Django - Security Best PracticesSpin Lai
 
Tide - The missing web framework
Tide - The missing web frameworkTide - The missing web framework
Tide - The missing web frameworkEsteban Lorenzano
 
A slightly advanced introduction to node.js
A slightly advanced introduction to node.jsA slightly advanced introduction to node.js
A slightly advanced introduction to node.jsSudar Muthu
 
Exploiting null byte vm
Exploiting null byte vmExploiting null byte vm
Exploiting null byte vmdevanshdubey7
 
php (Hypertext Preprocessor)
php (Hypertext Preprocessor)php (Hypertext Preprocessor)
php (Hypertext Preprocessor)Chandan Das
 

What's hot (19)

Functional Hostnames and Why they are Bad
Functional Hostnames and Why they are BadFunctional Hostnames and Why they are Bad
Functional Hostnames and Why they are Bad
 
A site in 15 minutes with yii
A site in 15 minutes with yiiA site in 15 minutes with yii
A site in 15 minutes with yii
 
Unleashing Creative Freedom with MODX - 2015-08-26 at PHP Zwolle
Unleashing Creative Freedom with MODX - 2015-08-26 at PHP Zwolle Unleashing Creative Freedom with MODX - 2015-08-26 at PHP Zwolle
Unleashing Creative Freedom with MODX - 2015-08-26 at PHP Zwolle
 
Debugging and Testing ES Systems
Debugging and Testing ES SystemsDebugging and Testing ES Systems
Debugging and Testing ES Systems
 
[2 d1] elasticsearch 성능 최적화
[2 d1] elasticsearch 성능 최적화[2 d1] elasticsearch 성능 최적화
[2 d1] elasticsearch 성능 최적화
 
Unleashing Creative Freedom with MODX (2015-09-03 at GroningenPHP)
Unleashing Creative Freedom with MODX (2015-09-03 at GroningenPHP)Unleashing Creative Freedom with MODX (2015-09-03 at GroningenPHP)
Unleashing Creative Freedom with MODX (2015-09-03 at GroningenPHP)
 
Shiny, Let’s Be Bad Guys: Exploiting and Mitigating the Top 10 Web App Vulner...
Shiny, Let’s Be Bad Guys: Exploiting and Mitigating the Top 10 Web App Vulner...Shiny, Let’s Be Bad Guys: Exploiting and Mitigating the Top 10 Web App Vulner...
Shiny, Let’s Be Bad Guys: Exploiting and Mitigating the Top 10 Web App Vulner...
 
RESTful Web Services
RESTful Web ServicesRESTful Web Services
RESTful Web Services
 
Firebird Interbase Database engine hacks or rtfm
Firebird Interbase Database engine hacks or rtfmFirebird Interbase Database engine hacks or rtfm
Firebird Interbase Database engine hacks or rtfm
 
Case Study of Django: Web Frameworks that are Secure by Default
Case Study of Django: Web Frameworks that are Secure by DefaultCase Study of Django: Web Frameworks that are Secure by Default
Case Study of Django: Web Frameworks that are Secure by Default
 
How dojo works
How dojo worksHow dojo works
How dojo works
 
MongoDB at ZPUGDC
MongoDB at ZPUGDCMongoDB at ZPUGDC
MongoDB at ZPUGDC
 
CSS and image optimization
CSS and image optimizationCSS and image optimization
CSS and image optimization
 
An Overview of HTML5 Storage
An Overview of HTML5 StorageAn Overview of HTML5 Storage
An Overview of HTML5 Storage
 
Two scoops of Django - Security Best Practices
Two scoops of Django - Security Best PracticesTwo scoops of Django - Security Best Practices
Two scoops of Django - Security Best Practices
 
Tide - The missing web framework
Tide - The missing web frameworkTide - The missing web framework
Tide - The missing web framework
 
A slightly advanced introduction to node.js
A slightly advanced introduction to node.jsA slightly advanced introduction to node.js
A slightly advanced introduction to node.js
 
Exploiting null byte vm
Exploiting null byte vmExploiting null byte vm
Exploiting null byte vm
 
php (Hypertext Preprocessor)
php (Hypertext Preprocessor)php (Hypertext Preprocessor)
php (Hypertext Preprocessor)
 

Similar to Joomla plugin & module develpment - Presented at Sydney JUG 09/04/2013

Metasploitation part-1 (murtuja)
Metasploitation part-1 (murtuja)Metasploitation part-1 (murtuja)
Metasploitation part-1 (murtuja)ClubHack
 
PowerShell - Be A Cool Blue Kid
PowerShell - Be A Cool Blue KidPowerShell - Be A Cool Blue Kid
PowerShell - Be A Cool Blue KidMatthew Johnson
 
If you want to automate, you learn to code
If you want to automate, you learn to codeIf you want to automate, you learn to code
If you want to automate, you learn to codeAlan Richardson
 
Configuration management with puppet
Configuration management with puppetConfiguration management with puppet
Configuration management with puppetJakub Stransky
 
DevOops Redux Ken Johnson Chris Gates - AppSec USA 2016
DevOops Redux Ken Johnson Chris Gates  - AppSec USA 2016DevOops Redux Ken Johnson Chris Gates  - AppSec USA 2016
DevOops Redux Ken Johnson Chris Gates - AppSec USA 2016Chris Gates
 
Testing mit Codeception: Full-stack testing PHP framework
Testing mit Codeception: Full-stack testing PHP frameworkTesting mit Codeception: Full-stack testing PHP framework
Testing mit Codeception: Full-stack testing PHP frameworkSusannSgorzaly
 
Hacker Halted 2014 - RDP Fuzzing And Why the Microsoft Open Protocol Specific...
Hacker Halted 2014 - RDP Fuzzing And Why the Microsoft Open Protocol Specific...Hacker Halted 2014 - RDP Fuzzing And Why the Microsoft Open Protocol Specific...
Hacker Halted 2014 - RDP Fuzzing And Why the Microsoft Open Protocol Specific...EC-Council
 
Advanced guide to develop ajax applications using dojo
Advanced guide to develop ajax applications using dojoAdvanced guide to develop ajax applications using dojo
Advanced guide to develop ajax applications using dojoFu Cheng
 
Integrating the Solr search engine
Integrating the Solr search engineIntegrating the Solr search engine
Integrating the Solr search engineth0masr
 
Alfresco Business Reporting - Tech Talk Live 20130501
Alfresco Business Reporting - Tech Talk Live 20130501Alfresco Business Reporting - Tech Talk Live 20130501
Alfresco Business Reporting - Tech Talk Live 20130501Tjarda Peelen
 
Lessons learned while building Omroep.nl
Lessons learned while building Omroep.nlLessons learned while building Omroep.nl
Lessons learned while building Omroep.nlbartzon
 
iOS Application Penetration Testing for Beginners
iOS Application Penetration Testing for BeginnersiOS Application Penetration Testing for Beginners
iOS Application Penetration Testing for BeginnersRyanISI
 
(BDT402) Performance Profiling in Production: Analyzing Web Requests at Scale...
(BDT402) Performance Profiling in Production: Analyzing Web Requests at Scale...(BDT402) Performance Profiling in Production: Analyzing Web Requests at Scale...
(BDT402) Performance Profiling in Production: Analyzing Web Requests at Scale...Amazon Web Services
 
Lessons learned while building Omroep.nl
Lessons learned while building Omroep.nlLessons learned while building Omroep.nl
Lessons learned while building Omroep.nltieleman
 
You need a PROcess to catch running processes and their modules_v2.0
You need a PROcess to catch running processes and their modules_v2.0You need a PROcess to catch running processes and their modules_v2.0
You need a PROcess to catch running processes and their modules_v2.0Michael Gough
 
2016 09-09 - Selenium Webdriver - Fundamentals + Hands-on!
2016 09-09 - Selenium Webdriver - Fundamentals + Hands-on!2016 09-09 - Selenium Webdriver - Fundamentals + Hands-on!
2016 09-09 - Selenium Webdriver - Fundamentals + Hands-on!Alfonso Peletier
 

Similar to Joomla plugin & module develpment - Presented at Sydney JUG 09/04/2013 (20)

Metasploitation part-1 (murtuja)
Metasploitation part-1 (murtuja)Metasploitation part-1 (murtuja)
Metasploitation part-1 (murtuja)
 
PowerShell - Be A Cool Blue Kid
PowerShell - Be A Cool Blue KidPowerShell - Be A Cool Blue Kid
PowerShell - Be A Cool Blue Kid
 
If you want to automate, you learn to code
If you want to automate, you learn to codeIf you want to automate, you learn to code
If you want to automate, you learn to code
 
Configuration management with puppet
Configuration management with puppetConfiguration management with puppet
Configuration management with puppet
 
DevOops Redux Ken Johnson Chris Gates - AppSec USA 2016
DevOops Redux Ken Johnson Chris Gates  - AppSec USA 2016DevOops Redux Ken Johnson Chris Gates  - AppSec USA 2016
DevOops Redux Ken Johnson Chris Gates - AppSec USA 2016
 
Testing mit Codeception: Full-stack testing PHP framework
Testing mit Codeception: Full-stack testing PHP frameworkTesting mit Codeception: Full-stack testing PHP framework
Testing mit Codeception: Full-stack testing PHP framework
 
Hacker Halted 2014 - RDP Fuzzing And Why the Microsoft Open Protocol Specific...
Hacker Halted 2014 - RDP Fuzzing And Why the Microsoft Open Protocol Specific...Hacker Halted 2014 - RDP Fuzzing And Why the Microsoft Open Protocol Specific...
Hacker Halted 2014 - RDP Fuzzing And Why the Microsoft Open Protocol Specific...
 
Advanced guide to develop ajax applications using dojo
Advanced guide to develop ajax applications using dojoAdvanced guide to develop ajax applications using dojo
Advanced guide to develop ajax applications using dojo
 
Integrating the Solr search engine
Integrating the Solr search engineIntegrating the Solr search engine
Integrating the Solr search engine
 
Alfresco Business Reporting - Tech Talk Live 20130501
Alfresco Business Reporting - Tech Talk Live 20130501Alfresco Business Reporting - Tech Talk Live 20130501
Alfresco Business Reporting - Tech Talk Live 20130501
 
Lessons learned while building Omroep.nl
Lessons learned while building Omroep.nlLessons learned while building Omroep.nl
Lessons learned while building Omroep.nl
 
Burpsuite yara
Burpsuite yaraBurpsuite yara
Burpsuite yara
 
iOS Application Penetration Testing for Beginners
iOS Application Penetration Testing for BeginnersiOS Application Penetration Testing for Beginners
iOS Application Penetration Testing for Beginners
 
iOS Application Pentesting
iOS Application PentestingiOS Application Pentesting
iOS Application Pentesting
 
(BDT402) Performance Profiling in Production: Analyzing Web Requests at Scale...
(BDT402) Performance Profiling in Production: Analyzing Web Requests at Scale...(BDT402) Performance Profiling in Production: Analyzing Web Requests at Scale...
(BDT402) Performance Profiling in Production: Analyzing Web Requests at Scale...
 
Lessons learned while building Omroep.nl
Lessons learned while building Omroep.nlLessons learned while building Omroep.nl
Lessons learned while building Omroep.nl
 
You need a PROcess to catch running processes and their modules_v2.0
You need a PROcess to catch running processes and their modules_v2.0You need a PROcess to catch running processes and their modules_v2.0
You need a PROcess to catch running processes and their modules_v2.0
 
2016 09-09 - Selenium Webdriver - Fundamentals + Hands-on!
2016 09-09 - Selenium Webdriver - Fundamentals + Hands-on!2016 09-09 - Selenium Webdriver - Fundamentals + Hands-on!
2016 09-09 - Selenium Webdriver - Fundamentals + Hands-on!
 
PHP Profiling/performance
PHP Profiling/performancePHP Profiling/performance
PHP Profiling/performance
 
Introduction to Monsoon PHP framework
Introduction to Monsoon PHP frameworkIntroduction to Monsoon PHP framework
Introduction to Monsoon PHP framework
 

More from Tim Plummer

Aujug 2020 joomla 4 workflow
Aujug 2020 joomla 4 workflowAujug 2020 joomla 4 workflow
Aujug 2020 joomla 4 workflowTim Plummer
 
TinyMCE for Joomla
TinyMCE for JoomlaTinyMCE for Joomla
TinyMCE for JoomlaTim Plummer
 
Joomla 4 custom fields and workflow
Joomla 4 custom fields and workflowJoomla 4 custom fields and workflow
Joomla 4 custom fields and workflowTim Plummer
 
How to fix a hacked site and harden June 2019
How to fix a hacked site and harden June 2019How to fix a hacked site and harden June 2019
How to fix a hacked site and harden June 2019Tim Plummer
 
Creating your own joomla templates April 2019
Creating your own joomla templates April 2019Creating your own joomla templates April 2019
Creating your own joomla templates April 2019Tim Plummer
 
Custom fields in Joomla March 2019
Custom fields in Joomla March 2019Custom fields in Joomla March 2019
Custom fields in Joomla March 2019Tim Plummer
 
Whats new in Joomla 3.9
Whats new in Joomla 3.9Whats new in Joomla 3.9
Whats new in Joomla 3.9Tim Plummer
 
Lessons from the other side
Lessons from the other sideLessons from the other side
Lessons from the other sideTim Plummer
 
Getting the most from your social media posts on facebook and instagram
Getting the most from your social media posts on facebook and instagramGetting the most from your social media posts on facebook and instagram
Getting the most from your social media posts on facebook and instagramTim Plummer
 
Tips for site builders and administrators
Tips for site builders and administratorsTips for site builders and administrators
Tips for site builders and administratorsTim Plummer
 
Joomla 4.0 what's coming in future
Joomla 4.0   what's coming in futureJoomla 4.0   what's coming in future
Joomla 4.0 what's coming in futureTim Plummer
 
What’s new in joomla 3.7
What’s new in joomla 3.7What’s new in joomla 3.7
What’s new in joomla 3.7Tim Plummer
 
Simplify your Joomla user registration form
Simplify your Joomla user registration formSimplify your Joomla user registration form
Simplify your Joomla user registration formTim Plummer
 
How to customise Joomla
How to customise JoomlaHow to customise Joomla
How to customise JoomlaTim Plummer
 
Maintaining a joomla website - Canberra
Maintaining a joomla website - CanberraMaintaining a joomla website - Canberra
Maintaining a joomla website - CanberraTim Plummer
 
Custom fields in joomla
Custom fields in joomlaCustom fields in joomla
Custom fields in joomlaTim Plummer
 
Whats new in joomla 3.5 & whats coming in future
Whats new in joomla 3.5 & whats coming in futureWhats new in joomla 3.5 & whats coming in future
Whats new in joomla 3.5 & whats coming in futureTim Plummer
 
Joomla SEO basics 2016
Joomla SEO basics 2016Joomla SEO basics 2016
Joomla SEO basics 2016Tim Plummer
 
What's new in joomla! 3.5 - 8th Nov 2015
What's new in joomla! 3.5 - 8th Nov 2015What's new in joomla! 3.5 - 8th Nov 2015
What's new in joomla! 3.5 - 8th Nov 2015Tim Plummer
 
Cross CMS plugin development using AWF
Cross CMS plugin development using AWFCross CMS plugin development using AWF
Cross CMS plugin development using AWFTim Plummer
 

More from Tim Plummer (20)

Aujug 2020 joomla 4 workflow
Aujug 2020 joomla 4 workflowAujug 2020 joomla 4 workflow
Aujug 2020 joomla 4 workflow
 
TinyMCE for Joomla
TinyMCE for JoomlaTinyMCE for Joomla
TinyMCE for Joomla
 
Joomla 4 custom fields and workflow
Joomla 4 custom fields and workflowJoomla 4 custom fields and workflow
Joomla 4 custom fields and workflow
 
How to fix a hacked site and harden June 2019
How to fix a hacked site and harden June 2019How to fix a hacked site and harden June 2019
How to fix a hacked site and harden June 2019
 
Creating your own joomla templates April 2019
Creating your own joomla templates April 2019Creating your own joomla templates April 2019
Creating your own joomla templates April 2019
 
Custom fields in Joomla March 2019
Custom fields in Joomla March 2019Custom fields in Joomla March 2019
Custom fields in Joomla March 2019
 
Whats new in Joomla 3.9
Whats new in Joomla 3.9Whats new in Joomla 3.9
Whats new in Joomla 3.9
 
Lessons from the other side
Lessons from the other sideLessons from the other side
Lessons from the other side
 
Getting the most from your social media posts on facebook and instagram
Getting the most from your social media posts on facebook and instagramGetting the most from your social media posts on facebook and instagram
Getting the most from your social media posts on facebook and instagram
 
Tips for site builders and administrators
Tips for site builders and administratorsTips for site builders and administrators
Tips for site builders and administrators
 
Joomla 4.0 what's coming in future
Joomla 4.0   what's coming in futureJoomla 4.0   what's coming in future
Joomla 4.0 what's coming in future
 
What’s new in joomla 3.7
What’s new in joomla 3.7What’s new in joomla 3.7
What’s new in joomla 3.7
 
Simplify your Joomla user registration form
Simplify your Joomla user registration formSimplify your Joomla user registration form
Simplify your Joomla user registration form
 
How to customise Joomla
How to customise JoomlaHow to customise Joomla
How to customise Joomla
 
Maintaining a joomla website - Canberra
Maintaining a joomla website - CanberraMaintaining a joomla website - Canberra
Maintaining a joomla website - Canberra
 
Custom fields in joomla
Custom fields in joomlaCustom fields in joomla
Custom fields in joomla
 
Whats new in joomla 3.5 & whats coming in future
Whats new in joomla 3.5 & whats coming in futureWhats new in joomla 3.5 & whats coming in future
Whats new in joomla 3.5 & whats coming in future
 
Joomla SEO basics 2016
Joomla SEO basics 2016Joomla SEO basics 2016
Joomla SEO basics 2016
 
What's new in joomla! 3.5 - 8th Nov 2015
What's new in joomla! 3.5 - 8th Nov 2015What's new in joomla! 3.5 - 8th Nov 2015
What's new in joomla! 3.5 - 8th Nov 2015
 
Cross CMS plugin development using AWF
Cross CMS plugin development using AWFCross CMS plugin development using AWF
Cross CMS plugin development using AWF
 

Recently uploaded

Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024The Digital Insurer
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsRoshan Dwivedi
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 

Recently uploaded (20)

Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 

Joomla plugin & module develpment - Presented at Sydney JUG 09/04/2013

  • 1. Joomla Plugin & Module Develpment Tim Plummer http://twitter.com/bfsurvey Presented at Sydney JUG 09/04/2013
  • 2. What is a plugin?
  • 3. What is a module?
  • 4. Tools you need • Web Server & PHP & MySQL (XAMPP) • Text editor or IDE (Textpad / Notepad++ or Eclipse / Netbeans) • Web browser (Firefox with firebug)
  • 5. Getting started with plugins • Can be as simple as two files – yourplugin.xml – yourplugin.php • Located in /plugins/plugintype/yourplugin • Triggered by events
  • 6. Installation XML (aka manifest) • yourplugin.xml file located in your plugin folder • Used when installing your plugin – tells Joomla all the files used, and the type of plugin it is. • Contains information about the plugin, such as it’s name, author, version number etc. • Has all the parameters (aka options)
  • 7. Entry point • yourplugin.php file located in your plugin folder • This code is executed when the plugin runs, and can call other files. • Does all the hard work
  • 8. Types of plugins • Authentication • Quick Icon • Captcha • Search • Content • Smart Search (finder) • Editors • User • Editors-XTD • System • Extension
  • 9. Plugin Event Triggers • Authentication • Content – onUserAuthenticate – onContentAfterDelete – onUserAuthorisationFail – onContentAfterDisplay ure – onContentAfterSave • Captcha – onContentAfterTitle – onCheckAnswer – onContentBeforeDelete – onDisplay – onContentBeforeDisplay – onInit – onContentBeforeSave – onContentChangeState – onContentPrepare – onContentPrepareData – onContentPrepareForm – onContentSearch – onContentSearchAreas
  • 10. Plugin Event Triggers…cont • Editors • Extension – onDisplay – onExtensionAfterInstall – onGetContent – onExtensionAfterSave – onGetInsertMethod – onExtensionAfterUninstall – onInit – onExtensionAfterUpdate – onSave – onExtensionBeforeInstall – onSetContent – onExtensionBeforeSave • Editors-XTD – onDisplay – onExtensionBeforeUninstall – onExtensionBeforeUpdate
  • 11. Plugin Event Triggers…cont • Quick Icon • System – onGetIcons – onAfterDispatch • Search – onAfterInitialise – onAfterRender – onContentSearchAreas – onAfterRoute – onContentSearch • User • Smart Search – onUserAfterDelete – onFinderAfterDelete – onUserAfterSave – onFinderAfterSave – onUserBeforeDelete – onFinderBeforeSave – onUserBeforeSave – onFinderCategoryChangeState – onUserLogin – onFinderChangeState – onUserLogout
  • 12. plg_content_joomlarocks • Hello World sucks, so instead tonight we are going to create a plugin called plg_content_joomlarocks • This plugin will find all the “Joomla!” text in articles and replace it with “Joomla Rocks” and turn this into a link that goes to www.joomla.org
  • 13. Set Error Reporting to Maximum
  • 15. Getting Started with modules • Slightly more complex than plugins, but still way simpler than components. • Can be as little as three files (but usually 4+) – mod_yourmodule.xml – mod_yourmodule.php – helper.php – /tmpl/default.php
  • 16. Types of modules • Two types – Frontend Module (aka site) • /modules/yourmodule – Backend Module (aka administrator) • /administrator/modules/yourmodule
  • 17. Installation XML (aka manifest) • mod_yourmodule.xml file located in your module folder • Used when installing your module – tells Joomla all the files used, and the type of module it is. • Contains information about the module, such as it’s name, author, version number etc. • Has all the parameters (aka options)
  • 18. Entry Point • mod_yourmodule.php file located in your module folder • This code is executed when the plugin runs, and can call other files. • Is lazy and makes the helper and view do all the work.
  • 19. Helper • helper.php file located in module folder • Talks to the database and prepares data for the view.
  • 20. The View • Located in /tmpl/default.php in the module folder • Presents the data to the user • Doesn’t know where the data came from or how it is stored and doesn’t care (as Sargent Schultz would say, I know nothing!).
  • 21. mod_random_article • Tonight we are going to create an article mod_random_article • This will randomly select an article and show the title with a link.
  • 23. Now you are ready to start creating your own plugins and modules
  • 25. Tim Plummer @bfsurvey tim@tamlyncreative.com.au