Hello, I'm pretty new to this discussion board but I've been playing around with this for the past couple of days, and I must say it is great. Are there any plans on adding Defensive Players instead of Teams to it. I tried adding the positions to the position tables but haven't gotten to the code to see how to add the stats and players to the rosters, thought I'd ask before I dive in!
Thanks
-Rich
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Stephen is the man behind the automated score code. If you decide to take a stab at getting individual players to add up and get it to work, please forward your code on to us. We'd love to add it to the project.
Brad
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Ok, so I've added the Defensive Players to the Team Roster page:
Just add this sql
insert into control
values('CONFIG_MAX_START_DB','3','Maximum allowed starting DBs',null,'0','0')
do this for both DLs and Ds since most defensive player league use 3 DBs,3 Ds (any defensive player) and 3 DLs (only DTs and DE)
From here I added the positions (DB,D,DL) to the positions table.
insert into positions
values('9','DB','Defensive Backs')
Do this for each positon just make sure to change the value in the first field
From here I modified the players.php script to download all the players, this I'm still working on since on the nfl.com site, they list the player positions like this DT, DE,OLB,MLB,ILB,NT,DB,SS,CB,FS
So I was thinking about making a file that was ran after the import to change the DT,NT,DE to DL and change the FS,CB, and SS to DB. The D will be like the Flex postion so still working on that too, I'll keep a post for any updates. If you have any comments please let me know.
Thanks
-Rich
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
------------------------------------------------
insert into control
values('CONFIG_MAX_START_DB','3','Maximum allowed starting DBs',null,'0','0')
---------------------------------------------
need to add this too:
insert into control
values('CONFIG_MAX_TOTAL_DB','3','Maximum allowed starting DBs',null,'0','0')
Thanks
-Rich
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I also found a little bug when doing this - If you set the defensive team config settings
CONFIG_MAX_TOTAL_DEF
and
CONFIG_MAX_START_DEF
to zero and then try to remove and defensive teams that may be on your team, you'll get a violation error, you'll have to remove them from the table or add back the values and drop them first.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Also, on the players.php script, this is what I changed to download all the players:
locate this line in the script
---------------------------------------------
foreach($player as $plyr)
{
// if (($plyr[2] == "QB") || ($plyr[2] == "RB") || ($plyr[2] == "WR") || ($plyr[2] == "TE") || ($plyr[2] == "K"))
--------------------------------------------
change it to this
--------------------------------------------
foreach($player as $plyr)
{
// if (($plyr[2] == "QB") || ($plyr[2] == "RB") || ($plyr[2] == "WR") || ($plyr[2] == "TE") || ($plyr[2] == "K")|| ($plyr[2] == "DT") || ($plyr[2] == "DE" || ($plyr[2] == "NT" || ($plyr[2] == "OLB" || ($plyr[2] == "MLB" || ($plyr[2] == "LB" || ($plyr[2] == "ILB" || ($plyr[2] == "CB" || ($plyr[2] == "DB" || ($plyr[2] == "SS" || ($plyr[2] == "FS"))
-------------------------------------------
If you do it this way you'll need to add each of these positions in the POSITIONS table then run some sql to change each to the positon you'd like to display. Trying to figure out a better way to do this, if you have any ideas let me know.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Ok, so I have all the code all ready and everything works great except the Free Agent page. There are over 2000 records in the players table and it takes forever, and most of the time it never comes up. Got any ideas on how to make this run faster? Maybe select what position you are looking for first and then it pulls up everything (move the positions table to a pre-screen and select that there and then just those positions pull up? Any help would be greatly appreciated.
Thanks
-Rich
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
When the Free Agent page does fully load, do all of the defensive players appear in the table? Have you tinkered with the code for the "rosters.php" page at all?
Brad
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Yes the defensive players do show up, and I've played around, even change the sql statement since left joins are horrible in queries but I think it's due to the .css file that build the table in some ways, not sure. It has to be due how it it placing the data into each sub table on that page, just haven't figured out how it is doing that yet. Any help would be appreciated. Also, has the free agent page always taken around 30 second to load up, maybe it's my configuration with this, cause even with the base player set (QB, RB,WR,TE,K) it took anywhere from 10 sec to a minute to load. That could be the issue too, anyone else haveing this problem?
Thanks
-Rich
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Are you running OFFL 0.2.2? My free agent page loads in less than 5 seconds (seems reasonable for a near complete database dump)... How fast is your machine? I'm running it on a G4 iMac at 800 Mhz.
I'm guessing that if I added the code in to add the defensive players, it will probably take my setup closer to 10 seconds to load the page too...
If you have any ideas on how to clean up the left joins, please give it a shot. I'd love to see the free agent page load faster too, if its possible.
Brad
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hello, I'm pretty new to this discussion board but I've been playing around with this for the past couple of days, and I must say it is great. Are there any plans on adding Defensive Players instead of Teams to it. I tried adding the positions to the position tables but haven't gotten to the code to see how to add the stats and players to the rosters, thought I'd ask before I dive in!
Thanks
-Rich
Rich,
Stephen is the man behind the automated score code. If you decide to take a stab at getting individual players to add up and get it to work, please forward your code on to us. We'd love to add it to the project.
Brad
Ok, so I've added the Defensive Players to the Team Roster page:
Just add this sql
insert into control
values('CONFIG_MAX_START_DB','3','Maximum allowed starting DBs',null,'0','0')
do this for both DLs and Ds since most defensive player league use 3 DBs,3 Ds (any defensive player) and 3 DLs (only DTs and DE)
From here I added the positions (DB,D,DL) to the positions table.
insert into positions
values('9','DB','Defensive Backs')
Do this for each positon just make sure to change the value in the first field
From here I modified the players.php script to download all the players, this I'm still working on since on the nfl.com site, they list the player positions like this DT, DE,OLB,MLB,ILB,NT,DB,SS,CB,FS
So I was thinking about making a file that was ran after the import to change the DT,NT,DE to DL and change the FS,CB, and SS to DB. The D will be like the Flex postion so still working on that too, I'll keep a post for any updates. If you have any comments please let me know.
Thanks
-Rich
Sorry forgot to add this after this line
------------------------------------------------
insert into control
values('CONFIG_MAX_START_DB','3','Maximum allowed starting DBs',null,'0','0')
---------------------------------------------
need to add this too:
insert into control
values('CONFIG_MAX_TOTAL_DB','3','Maximum allowed starting DBs',null,'0','0')
Thanks
-Rich
I also found a little bug when doing this - If you set the defensive team config settings
CONFIG_MAX_TOTAL_DEF
and
CONFIG_MAX_START_DEF
to zero and then try to remove and defensive teams that may be on your team, you'll get a violation error, you'll have to remove them from the table or add back the values and drop them first.
Also, on the players.php script, this is what I changed to download all the players:
locate this line in the script
---------------------------------------------
foreach($player as $plyr)
{
// if (($plyr[2] == "QB") || ($plyr[2] == "RB") || ($plyr[2] == "WR") || ($plyr[2] == "TE") || ($plyr[2] == "K"))
--------------------------------------------
change it to this
--------------------------------------------
foreach($player as $plyr)
{
// if (($plyr[2] == "QB") || ($plyr[2] == "RB") || ($plyr[2] == "WR") || ($plyr[2] == "TE") || ($plyr[2] == "K")|| ($plyr[2] == "DT") || ($plyr[2] == "DE" || ($plyr[2] == "NT" || ($plyr[2] == "OLB" || ($plyr[2] == "MLB" || ($plyr[2] == "LB" || ($plyr[2] == "ILB" || ($plyr[2] == "CB" || ($plyr[2] == "DB" || ($plyr[2] == "SS" || ($plyr[2] == "FS"))
-------------------------------------------
If you do it this way you'll need to add each of these positions in the POSITIONS table then run some sql to change each to the positon you'd like to display. Trying to figure out a better way to do this, if you have any ideas let me know.
Ok, so I have all the code all ready and everything works great except the Free Agent page. There are over 2000 records in the players table and it takes forever, and most of the time it never comes up. Got any ideas on how to make this run faster? Maybe select what position you are looking for first and then it pulls up everything (move the positions table to a pre-screen and select that there and then just those positions pull up? Any help would be greatly appreciated.
Thanks
-Rich
Rich,
When the Free Agent page does fully load, do all of the defensive players appear in the table? Have you tinkered with the code for the "rosters.php" page at all?
Brad
Brad,
Yes the defensive players do show up, and I've played around, even change the sql statement since left joins are horrible in queries but I think it's due to the .css file that build the table in some ways, not sure. It has to be due how it it placing the data into each sub table on that page, just haven't figured out how it is doing that yet. Any help would be appreciated. Also, has the free agent page always taken around 30 second to load up, maybe it's my configuration with this, cause even with the base player set (QB, RB,WR,TE,K) it took anywhere from 10 sec to a minute to load. That could be the issue too, anyone else haveing this problem?
Thanks
-Rich
Rich,
Are you running OFFL 0.2.2? My free agent page loads in less than 5 seconds (seems reasonable for a near complete database dump)... How fast is your machine? I'm running it on a G4 iMac at 800 Mhz.
I'm guessing that if I added the code in to add the defensive players, it will probably take my setup closer to 10 seconds to load the page too...
If you have any ideas on how to clean up the left joins, please give it a shot. I'd love to see the free agent page load faster too, if its possible.
Brad