Download movie link Download movie link
 

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

Download movie link

Started by Pieter.txt, September 14, 2010, 05:02:59 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Pieter.txt

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?

Αndré

Sure. Just modify that code to your needs:
        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>';
        }

Pieter.txt

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?

Αndré

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

phill104

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.
It is a mistake to think you can solve any major problems just with potatoes.

Pieter.txt

Thanks for the link to the appropriate section in the documentation. I didn't know you could override functions in theme.php.