content plugins in artist review field

0
Hello,
is there any chance to let a plugin working if I insert it inside the artist's review?
I would like to have a mini artist gallery using 3rd party plugin, but the inserted code {gallery} does not working.
Do you think is possible?
Thank you.

Accepted Answer

Wednesday, September 25 2013, 06:23 PM - #Permalink
0
Hello Steve,

you're close :) in the artist's view.html.php file you need somethign likse this:

$intro->text = $artist->review;

$dispatcher =& JDispatcher::getInstance();
$plug_params = new JRegistry('');

JPluginHelper::importPlugin('content');
$results = $dispatcher->trigger('onContentPrepare', array ('com_muscol.artist', &$intro, &$plug_params, 0));

$artist->review = $intro->text ;


BEFORE the artist var is passed into the layout.
The reply is currently minimized Show
Responses (6)
  • Accepted Answer

    Monday, September 23 2013, 03:22 PM - #Permalink
    0
    it's possible but requires a bit of coding on the artist page to "load" (or process) the content plugins, which is not part of the core code of MC.
    The reply is currently minimized Show
  • Accepted Answer

    Tuesday, September 24 2013, 08:33 AM - #Permalink
    0
    Any suggestion? I found that code in the main page that allows to process the plugis inside the main page of MusCol.

    if($params->get('processcontentplugins')){

    $dispatcher =& JDispatcher::getInstance();
    $plug_params = new JRegistry('');

    JPluginHelper::importPlugin('content');
    $results = $dispatcher->trigger('onContentPrepare', array ('com_muscol.artists', &$intro, &$plug_params, 0));
    $results = $dispatcher->trigger('onContentPrepare', array ('com_muscol.artists', &$intro2, &$plug_params, 0));
    }
    But honestly I don't know where paste it... :(
    The reply is currently minimized Show
  • Accepted Answer

    Thursday, September 26 2013, 08:56 AM - #Permalink
    0
    Hello Mr. Germinal Camps,
    it works perfectly! Thank you a lot, your assistance is really precious.
    I'm going to finish the website for my customer now, he will be really happy.
    Thank you again.
    The reply is currently minimized Show
  • Accepted Answer

    greengeek
    greengeek
    Offline
    Monday, September 30 2013, 01:51 PM - #Permalink
    0
    germi,

    Any reason why this code / feature isn't added to MC by default for the artist, album, and song review content fields? Seems like it has been asked a few times before and would make MC far more powerful as well as perform like most people would expect it to. Would be a very nice default feature for MC! :D
    The reply is currently minimized Show
  • Accepted Answer

    Wednesday, October 02 2013, 04:44 PM - #Permalink
    1
    I will add this ;)
    The reply is currently minimized Show
  • Accepted Answer

    greengeek
    greengeek
    Offline
    Tuesday, October 08 2013, 05:03 AM - #Permalink
    0
    Thanks Germi!
    The reply is currently minimized Show
Your Reply