forum.coppermine-gallery.net

Support => cpg1.6.x Support => cpg1.6 miscellaneous => Topic started by: martheijnens on April 11, 2023, 09:48:41 pm

Title: Presentation of insert date
Post by: martheijnens on April 11, 2023, 09:48:41 pm
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!
Title: Re: Presentation of insert date
Post by: Joe Carver on April 11, 2023, 09:57:12 pm
Quote
Beginning 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
Title: Re: Presentation of insert date
Post by: martheijnens on April 17, 2023, 09:57:18 pm
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!
Title: Re: Presentation of insert date
Post by: ron4mac on April 18, 2023, 12:44:42 am
Great! You might want to replace om with \o\m in your formats.
Title: Re: Presentation of insert date
Post by: martheijnens on April 18, 2023, 12:32:45 pm
I replaced 'om' for '\a\t' as in the english php-version. Slowly I become an IT-specialist. Whooopy!!!