[SOLVED] Joomla content plugins support for CB

13 years 10 months ago #137333 by urielmx
Hi everybody,

I have weeks looking by my self for a solution, but I guess that CB is too big for that, so I needed to ask for support:

I noticed that CB doesn't have native support for content plug-ins (particularly I need to activate 1pixelout plug-in support).

I found a Joomla! doc, where we can turn on plugins support for components:
docs.joomla.org/Supporting_plugins_in_your_component

..but now I can't find the place where to put that code, because of CB Is not organized (as far as I can see) with the MVC model.

I have to confess that I'm new in Joomla! development, so it is very possible that I was so wrong! :blush:

Post edited by: krileon, at: 2010/07/10 00:47

Please Log in to join the conversation.

13 years 10 months ago #137359 by urielmx
Replied by urielmx on topic Re:Need joomla content plugins support for CB
Well, I found a solution that could be useful for someone that is as desparated as I am :laugh: :

In components/com_comprofiler/comprofiler.php near of line 600 all the content is ready to be showed:

[code:1]echo $html[/code:1]

so, all that you need to do is parse that code with joomla core functions, so I added the next lines before that line:
[code:1]
JPluginHelper::importPlugin( 'content' );
$dispatcher =& JDispatcher::getInstance();
$article =& JTable::getInstance('content');
$params = $mainframe->getParams('com_comprofiler');

$article->text = $html;

$res = $dispatcher->trigger( 'onPrepareContent', array( &$article, &$params, 0 ) );

$html = $article->text;
[/code:1]

I'm very sure that is not the best way to do it, but it worked for me ;)

Please Log in to join the conversation.

13 years 10 months ago #137454 by krileon
Replied by krileon on topic Re:Need joomla content plugins support for CB
An Incubator (more to be announced later) will feature a plugin capable of redirecting Joomla triggers into CB triggers allowing usage throughout CB.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in to join the conversation.

13 years 10 months ago #137459 by beat
urielmx,

Thanks for doing research before posting, and then sharing with others your good solution. Karma up for you :)

When using the proposed solution, you just need to make sure that your enabled content plugins are all usable and secure with members-provided data. ;)

That's the main reason (security, exposure) that refrained us from implementing the above in CB.

Beat - Community Builder Team Member

Before posting on forums: Read FAQ thoroughly -- Help us spend more time coding by helping others in this forum, many thanks :)
CB links: Our membership - CBSubs - Templates - Hosting - Forge - Send me a Private Message (PM) only for private/confidential info

Please Log in to join the conversation.

13 years 9 months ago #138363 by michaela_xyz
Replied by michaela_xyz on topic Re:Need joomla content plugins support for CB
Great idea, but it doesn´t work by me, is it something changed? In my comprofiler.php I have echo $html at line 300, I pasted the code before that line but nothing happens...

Greetings, Michaela

Please Log in to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.291 seconds

Facebook Twitter LinkedIn