Presentation of insert date Presentation of insert date
 

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

Main Menu

Presentation of insert date

Started by martheijnens, April 11, 2023, 09:48:41 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

martheijnens

Hello expert users  :D

Already for some time I have a problem with insert dates which are presented as "%21 %494 %2022" (see picture). This must be some kind of format error. I expected that upgrading would solve this problem but it is still there. What can I do to get correct presentation of insert dates? I am not an IT-specialist.

Thank you for your advice!

Joe Carver

QuoteBeginning with version 1.6.18 of CPG, custom language files (ones not distributed with CPG) must have changes made to the $lang_date[... strings. Please see one of the distributed language files for how those strings will need to be changed.

Check your custom language files as per this post: https://forum.coppermine-gallery.net/index.php/topic,80524.msg389468.html#msg389468

martheijnens

Thanks, thanks, thanks! It took me a while before I understood your magic message but ... I found dutch.php. I compared the lines with $lang_date in it with the english.php:

dutch.php:
$lang_date['album'] = '%d %B %Y';
$lang_date['lastcom'] = '%d-%m-%y om %H:%M';
$lang_date['lastup'] = '%d %B %Y';
$lang_date['register'] = '%d %B %Y';
$lang_date['lasthit'] = '%d %B %Y om %H:%M ';
$lang_date['comment'] = '%d %B %Y om %H:%M ';
$lang_date['log'] = '%d-%m-%y om %H:%M';
$lang_date['scientific'] = '%Y-%m-%d %H:%M:%S';

english.php:
$lang_date['album'] = 'F d, Y';
$lang_date['lastcom'] = 'm/d/y \a\t H:i';
$lang_date['lastup'] = 'F d, Y';
$lang_date['register'] = 'F d, Y';
$lang_date['lasthit'] = 'F d, Y \a\t h:i A';
$lang_date['comment'] = 'F d, Y \a\t h:i A';
$lang_date['log'] = 'F d, Y \a\t h:i A';
$lang_date['scientific'] = 'Y-m-d H:i:s';

I made the following changes (of course after saving dutch.php as dutchold.php):
- removed the % sign,
- changed B for F,
- changed "F d" for "d F"
- changed "m/d/y" for "d/m/y"
and everything was perfect again!

ron4mac

Great! You might want to replace om with \o\m in your formats.

martheijnens

I replaced 'om' for '\a\t' as in the english php-version. Slowly I become an IT-specialist. Whooopy!!!