11
Catzwolf
Re: Date selection form
  • 2009/3/4 7:50

  • Catzwolf

  • Home away from home

  • Posts: 1392

  • Since: 2007/9/30


Yep, but this is a total hack and nothing more. Temp fix k?

Open xoopsRoot/include/functions.php

and look for this function:
function formatTimestamp($time$format 'l'$timeoffset '')
{
    
xoops_load('XoopsLocal');
    return 
XoopsLocal::formatTimestamp($time$format$timeoffset);
}


and change it to the following:
function formatTimestamp($time$format 'l'$timeoffset '')
{
    
xoops_load('XoopsLocal');
    
$format 'date format you wish to use';
    return 
XoopsLocal::formatTimestamp($time$format$timeoffset);
}


This will basically over ride all modules that use this function.

Now for all modules that misbehave, just look for the date() function and replace it with the one above.

example:

date$time );


To:

formatTimestamp$time );


Some actually might use their own formatTimestamp function, so it migh be good to look for a variant of this.

Hope this helps.

Catz

12
Anonymous
Re: Date selection form
  • 2009/3/4 9:11

  • Anonymous

  • Posts: 0

  • Since:


Quote:
Speed wrote:

But CBB refuses to cooperate. Any suggestions for a short term fix?


Permanentt fix in this thread:
https://xoops.org/modules/newbb/viewtopic.php?viewmode=flat&type=&topic_id=66922&forum=28


13
Speed
Re: Date selection form
  • 2009/3/4 19:22

  • Speed

  • Quite a regular

  • Posts: 310

  • Since: 2004/5/18


Thanks John. I added my discoveries to the thread you referred to. It's just amazing how many different places all have similar configuration options. It is the strength and Achille's heel of XOOPS that it has such a long history.

It would be nice to remove date code definitions from XOOPS_ROOT/modules/newbb/language/english/main.php if that has been deprecated and moved to another file. It would be VERY nice to have a pointer to the new file. I am using CBB 4.0 and understand that it is beta code so this is probably on the to-do list someplace.
...

14
Catzwolf
Re: Date selection form
  • 2009/3/4 19:35

  • Catzwolf

  • Home away from home

  • Posts: 1392

  • Since: 2007/9/30


From what I have seen in 2.3.3 code, this issue has more or less been addressed. It basically takes time and currency and converts it to the language base (ie English, German or Taiwan for example ).

I for example would like language go a little further. For example, there are many different types of English (And I know that other languages have their own variants ) and it's about time that XOOPS reflected this.

15
trabis
Re: Date selection form
  • 2009/3/4 19:43

  • trabis

  • Core Developer

  • Posts: 2269

  • Since: 2006/9/1 1


Javascript does not accept every datetime format, there are some rules there, please check it. The date select box does not work for me, it shows me "Y/n/j" :(

d|dd|m|mm|y|yy|MM|M|DD|D|w|ww

are the only options.
How can we solve this?

16
Catzwolf
Re: Date selection form
  • 2009/3/4 20:28

  • Catzwolf

  • Home away from home

  • Posts: 1392

  • Since: 2007/9/30


Since when did XOOPS start using javascript for date functions? So I'm not exactly sure how this applies?

17
trabis
Re: Date selection form
  • 2009/3/4 20:31

  • trabis

  • Core Developer

  • Posts: 2269

  • Since: 2006/9/1 1


Quote:

catzwolf_ wrote:
Since when did XOOPS start using javascript for date functions? So I'm not exactly sure how this applies?


include/calendar.js



ps: XOOPS 2.0.13.2 also use javascript for this form, I did not check other versions.

18
Catzwolf
Re: Date selection form
  • 2009/3/4 20:57

  • Catzwolf

  • Home away from home

  • Posts: 1392

  • Since: 2007/9/30


oh grrrr, yeah totally forgot about that lol

19
Anonymous
Re: Date selection form
  • 2009/3/4 21:06

  • Anonymous

  • Posts: 0

  • Since:


Inconsistent date formats are always spotted by my site's users and a PITA when updating modules, etc. I'd only updated from 2.0.18.2 to 2.3.0 for 5 mins before I got an email about the date format in CBB.

How good it would be if there was just one place to set the format, ideally within the core

20
Catzwolf
Re: Date selection form
  • 2009/3/4 21:32

  • Catzwolf

  • Home away from home

  • Posts: 1392

  • Since: 2007/9/30


There is a method proved within the core to do this, it has been there for as long as I can remember. But DJ needed to have a modified version to display the today, yesterday etc and that is the reason for the many different area's. In reality, the functionally for CBB in now in the core, really this should be changed in CBB to use the core.

Login

Who's Online

351 user(s) are online (280 user(s) are browsing Support Forums)


Members: 0


Guests: 351


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Nov 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits