Announcement

#1 2011-03-19 05:35:36

Demetrius
Guest

How to Sort Files in Alphanumerical Order

Hi there,

I'm an avid user of Piwigo and it fits my needs perfectly. There's just one thing that I'm trying to figure out and that is sorting the files in alphanumerical order. If I can get that going, then it'll be perfect.

Thanks,
-Demetrius

 

#2 2011-03-19 11:38:13

Gotcha
Former Piwigo Team
Pourrières (83) [FR]
2007-03-14
604

Re: How to Sort Files in Alphanumerical Order

Hi Demetrius,

Copy/past this code in [ Administration >> Plugins >> LocalFiles Editor > Tab : "Local configuration" ]

Code:

// order_by : how to change the order of display for images in a category ?
//
// There are several fields that can order the display :
//
//  - date_available : the date of the adding to the gallery
//  - file : the name of the file
//  - id : element identifier
//  - date_creation : date of element creation
//
// Once you've chosen which field(s) to use for ordering, you must chose the
// ascending or descending order for each field.  examples :
//
// 1. $conf['order_by'] = " order by date_available desc, file asc";
//    will order pictures by date_available descending & by filename ascending
//
// 2. $conf['order_by'] = " order by file asc";
//    will only order pictures by file ascending without taking into account
//    the date_available
$conf['order_by'] = ' ORDER BY file ASC, id ASC';

// order_by_inside_category : inside a category, images can also be ordered
// by rank. A manually defined rank on each image for the category.
//
// In addition to fields of #images table, you can use the
// #image_category.rank column
//
// $conf['order_by_inside_category'] = ' ORDER BY rank';
// will sort images by the manually defined rank of images in this category.
$conf['order_by_inside_category'] = $conf['order_by'];

You can adjust this configuration :-)

This method work for the entire gallery. Will be the default parameter.

Offline

 

#3 2011-03-24 05:18:38

Demetrius
Guest

Re: How to Sort Files in Alphanumerical Order

Hi,

I did just that and now I can't access my gallery at all. =/

 

#4 2011-03-24 06:39:13

ddtddt
Piwigo Team
Quetigny - France
2007-07-27
7207

Re: How to Sort Files in Alphanumerical Order

Connect by FTP

if you use Piwigo 2.0 or before

go to include and rename file config_local.inc.php to old_config_local.inc.php


if you use Piwigo 2.1

go to local/config an rename config.inc.php to config.inc.bak.php

----------------------------

as say gotcha you must use LocalFiles Editor for add local config


You love Piwigo so don't hesitate to participate, learn more on the "Contribute to Piwigo" page. If you don't have much time for contribution, you can also help the project with a donation.

Offline

 

#5 2011-04-14 23:28:30

Per
Member
2011-02-16
6

Re: How to Sort Files in Alphanumerical Order

I can get this to work, all is fine and sorted ASC.


But when I change "Sort order" in the dropdown menu from "Standard" to "Creation date" it is DESC and not ASC? :(
Where can I change this?


And more importantly; where can I learn things like this without asking in the forum?

Offline

 

#6 2011-04-15 00:59:49

lisaviolet
Member
san diego, california
2011-01-03
334

Re: How to Sort Files in Alphanumerical Order

I've had the same problem. Gave up and re-uploaded with the pLoader to a new category and deleted the old one, then  renamed.

Offline

 

Board footer

Powered by FluxBB

github twitter newsletter Donate Piwigo.org © 2002-2024 · Contact