forum.coppermine-gallery.net

Support => cpg1.4.x Support => Older/other versions => cpg1.4 miscellaneous => Topic started by: psypix on November 30, 2005, 10:54:24 pm

Title: Order Albums alphabetically by membername
Post by: psypix 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
Title: Re: Order Albums alphabetically by membername
Post by: Nibbler 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 ";
Title: Re: Order Albums alphabetically by membername
Post by: psypix 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
Title: Re: Order Albums alphabetically by membername
Post by: marcamillion 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.
Title: Re: Order Albums alphabetically by membername
Post by: Nibbler 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.
Title: Re: Order Albums alphabetically by membername
Post by: marcamillion 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.
Title: Re: Order Albums alphabetically by membername
Post by: flocon on January 14, 2008, 04:13:02 pm
Exactly what I was searching for!
Thanks!
Title: Re: Order Albums alphabetically by membername
Post by: downy 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?
Title: Re: Order Albums alphabetically by membername
Post by: downy 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) "