SlideShare a Scribd company logo
1 of 23
Download to read offline
Bài 5
Hướng dẫn xây dựng Extension
Nhắc lại bài cũ
• Chỉnh sửa template thông qua chỉnh sửa hình ảnh, chỉnh
sửa CSS
• Cấu trúc file và thư mục của một Template
Bài 5 - Hướng dẫn xây dựng Extension
Mục tiêu bài học
• Hiểu rõ cấu trúc của component; module
• Hiểu rõ về quy trình, cách thức, giải pháp xây dựng
component, module
Bài 5 - Hướng dẫn xây dựng Extension
Xây dựng Component
Xây dựng component theo mô hình MVC
- Các component Joomla được xây dựng theo mô hình MVC
(Model-View-Controler);
User
(Khách truy
cập web)
Bài 5 - Hướng dẫn xây dựng Extension
View
(tạo giao diện hiển
thị)
Model
(thiết lập các
chức năng web)
Controler
(điều khiển, xử lý
tương tác)
Xây dựng Component
Xây dựng 1 Component đơn giản: Component Hello
Bài 5 - Hướng dẫn xây dựng Extension
Xây dựng Component
Component cơ bản có 5 file:
• site/hello.php - file tạo entry point
• site/controller.php - Thiết lập điều khiển
• site/views/hello/view.html.php - Thiết lập
hiển thị
• site/views/hello/tmpl/default.php - Tạo giao
diện hiển thị
• hello.xml - Đóng gói thành bộ cài
Bài 5 - Hướng dẫn xây dựng Extension
• site/hello.php - file tạo entry point
• site/controller.php - Thiết lập điều khiển
• site/views/hello/view.html.php - Thiết lập
hiển thị
• site/views/hello/tmpl/default.php - Tạo giao
diện hiển thị
• hello.xml - Đóng gói thành bộ cài
Xây dựng Component
Lập trình file Hello.php - Tạo entry point
<?php
defined( '_JEXEC' ) or die( 'Restricted access' );
require_once( JPATH_COMPONENT.DS.'controller.php' );
if ($controller = JRequest::getWord('controller')) {
$path = JPATH_COMPONENT.DS.'controllers'.DS.$controller.'.php';
if (file_exists($path)) {
require_once $path;
} else {
$controller = '';
}
}
$classname = 'HelloController'.$controller;
$controller = new $classname();
$controller->execute( JRequest::getVar( 'task' ) );
$controller->redirect();
Bài 5 - Hướng dẫn xây dựng Extension
<?php
defined( '_JEXEC' ) or die( 'Restricted access' );
require_once( JPATH_COMPONENT.DS.'controller.php' );
if ($controller = JRequest::getWord('controller')) {
$path = JPATH_COMPONENT.DS.'controllers'.DS.$controller.'.php';
if (file_exists($path)) {
require_once $path;
} else {
$controller = '';
}
}
$classname = 'HelloController'.$controller;
$controller = new $classname();
$controller->execute( JRequest::getVar( 'task' ) );
$controller->redirect();
Xây dựng Component
Tạo controller với file controller.php
<?php
defined( '_JEXEC' ) or die( 'Restricted access' );
jimport('joomla.application.component.controller');
class HelloController extends JController
{
function display()
{
parent::display();
}
}
Bài 5 - Hướng dẫn xây dựng Extension
<?php
defined( '_JEXEC' ) or die( 'Restricted access' );
jimport('joomla.application.component.controller');
class HelloController extends JController
{
function display()
{
parent::display();
}
}
Xây dựng Component
Tạo view - lập trình file site/views/hello/view.html.php
<?php
defined( '_JEXEC' ) or die( 'Restricted access' );
jimport( 'joomla.application.component.view');
class HelloViewHello extends JView
{
function display($tpl = null)
{
$greeting = "Hello, World!";
$this->assignRef( 'greeting', $greeting );
parent::display($tpl);
}
}
Bài 5 - Hướng dẫn xây dựng Extension
<?php
defined( '_JEXEC' ) or die( 'Restricted access' );
jimport( 'joomla.application.component.view');
class HelloViewHello extends JView
{
function display($tpl = null)
{
$greeting = "Hello, World!";
$this->assignRef( 'greeting', $greeting );
parent::display($tpl);
}
}
Xây dựng Component
Tạo Template tại file site/views/hello/tmpl/default.php
<?php defined('_JEXEC') or die('Restricted access'); ?>
<h1><?php echo $this->greeting; ?></h1>
Bài 5 - Hướng dẫn xây dựng Extension
Xây dựng Component
Viết file XML (install.xml)
<?xml version="1.0" encoding="utf-8"?>
<install type="component" version="1.5.0">
<name>Hello</name>
<creationDate>2007-02-22</creationDate>
<author>John Doe</author>
<authorEmail>john.doe@example.org</authorEmail>
<authorUrl>http://www.example.org</authorUrl>
<copyright>Copyright Info</copyright>
<license>License Info</license>
<version>1.01</version>
<description>Description of the component ...</description>
<files folder="site">
<filename>controller.php</filename>
<filename>hello.php</filename>
<filename>index.html</filename>
<filename>views/index.html</filename>
<filename>views/hello/index.html</filename>
<filename>views/hello/view.html.php</filename>
<filename>views/hello/tmpl/default.php</filename>
<filename>views/hello/tmpl/index.html</filename>
</files>
Bài 5 - Hướng dẫn xây dựng Extension
<?xml version="1.0" encoding="utf-8"?>
<install type="component" version="1.5.0">
<name>Hello</name>
<creationDate>2007-02-22</creationDate>
<author>John Doe</author>
<authorEmail>john.doe@example.org</authorEmail>
<authorUrl>http://www.example.org</authorUrl>
<copyright>Copyright Info</copyright>
<license>License Info</license>
<version>1.01</version>
<description>Description of the component ...</description>
<files folder="site">
<filename>controller.php</filename>
<filename>hello.php</filename>
<filename>index.html</filename>
<filename>views/index.html</filename>
<filename>views/hello/index.html</filename>
<filename>views/hello/view.html.php</filename>
<filename>views/hello/tmpl/default.php</filename>
<filename>views/hello/tmpl/index.html</filename>
</files>
Xây dựng Component
<administration>
<menu>Hello World!</menu>
<files folder="admin">
<filename>hello.php</filename>
<filename>index.html</filename>
</files>
</administration>
</install>
Bài 5 - Hướng dẫn xây dựng Extension
<administration>
<menu>Hello World!</menu>
<files folder="admin">
<filename>hello.php</filename>
<filename>index.html</filename>
</files>
</administration>
</install>
Xây dựng Component
Tạo file index.html để bảo mật
<html><body bgcolor="#FFFFFF"></body></html>
Bài 5 - Hướng dẫn xây dựng Extension
Xây dựng Component
Bổ xung Model tại site/models/hello.php
<?php
defined( '_JEXEC' ) or die( 'Restricted access' );
jimport( 'joomla.application.component.model' );
class HelloModelHello extends JModel
{
function getGreeting()
{
return 'Hello, World!';
}
}Bài 5 - Hướng dẫn xây dựng Extension
<?php
defined( '_JEXEC' ) or die( 'Restricted access' );
jimport( 'joomla.application.component.model' );
class HelloModelHello extends JModel
{
function getGreeting()
{
return 'Hello, World!';
}
}
Xây dựng Component
Sử dụng Model: bằng cách thay đổi tại dòng $greeting =
"Hello World!"; tại file site/views/hello/view.html.php
<?php
defined( '_JEXEC' ) or die( 'Restricted access' );
jimport( 'joomla.application.component.view');
class HelloViewHello extends JView
{
function display($tpl = null)
{
$model =& $this->getModel();
$greeting = $model->getGreeting();
$this->assignRef( 'greeting', $greeting );
parent::display($tpl);
}
}Bài 5 - Hướng dẫn xây dựng Extension
<?php
defined( '_JEXEC' ) or die( 'Restricted access' );
jimport( 'joomla.application.component.view');
class HelloViewHello extends JView
{
function display($tpl = null)
{
$model =& $this->getModel();
$greeting = $model->getGreeting();
$this->assignRef( 'greeting', $greeting );
parent::display($tpl);
}
}
Xây dựng Component
Bổ sung file vào gói cài đặt bằng dòng lệnh
<filename>models/hello.php</filename>
<files folder="site">
<filename>controller.php</filename>
<filename>hello.php</filename>
<filename>index.html</filename>
<filename>models/hello.php</filename>
<filename>models/index.html</filename>
<filename>views/index.html</filename>
<filename>views/hello/index.html</filename>
<filename>views/hello/view.html.php</filename>
<filename>views/hello/tmpl/default.php</filename>
<filename>views/hello/tmpl/index.html</filename>
</files>
Bài 5 - Hướng dẫn xây dựng Extension
<files folder="site">
<filename>controller.php</filename>
<filename>hello.php</filename>
<filename>index.html</filename>
<filename>models/hello.php</filename>
<filename>models/index.html</filename>
<filename>views/index.html</filename>
<filename>views/hello/index.html</filename>
<filename>views/hello/view.html.php</filename>
<filename>views/hello/tmpl/default.php</filename>
<filename>views/hello/tmpl/index.html</filename>
</files>
Xây dựng Module
Cấu trúc các file trong 1 module:
• mod_helloworld.php
• mod_helloworld.xml
• helper.php
• tmpl/default.php
Bài 5 - Hướng dẫn xây dựng Extension
• mod_helloworld.php
• mod_helloworld.xml
• helper.php
• tmpl/default.php
Xây dựng Module
File mod_helloworld.php
<?php
defined( '_JEXEC' ) or die( 'Restricted access' );
require_once( dirname(__FILE__).DS.'helper.php' );
$hello = modHelloWorldHelper::getHello( $params );
require( JModuleHelper::getLayoutPath( 'mod_helloworld' ) );
?>
Bài 5 - Hướng dẫn xây dựng Extension
<?php
defined( '_JEXEC' ) or die( 'Restricted access' );
require_once( dirname(__FILE__).DS.'helper.php' );
$hello = modHelloWorldHelper::getHello( $params );
require( JModuleHelper::getLayoutPath( 'mod_helloworld' ) );
?>
Xây dựng Module
File helper.php
<?php
class modHelloWorldHelper
{
function getHello( $params )
{
return 'Hello, World!';
}
}
?>
Bài 5 - Hướng dẫn xây dựng Extension
<?php
class modHelloWorldHelper
{
function getHello( $params )
{
return 'Hello, World!';
}
}
?>
Xây dựng Module
File tmpl/defalt.php
<?php // no direct access
defined( '_JEXEC' ) or die( 'Restricted access' ); ?>
<?php echo $hello; ?>
Bài 5 - Hướng dẫn xây dựng Extension
Xây dựng Module
File mod_hello_world.xml
<?xml version="1.0" encoding="utf-8"?>
<install type="module" version="1.5.0">
<name>Hello, World!</name>
<author>John Doe</author>
<version>1.5.0</version>
<description>A simple Hello, World! module.</description>
<files>
<filename>mod_helloworld.xml</filename>
<filename module="mod_helloworld">mod_helloworld.php</filename>
<filename>index.html</filename>
<filename>helper.php</filename>
<filename>tmpl/default.php</filename>
<filename>tmpl/index.html</filename>
</files>
<params>
</params>
</install>
Bài 5 - Hướng dẫn xây dựng Extension
<?xml version="1.0" encoding="utf-8"?>
<install type="module" version="1.5.0">
<name>Hello, World!</name>
<author>John Doe</author>
<version>1.5.0</version>
<description>A simple Hello, World! module.</description>
<files>
<filename>mod_helloworld.xml</filename>
<filename module="mod_helloworld">mod_helloworld.php</filename>
<filename>index.html</filename>
<filename>helper.php</filename>
<filename>tmpl/default.php</filename>
<filename>tmpl/index.html</filename>
</files>
<params>
</params>
</install>
Xây dựng Module
Tạo file index.html trong các thư mục của module để
bảo mật với nội dung:
<html><body bgcolor="#FFFFFF"></body></html>
Bài 5 - Hướng dẫn xây dựng Extension
Tổng kết bài học
• Các component trong Joomla được xây dựng theo mô
hình MVC và dựa vào Joomla Framework - thư viện mã
nguồn sẵn có trong Joomla CMS.
• Quy trình xây dựng giống nhau đối với tất cả các
component hay module.
• Sau khi hoàn thiện lập trình một component hay module,
cần đóng gói thành file .zip để có thể cài đặt vào Joomla
từ trình cài đặt tháo gỡ tự động của Joomla
• Các component trong Joomla được xây dựng theo mô
hình MVC và dựa vào Joomla Framework - thư viện mã
nguồn sẵn có trong Joomla CMS.
• Quy trình xây dựng giống nhau đối với tất cả các
component hay module.
• Sau khi hoàn thiện lập trình một component hay module,
cần đóng gói thành file .zip để có thể cài đặt vào Joomla
từ trình cài đặt tháo gỡ tự động của Joomla
Bài 5 - Hướng dẫn xây dựng Extension

More Related Content

What's hot

Giáo trình Zend Framework 2.0 - Nhúng template vào ứng dung ZF2 (P3) - Bài 7
Giáo trình Zend Framework 2.0 - Nhúng template vào ứng dung ZF2 (P3) - Bài 7Giáo trình Zend Framework 2.0 - Nhúng template vào ứng dung ZF2 (P3) - Bài 7
Giáo trình Zend Framework 2.0 - Nhúng template vào ứng dung ZF2 (P3) - Bài 7KhanhPham
 
Bài 7: Thư viện jQuery và thư viện jQuery UI - Giáo trình FPT
Bài 7: Thư viện jQuery và thư viện jQuery UI - Giáo trình FPTBài 7: Thư viện jQuery và thư viện jQuery UI - Giáo trình FPT
Bài 7: Thư viện jQuery và thư viện jQuery UI - Giáo trình FPTMasterCode.vn
 
Slide3 - Co ban HTML5
Slide3 - Co ban HTML5Slide3 - Co ban HTML5
Slide3 - Co ban HTML5Đặng Til
 
Tài liệu Zend Framework 2 : Thêm dữ liệu vào database trong ZF2 - Bài 10
Tài liệu Zend Framework 2 : Thêm dữ liệu vào database trong ZF2 - Bài 10Tài liệu Zend Framework 2 : Thêm dữ liệu vào database trong ZF2 - Bài 10
Tài liệu Zend Framework 2 : Thêm dữ liệu vào database trong ZF2 - Bài 10KhanhPham
 
Bài 6: Custom Tag - Lập Trình Mạng Nâng Cao
Bài 6: Custom Tag - Lập Trình Mạng Nâng CaoBài 6: Custom Tag - Lập Trình Mạng Nâng Cao
Bài 6: Custom Tag - Lập Trình Mạng Nâng CaoTuan Nguyen
 
BÀI 4 Làm việc với các thành phần VIDEO, AUDIO, CANVAS của HTML5
BÀI 4 Làm việc với các thành phần VIDEO, AUDIO, CANVAS của HTML5BÀI 4 Làm việc với các thành phần VIDEO, AUDIO, CANVAS của HTML5
BÀI 4 Làm việc với các thành phần VIDEO, AUDIO, CANVAS của HTML5MasterCode.vn
 
BÀI 7 Làm việc với thành phần mới và phạm vi ứng dụng của HTML5 - Giáo trình FPT
BÀI 7 Làm việc với thành phần mới và phạm vi ứng dụng của HTML5 - Giáo trình FPTBÀI 7 Làm việc với thành phần mới và phạm vi ứng dụng của HTML5 - Giáo trình FPT
BÀI 7 Làm việc với thành phần mới và phạm vi ứng dụng của HTML5 - Giáo trình FPTMasterCode.vn
 
Bài 10: Custom Tag - Lập Trình Mạng Nâng Cao
Bài 10: Custom Tag - Lập Trình Mạng Nâng CaoBài 10: Custom Tag - Lập Trình Mạng Nâng Cao
Bài 10: Custom Tag - Lập Trình Mạng Nâng CaoTuan Nguyen
 
TÀI LIỆU HƯỚNG VIẾT MODULE VÀ WEBSERVICE CHO MAGENTO 1.7
TÀI LIỆU HƯỚNG VIẾT MODULE VÀ WEBSERVICE CHO MAGENTO 1.7TÀI LIỆU HƯỚNG VIẾT MODULE VÀ WEBSERVICE CHO MAGENTO 1.7
TÀI LIỆU HƯỚNG VIẾT MODULE VÀ WEBSERVICE CHO MAGENTO 1.7dvms
 
BÀI 6 Làm việc với thành phần mở rộng của CSS3 - Giáo trình FPT
BÀI 6 Làm việc với thành phần mở rộng của CSS3 - Giáo trình FPTBÀI 6 Làm việc với thành phần mở rộng của CSS3 - Giáo trình FPT
BÀI 6 Làm việc với thành phần mở rộng của CSS3 - Giáo trình FPTMasterCode.vn
 
Zend Framework 2.0: Upload file và Multi upload files trong ZF2 - Bài 9
Zend Framework 2.0:  Upload file và Multi upload files trong ZF2 - Bài 9Zend Framework 2.0:  Upload file và Multi upload files trong ZF2 - Bài 9
Zend Framework 2.0: Upload file và Multi upload files trong ZF2 - Bài 9KhanhPham
 
Tài liệu lập trình Wordpress - bài 5 - Action và Action hook trong Wordpress
Tài liệu lập trình Wordpress - bài 5 - Action và Action hook trong WordpressTài liệu lập trình Wordpress - bài 5 - Action và Action hook trong Wordpress
Tài liệu lập trình Wordpress - bài 5 - Action và Action hook trong WordpressKhanhPham
 
Bai4 basic jsp_4474
Bai4 basic jsp_4474Bai4 basic jsp_4474
Bai4 basic jsp_4474Ham Chơi
 
Bài 4: JSP Cơ Bản - Lập Trình Mạng Nâng Cao
Bài 4: JSP Cơ Bản - Lập Trình Mạng Nâng CaoBài 4: JSP Cơ Bản - Lập Trình Mạng Nâng Cao
Bài 4: JSP Cơ Bản - Lập Trình Mạng Nâng CaoTuan Nguyen
 
Bai1 gioi thieu_servlet_va_jsp_8952
Bai1 gioi thieu_servlet_va_jsp_8952Bai1 gioi thieu_servlet_va_jsp_8952
Bai1 gioi thieu_servlet_va_jsp_8952Ham Chơi
 
E learning lab - Tim hieu Cake PHP
E learning lab - Tim hieu Cake PHPE learning lab - Tim hieu Cake PHP
E learning lab - Tim hieu Cake PHPelearninglabvn
 

What's hot (20)

Giáo trình Zend Framework 2.0 - Nhúng template vào ứng dung ZF2 (P3) - Bài 7
Giáo trình Zend Framework 2.0 - Nhúng template vào ứng dung ZF2 (P3) - Bài 7Giáo trình Zend Framework 2.0 - Nhúng template vào ứng dung ZF2 (P3) - Bài 7
Giáo trình Zend Framework 2.0 - Nhúng template vào ứng dung ZF2 (P3) - Bài 7
 
Laptrinh jdbc
Laptrinh jdbcLaptrinh jdbc
Laptrinh jdbc
 
Bài 7: Thư viện jQuery và thư viện jQuery UI - Giáo trình FPT
Bài 7: Thư viện jQuery và thư viện jQuery UI - Giáo trình FPTBài 7: Thư viện jQuery và thư viện jQuery UI - Giáo trình FPT
Bài 7: Thư viện jQuery và thư viện jQuery UI - Giáo trình FPT
 
Slide3 - Co ban HTML5
Slide3 - Co ban HTML5Slide3 - Co ban HTML5
Slide3 - Co ban HTML5
 
Tài liệu Zend Framework 2 : Thêm dữ liệu vào database trong ZF2 - Bài 10
Tài liệu Zend Framework 2 : Thêm dữ liệu vào database trong ZF2 - Bài 10Tài liệu Zend Framework 2 : Thêm dữ liệu vào database trong ZF2 - Bài 10
Tài liệu Zend Framework 2 : Thêm dữ liệu vào database trong ZF2 - Bài 10
 
Bài 6: Custom Tag - Lập Trình Mạng Nâng Cao
Bài 6: Custom Tag - Lập Trình Mạng Nâng CaoBài 6: Custom Tag - Lập Trình Mạng Nâng Cao
Bài 6: Custom Tag - Lập Trình Mạng Nâng Cao
 
Ung dung web chuong 9
Ung dung web  chuong 9Ung dung web  chuong 9
Ung dung web chuong 9
 
BÀI 4 Làm việc với các thành phần VIDEO, AUDIO, CANVAS của HTML5
BÀI 4 Làm việc với các thành phần VIDEO, AUDIO, CANVAS của HTML5BÀI 4 Làm việc với các thành phần VIDEO, AUDIO, CANVAS của HTML5
BÀI 4 Làm việc với các thành phần VIDEO, AUDIO, CANVAS của HTML5
 
BÀI 7 Làm việc với thành phần mới và phạm vi ứng dụng của HTML5 - Giáo trình FPT
BÀI 7 Làm việc với thành phần mới và phạm vi ứng dụng của HTML5 - Giáo trình FPTBÀI 7 Làm việc với thành phần mới và phạm vi ứng dụng của HTML5 - Giáo trình FPT
BÀI 7 Làm việc với thành phần mới và phạm vi ứng dụng của HTML5 - Giáo trình FPT
 
Giới thiệu Yii Framework 1
Giới thiệu Yii Framework 1Giới thiệu Yii Framework 1
Giới thiệu Yii Framework 1
 
Bài 10: Custom Tag - Lập Trình Mạng Nâng Cao
Bài 10: Custom Tag - Lập Trình Mạng Nâng CaoBài 10: Custom Tag - Lập Trình Mạng Nâng Cao
Bài 10: Custom Tag - Lập Trình Mạng Nâng Cao
 
TÀI LIỆU HƯỚNG VIẾT MODULE VÀ WEBSERVICE CHO MAGENTO 1.7
TÀI LIỆU HƯỚNG VIẾT MODULE VÀ WEBSERVICE CHO MAGENTO 1.7TÀI LIỆU HƯỚNG VIẾT MODULE VÀ WEBSERVICE CHO MAGENTO 1.7
TÀI LIỆU HƯỚNG VIẾT MODULE VÀ WEBSERVICE CHO MAGENTO 1.7
 
BÀI 6 Làm việc với thành phần mở rộng của CSS3 - Giáo trình FPT
BÀI 6 Làm việc với thành phần mở rộng của CSS3 - Giáo trình FPTBÀI 6 Làm việc với thành phần mở rộng của CSS3 - Giáo trình FPT
BÀI 6 Làm việc với thành phần mở rộng của CSS3 - Giáo trình FPT
 
Zend Framework 2.0: Upload file và Multi upload files trong ZF2 - Bài 9
Zend Framework 2.0:  Upload file và Multi upload files trong ZF2 - Bài 9Zend Framework 2.0:  Upload file và Multi upload files trong ZF2 - Bài 9
Zend Framework 2.0: Upload file và Multi upload files trong ZF2 - Bài 9
 
Tài liệu lập trình Wordpress - bài 5 - Action và Action hook trong Wordpress
Tài liệu lập trình Wordpress - bài 5 - Action và Action hook trong WordpressTài liệu lập trình Wordpress - bài 5 - Action và Action hook trong Wordpress
Tài liệu lập trình Wordpress - bài 5 - Action và Action hook trong Wordpress
 
Bai 09 Basic jsp
Bai 09 Basic jspBai 09 Basic jsp
Bai 09 Basic jsp
 
Bai4 basic jsp_4474
Bai4 basic jsp_4474Bai4 basic jsp_4474
Bai4 basic jsp_4474
 
Bài 4: JSP Cơ Bản - Lập Trình Mạng Nâng Cao
Bài 4: JSP Cơ Bản - Lập Trình Mạng Nâng CaoBài 4: JSP Cơ Bản - Lập Trình Mạng Nâng Cao
Bài 4: JSP Cơ Bản - Lập Trình Mạng Nâng Cao
 
Bai1 gioi thieu_servlet_va_jsp_8952
Bai1 gioi thieu_servlet_va_jsp_8952Bai1 gioi thieu_servlet_va_jsp_8952
Bai1 gioi thieu_servlet_va_jsp_8952
 
E learning lab - Tim hieu Cake PHP
E learning lab - Tim hieu Cake PHPE learning lab - Tim hieu Cake PHP
E learning lab - Tim hieu Cake PHP
 

Viewers also liked

Bài 6 Tải file và hình ảnh lên website - Xây dựng ứng dụng web
Bài 6 Tải file và hình ảnh lên website - Xây dựng ứng dụng webBài 6 Tải file và hình ảnh lên website - Xây dựng ứng dụng web
Bài 6 Tải file và hình ảnh lên website - Xây dựng ứng dụng webMasterCode.vn
 
Bài 6 Sử dụng hàm - Giáo trình FPT
Bài 6 Sử dụng hàm - Giáo trình FPTBài 6 Sử dụng hàm - Giáo trình FPT
Bài 6 Sử dụng hàm - Giáo trình FPTMasterCode.vn
 
BÀI 1 Những khái niệm đầu tiên về HTML5 - Giáo trình FPT
BÀI 1 Những khái niệm đầu tiên về HTML5 - Giáo trình FPTBÀI 1 Những khái niệm đầu tiên về HTML5 - Giáo trình FPT
BÀI 1 Những khái niệm đầu tiên về HTML5 - Giáo trình FPTMasterCode.vn
 
Bài 4 Quản trị domain & hosting Windows - Quản trị website
Bài 4 Quản trị domain & hosting Windows - Quản trị websiteBài 4 Quản trị domain & hosting Windows - Quản trị website
Bài 4 Quản trị domain & hosting Windows - Quản trị websiteMasterCode.vn
 
Bài 3 Cài đặt và quản lý các Extension của Joomla
Bài 3 Cài đặt và quản lý các Extension của JoomlaBài 3 Cài đặt và quản lý các Extension của Joomla
Bài 3 Cài đặt và quản lý các Extension của JoomlaMasterCode.vn
 
Bài 4 Bảo mật cho website - Xây dựng ứng dụng web
Bài 4 Bảo mật cho website - Xây dựng ứng dụng webBài 4 Bảo mật cho website - Xây dựng ứng dụng web
Bài 4 Bảo mật cho website - Xây dựng ứng dụng webMasterCode.vn
 
Bài 6: DEDICATED SERVER/VIRTUAL PRIVATE SERVER (VPS HOSTING) - Quản trị website
Bài 6: DEDICATED SERVER/VIRTUAL PRIVATE SERVER (VPS HOSTING) - Quản trị websiteBài 6: DEDICATED SERVER/VIRTUAL PRIVATE SERVER (VPS HOSTING) - Quản trị website
Bài 6: DEDICATED SERVER/VIRTUAL PRIVATE SERVER (VPS HOSTING) - Quản trị websiteMasterCode.vn
 
Bài 3 Quản trị hosting trong cPanel (tiếp) - Quản trị website
Bài 3 Quản trị hosting trong cPanel (tiếp) - Quản trị websiteBài 3 Quản trị hosting trong cPanel (tiếp) - Quản trị website
Bài 3 Quản trị hosting trong cPanel (tiếp) - Quản trị websiteMasterCode.vn
 
Bài 2: Lập trình hướng đối tượng & Collection - Lập trình winform - Giáo trìn...
Bài 2: Lập trình hướng đối tượng & Collection - Lập trình winform - Giáo trìn...Bài 2: Lập trình hướng đối tượng & Collection - Lập trình winform - Giáo trìn...
Bài 2: Lập trình hướng đối tượng & Collection - Lập trình winform - Giáo trìn...MasterCode.vn
 
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
 
Bài 9 Hướng dẫn thiết kế website bán hàng trực tuyến bằng Joomla
Bài 9 Hướng dẫn thiết kế website bán hàng trực tuyến bằng JoomlaBài 9 Hướng dẫn thiết kế website bán hàng trực tuyến bằng Joomla
Bài 9 Hướng dẫn thiết kế website bán hàng trực tuyến bằng JoomlaMasterCode.vn
 
Bài 5: Hướng dẫn SEO cho website - Quản trị website
Bài 5: Hướng dẫn SEO cho website - Quản trị websiteBài 5: Hướng dẫn SEO cho website - Quản trị website
Bài 5: Hướng dẫn SEO cho website - Quản trị websiteMasterCode.vn
 
Bài 2 Sử dụng phần mềm ADOBE BRIDGE & các thao tác làm việc cơ bản - Giáo trì...
Bài 2 Sử dụng phần mềm ADOBE BRIDGE & các thao tác làm việc cơ bản - Giáo trì...Bài 2 Sử dụng phần mềm ADOBE BRIDGE & các thao tác làm việc cơ bản - Giáo trì...
Bài 2 Sử dụng phần mềm ADOBE BRIDGE & các thao tác làm việc cơ bản - Giáo trì...MasterCode.vn
 
Bài 9: Sao lưu và khôi phục hệ thống Domain - Giáo trình FPT
Bài 9: Sao lưu và khôi phục hệ thống Domain - Giáo trình FPTBài 9: Sao lưu và khôi phục hệ thống Domain - Giáo trình FPT
Bài 9: Sao lưu và khôi phục hệ thống Domain - Giáo trình FPTMasterCode.vn
 
BÀI 7 Kỹ thuật hòa trộn nâng cao - Giáo trình FPT
BÀI 7 Kỹ thuật hòa trộn nâng cao - Giáo trình FPTBÀI 7 Kỹ thuật hòa trộn nâng cao - Giáo trình FPT
BÀI 7 Kỹ thuật hòa trộn nâng cao - Giáo trình FPTMasterCode.vn
 
Bài 5: Quản lý dữ liệu SharePoint
Bài 5: Quản lý dữ liệu SharePointBài 5: Quản lý dữ liệu SharePoint
Bài 5: Quản lý dữ liệu SharePointMasterCode.vn
 
Bài 3: Thao tác với dữ liệu SharePoint từ phía client
Bài 3: Thao tác với dữ liệu SharePoint từ phía clientBài 3: Thao tác với dữ liệu SharePoint từ phía client
Bài 3: Thao tác với dữ liệu SharePoint từ phía clientMasterCode.vn
 
Bài 2: Web Part và các trang SharePoint
Bài 2: Web Part và các trang SharePointBài 2: Web Part và các trang SharePoint
Bài 2: Web Part và các trang SharePointMasterCode.vn
 
Bài 4: Thao tác với dữ liệu SharePoint thông qua ADO.NET Data Services và REST
Bài 4: Thao tác với dữ liệu SharePoint thông qua ADO.NET Data Services và RESTBài 4: Thao tác với dữ liệu SharePoint thông qua ADO.NET Data Services và REST
Bài 4: Thao tác với dữ liệu SharePoint thông qua ADO.NET Data Services và RESTMasterCode.vn
 
Bài 1: SharePoint 2010 và xây dựng giải pháp cho SharePoint 2010
Bài 1: SharePoint 2010 và xây dựng giải pháp cho SharePoint 2010Bài 1: SharePoint 2010 và xây dựng giải pháp cho SharePoint 2010
Bài 1: SharePoint 2010 và xây dựng giải pháp cho SharePoint 2010MasterCode.vn
 

Viewers also liked (20)

Bài 6 Tải file và hình ảnh lên website - Xây dựng ứng dụng web
Bài 6 Tải file và hình ảnh lên website - Xây dựng ứng dụng webBài 6 Tải file và hình ảnh lên website - Xây dựng ứng dụng web
Bài 6 Tải file và hình ảnh lên website - Xây dựng ứng dụng web
 
Bài 6 Sử dụng hàm - Giáo trình FPT
Bài 6 Sử dụng hàm - Giáo trình FPTBài 6 Sử dụng hàm - Giáo trình FPT
Bài 6 Sử dụng hàm - Giáo trình FPT
 
BÀI 1 Những khái niệm đầu tiên về HTML5 - Giáo trình FPT
BÀI 1 Những khái niệm đầu tiên về HTML5 - Giáo trình FPTBÀI 1 Những khái niệm đầu tiên về HTML5 - Giáo trình FPT
BÀI 1 Những khái niệm đầu tiên về HTML5 - Giáo trình FPT
 
Bài 4 Quản trị domain & hosting Windows - Quản trị website
Bài 4 Quản trị domain & hosting Windows - Quản trị websiteBài 4 Quản trị domain & hosting Windows - Quản trị website
Bài 4 Quản trị domain & hosting Windows - Quản trị website
 
Bài 3 Cài đặt và quản lý các Extension của Joomla
Bài 3 Cài đặt và quản lý các Extension của JoomlaBài 3 Cài đặt và quản lý các Extension của Joomla
Bài 3 Cài đặt và quản lý các Extension của Joomla
 
Bài 4 Bảo mật cho website - Xây dựng ứng dụng web
Bài 4 Bảo mật cho website - Xây dựng ứng dụng webBài 4 Bảo mật cho website - Xây dựng ứng dụng web
Bài 4 Bảo mật cho website - Xây dựng ứng dụng web
 
Bài 6: DEDICATED SERVER/VIRTUAL PRIVATE SERVER (VPS HOSTING) - Quản trị website
Bài 6: DEDICATED SERVER/VIRTUAL PRIVATE SERVER (VPS HOSTING) - Quản trị websiteBài 6: DEDICATED SERVER/VIRTUAL PRIVATE SERVER (VPS HOSTING) - Quản trị website
Bài 6: DEDICATED SERVER/VIRTUAL PRIVATE SERVER (VPS HOSTING) - Quản trị website
 
Bài 3 Quản trị hosting trong cPanel (tiếp) - Quản trị website
Bài 3 Quản trị hosting trong cPanel (tiếp) - Quản trị websiteBài 3 Quản trị hosting trong cPanel (tiếp) - Quản trị website
Bài 3 Quản trị hosting trong cPanel (tiếp) - Quản trị website
 
Bài 2: Lập trình hướng đối tượng & Collection - Lập trình winform - Giáo trìn...
Bài 2: Lập trình hướng đối tượng & Collection - Lập trình winform - Giáo trìn...Bài 2: Lập trình hướng đối tượng & Collection - Lập trình winform - Giáo trìn...
Bài 2: Lập trình hướng đối tượng & Collection - Lập trình winform - Giáo trìn...
 
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
 
Bài 9 Hướng dẫn thiết kế website bán hàng trực tuyến bằng Joomla
Bài 9 Hướng dẫn thiết kế website bán hàng trực tuyến bằng JoomlaBài 9 Hướng dẫn thiết kế website bán hàng trực tuyến bằng Joomla
Bài 9 Hướng dẫn thiết kế website bán hàng trực tuyến bằng Joomla
 
Bài 5: Hướng dẫn SEO cho website - Quản trị website
Bài 5: Hướng dẫn SEO cho website - Quản trị websiteBài 5: Hướng dẫn SEO cho website - Quản trị website
Bài 5: Hướng dẫn SEO cho website - Quản trị website
 
Bài 2 Sử dụng phần mềm ADOBE BRIDGE & các thao tác làm việc cơ bản - Giáo trì...
Bài 2 Sử dụng phần mềm ADOBE BRIDGE & các thao tác làm việc cơ bản - Giáo trì...Bài 2 Sử dụng phần mềm ADOBE BRIDGE & các thao tác làm việc cơ bản - Giáo trì...
Bài 2 Sử dụng phần mềm ADOBE BRIDGE & các thao tác làm việc cơ bản - Giáo trì...
 
Bài 9: Sao lưu và khôi phục hệ thống Domain - Giáo trình FPT
Bài 9: Sao lưu và khôi phục hệ thống Domain - Giáo trình FPTBài 9: Sao lưu và khôi phục hệ thống Domain - Giáo trình FPT
Bài 9: Sao lưu và khôi phục hệ thống Domain - Giáo trình FPT
 
BÀI 7 Kỹ thuật hòa trộn nâng cao - Giáo trình FPT
BÀI 7 Kỹ thuật hòa trộn nâng cao - Giáo trình FPTBÀI 7 Kỹ thuật hòa trộn nâng cao - Giáo trình FPT
BÀI 7 Kỹ thuật hòa trộn nâng cao - Giáo trình FPT
 
Bài 5: Quản lý dữ liệu SharePoint
Bài 5: Quản lý dữ liệu SharePointBài 5: Quản lý dữ liệu SharePoint
Bài 5: Quản lý dữ liệu SharePoint
 
Bài 3: Thao tác với dữ liệu SharePoint từ phía client
Bài 3: Thao tác với dữ liệu SharePoint từ phía clientBài 3: Thao tác với dữ liệu SharePoint từ phía client
Bài 3: Thao tác với dữ liệu SharePoint từ phía client
 
Bài 2: Web Part và các trang SharePoint
Bài 2: Web Part và các trang SharePointBài 2: Web Part và các trang SharePoint
Bài 2: Web Part và các trang SharePoint
 
Bài 4: Thao tác với dữ liệu SharePoint thông qua ADO.NET Data Services và REST
Bài 4: Thao tác với dữ liệu SharePoint thông qua ADO.NET Data Services và RESTBài 4: Thao tác với dữ liệu SharePoint thông qua ADO.NET Data Services và REST
Bài 4: Thao tác với dữ liệu SharePoint thông qua ADO.NET Data Services và REST
 
Bài 1: SharePoint 2010 và xây dựng giải pháp cho SharePoint 2010
Bài 1: SharePoint 2010 và xây dựng giải pháp cho SharePoint 2010Bài 1: SharePoint 2010 và xây dựng giải pháp cho SharePoint 2010
Bài 1: SharePoint 2010 và xây dựng giải pháp cho SharePoint 2010
 

Similar to Bài 5 Hướng dẫn xây dựng Extension

tao module joomla 1.5
tao module  joomla 1.5tao module  joomla 1.5
tao module joomla 1.5dvms
 
Bài 2 Các kỹ thuật lập trình MySQL với PHP nâng cao - Xây dựng ứng dụng web
Bài 2 Các kỹ thuật lập trình MySQL với PHP nâng cao - Xây dựng ứng dụng webBài 2 Các kỹ thuật lập trình MySQL với PHP nâng cao - Xây dựng ứng dụng web
Bài 2 Các kỹ thuật lập trình MySQL với PHP nâng cao - Xây dựng ứng dụng webMasterCode.vn
 
DVMS tạo module joomla 2.5
DVMS tạo module joomla 2.5DVMS tạo module joomla 2.5
DVMS tạo module joomla 2.5dvms
 
Hỏi tình hình bk tiny bktiny-hdsd
Hỏi tình hình bk tiny   bktiny-hdsdHỏi tình hình bk tiny   bktiny-hdsd
Hỏi tình hình bk tiny bktiny-hdsdVu Hung Nguyen
 
Co ban ve_zend_framework 1
Co ban ve_zend_framework 1Co ban ve_zend_framework 1
Co ban ve_zend_framework 1Ông Thông
 
Bài 1 Lập trình website theo mô hình MVC - Xây dựng ứng dụng web
Bài 1 Lập trình website theo mô hình MVC - Xây dựng ứng dụng webBài 1 Lập trình website theo mô hình MVC - Xây dựng ứng dụng web
Bài 1 Lập trình website theo mô hình MVC - Xây dựng ứng dụng webMasterCode.vn
 
Devwork.vn Tài liệu lập trình PHP Laravel
Devwork.vn Tài liệu lập trình PHP LaravelDevwork.vn Tài liệu lập trình PHP Laravel
Devwork.vn Tài liệu lập trình PHP LaravelDevwork
 
Lap trinh-joomla-15-theo-mo-hinh-mvc
Lap trinh-joomla-15-theo-mo-hinh-mvcLap trinh-joomla-15-theo-mo-hinh-mvc
Lap trinh-joomla-15-theo-mo-hinh-mvcChe Linh Nguyen
 
Tailieuonline.tk joomla-viet-component
 Tailieuonline.tk joomla-viet-component Tailieuonline.tk joomla-viet-component
Tailieuonline.tk joomla-viet-componentzzbabyloveszz
 
Lớp kết nối csdl dùng jdbc trong java
Lớp kết nối csdl dùng jdbc trong javaLớp kết nối csdl dùng jdbc trong java
Lớp kết nối csdl dùng jdbc trong javaANHMATTROI
 
Create easymoduleinphpfox
Create easymoduleinphpfoxCreate easymoduleinphpfox
Create easymoduleinphpfoxEntu Di
 
Tutoria mvc framework
Tutoria mvc frameworkTutoria mvc framework
Tutoria mvc frameworkXuan Le
 

Similar to Bài 5 Hướng dẫn xây dựng Extension (20)

Yii
YiiYii
Yii
 
tao module joomla 1.5
tao module  joomla 1.5tao module  joomla 1.5
tao module joomla 1.5
 
Web301 slide 2
Web301   slide 2Web301   slide 2
Web301 slide 2
 
Bài 2 Các kỹ thuật lập trình MySQL với PHP nâng cao - Xây dựng ứng dụng web
Bài 2 Các kỹ thuật lập trình MySQL với PHP nâng cao - Xây dựng ứng dụng webBài 2 Các kỹ thuật lập trình MySQL với PHP nâng cao - Xây dựng ứng dụng web
Bài 2 Các kỹ thuật lập trình MySQL với PHP nâng cao - Xây dựng ứng dụng web
 
DVMS tạo module joomla 2.5
DVMS tạo module joomla 2.5DVMS tạo module joomla 2.5
DVMS tạo module joomla 2.5
 
Hỏi tình hình bk tiny bktiny-hdsd
Hỏi tình hình bk tiny   bktiny-hdsdHỏi tình hình bk tiny   bktiny-hdsd
Hỏi tình hình bk tiny bktiny-hdsd
 
Co ban ve_zend_framework 1
Co ban ve_zend_framework 1Co ban ve_zend_framework 1
Co ban ve_zend_framework 1
 
Bài 1 Lập trình website theo mô hình MVC - Xây dựng ứng dụng web
Bài 1 Lập trình website theo mô hình MVC - Xây dựng ứng dụng webBài 1 Lập trình website theo mô hình MVC - Xây dựng ứng dụng web
Bài 1 Lập trình website theo mô hình MVC - Xây dựng ứng dụng web
 
Web301 slide 1
Web301   slide 1Web301   slide 1
Web301 slide 1
 
Devwork.vn Tài liệu lập trình PHP Laravel
Devwork.vn Tài liệu lập trình PHP LaravelDevwork.vn Tài liệu lập trình PHP Laravel
Devwork.vn Tài liệu lập trình PHP Laravel
 
Lap trinh-joomla-15-theo-mo-hinh-mvc
Lap trinh-joomla-15-theo-mo-hinh-mvcLap trinh-joomla-15-theo-mo-hinh-mvc
Lap trinh-joomla-15-theo-mo-hinh-mvc
 
Tailieuonline.tk joomla-viet-component
 Tailieuonline.tk joomla-viet-component Tailieuonline.tk joomla-viet-component
Tailieuonline.tk joomla-viet-component
 
Joo
JooJoo
Joo
 
Lớp kết nối csdl dùng jdbc trong java
Lớp kết nối csdl dùng jdbc trong javaLớp kết nối csdl dùng jdbc trong java
Lớp kết nối csdl dùng jdbc trong java
 
Aspnet 3.5 _04
Aspnet 3.5 _04Aspnet 3.5 _04
Aspnet 3.5 _04
 
C5. Model, DataSharing.pdf
C5. Model, DataSharing.pdfC5. Model, DataSharing.pdf
C5. Model, DataSharing.pdf
 
Create easymoduleinphpfox
Create easymoduleinphpfoxCreate easymoduleinphpfox
Create easymoduleinphpfox
 
Mvc Model
Mvc ModelMvc Model
Mvc Model
 
Bai08 10 java_fx
Bai08 10 java_fxBai08 10 java_fx
Bai08 10 java_fx
 
Tutoria mvc framework
Tutoria mvc frameworkTutoria mvc framework
Tutoria mvc framework
 

More from MasterCode.vn

Pd ftai lieu-tieng-anh-cho-nguoi-moi-bat-dau-mastercode.vn
Pd ftai lieu-tieng-anh-cho-nguoi-moi-bat-dau-mastercode.vnPd ftai lieu-tieng-anh-cho-nguoi-moi-bat-dau-mastercode.vn
Pd ftai lieu-tieng-anh-cho-nguoi-moi-bat-dau-mastercode.vnMasterCode.vn
 
Why apps-succeed-wpr-mastercode.vn
Why apps-succeed-wpr-mastercode.vnWhy apps-succeed-wpr-mastercode.vn
Why apps-succeed-wpr-mastercode.vnMasterCode.vn
 
Dzone performancemonitoring2016-mastercode.vn
Dzone performancemonitoring2016-mastercode.vnDzone performancemonitoring2016-mastercode.vn
Dzone performancemonitoring2016-mastercode.vnMasterCode.vn
 
Google công bố thông tin lịch xu hướng ngành 2017 mastercode.vn
Google công bố thông tin lịch xu hướng ngành 2017 mastercode.vnGoogle công bố thông tin lịch xu hướng ngành 2017 mastercode.vn
Google công bố thông tin lịch xu hướng ngành 2017 mastercode.vnMasterCode.vn
 
Nghiên cứu về khách hàng mastercode.vn
Nghiên cứu về khách hàng mastercode.vnNghiên cứu về khách hàng mastercode.vn
Nghiên cứu về khách hàng mastercode.vnMasterCode.vn
 
Lập trình sáng tạo creative computing textbook mastercode.vn
Lập trình sáng tạo creative computing textbook mastercode.vnLập trình sáng tạo creative computing textbook mastercode.vn
Lập trình sáng tạo creative computing textbook mastercode.vnMasterCode.vn
 
Pd fbuoi7 8--tongquanseo-mastercode.vn
Pd fbuoi7 8--tongquanseo-mastercode.vnPd fbuoi7 8--tongquanseo-mastercode.vn
Pd fbuoi7 8--tongquanseo-mastercode.vnMasterCode.vn
 
Pd fbuoi5 6-ảnh hưởng của social media tới kết quả seo-mastercode.vn
Pd fbuoi5 6-ảnh hưởng của social media tới kết quả seo-mastercode.vnPd fbuoi5 6-ảnh hưởng của social media tới kết quả seo-mastercode.vn
Pd fbuoi5 6-ảnh hưởng của social media tới kết quả seo-mastercode.vnMasterCode.vn
 
Pdf buoi3 4-link-building-tran-ngoc-chinh-mastercode.vn
Pdf buoi3 4-link-building-tran-ngoc-chinh-mastercode.vnPdf buoi3 4-link-building-tran-ngoc-chinh-mastercode.vn
Pdf buoi3 4-link-building-tran-ngoc-chinh-mastercode.vnMasterCode.vn
 
Pd fbuoi3 4-kỹ thuật xây dựng back link-mastercode.vn
Pd fbuoi3 4-kỹ thuật xây dựng back link-mastercode.vnPd fbuoi3 4-kỹ thuật xây dựng back link-mastercode.vn
Pd fbuoi3 4-kỹ thuật xây dựng back link-mastercode.vnMasterCode.vn
 
Pd fbuoi2 onpage – tối ưu hóa trang web-mastercode.vn
Pd fbuoi2 onpage – tối ưu hóa trang web-mastercode.vnPd fbuoi2 onpage – tối ưu hóa trang web-mastercode.vn
Pd fbuoi2 onpage – tối ưu hóa trang web-mastercode.vnMasterCode.vn
 
Pd fbuoi1 giới thiệu seo tools cơ bản-seo manager + seo guy-mastercode.vn
Pd fbuoi1 giới thiệu seo tools cơ bản-seo manager + seo guy-mastercode.vnPd fbuoi1 giới thiệu seo tools cơ bản-seo manager + seo guy-mastercode.vn
Pd fbuoi1 giới thiệu seo tools cơ bản-seo manager + seo guy-mastercode.vnMasterCode.vn
 
Pdf buoi1 2-on-page-tran-ngoc-chinh-mastercode.vn
Pdf buoi1 2-on-page-tran-ngoc-chinh-mastercode.vnPdf buoi1 2-on-page-tran-ngoc-chinh-mastercode.vn
Pdf buoi1 2-on-page-tran-ngoc-chinh-mastercode.vnMasterCode.vn
 
Pdfbài 7 máy tính xác tay và máy in bảo trì sự cố máy tính-mastercode.vn
Pdfbài 7 máy tính xác tay và máy in   bảo trì sự cố máy tính-mastercode.vnPdfbài 7 máy tính xác tay và máy in   bảo trì sự cố máy tính-mastercode.vn
Pdfbài 7 máy tính xác tay và máy in bảo trì sự cố máy tính-mastercode.vnMasterCode.vn
 
Pdfbài 6 bảo trì máy tính bảo trì sự cố máy tính-mastercode.vn
Pdfbài 6 bảo trì máy tính   bảo trì sự cố máy tính-mastercode.vnPdfbài 6 bảo trì máy tính   bảo trì sự cố máy tính-mastercode.vn
Pdfbài 6 bảo trì máy tính bảo trì sự cố máy tính-mastercode.vnMasterCode.vn
 
Pdfbài 5 bảo trì và tối ưu windows bảo trì sự cố máy tính-mastercode.vn
Pdfbài 5 bảo trì và tối ưu windows   bảo trì sự cố máy tính-mastercode.vnPdfbài 5 bảo trì và tối ưu windows   bảo trì sự cố máy tính-mastercode.vn
Pdfbài 5 bảo trì và tối ưu windows bảo trì sự cố máy tính-mastercode.vnMasterCode.vn
 
Pdfbài 4 ổ cứng hard drive bảo trì sự cố máy tính-mastercode.vn
Pdfbài 4 ổ cứng hard drive   bảo trì sự cố máy tính-mastercode.vnPdfbài 4 ổ cứng hard drive   bảo trì sự cố máy tính-mastercode.vn
Pdfbài 4 ổ cứng hard drive bảo trì sự cố máy tính-mastercode.vnMasterCode.vn
 
Pdfbài 3 cpu và ram bảo trì sự cố máy tính-mastercode.vn
Pdfbài 3 cpu và ram   bảo trì sự cố máy tính-mastercode.vnPdfbài 3 cpu và ram   bảo trì sự cố máy tính-mastercode.vn
Pdfbài 3 cpu và ram bảo trì sự cố máy tính-mastercode.vnMasterCode.vn
 
Pdfbài 1 giới thiệu chung về phần cứng bảo trì sự cố máy tính-mastercode.vn
Pdfbài 1 giới thiệu chung về phần cứng   bảo trì sự cố máy tính-mastercode.vnPdfbài 1 giới thiệu chung về phần cứng   bảo trì sự cố máy tính-mastercode.vn
Pdfbài 1 giới thiệu chung về phần cứng bảo trì sự cố máy tính-mastercode.vnMasterCode.vn
 
Pdfbài 2 bo mạch chủ (main) bảo trì sự cố máy tính-mastercode.vn
Pdfbài 2 bo mạch chủ (main)   bảo trì sự cố máy tính-mastercode.vnPdfbài 2 bo mạch chủ (main)   bảo trì sự cố máy tính-mastercode.vn
Pdfbài 2 bo mạch chủ (main) bảo trì sự cố máy tính-mastercode.vnMasterCode.vn
 

More from MasterCode.vn (20)

Pd ftai lieu-tieng-anh-cho-nguoi-moi-bat-dau-mastercode.vn
Pd ftai lieu-tieng-anh-cho-nguoi-moi-bat-dau-mastercode.vnPd ftai lieu-tieng-anh-cho-nguoi-moi-bat-dau-mastercode.vn
Pd ftai lieu-tieng-anh-cho-nguoi-moi-bat-dau-mastercode.vn
 
Why apps-succeed-wpr-mastercode.vn
Why apps-succeed-wpr-mastercode.vnWhy apps-succeed-wpr-mastercode.vn
Why apps-succeed-wpr-mastercode.vn
 
Dzone performancemonitoring2016-mastercode.vn
Dzone performancemonitoring2016-mastercode.vnDzone performancemonitoring2016-mastercode.vn
Dzone performancemonitoring2016-mastercode.vn
 
Google công bố thông tin lịch xu hướng ngành 2017 mastercode.vn
Google công bố thông tin lịch xu hướng ngành 2017 mastercode.vnGoogle công bố thông tin lịch xu hướng ngành 2017 mastercode.vn
Google công bố thông tin lịch xu hướng ngành 2017 mastercode.vn
 
Nghiên cứu về khách hàng mastercode.vn
Nghiên cứu về khách hàng mastercode.vnNghiên cứu về khách hàng mastercode.vn
Nghiên cứu về khách hàng mastercode.vn
 
Lập trình sáng tạo creative computing textbook mastercode.vn
Lập trình sáng tạo creative computing textbook mastercode.vnLập trình sáng tạo creative computing textbook mastercode.vn
Lập trình sáng tạo creative computing textbook mastercode.vn
 
Pd fbuoi7 8--tongquanseo-mastercode.vn
Pd fbuoi7 8--tongquanseo-mastercode.vnPd fbuoi7 8--tongquanseo-mastercode.vn
Pd fbuoi7 8--tongquanseo-mastercode.vn
 
Pd fbuoi5 6-ảnh hưởng của social media tới kết quả seo-mastercode.vn
Pd fbuoi5 6-ảnh hưởng của social media tới kết quả seo-mastercode.vnPd fbuoi5 6-ảnh hưởng của social media tới kết quả seo-mastercode.vn
Pd fbuoi5 6-ảnh hưởng của social media tới kết quả seo-mastercode.vn
 
Pdf buoi3 4-link-building-tran-ngoc-chinh-mastercode.vn
Pdf buoi3 4-link-building-tran-ngoc-chinh-mastercode.vnPdf buoi3 4-link-building-tran-ngoc-chinh-mastercode.vn
Pdf buoi3 4-link-building-tran-ngoc-chinh-mastercode.vn
 
Pd fbuoi3 4-kỹ thuật xây dựng back link-mastercode.vn
Pd fbuoi3 4-kỹ thuật xây dựng back link-mastercode.vnPd fbuoi3 4-kỹ thuật xây dựng back link-mastercode.vn
Pd fbuoi3 4-kỹ thuật xây dựng back link-mastercode.vn
 
Pd fbuoi2 onpage – tối ưu hóa trang web-mastercode.vn
Pd fbuoi2 onpage – tối ưu hóa trang web-mastercode.vnPd fbuoi2 onpage – tối ưu hóa trang web-mastercode.vn
Pd fbuoi2 onpage – tối ưu hóa trang web-mastercode.vn
 
Pd fbuoi1 giới thiệu seo tools cơ bản-seo manager + seo guy-mastercode.vn
Pd fbuoi1 giới thiệu seo tools cơ bản-seo manager + seo guy-mastercode.vnPd fbuoi1 giới thiệu seo tools cơ bản-seo manager + seo guy-mastercode.vn
Pd fbuoi1 giới thiệu seo tools cơ bản-seo manager + seo guy-mastercode.vn
 
Pdf buoi1 2-on-page-tran-ngoc-chinh-mastercode.vn
Pdf buoi1 2-on-page-tran-ngoc-chinh-mastercode.vnPdf buoi1 2-on-page-tran-ngoc-chinh-mastercode.vn
Pdf buoi1 2-on-page-tran-ngoc-chinh-mastercode.vn
 
Pdfbài 7 máy tính xác tay và máy in bảo trì sự cố máy tính-mastercode.vn
Pdfbài 7 máy tính xác tay và máy in   bảo trì sự cố máy tính-mastercode.vnPdfbài 7 máy tính xác tay và máy in   bảo trì sự cố máy tính-mastercode.vn
Pdfbài 7 máy tính xác tay và máy in bảo trì sự cố máy tính-mastercode.vn
 
Pdfbài 6 bảo trì máy tính bảo trì sự cố máy tính-mastercode.vn
Pdfbài 6 bảo trì máy tính   bảo trì sự cố máy tính-mastercode.vnPdfbài 6 bảo trì máy tính   bảo trì sự cố máy tính-mastercode.vn
Pdfbài 6 bảo trì máy tính bảo trì sự cố máy tính-mastercode.vn
 
Pdfbài 5 bảo trì và tối ưu windows bảo trì sự cố máy tính-mastercode.vn
Pdfbài 5 bảo trì và tối ưu windows   bảo trì sự cố máy tính-mastercode.vnPdfbài 5 bảo trì và tối ưu windows   bảo trì sự cố máy tính-mastercode.vn
Pdfbài 5 bảo trì và tối ưu windows bảo trì sự cố máy tính-mastercode.vn
 
Pdfbài 4 ổ cứng hard drive bảo trì sự cố máy tính-mastercode.vn
Pdfbài 4 ổ cứng hard drive   bảo trì sự cố máy tính-mastercode.vnPdfbài 4 ổ cứng hard drive   bảo trì sự cố máy tính-mastercode.vn
Pdfbài 4 ổ cứng hard drive bảo trì sự cố máy tính-mastercode.vn
 
Pdfbài 3 cpu và ram bảo trì sự cố máy tính-mastercode.vn
Pdfbài 3 cpu và ram   bảo trì sự cố máy tính-mastercode.vnPdfbài 3 cpu và ram   bảo trì sự cố máy tính-mastercode.vn
Pdfbài 3 cpu và ram bảo trì sự cố máy tính-mastercode.vn
 
Pdfbài 1 giới thiệu chung về phần cứng bảo trì sự cố máy tính-mastercode.vn
Pdfbài 1 giới thiệu chung về phần cứng   bảo trì sự cố máy tính-mastercode.vnPdfbài 1 giới thiệu chung về phần cứng   bảo trì sự cố máy tính-mastercode.vn
Pdfbài 1 giới thiệu chung về phần cứng bảo trì sự cố máy tính-mastercode.vn
 
Pdfbài 2 bo mạch chủ (main) bảo trì sự cố máy tính-mastercode.vn
Pdfbài 2 bo mạch chủ (main)   bảo trì sự cố máy tính-mastercode.vnPdfbài 2 bo mạch chủ (main)   bảo trì sự cố máy tính-mastercode.vn
Pdfbài 2 bo mạch chủ (main) bảo trì sự cố máy tính-mastercode.vn
 

Bài 5 Hướng dẫn xây dựng Extension

  • 1. Bài 5 Hướng dẫn xây dựng Extension
  • 2. Nhắc lại bài cũ • Chỉnh sửa template thông qua chỉnh sửa hình ảnh, chỉnh sửa CSS • Cấu trúc file và thư mục của một Template Bài 5 - Hướng dẫn xây dựng Extension
  • 3. Mục tiêu bài học • Hiểu rõ cấu trúc của component; module • Hiểu rõ về quy trình, cách thức, giải pháp xây dựng component, module Bài 5 - Hướng dẫn xây dựng Extension
  • 4. Xây dựng Component Xây dựng component theo mô hình MVC - Các component Joomla được xây dựng theo mô hình MVC (Model-View-Controler); User (Khách truy cập web) Bài 5 - Hướng dẫn xây dựng Extension View (tạo giao diện hiển thị) Model (thiết lập các chức năng web) Controler (điều khiển, xử lý tương tác)
  • 5. Xây dựng Component Xây dựng 1 Component đơn giản: Component Hello Bài 5 - Hướng dẫn xây dựng Extension
  • 6. Xây dựng Component Component cơ bản có 5 file: • site/hello.php - file tạo entry point • site/controller.php - Thiết lập điều khiển • site/views/hello/view.html.php - Thiết lập hiển thị • site/views/hello/tmpl/default.php - Tạo giao diện hiển thị • hello.xml - Đóng gói thành bộ cài Bài 5 - Hướng dẫn xây dựng Extension • site/hello.php - file tạo entry point • site/controller.php - Thiết lập điều khiển • site/views/hello/view.html.php - Thiết lập hiển thị • site/views/hello/tmpl/default.php - Tạo giao diện hiển thị • hello.xml - Đóng gói thành bộ cài
  • 7. Xây dựng Component Lập trình file Hello.php - Tạo entry point <?php defined( '_JEXEC' ) or die( 'Restricted access' ); require_once( JPATH_COMPONENT.DS.'controller.php' ); if ($controller = JRequest::getWord('controller')) { $path = JPATH_COMPONENT.DS.'controllers'.DS.$controller.'.php'; if (file_exists($path)) { require_once $path; } else { $controller = ''; } } $classname = 'HelloController'.$controller; $controller = new $classname(); $controller->execute( JRequest::getVar( 'task' ) ); $controller->redirect(); Bài 5 - Hướng dẫn xây dựng Extension <?php defined( '_JEXEC' ) or die( 'Restricted access' ); require_once( JPATH_COMPONENT.DS.'controller.php' ); if ($controller = JRequest::getWord('controller')) { $path = JPATH_COMPONENT.DS.'controllers'.DS.$controller.'.php'; if (file_exists($path)) { require_once $path; } else { $controller = ''; } } $classname = 'HelloController'.$controller; $controller = new $classname(); $controller->execute( JRequest::getVar( 'task' ) ); $controller->redirect();
  • 8. Xây dựng Component Tạo controller với file controller.php <?php defined( '_JEXEC' ) or die( 'Restricted access' ); jimport('joomla.application.component.controller'); class HelloController extends JController { function display() { parent::display(); } } Bài 5 - Hướng dẫn xây dựng Extension <?php defined( '_JEXEC' ) or die( 'Restricted access' ); jimport('joomla.application.component.controller'); class HelloController extends JController { function display() { parent::display(); } }
  • 9. Xây dựng Component Tạo view - lập trình file site/views/hello/view.html.php <?php defined( '_JEXEC' ) or die( 'Restricted access' ); jimport( 'joomla.application.component.view'); class HelloViewHello extends JView { function display($tpl = null) { $greeting = "Hello, World!"; $this->assignRef( 'greeting', $greeting ); parent::display($tpl); } } Bài 5 - Hướng dẫn xây dựng Extension <?php defined( '_JEXEC' ) or die( 'Restricted access' ); jimport( 'joomla.application.component.view'); class HelloViewHello extends JView { function display($tpl = null) { $greeting = "Hello, World!"; $this->assignRef( 'greeting', $greeting ); parent::display($tpl); } }
  • 10. Xây dựng Component Tạo Template tại file site/views/hello/tmpl/default.php <?php defined('_JEXEC') or die('Restricted access'); ?> <h1><?php echo $this->greeting; ?></h1> Bài 5 - Hướng dẫn xây dựng Extension
  • 11. Xây dựng Component Viết file XML (install.xml) <?xml version="1.0" encoding="utf-8"?> <install type="component" version="1.5.0"> <name>Hello</name> <creationDate>2007-02-22</creationDate> <author>John Doe</author> <authorEmail>john.doe@example.org</authorEmail> <authorUrl>http://www.example.org</authorUrl> <copyright>Copyright Info</copyright> <license>License Info</license> <version>1.01</version> <description>Description of the component ...</description> <files folder="site"> <filename>controller.php</filename> <filename>hello.php</filename> <filename>index.html</filename> <filename>views/index.html</filename> <filename>views/hello/index.html</filename> <filename>views/hello/view.html.php</filename> <filename>views/hello/tmpl/default.php</filename> <filename>views/hello/tmpl/index.html</filename> </files> Bài 5 - Hướng dẫn xây dựng Extension <?xml version="1.0" encoding="utf-8"?> <install type="component" version="1.5.0"> <name>Hello</name> <creationDate>2007-02-22</creationDate> <author>John Doe</author> <authorEmail>john.doe@example.org</authorEmail> <authorUrl>http://www.example.org</authorUrl> <copyright>Copyright Info</copyright> <license>License Info</license> <version>1.01</version> <description>Description of the component ...</description> <files folder="site"> <filename>controller.php</filename> <filename>hello.php</filename> <filename>index.html</filename> <filename>views/index.html</filename> <filename>views/hello/index.html</filename> <filename>views/hello/view.html.php</filename> <filename>views/hello/tmpl/default.php</filename> <filename>views/hello/tmpl/index.html</filename> </files>
  • 12. Xây dựng Component <administration> <menu>Hello World!</menu> <files folder="admin"> <filename>hello.php</filename> <filename>index.html</filename> </files> </administration> </install> Bài 5 - Hướng dẫn xây dựng Extension <administration> <menu>Hello World!</menu> <files folder="admin"> <filename>hello.php</filename> <filename>index.html</filename> </files> </administration> </install>
  • 13. Xây dựng Component Tạo file index.html để bảo mật <html><body bgcolor="#FFFFFF"></body></html> Bài 5 - Hướng dẫn xây dựng Extension
  • 14. Xây dựng Component Bổ xung Model tại site/models/hello.php <?php defined( '_JEXEC' ) or die( 'Restricted access' ); jimport( 'joomla.application.component.model' ); class HelloModelHello extends JModel { function getGreeting() { return 'Hello, World!'; } }Bài 5 - Hướng dẫn xây dựng Extension <?php defined( '_JEXEC' ) or die( 'Restricted access' ); jimport( 'joomla.application.component.model' ); class HelloModelHello extends JModel { function getGreeting() { return 'Hello, World!'; } }
  • 15. Xây dựng Component Sử dụng Model: bằng cách thay đổi tại dòng $greeting = "Hello World!"; tại file site/views/hello/view.html.php <?php defined( '_JEXEC' ) or die( 'Restricted access' ); jimport( 'joomla.application.component.view'); class HelloViewHello extends JView { function display($tpl = null) { $model =& $this->getModel(); $greeting = $model->getGreeting(); $this->assignRef( 'greeting', $greeting ); parent::display($tpl); } }Bài 5 - Hướng dẫn xây dựng Extension <?php defined( '_JEXEC' ) or die( 'Restricted access' ); jimport( 'joomla.application.component.view'); class HelloViewHello extends JView { function display($tpl = null) { $model =& $this->getModel(); $greeting = $model->getGreeting(); $this->assignRef( 'greeting', $greeting ); parent::display($tpl); } }
  • 16. Xây dựng Component Bổ sung file vào gói cài đặt bằng dòng lệnh <filename>models/hello.php</filename> <files folder="site"> <filename>controller.php</filename> <filename>hello.php</filename> <filename>index.html</filename> <filename>models/hello.php</filename> <filename>models/index.html</filename> <filename>views/index.html</filename> <filename>views/hello/index.html</filename> <filename>views/hello/view.html.php</filename> <filename>views/hello/tmpl/default.php</filename> <filename>views/hello/tmpl/index.html</filename> </files> Bài 5 - Hướng dẫn xây dựng Extension <files folder="site"> <filename>controller.php</filename> <filename>hello.php</filename> <filename>index.html</filename> <filename>models/hello.php</filename> <filename>models/index.html</filename> <filename>views/index.html</filename> <filename>views/hello/index.html</filename> <filename>views/hello/view.html.php</filename> <filename>views/hello/tmpl/default.php</filename> <filename>views/hello/tmpl/index.html</filename> </files>
  • 17. Xây dựng Module Cấu trúc các file trong 1 module: • mod_helloworld.php • mod_helloworld.xml • helper.php • tmpl/default.php Bài 5 - Hướng dẫn xây dựng Extension • mod_helloworld.php • mod_helloworld.xml • helper.php • tmpl/default.php
  • 18. Xây dựng Module File mod_helloworld.php <?php defined( '_JEXEC' ) or die( 'Restricted access' ); require_once( dirname(__FILE__).DS.'helper.php' ); $hello = modHelloWorldHelper::getHello( $params ); require( JModuleHelper::getLayoutPath( 'mod_helloworld' ) ); ?> Bài 5 - Hướng dẫn xây dựng Extension <?php defined( '_JEXEC' ) or die( 'Restricted access' ); require_once( dirname(__FILE__).DS.'helper.php' ); $hello = modHelloWorldHelper::getHello( $params ); require( JModuleHelper::getLayoutPath( 'mod_helloworld' ) ); ?>
  • 19. Xây dựng Module File helper.php <?php class modHelloWorldHelper { function getHello( $params ) { return 'Hello, World!'; } } ?> Bài 5 - Hướng dẫn xây dựng Extension <?php class modHelloWorldHelper { function getHello( $params ) { return 'Hello, World!'; } } ?>
  • 20. Xây dựng Module File tmpl/defalt.php <?php // no direct access defined( '_JEXEC' ) or die( 'Restricted access' ); ?> <?php echo $hello; ?> Bài 5 - Hướng dẫn xây dựng Extension
  • 21. Xây dựng Module File mod_hello_world.xml <?xml version="1.0" encoding="utf-8"?> <install type="module" version="1.5.0"> <name>Hello, World!</name> <author>John Doe</author> <version>1.5.0</version> <description>A simple Hello, World! module.</description> <files> <filename>mod_helloworld.xml</filename> <filename module="mod_helloworld">mod_helloworld.php</filename> <filename>index.html</filename> <filename>helper.php</filename> <filename>tmpl/default.php</filename> <filename>tmpl/index.html</filename> </files> <params> </params> </install> Bài 5 - Hướng dẫn xây dựng Extension <?xml version="1.0" encoding="utf-8"?> <install type="module" version="1.5.0"> <name>Hello, World!</name> <author>John Doe</author> <version>1.5.0</version> <description>A simple Hello, World! module.</description> <files> <filename>mod_helloworld.xml</filename> <filename module="mod_helloworld">mod_helloworld.php</filename> <filename>index.html</filename> <filename>helper.php</filename> <filename>tmpl/default.php</filename> <filename>tmpl/index.html</filename> </files> <params> </params> </install>
  • 22. Xây dựng Module Tạo file index.html trong các thư mục của module để bảo mật với nội dung: <html><body bgcolor="#FFFFFF"></body></html> Bài 5 - Hướng dẫn xây dựng Extension
  • 23. Tổng kết bài học • Các component trong Joomla được xây dựng theo mô hình MVC và dựa vào Joomla Framework - thư viện mã nguồn sẵn có trong Joomla CMS. • Quy trình xây dựng giống nhau đối với tất cả các component hay module. • Sau khi hoàn thiện lập trình một component hay module, cần đóng gói thành file .zip để có thể cài đặt vào Joomla từ trình cài đặt tháo gỡ tự động của Joomla • Các component trong Joomla được xây dựng theo mô hình MVC và dựa vào Joomla Framework - thư viện mã nguồn sẵn có trong Joomla CMS. • Quy trình xây dựng giống nhau đối với tất cả các component hay module. • Sau khi hoàn thiện lập trình một component hay module, cần đóng gói thành file .zip để có thể cài đặt vào Joomla từ trình cài đặt tháo gỡ tự động của Joomla Bài 5 - Hướng dẫn xây dựng Extension