Author Topic: adding plugin/mambot to "short description"  (Read 53182 times)

side_chain

  • Beginner
  • *
  • Posts: 3
adding plugin/mambot to "short description"
« on: May 20, 2008, 21:15:24 pm »
Hi friens here at the forum

i trying to add an mp3 player (mambot plugin) into the short description. Although ive cheked the box for intigration (admin page, where you can choose to include mambots) but without any sucess.

Ive read all the threads regarding this, but it seems that it worked on the old VM.

im using the latest VM stable version 1.1 something.

please help me to solve this problem, ive been trying to fix my store for 2 days without any sleep.

Hope for some answers

/Sincerely

Jean

side_chain

  • Beginner
  • *
  • Posts: 3
Re: adding plugin/mambot to "short description"
« Reply #1 on: May 20, 2008, 22:36:44 pm »
someone please help....

really need this....

jenkinhill

  • UK Web Developer & Consultant
  • Global Moderator
  • Super Hero
  • *
  • Posts: 26038
  • Always on vacation
    • Jenkin Hill Internet
Re: adding plugin/mambot to "short description"
« Reply #2 on: May 22, 2008, 12:21:45 pm »
Plugins can normally only be used within the long description. But they can be used in the short description with a simple code hack.

In shop.browse.php find the following code around line 403

Code: [Select]
$product_details = $VM_LANG->_('PHPSHOP_FLYPAGE_LBL');

Immediately before that line insert the following

Code: [Select]
$product_s_desc = vmCommonHTML::ParseContentByPlugins( $product_s_desc );

shop.browse.php is located in /administrator/components/com_virtuemart/html/

This has been tested with 1 PixelOut Audio Player 1.5.1 on Joomla 1.5.3 with VirtueMart 1.1 final. I do not know if this hack has security implications, but it works for me.

Kelvyn

Jenkin Hill Internet,
Keswick, Lake District

Unsolicited PMs/emails will be ignored.

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

Currently using VM3.2.3.9579 on Joomla 3.7.3 PHP 7.0.19

Testing VMVM3.2.4 on J!3.7.3

YtseDrummer

  • Beginner
  • *
  • Posts: 21
Re: adding plugin/mambot to "short description"
« Reply #3 on: May 23, 2008, 12:06:18 pm »
What's the method to use plugin into long description?

PastorJon

  • Jr. Member
  • **
  • Posts: 73
Re: adding plugin/mambot to "short description"
« Reply #4 on: May 23, 2008, 13:55:43 pm »
What's the method to use plugin into long description?
VirtueMart - Admin - Configuration.  Check the box that allows plugins to modify product descriptions.

PastorJon

  • Jr. Member
  • **
  • Posts: 73
Re: adding plugin/mambot to "short description"
« Reply #5 on: May 23, 2008, 13:59:14 pm »
Plugins can normally only be used within the long description. But they can be used in the short description with a simple code hack.
In shop.browse.php find the following code around line 403
Code: [Select]
$product_details = $VM_LANG->_('PHPSHOP_FLYPAGE_LBL');
Immediately before that line insert the following
Code: [Select]
$product_s_desc = vmCommonHTML::ParseContentByPlugins( $product_s_desc );
shop.browse.php is located in /administrator/components/com_virtuemart/html/
This has been tested with 1 PixelOut Audio Player 1.5.1 on Joomla 1.5.3 with VirtueMart 1.1 final. I do not know if this hack has security implications, but it works for me.

Just for reference, it's line 389 for me.

Thanks for this hack!  I'm excited to use it!

YtseDrummer

  • Beginner
  • *
  • Posts: 21
Re: adding plugin/mambot to "short description"
« Reply #6 on: June 10, 2008, 15:31:09 pm »
Can I insert php code into VirtueMart product's description using this option whit a php plugin?


jenkinhill

  • UK Web Developer & Consultant
  • Global Moderator
  • Super Hero
  • *
  • Posts: 26038
  • Always on vacation
    • Jenkin Hill Internet
Re: adding plugin/mambot to "short description"
« Reply #7 on: June 10, 2008, 16:34:21 pm »
Try it and see.
Kelvyn

Jenkin Hill Internet,
Keswick, Lake District

Unsolicited PMs/emails will be ignored.

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

Currently using VM3.2.3.9579 on Joomla 3.7.3 PHP 7.0.19

Testing VMVM3.2.4 on J!3.7.3

YtseDrummer

  • Beginner
  • *
  • Posts: 21
Re: adding plugin/mambot to "short description"
« Reply #8 on: June 16, 2008, 12:39:32 pm »
It works!


rossi46

  • Beginner
  • *
  • Posts: 2
Re: adding plugin/mambot to "short description"
« Reply #9 on: September 02, 2008, 22:30:55 pm »
Hi,

this hack works like a charm. Can you help me with module latestproducts from gavick? Down is the code. What I have to change to work html language or. mambots?

Thanks, Rossi

Code: [Select]
<?php if($this->show_desc == 1) : ?>
<div class="gk_vm_lastprod_desc">
<?php 
$desc strip_tags($db->f('product_s_desc'));
$desc explode(' '$desc);
$desc_s '';
for($wc 0$wc $this->wordcount$wc++) $desc_s .= $desc[$wc].' ';
echo trim($desc_s).'...';
?>

</div>
<?php endif; ?>

azjr

  • Beginner
  • *
  • Posts: 7
Re: adding plugin/mambot to "short description"
« Reply #10 on: September 24, 2008, 19:00:30 pm »
Hi - any of you guys know how can I use plugins for $product_type? (in short, I'm modifying the flypage - the plugin works in description, but I need it for type parameters = I can't find the file where the code will work) pls advise,
AZ
=========
CORRECTION:
=========
I'm actually trying to use plugin (moshide) within the flypage template surrounding the variable:
Code: [Select]
{moshide hidden More info:}<?php echo $product_type ?>{/moshide}So, yes, if I use the plugin within i.e. description, then it works, but it doesn't when placing it in template like above. Please advise, Thanks, AZ

azjr

  • Beginner
  • *
  • Posts: 7
Re: adding plugin/mambot to "short description"
« Reply #11 on: September 24, 2008, 20:00:00 pm »
OK , I have found it: thanks to Mike Reumer and his Google Maps plugin. See the 'how to' here: http://tech.reumer.net/google-maps/documentation-of-plugin-googlemap/maps-in-components-modules--contact-joomla-1.5.x.html
You will also have to add a reference code to your plugin - right after the
Code: [Select]
$mainframe->registerEvent( 'onPrepareContent', 'YOUR-PLUGIN-NAME' );enter this:
Code: [Select]
$mainframe->registerEvent( 'onMap', 'YOUR-PLUGIN-NAME' );
This is for J1.5x
And as they say: "It's not recommended to hack Joomla and it is for your own risk" - so what the VM gurus would say - is there a better solution? Thanks,
AZ

sampleoidz

  • Beginner
  • *
  • Posts: 7
Re: adding plugin/mambot to "short description"
« Reply #12 on: September 30, 2008, 23:42:03 pm »
Hi all , I would like to know how to get this to work for the latest products , because all my latest products are just showing the mambot code and not my mp3 plug ,

paulbuk

  • Beginner
  • *
  • Posts: 16
Re: adding plugin/mambot to "short description"
« Reply #13 on: October 13, 2008, 12:27:10 pm »
Hi,
I tried this option but no joy in VM.
I pasted: $product_details = $VM_LANG->_('PHPSHOP_FLYPAGE_LBL'); into the shop.browse.php

but nothing shows.
I'm wondering if it need be in the fly page?

What I want to do:
is allow a demo mp3 file to play back for every download product (products being softsynth soundbanks, loops and library music, mainly zips/rars for download). I'm not too bothered which player I use though 1pixel looks fine. The files will change overtime and as the library grows so will the mp3 files to be played on each product page for the listener to hear before buying (or not). I'm ok with setting the directories for the digital assets.

Do I have to put the ipixelplayer  hard coded into .php file (ie shop.browse.php) also?

If I try it on a static content page it works and the player show fine, but not in any of my VM store product pages.

Any help/advice?

Paul B

svhresi

  • Beginner
  • *
  • Posts: 2
Re: adding plugin/mambot to "short description"
« Reply #14 on: October 22, 2008, 22:51:23 pm »
Hi,
at begin sorry for my english, my schooltime is long ago :-}

Here my Systeminfo:

Joomla! 1.5.7 Production/Stable
VirtueMart 1.1.2 stable

I´ve tried to run the tabs&slides plugin in the short description like they way from jenkinhill.
But it doesn´t work.

My intention is to modify the flypage like the graphic shows.

Have anyone an idea, how it can be realised?

Thanks for your help.


[attachment cleanup by admin]