Download the PHP package zaengle/craft-readtime without Composer

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

Readtime Field

Readtime provides a new Field Type called Read Time. When added to an entry, the field will loop through all of the content fields and calculate the estimated read time of the text content and save the value for use on the front end. The Read Time field will update every time the Entry is saved.

Settings

The Words per Minute value used to determine read time can be changed in the plugin settings. The default is set to 200 words per minute.

How to Use

Create a new field with the Read Time field type and add it to your page Entry Type. The Read Time value will automatically update when the Entry is saved. If you save content within a CKEditor longform entry block, you will need to also save the parent entry to update the Read Time value.

To display the field on the front end, call the field in the template by the field handle and apply the filter of the desired display:

Human

This is the default display type. It will automatically format the time in hours, minutes, and seconds. If hours or minutes do not apply, they will be excluded from the display.

Example: 211 seconds will display as 3 minutes and 31 seconds.

Simple

Same as the Human display but the seconds will be excluded. The minutes will round to the nearest minute.

Example: 211 seconds will display as 4 minutes.

Rounded

If the Read Time is under a minute or over an hour, the display will get rounded. Otherwise, it will show the Simple value. Under a minute will display "Less than a minute". Over an hour will round the minutes to the nearest 5 minute value.

Example: 55 seconds will display as Less than a minute.

Example: 3840 seconds will display as 1 hour and 5 minutes.

DateTime

Outputs the Read Time value as a date/time value that can be formatted.

Example: 211 seconds will display as 0 hours, 3 minutes, 31 seconds.

Content Updates

If the field is added to a section after content is added, the content will need to be resaved to fill the Read Time field value. To resave a whole section at once, use the CLI command:

craft resave/entries --section sectionHandle

If you have a lot of entries and want to add it to the Craft queue, add the --queue flag to the command.

Compatibility

The Read Time plugin will work on both Craft 4 and Craft 5. Currently, there is only support for Craft native fields and CKEditor.

Read Time Roadmap

Brought to you by Zaengle Corp


All versions of craft-readtime with dependencies

PHP Build Version
Package Version
Requires php Version >=8.0.2
craftcms/cms Version ^4.0.1|^5.0.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 zaengle/craft-readtime contains the following files

Loading the files please wait ....