PHPFootball Forum Forum Index Log in to check your private messages Register Log in FAQ Search Memberlist Usergroups
Show Picks of other users question
Goto page Previous  1, 2
 
Post new topic   Reply to topic    PHPFootball Forum Forum Index -> Version 2.0 Feautre Request
View previous topic :: View next topic  
Author Message
ghgarcia
Site Admin


Joined: 27 Jul 2005
Posts: 695

PostPosted: Tue Aug 28, 2007 1:07 am    Post subject: Reply with quote

sledge4 wrote:
Hi Randy,

I have the same questions on going with George, hopefully either he or I will have a solution before the season starts.

Will

Ok try the following in football.class.php add the follwoing line in the variables section around line 83
Code:
// Lock games starting on
var $gameDayLock = ""; // values are Sun,Mon,Tue,Wed,Thu,Fri,Sat


Then in the function ckAlllocked($week) make it look like the following:

Code:
function ckAlllocked($week)
    {
    $sql="select * from ".$this->prefix."schedule where week = ".$week."";
        $rs = $this->dbQuery($sql);
    $date = date("m/d/Y");
    $time = date("H:i:s A");
    $day = date("D"); // get day ow week Sun - Sat
    $ts = $this->doDate($date,$time,$this->display_offset+$this->cutoff);

    $gamecount = $this->NumberOfGames($week);
    $lockcount = 0;
    $alllocked="";
    while($row=mysql_fetch_array($rs))
                {
         $gameday = date("D",$row['gametime']); // set current game day
       if ($row['gametime'] <= $ts)
                        {
                $lockcount = $lockcount + 1;
            }
        }
//       if ($gamecount == $lockcount)
         if ($lockcount >0 && $gameday == $this->gameDayLock)  // use to lock all games after start of first game ow week
         {
          $alllocked=true;
          }
       return $alllocked;
       }


If you set the value in gameDayLock to 'Sun' than it should lock the games after the first game on sunday starts.

Let me know if this works

G
Back to top
View user's profile Send private message Send e-mail
sledge4



Joined: 27 Jul 2007
Posts: 89

PostPosted: Fri Aug 31, 2007 10:43 am    Post subject: Reply with quote

Upon testing, this appears to not be working. I added the code and while it allows me to change, it doesn't appear to be reacting to the day. As I put in "Thu" and it still lets me change picks.

Will
Back to top
View user's profile Send private message
sledge4



Joined: 27 Jul 2007
Posts: 89

PostPosted: Sat Sep 01, 2007 9:35 pm    Post subject: Reply with quote

Any update on this? Do you need me to do more testing?

Thanks,
Will
Back to top
View user's profile Send private message
imaginet



Joined: 25 Aug 2007
Posts: 6

PostPosted: Sun Sep 30, 2007 2:57 pm    Post subject: Reply with quote

I have implemented these changes and they work except the entry form is still not locked out. Any help would be great.
Back to top
View user's profile Send private message
ghgarcia
Site Admin


Joined: 27 Jul 2005
Posts: 695

PostPosted: Sun Sep 30, 2007 4:39 pm    Post subject: Reply with quote

Pick day to lock games. The attached football.class.php contains a mod that may work I've tested it the best way that I can. The changes are as follows:

the variable gameDayLock if set to a null will let the system default to locking games when they start giving the user max. flexibility. If set to a value of 1 - 7 i.e. 7 being Sunday and Saturday being 6 than the game should lock on that day after the first game starts.

The function ckAlllocked() has been modified to support the above. If you use this modification it may require a change to picks.php to be more complete.

This modification is not supported and is only included because it can be bypassed. I suggest that all you coders out there please test and post any and all corrections as you find them.

Remember PHPFootball was designed to support as much flexibility as possible with the users.

Thanks,
G
Back to top
View user's profile Send private message Send e-mail
gangeli



Joined: 07 Aug 2005
Posts: 71

PostPosted: Wed Sep 03, 2008 3:09 pm    Post subject: Reply with quote

did anything ever come of this?

i have mine setup currently to lock everything before the first game starts, so people can print out everyone's picks to follow along.

which isn't normally a problem, cept when there are thurs games, and people start bitching
about having to make their sunday picks so early
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    PHPFootball Forum Forum Index -> Version 2.0 Feautre Request All times are GMT - 5 Hours
Goto page Previous  1, 2
Page 2 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum


Powered by phpBB © 2001, 2002 phpBB Grou p

design by boo ©eZ-Life.net  A designer community