zoukankan      html  css  js  c++  java
  • 1.6 Hello World

    (1)Public display

    在components/com_helloworld/ 创建文件 helloworld.php  包含内容 Hello world

    测试 index.php?option=com_helloworld

    (2)Administrator management

    在administrator/components/com_helloword.php  包含内容  Hello world administratioin

    测试 administrator/index.php?option=com_helloworld

    (3)打包一个安装文件

    helloworld.xml

    <?xmlversion="1.0"encoding="utf-8"?>
    <extensiontype="component"version="2.5.0"method="upgrade">
    <name>Hello World!</name>
    <!-- The following elements are optional and free of formatting constraints -->
    <creationDate>November 2009</creationDate>
    <author>JohnDoe</author>
    <authorEmail>john.doe@example.org</authorEmail>
    <authorUrl>http://www.example.org</authorUrl>
    <copyright>Copyright Info</copyright>
    <license>License Info</license>
    <!--  The version string is recorded in the components table -->
    <version>0.0.1</version>
    <!-- The description is optional and defaults to the name -->
    <description>Description of the Hello World component ...</description>
    <update>
    <!-- Runs on update; New in 2.5 -->
    <schemas><schemapathtype="mysql">sql/updates/mysql</schemapath></schemas>
    </update>
    <!-- Site Main File Copy Section --><!-- Note the folder attribute: This attribute describes the folder        to copy FROM in the package to install therefore files copied in this section are copied from /site/ in the package --><filesfolder="site">
    <filename>index.html</filename><filename>helloworld.php</filename></files>
    <administration><!-- Administration Menu Section --><menu>Hello World!</menu>
    <!-- Administration Main File Copy Section -->
    <!-- Note the folder attribute: This attribute describes the folder  to copy FROM in the package to install therefore files copied in this section are copied from /admin/ in the package -->
    <filesfolder="admin"><!-- Admin Main File Copy Section -->
    <filename>index.html</filename><filename>helloworld.php</filename>
    <!-- SQL files section --><folder>sql</folder></files></administration>
    </extension>

     
    site/helloworld.php
    Hello World
    admin/helloworld.php
    Hello World administration
    index.html common to all folders
    <html><bodybgcolor="#FFFFFF"></body></html>
     
    生成安装包后即可在后台安装,如果安装失败,很有可能是文件权限问题。
    压缩成zip文件,就是一个安装包了,不过这个安装包很简单,如你所见就几个文件,接下来的部分是不断完善的过程,内容有点多,也可以需要的时候阅读官网的教程,我会在后面的章节记录自己用到的部分。


  • 相关阅读:
    Java基础知识总结(绝对经典)
    mybatis注解详解
    div行内样式style常用属性
    php中json_decode()和json_encode()的使用方法
    java调用javascript :js引擎rhino
    DeleteDC() 与 ReleaseDC() 的区别 [转]
    non-manifold Mesh(非流形网格)
    C++静态成员函数小结 [转]
    C++ 类的静态成员详细讲解[转]
    CString 转 char*; wstring 转 string
  • 原文地址:https://www.cnblogs.com/codergma/p/4768078.html
Copyright © 2011-2022 走看看