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

0 Members and 1 Guest are viewing this topic.

Aman Haas

  • Coppermine newbie
  • Offline Offline
  • Posts: 4
Thumbnail sort order
« on: February 16, 2006, 12:13:54 pm »

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.
« Last Edit: February 18, 2006, 03:40:50 pm by Nibbler »
Logged

Abbas Ali

  • Administrator
  • Coppermine addict
  • *****
  • Country: in
  • Offline Offline
  • Gender: Male
  • Posts: 2165
  • Spread the PHP Web
    • Ranium Systems
Re: Thumbnail sort order
« Reply #1 on: February 16, 2006, 12:39:47 pm »

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)

Code: [Select]
theme_display_thumbnails($thumb_list, $thumb_count, $album_name, $album, $cat, $page, $total_pages, is_numeric($album), $display_tabs);

with

Code: [Select]
theme_display_thumbnails($thumb_list, $thumb_count, $album_name, $album, $cat, $page, $total_pages, 0, $display_tabs);

HTH
Abbas
Logged
Chief Geek at Ranium Systems

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Thumbnail sort order
« Reply #2 on: February 16, 2006, 07:15:48 pm »

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
Code: [Select]
// 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)
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 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
Code: [Select]
?>
Change this new code to
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 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.
Logged

Aman Haas

  • Coppermine newbie
  • Offline Offline
  • Posts: 4
Re: Thumbnail sort order
« Reply #3 on: February 17, 2006, 08:57:24 pm »

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?
Logged

Nibbler

  • Guest
Re: Thumbnail sort order
« Reply #4 on: February 17, 2006, 09:13:05 pm »

You can edit php files in wordpad.
Logged

Tranz

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Gender: Female
  • Posts: 6149
Re: Thumbnail sort order
« Reply #5 on: February 17, 2006, 10:17:06 pm »

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

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Thumbnail sort order
« Reply #6 on: February 18, 2006, 08:46:50 am »

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

Aman Haas

  • Coppermine newbie
  • Offline Offline
  • Posts: 4
Re: Thumbnail sort order
« Reply #7 on: February 18, 2006, 03:13:01 pm »

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

Colliope

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Gender: Female
  • Posts: 126
Re: Thumbnail sort order
« Reply #8 on: October 26, 2006, 04:54:32 am »

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
Logged
Pages: [1]   Go Up
 

Page created in 0.024 seconds with 19 queries.