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
3 Investment Worthly in Thaland
By wannapat Tue 19 Mar 2019 4:38 pm Board Chinese Language - 简体中文
0
15657
Tue 19 Mar 2019 4:38 pm By wannapat
Features Review : Plugin Addons Payment Omise untuk membuat pembayaran melalui Omise
By abdkode Mon 11 Mar 2019 6:58 pm Board Bahasa Language
0
2231
Mon 11 Mar 2019 6:58 pm By abdkode
Features Review : Memperkenalkan Mooziicart untuk Joomla
By abdkode Thu 07 Mar 2019 7:06 pm Board Bahasa Language
0
2624
Thu 07 Mar 2019 7:06 pm By abdkode
Features Review : Plugin M Product Match untuk menghungkan produk dengan artikel
By abdkode Thu 07 Mar 2019 6:19 pm Board Bahasa Language
0
2710
Thu 07 Mar 2019 6:19 pm By abdkode
Features Review : Module MD Client History modul memapar sajarah yang telah masuk
By abdkode Tue 05 Mar 2019 7:15 pm Board Bahasa Language
0
1914
Tue 05 Mar 2019 7:15 pm By abdkode
Features Review : Plugin M Animate Number untuk memaparkan nombor yang bergerak
By abdkode Mon 04 Mar 2019 7:02 pm Board Bahasa Language
0
2146
Mon 04 Mar 2019 7:02 pm By abdkode
Features Review : Plugin PayToRead untuk mempaparkan teks hanya sebahagian
By abdkode Mon 04 Mar 2019 7:01 pm Board Bahasa Language
0
2340
Mon 04 Mar 2019 7:01 pm By abdkode
Features Review : Component MFacebook untuk membantu pendaftaran laman web dgn Facebook
By abdkode Mon 04 Mar 2019 6:57 pm Board Bahasa Language
0
2861
Mon 04 Mar 2019 6:57 pm By abdkode
Features Review : MJClone untuk mengklon laman web joomla dan backup
By abdkode Thu 28 Feb 2019 6:59 pm Board Bahasa Language
0
3124
Thu 28 Feb 2019 6:59 pm By abdkode
Features Review : Module Mrelated Article Specific Category untuk menyimpan sejarah lawatan
By abdkode Thu 28 Feb 2019 6:48 pm Board Bahasa Language
0
1846
Thu 28 Feb 2019 6:48 pm By abdkode
Features Review : Plugin MLinkarticle untuk menghubungkan konten artikel kepada artikel yang berkaitan
By abdkode Tue 26 Feb 2019 6:37 pm Board Bahasa Language
0
2565
Tue 26 Feb 2019 6:37 pm By abdkode
Features Review : Plugin Authentication untuk login Joomla dengan phpBB
By abdkode Tue 26 Feb 2019 6:29 pm Board Bahasa Language
0
3384
Tue 26 Feb 2019 6:29 pm By abdkode
Features Review : untuk menghasilkan link memuat naik video pada artikel, Joomla 2.5, 3.x
By abdkode Tue 26 Feb 2019 5:26 pm Board Bahasa Language
0
2078
Tue 26 Feb 2019 5:26 pm By abdkode
Features Review : Plugin MVDO untuk memuat naik video Youtube dan Clipmass
By abdkode Mon 25 Feb 2019 5:54 pm Board Bahasa Language
0
2356
Mon 25 Feb 2019 5:54 pm By abdkode
Features Review : Content Msocial untuk berkongsi kandungan artikel ke Facebook, Twitter, Google Plus dan Line
By abdkode Mon 25 Feb 2019 4:56 pm Board Bahasa Language
0
1975
Mon 25 Feb 2019 4:56 pm By abdkode
Features Review : Module Mod slideshowck untuk membantu memaparkan imej dan video Youtube secara slaid
By abdkode Mon 25 Feb 2019 2:19 pm Board Bahasa Language
0
2041
Mon 25 Feb 2019 2:19 pm By abdkode
Features Review : Mod MD recent untuk menunjukkan Papan phpbb pada Joomla.
By abdkode Fri 22 Feb 2019 6:59 pm Board Bahasa Language
0
2646
Fri 22 Feb 2019 6:59 pm By abdkode
Features Review : Mod vinaora visitors counter untuk menghitungkan pelewat laman web di joomla
By abdkode Fri 22 Feb 2019 4:17 pm Board Bahasa Language
0
2582
Fri 22 Feb 2019 4:17 pm By abdkode
Features Review : Components MApplication Form untuk permohonan pekerjaan melalui laman web.
By abdkode Fri 22 Feb 2019 3:25 pm Board Bahasa Language
0
2819
Fri 22 Feb 2019 3:25 pm By abdkode
Features Review : Components MComponentgen & M Packet untuk membantu dengan Menjana Komponen, Modul, Plugin
By abdkode Fri 22 Feb 2019 2:26 pm Board Bahasa Language
0
2731
Fri 22 Feb 2019 2:26 pm By abdkode