Out of the box? No, not possible. You'd have to hack at core files to make this possible. I don't know what you'd need to do, but almost anything is possible ;)
I'd look at sorting by Summary or Keywords
____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here
djpumpkin
Joined: 2006-12-06
Posts: 135
Posted: Fri, 2008-10-31 15:21
I see. Thanks for the info.
I'm no programmer - but I'm thinking it must be pretty straight forward to make a php argument that will target the first character of the last character string after a space character in a title field?
If I find a way to do this I will share my results.
alecmyers
Joined: 2006-08-01
Posts: 4342
Posted: Fri, 2008-10-31 17:18
Quote:
I'm no programmer - but I'm thinking it must be pretty straight forward to make a php argument that will target the first character of the last character string after a space character in a title field?
Unfortunately it's not that simple. The sorting is done by an ORDER BY clause in the SQL SELECT statement that fetches the items from the db. That clause is built in function _getOrderInfo($orderBy, $orderDirection) in modules/core/classes/helpersGalleryChildEntityHelper_simple.class - from around line 415.
A neat way to do it would be to add a new sort order ('familyName') for the $orderBy parameter, and make that selectable in the sort order drop-down. Then you have to sculpt the appropriate SQL query. Good luck!
djpumpkin
Joined: 2006-12-06
Posts: 135
Posted: Fri, 2008-10-31 20:35
Thanks for the tip alecmyers. It looks like a good strategy. I have a web developer helping me with my project so I will pass this on to him and see what he can do. I think this could be a useful feature for many gallery users.
alecmyers
Joined: 2006-08-01
Posts: 4342
Posted: Sat, 2008-11-01 10:50
Alternatively (this would need no core hacking) create a new separate module that has a controller that analyses the Title of a given album and sets the custom order weighting for that item. Then leave the album set to custom ordering. You'd have to re-run your module whenever a new album was added, but you could automate this with some (more minor) core adjustments.
Posts: 16503
Out of the box? No, not possible. You'd have to hack at core files to make this possible. I don't know what you'd need to do, but almost anything is possible ;)
I'd look at sorting by Summary or Keywords
____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here
Posts: 135
I see. Thanks for the info.
I'm no programmer - but I'm thinking it must be pretty straight forward to make a php argument that will target the first character of the last character string after a space character in a title field?
If I find a way to do this I will share my results.
Posts: 4342
Unfortunately it's not that simple. The sorting is done by an ORDER BY clause in the SQL SELECT statement that fetches the items from the db. That clause is built in function _getOrderInfo($orderBy, $orderDirection) in modules/core/classes/helpersGalleryChildEntityHelper_simple.class - from around line 415.
A neat way to do it would be to add a new sort order ('familyName') for the $orderBy parameter, and make that selectable in the sort order drop-down. Then you have to sculpt the appropriate SQL query. Good luck!
Posts: 135
Thanks for the tip alecmyers. It looks like a good strategy. I have a web developer helping me with my project so I will pass this on to him and see what he can do. I think this could be a useful feature for many gallery users.
Posts: 4342
Alternatively (this would need no core hacking) create a new separate module that has a controller that analyses the Title of a given album and sets the custom order weighting for that item. Then leave the album set to custom ordering. You'd have to re-run your module whenever a new album was added, but you could automate this with some (more minor) core adjustments.