Joomla 如何在一个包中安装组件和路由插件?
我已经为Joomla 1.5创建了自定义组件和路由插件,为我的组件以及没有菜单绑定的文章和类别提供SEO URL。现在我必须分别安装我的组件和路由插件。有没有一种方法可以同时安装在一个软件包中Joomla 如何在一个包中安装组件和路由插件?,joomla,joomla1.5,joomla-extensions,joomla-component,Joomla,Joomla1.5,Joomla Extensions,Joomla Component,我已经为Joomla 1.5创建了自定义组件和路由插件,为我的组件以及没有菜单绑定的文章和类别提供SEO URL。现在我必须分别安装我的组件和路由插件。有没有一种方法可以同时安装在一个软件包中 提前谢谢你!Vojtech当Joomla安装的任何扩展插件触发事件“com_yourcomponent_install()”到您的安装文件时,您在xml文件中提到了该事件 编写一个函数com_yourcomponent_install,在其中获取插件文件夹的路径并安装它 $installer = new
提前谢谢你!Vojtech当Joomla安装的任何扩展插件触发事件“com_yourcomponent_install()”到您的安装文件时,您在xml文件中提到了该事件 编写一个函数com_yourcomponent_install,在其中获取插件文件夹的路径并安装它
$installer = new JInstaller();
// Install the packages
$installer->install($pluginPath);
比如说
有一种更简单的方法 什么是套餐? 包是一个扩展,用于一次性安装多个扩展 如何创建包? 包扩展是通过将扩展的所有zip文件与xml清单文件压缩在一起创建的。例如,如果您有一个由以下内容组成的包:
- 组件helloworld
- 模块helloworld
- 图书馆helloworld
- 系统插件helloworld
- 模板helloworld
-- pkg_helloworld.xml
-- packages <dir>
|-- com_helloworld.zip
|-- mod_helloworld.zip
|-- lib_helloworld.zip
|-- plg_sys_helloworld.zip
|-- tpl_helloworld.zip
——pkg_helloworld.xml
--包裹
|--com_helloworld.zip
|--mod_helloworld.zip
|--lib_helloworld.zip
|--plg_sys_helloworld.zip
|--tpl_helloworld.zip
pkg_helloworld.xml可以包含以下内容:
<?xml version="1.0" encoding="UTF-8" ?>
<extension type="package" version="1.6">
<name>Hello World Package</name>
<author>Hello World Package Team</author>
<creationDate>May 2012</creationDate>
<packagename>helloworld</packagename>
<version>1.0.0</version>
<url>http://www.yoururl.com/</url>
<packager>Hello World Package Team</packager>
<packagerurl>http://www.yoururl.com/</packagerurl>
<description>Example package to combine multiple extensions</description>
<update>http://www.updateurl.com/update</update>
<files folder="packages">
<file type="component" id="helloworld" >com_helloworld.zip</file>
<file type="module" id="helloworld" client="site">mod_helloworld.zip</file>
<file type="library" id="helloworld">lib_helloworld.zip</file>
<file type="plugin" id="helloworld" group="system">plg_sys_helloworld.zip</file>
<file type="template" id="helloworld" client="site">tpl_helloworld.zip</file>
</files>
</extension>
你好世界套餐
你好,世界包装团队
2012年5月
地狱世界
1.0.0
http://www.yoururl.com/
你好,世界包装团队
http://www.yoururl.com/
组合多个扩展的示例包
http://www.updateurl.com/update
com_helloworld.zip
mod_helloworld.zip
lib_helloworld.zip
plg_sys_helloworld.zip
tpl_helloworld.zip
软件包从1.6版开始提供,而问题是用Joomla 1.5标记的,因此未来的读者应该注意,如果使用Joomla 1.5,他们可能无法使用单个软件包一次性安装多个组件、插件、模块等。