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

Title: Flash gallery
Post 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
Title: Re: Flash gallery
Post by: addar800 on May 01, 2007, 04:41:21 pm
anyone
Title: Re: Flash gallery
Post by: SaWey on May 01, 2007, 07:12:10 pm
You can add flah files without a mod, easy as that.
Title: Re: Flash gallery
Post by: SaWey on May 02, 2007, 01:28:45 am
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:
Code: [Select]
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:
Code: [Select]
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;
        }
}


Title: Re: Flash gallery
Post by: Joachim Müller on May 02, 2007, 07:41:46 am
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).
Title: Re: Flash gallery
Post by: addar800 on May 03, 2007, 10:00:20 am
well i just want it so you cant add images just flash
Title: Re: Flash gallery
Post by: SaWey on May 03, 2007, 10:06:39 am
I don't understand what you mean, maybe some extra explanation?
Title: Re: Flash gallery
Post by: Joachim Müller on May 03, 2007, 10:14:55 am
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.
Title: Re: Flash gallery
Post by: addar800 on May 09, 2007, 11:53:34 am
ok cheers