coppermine-gallery.com/forum

Support => cpg1.5.x Support => cpg1.5 miscellaneous => Topic started by: flapane on March 18, 2012, 07:34:45 PM

Title: Cannot sort any album by title/data/position
Post by: flapane on March 18, 2012, 07:34:45 PM
Latest CPG here.
The sort worked great until some time ago.
If you try to open any album and try to change the default sort order (ie. ascending date), you'll get a message stating that the selected file/album doesn't exist.
No matter what sort method I choose in the admin panel, it always sorts the thumbnails by name, while I prefer ascending data.
I disabled the Search Engine Friendly URLs plugin and deleted the htaccess file in order to see if it was the culprit, but it wasn't...
Any hints?
Thanks
Title: Re: Cannot sort any album by title/data/position
Post by: flapane on March 18, 2012, 10:12:48 PM
errata corrige: I see that error message, but if I reload the album page the sort is correctly changed. I don't know which non-existent file/album CPG is referring to.
I've checked for error.log files in my webserver and found nothing.
Title: Re: Cannot sort any album by title/data/position
Post by: ΑndrĂ© on March 19, 2012, 11:20:35 AM
There's probably something wrong with your theme, as it doesn't replace any of the placeholder tokens:
Quote{TITLE}     +      -           {NAME}     +      -           {DATE}     +      -           {POSITION}     +      -

This results in links like
Quotehttp://www.flapane.com/gallery/thumbnails.php?album={AID}&page={PAGE}&sort=da


Check your theme or attach it as zip file to your next reply.
Title: Re: Cannot sort any album by title/data/position
Post by: flapane on March 19, 2012, 11:48:04 AM
Gotcha!
The sort section of my theme.php was using the older sort method. Too bad I created my theme starting from my old original cpg 1.4 theme.

I changed
  <td width="100%" class="statlink">{ALBUM_NAME}</td>
                                <td class="sortorder_options" style="font-size: 100%;">{TITLE}</td>
                                <td class="sortorder_options" style="font-size: 100%;"><span class="statlink"><a href="../../../gallery/thumbnails.php?album={AID}&amp;page={PAGE}&amp;sort=ta" title="{SORT_TA}">&nbsp;+&nbsp;</a></span></td>
                                <td class="sortorder_options" style="font-size: 100%;"><span class="statlink"><a href="../../../gallery/thumbnails.php?album={AID}&amp;page={PAGE}&amp;sort=td" title="{SORT_TD}">&nbsp;-&nbsp;</a></span></td>
                                <td>&nbsp;&nbsp;</td>
                                <td class="sortorder_options" style="font-size: 100%;">{NAME}</td>
                                <td class="sortorder_options" style="font-size: 100%;"><span class="statlink"><a href="../../../gallery/thumbnails.php?album={AID}&amp;page={PAGE}&amp;sort=na" title="{SORT_NA}">&nbsp;+&nbsp;</a></span></td>
                                <td class="sortorder_options" style="font-size: 100%;"><span class="statlink"><a href="../../../gallery/thumbnails.php?album={AID}&amp;page={PAGE}&amp;sort=nd" title="{SORT_ND}">&nbsp;-&nbsp;</a></span></td>
                                <td>&nbsp;&nbsp;</td>
                                <td class="sortorder_options" style="font-size: 100%;">{DATE}</td>
                                <td class="sortorder_options" style="font-size: 100%;"><span class="statlink"><a href="../../../gallery/thumbnails.php?album={AID}&amp;page={PAGE}&amp;sort=da" title="{SORT_DA}">&nbsp;+&nbsp;</a></span></td>
                                <td class="sortorder_options" style="font-size: 100%;"><span class="statlink"><a href="../../../gallery/thumbnails.php?album={AID}&amp;page={PAGE}&amp;sort=dd" title="{SORT_DD}">&nbsp;-&nbsp;</a></span></td>
                                <td>&nbsp;&nbsp;</td>
                                <td class="sortorder_options" style="font-size: 100%;">{POSITION}</td>
                                <td class="sortorder_options" style="font-size: 100%;"><span class="statlink"><a href="../../../gallery/thumbnails.php?album={AID}&amp;page={PAGE}&amp;sort=pa" title="{SORT_PA}">&nbsp;+&nbsp;</a></span></td>
                                <td class="sortorder_options" style="font-size: 100%;"><span class="statlink"><a href="../../../gallery/thumbnails.php?album={AID}&amp;page={PAGE}&amp;sort=pd" title="{SORT_PD}">&nbsp;-&nbsp;</a></span></td>


with this
                                 <td style="text-align:right;" class="sortorder_cell" id="sortorder_cell">
                    <!-- Use JavaScript to display the sorting options only to humans, but hide them from search engines to avoid double-content indexing (js/thumbnails.js) -->
                </td>


Thanks