如何制作joomla配置xml

时间:2012-11-07 08:58:21

标签: joomla joomla2.5 joomla-extensions joomla-component

我搜索了互联网,没有找到任何清楚解释的内容。

我想为我的组件和模块创建配置,但不知道从哪里开始或如何开始,如果any1知道很好的教程。

1 个答案:

答案 0 :(得分: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>example@example.org</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>