joomla组件中调用插件
我如何在任何 joomla 组件中调用 joomla '简单图片幻灯片'插件。有什么解决办法吗?
谢谢
How can i call joomla 'Simple Picture Slideshow' plugin in any joomla component. Have any solution?
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
在 Joomla 中调用内容插件的最佳方式! 1.5及以上版本只需使用:
http://docs.joomla.org/Triggering_content_plugins_in_your_extension
Best way to call content plugins in Joomla! 1.5 and above is just use:
http://docs.joomla.org/Triggering_content_plugins_in_your_extension
您可以调用该插件中定义的插件的任何事件。
You can call any event of plugin which is defined in that plugin.
在 Joomla 中,插件不是典型意义上的调用,它们是由各种事件触发的。该插件侦听触发它的特定事件。在这种情况下,您需要查看简单图片幻灯片监听的内容,然后将该触发器添加到您的组件中。保证插件始终被触发的唯一方法是让它监听全局系统事件之一,无论组件中的代码如何,这些事件都会发生,它们发生在框架级别。如果插件是由非全局事件触发的,那么您需要更改插件或将事件添加到您想要使用该插件的每个组件。
全局系统事件参考 - http://docs.joomla.org/Reference:System_Events_for_Plugin_System
插件参考 - http://docs.joomla.org/Plugin
In Joomla, plugins are not called in the typical sense, they are triggered by various events. The plugin listens for the particular event that triggers it. In this case, you would need to look and see what even Simple Picture Slideshow listens for, then add that trigger to your component. The only way to guarantee that a plugin will be triggered all the time is have it listen for one of the global system events, these happen regardless of the code in the component, they happen at the framework level. If a plugin is triggered by a non-global event, then you would need to either change the plugin or add the event to every component you want using the plugin.
Global system event reference - http://docs.joomla.org/Reference:System_Events_for_Plugin_System
Plugin reference - http://docs.joomla.org/Plugin
这个问题专门针对joomla的
Content
插件。您可以触发组件中的任何插件事件。
下面是触发
content
插件onPrepareContent
事件的示例。或者,如果您只想触发组件的特定插件,那么您可以使用,
第二个参数是您要使用的插件的名称。
同样,您可以在组件中调用用户插件事件。
This question is specifically for
Content
plugin of joomla.You can trigger any plugin event in your component.
Here is an example to trigger
content
pluginonPrepareContent
event.Or if you want to trigger only specific plugin for your component, then you can use,
Second argument is name of the plugin which you want to use.
Similarly, you can call user plugin event in your component.