- Posts: 7
COMMUNITY FORUM
Use Joomla Plugins in extra fields?
- Ed Saleh
- Topic Author
- Offline
- New Member
Less
More
12 years 11 months ago #95646
by Ed Saleh
Replied by Ed Saleh on topic Use Joomla Plugins in extra fields?
How did you use "Art Plugin"? There's no instructions at all
To rephrase the above question, how can we make the "Text Area" extra field to be used as a regular editor that executes plugins. The "Text Area" currently works as an editor but it does NOT execute plugins.
JoomlaJet said:
actually, this one (the first one I pointed out):
extensions.joomla.org/extensions/core-enhancements/embed-a-i...
does work the way you are asking. I just did a quick test to make sure, and it does cause the plugins to be parsed correctly.
The only "catch" is that some users say that it doesn't work when they turn on caching and truthfully, I didn't test that out for myself.
I have used this 2 ways and both worked:
1. add plugin code to the k2 field
2. add plugin code the the k2 custom template
To rephrase the above question, how can we make the "Text Area" extra field to be used as a regular editor that executes plugins. The "Text Area" currently works as an editor but it does NOT execute plugins.
JoomlaJet said:
actually, this one (the first one I pointed out):
extensions.joomla.org/extensions/core-enhancements/embed-a-i...
does work the way you are asking. I just did a quick test to make sure, and it does cause the plugins to be parsed correctly.
The only "catch" is that some users say that it doesn't work when they turn on caching and truthfully, I didn't test that out for myself.
I have used this 2 ways and both worked:
1. add plugin code to the k2 field
2. add plugin code the the k2 custom template
Please Log in or Create an account to join the conversation.
- BBC
- Offline
- Platinum Member
Less
More
- Posts: 663
12 years 11 months ago #95647
by BBC
Replied by BBC on topic Use Joomla Plugins in extra fields?
This plugin has 6 topics in support forum.
I don´t want to sound disrespectful against developer, but it is not so good to give such power in your website to such plugin.
I don´t want to sound disrespectful against developer, but it is not so good to give such power in your website to such plugin.
Please Log in or Create an account to join the conversation.
- BBC
- Offline
- Platinum Member
Less
More
- Posts: 663
12 years 11 months ago #95648
by BBC
Replied by BBC on topic Use Joomla Plugins in extra fields?
It´s the only code in that plugin (module):
<?phpfunction modArtPlugins() { global $option; $content = JResponse::toString(); $dispatcher =& JDispatcher::getInstance(); JPluginHelper::importPlugin('content', null, false); $params = new JParameter(''); $row = new stdClass(); $row->title = ''; $row->text = $content; $dispatcher->trigger('onPrepareContent', array(&$row, &$params, 0), true); $content = $row->text; JResponse::setBody($content);}$mainframe->registerEvent('onAfterRender', 'modArtPlugins');?>
<?phpfunction modArtPlugins() { global $option; $content = JResponse::toString(); $dispatcher =& JDispatcher::getInstance(); JPluginHelper::importPlugin('content', null, false); $params = new JParameter(''); $row = new stdClass(); $row->title = ''; $row->text = $content; $dispatcher->trigger('onPrepareContent', array(&$row, &$params, 0), true); $content = $row->text; JResponse::setBody($content);}$mainframe->registerEvent('onAfterRender', 'modArtPlugins');?>
Please Log in or Create an account to join the conversation.
- JoomlaJet
- Offline
- New Member
Less
More
- Posts: 5
12 years 11 months ago #95649
by JoomlaJet
Replied by JoomlaJet on topic Use Joomla Plugins in extra fields?
The extension "Art Plugin" is actually a module, not a plugin. You use it by installing it and then going to extensions -> modules and turning the module on in any position on the page you need it to work on. (So you could assign it to just k2 using nonumber's Advanced module manager or using MetaMod).
how can we make the "Text Area" extra field to be used as a regular editor that executes plugins. The "Text Area" currently works as an editor but it does NOT execute plugins.
The text editor you use doesn't matter, the plugins are only parsed in Joomla's core content pages, which is why they don't work in K2.
***just in case: I am in NO way associated with this extension, & I do not provide support for it.***
it is not so good to give such power in your website to such plugin
As for the code above and the overall safety of the approach used by Art Plugin, I honestly can't say that it's safe or not, I am only saying that it does indeed parse the plugin code, whether or not it's a good idea to use this extension is another matter.
...And I would love to know if others think it is safe or not, since I have used it on a few sites I have built....
So BBC, the code you posted there - are there any inherent security issues?
how can we make the "Text Area" extra field to be used as a regular editor that executes plugins. The "Text Area" currently works as an editor but it does NOT execute plugins.
The text editor you use doesn't matter, the plugins are only parsed in Joomla's core content pages, which is why they don't work in K2.
***just in case: I am in NO way associated with this extension, & I do not provide support for it.***
it is not so good to give such power in your website to such plugin
As for the code above and the overall safety of the approach used by Art Plugin, I honestly can't say that it's safe or not, I am only saying that it does indeed parse the plugin code, whether or not it's a good idea to use this extension is another matter.
...And I would love to know if others think it is safe or not, since I have used it on a few sites I have built....
So BBC, the code you posted there - are there any inherent security issues?
Please Log in or Create an account to join the conversation.
- JoomlaJet
- Offline
- New Member
Less
More
- Posts: 5
12 years 11 months ago #95650
by JoomlaJet
Replied by JoomlaJet on topic Use Joomla Plugins in extra fields?
Another, completely differnent approach to this issue is to convert your plugin into a system plugin, which may be a good idea if you only need one plugin to work inside k2.
This page describes a few interesting methods to get plugins working outside of the core content area:
www.howtojoomla.net/how-tos/development/how-to-fix-joomla-content-plugins
- the last bit on the page that starts with "Alternatively, if you have an entire component view that needs to be filtered, you can use PHP’s output buffering functions to capture all of the output...."
might be something that could work in k2 in general, although I am probably not going to be the one to try it right now.
This page describes a few interesting methods to get plugins working outside of the core content area:
www.howtojoomla.net/how-tos/development/how-to-fix-joomla-content-plugins
- the last bit on the page that starts with "Alternatively, if you have an entire component view that needs to be filtered, you can use PHP’s output buffering functions to capture all of the output...."
might be something that could work in k2 in general, although I am probably not going to be the one to try it right now.
Please Log in or Create an account to join the conversation.
- BBC
- Offline
- Platinum Member
Less
More
- Posts: 663
12 years 11 months ago #95651
by BBC
Replied by BBC on topic Use Joomla Plugins in extra fields?
Please Log in or Create an account to join the conversation.
- Jock
- Offline
- Premium Member
Less
More
- Posts: 90
12 years 10 months ago #95652
by Jock
Replied by Jock on topic Use Joomla Plugins in extra fields?
HI BBC,
I tried those changes but it didn't work for me? Can you confirm that it actually works?
I am banging my head up against a wall somewhat trying to figure this out.
I have a similar scenario to the ones mentioned above ... I am trying to use the following syntax in extrafields to generate images with an enlarge/layer option:
{gallery width=708 height=140 alignment=left orientation=horizontal overlay=1}/images/image.jpg{/gallery}
All it is outputting, however, is the syntax.
I tried those changes but it didn't work for me? Can you confirm that it actually works?
I am banging my head up against a wall somewhat trying to figure this out.
I have a similar scenario to the ones mentioned above ... I am trying to use the following syntax in extrafields to generate images with an enlarge/layer option:
{gallery width=708 height=140 alignment=left orientation=horizontal overlay=1}/images/image.jpg{/gallery}
All it is outputting, however, is the syntax.
Please Log in or Create an account to join the conversation.
- BBC
- Offline
- Platinum Member
Less
More
- Posts: 663
12 years 10 months ago #95653
by BBC
Replied by BBC on topic Use Joomla Plugins in extra fields?
I rember that it worked for simple HTML in extra field.
But, it is good start if you want parse plugin in fields.
Some days ago i saw a topic here. Someone managed to get it to work with plugins and brackets "{...}" in extra fields. Use Google search, you will find topic faster.
But, it is good start if you want parse plugin in fields.
Some days ago i saw a topic here. Someone managed to get it to work with plugins and brackets "{...}" in extra fields. Use Google search, you will find topic faster.
Please Log in or Create an account to join the conversation.
- Jock
- Offline
- Premium Member
Less
More
- Posts: 90
12 years 10 months ago #95654
by Jock
Replied by Jock on topic Use Joomla Plugins in extra fields?
I've been searching all over, can't seem to find the solution ... ill have another look, perhaps you would too?
Please Log in or Create an account to join the conversation.
- BBC
- Offline
- Platinum Member
Less
More
- Posts: 663
12 years 10 months ago #95655
by BBC
Replied by BBC on topic Use Joomla Plugins in extra fields?
As for the code above and the overall safety of the approach used by Art Plugin, I honestly can't say that it's safe or not, I am only saying that it does indeed parse the plugin code, whether or not it's a good idea to use this extension is another matter.
...And I would love to know if others think it is safe or not, since I have used it on a few sites I have built....
So BBC, the code you posted there - are there any inherent security issues?
Sorry, missed this post. Quote never works at this forum ?
I didn´t mean it from security, or bugs standview.
Simply, developer can get tired of that plugin, Joomla updates to version that doesn´t work with plugin and you are in big trouble. Because you gave that plugin (module) such power and influence over your website.
...And I would love to know if others think it is safe or not, since I have used it on a few sites I have built....
So BBC, the code you posted there - are there any inherent security issues?
Sorry, missed this post. Quote never works at this forum ?
I didn´t mean it from security, or bugs standview.
Simply, developer can get tired of that plugin, Joomla updates to version that doesn´t work with plugin and you are in big trouble. Because you gave that plugin (module) such power and influence over your website.
Please Log in or Create an account to join the conversation.