2017 © Pedro Peláez
 

silverstripe-vendormodule silverstripe-cloudinary

Fields & DataObjects to add Cloudinary Images/Files to DataObjects.

image

mademedia/silverstripe-cloudinary

Fields & DataObjects to add Cloudinary Images/Files to DataObjects.

  • Thursday, July 26, 2018
  • by sealan
  • Repository
  • 15 Watchers
  • 6 Stars
  • 1,837 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 1 Open issues
  • 28 Versions
  • 8 % Grown

The README.md

Silverstripe Cloudinary Module

This module provides fields & DataObjects for managing files, audio & images that are stored in Cloudinary., (*1)

Installation

composer require mademedia/silverstripe-cloudinary

Usage

Setup

<?php

putenv('CLOUDINARY_URL=cloudinary://<API Key>:<API Secret>@<Cloud name>');

Add DataObjects

<?php

use MadeHQ\Cloudinary\Model\FileLink;
use MadeHQ\Cloudinary\Model\ImageLink;

private static $has_one = [
    '<FileVariableName>' => FileLink::class,
    '<ImageVariableName>' => ImageLink::class,
];

Add CMSFields

<?php

use MadeHQ\Cloudinary\Forms\UploadImageField;
use MadeHQ\Cloudinary\Forms\UploadFileField;

public function getCMSFields()
{
    $fields = parent::getCMSFields();
    $fields->addFieldsToTab(
        'Root.Media',
        [
            UploadFileField::create('FileVariableName'),
            UploadImageField::create('ImageVariableName'),
        ]
    );
    return $fields;
}

Output in template

Files

Adding files to SilverStripe templates, (*2)

<%-- File URL --%>
$FileVariableName.URL

<%-- File Title --%>
$FileVariableName.Title

Images

Adding images to SilverStripe templates, (*3)

<%-- Original Image URL --%>
$ImageVariableName.SecureURL

<%-- Original Image Credit --%>
$ImageVariableName.Credit

<%-- Original Image Caption --%>
$ImageVariableName.Caption

<%-- Original Image Gravity --%>
$ImageVariableName.Gravity

<%-- Original Image at a specific size fill will default to "fill" --%>
$ImageVariableName.URL(100, 200)

<%-- Original Image at a specific size with a specific format --%>
$ImageVariableName.URL(100, 200, 'fill', 'png')

Development

JS Amends are done in client\src\js and client\src\styles, (*4)

After changes you can run yarn build or during development use yarn watch, (*5)

Also required for development is yarn, (*6)

The Versions

26/07 2018

dev-master

9999999-dev https://github.com/MadeHQ/silverstripe-cloudinary.git

Fields & DataObjects to add Cloudinary Images/Files to DataObjects.

  Sources   Download

BSD-3-Clause

The Requires

 

silverstripe cloudinary

22/05 2018

dev-refresh-after-sync

dev-refresh-after-sync https://github.com/MadeHQ/silverstripe-cloudinary.git

Fields & DataObjects to add Cloudinary Images/Files to DataObjects.

  Sources   Download

BSD-3-Clause

The Requires

 

silverstripe cloudinary

18/05 2018

3.0.x-dev

3.0.9999999.9999999-dev

SilverStripe Module. Replaces SilverStripe's inbuilt asset management with Cloudinary.

  Sources   Download

BSD-3-Clause

The Requires

 

silverstripe cloudinary

27/03 2018

4.1.1

4.1.1.0 https://github.com/MadeHQ/silverstripe-cloudinary.git

Fields & DataObjects to add Cloudinary Images/Files to DataObjects.

  Sources   Download

BSD-3-Clause

The Requires

 

silverstripe cloudinary

27/03 2018

dev-v4/upload-as-private

dev-v4/upload-as-private https://github.com/MadeHQ/silverstripe-cloudinary.git

Fields & DataObjects to add Cloudinary Images/Files to DataObjects.

  Sources   Download

BSD-3-Clause

The Requires

 

silverstripe cloudinary

23/03 2018

4.1.0

4.1.0.0 https://github.com/MadeHQ/silverstripe-cloudinary.git

Fields & DataObjects to add Cloudinary Images/Files to DataObjects.

  Sources   Download

BSD-3-Clause

The Requires

 

silverstripe cloudinary

22/03 2018

4.1.0-alpha

4.1.0.0-alpha https://github.com/MadeHQ/silverstripe-cloudinary.git

Fields & DataObjects to add Cloudinary Images/Files to DataObjects.

  Sources   Download

BSD-3-Clause

The Requires

 

silverstripe cloudinary

22/12 2017

dev-4.0-asset-admin

dev-4.0-asset-admin https://github.com/MadeHQ/silverstripe-cloudinary.git

Fields & DataObjects to add Cloudinary Images/Files to DataObjects.

  Sources   Download

BSD-3-Clause

The Requires

 

silverstripe cloudinary

12/12 2017

4.0.x-dev

4.0.9999999.9999999-dev https://github.com/MadeHQ/silverstripe-cloudinary.git

Fields & DataObjects to add Cloudinary Images/Files to DataObjects.

  Sources   Download

BSD-3-Clause

The Requires

 

silverstripe cloudinary

12/12 2017

4.0.1

4.0.1.0 https://github.com/MadeHQ/silverstripe-cloudinary.git

Fields & DataObjects to add Cloudinary Images/Files to DataObjects.

  Sources   Download

BSD-3-Clause

The Requires

 

silverstripe cloudinary

07/12 2017

dev-test/4.0-tmp

dev-test/4.0-tmp https://github.com/MadeHQ/silverstripe-cloudinary.git

Fields & DataObjects to add Cloudinary Images/Files to DataObjects.

  Sources   Download

BSD-3-Clause

The Requires

 

silverstripe cloudinary

05/12 2017

4.0.0

4.0.0.0 https://github.com/MadeHQ/silverstripe-cloudinary.git

Fields & DataObjects to add Cloudinary Images/Files to DataObjects.

  Sources   Download

BSD-3-Clause

The Requires

 

silverstripe cloudinary

29/09 2017

dev-asset-browser/css-updates

dev-asset-browser/css-updates

SilverStripe Module. Replaces SilverStripe's inbuilt asset management with Cloudinary.

  Sources   Download

BSD-3-Clause

The Requires

 

silverstripe cloudinary

20/07 2017

3.0.0

3.0.0.0

SilverStripe Module. Replaces SilverStripe's inbuilt asset management with Cloudinary.

  Sources   Download

BSD-3-Clause

The Requires

 

silverstripe cloudinary

02/03 2017

dev-ss-4.0

dev-ss-4.0

SilverStripe Module. Replaces SilverStripe's inbuilt asset management with Cloudinary.

  Sources   Download

BSD-3-Clause

The Requires

 

silverstripe cloudinary

12/12 2016

4.0.4-alpha3

4.0.4.0-alpha3

SilverStripe Module. Replaces SilverStripe's inbuilt asset management with Cloudinary.

  Sources   Download

BSD-3-Clause

The Requires

 

silverstripe cloudinary

30/11 2016

4.0.1.x-dev

4.0.1.9999999-dev

SilverStripe Module. Replaces SilverStripe's inbuilt asset management with Cloudinary.

  Sources   Download

BSD-3-Clause

The Requires

 

silverstripe cloudinary

29/11 2016

5.0.1-beta2

5.0.1.0-beta2

SilverStripe Module. Replaces SilverStripe's inbuilt asset management with Cloudinary.

  Sources   Download

BSD-3-Clause

The Requires

 

silverstripe cloudinary

16/11 2016

4.0.2-alpha1

4.0.2.0-alpha1

SilverStripe Module. Replaces SilverStripe's inbuilt asset management with Cloudinary.

  Sources   Download

BSD-3-Clause

The Requires

 

silverstripe cloudinary

16/11 2016

4.0.1-alpha1

4.0.1.0-alpha1

SilverStripe Module. Replaces SilverStripe's inbuilt asset management with Cloudinary.

  Sources   Download

BSD-3-Clause

The Requires

 

silverstripe cloudinary

15/11 2016

4.0.0-alpha1

4.0.0.0-alpha1

SilverStripe Module. Replaces SilverStripe's inbuilt asset management with Cloudinary.

  Sources   Download

BSD-3-Clause

The Requires

 

silverstripe cloudinary

12/09 2016

dev-start-adding-jPlayer-circle-player

dev-start-adding-jPlayer-circle-player

SilverStripe Module. Replaces SilverStripe's inbuilt asset management with Cloudinary.

  Sources   Download

BSD-3-Clause

The Requires

 

silverstripe cloudinary

25/07 2016

dev-video-audio-type-updates

dev-video-audio-type-updates

SilverStripe Module. Replaces SilverStripe's inbuilt asset management with Cloudinary.

  Sources   Download

BSD-3-Clause

The Requires

 

silverstripe cloudinary

12/07 2016

dev-legacy

dev-legacy

SilverStripe Module. Replaces SilverStripe's inbuilt asset management with Cloudinary.

  Sources   Download

BSD-3-Clause

The Requires

 

silverstripe cloudinary

08/04 2016

dev-update-v1

dev-update-v1

SilverStripe Module. Replaces SilverStripe's inbuilt asset management with Cloudinary.

  Sources   Download

BSD-3-Clause

The Requires

 

by Hiren Patel
by Nivanka Fonseka
by Sealan Cronin

silverstripe cloudinary

05/04 2016

1.1.0

1.1.0.0

SilverStripe Module. Replaces SilverStripe's inbuilt asset management with Cloudinary.

  Sources   Download

BSD-3-Clause

The Requires

 

by Hiren Patel
by Nivanka Fonseka
by Sealan Cronin

silverstripe cloudinary

05/04 2016

v2.x-dev

2.9999999.9999999.9999999-dev

SilverStripe Module. Replaces SilverStripe's inbuilt asset management with Cloudinary.

  Sources   Download

BSD-3-Clause

The Requires

 

by Hiren Patel
by Nivanka Fonseka
by Sealan Cronin

silverstripe cloudinary

18/03 2016

1.0.0

1.0.0.0

SilverStripe Module. Replaces SilverStripe's inbuilt asset management with Cloudinary.

  Sources   Download

BSD-3-Clause

The Requires

 

by Hiren Patel
by Nivanka Fonseka
by Sealan Cronin

silverstripe cloudinary