Add a short code for adding a Packagist installs button with a count to a HTMLText field.


Repository: https://github.com/webbuilders-group/silverstripe-packagistshortcode

Packagist: http://packagist.org/packages/webbuilders-group/silverstripe-packagistshortcode

Issues: https://github.com/webbuilders-group/silverstripe-packagistshortcode/issues

Authors: Ed Chipman

0 1 39


Readme

Packagist Short Code

Add a short code for adding a Packagist installs button with a count to a HTMLText field.

Maintainer Contact

Requirements

  • SilverStripe CMS 4.x | 5.x

Installation

Composer (recommended):

composer require webbuilders-group/silverstripe-packagistshortcode

If you prefer you may also install manually:

Usage

Usage is pretty straight forward to add a packagist downloads button you simply add the following:

N/A

Optionally you may add mode="monthly" or button="daily" (defaults to total) to show the download count for the given period.

N/A

In 3.1 the short codes above will work as included however the updated syntax for the short code would be (of course layout and button are not required):

N/A

Configuration Options

There are a few configuration options available to you:

SilverStripe\Core\Injector\Injector:
    Psr\SimpleCache\CacheInterface.PackagistShortCode:
        factory: SilverStripe\Core\Cache\CacheFactory
        constructor:
            namespace: "NewRelic"
            defaultLifetime: 86400 #Cache time in seconds
WebbuildersGroup\PackagistShortCode\PackagistShortCode:
    UseShortHandNumbers: true #Use short hand numbers i.e 5.6K or not

Versions

dev-master
2019-42-23 2458627: UTC
BSD-3-Clause

Install composer require webbuilders-group/silverstripe-packagistshortcode dev-master

Manual Install: Download

Requires
  • silverstripe/framework: ~4.0
1.0.x-dev
2016-32-23 2457471: UTC
BSD-3-Clause

Install composer require webbuilders-group/silverstripe-packagistshortcode 1.0.x-dev

Manual Install: Download

Requires
  • silverstripe/framework: 3.*
  • composer/installers: *
2.0.3
2023-0-19 2460237: UTC
BSD-3-Clause

Install composer require webbuilders-group/silverstripe-packagistshortcode 2.0.3

Manual Install: Download

Requires
  • silverstripe/framework: ^4|^5
2.0.2
2019-42-23 2458627: UTC
BSD-3-Clause

Install composer require webbuilders-group/silverstripe-packagistshortcode 2.0.2

Manual Install: Download

Requires
  • silverstripe/framework: ~4.0
2.0.1
2019-6-18 2458502: UTC
BSD-3-Clause

Install composer require webbuilders-group/silverstripe-packagistshortcode 2.0.1

Manual Install: Download

Requires
  • silverstripe/framework: ~4.0
2.0.0
2019-36-18 2458502: UTC
BSD-3-Clause

Install composer require webbuilders-group/silverstripe-packagistshortcode 2.0.0

Manual Install: Download

Requires
  • silverstripe/framework: ~4.0
dev-SS4
2019-35-18 2458502: UTC
BSD-3-Clause

Install composer require webbuilders-group/silverstripe-packagistshortcode dev-SS4

Manual Install: Download

Requires
  • silverstripe/framework: ~4.0
1.0.0
2016-32-23 2457471: UTC
BSD-3-Clause

Install composer require webbuilders-group/silverstripe-packagistshortcode 1.0.0

Manual Install: Download

Requires
  • silverstripe/framework: 3.*
  • composer/installers: *
0.1
2013-1-18 2456645: UTC
BSD-3-Clause

Install composer require webbuilders-group/silverstripe-packagistshortcode 0.1

Manual Install: Download

Requires
  • silverstripe/framework: 3.*
  • composer/installers: *