Advanced search  

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Pages: [1]   Go Down

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

0 Members and 1 Guest are viewing this topic.

pols1337

  • Coppermine frequent poster
  • ***
  • Country: us
  • Offline Offline
  • Gender: Male
  • Posts: 244
Ignore certain file types
« on: March 13, 2013, 02: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: 244
Re: Ignore certain file types
« Reply #1 on: March 13, 2013, 02: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: 15764
Re: Ignore certain file types
« Reply #2 on: March 13, 2013, 02: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: 244
Re: Ignore certain file types
« Reply #3 on: March 13, 2013, 03: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: 15764
Re: Ignore certain file types
« Reply #4 on: March 13, 2013, 03: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: 15764
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: 15764
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: 244
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: 15764
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.048 seconds with 20 queries.