forum.coppermine-gallery.net
Support => cpg1.4.x Support => Older/other versions => cpg1.4 miscellaneous => Topic started by: addar800 on May 01, 2007, 04:35:55 pm
-
i want to make a flash gallery instead of an image gallery but i will have an image section i wanna know is there a mod so users can upload thier flash animations/cartoons and games
-
anyone
-
You can add flah files without a mod, easy as that.
-
If you want to have screenshots as thumbnails of your flash files, then I have a quick 'n dirty hack.
First a little info:
When adding this hack,
you will have to upload a picture (screenshot) with the same name of your flash file but with the '.jpg' extension.
If no thumbnail is uploaded, then the default flash icon is used.
Now for the coding:
open include/functions.inc.php and add the following code around line 1968:
Find:
foreach ($thumb_extensions as $extension) {
// Check for extension-specific thumbs
if (file_exists($default_thumb_path.$CONFIG['thumb_pfx'].$mime_content['extension'].$extension)) {
$filepathname = $default_thumb_path.$CONFIG['thumb_pfx'].$mime_content['extension'].$extension;
After add:
if($mime_content['extension'] == 'swf'){
$filepathname = $pic_row['filepath'].str_replace('swf', 'jpg', $pic_row['filename']);
if (!file_exists($filepathname)){
$filepathname = $default_thumb_path.$CONFIG['thumb_pfx'].$mime_content['extension'].$extension;
}
}
-
Thread has originally been posted on the feature requests sub-board (where it shouldn't have gone, as it is not a valid feature suggestion).
-
well i just want it so you cant add images just flash
-
I don't understand what you mean, maybe some extra explanation?
-
If you want to disallow uploading image files and others (in fact everything but flash), set the content of the fields "Allowed image types (http://coppermine-gallery.net/demo/cpg14x/docs/index.htm#admin_picture_thumb_advanced_pic_extensions)", "Allowed audio types (http://coppermine-gallery.net/demo/cpg14x/docs/index.htm#admin_picture_thumb_advanced_audio_extensions)" and "Allowed document types (http://coppermine-gallery.net/demo/cpg14x/docs/index.htm#admin_picture_thumb_advanced_doc_extensions)" in Coppermine's config to be empty. Set "Allowed movie types (http://coppermine-gallery.net/demo/cpg14x/docs/index.htm#admin_thumbs_advanced_movie)" to "swf"
No mod needed - just use Coppermine's built-in features.
-
ok cheers