Weekly Results delay before showing next week

Post here to discuss topics relate to the 4.x version for the ASP Football Pool software program. All support topics should go here.
Post Reply
sledge4
Posts: 28
Joined: Mon Aug 26, 2013 6:31 pm

Weekly Results delay before showing next week

Post by sledge4 »

Something I find annoying is that on Tuesday mornings, if you go to results, it is already showing Week 2. Not the end of the world, but if everyone is coming on Tuesday morning to see the final results, it should be right there without needing to click back to week 1.

Anyone have an idea on how I can alter the trigger that makes it show the next week?

Thanks!
User avatar
mb323
Posts: 11
Joined: Tue Oct 22, 2013 3:31 pm

Re: Weekly Results delay before showing next week

Post by mb323 »

Just a guess, but this will delay the change of the week by 1 day.

In "includes/common.asp"

In function:

Code: Select all

GetCurrentWeek()
replace:

Code: Select all

dateTime = GetCurrentDateTime()
with:

Code: Select all

dateTime = DateAdd("d", -1, GetCurrentDateTime())
In looking at the use of "GetCurrentWeek" through all of the code, it seems to be only used for the display of the current week.

I have applied it to my own pool as I also find it annoying.

(Edited as I needed to be more specific, we are only changing function GetCurrentWeek().)
Last edited by mb323 on Sun Dec 03, 2017 9:50 am, edited 3 times in total.
User avatar
raider_nation
Posts: 34
Joined: Mon Aug 26, 2013 8:10 pm

Re: Weekly Results delay before showing next week

Post by raider_nation »

Be Careful here Changing this may also change when the picks for the week are locked. I will need to check on that when I get back home in a few days.
User avatar
mb323
Posts: 11
Joined: Tue Oct 22, 2013 3:31 pm

Re: Weekly Results delay before showing next week

Post by mb323 »

raider_nation, very good point, I highly recommending testing to make sure all your picks lock on time.

I updated my earlier post to clarify which dateTime = GetCurrentDateTime() to update as there are two.

This should not impact when picks lock as far as I can tell the lock function uses GetCurrentDateTime directly and does not use GetCurrentWeek.

So you wouldn't want to change GetCurrentDateTime, but change how GetCurrentWeek uses it.
User avatar
Stutgrtguy
Posts: 167
Joined: Sun Oct 20, 2013 3:54 pm
Location: Colorado

Re: Weekly Results delay before showing next week

Post by Stutgrtguy »

Years ago when I began using this program I hated that the all games locked on Sunday when the first game started so I delved into the code to change lock times. I found this line of code and changed it from Sunday to Tuesday

if Weekday(gameDateTime) = vbTuesday and gameDateTime <= dateTime then

That seemed to solve my lock time issues. Then someone with more code knowledge did something different, but since my method worked, I left it. I'm going to try changing that Tuesday to Wednesday this week and see if that doesnt solve that, its also been a long time pet peeve of mine. I should have tested it years ago, but when somethin works I usually leave it alone.

I'll let you know if it works, look forward to other results also.
User avatar
Stutgrtguy
Posts: 167
Joined: Sun Oct 20, 2013 3:54 pm
Location: Colorado

Re: Weekly Results delay before showing next week

Post by Stutgrtguy »

nope, woke Tuesday morning and showin results for week 3, anyone else have any luck?
User avatar
mb323
Posts: 11
Joined: Tue Oct 22, 2013 3:31 pm

Re: Weekly Results delay before showing next week

Post by mb323 »

Update, I have use the above mod I posted for the past 3 weeks with no issues. Games lock on time, everything else functions as expected.
User avatar
Stutgrtguy
Posts: 167
Joined: Sun Oct 20, 2013 3:54 pm
Location: Colorado

Re: Weekly Results delay before showing next week

Post by Stutgrtguy »

I'ma give this a try, wonder how this works with my "tuesday" code...let ya know in a couple days
User avatar
Stutgrtguy
Posts: 167
Joined: Sun Oct 20, 2013 3:54 pm
Location: Colorado

Re: Weekly Results delay before showing next week

Post by Stutgrtguy »

I tried, it didnt work for me, I'm guessin its my Tueday deal. I really don't have the time to rework my page , I'd have to start from scratch and do the colors, lock time etc. Can u zip me your file up and post it please.

This is a much wanted update from all of my users, everyone checks Tuesday morning to see week winner, as its important to tie break rules for overall winner.
I even thought that the tuesday thing may take off of your code and post wednesday, but no go.

If it works for all, you could post that file as a Download.

I'd love to give your file a test drive, as long as it has the colors update, lock time which I would be shocked if it didn't ;)
User avatar
mb323
Posts: 11
Joined: Tue Oct 22, 2013 3:31 pm

Re: Weekly Results delay before showing next week

Post by mb323 »

Here is my common.asp. I have been using this mod since week 2 without any issues.

I'm not sure how many customizations have been put in there, however it does have the colors update. I haven't added the individual game lock time change because that allows someone to change their Monday night game based on the outcome of Sunday and artificially forcing a tie break. i.e. if two people were tied and picked opposite teams for the Sunday night game but the same team for Monday, then the loser from Sunday night's game could switch picks for Monday night's game to try and force a tie break instead of losing. This changes the whole outcome for the week. I also don't show the picks until the games are locked.

Somewhere in my code I added the display for the early games on Sunday in the news, i.e. before 1pm ET. to alert people to the London games.

Use at your own risk. Backup your current common.asp.

Mod is in function "GetCurrentWeek" and old code is commented out. This has the effect of delaying week switch in all screens.
Attachments
common.asp.zip
Common.asp modified to delay week switch until Wednesday.
(8.14 KiB) Downloaded 256 times
Post Reply