$dispatcher =& JDispatcher::getInstance();$item->content = $text;JPluginHelper::importPlugin('plgContentshortcodes');$dispatcher->trigger('onContentPrepare', array ($item->text, 0));
$dispatcher = JDispatcher::getInstance();$item->text = your_text_area_item;$item->params = clone($params);JPluginHelper::importPlugin('content');$dispatcher->trigger('onPrepareContent', array (& $item, & $item->params, 0))
--
You received this message because you are subscribed to the Google Groups "Joomla! General Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to joomla-dev-gene...@googlegroups.com.
To post to this group, send an email to joomla-de...@googlegroups.com.
Visit this group at http://groups.google.com/group/joomla-dev-general.
For more options, visit https://groups.google.com/groups/opt_out.
Should probably add i'm working on version 3.1.1
$text = JHtml::_('content.prepare', $text);
Best,
Matt Thomas
Founder betweenbrain™
Lead Developer Construct Template Development Framework
Phone: 203.632.9322
Twitter: @betweenbrain
Github: https://github.com/betweenbrain
Composed and delivered courtesy of Nexus 7.
I think the confusion is that not all components will necessarily trigger the content plugin events.
The suggestion is to change your plugin to be a system type, so that it is always triggered by the CMS regardless of the component.
In my example, I was previously using the onPrepareContent event to alter $article->title, but had to change it to a broader system plugin using onAfterRender so that I could use it outside of com_content and modify the entire page buffer.
In other words, as far as I know, you can't reliably use custom 'content' plugin on all content and components.
--
--