SlideShare a Scribd company logo
1 of 31
Develop Advance Joomla! MVC Component
for version 3.x
Gunjan Patel
Sr. PHP Developer
Joomla! Bug Squad Member
Joomla! SQL Optimisation team coordinator
Google Summer Of Code 2014 Mentor
Joomla! User Network Ahmedabad
Meet my Joomla! Family
gunjan.ce2009@gmail.com
Time to play with the Database
Joomla! User Network Ahmedabad Gunjan Patel @ergunjanpatel
Joomla! User Network Ahmedabad Gunjan Patel @ergunjanpatel
Create two files:
1. admin/sql/install.mysql.utf8.sql
2. admin/sql/updates/mysql/0.0.6.sql
Important:
#__schemas table will be used
for upgrades
Joomla! User Network Ahmedabad Gunjan Patel @ergunjanpatel
Adding a new field type: type="helloworld"
Field file path
Field Custom Type:
helloworld
Notice that it was
Before list
Let’s create field at admin/models/fields/helloworld.php
Joomla! User Network Ahmedabad Gunjan Patel @ergunjanpatel
Parent field type
Same as filename
File Name should be same as
Field type name
Class name prefix
Should be same as filename
Continue with… admin/models/fields/helloworld.php
Joomla! User Network Ahmedabad Gunjan Patel @ergunjanpatel
Overriding parent class for
HTML select list options.
Get Database Object
Joomla Query Language
functions
Looping to create options array
JHTML options type value text
Display the chosen message from field type in
menu using Database Table
Joomla! User Network Ahmedabad Gunjan Patel @ergunjanpatel
Joomla! User Network Ahmedabad Gunjan Patel @ergunjanpatel
Create the admin/tables/helloworld.php file
Table Name
Primary Key
Joomla! User Network Ahmedabad Gunjan Patel @ergunjanpatel
Modify the site/models/helloworld.php file
Return the table instance
Add new getTable function
Joomla! User Network Ahmedabad Gunjan Patel @ergunjanpatel
Modify the site/models/helloworld.php file
Update getMsg function to get
Message from Database
Get message id from request.
Notice that here we are not using
$_POST or $_GET
Load table data from auto increment id
Update in helloworld.xml
Joomla! User Network Ahmedabad Gunjan Patel @ergunjanpatel
ZIP it
Develop Basic Backend
Joomla! User Network Ahmedabad Gunjan Patel @ergunjanpatel
Joomla! User Network Ahmedabad Gunjan Patel @ergunjanpatel
Create the admin/helloworld.php file
Joomla! User Network Ahmedabad Gunjan Patel @ergunjanpatel
Create the general controller admin/controller.php file
Set Default view of
component
Component prefix.
Typically name of
component
Joomla! User Network Ahmedabad Gunjan Patel @ergunjanpatel
Create the view admin/views/helloworlds/view.html.php file
Parent ClassView NameComponent
Name as class prefix
Call Model get Item
function and pagination
function to support
pagination
Joomla! User Network Ahmedabad Gunjan Patel @ergunjanpatel
Create the layout admin/views/helloworlds/tmpl/default.php file
Joomla! User Network Ahmedabad Gunjan Patel @ergunjanpatel
Create the sub-layout
admin/views/helloworlds/tmpl/default_head.php file
Joomla! User Network Ahmedabad Gunjan Patel @ergunjanpatel
Create the sub-layout
admin/views/helloworlds/tmpl/default_body.php file
Joomla! User Network Ahmedabad Gunjan Patel @ergunjanpatel
Create the sub-layout
admin/views/helloworlds/tmpl/default_foot.php file
Joomla! User Network Ahmedabad Gunjan Patel @ergunjanpatel
Create the Model admin/models/helloworlds.php file
Parent class for listing
Function of joomla.
getListQuery function
return query object
Review helloworld.xml
Joomla! User Network Ahmedabad Gunjan Patel @ergunjanpatel
ZIP it
• Language files naming conventions:
–For components
• en-GB/en-GB.com_helloworld.ini
–For Menus
• en-GB/en-GB.com_helloworld.sys.ini
Joomla! User Network Ahmedabad Gunjan Patel @ergunjanpatel
Adding Language Translation Files
Joomla! User Network Ahmedabad Gunjan Patel @ergunjanpatel
Language File Naming Pattern
For Example:
en-GB : Language code for English (UK)
gu-IN : Language code for Gujarati (India)
hn-IN : Language code for Hindi (India)
<language code>-<country code>
Joomla! User Network Ahmedabad Gunjan Patel @ergunjanpatel
Language File Naming Pattern
For Example:
en-GB : Language code for English (UK)
gu-IN : Language code for Gujarati (India)
hn-IN : Language code for Hindi (India)
<language code>-<country code>
<language code>-<country code>.com_<component_name>.[type].ini
For Example:
en-GB.com_helloworld.ini
gu-IN.com_helloworld.ini
----------------------------------------
en-GB.com_helloworld.sys.ini
Gu-IN.com_helloworld.sys.ini
Joomla! User Network Ahmedabad Gunjan Patel @ergunjanpatel
Language String Pattern
For Example:
COM_HELLOWORLD="Hello World!"
COM_HELLOWORLD_DESCRIPTION="This is the Hello World description"
COM_HELLOWORLD_HELLOWORLD_VIEW_DEFAULT_TITLE="Hello World"
COM_HELLOWORLD_HELLOWORLD_VIEW_DEFAULT_DESC="This view displays a selected message"
COM_HELLOWORLD_MENU="Hello World!"
<language_key>=“<language_string_value>”
Language File Location Options in
helloworld.xml file
Joomla! User Network Ahmedabad Gunjan Patel @ergunjanpatel
Joomla! User Network Ahmedabad Gunjan Patel @ergunjanpatel
Language File Naming Pattern
Joomla! User Network Ahmedabad Gunjan Patel @ergunjanpatel
or simply in ROOT
Update helloworld.xml
Joomla! User Network Ahmedabad Gunjan Patel @ergunjanpatel
ZIP it
Joomla! User Network Ahmedabad Gunjan Patel @ergunjanpatel
Any Questions?

More Related Content

What's hot

RESTful web services with Groovy on Grails by Vugar Suleymanov
RESTful web services with Groovy on Grails by Vugar SuleymanovRESTful web services with Groovy on Grails by Vugar Suleymanov
RESTful web services with Groovy on Grails by Vugar SuleymanovVuqar Suleymanov
 
Aem sling resolution
Aem sling resolutionAem sling resolution
Aem sling resolutionGaurav Tiwari
 
Angular Advanced Routing
Angular Advanced RoutingAngular Advanced Routing
Angular Advanced RoutingLaurent Duveau
 
Introduction à React JS
Introduction à React JSIntroduction à React JS
Introduction à React JSAbdoulaye Dieng
 
Rest and Sling Resolution
Rest and Sling ResolutionRest and Sling Resolution
Rest and Sling ResolutionDEEPAK KHETAWAT
 
Odoo Experience 2018 - The Odoo JS Framework
Odoo Experience 2018 - The Odoo JS FrameworkOdoo Experience 2018 - The Odoo JS Framework
Odoo Experience 2018 - The Odoo JS FrameworkElínAnna Jónasdóttir
 
The Django Web Application Framework 2
The Django Web Application Framework 2The Django Web Application Framework 2
The Django Web Application Framework 2fishwarter
 
HTML, CSS, JavaScript for beginners
HTML, CSS, JavaScript for beginnersHTML, CSS, JavaScript for beginners
HTML, CSS, JavaScript for beginnersPrakritiDhang
 
Introduction Django
Introduction DjangoIntroduction Django
Introduction DjangoWade Austin
 
HTML presentation for beginners
HTML presentation for beginnersHTML presentation for beginners
HTML presentation for beginnersjeroenvdmeer
 
Introduction to Web Components
Introduction to Web ComponentsIntroduction to Web Components
Introduction to Web ComponentsFu Cheng
 
introduction to Vue.js 3
introduction to Vue.js 3 introduction to Vue.js 3
introduction to Vue.js 3 ArezooKmn
 
HCL Notes und Nomad Fehlerbehebung für Dummies
HCL Notes und Nomad Fehlerbehebung für DummiesHCL Notes und Nomad Fehlerbehebung für Dummies
HCL Notes und Nomad Fehlerbehebung für Dummiespanagenda
 
Spring boot anane maryem ben aziza syrine
Spring boot anane maryem ben aziza syrineSpring boot anane maryem ben aziza syrine
Spring boot anane maryem ben aziza syrineSyrine Ben aziza
 

What's hot (20)

RESTful web services with Groovy on Grails by Vugar Suleymanov
RESTful web services with Groovy on Grails by Vugar SuleymanovRESTful web services with Groovy on Grails by Vugar Suleymanov
RESTful web services with Groovy on Grails by Vugar Suleymanov
 
Aem sling resolution
Aem sling resolutionAem sling resolution
Aem sling resolution
 
Angular Advanced Routing
Angular Advanced RoutingAngular Advanced Routing
Angular Advanced Routing
 
Introduction à React JS
Introduction à React JSIntroduction à React JS
Introduction à React JS
 
Rest and Sling Resolution
Rest and Sling ResolutionRest and Sling Resolution
Rest and Sling Resolution
 
Codeigniter
CodeigniterCodeigniter
Codeigniter
 
Odoo Experience 2018 - The Odoo JS Framework
Odoo Experience 2018 - The Odoo JS FrameworkOdoo Experience 2018 - The Odoo JS Framework
Odoo Experience 2018 - The Odoo JS Framework
 
NestJS
NestJSNestJS
NestJS
 
The Django Web Application Framework 2
The Django Web Application Framework 2The Django Web Application Framework 2
The Django Web Application Framework 2
 
HTML, CSS, JavaScript for beginners
HTML, CSS, JavaScript for beginnersHTML, CSS, JavaScript for beginners
HTML, CSS, JavaScript for beginners
 
Php mysql
Php mysqlPhp mysql
Php mysql
 
Angular Data Binding
Angular Data BindingAngular Data Binding
Angular Data Binding
 
Introduction Django
Introduction DjangoIntroduction Django
Introduction Django
 
HTML presentation for beginners
HTML presentation for beginnersHTML presentation for beginners
HTML presentation for beginners
 
Introduction to Web Components
Introduction to Web ComponentsIntroduction to Web Components
Introduction to Web Components
 
Basic Jenkins Guide.pptx
Basic Jenkins Guide.pptxBasic Jenkins Guide.pptx
Basic Jenkins Guide.pptx
 
introduction to Vue.js 3
introduction to Vue.js 3 introduction to Vue.js 3
introduction to Vue.js 3
 
HCL Notes und Nomad Fehlerbehebung für Dummies
HCL Notes und Nomad Fehlerbehebung für DummiesHCL Notes und Nomad Fehlerbehebung für Dummies
HCL Notes und Nomad Fehlerbehebung für Dummies
 
Html coding
Html codingHtml coding
Html coding
 
Spring boot anane maryem ben aziza syrine
Spring boot anane maryem ben aziza syrineSpring boot anane maryem ben aziza syrine
Spring boot anane maryem ben aziza syrine
 

Similar to Develop advance joomla! MVC Component for version 3

Modules and Components Introduction in Joomla! 2.5
Modules and Components Introduction in Joomla! 2.5Modules and Components Introduction in Joomla! 2.5
Modules and Components Introduction in Joomla! 2.5Vishwash Gaur
 
WordPress Structure and Best Practices
WordPress Structure and Best PracticesWordPress Structure and Best Practices
WordPress Structure and Best Practicesmarkparolisi
 
Techgig Webinar: Joomla Introduction and Module Development June 2012
Techgig Webinar: Joomla Introduction and Module Development June 2012Techgig Webinar: Joomla Introduction and Module Development June 2012
Techgig Webinar: Joomla Introduction and Module Development June 2012Vishwash Gaur
 
Simple module Development in Joomla! 2.5
Simple module Development in Joomla! 2.5Simple module Development in Joomla! 2.5
Simple module Development in Joomla! 2.5Vishwash Gaur
 
Unchain Your Web Development With Django
Unchain Your Web Development With DjangoUnchain Your Web Development With Django
Unchain Your Web Development With DjangoJoey Wilhelm
 
Implement rich snippets in your webshop
Implement rich snippets in your webshopImplement rich snippets in your webshop
Implement rich snippets in your webshopArjen Miedema
 
JoomlaEXPO Presentation by Joe LeBlanc
JoomlaEXPO Presentation by Joe LeBlancJoomlaEXPO Presentation by Joe LeBlanc
JoomlaEXPO Presentation by Joe LeBlancJohn Coonen
 
Joomlapresentation
JoomlapresentationJoomlapresentation
Joomlapresentationjlleblanc
 
Joomlapresentation
JoomlapresentationJoomlapresentation
Joomlapresentationguestf44ffc
 
Django Templates
Django TemplatesDjango Templates
Django TemplatesWilly Liu
 
Installation of Joomla on Windows XP
Installation of Joomla on Windows XPInstallation of Joomla on Windows XP
Installation of Joomla on Windows XPRupesh Kumar
 
Joomla! Day UK 2009 Basic Templates
Joomla! Day UK 2009 Basic TemplatesJoomla! Day UK 2009 Basic Templates
Joomla! Day UK 2009 Basic TemplatesAndy Wallace
 
Joomla Day UK 2009 Basic Templates
Joomla Day UK 2009 Basic TemplatesJoomla Day UK 2009 Basic Templates
Joomla Day UK 2009 Basic TemplatesChris Davenport
 
Joomla Day India 2009 Business Logic With The Mvc
Joomla Day India 2009   Business Logic With The MvcJoomla Day India 2009   Business Logic With The Mvc
Joomla Day India 2009 Business Logic With The MvcAmit Kumar Singh
 
WordPress 3.0 at DC PHP
WordPress 3.0 at DC PHPWordPress 3.0 at DC PHP
WordPress 3.0 at DC PHPandrewnacin
 

Similar to Develop advance joomla! MVC Component for version 3 (20)

Modules and Components Introduction in Joomla! 2.5
Modules and Components Introduction in Joomla! 2.5Modules and Components Introduction in Joomla! 2.5
Modules and Components Introduction in Joomla! 2.5
 
WordPress Structure and Best Practices
WordPress Structure and Best PracticesWordPress Structure and Best Practices
WordPress Structure and Best Practices
 
Techgig Webinar: Joomla Introduction and Module Development June 2012
Techgig Webinar: Joomla Introduction and Module Development June 2012Techgig Webinar: Joomla Introduction and Module Development June 2012
Techgig Webinar: Joomla Introduction and Module Development June 2012
 
Simple module Development in Joomla! 2.5
Simple module Development in Joomla! 2.5Simple module Development in Joomla! 2.5
Simple module Development in Joomla! 2.5
 
Django crush course
Django crush course Django crush course
Django crush course
 
Unchain Your Web Development With Django
Unchain Your Web Development With DjangoUnchain Your Web Development With Django
Unchain Your Web Development With Django
 
Creating a basic joomla
Creating a basic joomlaCreating a basic joomla
Creating a basic joomla
 
Implement rich snippets in your webshop
Implement rich snippets in your webshopImplement rich snippets in your webshop
Implement rich snippets in your webshop
 
upload_test
upload_testupload_test
upload_test
 
JoomlaEXPO Presentation by Joe LeBlanc
JoomlaEXPO Presentation by Joe LeBlancJoomlaEXPO Presentation by Joe LeBlanc
JoomlaEXPO Presentation by Joe LeBlanc
 
Joomlapresentation
JoomlapresentationJoomlapresentation
Joomlapresentation
 
Joomlapresentation
JoomlapresentationJoomlapresentation
Joomlapresentation
 
Building Templates for Joomla
Building Templates for JoomlaBuilding Templates for Joomla
Building Templates for Joomla
 
Django Templates
Django TemplatesDjango Templates
Django Templates
 
Installation of Joomla on Windows XP
Installation of Joomla on Windows XPInstallation of Joomla on Windows XP
Installation of Joomla on Windows XP
 
Joomla! Day UK 2009 Basic Templates
Joomla! Day UK 2009 Basic TemplatesJoomla! Day UK 2009 Basic Templates
Joomla! Day UK 2009 Basic Templates
 
Joomla Day UK 2009 Basic Templates
Joomla Day UK 2009 Basic TemplatesJoomla Day UK 2009 Basic Templates
Joomla Day UK 2009 Basic Templates
 
Joomla Day India 2009 Business Logic With The Mvc
Joomla Day India 2009   Business Logic With The MvcJoomla Day India 2009   Business Logic With The Mvc
Joomla Day India 2009 Business Logic With The Mvc
 
WordPress 3.0 at DC PHP
WordPress 3.0 at DC PHPWordPress 3.0 at DC PHP
WordPress 3.0 at DC PHP
 
Django
DjangoDjango
Django
 

Recently uploaded

Proudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxProudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxthorishapillay1
 
Hierarchy of management that covers different levels of management
Hierarchy of management that covers different levels of managementHierarchy of management that covers different levels of management
Hierarchy of management that covers different levels of managementmkooblal
 
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptxMULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptxAnupkumar Sharma
 
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
How to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERPHow to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERPCeline George
 
Field Attribute Index Feature in Odoo 17
Field Attribute Index Feature in Odoo 17Field Attribute Index Feature in Odoo 17
Field Attribute Index Feature in Odoo 17Celine George
 
Earth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatEarth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatYousafMalik24
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Educationpboyjonauth
 
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdf
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdfFraming an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdf
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdfUjwalaBharambe
 
Atmosphere science 7 quarter 4 .........
Atmosphere science 7 quarter 4 .........Atmosphere science 7 quarter 4 .........
Atmosphere science 7 quarter 4 .........LeaCamillePacle
 
Types of Journalistic Writing Grade 8.pptx
Types of Journalistic Writing Grade 8.pptxTypes of Journalistic Writing Grade 8.pptx
Types of Journalistic Writing Grade 8.pptxEyham Joco
 
Gas measurement O2,Co2,& ph) 04/2024.pptx
Gas measurement O2,Co2,& ph) 04/2024.pptxGas measurement O2,Co2,& ph) 04/2024.pptx
Gas measurement O2,Co2,& ph) 04/2024.pptxDr.Ibrahim Hassaan
 
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdfLike-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdfMr Bounab Samir
 
Quarter 4 Peace-education.pptx Catch Up Friday
Quarter 4 Peace-education.pptx Catch Up FridayQuarter 4 Peace-education.pptx Catch Up Friday
Quarter 4 Peace-education.pptx Catch Up FridayMakMakNepo
 
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...Nguyen Thanh Tu Collection
 
AmericanHighSchoolsprezentacijaoskolama.
AmericanHighSchoolsprezentacijaoskolama.AmericanHighSchoolsprezentacijaoskolama.
AmericanHighSchoolsprezentacijaoskolama.arsicmarija21
 
Solving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxSolving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxOH TEIK BIN
 
Grade 9 Q4-MELC1-Active and Passive Voice.pptx
Grade 9 Q4-MELC1-Active and Passive Voice.pptxGrade 9 Q4-MELC1-Active and Passive Voice.pptx
Grade 9 Q4-MELC1-Active and Passive Voice.pptxChelloAnnAsuncion2
 
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdfAMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdfphamnguyenenglishnb
 

Recently uploaded (20)

Proudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxProudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptx
 
Hierarchy of management that covers different levels of management
Hierarchy of management that covers different levels of managementHierarchy of management that covers different levels of management
Hierarchy of management that covers different levels of management
 
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptxMULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
 
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
 
How to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERPHow to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERP
 
Field Attribute Index Feature in Odoo 17
Field Attribute Index Feature in Odoo 17Field Attribute Index Feature in Odoo 17
Field Attribute Index Feature in Odoo 17
 
Earth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatEarth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice great
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Education
 
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdf
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdfFraming an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdf
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdf
 
Atmosphere science 7 quarter 4 .........
Atmosphere science 7 quarter 4 .........Atmosphere science 7 quarter 4 .........
Atmosphere science 7 quarter 4 .........
 
Types of Journalistic Writing Grade 8.pptx
Types of Journalistic Writing Grade 8.pptxTypes of Journalistic Writing Grade 8.pptx
Types of Journalistic Writing Grade 8.pptx
 
Gas measurement O2,Co2,& ph) 04/2024.pptx
Gas measurement O2,Co2,& ph) 04/2024.pptxGas measurement O2,Co2,& ph) 04/2024.pptx
Gas measurement O2,Co2,& ph) 04/2024.pptx
 
Raw materials used in Herbal Cosmetics.pptx
Raw materials used in Herbal Cosmetics.pptxRaw materials used in Herbal Cosmetics.pptx
Raw materials used in Herbal Cosmetics.pptx
 
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdfLike-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
 
Quarter 4 Peace-education.pptx Catch Up Friday
Quarter 4 Peace-education.pptx Catch Up FridayQuarter 4 Peace-education.pptx Catch Up Friday
Quarter 4 Peace-education.pptx Catch Up Friday
 
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
 
AmericanHighSchoolsprezentacijaoskolama.
AmericanHighSchoolsprezentacijaoskolama.AmericanHighSchoolsprezentacijaoskolama.
AmericanHighSchoolsprezentacijaoskolama.
 
Solving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxSolving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptx
 
Grade 9 Q4-MELC1-Active and Passive Voice.pptx
Grade 9 Q4-MELC1-Active and Passive Voice.pptxGrade 9 Q4-MELC1-Active and Passive Voice.pptx
Grade 9 Q4-MELC1-Active and Passive Voice.pptx
 
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdfAMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
 

Develop advance joomla! MVC Component for version 3

  • 1. Develop Advance Joomla! MVC Component for version 3.x Gunjan Patel Sr. PHP Developer Joomla! Bug Squad Member Joomla! SQL Optimisation team coordinator Google Summer Of Code 2014 Mentor Joomla! User Network Ahmedabad
  • 2. Meet my Joomla! Family gunjan.ce2009@gmail.com
  • 3. Time to play with the Database Joomla! User Network Ahmedabad Gunjan Patel @ergunjanpatel
  • 4. Joomla! User Network Ahmedabad Gunjan Patel @ergunjanpatel Create two files: 1. admin/sql/install.mysql.utf8.sql 2. admin/sql/updates/mysql/0.0.6.sql Important: #__schemas table will be used for upgrades
  • 5. Joomla! User Network Ahmedabad Gunjan Patel @ergunjanpatel Adding a new field type: type="helloworld" Field file path Field Custom Type: helloworld Notice that it was Before list
  • 6. Let’s create field at admin/models/fields/helloworld.php Joomla! User Network Ahmedabad Gunjan Patel @ergunjanpatel Parent field type Same as filename File Name should be same as Field type name Class name prefix Should be same as filename
  • 7. Continue with… admin/models/fields/helloworld.php Joomla! User Network Ahmedabad Gunjan Patel @ergunjanpatel Overriding parent class for HTML select list options. Get Database Object Joomla Query Language functions Looping to create options array JHTML options type value text
  • 8. Display the chosen message from field type in menu using Database Table Joomla! User Network Ahmedabad Gunjan Patel @ergunjanpatel
  • 9. Joomla! User Network Ahmedabad Gunjan Patel @ergunjanpatel Create the admin/tables/helloworld.php file Table Name Primary Key
  • 10. Joomla! User Network Ahmedabad Gunjan Patel @ergunjanpatel Modify the site/models/helloworld.php file Return the table instance Add new getTable function
  • 11. Joomla! User Network Ahmedabad Gunjan Patel @ergunjanpatel Modify the site/models/helloworld.php file Update getMsg function to get Message from Database Get message id from request. Notice that here we are not using $_POST or $_GET Load table data from auto increment id
  • 12. Update in helloworld.xml Joomla! User Network Ahmedabad Gunjan Patel @ergunjanpatel ZIP it
  • 13. Develop Basic Backend Joomla! User Network Ahmedabad Gunjan Patel @ergunjanpatel
  • 14. Joomla! User Network Ahmedabad Gunjan Patel @ergunjanpatel Create the admin/helloworld.php file
  • 15. Joomla! User Network Ahmedabad Gunjan Patel @ergunjanpatel Create the general controller admin/controller.php file Set Default view of component Component prefix. Typically name of component
  • 16. Joomla! User Network Ahmedabad Gunjan Patel @ergunjanpatel Create the view admin/views/helloworlds/view.html.php file Parent ClassView NameComponent Name as class prefix Call Model get Item function and pagination function to support pagination
  • 17. Joomla! User Network Ahmedabad Gunjan Patel @ergunjanpatel Create the layout admin/views/helloworlds/tmpl/default.php file
  • 18. Joomla! User Network Ahmedabad Gunjan Patel @ergunjanpatel Create the sub-layout admin/views/helloworlds/tmpl/default_head.php file
  • 19. Joomla! User Network Ahmedabad Gunjan Patel @ergunjanpatel Create the sub-layout admin/views/helloworlds/tmpl/default_body.php file
  • 20. Joomla! User Network Ahmedabad Gunjan Patel @ergunjanpatel Create the sub-layout admin/views/helloworlds/tmpl/default_foot.php file
  • 21. Joomla! User Network Ahmedabad Gunjan Patel @ergunjanpatel Create the Model admin/models/helloworlds.php file Parent class for listing Function of joomla. getListQuery function return query object
  • 22. Review helloworld.xml Joomla! User Network Ahmedabad Gunjan Patel @ergunjanpatel ZIP it
  • 23. • Language files naming conventions: –For components • en-GB/en-GB.com_helloworld.ini –For Menus • en-GB/en-GB.com_helloworld.sys.ini Joomla! User Network Ahmedabad Gunjan Patel @ergunjanpatel Adding Language Translation Files
  • 24. Joomla! User Network Ahmedabad Gunjan Patel @ergunjanpatel Language File Naming Pattern For Example: en-GB : Language code for English (UK) gu-IN : Language code for Gujarati (India) hn-IN : Language code for Hindi (India) <language code>-<country code>
  • 25. Joomla! User Network Ahmedabad Gunjan Patel @ergunjanpatel Language File Naming Pattern For Example: en-GB : Language code for English (UK) gu-IN : Language code for Gujarati (India) hn-IN : Language code for Hindi (India) <language code>-<country code> <language code>-<country code>.com_<component_name>.[type].ini For Example: en-GB.com_helloworld.ini gu-IN.com_helloworld.ini ---------------------------------------- en-GB.com_helloworld.sys.ini Gu-IN.com_helloworld.sys.ini
  • 26. Joomla! User Network Ahmedabad Gunjan Patel @ergunjanpatel Language String Pattern For Example: COM_HELLOWORLD="Hello World!" COM_HELLOWORLD_DESCRIPTION="This is the Hello World description" COM_HELLOWORLD_HELLOWORLD_VIEW_DEFAULT_TITLE="Hello World" COM_HELLOWORLD_HELLOWORLD_VIEW_DEFAULT_DESC="This view displays a selected message" COM_HELLOWORLD_MENU="Hello World!" <language_key>=“<language_string_value>”
  • 27. Language File Location Options in helloworld.xml file Joomla! User Network Ahmedabad Gunjan Patel @ergunjanpatel
  • 28. Joomla! User Network Ahmedabad Gunjan Patel @ergunjanpatel Language File Naming Pattern
  • 29. Joomla! User Network Ahmedabad Gunjan Patel @ergunjanpatel or simply in ROOT
  • 30. Update helloworld.xml Joomla! User Network Ahmedabad Gunjan Patel @ergunjanpatel ZIP it
  • 31. Joomla! User Network Ahmedabad Gunjan Patel @ergunjanpatel Any Questions?