Advanced search  

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Pages: [1]   Go Down

Author Topic: is it possible to alphabetical album title under cat?  (Read 6987 times)

0 Members and 1 Guest are viewing this topic.

Bubble

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 22
is it possible to alphabetical album title under cat?
« on: March 31, 2006, 10:58:12 am »

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
« Last Edit: March 31, 2006, 05:54:18 pm by Nibbler »
Logged

Stramm

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 6006
    • Bettis Wollwelt
Re: is it possible to alphabetical album title under cat?
« Reply #1 on: March 31, 2006, 12:57:57 pm »

try that

find in index.php
Code: [Select]
    $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
Code: [Select]
    $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

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 22
Re: is it possible to alphabetical album title under cat?
« Reply #2 on: March 31, 2006, 05:09:27 pm »

wow...it works. THANKS so much.
Logged

legsmaniac

  • Coppermine newbie
  • Offline Offline
  • Posts: 6
    • The Digital Site
Re: is it possible to alphabetical album title under cat?
« Reply #3 on: August 28, 2006, 05:03:46 pm »

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.
Logged

legsmaniac

  • Coppermine newbie
  • Offline Offline
  • Posts: 6
    • The Digital Site
Re: is it possible to alphabetical album title under cat?
« Reply #5 on: August 28, 2006, 07:59:38 pm »

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?
Logged

Nibbler

  • Guest
Re: is it possible to alphabetical album title under cat?
« Reply #6 on: August 28, 2006, 08:20:44 pm »

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

legsmaniac

  • Coppermine newbie
  • Offline Offline
  • Posts: 6
    • The Digital Site
Re: is it possible to alphabetical album title under cat?
« Reply #7 on: August 28, 2006, 10:24:55 pm »

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.   ???
Logged

legsmaniac

  • Coppermine newbie
  • Offline Offline
  • Posts: 6
    • The Digital Site
Re: is it possible to alphabetical album title under cat?
« Reply #8 on: August 30, 2006, 02:34:30 am »

OK, looks like no one has the answer  :(
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47844
  • aka "GauGau"
    • gaugau.de
Re: is it possible to alphabetical album title under cat?
« Reply #9 on: August 30, 2006, 06:49:10 am »

You haven't done as suggested:
Post the mysql error message.
What do you expect?
Logged

legsmaniac

  • Coppermine newbie
  • Offline Offline
  • Posts: 6
    • The Digital Site
Re: is it possible to alphabetical album title under cat?
« Reply #10 on: August 30, 2006, 10:56:28 am »

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.
Logged

WestTac1

  • Coppermine newbie
  • Offline Offline
  • Posts: 2
Re: is it possible to alphabetical album title under cat?
« Reply #11 on: February 28, 2009, 04:38:09 pm »

Worked like a charm! Thank you for posting this, I wonder how this would be possible for a while now.
Logged
Pages: [1]   Go Up
 

Page created in 0.019 seconds with 20 queries.