Announcement

#1 2009-10-01 01:44:14

the-outdoorsman
Member
2009-05-17
84

Changing the order the photos are displayed in

I can not figure out where to change the default order so when a person visits my site the display order will be by filename. When I go to each catogory and scroll down to the sort it has a place to check " Use the default image sort order (defined in the configuration file". I am guessing this is where I need to make my change at. I just need to no how to do it.

Thanks for any help
KC

Offline

 

#2 2009-10-01 07:12:06

VDigital
Former Piwigo Team
Paris (FR)
2005-05-04
17680

Re: Changing the order the photos are displayed in

$conf['order_by'] = '       ORDER BY date_available DESC, file ASC, id ASC';
$conf['order_by_inside_category'] = $conf['order_by'];

It's just a sample.
To do it:
- Add these lines by [extension by Piwigo Team] LocalFiles Editor (Config)
- let some space before ORDER BY
- You could use any columns from the images table (currently)
- Choose the right order ascending or descending.
- Alternative: the second statement could be coded as the first one but with different columns (means most visited are ordered in a way and in another inside a category).


Piwigo.com: Start and run your own photo gallery. Signup and get 30 days to try for free, no commitment.
8-)

Offline

 

#3 2009-10-02 01:58:56

the-outdoorsman
Member
2009-05-17
84

Re: Changing the order the photos are displayed in

Ok, I will give that a try. Thanks for your help

Offline

 

#4 2009-11-21 23:50:43

MarkPrima
Member
Ontario, Canada
2009-11-21
7

Re: Changing the order the photos are displayed in

I was glad to find this thread about image sorting.

Since I have over 110 images in a directory I see the classic order method as listed below:

game 1-1
game 1-100
game 1-101
.
.
.
game 1-109
game 1-11
game 1-110
game 1-12

Does anyone know of a mod to fix this issue?

http://hockey.webentia.net

Offline

 

#5 2009-11-22 09:20:50

VDigital
Former Piwigo Team
Paris (FR)
2005-05-04
17680

Re: Changing the order the photos are displayed in

Why did you rename your files?

It would be much easier.

If you are not able (or don't want) to return to original file name, I will give you the solution.
The current workaround is an heavy webmaster work.




(Currently we have a feature request to add time in creation date, it will come and I don't know when exactly).


Piwigo.com: Start and run your own photo gallery. Signup and get 30 days to try for free, no commitment.
8-)

Offline

 

#6 2009-11-22 14:19:48

MarkPrima
Member
Ontario, Canada
2009-11-21
7

Re: Changing the order the photos are displayed in

VDigital wrote:

Why did you rename your files?

It would be much easier.

I rename them to have better organization of event photos. The camera numbering system is img1287, img1288, img1289...
If original file name is used and there are over 100 photos the order will still get muffed up.

Just a small issue in my mind but quite important for event photographers.

Thank you for your quick reply on the board!

Offline

 

#7 2009-11-22 15:09:52

VDigital
Former Piwigo Team
Paris (FR)
2005-05-04
17680

Re: Changing the order the photos are displayed in

From "Edit a category"

If you return to original file names.
Just sort.
Sort order   
Unselect Use the default image sort order (defined in the configuration file)
File name ascending


If you don't return to original file names.
http://piwigo.org/demo/admin/template/goto/icon/ranks.png link to: Manage image ranks
and after the boring task, just sort.
Sort order   
Unselect Use the default image sort order (defined in the configuration file)
Rank ascending


Yes, having several event photographers is an issue to be sorted.


Piwigo.com: Start and run your own photo gallery. Signup and get 30 days to try for free, no commitment.
8-)

Offline

 

#8 2010-02-22 07:29:00

SHasler
Guest

Re: Changing the order the photos are displayed in

Yes, the time stamp would fix the issue for sure.

Is there a work-around for this currently?

Thanks!

Scott

 

#9 2010-02-22 09:20:55

plg
Piwigo Team
Nantes, France, Europe
2002-04-05
13786

Re: Changing the order the photos are displayed in

SHasler wrote:

Yes, the time stamp would fix the issue for sure.

Is there a work-around for this currently?

In case you use FTP+synchronization, have your filenames like YYYYMMDDhhmmss-img1288.jpg and sort by file.

This trick will also work with pLoader in Piwigo 2.0.9.

Offline

 

Board footer

Powered by FluxBB

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