11
Anonymous
Re: Profile module date bug, request fix
  • 2009/3/27 9:13

  • Anonymous

  • Posts: 0

  • Since:


Good find, chaps

Has this been submitted/commited to SVN?

12
zorro87
Re: Profile module date bug, request fix
  • 2009/3/27 9:44

  • zorro87

  • Just popping in

  • Posts: 92

  • Since: 2006/9/29


Hello again!

The date is saved (UNIX format)
Quote:

I made it required in registration form.


The default date is saved even if you don’t choose a date.
And no way to chose 0 as default date.

Do you have any idea how a date could be required?

@+
Z

13
trabis
Re: Profile module date bug, request fix
  • 2009/3/27 13:55

  • trabis

  • Core Developer

  • Posts: 2269

  • Since: 2006/9/1 1


Quote:

JAVesey wrote:
Good find, chaps

Has this been submitted/commited to SVN?


Mamba give power over track manager so this was my first bug fix in SVN!

14
trabis
Re: Profile module date bug, request fix
  • 2009/3/27 14:01

  • trabis

  • Core Developer

  • Posts: 2269

  • Since: 2006/9/1 1


Quote:

zorro87 wrote:
Hello again!

The date is saved (UNIX format)
Quote:

I made it required in registration form.


The default date is saved even if you don’t choose a date.
And no way to chose 0 as default date.

Do you have any idea how a date could be required?

@+
Z


I understand the problem, there should be check to see if date was changed or not, maybe in JS validation code.

15
Anonymous
Re: Profile module date bug, request fix
  • 2009/3/27 14:45

  • Anonymous

  • Posts: 0

  • Since:


Thanks trabis

16
zorro87
Re: Profile module date bug, request fix
  • 2009/3/30 7:21

  • zorro87

  • Just popping in

  • Posts: 92

  • Since: 2006/9/29


Hi trabis!

Quote:

I understand the problem, there should be check to see if date was changed or not, maybe in JS validation code.


First problem: in “Edit Field” Default date is required
Maybe an option “no default date” could help to make it mandatory to enter a date?

Second problem: Why date are saved as INT(10)?

If the dates fields were in DATE format (YYYY-MM-DD)
It could be possible to know if a date has been set (test if a date is different of zero)
=>It could be easier to have no default date and oblige users to choose a date
It could be easier to find a date with MySQL (no conversion required)

What do you thing about that?

@+
Z


17
Monika
Re: Profile module date bug, request fix
  • 2009/3/30 8:00

  • Monika

  • Not too shy to talk

  • Posts: 103

  • Since: 2008/12/19


Hi I prefer a dropdown selection date. That calendar type is Not handy to use.

I myself find it complicated, how about ordinary users?!

Thank you

18
ghia
Re: Profile module date bug, request fix
  • 2009/3/30 8:20

  • ghia

  • Community Support Member

  • Posts: 4953

  • Since: 2008/7/3 1


Quote:
First problem: in “Edit Field” Default date is required
Maybe an option “no default date” could help to make it mandatory to enter a date?
Yes, I think this is needed for a check of a mandatory field. Ugly will be in this case that the date proposed is 1970.
But this can maybe circumvented by showing the field empty in this case and the calendar after popup shows today.
Quote:
Why date are saved as INT(10)?
It is stored as seconds past a date and contains thus a date and time. Futhermore it is very efficient for searching and sorting and calculating periods.
Storing it in ascii will severely degrade this. Has to stay!
Quote:
Hi I prefer a dropdown selection date.
The calendar is the most flexible and very often used through the internet. The dropdown generate long lists and is mostly used where only limited selections apply eg credit card validation.
Because you can select independent the day and month, illegal combinations as 31 february can be formed, which complicate verification. If you would use a dropdown, there need also to be specified a starting and ending year in some (system wide) preferences.
Maybe easier for users, but complicater to program.

19
zorro87
Re: Profile module date bug, request fix
  • 2009/3/31 9:08

  • zorro87

  • Just popping in

  • Posts: 92

  • Since: 2006/9/29


Quote:

ghia wrote:
Quote:
Why date are saved as INT(10)?
It is stored as seconds past a date and contains thus a date and time. Futhermore it is very efficient for searching and sorting and calculating periods.
Storing it in ascii will severely degrade this. Has to stay!

@ghia: Thank you for these precisions! I understand your point of view.
But in phpmyadmin it is not easy to know what date is -236307600 for example…

In “Find Users” (profile/search.php) filter “Is earlier than” doesn’t work…


Quote:

Monika wrote:
Hi I prefer a dropdown selection date.


@Monika: You can do it!

Just add 3 fields (field Type: select)
Profile_date_dd (add 31 selections 1 to 31)
profile_date_mm (add 12 selections 1 to 12)
profile_date_yyyy (add a period list)


Nota: In “Find Users” (profile/search.php)
There is a little bug:
If value is set as NUM, (value as integer)

The selection is OK but column is empty (does not show the content of the field)


@+
Z

20
Mamba
Re: Profile module date bug, request fix
  • 2009/3/31 12:27

  • Mamba

  • Moderator

  • Posts: 11366

  • Since: 2004/4/23


Quote:
But in phpmyadmin it is not easy to know what date is -236307600 for example…

This tool might help:
http://www.onlineconversion.com/unix_time.htm
Support XOOPS => DONATE
Use 2.5.10 | Docs | Modules | Bugs

Login

Who's Online

220 user(s) are online (155 user(s) are browsing Support Forums)


Members: 0


Guests: 220


more...

Donat-O-Meter

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

Latest GitHub Commits