Thumbnail sort order Thumbnail sort order
 

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Main Menu

Thumbnail sort order

Started by Aman Haas, February 16, 2006, 12:13:54 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Aman Haas

I followed Lawrence's tips about hiding the sort order on the thumbnails page by changing the fontcolors in the sortorder_cell and sortorder_options folder but I'm still left with the + - that come after title, filename etc. I don't know where in my theme.css I have to change the font color for that. I'm afraid to just start randomly changing fontcolors to my backgroundcolor in the wrong folder. As you can read, I'm a totall newbie and not into programming. Although this post was ols I hope someone will still see it and react.

Abbas Ali

If you just want to hide the sort order options that comes on thumbnails page....then why hide it by just changing the color? You should completely remove them.

Edit include/functions.inc.php

Replace (around line 1700)


theme_display_thumbnails($thumb_list, $thumb_count, $album_name, $album, $cat, $page, $total_pages, is_numeric($album), $display_tabs);


with


theme_display_thumbnails($thumb_list, $thumb_count, $album_name, $album, $cat, $page, $total_pages, 0, $display_tabs);


HTH
Abbas
Chief Geek at Ranium Systems

Joachim Müller

for future updates I suggest editing your custom theme instead of the core code in functions.inc.php - edit themes/yourtheme/theme.php and find // HTML template for title row of the thumbnail view (album title + sort options)If it exists in your custom theme, just edit out the whole cells where the sorting options code is located. If it doesn't exist, copy the code (taken from themes/sample/theme.php)// 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 width="100%" class="statlink"><h2>{ALBUM_NAME}</h2></td>
                                <td><img src="images/spacer.gif" width="1" alt="" /></td>
                                <td class="sortorder_cell">
                                        <table cellpadding="0" cellspacing="0">
                                        <tr>
                                                <td class="sortorder_options">{TITLE}</td>
                                                <td class="sortorder_options"><span class="statlink"><a href="thumbnails.php?album={AID}&amp;page={PAGE}&amp;sort=ta" title="{SORT_TA}">&nbsp;+&nbsp;</a></span></td>
                                                <td class="sortorder_options"><span class="statlink"><a href="thumbnails.php?album={AID}&amp;page={PAGE}&amp;sort=td" title="{SORT_TD}">&nbsp;-&nbsp;</a></span></td>
                                        </tr>
                                        <tr>
                                                <td class="sortorder_options">{NAME}</td>
                                                <td class="sortorder_options"><span class="statlink"><a href="thumbnails.php?album={AID}&amp;page={PAGE}&amp;sort=na" title="{SORT_NA}">&nbsp;+&nbsp;</a></span></td>
                                                <td class="sortorder_options"><span class="statlink"><a href="thumbnails.php?album={AID}&amp;page={PAGE}&amp;sort=nd" title="{SORT_ND}">&nbsp;-&nbsp;</a></span></td>
                                        </tr>
                                        <tr>
                                                <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>
                                        </tr>
                                        <tr>
                                                <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;
into a new line right before?>

Change this new code to// 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 width="100%" class="statlink"><h2>{ALBUM_NAME}</h2></td>
                        </tr>
                        </table>

EOT;
and the sorting code has vanished. Of course you could do this in one step instead of two, the first step of pasting the original code in was just for ilustration.

Aman Haas

Thanx guys. I didn't expect to get a reply so soon. Anyway I followed your (GauGau) instructions. However I don't have a PHP-editor. I thought I couls just open the file with wordpad and edit it like that. I guess that doesn't work. I went to the PHP-homepage to see what I need but that gave me a headache. Really, thanks but is there a more simple option that I could do, like in the css-file or the template.html?

Nibbler

You can edit php files in wordpad.

Tranz

Make sure to save the file as text-only if you use wordpad.

Joachim Müller

you could use notepad.exe to stay out of harms way.

Aman Haas

IT WORKED!!! Thanks guys and girl. Thankfully I'd saved it as text only.

Colliope

I'm going to try and follow GauGau's advice on how to do this tomoorw, but want to make sure first, that after I do so, I, will still be able to change the default sort order via config panel if I decide I want to change it?

C