Advanced search  

News:

cpg1.5.42 maintenance release - upgrade recommended
The Coppermine development team is releasing an update for Coppermine in order to fix several minor issues. All fixes are not security critical, so if your gallery is running fine with cpg1.5.36, cpg1.5.38 or cpg1.5.40 you don't need to upgrade. If you are running an older version than cpg1.5.36, you must update to this latest version as soon as possible because of the security impact!
[more]

Pages: [1]   Go Down

Author Topic: Ignore certain file types  (Read 6031 times)

0 Members and 1 Guest are viewing this topic.

pols1337

  • Coppermine frequent poster
  • ***
  • Country: us
  • Offline Offline
  • Gender: Male
  • Posts: 239
Ignore certain file types
« on: March 13, 2013, 03:22:13 AM »

Hi, quick question: is there a way, when using the Admin's batch upload tool, to skip over or ignore certain file types? 

For example, when I upload my folders using FTP, those folders usually contain some trash files like picasa.ini, thumbs.db, and some about.txt text files for my own personal use.  When I use the batch upload, CPG wants to add those miscellaneous file types to my album.  Although I can manually un-check those particular files from being added, it gets very tiring after awhile.  Thus, is there a way for Coppermine to intelligently ignore those files?
Logged

pols1337

  • Coppermine frequent poster
  • ***
  • Country: us
  • Offline Offline
  • Gender: Male
  • Posts: 239
Re: Ignore certain file types
« Reply #1 on: March 13, 2013, 03:26:37 AM »

By the way, yes, I've gone to look at the Config > File Settings > Allowed file types

Unfortunately, I see no way to tell Coppermine to skip certain files like picasa.ini and thumbs.db
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15212
Re: Ignore certain file types
« Reply #2 on: March 13, 2013, 03:44:39 PM »

They'll be skipped automatically. Instead of the tick icon you'll get a radar icon with a title like
Quote
Only files with the following extensions are accepted: jpg/jpeg/gif/png/psd/asf/asx/mpg/mpeg/wmv/swf/avi/mov/mp3/midi/mid/wma/wav/ogg/doc/xls/pdf/zip/flv/mp4/aac/ttf/youtube
Logged

pols1337

  • Coppermine frequent poster
  • ***
  • Country: us
  • Offline Offline
  • Gender: Male
  • Posts: 239
Re: Ignore certain file types
« Reply #3 on: March 13, 2013, 04:06:34 PM »

Yes I see the radar icon but the batch uploading process stops on that page, instead of automatically moving to the next page to edit individual files. 
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15212
Re: Ignore certain file types
« Reply #4 on: March 13, 2013, 04:10:58 PM »

I think we could automatically uncheck unsupported file types at the batch-add form. I'll try to create a mod as soon as possible.
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15212
Re: Ignore certain file types
« Reply #5 on: April 10, 2013, 01:50:44 PM »

Open searchnew.php, find
Code: [Select]
$checked = isset($expic_array[$picfile_replaced_forbidden]) ? '' : 'checked="checked"';and replace with
Code: [Select]
$checked = isset($expic_array[$picfile_replaced_forbidden]) || !is_known_filetype($pic_fname) ? '' : 'checked="checked"';
Please report if it works as expected.
Logged

avery-t

  • Coppermine newbie
  • Offline Offline
  • Posts: 6
Re: Ignore certain file types
« Reply #6 on: April 12, 2013, 06:46:17 AM »

Hi, quick question: is there a way, when using the Admin's batch upload tool, to skip over or ignore certain file types? 

For example, when I upload my folders using FTP, those folders usually contain some trash files like picasa.ini, thumbs.db, and some about.txt text files for my own personal use.  When I use the batch upload, CPG wants to add those miscellaneous file types to my album.  Although I can manually un-check those particular files from being added, it gets very tiring after awhile.  Thus, is there a way for Coppermine to intelligently ignore those files?

Wouldn't the easiest solution be to upload only the image file?
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15212
Re: Ignore certain file types
« Reply #7 on: April 12, 2013, 09:23:13 AM »

Wouldn't the easiest solution be to upload only the image file?
Sure, but some people don't upload pictures to their (external) gallery, but use already existing file/folder structure and/or need to keep the other files in their directories.
Logged

pols1337

  • Coppermine frequent poster
  • ***
  • Country: us
  • Offline Offline
  • Gender: Male
  • Posts: 239
Re: Ignore certain file types
« Reply #8 on: May 02, 2013, 04:10:40 AM »

This works great.  Thanks.
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15212
Re: Ignore certain file types
« Reply #9 on: May 02, 2013, 03:46:23 PM »

Committed in SVN revision 8563.
Logged
Pages: [1]   Go Up
 

Page created in 0.073 seconds with 19 queries.