SlideShare une entreprise Scribd logo
1  sur  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

Contenu connexe

Tendances

Debugging and Testing ES Systems
Debugging and Testing ES SystemsDebugging and Testing ES Systems
Debugging and Testing ES Systems
Chris Birchall
 
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
 
An Overview of HTML5 Storage
An Overview of HTML5 StorageAn Overview of HTML5 Storage
An Overview of HTML5 Storage
Paul Irish
 

Tendances (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)
 

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

Lessons learned while building Omroep.nl
Lessons learned while building Omroep.nlLessons learned while building Omroep.nl
Lessons learned while building Omroep.nl
bartzon
 

Similaire à 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
 

Plus de Tim Plummer

Plus de 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
 

Dernier

Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
WSO2
 

Dernier (20)

Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Cyberprint. Dark Pink Apt Group [EN].pdf
Cyberprint. Dark Pink Apt Group [EN].pdfCyberprint. Dark Pink Apt Group [EN].pdf
Cyberprint. Dark Pink Apt Group [EN].pdf
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf
 
AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistan
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 

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