forum.coppermine-gallery.net

Support => cpg1.4.x Support => Older/other versions => cpg1.4 miscellaneous => Topic started by: calibertolls on December 21, 2005, 04:10:48 am

Title: "Sort my pictures" Select Album list
Post by: calibertolls on December 21, 2005, 04:10:48 am
Hi there, I am having a beast of a time trying to get my pictures sorted properly.  I have them all set on custom sort order in config.  Is there a way I can change the size of the list box in the sort my pictures screen?  I am running at 1024x768 and it doesn't fit on my screen.  Currently I have to scroll the browser window to go from the top of the select box down to the arrow buttons.  This is a real PITA when I am trying to move a lot of pictures around.  I have to continuously scroll the browser window up to see where in the order my file is, and then scroll back down to click the button a few times. 

Edit:  On second thought, it would be WAY cooler if I could "drag and drop" my files into position instead of having to use the buttons at all. You can put that on my wish list.  :)

Thanks,
Latisha
Title: Re: "Sort my pictures" Select Album list
Post by: Joachim Müller on December 21, 2005, 08:29:48 am
DHTML controls have been considered, but dropped for compability reasons. Therefore, there currently is no workaround.
Title: Re: "Sort my pictures" Select Album list
Post by: calibertolls on December 21, 2005, 05:34:10 pm

Ok, I understand that.  But, what about the original request?  How can I change the size of the list box so it fits on my screen? 

Latisha
Title: Re: "Sort my pictures" Select Album list
Post by: Nibbler on December 21, 2005, 05:50:09 pm
The size of the box is being determined here in picmgr.php

Code: [Select]
<select id="to" name="to[]" size="<?php echo min(max(count ($rowset)+3,15), 40?>" multiple onChange="Picture_Select(this.selectedIndex);" class="listbox" style="width: 300px">

Set the size to whatever you prefer.
Title: Re: "Sort my pictures" Select Album list
Post by: artistsinhawaii on December 21, 2005, 08:44:59 pm
Latisha,

Is there any reason why you can't simply add a numeric prefix to all of your filenames to get them to sort the way you want?

ie... 0010_potatobuds.jpg
      0020_tomatoseeds.jpg
      0030_alfalfasprouts.jpg


Start with tens, so that you can insert up to 9 more files between each number in the future. Although, something like  0010a_, 0010b_, would work just as well.

Dennis

Title: Re: "Sort my pictures" Select Album list
Post by: photographicon on January 03, 2006, 08:42:58 pm
As a follow on to the original question, has anyone written a mod that allows a custom sort order to be uploaded in the form of a text file (eg to take the order from a list of image filenames, one per line)? 

If not, then I'll probably roll one myself.  From a quick read through the code (picmgr.php & delete.php), I assume that the order in which images are displayed is controlled by the 'position' field of the '$CONFIG[TABLE_PICTURES]' table, showing lowest value first...
Title: Re: "Sort my pictures" Select Album list
Post by: calibertolls on January 25, 2006, 04:06:44 am
Sorry, have been busy lately and not much to time to play with the gallery.

Thanks Nibbler, I will try that.

Dennis, I am moving a couple hundred photo files off a paid hosting account into my Coppermine install.  I don't really want to rename every file.  :) 

Latisha


Title: Re: "Sort my pictures" Select Album list
Post by: calibertolls on February 11, 2006, 04:51:40 am
The size of the box is being determined here in picmgr.php

Code: [Select]
<select id="to" name="to[]" size="<?php echo min(max(count ($rowset)+3,15), 40?>" multiple onChange="Picture_Select(this.selectedIndex);" class="listbox" style="width: 300px">

Set the size to whatever you prefer.

Just wanted to follow-up on this.  My problem was in the number of records returned in the list box.  40 was too many to fit on my screen and caused me to scroll constantly.  I shortened it to 20
Code: [Select]
size="<?php echo min(max(count ($rowset)+3,15), 20?> and it worked like a charm.

Thanks Nibbler.
Latisha