Käynnissä

Modify magento video extension to use lightbox, and close properly

I have the Auguria Products youtube video extension for Magento. I like the extension as it places thumbnail links to the videos in a ideal place and it has nice admin control.

The problem is, as it is, it opens the videos in a bad iframe with no way to close the video other than hitting escape key. Also, if you click the video at all, it disables the escape key from working, so you have to go back and return to the page for video to close.

I would like this to be modified to open in a proper modal lightbox so it can be closed when clicking outside video, or with a close button. I currently have the MagePsycho jquery lightboxes extension installed which I am using the FancyBox lightbox with. I would like to use the existing fancybox.

The code is pretty simple. I think the only thing that needs to be modified is the below script that opens the window when the thumbnail is clicked.

Here is the existing script that opens the window.

<script type="text/javascript">

//<![CDATA[

[url removed, login to view]('li-<?php echo $_item->getId(); ?>', 'click', function(event) {

videoPlayer = new Window({

className:'magento',

title:'<?php echo $_item->getTitle(); ?>',

content:$('video-player'),

width:<?php echo Mage::getStoreConfig('auguria_video/sizes/video_player_width'); ?>,

height:<?php echo Mage::getStoreConfig('auguria_video/sizes/video_player_height')+5; ?>,

minimizable:false,

maximizable:false,

showEffectOptions:{duration:0.4},

hideEffectOptions:{duration:0.4},

onClose:function(event) { $('video-player').src=""; }

});

[url removed, login to view](100);

[url removed, login to view](true);

$('video-player').src="http://www.youtube.com/v/<?php echo $_item->getImageIdentifier(); ?>&hl=fr&autoplay=1";

[url removed, login to view]().update($('video-player'));

});

//]]>

</script>

I understand what is going on in the code there, I just do not know how to modify it to open in the existing fancybox properly.

Please advise if you can do this, and for how much.

Thank You

Eric

Taidot: Javascript, jQuery / Prototype, Magento, PHP

Näytä lisää: lightbox fancybox video magento, what is magento, video to text, key video, jquery lightbox lightbox iframe, video content player, javascript button click iframe, javascript modal close, javascript youtube iframe, jquery modify, javascript click iframe button, iframe video, magento products links, magento function getid, open close control, jquery button text, mage key, modal lightbox, magento lightbox iframe, update page code magento, jquery quot, video event, video autoplay, modify javascript code, youtube video links

About the Employer:
( 1 review ) McCordsville, United States

Projektin tunnus: #4298535

Myönnetty käyttäjälle:

webxtreams

Hired by the Employer

30 $ USD 1 päivässä
(118 arvostelua)
5.4