- Posts: 7
COMMUNITY FORUM
Use Joomla Plugins in extra fields?
- Ed Saleh
-
Topic Author
- Offline
- New Member
Please Log in or Create an account to join the conversation.
- bwtDesign
-
- Offline
- New Member
- Posts: 3
Please Log in or Create an account to join the conversation.
- BBC
-
- Offline
- Platinum Member
- Posts: 663
Lack of proper documentation.
Please Log in or Create an account to join the conversation.
- JoomlaJet
-
- Offline
- New Member
- Posts: 5
extensions.joomla.org/extensions/core-enhancements/embed-a-i...
Although it was quite a while ago, and not with the current version of k2 - but that may be a good place to start.
Please Log in or Create an account to join the conversation.
- JoomlaJet
-
- Offline
- New Member
- Posts: 5
www.nonumber.nl/extensions/modulesanywhere
but it only works for modules
Please Log in or Create an account to join the conversation.
- Josh
-
- Offline
- Senior Member
- Posts: 63
Please Log in or Create an account to join the conversation.
- BBC
-
- Offline
- Platinum Member
- Posts: 663
As i know Sobi allow it and it is well documented.
Please Log in or Create an account to join the conversation.
- Josh
-
- Offline
- Senior Member
- Posts: 63
eg. www.winelands.co.za/wine-farms/wine-farms-in-franschhoek/ite...
Please Log in or Create an account to join the conversation.
- bwtDesign
-
- Offline
- New Member
- Posts: 3
eg. {becssg}blablabla{/becssg}
Josh said:
I suppose we should be asking the question, what kind of plugin are you trying to use through the k2 fields? I have used this plugin to display a Joomla Google Map Plugin through one specified k2 field.
eg. www.winelands.co.za/wine-farms/wine-farms-in-franschhoek/ite...
Please Log in or Create an account to join the conversation.
- JoomlaJet
-
- Offline
- New Member
- Posts: 5
extensions.joomla.org/extensions/core-enhancements/embed-a-include/9801
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.
- Ed Saleh
-
Topic Author
- Offline
- New Member
- Posts: 7
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
- Posts: 663
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
- Posts: 663
<?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
- Posts: 5
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
- Posts: 5
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
- Posts: 663
Please Log in or Create an account to join the conversation.
- Jock
-
- Offline
- Premium Member
- Posts: 90
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
- Posts: 663
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
- Posts: 90
Please Log in or Create an account to join the conversation.
- BBC
-
- Offline
- Platinum Member
- Posts: 663
...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.