The eAuction Support Forums
https://www.everyscript.de/cgi-bin/yabb/YaBB.pl eAuction 1.6.1.x >> Discussion of Functions >> Default Ending Date https://www.everyscript.de/cgi-bin/yabb/YaBB.pl?num=1135999659 Message started by annetappe on 12/31/05 at 04:27:38 |
Title: Default Ending Date Post by annetappe on 12/31/05 at 04:27:38 I have an application where only the Admin will be entering auction items and they will all close at a certain future Day/Time. Could someone point me to the section of the code where I could set the 'default date ie April 15, 2006' and not have to enter it each time I enter an auction item? Thank you. |
Title: Re: Default Ending Date Post by Dieter Werner on 01/02/06 at 20:44:42 Check out the code of 'sub proc_test' I'm sure you will find some lines of inspiration. 8-) |
Title: Re: Default Ending Date Post by annetappe on 01/02/06 at 22:20:03 Thanks - I will do this. As you can tell I do not know Perl but have learned enough to be dangerous and I DO appreciate being 'pointed' to area instead of just answers to questions or solutions up front. I feel you will be available if I really get stumped. Thanks. |
Title: Re: Default Ending Date Post by annetappe on 01/03/06 at 04:12:26 I studied hard the section you referred me to along with how you were converting from days to Month/Day but I still can not see how to (without disrupting the original code much) simply just be able to enter a Default Future Closing Date by Month/Day instead of Days Only. Maybe if I explained the purpose again it would help..... [] I would like to have an Auction Event once or twice a year (as a fund raiser for non-profit school) and be able to enter the items and have them ALL end on a certain future date and time. I can do this now with your features but I would have to enter the 'number of days' which will be different each day I enter a new auction item. [] I was hoping there would be some simple way to just manually set the 'certain future closing date as [Month/Day/Year?] & closing time as [hh/mm/ss]' as variables within the config file and the remainder of the script would run as normal. It is probably in front of my eyes and I am not seeing it. Any help would be appreciated. Maybe I am the only one seeing how to use your script in this manner and not worth the time. |
Title: Re: Default Ending Date Post by Dieter Werner on 01/03/06 at 13:50:56 Search eAuction.pl for 'sub proc_new' Search 'sub proc_new' for Code:
Replace the found function with Code:
The code will set the constant close_time: 14/02/2006 22:00:00 I hope it helps ... :) |
Title: Re: Default Ending Date Post by annetappe on 01/03/06 at 15:43:55 Thank you again. I will try this evening. |
Title: Re: Default Ending Date Post by Dieter Werner on 01/03/06 at 17:13:32 annetappe wrote:
Feel free to come back to the topic if you should run in any trouble. |
Title: Re: Default Ending Date Post by annetappe on 01/03/06 at 21:18:25 Executed ok but small error: [Modified section]==========begin=== 2/10/06, 17:00:00 #modfied below per DW to allow default close date and time #$close_time = get_the_time( # $form{'DAYS'}, # $form{'HOUR'}, # $form{'MIN'}, # $form{'SEC'} #); # Servertime use Time::Local; my $month = 2; my $mday = 10; my $year = 2006; my $hour = 17; my $min = 0; my $sec = 0; $close_time = timelocal($sec, $min, $hour, $mday, ($month - 1), $year); #modified above per DW to allow default close date and time [Modified section]==========end=== *When I posted New Item I did not enter anything at start/close date. When posted, the 'closing time' is 16:00, not 17:00. *No problem to 'adjust' closing time in script if that would be simple solution. *I modified the maximum days that I could pre-post to 60 days per your previous posts and it was showing prior to this Mod but now is zero after Mod. I had set you up a login that I will send PM if you would like to try posted new item. You can not hurt anything on this site so feel free to try it. |
Title: Re: Default Ending Date Post by Dieter Werner on 01/04/06 at 10:02:47 In order to adjust the time ... change this Code:
into this Code:
|
Title: Re: Default Ending Date Post by annetappe on 01/04/06 at 16:11:01 Modified - works perfect. Thanks |
The eAuction Support Forums » Powered by YaBB 2.2! YaBB © 2000-2007. All Rights Reserved. |