2012-11-07 48 views
0

我搜索了互聯網,沒有找到任何解釋清楚。如何使Joomla配置xml

我要創建配置,以我的組件和模塊,但不知道從哪裏開始或如何開始,如果ANY1知道好的教程將是巨大的。

回答

0

這就是你所需要的Joomla 2.5的要求。有些字段是可選的,例如SQL和安裝/卸載字段。

<?xml version="1.0" encoding="utf-8"?> 
    <extension type="component" version="2.5.0" methos="update"> 
     <name>Hello World</name> 
     <creationDate>2007-01-17</creationDate> 
     <author>John Doe</author> 
     <authorEmail>[email protected]</authorEmail> 
     <authorUrl>http://www.example.org</authorUrl> 
     <copyright>Copyright Info</copyright> 
     <license>License Info with link</license> 
     <version>1.0.1</version> 
     <downloadUrl>http://www.example.org/downloads/myjoomlaextensions/</downloadUrl> 

     <installfile>install.helloworld.php</installfile> 

     <uninstallfile>uninstall.helloworld.php</uninstallfile> 

     <install> 
      <sql> 
       <file driver="mysql" charset="utf8">install.mysql.utf8.sql</file> 
       <file driver="mysql">install.mysql.nonutf8.sql</file> 
      </sql> 
     </install> 

     <uninstall> 
      <sql> 
       <file driver="mysql" charset="utf8">uninstall.mysql.utf8.sql</file> 
       <file driver="mysql">uninstall.mysql.nonutf8.sql</file> 
      </sql> 
     </uninstall> 

     <files> 
      <filename>index.html</filename> 
      <filename>helloworld.php</filename> 
      <folder>views</folder> 
    </files> 

    <languages> 
      <language tag="en-GB">en-GB.com_test.ini</language> 
      <language tag="en-GB">en-GB.com_test.sys.ini</language> 
    </languages> 

    <administration> 

      <menu img="components/com_helloworld/images/helloworld_icon.png">Hello World</menu> 
      <submenu> 
        <menu link="option=com_helloworld&amp;controller=config">Configuration</menu> 
        <menu img="icon" task="hello" controller="z" view="a" layout="b" sub="c">Hello Again!</menu> 
        <menu view="test" layout="foo">Testing Foo Layout</menu> 
      </submenu> 

      <files folder="admin"> 
        <filename>index.html</filename> 
        <filename>admin.helloworld.php</filename> 
      </files> 

      <languages folder="admin"> 
        <language tag="en-GB">en-GB.com_helloworld.ini</language> 
        <language tag="en-GB">en-GB.com_helloworld.sys.ini</language> 
      </languages> 

    </administration>  
</extension>