forum.coppermine-gallery.net
Support => cpg1.5.x Support => cpg1.5 miscellaneous => Topic started by: Pieter.txt 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?
-
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>';
}
-
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?
-
Copy the appropriate function to the theme.php file of your theme and modify it there as described in the docs (http://documentation.coppermine-gallery.net/en/theme.htm#theme_engine).
-
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.
-
Thanks for the link to the appropriate section in the documentation. I didn't know you could override functions in theme.php.