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: Download movie link  (Read 3282 times)

0 Members and 1 Guest are viewing this topic.

Pieter.txt

  • Coppermine newbie
  • Offline Offline
  • Posts: 6
Download movie link
« on: September 14, 2010, 05:02:59 pm »

I'm performing a test-upgrade of my gallery to 1.5. Everything is going fine so far. It's just that I was using the movie_download plugin, which allows displaying a download-link for various file-types.
It appears that something similar is now available in the default installation as well. However, it only works for movies. Is it possible to modify this behaviour such that it also displays for other filetypes, such as PDF and MP3?
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15765
Re: Download movie link
« Reply #1 on: September 14, 2010, 06:41:28 pm »

Sure. Just modify that code to your needs:
Code: [Select]
        if ($mime_content['content']=='movie') {
            $info[$lang_picinfo['download_URL']] = '<a href="' . $CONFIG["ecards_more_pic_target"] . (substr($CONFIG["ecards_more_pic_target"], -1) == '/' ? '' : '/') . $path_to_pic.'">'. $lang_picinfo['movie_player'] .'</a>';
        }
Logged

Pieter.txt

  • Coppermine newbie
  • Offline Offline
  • Posts: 6
Re: Download movie link
« Reply #2 on: September 14, 2010, 07:28:29 pm »

So, are you saying I should modify core code and should do so with each (security) update?
Isn't it possible to modify this behaviour via a plugin or something?
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15765
Re: Download movie link
« Reply #3 on: September 14, 2010, 07:49:00 pm »

Copy the appropriate function to the theme.php file of your theme and modify it there as described in the docs.
Logged

phill104

  • Administrator
  • Coppermine addict
  • *****
  • Country: gb
  • Offline Offline
  • Gender: Male
  • Posts: 4858
    • Windsurf.me
Re: Download movie link
« Reply #4 on: September 14, 2010, 08:45:26 pm »

Just to expand on Andre's information, any changes you make you theme.php will remain after any updates as long as you rename your custom theme as per the docs. Some people are suggesting that information is not clear enough hence my addition.
Logged
It is a mistake to think you can solve any major problems just with potatoes.

Pieter.txt

  • Coppermine newbie
  • Offline Offline
  • Posts: 6
Re: Download movie link
« Reply #5 on: September 14, 2010, 11:17:33 pm »

Thanks for the link to the appropriate section in the documentation. I didn't know you could override functions in theme.php.
Logged
Pages: [1]   Go Up
 

Page created in 0.014 seconds with 20 queries.