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: new feature: browsable batch-add  (Read 9963 times)

0 Members and 2 Guests are viewing this topic.

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
new feature: browsable batch-add
« on: October 06, 2004, 10:05:46 pm »

I committed a new feature that let's you decide if you want to have the "classic" view when batch-adding, or have a browsable tree in an iframe (recycling the minibrowser I originally wrote for bridgemgr.php). If the user's browser isn't capable of displaying iframes, the script will fall back to the "classic" interface. Please test-drive (especially on sub-domains and servers where the webroot equals the doc root issues might come up - I wasn't able to test those setups) and report if there are troubles. You will need to run update.php to see the option. Affected files: minibrowser.php, searchnew.php, lang/english.php, sql/basic.sql, sql/update.sql. You can toggle the option both in config and searchnew.php.
If there are issues, please move this thread to the 1.4 bugs board.

Joachim
« Last Edit: February 18, 2005, 08:54:34 am by GauGau »
Logged

kegobeer

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 4637
  • Beer - it does a body good!
    • The Kazebeer Family Website
Re: new feature: browsable batch-add
« Reply #1 on: October 06, 2004, 11:23:15 pm »

Is there supposed to be a check box or something next to the image files for selection, or is it just for displaying the directories?  I just get a list.
Logged
Do not send me a private message unless I ask for one.  Make your post public so everyone can benefit.

There are no stupid questions
But there are a LOT of inquisitive idiots

Casper

  • VIP
  • Coppermine addict
  • ***
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 5231
Re: new feature: browsable batch-add
« Reply #2 on: October 06, 2004, 11:57:33 pm »

I have the radio buttons, but I do have 2 problems with this.

1.  The 'edit' folder is shown if you click the 'ok' link, along with all other folders, even when only 1 radio button is selected .  I don't upload to there of course, but somehow there are pics there, probably left over from failed test uploads.

2.  ALL pics in the gallery are pre selected, not just new ones.
Logged
It has been a long time now since I did my little bit here, and have done no coding or any other such stuff since. I'm back to being a noob here

kegobeer

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 4637
  • Beer - it does a body good!
    • The Kazebeer Family Website
Re: new feature: browsable batch-add
« Reply #3 on: October 07, 2004, 12:01:54 am »

To clarify my issue: I have radio buttons next to the directories, but nothing next to the images - just wondering if this is by design.  If so, seems kinda unnecessary to have another way to choose the directory I want to batch add from.
Logged
Do not send me a private message unless I ask for one.  Make your post public so everyone can benefit.

There are no stupid questions
But there are a LOT of inquisitive idiots

Casper

  • VIP
  • Coppermine addict
  • ***
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 5231
Re: new feature: browsable batch-add
« Reply #4 on: October 07, 2004, 12:32:48 am »

To clarify my post.

All folders, including the edit folder are shown if you hit the 'OK' link, at the first stage, even if you have selected a button, as shown on my screenshot.

This is also when all pics are pre-selected.

If you open an individual folder first,by clicking on the name, rather than the radio button, it then works correctly.
Logged
It has been a long time now since I did my little bit here, and have done no coding or any other such stuff since. I'm back to being a noob here

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: new feature: browsable batch-add
« Reply #5 on: October 07, 2004, 07:14:46 am »

Is there supposed to be a check box or something next to the image files for selection, or is it just for displaying the directories?  I just get a list.
It's only meant as replacement for the very first step of the "classic" batch-add page, to let you choose a folder. No file selection yet.

To clarify my issue: I have radio buttons next to the directories, but nothing next to the images - just wondering if this is by design. If so, seems kinda unnecessary to have another way to choose the directory I want to batch add from.
It becomes necessary imo when you have a large structure within the albums folder, to avoid the classic interface has to run through all subdirs. This feature has been requested before, and Chris has come up with a hack - I just pushed the idea a bit further. I added a section in the docs that explains this as well. On dialup connections and and sites with large structures, it also fixes time-out issues. However it's of course negotiable wether the classic or the new interface should be default.

All folders, including the edit folder are shown if you hit the 'OK' link, at the first stage, even if you have selected a button, as shown on my screenshot.

This is also when all pics are pre-selected.

If you open an individual folder first,by clicking on the name, rather than the radio button, it then works correctly.
I removed the radio buttons. Please check out searchnew.php and minibrowser.php.

The edit folder is however not meant to show up. If it does for you, I'll have to look into this once more.

Joachim

Logged

Casper

  • VIP
  • Coppermine addict
  • ***
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 5231
Re: new feature: browsable batch-add
« Reply #6 on: October 07, 2004, 10:09:27 am »

Ok, that makes it clearer what to do, and the edit folder is not shown in the list.  But if you hit the ok button at stage one, you do get the edit folder in the selection, and all pics pre-selected.

I know if you follow the instructions and don't hit the OK link until at the folder you want, it all works as planned, but we all know how many don't rtfm.

Is it possible to remove the OK link at stage 1, and only show it when on an individual folder page.
Logged
It has been a long time now since I did my little bit here, and have done no coding or any other such stuff since. I'm back to being a noob here

kegobeer

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 4637
  • Beer - it does a body good!
    • The Kazebeer Family Website
Re: new feature: browsable batch-add
« Reply #7 on: October 07, 2004, 08:49:36 pm »

I managed to kill the edit and userpics directories from coming up, but no luck on the file checkboxes being filled.  Here's what I did:

In searchnew.php, find

Code: [Select]
if ($file != "." && $file != "..")
replace with

Code: [Select]
if ($file != "." && $file != ".." && $CONFIG['fullpath'] . $folder . $file != $CONFIG['fullpath'].'/edit' && $CONFIG['fullpath'] . $folder . $file != $CONFIG['fullpath'].'/'.substr($CONFIG['userpics'],0,strlen($CONFIG['userpics'])-1))
and find

Code: [Select]
if (is_dir($CONFIG['fullpath'] . $folder . $file) && substr($file,0,1) != "." && strpos($file,"'") == FALSE && $file != substr($CONFIG['userpics'],0,strlen($CONFIG['userpics'])-1)  && $file != "edit" ) {
and replace with

Code: [Select]
if (is_dir($CONFIG['fullpath'] . $folder . $file) && substr($file,0,1) != "." && strpos($file,"'") == FALSE) {
Logged
Do not send me a private message unless I ask for one.  Make your post public so everyone can benefit.

There are no stupid questions
But there are a LOT of inquisitive idiots

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: new feature: browsable batch-add
« Reply #8 on: October 08, 2004, 09:18:17 am »

hm, this is not OK imo, as minibrowser.php is used for other things (like the bridgemanager) as well. Take a look at the use of $_REQUEST['hidefolders'] - hiding the edit folder, userpics folder etc. from view is exactly what it's meant to do, as it's filled with
Code: [Select]
rawurlencode('.,..,CVS,edit,'.rtrim($CONFIG['userpics'], '/'))Each forbidden folder name is added to a list with "," as separator, the whole enchilada is made URL-save by rawurlencoding it, in minibrowser it's rawurldecoded, exloded and checked in
Code: [Select]
if (in_array($file,$hiddenfolders) == false) {I'm not sure why it doesn't work for you though...

Joachim
Logged

kegobeer

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 4637
  • Beer - it does a body good!
    • The Kazebeer Family Website
Re: new feature: browsable batch-add
« Reply #9 on: October 09, 2004, 02:51:23 am »

I didn't alter the minibrowser file, just searchnew.  And I think the changes are better than the previous way because we might as well exclude the forbidden directories from being scanned instead of scanning them and then ignoring them.  And what if I have a directory called edit nested inside another directory, like this -> albums/uploads/edit.  The way it is now, that folder will also be excluded because it's not being compared to albums/edit, it's only being compared to edit.

I don't know why it isn't working for me on my test machine.  If I get a chance I'll upload it to my host and see if it runs correctly under their Linux server.
Logged
Do not send me a private message unless I ask for one.  Make your post public so everyone can benefit.

There are no stupid questions
But there are a LOT of inquisitive idiots

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: new feature: browsable batch-add
« Reply #10 on: October 09, 2004, 06:54:33 am »

k, will look into this as well - runs fine on my IIS test server though...

Joachim
Logged

kegobeer

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 4637
  • Beer - it does a body good!
    • The Kazebeer Family Website
Re: new feature: browsable batch-add
« Reply #11 on: October 12, 2004, 12:06:34 am »

Joachim,

Anything new on this?
Logged
Do not send me a private message unless I ask for one.  Make your post public so everyone can benefit.

There are no stupid questions
But there are a LOT of inquisitive idiots

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: new feature: browsable batch-add
« Reply #12 on: October 12, 2004, 07:41:15 am »

sorry, not yet. I didn't have the time to work on this at all in the past few days.

Joachim
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: new feature: browsable batch-add
« Reply #13 on: October 23, 2004, 10:11:55 am »

Dave,

finally I had the time to look into this, and I must confess I haven't read closely enough what you were suggesting. Your fix works fine for me, and I have committed it to the devel cvs. I apologize, sorry for being a moron.

Joachim
Logged

kegobeer

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 4637
  • Beer - it does a body good!
    • The Kazebeer Family Website
Re: new feature: browsable batch-add
« Reply #14 on: October 23, 2004, 05:19:02 pm »

No problem.  Did you figure out why all the checkboxes are filled in if a user clicks OK right away?
Logged
Do not send me a private message unless I ask for one.  Make your post public so everyone can benefit.

There are no stupid questions
But there are a LOT of inquisitive idiots

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: new feature: browsable batch-add
« Reply #15 on: October 24, 2004, 02:38:05 pm »

no, but happens as well if you manually enter http://domain.tld/coppermine/searchnew.php?startdir= when using the classic batch-add. I guess I should just grey out the ok button when the user is within the albums root dir, to force the user to browse at least one folder level deep. Do you think this would be a fix? Another option would be to show the "ok" botton only if there are no more subfolders within the folder selected (only files).

Joachim
Logged

Aditya Mooley

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 781
    • My Sweet Home
Re: new feature: browsable batch-add
« Reply #16 on: October 25, 2004, 12:25:59 pm »

Another option would be to show the "ok" botton only if there are no more subfolders within the folder selected (only files).

This seems to be a better option.

Also we can check that the selected folder is not empty then only show the "Ok" button.
Logged
--- "Its Nice 2 BE Important but its more Important 2 Be NICE" ---
Follow Coppermine on Twitter

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: new feature: browsable batch-add
« Reply #17 on: December 28, 2004, 09:26:03 am »

just bumping this thread to the first page of the sub-board, will have to look into this (self-assign).

Joachim
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: new feature: browsable batch-add
« Reply #18 on: January 23, 2005, 09:07:53 am »

Another option would be to show the "ok" botton only if there are no more subfolders within the folder selected (only files).
Committed to dev branch. Please check out minibrowser.php, test and report back. Thanks.

Joachim
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: new feature: browsable batch-add
« Reply #19 on: February 18, 2005, 08:54:17 am »

as silence means approval, I guess everybody is happy with this fix, so I'll mark this thread as "fixed".

Joachim
Logged
Pages: [1]   Go Up
 

Page created in 0.041 seconds with 19 queries.