mattheworres / hootdraft Goto Github PK
View Code? Open in Web Editor NEWWeb based fantasy sports draft app
Home Page: https://hootdraft.com
License: GNU General Public License v3.0
Web based fantasy sports draft app
Home Page: https://hootdraft.com
License: GNU General Public License v3.0
Getting the requisite software installed can be a hassle and also muck up one's local machine. Using software like Vagrant can make this way easier.
Setup and share a Vagrant box that other contributors can use to more easily contribute to the project.
Currently, you can drag and drop positions that don't match the depth chart descriptions. It would be nice to define and enforce positions on these charts. The match could be either one to one or one to many, such as the FLEX position(s) that exist in most fantasy sports.
I had to sudo apt-get install -yq zip unzip
once I ssh'd in since they weren't part of the vagrant install.
Drafts that have finished do not have stats generated, and attempting to do so manually through the Admin interface results in 500 Server errors.
Hello Matthew,
Planning on doing some drafts this weekend, and the new web app is really stunning - great work! Just one issue, when using the extended NFL rosters and trying to enter picks, the auto search feature is not working for me - any way you could correct that? Thanks again and have a great weekend!
Using a library such as Rachet it might be possible to clean up the implementation of the live draft polling (every 3 seconds) to use a more efficient and clean socket-based connection (ie the server initiates updates when the commissioner makes a change, or a user updates a depth chart).
Doesn't look to be filtering by the commissioner selected; Furthermore, if you go to a draft then hit back, it pops up "Cannot load Commissioner".
It would be nice to have a way to export drafts that have been made here. If the functionality already exists, I apologize.
If we're going from SQL data, what I'm looking for is something like this, potentially configurable:
SELECT
p.`first_name`,
m.`manager_name`,
dc.`position`,
p.`player_round` AS DraftRound,
p.`player_pick`AS OverallPick
FROM
`players` p
LEFT JOIN
`managers` m
ON p.`manager_id` = m.`manager_id`
LEFT JOIN
`depth_chart_positions` dc
ON p.`depth_chart_position_id` = dc.`id`
WHERE
p.`draft_id` = (draft that was completed)
Maybe output as plain CSV text or provide the option for JSON output?
Just a thought.
As a commissioner OR manager, I want to be able to see the next N number of players who are ranked by some measure as being "the best".
So, this is far and away the number 1 requested feature for the draft board, and I whole heartedly agree. I've wanted to implement this since I began writing the draft board over 8 years ago.
The issue is that it requires a data source, of which there are few that check all or most of these boxes:
I've had 3 different API sources flat out disappear from underneath me, which was one of my primary reasons for being hesitant to implement a highly valuable, but technically challenging (read: fun too) feature. I'd basically sink a month's worth of free time into something that would be broken in 6 months. Narp.
So, what now? Can we list possible API sources here that PHP Draft would be able to pull from?
Heroku would be a nice platform to install PHPDraft on, since it has a free tier and would likely service the majority of independent installs.
If possible, tie this in to the Deployer deployment system.
I had to create a folder ../../phpdraft_settings for vagrant up
to complete
I am getting routing errors on every POST. Below is an example of the errors I am getting in the debug logs
Issue fixed
In PHP 7.2 they are officially removing mcrypt from the PHP library (it was marked as deprecated in 7.1), so in order to keep the project compatible on the newest versions of PHP, the use of Mcrypt in the Salt Service will need to be migrated to use OpenSSL instead, and a suitable way to convert values generated by Mcrypt to values created by OpenSSL will be needed too.
Hi, I run PHP vendor/bin/dep setup production and go through all the steps.
It executes task PHPdraft:copy files but on the next one it fails with this error code.
✔ Ok
✔ Executing task phpdraft:copyfiles
➤ Executing task phpdraft:replacevalues
sed: can't read s|{phpdraft.dbHost}|localhost|g: No such file or directory
setup [-p|--parallel] [--no-hooks]
PHP version
PHP 7.4.3 (cli) (built: Oct 6 2020 15:47:56) ( NTS )
Copyright (c) The PHP Group
Zend Engine v3.4.0, Copyright (c) Zend Technologies
with Zend OPcache v7.4.3, Copyright (c), by Zend Technologies
Composer version 2.0.8 2020-12-03 17:20:38
Any Help would be appreciated.
OK, I have some feedback on the openshift install instructions.
At the end, I got stuck in a redirect loop instead of success.
This webpage has a redirect loop
ERR_TOO_MANY_REDIRECTS
Notes:
sudo npm install
/js
folder in my install. Did I miss something in the process of converting the files from coffeescript? I'm new to coffeescript.js/config.js
so I tried editing api/config/dev.json
and api/config/dev.json
since they appeared to contain similar information.fonts/
directory. I noticed that it was listed in the .gitignore file.I'm going to delete my openshift instance and try again soon. Let me know if I've missed anything or done anything wrong.
Seems like when users click the link to verify their email address after they sign up is broken. This may have been hidden on phpdraft.com by the fact that the enabled flag wasn't working due to the BIT
column type (should be TINYINT
) -- but all indications are that the API successfully gets both email and verification code which should be enough to verify users, but the /verify
method is returning a 500 error.
This needs updated for the 2016-2017 season.
Should also figure out a nice way to support historical teams - all drafts from 2015 and prior should still have "STL" as a team, and "St. Louis Rams" show up as the team, but drafts from 2016 forward will have "Los Angeles Rams".
Hey. When I follow the link from github, I get a security certificate error.
hootdraft.com uses an invalid security certificate. The certificate is only valid for the following names: phpdraft.com, www.phpdraft.com Error code: SSL_ERROR_BAD_CERT_DOMAIN
When I type in hootdraft.com by myself, I don't get the error. I'm not sure why only one would have the exception.
script fails at this query:
CREATE TABLE IF NOT EXISTS `managers` ( `manager_id` int(11) NOT NULL auto_increment, `draft_id` int(11) NOT NULL default '0', `manager_name` text NOT NULL, `draft_order` tinyint(3) unsigned NOT NULL default '0', PRIMARY KEY (`manager_id`), INDEX `draft_idx` (`draft_id`), FULLTEXT KEY `manager_idx` (`manager_name`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1
Response:
"Error Code: 1214. The used table type doesn't support FULLTEXT indexes"
It would be a nice to have to add in Deployer ( https://deployer.org/ ) support to help automate the build & push of the app.
Where I'd like this to go is to require new installers to install Deployer and possibly a DB tool via Composer, and to use both of those to stand up the database and web servers respectively.
I set up a password for my new draft on hootdraft.com. I opened up a new private tab and tried to access the draft board. It prompted me for the password, but would not accept the correct password.
May be a good WIP start to moving documentation out of READMEs and into Github's wiki. See comments in Gitter chat, the installation instructions should be laid out a little more clearly.
I was able to reproduce this issue on both https://phpdraft.com/ and https://leagify.me/
Steps to reproduce:
More information available here:
zo0o0ot/phpdraft-leagify#2
Im trying to install the 2.3 version but I get the following error in command prompt after navigating to the dir with the index.html file and typing vendor/bin/dep setup
error
'vendor' is not recognized as an internal or external command
thanks for any help
I was able to create my own league and enter players. However, when trying to draft, the "enter pick" button is disabled by angular. Up to this point, I've only edited DraftDataRepository.php
- I was able to follow the convention and add position colors, positions, teams, and add their references to the GetTeams
and GetPositions
methods.
Once I got the correct CSV format, I got all the way up to the point of drafting, but the "Enter Pick" button is disabled.
It looks like the method preventing me from picking is an angular or coffeescript method: ng-disabled="commishPickEditCtrl.formIsInvalid()"
I'll keep looking, but this validation fail surprised me. It looks like I'll have to take a look at that in order to accomplish what I want to do.
hey matt, when trying to deploy i keep getting this:
In HostSelector.php line 59:
Hostname or Stage 'local' was not found
Ive tried both commands
vendor/bin/dep deploy local
and
./vendor/bin/dep deploy local
Any ideas? Thanks
For whatever reason the autofocus directive stopped working again, annoyingly. So you have to manually click the autocomplete box every time.
I'm trying to understand the use case of a draft that isn't done in person. Should I be giving out the commish password to let everyone log in as me at the same time for draft picks, or can users be assigned to teams, and draft only on behalf of that team?
I'm using G Suite to manage my business email. When registering a new manager account the confirmation email never arrived. When using my yahoo email the confirmation did arrive. I've had problems like this with an eblast program I developed for clients and IIRC it was due to gmail DKIM issues.
This is OS independent (I've seen it on both Windows and OSX) and is on the latest version of Chrome. I can confirm it is not an issue with any plugins I have installed either, because a clean copy of Chrome produces the same issue.
The browser won't send the XHR requests to update the depth chart when a player is dragged to a new depth chart position. The request has a status of (failed)
, and the console gets an error message: PUT https://www.phpdraft.com/api/draft/59/pick/5026/depth_chart/37 net::ERR_SPDY_PROTOCOL_ERROR
This issue has been observed to also occur with the latest version of Opera, but not Firefox or Safari.
After having followed the instructions outlined in Manual Installation & Upgrades, I am greeted with the following error message when opening the website in Firefox:
Error: [$injector:modulerr] Failed to instantiate module phpdraft due to:
[$injector:modulerr] Failed to instantiate module phpdraft.env due to:
[$injector:nomod] Module 'phpdraft.env' is not available! You either misspelled the module name or forgot to load it. If registering a module ensure that you specify the dependencies as the second argument.
https://errors.angularjs.org/1.7.5/$injector/modulerr?p0=php…AL%40http%3A%2F%2F192.3.162.10%2Fjs%2Fvendor.js%3A1%3A696%0A vendor.js:2:836
I would appreciate any help in solving this issue, as I'm not familiar with Angular.
A few picks in I noticed a few player missing. Votto and Rizzo were both off of the list. I compiled a list from Steamer with a fairly complete list. If you would like to use it you can snag it from: https://drive.google.com/file/d/0B5QKlck1wmIYcGtlWVFMUnV0bDA/view?usp=sharing
It's kinda messed up though... All players without a team were set to DET and some of the players names got messed up when doing find/replace on the team names.
Version 2.0.3 - user management is broken, no "enabled" flags are being returned and users can't be updated by an administrator with an "email already registered" app-level error being returned (on update).
Along with getting Bamboo builds fully working to completion, the frontend toolchain is going to need an update.
Bower seems to be going by the wayside, and since this rewrite was undertaken, Yarn came out of nowhere and has seemingly won the frontend dependency wars in a tie with NPM. There are tools to migrate Bower packages over to using Yarn, so we should probably do that now, and also handle any outdated packages (Vinyl, for instance, is probably in there somewhere)
Currently, creation of leagues, teams, and positions is done by manually editing the php files. A more user-friendly CRUD-ish way of updating these teams and assigning colors would be nice.
Seems to be any dates formatted with Moment in both the tables and the draft displays.
On the draftboard. This should probably be cut off like how last names are currently.
Also, it would be nice if there was some sort of auto-scrolling overflow frontend library that would automatically, slowly scroll names back and forth if they're longer than their intended space.
We should also alt
and title
tag both first and last names as fallbacks.
As an administrator, I'd like to invite new users to my app instance. Give me a way to simply type an email address, create a new user, and send that user an email with a link to set their password and log in.
Currently the database schema is managed by hand (though is migration-y). When working on 2.0 I originally intended to use the Propel or Doctrine ORMs, but their inclusion with Silex was tricky at best, so I decided to stick with hand SQL for the time being.
Now that I am moving closer to automating builds and testing with continuous integration, it's probably time that I move the project over to something like Phinx ( https://phinx.org/ ). Similar to Rails migrations, this will allow everyone to use a configurable tool to sanely manage databases and versioning for a number of environments.
With the Bamboo server setup, this will also allow me to have push button code deployments to the production instance.
I will provide a "final" hand migration SQL file that will allow folks to safely move existing instances over to Phinx (so that Phinx does not attempt to run the initialization migration and whack a bunch of stuff), as I'll need to do this in production.
I attempted to edit a pick during a draft last night, but because it was the last pick of the round and the draft had started the next round, I couldn't figure out how to edit the pick. This was a serpentine draft, so the next person picking was the same person, but I still couldn't get it to revert back to the previous pick. Perhaps an "admin undo most recent pick" function is in order?
Just wondering if your scraper could make a player list for the NCAA Mens Basketball rosters? I do a draft every year for the March Madness Tournament. Thanks
The initialize.sql script is located in /api/Domain/Migrations/initialize.sql
, not /api/Domain/Migrations/2.0.0/initialize.sql
. I assume that updating the install docs are the best way to fix that, but I haven't successfully installed phpdraft yet, so I'm not sure.
Hello, having an issue with the phpdraft.com site: when trying to turn off depth charts I'm getting this message:
Unable to edit draft
An exception occurred while executing 'UPDATE draft SET commish_id = ?, draft_name = ?, draft_sport = ?, draft_style = ?, draft_password = ?, draft_rounds = ?, using_depth_charts = ? WHERE draft_id = ?': SQLSTATE[HY000]: General error: 1366 Incorrect integer value: '' for column 'using_depth_charts' at row 1
Also having an issue with saving any edits to the draft. Perhaps you could look into it when you get a chance? Thanks for all of your support and for the great draft utility. :)
David
ATOW, Phinx was on the 0.8.x branch (is currently 0.10.x), and Deployer was on 4.x (currently 6.x). Make the necessary changes to the code to migrate to the newest versions.
When viewing draft info (on draft index page, for instance) the draft start time is still shown in UTC. The trick is that the string " UTC" must be appended to the end of the timestamp string in order to let MomentJS know it can translate the date to the local timezone (else it can't make a reasonable assumption as to which timezone it's working with to start with)
Saw this probably half a dozen times as I did an offline draft last night - but as the commish is entering one pick, some sort of race condition occurs where I'm entering an undrafted player for Pick n, and as it's spinning (suggesting its entering the nth pick) the modal dialog pops up for duplicate pick entry as if we tried to enter the same player for the next pick (pick #n+1).
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.