User Rating: 1 / 5

Star ActiveStar InactiveStar InactiveStar InactiveStar Inactive
 

Start building simple component

 

-create a folder com_helloworld in the Administrator/Components

-create a folder and files by topic.Chapter 6 - Introduction Component Development

-open the helloworld.php file and code this

com_helloworld/helloworld.php

 

<?php
defined('_JEXEC') or die('Restricted access'); 


if(!defined('DS')) {
        define('DS', DIRECTORY_SEPARATOR);
}


$c = JRequest::getVar('c');
if($c == '') {
        $c = 'hello'; 
}


$path = JPATH_COMPONENT_ADMINISTRATOR.DS.'controllers'.DS.$c.'.php';
if (file_exists($path)) {
        require_once $path;
} else {
      
        JError::raiseError('500',JText::_('JTUNKNOW_COMPONENT').' '.$c.' '.$path);
}

$classname = 'HelloworldController'.$c; 
$controller = new $classname(); 
$controller->execute(JFactory::getApplication()->input->get('task'));
$controller->redirect();
?>

 

-Create a file in a folder named hellp.php controllers class name must be specified in the form of posts. Chapter 7 - Structure for building class Component Development.

Then enter the code com_helloworld/controllers/hellp.php

<?php
defined('_JEXEC') or die('Restricted access'); 

class HelloworldControllerHello extends JControllerLegacy 
{
        
     
        function display($cachable = false, $urlparams = array()) 
        {
      
                JRequest::setVar('view','hello');
                parent::display($cachable, $urlparams); 
        }
    
}
?>

 To create a display in the View by to create folders as we set the set the view controller in the controller will create a folder named hello hello and interior will create a file named. view.html.php And create a folder for files tmpl default.php layout to create a basic layout files first. 

com_helloworld /views/hello/view.html.php

<?php
defined('_JEXEC') or die('Restricted access');

class HelloworldViewHello extends JViewLegacy 
{

        function display($tpl = null)
        {
                parent::display($tpl);
        }
    
}
?>

 

com_helloworld/views/hello/tmpl/default.php

<?php 

defined('_JEXEC') or die('Restricted access');

?>

Hello world

 

Summary File

com_helloworld/helloworld.php

com_helloworld/controllers/hello.php

com_helloworld/views/hello/view.html.php

com_helloworld/views/hello/tmpl/default.php

 

 

Chapter 9 - Creating XML Form Component Development

Recent Topics
Subject
Post Reply
Open
Recent
유투브 동영상 및 클립매스 업로드를 위한 MVDO 플러그인 소개
By wipaporn Fri 15 Feb 2019 4:45 pm Board korean Language - 한국어
0
1893
Fri 15 Feb 2019 4:45 pm By wipaporn
Joomla 3.x 홈페이지에서 사진 갤러리를 만들기 위한 MD 갤러리 컴포넌트 소개
By wipaporn Fri 15 Feb 2019 4:36 pm Board korean Language - 한국어
0
1939
Fri 15 Feb 2019 4:36 pm By wipaporn
介绍了editors xtd multicontent,一个将文章从主网站拉入Webclien的插件。
By wipaporn Fri 15 Feb 2019 4:08 pm Board Chinese Language - 简体中文
0
10626
Fri 15 Feb 2019 4:08 pm By wipaporn
介绍MDFiles popular模块将mdfile中的文件显示出来
By wipaporn Fri 15 Feb 2019 4:08 pm Board Chinese Language - 简体中文
0
10719
Fri 15 Feb 2019 4:08 pm By wipaporn
介绍将joomla 1.5升级到joomla 2.5、3.x的 MJupgrade
By wipaporn Fri 15 Feb 2019 4:07 pm Board Chinese Language - 简体中文
0
10731
Fri 15 Feb 2019 4:07 pm By wipaporn
介绍MApplication Form Components工作申请表通过网站。
By wipaporn Fri 15 Feb 2019 4:07 pm Board Chinese Language - 简体中文
0
10871
Fri 15 Feb 2019 4:07 pm By wipaporn
介绍Mod Vinaora访客柜台,用于统计Joomla的网站访问量
By wipaporn Fri 15 Feb 2019 4:07 pm Board Chinese Language - 简体中文
0
19322
Fri 15 Feb 2019 4:07 pm By wipaporn
介绍用于上传youtube视频和clipmass的mvdo插件
By wipaporn Fri 15 Feb 2019 4:07 pm Board Chinese Language - 简体中文
0
10486
Fri 15 Feb 2019 4:07 pm By wipaporn
介绍Mod MDFiles Featured,将文件从MDfiles带到显示
By wipaporn Fri 15 Feb 2019 4:06 pm Board Chinese Language - 简体中文
0
26791
Fri 15 Feb 2019 4:06 pm By wipaporn
介绍用于在Joomla 3.x网站上创建照片库的MD Gallery Components
By wipaporn Fri 15 Feb 2019 4:06 pm Board Chinese Language - 简体中文
0
11039
Fri 15 Feb 2019 4:06 pm By wipaporn
Features Review : Plugin Editors XTD Multicontent membantu dlm mengeluarkan artikel dari Master Site ke Web Clien
By abdkode Fri 15 Feb 2019 2:40 pm Board Bahasa Language
0
4339
Fri 15 Feb 2019 2:40 pm By abdkode
Webmaster에서 Webclient로 데이터 배포를 위한 M MultiSite Content Components 소개
By wipaporn Fri 15 Feb 2019 2:22 pm Board korean Language - 한국어
0
7084
Fri 15 Feb 2019 2:22 pm By wipaporn
마스터 사이트의 도메인 이름 기록을 위한 M MultiSite Content client 소개
By wipaporn Fri 15 Feb 2019 2:20 pm Board korean Language - 한국어
0
10143
Fri 15 Feb 2019 2:20 pm By wipaporn
Mod MD recent 모듈을 소개 한다. phpb 보드는 ๋Joomla에서 보여준다.
By wipaporn Fri 15 Feb 2019 2:18 pm Board korean Language - 한국어
0
2011
Fri 15 Feb 2019 2:18 pm By wipaporn
MDEmbed를 소개한다. 플러그 인에는 링크를 만들고, 비디오, 기사를 업로드하기 위한 버튼이 있으며, 웹 사이트인 Joomla 2.5, 3.x
By wipaporn Fri 15 Feb 2019 2:14 pm Board korean Language - 한국어
0
2000
Fri 15 Feb 2019 2:14 pm By wipaporn
介绍 M MultiSite Content Components,用于将数据从网站管理员分发到Web客户端
By wipaporn Fri 15 Feb 2019 2:01 pm Board Chinese Language - 简体中文
0
14303
Fri 15 Feb 2019 2:01 pm By wipaporn
介绍M MultiSite Content client Components 记录主站点域名
By wipaporn Fri 15 Feb 2019 1:59 pm Board Chinese Language - 简体中文
0
18148
Fri 15 Feb 2019 1:59 pm By wipaporn
介绍mod md recent模块。PHPBB板显示在Joomla上。
By wipaporn Fri 15 Feb 2019 1:54 pm Board Chinese Language - 简体中文
0
19560
Fri 15 Feb 2019 1:54 pm By wipaporn
介绍MDEMBED。该插件有创建链接、上传视频、文章、网站joomla 2.5、3.x的按钮。
By wipaporn Fri 15 Feb 2019 1:52 pm Board Chinese Language - 简体中文
0
10629
Fri 15 Feb 2019 1:52 pm By wipaporn
Introducing MApplication Form Components. Job application forms via the website.
By wipaporn Fri 15 Feb 2019 11:14 am Board English Language
1
3670
Tue 15 Oct 2019 1:20 pm By mindphp