Advanced search  

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

Pages: [1]   Go Down

Author Topic: Order Albums alphabetically by membername  (Read 6807 times)

0 Members and 1 Guest are viewing this topic.

psypix

  • Coppermine newbie
  • Offline Offline
  • Posts: 2
Order Albums alphabetically by membername
« on: November 30, 2005, 10:54:24 pm »

Hello

Firstly, thank you to the devs for a wonderfull gallery!

Before my upgrade from 1.3.3 to 1.4, the member galleries on my site was sorted alphabetically with the username.
After the upgrade the member galleries are now sorted via the join date (pos?)

Is there anyway to set this back to sort it alphabetically via the membername again?  I've tried various suggestions
mentioned on the forum to change index.php but with no luck.

many thanks in advance
« Last Edit: November 30, 2005, 11:19:21 pm by Nibbler »
Logged

Nibbler

  • Guest
Re: Order Albums alphabetically by membername
« Reply #1 on: November 30, 2005, 11:02:32 pm »

file: bridge/udb_base.inc.php

Find:

Code: [Select]
$sql .= "ORDER BY category ";
change to

Code: [Select]
$sql .= "ORDER BY user_name ";
« Last Edit: November 30, 2005, 11:18:13 pm by Nibbler »
Logged

psypix

  • Coppermine newbie
  • Offline Offline
  • Posts: 2
Re: Order Albums alphabetically by membername
« Reply #2 on: November 30, 2005, 11:17:20 pm »

you are a genius !!!

although I did not have this file: udb_core.inc.php
I did have: udb_base.inc.php

with the same line, so i changed it

works great!

thank you   ;D
Logged

marcamillion

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Posts: 110
Re: Order Albums alphabetically by membername
« Reply #3 on: January 03, 2006, 06:49:52 pm »

When I try the same thing, actually my variable is "username", not "user_name" this is what I get
 
Code: [Select]
Template error
Failed to find block 'admin_approval'(#(<!-- BEGIN admin_approval -->)(.*?)(<!-- END admin_approval -->)#s) in :

                <div align="center">
                <table cellpadding="0" cellspacing="1">
                        <tr>

                                <td class="admin_menu"><a href="admin.php" title="{ADMIN_TITLE}">{ADMIN_LNK}</a></td>
                                <td class="admin_menu"><a href="catmgr.php" title="{CATEGORIES_TITLE}">{CATEGORIES_LNK}</a></td>
                                <td class="admin_menu"><a href="albmgr.php{CATL}" title="{ALBUMS_TITLE}">{ALBUMS_LNK}</a></td>
                                <td class="admin_menu"><a href="groupmgr.php" title="{GROUPS_TITLE}">{GROUPS_LNK}</a></td>
                                <td class="admin_menu"><a href="usermgr.php" title="{USERS_TITLE}">{USERS_LNK}</a></td>
                                <td class="admin_menu"><a href="banning.php" title="{BAN_TITLE}">{BAN_LNK}</a></td>
                                <td class="admin_menu"><a href="reviewcom.php" title="{COMMENTS_TITLE}">{COMMENTS_LNK}</a></td>
<!-- BEGIN log_ecards -->
                                <td class="admin_menu"><a href="db_ecard.php" title="{DB_ECARD_TITLE}">{DB_ECARD_LNK}</a></td>
<!-- END log_ecards -->
                                <td class="admin_menu"><a href="picmgr.php" title="{PICTURES_TITLE}">{PICTURES_LNK}</a></td>
                                <td class="admin_menu"><a href="searchnew.php" title="{SEARCHNEW_TITLE}">{SEARCHNEW_LNK}</a></td>
                                <td class="admin_menu"><a href="util.php" title="{UTIL_TITLE}">{UTIL_LNK}</a></td>
                                <td class="admin_menu"><a href="profile.php?op=edit_profile" title="{MY_PROF_TITLE}">{MY_PROF_LNK}</a></td>
<!-- BEGIN documentation -->
                                <td class="admin_menu"><a href="{DOCUMENTATION_HREF}" title="{DOCUMENTATION_TITLE}" target="cpg_documentation">{DOCUMENTATION_LNK}</a></td>
<!-- END documentation -->
                        </tr>
                </table>
                </div>


I get that whenever I change category to either of username, or user_name.
Logged

Nibbler

  • Guest
Re: Order Albums alphabetically by membername
« Reply #4 on: January 03, 2006, 06:54:18 pm »

If you are using a bridge where coppermine and the forum are in different databases then you won't be able to use this method.
Logged

marcamillion

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Posts: 110
Re: Order Albums alphabetically by membername
« Reply #5 on: January 03, 2006, 07:00:52 pm »

I found the problem, there are two lines in that file, "Order by category" and "Group by category".

I was doing the wrong one.

Thanks though.
Logged

flocon

  • Coppermine newbie
  • Offline Offline
  • Posts: 3
Re: Order Albums alphabetically by membername
« Reply #6 on: January 14, 2008, 04:13:02 pm »

Exactly what I was searching for!
Thanks!
Logged

downy

  • Coppermine newbie
  • Offline Offline
  • Posts: 2
Re: Order Albums alphabetically by membername
« Reply #7 on: March 31, 2008, 01:59:57 am »

I had the same task to solve, but none of the above solutions works for my set-up with cpg1.4.16. Since I've installed the coppermine parallel to a phpBB3-board, I had to use an external (of course here unsupported) phpBB3-bridge, that does not work with the above changes.

After some database-analysis, I changed

Code: [Select]
$sql .= "ORDER BY category ";to:
Code: [Select]
$sql .= "ORDER BY owner_name ";
that seems to work very well! One question is still open: Are there some known issues or general problems that can occur with such a solution?
Logged

downy

  • Coppermine newbie
  • Offline Offline
  • Posts: 2
Re: Order Albums alphabetically by membername
« Reply #8 on: March 31, 2008, 06:55:22 am »

to:
Code: [Select]
$sql .= "ORDER BY owner_name ";

or better for correct upper-/lowercase sorting:
Code: [Select]
"ORDER BY LOWER(owner_name) "
Logged
Pages: [1]   Go Up
 

Page created in 0.025 seconds with 20 queries.