User Rating: 2 / 5

Star ActiveStar ActiveStar InactiveStar InactiveStar Inactive
 
Creating the Component Config

 

Let's start creating buttons for clicking into the config page by page to build a list of data. In the examples use the Component Name com_helloworld.

Open the folder into the folder views hellos edit the file view.html.php. 

com_helloworld/views/hellos/view.html.php

function addToolbar() 
{
    JToolbarHelper::title(JText::_('COM_HELLOWORLD_HELLO_HELLO_LIST'));
    JToolbarHelper::addNew('add');
    JToolbarHelper::editList('edit');
    JToolbarHelper::deleteList('Are you sure?', 'delete');
    JToolbarHelper::preferences('com_helloworld'); // สร้างปุ่มสำหรับเข้าสู่หน้า config

    JHtmlSidebar::setAction('index.php?option=com_content&view=articles');

    JHtmlSidebar::addFilter(
            JText::_('JOPTION_SELECT_PUBLISHED'),
            'filter_published',
            JHtml::_('select.options', JHtml::_('jgrid.publishedOptions'), 'value', 'text', $this->state->get('filter.published'), true)
    );

 

Next, create a config.xml file in the folder com_helloworld. It uses a similar structure to create XML Form. 

com_helloworld/config.xml

<?xml version="1.0" encoding="utf-8"?>
<config>
   <fieldset
      name="setting"
      label="Setting">

      <field
         name="date_format" 
                        type="text"
         label="Date Format"
      />
   </fieldset>
        <fieldset
      name="permissions"
      label="JCONFIG_PERMISSIONS_LABEL"
      description="JCONFIG_PERMISSIONS_DESC"
      >

      <field
         name="rules"
         type="rules"
         label="JCONFIG_PERMISSIONS_LABEL"
         class="inputbox"
         validate="rules"
         filter="rules"
         component="com_content"
         section="component" />
   </fieldset>
</config>

 

 

For the values ​​defined in the config used.

 

$config = JComponentHelper::getParams('com_helloworld');
echo $config->get('date_format')

 

Chapter 18 - (Access Control List) Component Development

Recent Topics
Subject
Post Reply
Open
Recent
使用 Component M Multisite Master 说明手册
By wipaporn Wed 20 Feb 2019 4:30 pm Board Chinese Language - 简体中文
0
19943
Wed 20 Feb 2019 4:30 pm By wipaporn
使用 Component M Multisite Client 说明手册
By wipaporn Wed 20 Feb 2019 4:06 pm Board Chinese Language - 简体中文
0
20789
Wed 20 Feb 2019 4:06 pm By wipaporn
Features Review : M MultiSite Content client Komponen untuk merekodkan Nama Domain Master Site
By abdkode Wed 20 Feb 2019 3:51 pm Board Bahasa Language
0
8054
Wed 20 Feb 2019 3:51 pm By abdkode
使用Module MDFiles Popular 说明手册
By wipaporn Wed 20 Feb 2019 3:35 pm Board Chinese Language - 简体中文
0
24332
Wed 20 Feb 2019 3:35 pm By wipaporn
Features Review : MDFiles Documents membantu menghubungkan artikel ke Component MDFiles
By abdkode Wed 20 Feb 2019 3:33 pm Board Bahasa Language
0
4683
Wed 20 Feb 2019 3:33 pm By abdkode
使用 Module MDFiles Featured 说明手册
By wipaporn Wed 20 Feb 2019 3:04 pm Board Chinese Language - 简体中文
0
25109
Wed 20 Feb 2019 3:04 pm By wipaporn
使用Module MDFiles Categories 说明手册
By wipaporn Wed 20 Feb 2019 2:31 pm Board Chinese Language - 简体中文
0
21872
Wed 20 Feb 2019 2:31 pm By wipaporn
使用 Module MDfiles recent 说明手册
By wipaporn Wed 20 Feb 2019 2:29 pm Board Chinese Language - 简体中文
0
24077
Wed 20 Feb 2019 2:29 pm By wipaporn
使用Component MDFiles说明手册
By wipaporn Wed 20 Feb 2019 12:10 pm Board Chinese Language - 简体中文
0
10775
Wed 20 Feb 2019 12:10 pm By wipaporn
使用 Component MJForm 说明手册
By wipaporn Wed 20 Feb 2019 12:03 pm Board Chinese Language - 简体中文
0
23171
Wed 20 Feb 2019 12:03 pm By wipaporn
Features Review : Plugin Editors XTD Multicontent untuk mengeluarkan artikel dari Master Site ke Web Clien
By abdkode Tue 19 Feb 2019 6:52 pm Board Bahasa Language
0
6496
Tue 19 Feb 2019 6:52 pm By abdkode
Features Review : Mod MDFiles Popular modul menyenaraikan fail popular
By abdkode Tue 19 Feb 2019 5:41 pm Board Bahasa Language
0
5457
Tue 19 Feb 2019 5:41 pm By abdkode
Features Review : Mod MDFiles Featured memaparkan fail-fail yang dipilih dari MDFile untuk dipaparkan pada Joomla
By abdkode Tue 19 Feb 2019 4:39 pm Board Bahasa Language
0
2754
Tue 19 Feb 2019 4:39 pm By abdkode
Features Review : Components Mjform komponen untuk membuat borang laman web
By abdkode Tue 19 Feb 2019 3:23 pm Board Bahasa Language
0
2628
Tue 19 Feb 2019 3:23 pm By abdkode
Mod MDFiles Popular 모듈 소개 MDFile에서 파일을 가져와 표시
By wipaporn Fri 15 Feb 2019 6:06 pm Board korean Language - 한국어
0
6412
Fri 15 Feb 2019 6:06 pm By wipaporn
MDFiles Featured modules를 소개하면 MDFile에서 파일을 가져와 보여준다.
By wipaporn Fri 15 Feb 2019 6:06 pm Board korean Language - 한국어
0
6059
Fri 15 Feb 2019 6:06 pm By wipaporn
마스터 사이트에서 Web Client로 문서를 끌어오기 위한 플러그인인 Editors XTD Multicontent를 소개한다.
By wipaporn Fri 15 Feb 2019 5:48 pm Board korean Language - 한국어
0
1981
Fri 15 Feb 2019 5:48 pm By wipaporn
Joomla 1.5를 Joomla 2.5, 3.X로 업그레이드하기 위한 MJUpgrade 소개
By wipaporn Fri 15 Feb 2019 5:36 pm Board korean Language - 한국어
0
2354
Fri 15 Feb 2019 5:36 pm By wipaporn
MApplication Form Components를 소개한다. 구직 신청서는 웹사이트를 통해 작성된다.
By wipaporn Fri 15 Feb 2019 5:27 pm Board korean Language - 한국어
0
2173
Fri 15 Feb 2019 5:27 pm By wipaporn
Joomla 웹사이트 방문수를 집계하기 위한 "Mod vinaora visitors counter" 소개
By wipaporn Fri 15 Feb 2019 5:09 pm Board korean Language - 한국어
0
2091
Fri 15 Feb 2019 5:09 pm By wipaporn