xRS MODX extra

Debug mode

Logo ResourceSpace Logo Wordpress Logo Prestashop Logo Joomla

Show response and placeholders

The xRS debug mode allow to display ResourceSpace JSON response and placeholders.

Please note value filters are not applied here. For exemple the RS API for the field [[+iptccountry]] returns ,France (note the comma) and ResourceSpace extra filter the placeholder output to display France (without the comma).

[[xrs?
    &action=`single`
    &rsid=`132`
    &tpl=`debug`
]]

Debug mode ON

JSON:
{"ref":"132","title":"","resource_type":"1","has_image":"1","is_transcoding":"0","hit_count":"658","new_hit_count":"736","creation_date":"2019-07-19 15:59:36","rating":"","user_rating":"","user_rating_count":"","user_rating_total":"","country":"","file_extension":"jpg","preview_extension":"jpg","image_red":"931","image_green":"510","image_blue":"44","thumb_width":"150","thumb_height":"100","archive":"0","access":"0","colour_key":"EWKN","created_by":"2","file_path":"","file_modified":"2019-07-19 16:00:08","file_checksum":"","request_count":"0","expiry_notification_sent":"0","preview_tweaks":"0|1","geo_lat":"","geo_long":"","mapzoom":"","disk_usage":"2231580","disk_usage_last_updated":"2020-06-11 11:22:41","file_size":"586245","preview_attempts":"0","modified":"2019-08-23 21:09:22","last_verified":"","integrity_fail":"0","iptcdate":"2005-08-24 11:07","iptctitle":"Edogawa River Office building","iptccountry":",Japan","originalfilename":"001-000053.001.jpg","iptckeywords":"001-000053, 2005, asia, building, center, Edogawa, facility, flood, G-Cans, industrial tourism, japan, office, outside, prevention, pump, tank, tokyo","iptccredit":"Jean-Philippe DAIN","iptccaption":"Edogawa River Office building (G-Cans control center) and Showa pump, Kasukabe City, Saitama prefecture, Japan. G-Cans is the water collecting system part of a massive underground system intended to collect water in the greater Tokyo area in order to prevent floods (Geo-Site). The G-Cans project works started in 1992 ; it consists of five concrete containment silos with a height of 65 m and a diameter of 32 m, connected by 6.4 km of tunnels, 50 m beneath the surface, as well as a large water tank with a height of 25.4m, with a length of 177m, with a width of 78m, and with 59 massive pillars connected to a number of 14,000 horsepower (10 MW) turbines that can pump up to 200 tons of water into the Edogawa river per second. The G-Cans installations are also a tourist attraction, and can be visited for free. The main water tank resembles a temple and has been used in some movies and TV programs to create mystic scenes.","person":"","subject":"","event":"","emotion":"","iptcheadline":"G-Cans Flood Prevention System","iptccity":"Kasukabe City","exifhrheight":"2336","exifcamera":"Canon EOS 20D","phrrating":"5","rsorientation":",Landscape","exifhrwidth":"3504","exiforientation":"Horizontal (normal)","iptcstate":"Saitama prefecture","iptccountrycode":"JPN","iptccopynotice":"Jean-Philippe Dain"}

Available variables for CHUNK:
[[+ref]] = 132
[[+title]] =
[[+resource_type]] = 1
[[+has_image]] = 1
[[+is_transcoding]] = 0
[[+hit_count]] = 658
[[+new_hit_count]] = 736
[[+creation_date]] = 2019-07-19 15:59:36
[[+rating]] =
[[+user_rating]] =
[[+user_rating_count]] =
[[+user_rating_total]] =
[[+country]] =
[[+file_extension]] = jpg
[[+preview_extension]] = jpg
[[+image_red]] = 931
[[+image_green]] = 510
[[+image_blue]] = 44
[[+thumb_width]] = 150
[[+thumb_height]] = 100
[[+archive]] = 0
[[+access]] = 0
[[+colour_key]] = EWKN
[[+created_by]] = 2
[[+file_path]] =
[[+file_modified]] = 2019-07-19 16:00:08
[[+file_checksum]] =
[[+request_count]] = 0
[[+expiry_notification_sent]] = 0
[[+preview_tweaks]] = 0|1
[[+geo_lat]] =
[[+geo_long]] =
[[+mapzoom]] =
[[+disk_usage]] = 2231580
[[+disk_usage_last_updated]] = 2020-06-11 11:22:41
[[+file_size]] = 586245
[[+preview_attempts]] = 0
[[+modified]] = 2019-08-23 21:09:22
[[+last_verified]] =
[[+integrity_fail]] = 0
[[+iptcdate]] = 2005-08-24 11:07
[[+iptctitle]] = Edogawa River Office building
[[+iptccountry]] = Japan
[[+originalfilename]] = 001-000053.001.jpg
[[+iptckeywords]] = 001-000053, 2005, asia, building, center, Edogawa, facility, flood, G-Cans, industrial tourism, japan, office, outside, prevention, pump, tank, tokyo
[[+iptccredit]] = Jean-Philippe DAIN
[[+iptccaption]] = Edogawa River Office building (G-Cans control center) and Showa pump, Kasukabe City, Saitama prefecture, Japan. G-Cans is the water collecting system part of a massive underground system intended to collect water in the greater Tokyo area in order to prevent floods (Geo-Site). The G-Cans project works started in 1992 ; it consists of five concrete containment silos with a height of 65 m and a diameter of 32 m, connected by 6.4 km of tunnels, 50 m beneath the surface, as well as a large water tank with a height of 25.4m, with a length of 177m, with a width of 78m, and with 59 massive pillars connected to a number of 14,000 horsepower (10 MW) turbines that can pump up to 200 tons of water into the Edogawa river per second. The G-Cans installations are also a tourist attraction, and can be visited for free. The main water tank resembles a temple and has been used in some movies and TV programs to create mystic scenes.
[[+person]] =
[[+subject]] =
[[+event]] =
[[+emotion]] =
[[+iptcheadline]] = G-Cans Flood Prevention System
[[+iptccity]] = Kasukabe City
[[+exifhrheight]] = 2336
[[+exifcamera]] = Canon EOS 20D
[[+phrrating]] = 5
[[+rsorientation]] = Landscape
[[+exifhrwidth]] = 3504
[[+exiforientation]] = Horizontal (normal)
[[+iptcstate]] = Saitama prefecture
[[+iptccountrycode]] = JPN
[[+iptccopynotice]] = Jean-Philippe Dain
[[+imgref]] = 001-000053.001
[[+url]] = https://photoarchives.jpdn.net/filestore/1/3/2_a102b65dd4f5f3c/132_ac644a210aa2ef6.jpg
[[+newimg]] = https://www.jpdn.net/assets/image-cache/pthumb/filestore/1/3/2_a102b65dd4f5f3c/132_ac644a210aa2ef6.7d916815.jpg

ResourceSpace limitations

Caption field

By default ResourceSpace mirror the first 200 chararacters of IPTC caption field into a table named resource.

The API resturns this caption excerpt by default ; it is possible to get the full caption with some modifications.

You have already uploaded images in RS

1) Via phpMyAdmin, delete caption data in table resource_data :
UPDATE `resource_data` SET `value`='' WHERE `resource_type_field`=[id]. Replace [id] with the ID of the IPTC caption field (18 by default).

2) In your RS config.php file, change the setting $resource_field_column_limit to your new chars limit (e.g. 1000):
$resource_field_column_limit=1000;

3) In phpMyAdmin, increase the lenght of the field to the same limit for the field[id]:

4) Run the RS update_exiftool_field.php utility, passig the field ID [id] with the following parameters:
https://your-resourcespace.net/pages/tools/update_exiftool_field.php?fieldrefs=[id]&blanks=false&overwrite

You have not downloaded any images yet

Just start to step 2