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: Editing Thumbnail view sort order  (Read 4056 times)

0 Members and 1 Guest are viewing this topic.

CrusaderZA

  • Coppermine newbie
  • Offline Offline
  • Posts: 4
Editing Thumbnail view sort order
« on: April 05, 2012, 05:55:03 pm »

I'm trying to upgrade my Coppermine to the latest version. I've got a heavily modified theme from 1.4.18 which seems to work fine except for the sort order of the thumbnail view and I can't figure out how to correct that.

My previous theme.php contained this:
Code: [Select]
// HTML template for title row of the thumbnail view (album title + sort options)
$template_thumb_view_title_row = <<<EOT

                        <table width="100%" cellpadding="0" cellspacing="0">
                        <tr>
                                <td class="statlink"><h2 style="text-align:left;">{ALBUM_NAME}</h2></td>
                                <td><img src="images/spacer.gif" width="1" alt="" /></td>
                                <td class="sortorder_cell" width="250">
                                        <table cellpadding="0" cellspacing="0" align="center">
                                        <tr><td class="sortorder_options" >SORT BY: </td>
<td width="10"></td>


                                                <td class="sortorder_options">{DATE}: </td>
                                                <td class="sortorder_options"><span class="statlink"><a href="thumbnails.php?album={AID}&amp;page={PAGE}&amp;sort=da" title="{SORT_DA}">&nbsp;+&nbsp;</a></span></td>
                                                <td class="sortorder_options">


<span class="statlink"><a href="thumbnails.php?album={AID}&amp;page={PAGE}&amp;sort=dd" title="{SORT_DD}">&nbsp;-&nbsp;</a></span></td>
                                       <td width="10"></td>
                                                <td class="sortorder_options">{POSITION}: </td>
                                                <td class="sortorder_options"><span class="statlink"><a href="thumbnails.php?album={AID}&amp;page={PAGE}&amp;sort=pa" title="{SORT_PA}">&nbsp;+&nbsp;</a></span></td>
                                                <td class="sortorder_options"><span class="statlink"><a href="thumbnails.php?album={AID}&amp;page={PAGE}&amp;sort=pd" title="{SORT_PD}">&nbsp;-&nbsp;</a></span></td>
                                        </tr>
                                        </table>
                                </td>
                        </tr>
                        </table>

EOT;

It shows the sort options, Sort by {Date} + - {Position} + - , but when you click on the + or - it gives an error stating Error The selected album/file does not exist!

Any ideas how I can fix this?


Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: Editing Thumbnail view sort order
« Reply #1 on: April 06, 2012, 11:19:32 am »

Please enable debug mode to see the extended error message. If I remember correctly we already had a thread dealing with the same issue. Please also post a link to your gallery if you need further help.
Logged

CrusaderZA

  • Coppermine newbie
  • Offline Offline
  • Posts: 4
Re: Editing Thumbnail view sort order
« Reply #2 on: April 06, 2012, 07:05:55 pm »

Thanks for the help.

I've got 3 separate Coppermine installs running. With my main gallery I've removed the sort option for the time being.

I've just updated the second gallery located at http://www.spacewallpapers.net/aircraft-wallpaper/index.php and it has the same problem (uses same theme).

With debug mode on the error given is:
The selected album/file does not exist!
File: /home/mysite/public_html/aircraft-wallpaper/include/functions.inc.php - Line: 2380

I think the method the sorting is handled has changed between the two installs and that it can no longer find the functions previously used.
Logged

Joe Carver

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: us
  • Offline Offline
  • Gender: Male
  • Posts: 1545
  • aka 'i-imagine'
    • Home Page
Re: Editing Thumbnail view sort order
« Reply #3 on: April 07, 2012, 12:27:29 am »

Ugh - pop under ads...

... I've got a heavily modified theme...
Any ideas how I can fix this?

Finish upgrading the theme - at least start by removing:

Code: [Select]
<script type="text/javascript" src="scripts.js">
</script>

It throws more than a few errors in the Firefox error console.

Check it here:
The W3C Markup Validation Service


CrusaderZA

  • Coppermine newbie
  • Offline Offline
  • Posts: 4
Re: Editing Thumbnail view sort order
« Reply #4 on: April 07, 2012, 04:06:11 pm »

Sorry about the pop-under ads. The hosting is quite expensive so need to make ends meet and that's the way that pay the most. Luckily they'll only show once every 24 hours.

I'm a bit out of my depth here since I don't really know what I'm doing and I can't remember much about the original template modification. I think it's one that came from version 1.3 if I'm not mistaken and I'm sure there will be lots of room for improvement so I'm definitely open to any help/suggestions.
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: Editing Thumbnail view sort order
« Reply #5 on: April 07, 2012, 04:09:24 pm »

Have a look at the sort order link targets. The tokens don't get replaced with the actual IDs, e.g.:
Quote
http://www.spacewallpapers.net/aircraft-wallpaper/thumbnails.php?album={AID}&page={PAGE}&sort=da

So it's the same issue as described here: http://forum.coppermine-gallery.net/index.php/topic,74607.0.html
Logged

CrusaderZA

  • Coppermine newbie
  • Offline Offline
  • Posts: 4
Re: Editing Thumbnail view sort order
« Reply #6 on: April 07, 2012, 08:42:47 pm »

Thanks. That's my problem exactly and seems to have fixed the error on the version I'm running on XAMPP to test things.

Logged
Pages: [1]   Go Up
 

Page created in 0.038 seconds with 19 queries.