forum.coppermine-gallery.net
Support => cpg1.5.x Support => cpg1.5 upgrading => Topic started by: skmdd on April 14, 2011, 08:06:06 pm
-
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 (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
-
You have to re-apply the mod after the upgrade. Then you have to replace the superglobals as described here (http://documentation.coppermine-gallery.net/en/dev_superglobals.htm). I suggest to test it with a clone of your gallery, so if something wents wrong you'll have time to fix it.
-
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) {