SlideShare a Scribd company logo
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 Bad
Puppet
 
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
Andy 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 Systems
Chris 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 Services
Greg 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 rtfm
qqlan
 
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
Mohammed ALDOUB
 
How dojo works
How dojo worksHow dojo works
How dojo works
Amit Tyagi
 
MongoDB at ZPUGDC
MongoDB at ZPUGDCMongoDB at ZPUGDC
MongoDB at ZPUGDC
Mike Dirolf
 
CSS and image optimization
CSS and image optimizationCSS and image optimization
CSS and image optimization
Stoyan Stefanov
 
An Overview of HTML5 Storage
An Overview of HTML5 StorageAn Overview of HTML5 Storage
An Overview of HTML5 Storage
Paul 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 Practices
Spin Lai
 
Tide - The missing web framework
Tide - The missing web frameworkTide - The missing web framework
Tide - The missing web framework
Esteban 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.js
Sudar Muthu
 
Exploiting null byte vm
Exploiting null byte vmExploiting null byte vm
Exploiting null byte vm
devanshdubey7
 
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 Kid
Matthew 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 code
Alan Richardson
 
Configuration management with puppet
Configuration management with puppetConfiguration management with puppet
Configuration management with puppet
Jakub 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 2016
Chris 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 framework
SusannSgorzaly
 
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 dojo
Fu Cheng
 
Integrating the Solr search engine
Integrating the Solr search engineIntegrating the Solr search engine
Integrating the Solr search engine
th0masr
 
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
Tjarda Peelen
 
Lessons learned while building Omroep.nl
Lessons learned while building Omroep.nlLessons learned while building Omroep.nl
Lessons learned while building Omroep.nl
bartzon
 
Burpsuite yara
Burpsuite yaraBurpsuite yara
Burpsuite yara
Rinaldi Rampen
 
iOS Application Penetration Testing for Beginners
iOS Application Penetration Testing for BeginnersiOS Application Penetration Testing for Beginners
iOS Application Penetration Testing for Beginners
RyanISI
 
iOS Application Pentesting
iOS Application PentestingiOS Application Pentesting
iOS Application Pentesting
n|u - The Open Security Community
 
(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.nl
tieleman
 
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
Michael 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
 
PHP Profiling/performance
PHP Profiling/performancePHP Profiling/performance
PHP Profiling/performance
Nicolas Degardin
 
Introduction to Monsoon PHP framework
Introduction to Monsoon PHP frameworkIntroduction to Monsoon PHP framework
Introduction to Monsoon PHP framework
Krishna Srikanth Manda
 

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 workflow
Tim Plummer
 
TinyMCE for Joomla
TinyMCE for JoomlaTinyMCE for Joomla
TinyMCE for Joomla
Tim Plummer
 
Joomla 4 custom fields and workflow
Joomla 4 custom fields and workflowJoomla 4 custom fields and workflow
Joomla 4 custom fields and workflow
Tim 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 2019
Tim 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 2019
Tim Plummer
 
Custom fields in Joomla March 2019
Custom fields in Joomla March 2019Custom fields in Joomla March 2019
Custom fields in Joomla March 2019
Tim Plummer
 
Whats new in Joomla 3.9
Whats new in Joomla 3.9Whats new in Joomla 3.9
Whats new in Joomla 3.9
Tim Plummer
 
Lessons from the other side
Lessons from the other sideLessons from the other side
Lessons from the other side
Tim 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 instagram
Tim Plummer
 
Tips for site builders and administrators
Tips for site builders and administratorsTips for site builders and administrators
Tips for site builders and administrators
Tim 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 future
Tim 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.7
Tim Plummer
 
Simplify your Joomla user registration form
Simplify your Joomla user registration formSimplify your Joomla user registration form
Simplify your Joomla user registration form
Tim Plummer
 
How to customise Joomla
How to customise JoomlaHow to customise Joomla
How to customise Joomla
Tim Plummer
 
Maintaining a joomla website - Canberra
Maintaining a joomla website - CanberraMaintaining a joomla website - Canberra
Maintaining a joomla website - Canberra
Tim Plummer
 
Custom fields in joomla
Custom fields in joomlaCustom fields in joomla
Custom fields in joomla
Tim 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 future
Tim Plummer
 
Joomla SEO basics 2016
Joomla SEO basics 2016Joomla SEO basics 2016
Joomla SEO basics 2016
Tim 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 2015
Tim Plummer
 
Cross CMS plugin development using AWF
Cross CMS plugin development using AWFCross CMS plugin development using AWF
Cross CMS plugin development using AWF
Tim 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

Climate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing DaysClimate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing Days
Kari Kakkonen
 
Infrastructure Challenges in Scaling RAG with Custom AI models
Infrastructure Challenges in Scaling RAG with Custom AI modelsInfrastructure Challenges in Scaling RAG with Custom AI models
Infrastructure Challenges in Scaling RAG with Custom AI models
Zilliz
 
Communications Mining Series - Zero to Hero - Session 1
Communications Mining Series - Zero to Hero - Session 1Communications Mining Series - Zero to Hero - Session 1
Communications Mining Series - Zero to Hero - Session 1
DianaGray10
 
“I’m still / I’m still / Chaining from the Block”
“I’m still / I’m still / Chaining from the Block”“I’m still / I’m still / Chaining from the Block”
“I’m still / I’m still / Chaining from the Block”
Claudio Di Ciccio
 
20240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 202420240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 2024
Matthew Sinclair
 
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
名前 です男
 
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
Edge AI and Vision Alliance
 
National Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practicesNational Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practices
Quotidiano Piemontese
 
Removing Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software FuzzingRemoving Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software Fuzzing
Aftab Hussain
 
Uni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdfUni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems S.M.S.A.
 
Building Production Ready Search Pipelines with Spark and Milvus
Building Production Ready Search Pipelines with Spark and MilvusBuilding Production Ready Search Pipelines with Spark and Milvus
Building Production Ready Search Pipelines with Spark and Milvus
Zilliz
 
Artificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopmentArtificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopment
Octavian Nadolu
 
Programming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup SlidesProgramming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup Slides
Zilliz
 
TrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy SurveyTrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy Survey
TrustArc
 
20240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 202420240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 2024
Matthew Sinclair
 
HCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAUHCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAU
panagenda
 
Presentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of GermanyPresentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of Germany
innovationoecd
 
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAUHCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
panagenda
 
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
Neo4j
 
Best 20 SEO Techniques To Improve Website Visibility In SERP
Best 20 SEO Techniques To Improve Website Visibility In SERPBest 20 SEO Techniques To Improve Website Visibility In SERP
Best 20 SEO Techniques To Improve Website Visibility In SERP
Pixlogix Infotech
 

Recently uploaded (20)

Climate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing DaysClimate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing Days
 
Infrastructure Challenges in Scaling RAG with Custom AI models
Infrastructure Challenges in Scaling RAG with Custom AI modelsInfrastructure Challenges in Scaling RAG with Custom AI models
Infrastructure Challenges in Scaling RAG with Custom AI models
 
Communications Mining Series - Zero to Hero - Session 1
Communications Mining Series - Zero to Hero - Session 1Communications Mining Series - Zero to Hero - Session 1
Communications Mining Series - Zero to Hero - Session 1
 
“I’m still / I’m still / Chaining from the Block”
“I’m still / I’m still / Chaining from the Block”“I’m still / I’m still / Chaining from the Block”
“I’m still / I’m still / Chaining from the Block”
 
20240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 202420240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 2024
 
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
 
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
 
National Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practicesNational Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practices
 
Removing Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software FuzzingRemoving Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software Fuzzing
 
Uni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdfUni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdf
 
Building Production Ready Search Pipelines with Spark and Milvus
Building Production Ready Search Pipelines with Spark and MilvusBuilding Production Ready Search Pipelines with Spark and Milvus
Building Production Ready Search Pipelines with Spark and Milvus
 
Artificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopmentArtificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopment
 
Programming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup SlidesProgramming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup Slides
 
TrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy SurveyTrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy Survey
 
20240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 202420240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 2024
 
HCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAUHCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAU
 
Presentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of GermanyPresentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of Germany
 
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAUHCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
 
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
 
Best 20 SEO Techniques To Improve Website Visibility In SERP
Best 20 SEO Techniques To Improve Website Visibility In SERPBest 20 SEO Techniques To Improve Website Visibility In SERP
Best 20 SEO Techniques To Improve Website Visibility In SERP
 

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