Advanced search  

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]

Pages: [1]   Go Down

Author Topic: Youtube Videos mod upgrade from 1.4.x to 1.5  (Read 5894 times)

0 Members and 1 Guest are viewing this topic.

skmdd

  • Tester
  • Coppermine novice
  • *
  • Offline Offline
  • Gender: Female
  • Posts: 23
    • Celebrities Wallpapers & Photo Gallery
Youtube Videos mod upgrade from 1.4.x to 1.5
« 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

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

Thanks
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: Youtube Videos mod upgrade from 1.4.x to 1.5
« Reply #1 on: April 15, 2011, 02:03:04 pm »

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.
Logged

skmdd

  • Tester
  • Coppermine novice
  • *
  • Offline Offline
  • Gender: Female
  • Posts: 23
    • Celebrities Wallpapers & Photo Gallery
Re: Youtube Videos mod upgrade from 1.4.x to 1.5
« Reply #2 on: October 09, 2011, 07:36:55 pm »

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 :
Code: [Select]
      if ($CONFIG['transparent_overlay'] == 1) {

Insert:
Code: [Select]
       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) {
Logged
Pages: [1]   Go Up
 

Page created in 0.02 seconds with 20 queries.