我为Joomla 1.5创建了自定义组件和一个路由插件,以为我的组件以及与菜单无关的文章和类别提供SEO URL.现在,我必须分别安装组件和路由插件.有没有办法将两个软件包都安装在一个软件包中?
I have created custom component and a route plugin for Joomla 1.5 to to provide SEO URLs for my component and also articles and categories which are not menu tied. Now I have to install my component and route plugin separately. Is there a way to install both in one package please?
先谢谢您! Vojtech
Thank you in advance! Vojtech
推荐答案在安装了任何扩展程序后,Joomla都会触发安装文件中的事件"com_yourcomponent_install()",该事件已在xml文件中提到.
When any extension installed Joomla triggers an event 'com_yourcomponent_install()' to your install file, which you have mentioned in xml file.
编写一个函数com_yourcomponent_install,在其中获取插件文件夹的路径并安装
write a function com_yourcomponent_install in which get the path of plugin folder and install it
$installer = new JInstaller(); // Install the packages $installer->install($pluginPath);例如
此函数将包含代码为
this function will contain the code as
$ installer = new JInstaller(); //安装软件包 $ installer-> install($ pluginPath);
$installer = new JInstaller(); // Install the packages $installer->install($pluginPath);
更多推荐
如何在一个软件包中安装组件和路由插件?
发布评论