Download the PHP package ernestdefoe/picks without Composer

On this page you can find all versions of the php package ernestdefoe/picks. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package picks

Picks

Floxum Version Downloads Review License

A Flarum 2.x extension that adds a pick'em game to your forum. Members predict the winners of each week's games, earn points, and compete on a season leaderboard.

A season belongs to a league: college football, the NFL, the NBA, MLB, the NHL, MLS or the Premier League. College football is synced from CollegeFootballData; everything else comes from ESPN, which needs no API key. Live scores and team crests come from ESPN throughout.

Features

Requirements

Installation

Then enable Picks in the admin panel under Extensions.

Setup

  1. Open the Picks page in the admin panel.
  2. Paste your CFBD API key and set the season year (and optionally a conference filter).
  3. Sync Teams, then Sync Schedule to pull the season's games.
  4. Open the week(s) you want members to pick.
  5. Check the picks permissions (see below). A fresh install lets Members view Picks and make picks; grant picks.view to Guests for a public pick'em.

To keep live scores updating, make sure Flarum's scheduler is running (see Scheduler below) and enable ESPN polling in the settings.

Permissions

Set these under Admin → Permissions. A fresh install grants picks.view and picks.makePicks to Members (unless a group already has them); updating an existing forum never changes what it has set.

Ability Lets a user…
picks.view See the Picks page and leaderboard.
picks.makePicks Submit and change their own picks.
picks.viewHistory View pick history for users.
picks.manage Manage the game (sync, results, weeks, settings). Admins always have this.

Settings

Configured on the admin Picks page (stored under the ernestdefoe-picks.* namespace):

Confidence 10

A second contest that sits beside the full board rather than replacing it. The full board stays a "pick every FBS game" game; Confidence 10 is ten games, and the order you put them in matters. Turn it on under Picks Settings → Confidence Contest. The number of games is a setting, and the contest takes its name from it.

The games. They are chosen automatically when a week opens. Games between two ranked teams come first, by the two rankings added together, then games with one ranked team, by that ranking. After those come the best combined records. A national broadcast, then a primetime kickoff, settles a tie. Only games that have not started are chosen. Under Confidence Games an admin can add and remove games, drag them into a different order, or run the automatic choice again. All of this stays open until the first chosen game locks. After that the week's games are frozen.

Playing. A member picks a winner in each game and ranks them: 10 for the pick they are surest of, down to 1. There are three ways to rank, and each keeps every value unique:

Each game locks at its own kickoff, as on the full board. A locked pick keeps its value. The games still open can be reshuffled among the values that are left. Changes save as they are made. The server checks every rule again: values must be unique and in range, the game must be in the contest, and a locked pick cannot change.

Scoring. A correct pick earns its value. A wrong pick costs nothing, half its value or all of it, depending on the contest's penalty setting. With a penalty a week can go negative, and the season is the sum of its weeks. Members also guess the total points in the first game, the tiebreaker. When two members are level on points, the closer guess ranks higher. Scoring runs on the same queued job as the full board, and its tables are separate, so the full board's scores never change.

The Leaderboard and History tabs get a Full board / Confidence 10 switch, with week, season and all-time standings for the contest. All time is the sum of each member's seasons, as on the full board.

A member's Picks History tab on their profile gets a Confidence 10 section under the full board's: the same stat cards for all time, then each season they played with its weeks, including the tiebreaker distance and the rank each week.

Scheduler

Live-score polling runs as a scheduled command (PollLiveScoresCommand, every 5 minutes). For it to fire, Flarum's scheduler must be invoked once a minute by cron:

You can also run syncs manually:

More than one sport

A season belongs to a league, and the league decides where its fixtures come from and how a game is described:

League Source Vocabulary
College football CollegeFootballData gridiron
NFL ESPN gridiron
NBA, college basketball ESPN basketball
MLB ESPN baseball
NHL ESPN ice hockey
MLS, Premier League, Champions League ESPN football

Create a season, set its league, and run picks:sync-espn. Nothing else changes: the same tables, the same picks, the same leaderboard. A board that follows only college football carries on exactly as before — every existing season defaults to it, because every existing row came from there.

Adding a league is one line in Service\Leagues\Leagues, because ESPN answers every one of these in the same shape.

Two things are worth knowing:

Most sports have no weeks. Gridiron numbers its rounds; everything else is played to a date. A league without weeks gets one week per calendar week, which is what a pick'em for those sports is anyway — you pick this week's games. The deadline is each game's own kickoff rather than the start of the round, because one deadline across seven days either closes Monday's game on Saturday morning or lets somebody pick a game they have already watched.

A drawn match is void. Football arrived with a result this scoring had never had to hold. The picker offers home or away, so on a draw nobody picked the result — those picks stay unscored and the match simply does not affect the table, rather than counting as a loss for everybody.

Data sources

🚨 A box score from ESPN is one call per game, where CFBD answers a whole week at once — so the fetch is capped per run and picks up where it left off. A Saturday of college basketball is a hundred and fifty games, and a scheduled job that fired a hundred and fifty outbound requests inside a minute is how a forum takes itself down.

Team names, logos, and data are the property of their respective owners and the providers above. This is an unofficial fan tool and is not affiliated with or endorsed by the NCAA, CFBD, ESPN, or any team.

Credits

Based on huseyinfiliz/pickem by Hüseyin Filiz. Subsequently forked by resofire and now maintained by ernestdefoe as ernestdefoe/picks.

Support

License

MIT


All versions of picks with dependencies

PHP Build Version
Package Version
Requires php Version ^8.3
flarum/core Version ^2.0.0-beta.8
guzzlehttp/guzzle Version ^7.0
intervention/image Version ^3.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package ernestdefoe/picks contains the following files

Loading the files please wait ...