Download the PHP package carlcs/craft-textstatistics without Composer

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

Text Statistics plugin for Craft CMS

This Craft plugin provides Twig functions to display information about your texts. It allows you to measure the readability of your content, calculate the average reading time or access other text statistics like sentence count.

Installation

The plugin is available on Packagist and can be installed using Composer. You can also download the latest release and copy the files into craft/plugins/textstatistics/.

Settings

The plugin can be configured with a craft/config/textstatistics.php config file to set the default template used to render the reading time string and to set a default words per minute value.

TextStatisticsModel

When you generate text statistics using the getTextStatistics function the plugin returns a TextStatisticsModel with the following properties populated. Most of the data is calculated with the excellent Text Statistics library by Dave Child. For information about the provided readability scores have a look these Wikipedia articles:

Properties

Templating Examples

A single article

Adjust WPM according to text language

Usage with a Matrix field

Twig functions

addToTextStatistics( text, articleId )

Adds text to the data storage so you can later perform text statistics calculations from it.

Alternativly you can use the Twig filter.

addToReadingTime( seconds, articleId )

Adds time to the data storage to further influence the reading time returned with the text statistics.

getTextStatistics( articleId, wpm, readingTimeTemplate )

Performs the text statistics calculations for an article and returns the result as a TextStatisticsModel.

Requirements


All versions of craft-textstatistics with dependencies

PHP Build Version
Package Version
Requires composer/installers Version ~1.0
php Version >=5.4.0
davechild/textstatistics Version 1.0.1
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 carlcs/craft-textstatistics contains the following files

Loading the files please wait ....