xoops forums

Anonymous

Posted on: 2009/3/27 9:13
Anonymous
Anonymous (Show more)
Posts: 0
Since:
#11

Re: Profile module date bug, request fix

Good find, chaps

Has this been submitted/commited to SVN?

zorro87

Just popping in
Posted on: 2009/3/27 9:44
zorro87
zorro87 (Show more)
Just popping in
Posts: 92
Since: 2006/9/29
#12

Re: Profile module date bug, request fix

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

trabis

Core Developer
Posted on: 2009/3/27 13:55
trabis
trabis (Show more)
Core Developer
Posts: 2268
Since: 2006/9/1 1
#13

Re: Profile module date bug, request fix

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!

trabis

Core Developer
Posted on: 2009/3/27 14:01
trabis
trabis (Show more)
Core Developer
Posts: 2268
Since: 2006/9/1 1
#14

Re: Profile module date bug, request fix

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.

Anonymous

Posted on: 2009/3/27 14:45
Anonymous
Anonymous (Show more)
Posts: 0
Since:
#15

Re: Profile module date bug, request fix

Thanks trabis

zorro87

Just popping in
Posted on: 2009/3/30 7:21
zorro87
zorro87 (Show more)
Just popping in
Posts: 92
Since: 2006/9/29
#16

Re: Profile module date bug, request fix

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

Monika

Not too shy to talk
Posted on: 2009/3/30 8:00
Monika
Monika (Show more)
Not too shy to talk
Posts: 103
Since: 2008/12/19
#17

Re: Profile module date bug, request fix

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

ghia

Community Support Member
Posted on: 2009/3/30 8:20
ghia
ghia (Show more)
Community Support Member
Posts: 4954
Since: 2008/7/3 1
#18

Re: Profile module date bug, request fix

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.

zorro87

Just popping in
Posted on: 2009/3/31 9:08
zorro87
zorro87 (Show more)
Just popping in
Posts: 92
Since: 2006/9/29
#19

Re: Profile module date bug, request fix

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

Mamba

Moderator
Posted on: 2009/3/31 12:27
Mamba
Mamba (Show more)
Moderator
Posts: 10990
Since: 2004/4/23
#20

Re: Profile module date bug, request fix

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