码迷,mamicode.com
首页 > 其他好文 > 详细

1.6 Hello World

时间:2015-08-29 00:34:21      阅读:187      评论:0      收藏:0      [点我收藏+]

标签:

(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文件,就是一个安装包了,不过这个安装包很简单,如你所见就几个文件,接下来的部分是不断完善的过程,内容有点多,也可以需要的时候阅读官网的教程,我会在后面的章节记录自己用到的部分。


1.6 Hello World

标签:

原文地址:http://www.cnblogs.com/codergma/p/4768078.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!