Drupal Connect

For the most up-to-date documentation, please visit docs.brix.ch

Asset-Picker

Drupal celum:connect is a Drupal extension, which allows you to download assets from CELUM via the CELUM Asset Picker directly into the Drupal filesystem and use it in a post, or just link it from celum in your Drupal post.

1. Installation

  • Get the extension from the store
  • Upload the file via admin/modules/install or copy the extracted media_celum_connect folder into the module directory of your Drupal installation (sites/all/modules).
  • In the Drupal backend, go to "Extend" and check the checkbox next to "Media celum:connect" in the module list. drupal:connect install

2. Configuration

  • In the Drupal backend, go to "Configuration" and click on "Celum:connect configuration" in the web services section. drupal:connect configure 1

Properties

To be configured in {baseUrl}/admin/config/services/celum_connect-field-settings

License Key

type: String, required: yes, default: -

Delivered by brix IT Solutions, contains an expiration date and the CELUM Endpoint,

e.g. nM7Wvdaio5Ocs9fq39jErN6Xfq3O3KCXuLe7vpyxxaaiHdmNlhICNa3en

Celum API Key

type: String, required: yes, default: -

Generated in the CELUM CMA, necessary to connect to the CELUM Cora API,

e.g. 3pi8ps5ckls47tl8q9rsuddtpsl6

Locale

type: String, required: no, default: en

GUI Locale in which the CELUM Asset Picker ist loaded.

e.g. de

Root node

type: Number, required: yes, default: -

Root Node in which assets can be selected.

e.g. 1234

Url root node map

type: Map, required: no, default: -

Map of base urls and root node pairs. Allows to define different root nodes for different base urls. The map has the following syntax: [url1]>[root nodes 1];[url2]>[root nodes 2].

e.g. http://my-drupal-site.com>1234;http://my-other-site.ch>234,345

Usage (download)

type: String, required: no, default: -

Infofield value for the direct download tacking infofield. writes back to CELUM that the asset is downloaded in drupal. Only if direct download is used. see directDownload.trackingInfofieldId

e.g. drupal downloaded

Usage (link)

type: String, required: no, default: -

Infofield value for the direct download tacking infofield. writes back to CELUM that the asset is linked in drupal. Only if direct download is used. see directDownload.trackingInfofieldId

e.g. drupal linked

Title information field name

type: String, required: no, default: -

Infofield name of the title infofield. If the Infofield exists and is not empty on a used asset, the value will be used as the title in drupal. if the infofield is not set on an asset, the asset name will be used as title in drupal.

e.g. title

Default language tag for a localized title information field

type: String, required: no, default: -

If the title inormation field is a localized field, the value of this locale will be used as title per default.

e.g. en

Asset Picker version

type: select value, required: yes, default: -

The version of the used asset picker. Depends on the CELUM REST API version. See Compatibility Matrix

e.g. 6.9.3

Downloadformat unknown

type: number, required: yes, default: -

Default downloadformat id of assets with unknown file type

e.g. 1

Downloadformat image

type: number, required: yes, default: -

Default downloadformat id of assets with image file type

e.g. 2

Downloadformat document

type: number, required: yes, default: -

Default downloadformat id of assets with document file type

e.g. 3

Downloadformat video

type: number, required: yes, default: -

Default downloadformat id of assets with video file type

e.g. 4

Downloadformat audio

type: number, required: yes, default: -

Default downloadformat id of assets with audio file type

e.g. 5

Downloadformat text

type: number, required: yes, default: -

Default downloadformat id of assets with text file type

e.g. 6

Supported Downloadformats

type: list of numbers, required: yes, default: -

All supported downloadformats. Selectable for assets depending on the file type

e.g. 1,2,3,4,5,7,8,10,11,12,13,14,15,16

Link only

type: checkbox, required: no, default: false

If set, only linking assets is allowed, download assets to drupal is deactivated

e.g. true

Anura links

type: checkbox, required: no, default: false

If set, instead of normally links, will be shown for the celum:connect file type. Opens the anura detail view by clicking on the links.

e.g. true

Anura dispatcher

type: list of numbers, required: no, default: -

Name of the anura dispatcher if anura links is set the anura url is a combination of the CELUM url and the dispatcher: /anura/

e.g. anura1

Anura URL dispatcher map

type: Map, required: no, default: -

Map of base urls and anura dispatcher. Allows to define different anura dispatcher for different base urls. The map has the following syntax: [url1]>[anura dispatcher 1];[url2]>[anura dispatcher 2].

e.g. http://my-drupal-site.com>anura1;http://my-other-site.ch>anura2

  • Check "link only" if the user should only have the possibility to link the assets, not to odownload it to drupal. drupal:connect configure 2
  • Save the configuration

3. Creating a content type

  • In the Drupal backend, go to Structure->Content types
  • Add a new content type or edit an existing one
  • Go to manage fields and add a new field of type "Celum:connect field"
  • Go to field settings and change the desired settings drupal:connect configure content type

3.1. Compatibility Matrix

REST API version CELUM 6 CELUM 5.13.x CELUM 5.12.x Asset Picker version
rest-all-2.1 5.13.0 (+) 5.12.3 (+) 2.0
rest-all-2.1 5.13.2 (-) 2.1
rest-all-2.2 5.13.0 (+) 5.12.3 (+) 2.0
rest-all-2.2 5.13.2 (-) 2.1
rest-all-2.3 5.13.0 (+) 5.12.3 (+) 2.0
rest-all-2.3 5.13.2 (-) 2.1
rest-all-3.0 5.13.1 (+) 2.2
rest-all-3.0 5.13.2 (-) 2.3
rest-all-3.1 5.13.2 (+) 2.3
rest-all-3.2 5.13.3 (+) 2.4
rest-all-3.2 5.13.3 (+) 2.5
rest-all-3.3 5.13.3 (+) 2.5.1
rest-all-3.3 5.13.3 (+) 2.5.2
rest-all-4.0 18.12 (+) 3.0
rest-all-4.1 19.3 (+) 3.0
rest-all-4.2 19.6 (+) 3.0
rest-all-5.0 19.12 (+) 3.0
rest-all-6.8.11 20.9 (+) 6.8.11
rest-all-6.9.3 21.2 (+) 6.9.3
  • (+) The version is the first maintenance version in which a previously unsupported feature is added.

  • (-) The version is the first maintenance version in which a previously supported feature is removed.

4. Using the new content type

  • Add new content with Content->Add content and choose the newly created/edited content type
  • Click on the Select assets button in the previously created celum:connect field drupal:connect widget
  • Choose the desired asset
  • Choose the desired download format
  • Choose between download and link the assets drupal:connect asset picker drupal:connect asset added

Release Notes

1.0

Released 2017-02-01

  • Initial version
1.1

Released 2018-04-05

  • Link and download mode added (direct Download plugin required)
  • Usage will be written to the asset in celum
1.2

Released 2018-08-02

  • Asset Picker version selectable
1.3

Released 2018-08-03

  • License with expiration date
1.4

Released 2018-08-23

  • AdditionalDownloadFormats property for AssetPicker
1.5

Released 2018-08-28

  • DirectDownload url fix, widget text adapted
1.6

Released 2019-01-29

  • AssetPicker 2.5 and AssetPicker 2.5.2 added
1.7

Released 2019-02-12

  • AssetPicker 2.51 added
1.8

Released 2019-02-15

  • DirectDownload token compatibility added (option for DirectDownload secret)
1.11

Released 2019-07-29

  • Plugin Name capitalized and helpp hook implemented (new plugin guidelines)
1.12

Released 2019-12-03

  • AssetPicker 3.0 added (CELUM 6.2 Support)
1.13

Released 2020-01-29

  • CELUM 6.4 compatibility (Search feature)
1.18

Released 2021-04-16

  • Asset picker version 6.8.11 and 6.9.3 added, fix in preSave function
1.20

Released 2021-06-02

  • Store config.js in public folder (sites/default/celumconnect)
1.22

Released 2021-07-07

  • Bugfix path if not default drupal installation path
1.23

Released 2021-08-06

  • Link only flag in the configuration to prevent downloading images to drupal
1.30

Released 2021-08-11

  • Set title of an asset by a configured infofield from CELUM
1.34

Released 2021-11-29

  • Remove asset button added
1.35

Released 2021-11-30

  • Drupal 9 compatibility
1.36

Released 2021-12-14

  • URL- root nodes map feature
1.37

Released 2021-12-14

  • Anura link feature
1.38

Released 2021-12-17

  • URL- anura dispatcher map feature
1.39

Released 2021-12-17

  • Anura url fix