Author Topic: How to enable Joomla plugin on VM 2  (Read 10579 times)

dr.scoop

  • Beginner
  • *
  • Posts: 6
How to enable Joomla plugin on VM 2
« on: January 31, 2012, 14:39:16 pm »
hi there...

after more than a whole day of searching and trying... my brain feels like a pot of jelly....   i hope somebody could help me out... somehow...

im using
-joomla 1.7
-vm 2.0

and the really great joomla plugin
-mp3 Browser

this nice joomla plugin is freeware and lists all mp3's in a folder with id3-tag.

i need to get this joomla plugin to work in prduct details in vm.

i found some older howto's for vm1.1.
http://www.plainlycode.com/Joomla/Joomla-Plugins-in-VirtueMart.html
http://duvien.com/blog/load-mambot-plugins-virtuemart

but i can't get it to work with vm2

in a simple joomla article i just need to use this tag for examle -> {music}media/dj-fresh{/music}


what do i need to do, for getting it to work?
is there maybe a extension for vm to use joomla plugins?


jenkinhill

  • UK Web Developer & Consultant
  • Global Moderator
  • Super Hero
  • *
  • Posts: 28314
  • Always on vacation
    • Jenkin Hill Internet
Re: How to enable Joomla plugin on VM 2
« Reply #1 on: January 31, 2012, 15:46:58 pm »
VM2.0.1b is fixed to allow Joomla plugins. Test on a backup copy.

http://dev.virtuemart.net/projects/virtuemart/files

And see http://forum.virtuemart.net/index.php?topic=96945.0
Kelvyn

Jenkin Hill Internet,
Lowestoft, Suffolk, UK

Unsolicited PMs/emails will be ignored.

Please mention your VirtueMart, Joomla and PHP versions when asking a question in this forum

Currently using VirtueMart  4.0.2 10661 on Joomla 3.10.9 PHP 7.4.29

dr.scoop

  • Beginner
  • *
  • Posts: 6
Re: How to enable Joomla plugin on VM 2
« Reply #2 on: February 01, 2012, 11:22:25 am »
hi there...

thanks for your answer.

now, i've installed this 2 new files for update VM to 2.0.1b with the joomla extensions installer.

so far so good.  after installing, some product-images are missing now, but this isnt importend for me.

the checkbox for enabeling joomla extensions in the config-panel is still active.

if i put in the same tag, like in a joomla article, into pruduct details, it still shows this tag, and not the plugin.

could you tell me, where my problem ist. it looks, like it still doesn't work.


jenkinhill

  • UK Web Developer & Consultant
  • Global Moderator
  • Super Hero
  • *
  • Posts: 28314
  • Always on vacation
    • Jenkin Hill Internet
Re: How to enable Joomla plugin on VM 2
« Reply #3 on: February 01, 2012, 16:09:05 pm »
Sorry, I forgot I have a template override for the product details view. It is not fixed in 2.0.1b, but this is the fix:

In the file components\com_virtuemart\views\productdetails\view.html.php  (or the copy you are using for override)

Find:
Code: [Select]
if(JVM_VERSION === 2 ) {
$results = $dispatcher->trigger('onPrepareContent', array ('com_virtuemart.productdetails',& $product, & $params, 0));
}
else {
$results = $dispatcher->trigger('onPrepareContent', array (& $product, & $params, 0));

change to:
Code: [Select]
if(JVM_VERSION === 2 ) {
$results = $dispatcher->trigger('onContentPrepare', array ('com_virtuemart.productdetails',& $product, & $params, 0));
}
else {
$results = $dispatcher->trigger('onPrepareContent', array ('', & $product, & $params, 0));

Save the edited file and use it as a template override - http://forum.virtuemart.net/index.php?topic=90935.0

Then you can use the Joomla plugins in product details.
Kelvyn

Jenkin Hill Internet,
Lowestoft, Suffolk, UK

Unsolicited PMs/emails will be ignored.

Please mention your VirtueMart, Joomla and PHP versions when asking a question in this forum

Currently using VirtueMart  4.0.2 10661 on Joomla 3.10.9 PHP 7.4.29

Milbo

  • Virtuemart Projectleader
  • Administrator
  • Super Hero
  • *
  • Posts: 10273
  • VM3.9 Eagle Owl
    • VM3 Extensions
  • VirtueMart Version: VirtueMart 3 on joomla 3
Re: How to enable Joomla plugin on VM 2
« Reply #4 on: February 01, 2012, 16:31:44 pm »
The fix is right for j1.7 but not for j1.5. Thanks for hint with changed trigger names: j.5 => onPrepareContent, but j1.7 => onContentPrepare.

The fix in the svn will be:
Code: [Select]
if(JVM_VERSION === 2 ) {
$results = $dispatcher->trigger('onContentPrepare', array ('com_virtuemart.productdetails',& $product, & $params, 0));
}
else {
$results = $dispatcher->trigger('onPrepareContent', array (& $product, & $params, 0));
}
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

jenkinhill

  • UK Web Developer & Consultant
  • Global Moderator
  • Super Hero
  • *
  • Posts: 28314
  • Always on vacation
    • Jenkin Hill Internet
Re: How to enable Joomla plugin on VM 2
« Reply #5 on: February 01, 2012, 20:34:51 pm »
Thanks, Milbo
Kelvyn

Jenkin Hill Internet,
Lowestoft, Suffolk, UK

Unsolicited PMs/emails will be ignored.

Please mention your VirtueMart, Joomla and PHP versions when asking a question in this forum

Currently using VirtueMart  4.0.2 10661 on Joomla 3.10.9 PHP 7.4.29

dr.scoop

  • Beginner
  • *
  • Posts: 6
Re: How to enable Joomla plugin on VM 2
« Reply #6 on: February 02, 2012, 08:13:02 am »
thank you very much for this answer!

well, i'm a joomla newbie, and as a swiss guy, english isn't my native language, but.. i'm about to learn a lot from pro's like you.

thanks again...  even, if i didn't got it to work right now.

if i may ask a further question...

it seems, that i need to left the original vm-product detail-php unchanged, and put the changes you gave me into the override folders. should i left the original filename (view.html.php) or  do i have to rename it to "default.php"?
and how important for the functionality is the adjustement of the -template css, for showing me the joomla plug in the product-details page?

snowy-greetings from switzerland.

Milbo

  • Virtuemart Projectleader
  • Administrator
  • Super Hero
  • *
  • Posts: 10273
  • VM3.9 Eagle Owl
    • VM3 Extensions
  • VirtueMart Version: VirtueMart 3 on joomla 3
Re: How to enable Joomla plugin on VM 2
« Reply #7 on: February 02, 2012, 17:11:48 pm »
Just use the next 2.0.1.c
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

dr.scoop

  • Beginner
  • *
  • Posts: 6
Re: How to enable Joomla plugin on VM 2
« Reply #8 on: February 03, 2012, 07:52:42 am »
..ok., so it seems, that this here,
http://forum.virtuemart.net/index.php?topic=96945.0

is what i'm looking for. ;-)

dr.scoop

  • Beginner
  • *
  • Posts: 6
Re: How to enable Joomla plugin on VM 2
« Reply #9 on: February 03, 2012, 08:57:35 am »
my config.


Plugin works fine in Joomla articles, but still dont work in VM ;-( .

sorry guys, for my stupid problem... but does anybody knows a alternative mp3 plug like that, whitch is working in VM?
i need that für my two ladies. they're managing the shop in the future, and they needs a simple tool, for putting CD-samples into the shop.

arctic greetings out from here.. (-17°C)

jenkinhill

  • UK Web Developer & Consultant
  • Global Moderator
  • Super Hero
  • *
  • Posts: 28314
  • Always on vacation
    • Jenkin Hill Internet
Re: How to enable Joomla plugin on VM 2
« Reply #10 on: February 03, 2012, 11:01:04 am »
I am using Tiny MP3 from Joomlaxtc. Works fine J2.5.1 VM2.0.1c
Kelvyn

Jenkin Hill Internet,
Lowestoft, Suffolk, UK

Unsolicited PMs/emails will be ignored.

Please mention your VirtueMart, Joomla and PHP versions when asking a question in this forum

Currently using VirtueMart  4.0.2 10661 on Joomla 3.10.9 PHP 7.4.29

dr.scoop

  • Beginner
  • *
  • Posts: 6
Re: How to enable Joomla plugin on VM 2
« Reply #11 on: February 03, 2012, 11:50:39 am »
thanks jenkinhill,

i'm gona try it right now.

...and your player looks nice, and btw, im using flash for many years now...  i've made a player like this by myself (it plays all mp3's from a folder with showing id3-tags).....

but...  and ther's the point...  i whould like to keep the page as compatible as possible for all mobile phones (including st***-apple non flash playing phone)...  and i'm searching something non-flash-thing... like the mp3browser....

btw, i've installed joomla 2.5.1 right now, and get vm installed...

and my beloved mp3browser still works in articles... even not in the shop (VM 2.0.1c)

i just see the code, not the plug, like bevor in j1.7 aand VM2.01c

...where is the joomla text filter option gone in j 2.5.1???