Youtube Videos mod upgrade from 1.4.x to 1.5 Youtube Videos mod upgrade from 1.4.x to 1.5
 

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Main Menu

Youtube Videos mod upgrade from 1.4.x to 1.5

Started by skmdd, April 14, 2011, 08:06:06 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

skmdd

Hi All,
I was trying to upgrade my Coppermine installation, but not sure if the youtube videos I have on the site would still work in 1.5. I used the following mod to upload youtube videos.
http://forum.coppermine-gallery.net/index.php/topic,37962.0.html

Can you suggest a seamless way to upgrade to 1.5 without breaking the existing youtube videos.

Thanks

ΑndrĂ©

You have to re-apply the mod after the upgrade. Then you have to replace the superglobals as described here. I suggest to test it with a clone of your gallery, so if something wents wrong you'll have time to fix it.

skmdd

Managed to get the existing youtube videos in my gallery after upgrading from 1.4 to 1.5. The following mod would only make existing youtube videos work. I did not modify the upload new videos.

Update function theme_html_picture() function in theme.php (if the function is not found, copy it from sample.php:

Instead of :

      if ($CONFIG['transparent_overlay'] == 1) {


Insert:

       if (preg_match('/^youtube_(.*)\.jpg$/', $CURRENT_PIC_DATA['filename'], $ytmatches)){
       
           $vid = $ytmatches[1];
             $pic_html = '<object width="425" height="350"><param name="movie" value="http://www.youtube.com/v/'. $vid . '"></param><param name="wmode" value="transparent"></param><embed src="http://www.youtube.com/v/'. $vid . '" type="application/x-shockwave-flash" wmode="transparent" width="425" height="350"></embed></object><br />';
       
       }
       elseif ($CONFIG['transparent_overlay'] == 1) {