XML安装文件
以下是安装文件的代码清单:
<?xml version="1.0" encoding="utf-8"?>
<install version="1.5" type="plugin" group="authentication">
<name>Authentication - Myauth</name>
<author>Joomla! Documentation Project</author>
<creationDate>May 30, 2007</creationDate>
<copyright>(C) 2005 - 2007 Open Source Matters. All rights reserved.</copyright>
<license>http://www.gnu.org/copyleft/gpl.html GNU/GPL</license>
<authorEmail>
为防备电子邮件地址收集器,这个 E-mail 地址被隐藏,你的浏览器必须支持 Javascript 才可看到这个邮件地址
</authorEmail>
<authorUrl>www.joomla.org</authorUrl>
<version>1.5</version>
<description>An sample authentication plugin</description>
<files>
<filename plugin="myauth">myauth.php</filename>
</files>
<params/>
</install>
这个文件与其他的Joomla xml安装文件非常相似,但是有几点需要注意。
首先根元素的group属性是authentication,其次version属性必须是1.5. name元素的值是Authentication - Myauth,这个名在插件管理器中显示,你可以改变这个名字。最后要注意filename元素有一个属性plugin,属性的值是plugin的名称,本例中是myauth。
到目前为止,我们已经创建了认证插件,安装试用吧。