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: Flash gallery  (Read 4159 times)

0 Members and 1 Guest are viewing this topic.

addar800

  • Coppermine newbie
  • Offline Offline
  • Posts: 4
Flash gallery
« 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
« Last Edit: May 09, 2007, 07:16:20 pm by GauGau »
Logged

addar800

  • Coppermine newbie
  • Offline Offline
  • Posts: 4
Re: Flash gallery
« Reply #1 on: May 01, 2007, 04:41:21 pm »

anyone
Logged

SaWey

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 1119
    • SaWey.be
Re: Flash gallery
« Reply #2 on: May 01, 2007, 07:12:10 pm »

You can add flah files without a mod, easy as that.
Logged

SaWey

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 1119
    • SaWey.be
Re: Flash gallery
« Reply #3 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;
        }
}


Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47844
  • aka "GauGau"
    • gaugau.de
Re: Flash gallery
« Reply #4 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).
Logged

addar800

  • Coppermine newbie
  • Offline Offline
  • Posts: 4
Re: Flash gallery
« Reply #5 on: May 03, 2007, 10:00:20 am »

well i just want it so you cant add images just flash
Logged

SaWey

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 1119
    • SaWey.be
Re: Flash gallery
« Reply #6 on: May 03, 2007, 10:06:39 am »

I don't understand what you mean, maybe some extra explanation?
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47844
  • aka "GauGau"
    • gaugau.de
Re: Flash gallery
« Reply #7 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", "Allowed audio types" and "Allowed document types" in Coppermine's config to be empty. Set "Allowed movie types" to "swf"

No mod needed - just use Coppermine's built-in features.
Logged

addar800

  • Coppermine newbie
  • Offline Offline
  • Posts: 4
Re: Flash gallery
« Reply #8 on: May 09, 2007, 11:53:34 am »

ok cheers
Logged
Pages: [1]   Go Up
 

Page created in 0.03 seconds with 19 queries.