is it possible to alphabetical album title under cat? is it possible to alphabetical album title under cat?
 

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

Main Menu

is it possible to alphabetical album title under cat?

Started by Bubble, March 31, 2006, 10:58:12 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Bubble

i know i can alphabetical cat but can't seem to alphabetical the album under. For example,

http://www.zmodified.com/gallery/index.php?cat=31&page=1

how can i alphabetical order the album in there?

Thanks

Stramm

try that

find in index.php

    $sql = 'SELECT a.aid, a.title, a.description, category, visibility, filepath, ' . 'filename, url_prefix, pwidth, pheight ' . 'FROM ' . $CONFIG['TABLE_ALBUMS'] . ' as a ' . 'LEFT JOIN ' . $CONFIG['TABLE_PICTURES'] . ' as p ' . 'ON a.thumb=p.pid ' . 'WHERE category=' . $cat . $album_filter . ' ORDER BY a.pos ' . $limit;

replace with

    $sql = 'SELECT a.aid, a.title, a.description, category, visibility, filepath, ' . 'filename, url_prefix, pwidth, pheight ' . 'FROM ' . $CONFIG['TABLE_ALBUMS'] . ' as a ' . 'LEFT JOIN ' . $CONFIG['TABLE_PICTURES'] . ' as p ' . 'ON a.thumb=p.pid ' . 'WHERE category=' . $cat . $album_filter . ' ORDER BY a.title ' . $limit;

Bubble


legsmaniac

Reviving an old topic after a search for help.

I tried this mod (which mods line 444) and I found that it only sorted the albums within the album link and not those displayed on the Index page.

However, modifying line 605 sorts the albums displayed on the Index page.

But neither of these mods sort the User Galleries and this is what I'm trying to do. The User Galleries, by default, sort by the date the member joined.  Can someone tell me where I need to mod the code to sort User Galleries only?

Thank you.


legsmaniac

Thanks for your reply but sadly, that didn't work either.

I'm using 1.4.8 at the moment, planning to upgrade to 1.4.9 soon, but this problem is bugging me at the mo.

I tried both $sql .= "ORDER BY user_name "; and $sql .= "ORDER BY username "; and get a database error each time.  Both my forum and coppermine tables are in the same database.

Any other ideas?

Nibbler

Post the mysql error message. Ensure you are changing the first occurence of the code and using user_name.

legsmaniac

Right.  Previously, I tried changing the first occurence, but it did nothing.  I was changing the second occurence which gave me the error.

OK, so I've changed only the first occurence again, and still nothing happens.  Thinking it's could be a cookies thing, I cleared all cookies and temp internet files, still the User Galleries are by joined date order.   ???

legsmaniac


Joachim Müller


legsmaniac

That's because I was told to ensure I was changing the first incidence of the code which I now have.  Read up.

I explained I was changing the second incidence of the code which caused the error message. 

I now get no error message because I've left the 2nd incidence of the code as is and change the first incidence of the code as asked.

But still it doesn't order alphabetically.

WestTac1

Worked like a charm! Thank you for posting this, I wonder how this would be possible for a while now.