xRS MODX extra

Installation guide

Logo ResourceSpace Logo Wordpress Logo Prestashop Logo Joomla

Install & configure xRS

1. Prepare ResourceSpace

Configure your metadata fields

The following set of IPTC and EXIF medata should cover many situations. If you need more, please refer to the EXIFtool library documentation and don't miss to define a shorthand name.

Go to Admin > System > Manage metadata fields, create or modify the following fields (you can use RS existing if you want).

The more important fields to get xRS working with MODX are the short hand name and the Exiftool fields.

Original filename

Tip: use your image reference as filename to use this field to identify the original filename and image reference for your picture, e.g. 000152.01.jpg.

  • Resource type: photo
  • Field type: Text (Single line)
  • Shorthand name: originalfilename
  • Index this field: checked
  • Display field: checked
  • Enable advanced search: unchecked
  • Exiftool field: originalfilename

Headline

  • Resource type: photo
  • Shorthand name: iptcheadline
  • Index this field: checked
  • Display field: checked
  • Enable advanced search: checked
  • Exiftool field: Headline

Title

  • Resource type: photo
  • Field type: Text box (single line)
  • Shorthand name: iptctitle
  • Index this field: checked
  • Display field: checked
  • Enable advanced search: checked
  • Exiftool field: ObjectName,Title

You can priorize according your writing practice: ObjectName (first),Title (second) or Title (first), ObjectName (Second)

Country

  • Resource type: photo
  • Field type: Dynamic keywords list
  • Shorthand name: iptccountry
  • Index this field: checked
  • Display field: checked
  • Enable advanced search: checked
  • Exiftool field: Country-PrimaryLocationName,country

Country code

ISO Alpha-3 country code (e.g. JPN for Japan).

  • Resource type: photo
  • Field type: Text box (single line)
  • Shorthand name: iptccountrycode
  • Index this field: checked
  • Display field: checked
  • Enable advanced search: checked
  • Exiftool field: Country-PrimaryLocationCode

Province/State

  • Resource type: photo
  • Field type: Text box (single line)
  • Shorthand name: iptcstate
  • Index this field: checked
  • Display field: checked
  • Enable advanced search: checked
  • Exiftool field: Province-State

City

  • Resource type: photo
  • Shorthand name: iptccity
  • Index this field: checked
  • Display field: checked
  • Enable advanced search: checked
  • Exiftool field: Province-State

Image rating

  • Resource type: photo
  • Field type: dropdown list (values: 5.4.3,2,1)
  • Shorthand name: rsphrrating
  • Index this field: unchecked
  • Display field: checked
  • Enable advanced search: checked
  • Exiftool field: leave empty

Date

  • Resource type: photo
  • Field type: Date and optional time
  • Shorthand name: iptcdate
  • Index this field: checked
  • Display field: checked
  • Enable advanced search: unchecked
  • Exiftool field: DateTimeOriginal

Keywords - Other

  • Resource type: Global
  • Field type: Text box (multiple-line)
  • Shorthand name: iptckeywords
  • Index this field: checked
  • Display field: checked
  • Enable advanced search: unchecked
  • Exiftool field: Keywords

Credit

  • Resource type: Photo
  • Field type: Text box (single line)
  • Shorthand name: iptccredit
  • Index this field: checked
  • Display field: checked
  • Enable advanced search: checked
  • Exiftool field: Credit,By-line

Copyright Notice

  • Resource type: Photo
  • Field type: Text box (single line)
  • Shorthand name: iptccopynotice
  • Index this field: checked
  • Display field: checked
  • Enable advanced search: checked
  • Exiftool field: CopyrightNotice

Caption

  • Resource type: Photo
  • Field type: Text box (multiple-line)
  • Shorthand name: iptccaption
  • Index this field: checked
  • Display field: checked
  • Enable advanced search: checked
  • Exiftool field: Caption-Abstract,Description,ImageDescription

Named person(s)

  • Resource type: Photo
  • Field type: Text box (single line)
  • Shorthand name: person
  • Index this field: checked
  • Display field: checked
  • Enable advanced search: checked
  • Exiftool field: People

Keywords - Subject

  • Resource type: Global
  • Field type: Checkbox list
  • Shorthand name: subject
  • Index this field: checked
  • Display field: checked
  • Enable advanced search: checked
  • Exiftool field: none

Keywords - Event

  • Resource type: Global
  • Field type: Checkbox list
  • Shorthand name: subject
  • Index this field: checked
  • Display field: checked
  • Enable advanced search: checked
  • Exiftool field: none

Keywords - Emotion

  • Resource type: Global
  • Field type: Checkbox list
  • Shorthand name: emotion
  • Index this field: checked
  • Display field: checked
  • Enable advanced search: checked
  • Exiftool field: none

HR image height

Original image height. Not to be confused with the height of the images in each of their respective formats in resourcespace, this is EXIF camera metada.

  • Resource type: Photo
  • Field type: Text box (single line)
  • Shorthand name: exifhrheight
  • Index this field: unchecked
  • Display field: checked
  • Enable advanced search: checked
  • Exiftool field: none

HR image width

Original image height. Not to be confused with the height of the images in each of their respective formats in resourcespace, this is EXIF camera metada.

  • Resource type: Photo
  • Field type: Text box (single line)
  • Shorthand name: exifhrwidth
  • Index this field: unchecked
  • Display field: checked
  • Enable advanced search: checked
  • Exiftool field: ExifImageWidth

Camera make / model/

  • Resource type: Photo
  • Field type: Text box (single line)
  • Shorthand name: exifhrwidth
  • Index this field: unchecked
  • Display field: unchecked
  • Enable advanced search: checked
  • Exiftool field: Model

Image rating

  • Resource type: Photo
  • Field type: Drop down list
  • Shorthand name: phrrating
  • Index this field: unchecked
  • Display field: unchecked
  • Enable advanced search: checked
  • Exiftool field: none

Orientation (portrait/landscape)

This is not EXIF orientation data, orientation field is a special RS field automatically populated during image upload (possible values: portrait, landscape, square).

This field could be a text field ; the dropdown set up is just a convenient way to allow modification if necessary.

  • Resource type: Photo
  • Field type: Drop down list (options: portrait, landscape, square)
  • Shorthand name: rsorientation
  • Index this field: unchecked
  • Display field: unchecked
  • Enable advanced search: checked
  • Exiftool field: none

Orientation (EXIF)

EXIF orientation data.

  • Resource type: Photo
  • Field type: Text box (single line)
  • Shorthand name: exiforientation
  • Index this field: unchecked
  • Display field: unchecked
  • Enable advanced search: checked
  • Exiftool field: Orientation

Configure config.php

$data_joins

All additional photo metadata fields ID need to be specified to allow ResourceSpace API to expose them.

Example:
$data_joins=array(1,3,8,10,12,18,29,51,52,73,74,75,84,85,86,90,91,92,93,94,95,96);

$portrait_landscape_field

Ability to set a field which will store 'Portrait', 'Landscape', 'square' depending on image dimensions.

Example:
$portrait_landscape_field=96;

Install the MODX plugin for ResourceSpace

The MODX plugin is a customized ResourceSpace API with some enhancement. Download it and install it (System > Manage plugins > Select a .rsp file to install > Upload plugin button.

Create a user group and a user

Create a user group with the following settings:

s,v,g,q,f*,F*,ea0,ea1,ea2,ea3,D,A,h,hdt_ug,j*,p,Ra,e,dta

Create a user and put it in the above usergroup:

2. xRS extra installation

Install ResourceSpace extra with the MODX installer.

3. System settings

Add the following system settings:

rs_apikey

Private API key attached to RS guest_api user (to get on the Edit user page in RS).

rs_url

ResourceSpace URL with traling slash (/).

For xRS:
https://myresourcespace.net/plugins/modx/

For xRSplus:
https://myresourcespace.net/

rs_cachehandler

Cache handler method. Example:
xPDOFileCache

4. Run your first test

You can run your first test using the xrs single action using debug mode to check ResourceSpace response.