本文介绍了Joomla 插件安装 xml -- 将文件安装到不同的文件夹的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
是否可以将 Joomla 插件中的文件安装到非插件目录?
Is it possible to install a file from a Joomla plugin to a non-plugin directory?
例如——默认情况下,Joomla 插件安装 xml 如下所示:
For example-- by default a Joomla plugin install xml looks like this:
<?xml version="1.0" encoding="utf-8"?>
<install version="1.5" type="plugin" group="mycomponent" method="upgrade">
<name>MyPlugin</name>
<author>Me Myself</author>
<creationDate>January 29, 2011</creationDate>
<copyright>Copyright (C) 2011 ME</copyright>
<license>http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL</license>
<authorEmail>[email protected]</authorEmail>
<authorUrl>www.mysite.com</authorUrl>
<version>1.5</version>
<description>My cool plugin.</description>
<files>
<filename plugin="myplugin">myplugin.php</filename>
</files>
<params />
</install>
这会将 myplugin.php 文件安装到/plugins/mycomponent plugins 文件夹中.
This will install the myplugin.php file to the /plugins/mycomponent plugins folder.
但是,如果我想安装一些图像文件以使我的插件看起来更好,并且想将它们放在/images 文件夹中,有没有办法提供该路径?
However, if I want to install some image files to make my plugin look nicer, and want to drop those in the /images folder, is there a way to supply that path?
谢谢
推荐答案
<!-- Site Main Media File Copy Section -->
<media destination="com_helloworld">
<filename>image.png</filename>
<filename>flash.swf</filename>
</media>
http://docs.joomla.org/Components:xml_installfile
这篇关于Joomla 插件安装 xml -- 将文件安装到不同的文件夹的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!