Joomla 插件安装 xml -- 将文件安装到不同的文件夹
是否可以将文件从 Joomla 插件安装到非插件目录?
例如,默认情况下,Joomla 插件安装 xml 如下所示:
<?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 插件文件夹中。
但是,如果我想安装一些图像文件以使我的插件看起来更好,并且想将它们放在 /images 文件夹中,有没有办法提供该路径?
谢谢
Is it possible to install a file from a Joomla plugin to a non-plugin directory?
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>
This will install the myplugin.php file to the /plugins/mycomponent plugins folder.
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?
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
通过这种方式,您可以将
dummyFolder
添加到plugins=>mycomponent=>dummyfolder
In this way you can add
dummyFolder
toplugins=>mycomponent=>dummyfolder
http://docs.joomla.org/Components:xml_installfile
http://docs.joomla.org/Components:xml_installfile