Diese Präsentation wurde erfolgreich gemeldet.
Wir verwenden Ihre LinkedIn Profilangaben und Informationen zu Ihren Aktivitäten, um Anzeigen zu personalisieren und Ihnen relevantere Inhalte anzuzeigen. Sie können Ihre Anzeigeneinstellungen jederzeit ändern.

Develop advance joomla! MVC Component for version 3

12.197 Aufrufe

Veröffentlicht am

This is an step by step information to create advance joomla component. Students and Newbies who want to learn and create component development they can use this slide as an reference.

Joomla! User Network Ahmedabad organizing a 4 days Joomla! workshop for students to teach joomla development. In this workshop we are going to teach joomla component, module and plugin development. This event will be organized at School of Computer Studies, Ahmedabad University in association with AESICS-CSI Student Branch. Event organized by School of Computer Studies, Ahmedabad University and Joomla User Network Ahmedabad Team. For more details visit our Facebook page at https://www.facebook.com/jugAhmedabad

Veröffentlicht in: Bildung
  • DOWNLOAD THI5 BOOKS INTO AVAILABLE FORMAT (Unlimited) ......................................................................................................................... ......................................................................................................................... Download Full PDF EBOOK here { http://bit.ly/2m6jJ5M } ......................................................................................................................... Download Full EPUB Ebook here { http://bit.ly/2m6jJ5M } ......................................................................................................................... ACCESS WEBSITE for All Ebooks ......................................................................................................................... Download Full PDF EBOOK here { http://bit.ly/2m6jJ5M } ......................................................................................................................... Download EPUB Ebook here { http://bit.ly/2m6jJ5M } ......................................................................................................................... Download doc Ebook here { http://bit.ly/2m6jJ5M } ......................................................................................................................... ......................................................................................................................... ......................................................................................................................... .............. Browse by Genre Available eBooks ......................................................................................................................... Art, Biography, Business, Chick Lit, Children's, Christian, Classics, Comics, Contemporary, Cookbooks, Crime, Ebooks, Fantasy, Fiction, Graphic Novels, Historical Fiction, History, Horror, Humor And Comedy, Manga, Memoir, Music, Mystery, Non Fiction, Paranormal, Philosophy, Poetry, Psychology, Religion, Romance, Science, Science Fiction, Self Help, Suspense, Spirituality, Sports, Thriller, Travel, Young Adult,
       Antworten 
    Sind Sie sicher, dass Sie …  Ja  Nein
    Ihre Nachricht erscheint hier
  • why is it that we are merging the getOptions() from parent class and $options array?..Does it has something to do with custom field
       Antworten 
    Sind Sie sicher, dass Sie …  Ja  Nein
    Ihre Nachricht erscheint hier

Develop advance joomla! MVC Component for version 3

  1. 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. 2. Meet my Joomla! Family gunjan.ce2009@gmail.com
  3. 3. Time to play with the Database Joomla! User Network Ahmedabad Gunjan Patel @ergunjanpatel
  4. 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. 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. 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. 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. 8. Display the chosen message from field type in menu using Database Table Joomla! User Network Ahmedabad Gunjan Patel @ergunjanpatel
  9. 9. Joomla! User Network Ahmedabad Gunjan Patel @ergunjanpatel Create the admin/tables/helloworld.php file Table Name Primary Key
  10. 10. Joomla! User Network Ahmedabad Gunjan Patel @ergunjanpatel Modify the site/models/helloworld.php file Return the table instance Add new getTable function
  11. 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. 12. Update in helloworld.xml Joomla! User Network Ahmedabad Gunjan Patel @ergunjanpatel ZIP it
  13. 13. Develop Basic Backend Joomla! User Network Ahmedabad Gunjan Patel @ergunjanpatel
  14. 14. Joomla! User Network Ahmedabad Gunjan Patel @ergunjanpatel Create the admin/helloworld.php file
  15. 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. 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. 17. Joomla! User Network Ahmedabad Gunjan Patel @ergunjanpatel Create the layout admin/views/helloworlds/tmpl/default.php file
  18. 18. Joomla! User Network Ahmedabad Gunjan Patel @ergunjanpatel Create the sub-layout admin/views/helloworlds/tmpl/default_head.php file
  19. 19. Joomla! User Network Ahmedabad Gunjan Patel @ergunjanpatel Create the sub-layout admin/views/helloworlds/tmpl/default_body.php file
  20. 20. Joomla! User Network Ahmedabad Gunjan Patel @ergunjanpatel Create the sub-layout admin/views/helloworlds/tmpl/default_foot.php file
  21. 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. 22. Review helloworld.xml Joomla! User Network Ahmedabad Gunjan Patel @ergunjanpatel ZIP it
  23. 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. 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. 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. 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. 27. Language File Location Options in helloworld.xml file Joomla! User Network Ahmedabad Gunjan Patel @ergunjanpatel
  28. 28. Joomla! User Network Ahmedabad Gunjan Patel @ergunjanpatel Language File Naming Pattern
  29. 29. Joomla! User Network Ahmedabad Gunjan Patel @ergunjanpatel or simply in ROOT
  30. 30. Update helloworld.xml Joomla! User Network Ahmedabad Gunjan Patel @ergunjanpatel ZIP it
  31. 31. Joomla! User Network Ahmedabad Gunjan Patel @ergunjanpatel Any Questions?

×