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: How to Ignore Subdirectory when doing Batch Upload  (Read 5110 times)

0 Members and 1 Guest are viewing this topic.

Jim20

  • Coppermine newbie
  • Offline Offline
  • Posts: 8
How to Ignore Subdirectory when doing Batch Upload
« on: December 17, 2005, 11:13:52 pm »

First, let me acknowledge that using FrontPage is probably not something any self-respecting web developer would do.  That said, I am not a self-respecting web developer, and I have been able to integrate Coppermine pretty well into my site, which is otherwise done via FrontPage.

Context for my issue: FrontPage automatically creates a folder in every directory in order to store additional metadata and instructions it uses for various operations.  There is no way to avoid this in FrontPage.  The folder is always titled "_vti_cnf" and FrontPage duplicates every file in the directory and places some amount of information about that file in the _vti_cnf folder within the directory (but each of the replicas is only 1kb in size).

My issue in Coppermine: Once I have uploaded my pictures to the server, I want to use "Batch Add Files" to add the new ones to Coppermine.  The problem is that Coppermine shows all the files that are in the "_vit_cnf" folder in addition to the real files in the directory I have chosen.  Since I definitely don't want these pseudo-files showing up on my site, I have to deselect all of them each time I hit this point in the batch add process.  As the number of files in the directory grows, this will become more and more problematic.

Is there any way I can tell Coppermine to ignore the subdirectory when I do a batch add?
Logged

Nibbler

  • Guest
Re: How to Ignore Subdirectory when doing Batch Upload
« Reply #1 on: December 17, 2005, 11:22:37 pm »

You should be able to add it in here, in searchnew.php

Code: [Select]
        if (is_dir($CONFIG['fullpath'] . $folder . $file) &&
            substr($file,0,1) != "." &&
            strpos($file,"'") == FALSE &&
            strpos($file,trim($CONFIG['userpics'],'/')) === FALSE &&
            strpos($file,'edit') === FALSE &&
            strpos($file,'CVS') === FALSE) {

So add in a new condition like this:

Code: [Select]
if (is_dir($CONFIG['fullpath'] . $folder . $file) &&
substr($file,0,1) != "." &&
strpos($file,"'") == FALSE &&
strpos($file,trim($CONFIG['userpics'],'/')) === FALSE &&
strpos($file,'edit') === FALSE &&
strpos($file,'CVS') === FALSE &&
strpos($file, '_vti_cnf') === FALSE) {
Logged

Jim20

  • Coppermine newbie
  • Offline Offline
  • Posts: 8
Re: How to Ignore Subdirectory when doing Batch Upload
« Reply #2 on: December 17, 2005, 11:39:16 pm »

Nibbler - thanks so much for your reply.  Your solution is exactly the sort of thing I was hoping for.  Unfortunately, it doesn't seem to have done the trick.  I have no idea why - the other directories that are excluded with that bit of code ("edit" "userpics" etc.) certainly don't show up, but the _vti_cnf still does.

Any thoughts?

By the way, the _vti_cnf directory is marked as "hidden" in Windows, in case that has any bearing on the problem.
Logged

Nibbler

  • Guest
Re: How to Ignore Subdirectory when doing Batch Upload
« Reply #3 on: December 17, 2005, 11:44:02 pm »

Ah, then you must be using the 'browsable' interface. Change this line

Code: [Select]
$iframe_hide = rawurlencode('.,..,CVS,edit,'.rtrim($CONFIG['userpics'], '/'));
to

Code: [Select]
$iframe_hide = rawurlencode('.,..,CVS,edit,_vti_cnf,'.rtrim($CONFIG['userpics'], '/'));
Logged

Jim20

  • Coppermine newbie
  • Offline Offline
  • Posts: 8
Re: How to Ignore Subdirectory when doing Batch Upload
« Reply #4 on: December 17, 2005, 11:50:44 pm »

Okay, very nice, we are making progress.  That did remove it from the two "Select Directory" screens at the beginning of the Batch Add process, but when I get to the "List of new files" screen, the _vti_cnf directory and all its files still show up.

Anything else we can tweak?
Logged

Gary B

  • Coppermine novice
  • *
  • Offline Offline
  • Gender: Male
  • Posts: 38
    • Hagerty High School
Re: How to Ignore Subdirectory when doing Batch Upload
« Reply #5 on: December 29, 2005, 11:23:24 pm »

I did both of the modifications above and batch upload still displays the VTI folders. I am using  1.4.2
Logged
Pages: [1]   Go Up
 

Page created in 0.021 seconds with 20 queries.