Order Albums alphabetically by membername Order Albums alphabetically by membername
 

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

Order Albums alphabetically by membername

Started by psypix, November 30, 2005, 10:54:24 PM

Previous topic - Next topic

0 Members and 2 Guests are viewing this topic.

psypix

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

Nibbler

#1
file: bridge/udb_base.inc.php

Find:

$sql .= "ORDER BY category ";

change to

$sql .= "ORDER BY user_name ";

psypix

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

marcamillion

When I try the same thing, actually my variable is "username", not "user_name" this is what I get
 
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.

Nibbler

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.

marcamillion

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.

flocon


downy

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

$sql .= "ORDER BY category ";
to:
$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?

downy

Quote from: downy on March 31, 2008, 01:59:57 AM
to:
$sql .= "ORDER BY owner_name ";

or better for correct upper-/lowercase sorting:
"ORDER BY LOWER(owner_name) "