forum.coppermine-gallery.net

Support => cpg1.4.x Support => Older/other versions => cpg1.4 upload => Topic started by: Jim20 on December 17, 2005, 11:13:52 pm

Title: How to Ignore Subdirectory when doing Batch Upload
Post by: Jim20 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?
Title: Re: How to Ignore Subdirectory when doing Batch Upload
Post by: Nibbler 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) {
Title: Re: How to Ignore Subdirectory when doing Batch Upload
Post by: Jim20 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.
Title: Re: How to Ignore Subdirectory when doing Batch Upload
Post by: Nibbler 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'], '/'));
Title: Re: How to Ignore Subdirectory when doing Batch Upload
Post by: Jim20 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?
Title: Re: How to Ignore Subdirectory when doing Batch Upload
Post by: Gary B 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