Joomla Developer
จาก Wiki2
This is to prepare to be Joomla Extensions Developer
เนื้อหา |
Extension defined
for 1.5
- Plugin is formarly know as Mambots, it response to Joomla event
- Template is change the way site look
- Module : for page rendering known as "boxes" Module are assigned per menu item and may call component.
- Component: it is mini application with front and back end.
For 1.6 up
- Library
Joomla Framework
Joomla เป็น PHP4 ไม่ใช่ PHP5 แต่สามารถพัฒนา Extension ด้วย PHP5 ได้ แต่ต้องคำนึงถึงข้อจำกัดของ PHP4 เวลาทำงานกับ Framework
Name Conventions
We'll start by looking some naming conventions.
- Class names should start with an uppercase letter.
- All named elements should use the camelCase standard.
- Method names should start with a lowercase letter.
- Non-public elements should start with an underscore.
Class Creation
Class ทุก Class ที่จะสร้างจะต้อง inherit จาก JOject เท่านั้นเพื่อให้รองรับการทำงานพื้นฐานของ Joomla และต้องไม่ลืมที่จะ Call constructor ของ JOject (Parent class) ด้วยนะครับดังตัวอย่าง
/**
* Some Class which extends JObject
*/
class SomeClass extends JObject
{
/**
* Object name
* @var string
*/
var $name;
/**
* PHP 5 style Constructor
*
* @access protected
* @param string name
*/
function __construct($name)
{
$this->name = $name;
parent::__construct();
}
}
PHP 4 doesn't call constructors of the base class automatically from a constructor of a derived class. It is your responsibility to propagate the call to constructors upstream where appropriate.
Don't stop with die()
Reff: http://docs.joomla.org/Do_not_use_die_to_debug
เพราะ Joomla เก็บ State ไว้ใน Database จะต้องจบเป็นลำดับดังนี้
echo 'Test';
$mainframe->close();
/*
or use:
jexit();
*/
or
function stop($msg = '')
{
global $mainframe;
echo $msg;
$mainframe->close();
/*
Alternative:
echo $msg;
jexit();
*/
}
Create Template
- use NVU 's Joomla extension to create template Joomla V 1.0 only Template Design Guide
- Download Kompozer/NVU and Joomla extensions for NVU (No need, it obsolete)
- http://www.ruamedu.com/index.php
- http://hotfile.com/dl/22755426/8bf363a/Learning_Joomla_1.5_Extension_Development.rar.html
- http://rapidshare.com/files/329534106/Learning_Joomla__1.5_Extension_Development.rar
- create drop down menu
- Create menu tool
Document
- Lynda.com has three tutorials on Joomla! templating
- How to create template http://docs.joomla.org/Tutorial:Creating_a_basic_Joomla!_template
- Siteground http://www.siteground.com/tutorials/joomla15/joomla_create_template.htm
- ภาษาไทย http://www.mindphp.com/modules.php?name=News&file=print&sid=104
- eBook การสร้าง Template 1.5
- Create template with Supachai
- Joomla Documentation
- Joomla Template Step by Step Tutorial at PHP everyday
- Joomla template design pdf ebook
Link
- Understanding Joomla component structure http://www.packtpub.com/article/developing-the-joomla-component-and-understanding-its-structure
- Extension ที่ช่วยให้เขียน Code ใน Joomla
- Sourcerer : http://www.nonumber.nl/extensions/sourcerer
- Jumi : http://edo.webmaster.am/jumi/overview
- Start developer here http://docs.joomla.org/Developers
- Hello world component http://docs.joomla.org/Developing_a_Model-View-Controller_Component_-_Part_1
- http://joomlacode.org/
- Joomla Doc http://docs.joomla.org/
- Joomla home of developer http://developer.joomla.org/
- Developing the Joomla! Component and Understanding its Structure
- Extensions Developer : http://docs.joomla.org/Category:Extensions
- Course Ultimate Top 10 Joomla Extensions Joomla extension http://joomladevelopers.wordpress.com/2009/07/09/course-ultimate-top-10-joomla-extensions/
- เพิ่ม Custom Code ให้ Joomla ด้วย Jumi http://edo.webmaster.am/jumi
- Joomla template http://descmediasite.com/descfile-All+Joomla+Template+From+Template+Plaza-6898011.html
- Joomla Hello world component tutorial http://www.phpeveryday.com/articles/Joomla-Fast-Road-to-Understand-Component-Programming-P66.html
