Download the PHP package ernestdefoe/recipes without Composer

On this page you can find all versions of the php package ernestdefoe/recipes. 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 recipes

Recipes for Flarum

Structured recipes in posts. A recipe card with ingredients that scale when the reader changes the servings, steps with one-click timers, a clean print view, and schema.org Recipe data so search engines can show it as a recipe.

Works with every editor a Flarum 2 forum can run: Flarum's own composer (plain, Markdown or BBCode), FoF Rich Text and Scribe.

Flarum


What readers get

On a phone Printed

A recipe directory

Recipes in the sidebar opens a page listing every recipe on the forum as a card: photo, title, author, servings and time, linked to the post it lives in. Search it by name or filter it by tag. It lists only recipes the visitor is allowed to see, and the server sends it as plain links too, for search engines and readers without JavaScript.

Variants

Every recipe card has a Remix button. It opens the recipe form with a copy of the recipe to change, as a reply in the same discussion (the usual "I made it vegan" case) or as a discussion of its own. The new card says which recipe it is based on, with a link back, and the original lists its variants underneath, so you can follow the branches either way. Search engines get the link too, as schema.org isBasedOn.

Your own fields: protein, PHE, calories…

Every community counts something different. In the admin panel you define the numbers your recipes should carry, such as calories, protein, or the PHE someone on a PKU diet has to track, each with a label and a unit, dragged into the order you want.

For each field you choose whether its value is per serving, so it stays the same when a reader changes the servings, or for the whole recipe, so it scales with them. Values are shown exactly as entered, never rounded to a "nice" number. Link a field to a schema.org nutrition property (calories, protein, fat, carbohydrate, sugar, fibre, sodium…) and search engines get it, per serving, as the recipe's nutrition information. A field with no schema.org equivalent, like PHE, is shown on the card only.

What authors get

A Recipe button in the composer opens a form: title, servings, prep and cook times, an optional photo, a description, ingredients and steps (one per line).

In Scribe and FoF Rich Text the recipe is a block you can select, drag and delete; double-click it, or press Edit, to change it. In the plain composer, put the cursor inside a recipe and press the button to edit it.

The composer preview shows the card as you type.

Photos

Drop a photo on the form, or choose one: JPEG, PNG or WebP up to 10 MB. The forum re-encodes it as WebP (at most 1600 px), which strips everything but the pixels, including a phone photo's location, and stores it under a random name in public/assets/recipes (or wherever a storage driver puts the ernestdefoe-recipes disk). Who may upload is the Upload recipe photos permission, Members by default. Uploads are limited to 10 a minute and 100 a day per member.

A photo that never makes it into a saved post is deleted after a day, by the daily recipes:prune-photos task (and whenever its uploader uploads again). A photo edited out of a recipe, or whose post is deleted, is deleted too, unless a variant still shows it.

Allow images from web addresses (in the extension's settings, on by default) keeps the old way of pasting an image's address. Turn it off and only uploaded photos are accepted: the address box disappears and the server refuses a recipe that links an image from another site when it is saved. Recipes posted before keep their images, and an edit or a remix may keep an image already shown on the forum; nothing is rewritten.

The form In Scribe

Writing one by hand

The form writes this, and you can too:

A variant adds based-on: 123, the post id of the original. Remix writes it for you. Your own fields are lines like protein: 6.5, using each field's key.

Recipe text is plain text: Markdown and BBCode inside a recipe are shown as written.

Search engines

The first post's recipe is published as a schema.org Recipe: name, image, description, author, date, yield, prep/cook/total times, ingredients and steps (groups become HowToSections). It is the only structured data Recipes adds, so it sits alongside FoF SEO and Waymark without repeating anything they publish. A recipe in a reply is not the page's recipe and is left out. A first post the visitor cannot see is never described.

Installation

Enable Recipes in the admin panel. If your community records numbers on its recipes, define them on the extension's page.

Recipes keeps a small index of where recipes are, so the directory and variant links never have to read every post. It is filled when the extension is enabled and kept current as posts are written, edited and deleted. If you ever restore posts from a backup or import them with a tool that bypasses Flarum, rebuild it:

With Scribe, the button joins the toolbar on its own unless you have arranged the toolbar by hand. Then it waits in the toolbar builder for you to place it.

Updating

Good to know

Requirements

Support

Licence

MIT.


All versions of recipes with dependencies

PHP Build Version
Package Version
Requires php Version ^8.3
flarum/core Version ^2.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/recipes contains the following files

Loading the files please wait ...