VirtueMart Forum

VirtueMart 2 + 3 + 4 => Templating & Layouts => Topic started by: Tobes on July 13, 2013, 04:00:38 AM

Title: PixelOut Audio Plugin not showing in category < Please help
Post by: Tobes on July 13, 2013, 04:00:38 AM
Hi All,

I have Joomla plugins enabled in configuration, and the pixelout plugin is visible in the description area, but it is not showing in the short description or in the category page only the code is visible {audio}http://www.itstooloud.com/bassdrive/Vibration_Sessions_31May_AudioDevice_DexNoir.mp3{/audio}, please could any one advise

TIA

p.s enjoy the tunes in that link ;) direct from the Vibration HQ

edit: virtuemart 2.0.22 Joomla 2.5.11 PixelOut Player 3.5 Pro
Title: Re: PixelOut Audio Plugin not showing in category < Please help
Post by: Maxim Pishnyak on July 13, 2013, 12:00:43 PM
You need to turn on using content plugins in category description and short product description.

Please, search our forum, I saw solution for this somewhere.
Title: Re: PixelOut Audio Plugin not showing in category < Please help
Post by: Tobes on July 13, 2013, 12:21:21 PM
Hi Maxim, thanks for your advice, I have searched the forum but only find suggestions for older versions that say to embed some code, but when i tried this, the code was already implemented in the new version, so maybe all I have to do is switch plugins on for category / short descriptions, but can not find this.

FYI Joomla Plugins is enabled in configuration, this activates the plugin in the main description, but its not working yet in short description or category view.

Thanks in advance for any help, its much appreciated.

Toby
Title: Re: PixelOut Audio Plugin not showing in category < Please help
Post by: jenkinhill on July 13, 2013, 12:35:38 PM
Plugins can currently only be enabled in the product full description. You could maybe use a Joomla plugin like Soucerer to add some plugin code to the category description. Or try adding the code direct into the decsription in the database.
Title: Re: PixelOut Audio Plugin not showing in category < Please help
Post by: Tobes on July 13, 2013, 12:53:05 PM
Hi Jenkinhill,

Thank you for your advise, my only query to what you say is this code in the view.html.php in the category implying plugins should work on category view too, can you offer advise with your fixes as Im not sure about what to add to the database. Thanks

<code>

// add content plugin //
            $dispatcher = JDispatcher::getInstance();
            JPluginHelper::importPlugin('content');
            $category->text = $category->category_description;
            if(!class_exists('JParameter')) require(JPATH_LIBRARIES.DS.'joomla'.DS.'html'.DS.'parameter.php');

            $params = new JParameter('');

            if(JVM_VERSION === 2 ) {
               $results = $dispatcher->trigger('onContentPrepare', array('com_virtuemart.category', &$category, &$params, 0));
               // More events for 3rd party content plugins
               // This do not disturb actual plugins, because we don't modify $product->text
               $res = $dispatcher->trigger('onContentAfterTitle', array('com_virtuemart.category', &$category, &$params, 0));
               $category->event->afterDisplayTitle = trim(implode("\n", $res));

               $res = $dispatcher->trigger('onContentBeforeDisplay', array('com_virtuemart.category', &$category, &$params, 0));
               $category->event->beforeDisplayContent = trim(implode("\n", $res));

               $res = $dispatcher->trigger('onContentAfterDisplay', array('com_virtuemart.category', &$category, &$params, 0));
               $category->event->afterDisplayContent = trim(implode("\n", $res));
            } else {
               $results = $dispatcher->trigger('onPrepareContent', array(& $category, & $params, 0));
            }
            $category->category_description = $category->text;
         }
</code>
Title: Re: PixelOut Audio Plugin not showing in category < Please help
Post by: Maxim Pishnyak on July 13, 2013, 15:26:13 PM
see this http://forum.virtuemart.net/index.php?topic=95316.0
and this http://forum.virtuemart.net/index.php?topic=91396.0
if you need to use button for adding music in your Joomla editor
Title: Re: PixelOut Audio Plugin not showing in category < Please help
Post by: Tobes on July 14, 2013, 11:40:36 AM
Hi Max,

Its super kind of you to share those links, the only thing is, HTML is already working in the short description, so enabling HTML as explained in those threads seems pointless, unless Im missing something else you are suggesting?

Sorry to be a nuisance, its really important I get the player working from category view so my site visitors dont have to click into a page every time to listen to the music we want to sell.

I will also reply to you pm now, thanks for contacting and helping guys

Tobes
Title: Re: PixelOut Audio Plugin not showing in category < Please help
Post by: Maxim Pishnyak on July 15, 2013, 22:13:59 PM
It's ok.
Quote from: Maxim Pishnyak on July 13, 2013, 15:26:13 PM
see this http://forum.virtuemart.net/index.php?topic=95316.0
Name of mentioned by me thread is "Joomla Plugins not showing in category description"
Title: Re: PixelOut Audio Plugin not showing in category < Please help
Post by: Tobes on July 16, 2013, 09:28:51 AM
Hi Maxim,

Please accept my apologies that I continue this thread, I can't get this to work for me, Im now wondering if I have Virtuemart set up correctly.

Im using VM 2.0.22 Joomla 2.5.11

The code is already implemented by the developer on line 174 (com_virtumart/views/catagory/view.html.php)


// add content plugin //
$dispatcher = JDispatcher::getInstance();
JPluginHelper::importPlugin('content');
$category->text = $category->category_description;
if(!class_exists('JParameter')) require(JPATH_LIBRARIES.DS.'joomla'.DS.'html'.DS.'parameter.php');

$params = new JParameter('');

if(JVM_VERSION === 2 ) {
$results = $dispatcher->trigger('onContentPrepare', array('com_virtuemart.category', &$category, &$params, 0));
// More events for 3rd party content plugins
// This do not disturb actual plugins, because we don't modify $product->text
$res = $dispatcher->trigger('onContentAfterTitle', array('com_virtuemart.category', &$category, &$params, 0));
$category->event->afterDisplayTitle = trim(implode("\n", $res));

$res = $dispatcher->trigger('onContentBeforeDisplay', array('com_virtuemart.category', &$category, &$params, 0));
$category->event->beforeDisplayContent = trim(implode("\n", $res));

$res = $dispatcher->trigger('onContentAfterDisplay', array('com_virtuemart.category', &$category, &$params, 0));
$category->event->afterDisplayContent = trim(implode("\n", $res));
} else {
$results = $dispatcher->trigger('onPrepareContent', array(& $category, & $params, 0));
}
$category->category_description = $category->text;
}



So I don't think I need to add any code? what do you think?

I have product category set to:

Category Template "Default"
Category Browse Page "Detailed"
Default Product Details Page "No Override"

So maybe I need to enable something? Im very sorry to keep pestering you, Virtuemart is a bit of a nightmare to get setup properly, too many options with no clear setup instructions.

I dont think short description are showing at all, because even the text I put into the short description does not show on product category, Im thinking it must be a setting I need to change :( any advise would be greatly appreciated.

Thanks for your help.

Toby
Title: Re: PixelOut Audio Plugin not showing in category < Please help
Post by: Maxim Pishnyak on July 16, 2013, 13:02:52 PM
* me thinking ...
Title: Re: PixelOut Audio Plugin not showing in category < Please help
Post by: Tobes on July 17, 2013, 12:00:54 PM
Im using the Shoplicious theme, and Im starting to wonder if its the theme stopping the plugin from showing, I have tried to make contact with Eugene the developer via skype, hes not online now, but hopefully he is later and will be able to tell me if its the template, if you have any ideas I would be grateful.

If I find any news I will post it here.

Tobes
Title: Re: PixelOut Audio Plugin not showing in category < Please help
Post by: Tobes on July 23, 2013, 21:45:59 PM
Hi Maxim,

I just wanted to thank you for all your help, after a lot of playing around I did seem to get everything is now working.

Thanks
Title: Re: PixelOut Audio Plugin not showing in category < Please help
Post by: Maxim Pishnyak on July 24, 2013, 16:55:59 PM
Glad that you made your day!

Could you share some piece of your experience, if this is possible?