我试图用Joomla 3.0中的插件创建新组件安装Joomla 3.0时插件安装时组件安装
我成功安装了组件。我的要求是安装插件与组件,但在安装中的一些问题。
为此,我创建插件xml。
和主manifest.xml文件我写这段代码。
<plugins>
<plugin plugin="switcher" group="system">
<files folder="plg_system_switcher">
<file>switcher.php</file>
<file>switcher.xml</file>
</files>
</plugin>
</plugins>
和我创建脚本文件afterinstall后,我写这段代码。
jimport('joomla.utilities.xmlelement');
jimport('joomla.utilities.simplexml');
$plugins = $this->manifest->plugins;
我想要$ this-> manifest的插件信息,但不会显示像插件一样的任何对象。
请帮忙,
在此先感谢。
Mayur。
在Joomla 3.0中,Jxmlelement已弃用。要使用它,你需要使用'jimport('legacy.utilities.xmlelement');'否则使用PHP SimpleXML Element类 –