Wordpress Themes - WP Forum at BFA

Wordpress Themes - WP Forum at BFA (http://forum.bytesforall.com/index.php)
-   Post-Kicker, -Byline & -Footer (http://forum.bytesforall.com/forumdisplay.php?f=17)
-   -   Date Formats in Post Bylines (http://forum.bytesforall.com/showthread.php?t=35)

bseppa Dec 13, 2008 01:23 PM

Date Formats in Post Bylines
 
String: <strong>%author-linked%</strong> posted on <strong>%date('F jS, Y')%</strong>
Renders: Jeffrey Schwab posted on May 26th, 2008

String: <strong>%author-linked%</strong> posted on <strong>%date('j F Y')%</strong>
Renders: 26 May 2008

All I changed was the date format to that which I use all over the site.

Flynn Dec 13, 2008 02:54 PM

I am getting the same result, looking into it...

Flynn Dec 13, 2008 04:03 PM

Dates starting with a number don't work, others work. The regular expression gets thrown off

If you want to fix it yourself for now, in functions/bfa_postinfo.php line 160

change

PHP Code:

$postinfo preg_replace("/(.*)%date\((.*?)\)%(.*)/i""\\1" .$date"\\3"$postinfo); 

to

PHP Code:

$postinfo preg_replace("/(.*)%date\((.*?)\)%(.*)/i""\${1}" .$date"\${3}"$postinfo); 

Do you have a non-english blog? Can you check if month and day names are being translated (they should)?

bseppa Dec 13, 2008 05:06 PM

That fixed the problem. Thanks!

No, I do not have a non-English blog. Sorry.

RHCdG Mar 21, 2010 05:19 PM

Hi Flynn and others,

I am having the footer set as follows:

%date('j F Y')% | %tags-linked('Tags: ', ', ', ' | ')% Categorie: %categories-linked(', ')% | %comments('Reageren', 'Eén reactie', '% reacties', 'Reacties op dit bericht zijn afgesloten')% %edit(' | ', 'Deze post bewerken', '')%

This renders:
maart 21st, 2010 at 23:58

I would like to have it render:

21 maart 2010 om 23:58

(i.e., no "st" after the date, no comma before the year, and the word "at" replaced by "om")

My site is in Dutch; the month of March is correctly translated into "maart".

Thanks for your help!

Rutger

juggledad Mar 22, 2010 06:16 AM

I just tried exactly what you ahve coded and I get the correct format, this must have something to do with the language translation, try using %date('F j Y')% and see what happens

RHCdG Mar 22, 2010 06:30 AM

Hi Juggledad,

Replacing %date('j F Y')% by %date('F j Y')% does not seem to make any difference. It still renders maart 21st, 2010 at 23:58, including the translated month name. Thanks for any additional suggestions!

juggledad Mar 22, 2010 11:51 AM

Hmmm, I just tried the two and %date('j F Y')% gives me '18 February 2010' - this must have something to do with the language translation since it works fine in english on 3.4.6 - however, I have never tried to look at how the translating works.

Robsi60 Mar 26, 2010 04:13 PM

As I posted in another post. Same problem. German setup 2.9.2 and 3.4.6. I think its the translation, but I'm not fit in php :)


All times are GMT -6. The time now is 01:45 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.