How do you remove the 'time & date stamp' on the thumb gallery please? How do you remove the 'time & date stamp' on the thumb gallery please?
 

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

How do you remove the 'time & date stamp' on the thumb gallery please?

Started by The Squirreldirector, September 20, 2014, 11:09:58 AM

Previous topic - Next topic

0 Members and 2 Guests are viewing this topic.

The Squirreldirector

Sorry if this is posted in the wrong cat ...but I have know idea where that would be....

I have the latest version .... and i need to remove the date and time stamp under the thumbs.
I have tried altering the code on include/functions.php
from:
if ($set_caption) {
            build_caption($rowset, array('ctime'));
        }

        $rowset = CPGPluginAPI::filter('thumb_caption_lastup', $rowset);

to:


if ($set_caption) {
            build_caption($rowset);
        }

        $rowset = CPGPluginAPI::filter('thumb_caption_lastup', $rowset);

This does not work  :-\

ron4mac

You should approach making this type of change at the theme level. What theme are you using? It would probably just need you to locate the spot in the theme files where the tumbnails are generated and comment out the stuff that you don't want.

The Squirreldirector

Hey thanks  8) I'll have a poke around in the theme ..good call  :)

The Squirreldirector


ron4mac

Quote from: The Squirreldirector on September 21, 2014, 07:32:45 AM
The theme I am using on one gallery is 'Rainy Day '

Hmmm... Then you must be using some plugin that is putting the date and time stamp under the thumbs as the 'Rainy Day' theme is not doing it.

You aren't talking about the 'Date added' line that you get when you hover over a thumbnail, are you?

The Squirreldirector

It's on all the themes (I have several sites with different themes) I can't find anything on any of the theme.html templates or on any other files. I am convinced that it's hidden deep in the bowels of the include/functions.inc script [still I could be wrong]  ::)

See attachment for .jpg of gallery with sill dates in the red circles ...by the way thanks for looking at this  ;)

ron4mac

Quote from: The Squirreldirector on September 21, 2014, 10:39:35 AM
See attachment for .jpg of gallery with sill dates in the red circles

Testament to the adage that a picture is worth a thousand words. I thought you were talking about a date AND time display under the  thumbnail for an individual image. Now I see that you are referring to the date that is displayed for an album overview. I'll see what I can come up with.

ron4mac

You can add an override to your theme.

Copy this from include/themes.inc.php (at about line 4398):
// Format information which is displayed next to each album
function theme_album_info($pic_count, $link_pic_count, $last_upload_date)
{
    global $CONFIG, $lang_list_albums;

    if ($CONFIG['link_last_upload']) {
        $album_info = sprintf($lang_list_albums['n_pictures'], $pic_count) . (($CONFIG['link_pic_count'] && $link_pic_count > 0 ) ? sprintf(", {$lang_list_albums['n_link_pictures']}, {$lang_list_albums['total_pictures']}", $link_pic_count, $pic_count + $link_pic_count) : "") . (($pic_count || ($CONFIG['link_pic_count'] && $link_pic_count > 0 )) ? sprintf($lang_list_albums['last_added'], $last_upload_date) : "");
    } else {
        $album_info = sprintf($lang_list_albums['n_pictures'], $pic_count) . ($pic_count ? sprintf($lang_list_albums['last_added'], $last_upload_date) : "") . (($CONFIG['link_pic_count'] && $link_pic_count > 0) ? sprintf(", {$lang_list_albums['n_link_pictures']}, {$lang_list_albums['total_pictures']}", $link_pic_count, $pic_count + $link_pic_count) : "");
    }

    return $album_info;
}


... and place it in the theme.php file in your theme.  Then modify the function there to suit your needs.

The Squirreldirector

Wow ...thanks for that I will give it a whirl  8)...let you know how it performs ...Thanks again.

ΑndrĂ©

Quote from: The Squirreldirector on September 20, 2014, 11:09:58 AM
I have the latest version

No, you haven't:
Quote<!--Coppermine Photo Gallery 1.5.22 (stable)-->

You should really upgrade your gallery to the latest stable release (currently cpg1.5.30).

The Squirreldirector

I have 42 sites and the gallery I am trying to fix has the latest version some of the others like the one in the pic are older ...but the updates make no difference to the problem. :o

ron4mac

Quote from: The Squirreldirector on September 22, 2014, 12:54:20 PM
I have 42 sites and the gallery I am trying to fix has the latest version some of the others like the one in the pic are older ...but the updates make no difference to the problem.

The theme modification that I laid out for you will only be effective if your sites are up to date (to at least 1.5.28).