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

UDA-Componentes RUP. Pestañas
UDA-Componentes RUP. PestañasUDA-Componentes RUP. Pestañas
UDA-Componentes RUP. PestañasAnder Martinez
 
UDA-Componentes RUP. Fecha (v2.1.0 deprecado)
UDA-Componentes RUP. Fecha  (v2.1.0 deprecado)UDA-Componentes RUP. Fecha  (v2.1.0 deprecado)
UDA-Componentes RUP. Fecha (v2.1.0 deprecado)Ander Martinez
 
An Introduction to Vuejs
An Introduction to VuejsAn Introduction to Vuejs
An Introduction to VuejsPaddy Lock
 
How to implement internationalization (i18n) in angular application(multiple ...
How to implement internationalization (i18n) in angular application(multiple ...How to implement internationalization (i18n) in angular application(multiple ...
How to implement internationalization (i18n) in angular application(multiple ...Katy Slemon
 
Basic HTML
Basic HTMLBasic HTML
Basic HTMLSayan De
 
Demarrer ionic en 5 etape
Demarrer ionic en 5 etapeDemarrer ionic en 5 etape
Demarrer ionic en 5 etapeZaïd BOUDAMOUZ
 
Adobe Premiere Pro: An Introduction to the Basics_Mujeeb Riaz
Adobe Premiere Pro: An Introduction to the Basics_Mujeeb RiazAdobe Premiere Pro: An Introduction to the Basics_Mujeeb Riaz
Adobe Premiere Pro: An Introduction to the Basics_Mujeeb RiazMujeeb Riaz
 
UDA-Componentes RUP. Fecha
UDA-Componentes RUP. FechaUDA-Componentes RUP. Fecha
UDA-Componentes RUP. FechaAnder Martinez
 
Angular - Chapter 4 - Data and Event Handling
 Angular - Chapter 4 - Data and Event Handling Angular - Chapter 4 - Data and Event Handling
Angular - Chapter 4 - Data and Event HandlingWebStackAcademy
 
Introduction to ReactJS
Introduction to ReactJSIntroduction to ReactJS
Introduction to ReactJSHoang Long
 
Bài 4 Hướng dẫn chỉnh sửa và thiết kế giao diện web Joomla
Bài 4 Hướng dẫn chỉnh sửa và thiết kế giao diện web JoomlaBài 4 Hướng dẫn chỉnh sửa và thiết kế giao diện web Joomla
Bài 4 Hướng dẫn chỉnh sửa và thiết kế giao diện web JoomlaMasterCode.vn
 

What's hot (20)

Css backgrounds
Css   backgroundsCss   backgrounds
Css backgrounds
 
UDA-Componentes RUP. Pestañas
UDA-Componentes RUP. PestañasUDA-Componentes RUP. Pestañas
UDA-Componentes RUP. Pestañas
 
UDA-Componentes RUP. Fecha (v2.1.0 deprecado)
UDA-Componentes RUP. Fecha  (v2.1.0 deprecado)UDA-Componentes RUP. Fecha  (v2.1.0 deprecado)
UDA-Componentes RUP. Fecha (v2.1.0 deprecado)
 
Css animation
Css animationCss animation
Css animation
 
An Introduction to Vuejs
An Introduction to VuejsAn Introduction to Vuejs
An Introduction to Vuejs
 
Angular Data Binding
Angular Data BindingAngular Data Binding
Angular Data Binding
 
How to implement internationalization (i18n) in angular application(multiple ...
How to implement internationalization (i18n) in angular application(multiple ...How to implement internationalization (i18n) in angular application(multiple ...
How to implement internationalization (i18n) in angular application(multiple ...
 
Basic HTML
Basic HTMLBasic HTML
Basic HTML
 
Demarrer ionic en 5 etape
Demarrer ionic en 5 etapeDemarrer ionic en 5 etape
Demarrer ionic en 5 etape
 
Adobe Premiere Pro: An Introduction to the Basics_Mujeeb Riaz
Adobe Premiere Pro: An Introduction to the Basics_Mujeeb RiazAdobe Premiere Pro: An Introduction to the Basics_Mujeeb Riaz
Adobe Premiere Pro: An Introduction to the Basics_Mujeeb Riaz
 
UDA-Componentes RUP. Fecha
UDA-Componentes RUP. FechaUDA-Componentes RUP. Fecha
UDA-Componentes RUP. Fecha
 
Angular - Chapter 4 - Data and Event Handling
 Angular - Chapter 4 - Data and Event Handling Angular - Chapter 4 - Data and Event Handling
Angular - Chapter 4 - Data and Event Handling
 
Intro to html
Intro to htmlIntro to html
Intro to html
 
01 Php Introduction
01 Php Introduction01 Php Introduction
01 Php Introduction
 
Jsp(java server pages)
Jsp(java server pages)Jsp(java server pages)
Jsp(java server pages)
 
Control Structures In Php 2
Control Structures In Php 2Control Structures In Php 2
Control Structures In Php 2
 
Introduction to ReactJS
Introduction to ReactJSIntroduction to ReactJS
Introduction to ReactJS
 
Unit 02: Web Technologies (1/2)
Unit 02: Web Technologies (1/2)Unit 02: Web Technologies (1/2)
Unit 02: Web Technologies (1/2)
 
Bài 4 Hướng dẫn chỉnh sửa và thiết kế giao diện web Joomla
Bài 4 Hướng dẫn chỉnh sửa và thiết kế giao diện web JoomlaBài 4 Hướng dẫn chỉnh sửa và thiết kế giao diện web Joomla
Bài 4 Hướng dẫn chỉnh sửa và thiết kế giao diện web Joomla
 
Widgets in odoo
Widgets in odooWidgets in odoo
Widgets in odoo
 

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

Daily Lesson Plan in Mathematics Quarter 4
Daily Lesson Plan in Mathematics Quarter 4Daily Lesson Plan in Mathematics Quarter 4
Daily Lesson Plan in Mathematics Quarter 4JOYLYNSAMANIEGO
 
31 ĐỀ THI THỬ VÀO LỚP 10 - TIẾNG ANH - FORM MỚI 2025 - 40 CÂU HỎI - BÙI VĂN V...
31 ĐỀ THI THỬ VÀO LỚP 10 - TIẾNG ANH - FORM MỚI 2025 - 40 CÂU HỎI - BÙI VĂN V...31 ĐỀ THI THỬ VÀO LỚP 10 - TIẾNG ANH - FORM MỚI 2025 - 40 CÂU HỎI - BÙI VĂN V...
31 ĐỀ THI THỬ VÀO LỚP 10 - TIẾNG ANH - FORM MỚI 2025 - 40 CÂU HỎI - BÙI VĂN V...Nguyen Thanh Tu Collection
 
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)lakshayb543
 
ClimART Action | eTwinning Project
ClimART Action    |    eTwinning ProjectClimART Action    |    eTwinning Project
ClimART Action | eTwinning Projectjordimapav
 
4.16.24 Poverty and Precarity--Desmond.pptx
4.16.24 Poverty and Precarity--Desmond.pptx4.16.24 Poverty and Precarity--Desmond.pptx
4.16.24 Poverty and Precarity--Desmond.pptxmary850239
 
Multi Domain Alias In the Odoo 17 ERP Module
Multi Domain Alias In the Odoo 17 ERP ModuleMulti Domain Alias In the Odoo 17 ERP Module
Multi Domain Alias In the Odoo 17 ERP ModuleCeline George
 
Mythology Quiz-4th April 2024, Quiz Club NITW
Mythology Quiz-4th April 2024, Quiz Club NITWMythology Quiz-4th April 2024, Quiz Club NITW
Mythology Quiz-4th April 2024, Quiz Club NITWQuiz Club NITW
 
Oppenheimer Film Discussion for Philosophy and Film
Oppenheimer Film Discussion for Philosophy and FilmOppenheimer Film Discussion for Philosophy and Film
Oppenheimer Film Discussion for Philosophy and FilmStan Meyer
 
ICS2208 Lecture6 Notes for SL spaces.pdf
ICS2208 Lecture6 Notes for SL spaces.pdfICS2208 Lecture6 Notes for SL spaces.pdf
ICS2208 Lecture6 Notes for SL spaces.pdfVanessa Camilleri
 
4.16.24 21st Century Movements for Black Lives.pptx
4.16.24 21st Century Movements for Black Lives.pptx4.16.24 21st Century Movements for Black Lives.pptx
4.16.24 21st Century Movements for Black Lives.pptxmary850239
 
Using Grammatical Signals Suitable to Patterns of Idea Development
Using Grammatical Signals Suitable to Patterns of Idea DevelopmentUsing Grammatical Signals Suitable to Patterns of Idea Development
Using Grammatical Signals Suitable to Patterns of Idea Developmentchesterberbo7
 
Active Learning Strategies (in short ALS).pdf
Active Learning Strategies (in short ALS).pdfActive Learning Strategies (in short ALS).pdf
Active Learning Strategies (in short ALS).pdfPatidar M
 
week 1 cookery 8 fourth - quarter .pptx
week 1 cookery 8  fourth  -  quarter .pptxweek 1 cookery 8  fourth  -  quarter .pptx
week 1 cookery 8 fourth - quarter .pptxJonalynLegaspi2
 
Unraveling Hypertext_ Analyzing Postmodern Elements in Literature.pptx
Unraveling Hypertext_ Analyzing  Postmodern Elements in  Literature.pptxUnraveling Hypertext_ Analyzing  Postmodern Elements in  Literature.pptx
Unraveling Hypertext_ Analyzing Postmodern Elements in Literature.pptxDhatriParmar
 
Narcotic and Non Narcotic Analgesic..pdf
Narcotic and Non Narcotic Analgesic..pdfNarcotic and Non Narcotic Analgesic..pdf
Narcotic and Non Narcotic Analgesic..pdfPrerana Jadhav
 
Decoding the Tweet _ Practical Criticism in the Age of Hashtag.pptx
Decoding the Tweet _ Practical Criticism in the Age of Hashtag.pptxDecoding the Tweet _ Practical Criticism in the Age of Hashtag.pptx
Decoding the Tweet _ Practical Criticism in the Age of Hashtag.pptxDhatriParmar
 
Beauty Amidst the Bytes_ Unearthing Unexpected Advantages of the Digital Wast...
Beauty Amidst the Bytes_ Unearthing Unexpected Advantages of the Digital Wast...Beauty Amidst the Bytes_ Unearthing Unexpected Advantages of the Digital Wast...
Beauty Amidst the Bytes_ Unearthing Unexpected Advantages of the Digital Wast...DhatriParmar
 

Recently uploaded (20)

Daily Lesson Plan in Mathematics Quarter 4
Daily Lesson Plan in Mathematics Quarter 4Daily Lesson Plan in Mathematics Quarter 4
Daily Lesson Plan in Mathematics Quarter 4
 
31 ĐỀ THI THỬ VÀO LỚP 10 - TIẾNG ANH - FORM MỚI 2025 - 40 CÂU HỎI - BÙI VĂN V...
31 ĐỀ THI THỬ VÀO LỚP 10 - TIẾNG ANH - FORM MỚI 2025 - 40 CÂU HỎI - BÙI VĂN V...31 ĐỀ THI THỬ VÀO LỚP 10 - TIẾNG ANH - FORM MỚI 2025 - 40 CÂU HỎI - BÙI VĂN V...
31 ĐỀ THI THỬ VÀO LỚP 10 - TIẾNG ANH - FORM MỚI 2025 - 40 CÂU HỎI - BÙI VĂN V...
 
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
 
ClimART Action | eTwinning Project
ClimART Action    |    eTwinning ProjectClimART Action    |    eTwinning Project
ClimART Action | eTwinning Project
 
Paradigm shift in nursing research by RS MEHTA
Paradigm shift in nursing research by RS MEHTAParadigm shift in nursing research by RS MEHTA
Paradigm shift in nursing research by RS MEHTA
 
4.16.24 Poverty and Precarity--Desmond.pptx
4.16.24 Poverty and Precarity--Desmond.pptx4.16.24 Poverty and Precarity--Desmond.pptx
4.16.24 Poverty and Precarity--Desmond.pptx
 
Multi Domain Alias In the Odoo 17 ERP Module
Multi Domain Alias In the Odoo 17 ERP ModuleMulti Domain Alias In the Odoo 17 ERP Module
Multi Domain Alias In the Odoo 17 ERP Module
 
Mythology Quiz-4th April 2024, Quiz Club NITW
Mythology Quiz-4th April 2024, Quiz Club NITWMythology Quiz-4th April 2024, Quiz Club NITW
Mythology Quiz-4th April 2024, Quiz Club NITW
 
Oppenheimer Film Discussion for Philosophy and Film
Oppenheimer Film Discussion for Philosophy and FilmOppenheimer Film Discussion for Philosophy and Film
Oppenheimer Film Discussion for Philosophy and Film
 
ICS2208 Lecture6 Notes for SL spaces.pdf
ICS2208 Lecture6 Notes for SL spaces.pdfICS2208 Lecture6 Notes for SL spaces.pdf
ICS2208 Lecture6 Notes for SL spaces.pdf
 
4.16.24 21st Century Movements for Black Lives.pptx
4.16.24 21st Century Movements for Black Lives.pptx4.16.24 21st Century Movements for Black Lives.pptx
4.16.24 21st Century Movements for Black Lives.pptx
 
Using Grammatical Signals Suitable to Patterns of Idea Development
Using Grammatical Signals Suitable to Patterns of Idea DevelopmentUsing Grammatical Signals Suitable to Patterns of Idea Development
Using Grammatical Signals Suitable to Patterns of Idea Development
 
Active Learning Strategies (in short ALS).pdf
Active Learning Strategies (in short ALS).pdfActive Learning Strategies (in short ALS).pdf
Active Learning Strategies (in short ALS).pdf
 
week 1 cookery 8 fourth - quarter .pptx
week 1 cookery 8  fourth  -  quarter .pptxweek 1 cookery 8  fourth  -  quarter .pptx
week 1 cookery 8 fourth - quarter .pptx
 
Unraveling Hypertext_ Analyzing Postmodern Elements in Literature.pptx
Unraveling Hypertext_ Analyzing  Postmodern Elements in  Literature.pptxUnraveling Hypertext_ Analyzing  Postmodern Elements in  Literature.pptx
Unraveling Hypertext_ Analyzing Postmodern Elements in Literature.pptx
 
Narcotic and Non Narcotic Analgesic..pdf
Narcotic and Non Narcotic Analgesic..pdfNarcotic and Non Narcotic Analgesic..pdf
Narcotic and Non Narcotic Analgesic..pdf
 
prashanth updated resume 2024 for Teaching Profession
prashanth updated resume 2024 for Teaching Professionprashanth updated resume 2024 for Teaching Profession
prashanth updated resume 2024 for Teaching Profession
 
Decoding the Tweet _ Practical Criticism in the Age of Hashtag.pptx
Decoding the Tweet _ Practical Criticism in the Age of Hashtag.pptxDecoding the Tweet _ Practical Criticism in the Age of Hashtag.pptx
Decoding the Tweet _ Practical Criticism in the Age of Hashtag.pptx
 
Beauty Amidst the Bytes_ Unearthing Unexpected Advantages of the Digital Wast...
Beauty Amidst the Bytes_ Unearthing Unexpected Advantages of the Digital Wast...Beauty Amidst the Bytes_ Unearthing Unexpected Advantages of the Digital Wast...
Beauty Amidst the Bytes_ Unearthing Unexpected Advantages of the Digital Wast...
 
Mattingly "AI & Prompt Design: Large Language Models"
Mattingly "AI & Prompt Design: Large Language Models"Mattingly "AI & Prompt Design: Large Language Models"
Mattingly "AI & Prompt Design: Large Language Models"
 

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?