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:
// 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}&page={PAGE}&sort=da" title="{SORT_DA}"> + </a></span></td>
<td class="sortorder_options">
<span class="statlink"><a href="thumbnails.php?album={AID}&page={PAGE}&sort=dd" title="{SORT_DD}"> - </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}&page={PAGE}&sort=pa" title="{SORT_PA}"> + </a></span></td>
<td class="sortorder_options"><span class="statlink"><a href="thumbnails.php?album={AID}&page={PAGE}&sort=pd" title="{SORT_PD}"> - </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?
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.
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.
Ugh - pop under ads...
Quote from: CrusaderZA on April 05, 2012, 05:55:03 PM
... I've got a heavily modified theme...
Any ideas how I can fix this?
Finish upgrading the theme - at least start by removing:
<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 (http://validator.w3.org/)
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.
Have a look at the sort order link targets. The tokens don't get replaced with the actual IDs, e.g.:
Quotehttp://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
Thanks. That's my problem exactly and seems to have fixed the error on the version I'm running on XAMPP to test things.