Closed (fixed)
Project:
Ubercart Auction
Version:
6.x-1.x-dev
Component:
User interface
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
20 Apr 2009 at 21:04 UTC
Updated:
11 May 2009 at 15:30 UTC
Hi Garrett
I think there's several problems with the way that the auction expiration time is set:
I'd like to hear your thoughts on this!
Comments
Comment #1
Garrett Albright commentedThe expiration time field is passed to PHP's strtotime() function, so it will have the same flaws as that function; namely, an inability to function with non-English words and time formats.
The second bullet point there is particularly disturbing, though. You've convinced me that using a date field or calendar dropdown would probably be better. I'll look into it when I can start doing some serious work on this project again.
Comment #2
rsm08 commentedOMG OMG OMG!!! I can't believe how easy that was!
In uc_auction_form_alter(), just change this:
... to this:
... and see the magic happen! ;)
It requires the Date Popup submodule of the Date module, but most people will have that module installed.
Comment #3
Garrett Albright commentedI don't know about most people. That's a good solution, and probably the one I'll end up going with, but I'd want to also change the .info file so that the Date and Date Popup modules are required.
Comment #4
rsm08 commentedIf you don't want to require the Date module, you can just make an if statement and check for it in the form_alter function, so if they don't have the module, it can revert to the current interface. Your existing submit handling can deal with both formats already anyway.
Comment #5
rsm08 commentedOh, I found out there was one more thing neccesary for the date popup to work when updating an existing node.
Line 131 (or nearby) has to be changed to this, which is the only input format that the date_popup field default value will accept:
Comment #6
Garrett Albright commentedYes, the most recent dev release should reflect that. I'm going to go ahead and mark this as fixed.