Search results
Smart featured collections
Smart featured collections are an automated way of collating resources with a common theme.
Writing your own plugins
A plugin in ResourceSpace is a collection of PHP code, language files, graphics, CSS files and other related files that are structured to conform to the ResourceSpace plugin architecture. For deployment, the files that constitute a plugin are packaged together into a self-contained file called a ResourceSpace Plugin (.
Advanced workflow
workflow, process, publish, embargo, archive, review,state, status
API
ResourceSpace implements a RESTful API that returns JSON. All requests must be signed using a shared private key specific to each user. This can be performed via GET or POST.
Installation overview
The article provides an overview of the installation process for ResourceSpace, a standard PHP/MySQL application. The installation process is similar to other PHP/MySQL applications, and most issues encountered relate to the default php.
Creating custom reports
ResourceSpace allows users to create custom reports by writing SQL queries. Reports can be created in Admin > System > Reports, and existing reports can be viewed and edited from the same location. Users can create reports that show resources pending submission, and reports that allow date range selection.
Configuring for multi-client use
The article provides a method for setting up ResourceSpace as an environment where multiple users can use the system, but their resources remain private from each other. The method involves creating a new global field called 'client' that can be attached to all types of resources.
StaticSync - keep your files in situ
StaticSync is a tool that allows users to keep their files in situ, meaning that they can remain in their existing folder structure. It is not intended to be used as a way to store resources externally to increase storage capability.
Simple SAML
This plugin allows users to log on to ResourceSpace using a SAML compliant single sign-on (SSO) Identity Provider (IdP)
Metadata read/write mapping
ResourceSpace can map between embedded metadata stored in original files and the metadata fields in ResourceSpace itself. This synchronisation can be two-way, so that imported metadata can be automatically extracted into a configured field, but also that metadata added to the resource after import is written back to the file at download.
CSV user import
The CSV user import plugin allows administrators to create user accounts in bulk based on information stored in a CSV file. The CSV file must be encoded in UTF-8 format and without BOM, and should have text cells quoted in case they contain commas or other special characters.
Falcon link
The Falcon Link plugin allows users to publish resources as templates in Falcon.io. However, users must have an account with Falcon.io to use this plugin. The plugin creates a share link with no expiration date instead of copying the file itself when a resource is published to Falcon.
Basic metadata field configuration
This article provides an overview of the basic options for metadata field configuration in ResourceSpace. The article covers the following options: Enabled, Required, Index, Display full width on view page, Display field, Enable advanced search, Enable simple search, May contain personal data, Hide when uploading, and Hide when restricted.
IIIF
IIIF is an API specification that aims to improve interoperability between digital image repositories. ResourceSpace provides basic support for the IIIF presentation API, which was originally created to link with the TMS plugin to enable publishing of resources related to a specified TMS object as a IIIF manifest.
The config file
The article provides an overview of the configuration file for ResourceSpace, which can be found in the 'include' folder. The file contains various PHP variables that can be changed to configure the system.
File integrity checking
ResourceSpace has a tool to verify the file integrity of primary resource files, which notifies users of any corruption and allows them to take remedial action. To configure the system to check file integrity, users need to have full file checksums configured, the ResourceSpace cron script configured to run frequently as a cron task or scheduled task, and the file integrity verify window enabled to set the hours between which the script will run.
Checksums
Checksums are a sequence of numbers and letters that are produced by running a file through an algorithm that uses a cryptographic hash to create a unique identifier. Even the slightest change in the original file will produce a different checksum, making them useful for ensuring file integrity and preventing resource duplication.
Creating and editing filters
Creating and editing filters. Filters can be set to control access to resources
Wordpress integration
A new WordPress plugin has been developed that allows users to embed resource files from ResourceSpace in their posts. The plugin was funded by ADRA International and developed by Codecide. To install the plugin, users should download the WordPress plugin zip file, navigate to Plugins->Add plugins from the WordPress Admin menu and click 'Upload plugin', or manually upload the zip file to the wp-content/plugins directory of the WordPress installation.
User IP restriction
ResourceSpace allows users to limit the locations from which their users access the platform by applying an IP restriction to user accounts. This is done on a per-user basis, allowing tighter controls on certain accounts where necessary.
Prepared statements
ResourceSpace, an open-source digital asset management software, has announced that all new code must use prepared statements for any SQL execution. The new functions ps_query(), ps_array() and ps_value() replace functions sql_query(), sql_array() and sql_value() respectively.
OpenAI GPT
OpenAI's GPT language model has been integrated into ResourceSpace, a digital asset management system, to automate metadata processing tasks. The plugin allows users to use GPT to populate metadata fields based on data stored in another field.
Configuring image alternatives
The article discusses configuring image alternatives using the "$image_alternatives" configuration option, similar to video file alternatives. This setting controls the options for ImageMagick utility to create alternative image formats/sizes.
Table: node
Table: node
createAnnotation()
Developer reference for function createAnnotation()
updateAnnotation()
Developer reference for function updateAnnotation()
addAnnotationNodes()
Developer reference for function addAnnotationNodes()
iiif_get_canvases()
Developer reference for function iiif_get_canvases()
iiif_get_image()
Developer reference for function iiif_get_image()
get_user_collections()
Developer reference for function get_user_collections()
add_resource_to_collection()
Developer reference for function add_resource_to_collection()
save_collection()
Developer reference for function save_collection()
get_smart_themes_nodes()
Developer reference for function get_smart_themes_nodes()
generate_collection_access_key()
Developer reference for function generate_collection_access_key()
get_saved_searches()
Developer reference for function get_saved_searches()
add_saved_search_items()
Developer reference for function add_saved_search_items()
swap_collection_order()
Developer reference for function swap_collection_order()
update_collection_order()
Developer reference for function update_collection_order()
save_collection_resource_comment()
Developer reference for function save_collection_resource_comment()
relate_to_collection()
Developer reference for function relate_to_collection()
edit_collection_external_access()
Developer reference for function edit_collection_external_access()
show_hide_collection()
Developer reference for function show_hide_collection()
collection_download_use_original_filenames_when_downloading()
Developer reference for function collection_download_use_original_filenames_when_downloading()
collection_download_process_text_file()
Developer reference for function collection_download_process_text_file()
collection_download_process_data_only_types()
Developer reference for function collection_download_process_data_only_types()
collection_download_process_summary_notes()
Developer reference for function collection_download_process_summary_notes()
collection_download_process_csv_metadata_file()
Developer reference for function collection_download_process_csv_metadata_file()
collection_download_process_archive_command()
Developer reference for function collection_download_process_archive_command()
collection_cleanup_inaccessible_resources()
Developer reference for function collection_cleanup_inaccessible_resources()
relate_all_collection()
Developer reference for function relate_all_collection()
update_collection_type()
Developer reference for function update_collection_type()
get_user_selection_collection()
Developer reference for function get_user_selection_collection()
comments_submit()
Developer reference for function comments_submit()
validate_field()
Developer reference for function validate_field()
set_config_option()
Developer reference for function set_config_option()
get_config_option()
Developer reference for function get_config_option()
get_config_options()
Developer reference for function get_config_options()
config_generate_AutoSaveConfigOption_function()
Developer reference for function config_generate_AutoSaveConfigOption_function()
create_dash_tile()
Developer reference for function create_dash_tile()
update_dash_tile()
Developer reference for function update_dash_tile()
delete_dash_tile()
Developer reference for function delete_dash_tile()
revoke_all_users_flag_cascade_delete()
Developer reference for function revoke_all_users_flag_cascade_delete()
update_default_dash_tile_order()
Developer reference for function update_default_dash_tile_order()
get_tile()
Developer reference for function get_tile()
all_user_dash_tile_active()
Developer reference for function all_user_dash_tile_active()
existing_tile()
Developer reference for function existing_tile()
get_alluser_available_tiles()
Developer reference for function get_alluser_available_tiles()
get_managed_dash()
Developer reference for function get_managed_dash()
add_usergroup_dash_tile()
Developer reference for function add_usergroup_dash_tile()
append_usergroup_position()
Developer reference for function append_usergroup_position()
reorder_usergroup_dash()
Developer reference for function reorder_usergroup_dash()
update_usergroup_dash_tile_order()
Developer reference for function update_usergroup_dash_tile_order()
get_usergroup_available_tiles()
Developer reference for function get_usergroup_available_tiles()
get_usergroup_tile()
Developer reference for function get_usergroup_tile()
add_user_dash_tile()
Developer reference for function add_user_dash_tile()
get_user_tile()
Developer reference for function get_user_tile()
update_user_dash_tile_order()
Developer reference for function update_user_dash_tile_order()
delete_user_dash_tile()
Developer reference for function delete_user_dash_tile()
empty_user_dash()
Developer reference for function empty_user_dash()
reorder_user_dash()
Developer reference for function reorder_user_dash()
append_user_position()
Developer reference for function append_user_position()
get_user_available_tiles()
Developer reference for function get_user_available_tiles()
get_user_dash()
Developer reference for function get_user_dash()
render_dash_tile_colour_chooser()
Developer reference for function render_dash_tile_colour_chooser()
delete_usergroup_dash_tile()
Developer reference for function delete_usergroup_dash_tile()
sql_query_prepared()
Developer reference for function sql_query_prepared()
prepareFaceImage()
Developer reference for function prepareFaceImage()
faceRecognizerPredict()
Developer reference for function faceRecognizerPredict()
job_queue_get_jobs()
Developer reference for function job_queue_get_jobs()
remove_accents()
Developer reference for function remove_accents()
perform_login()
Developer reference for function perform_login()
message_send_unread_emails()
Developer reference for function message_send_unread_emails()
migrate_category_tree_to_nodes()
Developer reference for function migrate_category_tree_to_nodes()
get_root_node_by_leaf()
Developer reference for function get_root_node_by_leaf()
add_node_keyword()
Developer reference for function add_node_keyword()
add_resource_nodes()
Developer reference for function add_resource_nodes()
add_resource_nodes_multi()
Developer reference for function add_resource_nodes_multi()
get_resource_nodes()
Developer reference for function get_resource_nodes()
delete_resource_nodes()
Developer reference for function delete_resource_nodes()
get_parent_nodes()
Developer reference for function get_parent_nodes()
get_node_id()
Developer reference for function get_node_id()
activate_plugin()
Developer reference for function activate_plugin()
deactivate_plugin()
Developer reference for function deactivate_plugin()
get_plugin_yaml()
Developer reference for function get_plugin_yaml()
get_plugin_config()
Developer reference for function get_plugin_config()
set_plugin_config()
Developer reference for function set_plugin_config()
config_gen_setup_post()
Developer reference for function config_gen_setup_post()
include_plugin_config()
Developer reference for function include_plugin_config()
render_search_field()
Developer reference for function render_search_field()
render_actions()
Developer reference for function render_actions()
display_field()
Developer reference for function display_field()
render_resource_image()
Developer reference for function render_resource_image()
render_question_div()
Developer reference for function render_question_div()
check_display_condition()
Developer reference for function check_display_condition()
display_field_data()
Developer reference for function display_field_data()
render_resource_lock_link()
Developer reference for function render_resource_lock_link()
get_reports()
Developer reference for function get_reports()
unsubscribe_user_from_periodic_report()
Developer reference for function unsubscribe_user_from_periodic_report()
gen_custom_fields_html_props()
Developer reference for function gen_custom_fields_html_props()
process_custom_fields_submission()
Developer reference for function process_custom_fields_submission()
get_resource_path()
Developer reference for function get_resource_path()
put_resource_data()
Developer reference for function put_resource_data()
save_resource_data()
Developer reference for function save_resource_data()
update_field()
Developer reference for function update_field()
delete_resource()
Developer reference for function delete_resource()
get_resource_field_data_batch()
Developer reference for function get_resource_field_data_batch()
copy_resource()
Developer reference for function copy_resource()
resource_log()
Developer reference for function resource_log()
get_resource_log()
Developer reference for function get_resource_log()
get_resource_custom_access()
Developer reference for function get_resource_custom_access()
get_resource_custom_access_users_usergroups()
Developer reference for function get_resource_custom_access_users_usergroups()
get_themes_by_resource()
Developer reference for function get_themes_by_resource()
update_resource()
Developer reference for function update_resource()
add_alternative_file()
Developer reference for function add_alternative_file()
delete_alternative_file()
Developer reference for function delete_alternative_file()
get_field()
Developer reference for function get_field()
edit_resource_external_access()
Developer reference for function edit_resource_external_access()
get_metadata_templates()
Developer reference for function get_metadata_templates()
autocomplete_blank_fields()
Developer reference for function autocomplete_blank_fields()
get_resource_files()
Developer reference for function get_resource_files()
get_page_count()
Developer reference for function get_page_count()
get_original_imagesize()
Developer reference for function get_original_imagesize()
generate_resource_access_key()
Developer reference for function generate_resource_access_key()
update_archive_status()
Developer reference for function update_archive_status()
get_image_sizes()
Developer reference for function get_image_sizes()
get_data_by_field()
Developer reference for function get_data_by_field()
get_resource_type_fields()
Developer reference for function get_resource_type_fields()
checkPreviewToolsOptionUniqueness()
Developer reference for function checkPreviewToolsOptionUniqueness()
search_form_to_search_query()
Developer reference for function search_form_to_search_query()
search_special()
Developer reference for function search_special()
str_highlight()
Developer reference for function str_highlight()
delete_filter()
Developer reference for function delete_filter()
render_audio_download_link()
Developer reference for function render_audio_download_link()
generate_featured_collection_image_urls()
Developer reference for function generate_featured_collection_image_urls()
update_collection_parent()
Developer reference for function update_collection_parent()
featured_collection_check_access_control()
Developer reference for function featured_collection_check_access_control()
get_featured_collections_by_resources()
Developer reference for function get_featured_collections_by_resources()
get_resource_data_batch()
Developer reference for function get_resource_data_batch()
compute_featured_collections_access_control()
Description Compute the featured collections allowed based on current access control TRUE if user has access to all featured collections. If some access control is in place, then the return will be an array with all the allowed featured collections Parameters This function accepts no parameters.
cleanup_anonymous_collections()
Description Remove all old anonymous collections Parameters Column Type Default Description $limit int 100 Maximum number of collections to delete - if run from browser this is kept low to avoid delays Return void Location include/collections_functions.
get_nodes_by_refs()
Description Find and return node details for a list of node IDs. Parameters Column Type Default Description $refs array List of node IDs Return array Location include/node_functions.
purge_expired_shares()
Description Purge all expired shares "share_group" - (int) Usergroup ref 'shared as' "share_user" - (int) user ID of share creator "share_type" - (int) 0=view, 1=upload "share_collection" - (int) Collection ID Parameters Column Type Default Description $filteropts array Array of options to filter shares purged Return string|int Location include/collections_functions.
get_external_shares()
Description Get details of external shares "share_group" - (int) Usergroup ref 'shared as' "share_user" - (int) user ID of share creator "share_order_by" - (string) order by column "share_sort" - (string) sortorder (ASC or DESC) "share_type" - (int) 0=view, 1=upload "share_collection" - (int) Collection ID "share_resource" - (int) Resource ID "access_key" - (string) Access key "ignore_permissions"- (bool) Show all shares, irrespective of permissions Parameters Column Type Default Description $filteropts array Array of options to filter shares returned Return array Location include/resource_functions.
rs_password_verify()
Description ResourceSpace verify password value is the actual value for that variable. Parameters Column Type Default Description $password string Password $hash string Password hash $data array Extra data required for matching hash expectations (e.
exiftool_resolution_calc()
Description Extract and store dimensions, resolution, and unit (if available) from exif data Exiftool output format (tab delimited): widthxheight resolution unit (e.g., 1440x1080 300 inches) Parameters Column Type Default Description $file_path string Path to the original file.
collection_add_resources()
Description Add resource(s) $resources to collection $collection Parameters Column Type Default Description $collection mixed $resources mixed '' $search '' $selected false Return boolean | string Location include/collections_functions.
reorder_collections()
Description Re-order collections Parameters Column Type Default Description $refs array List of collection IDs in the new order Return void Location include/collections_functions.
clean_comment_tree()
Description Check all comments that are children of the comment ref provided. If there is a branch made up entirely of hidden comments then remove the branch. Parameters Column Type Default Description $ref int Ref of the comment that is being deleted.
find_root_comment()
Description Find the root of a comment tree that the ref provided is a part of Parameters Column Type Default Description $ref int ref of a comment Return int|null ref of the root comment or null if the comment tree has been completely removed / the comment being checked has already been deleted.
delete_unused_non_fixed_list_nodes()
Description Delete unused non-fixed list field nodes with a 1:1 resource association Parameters Column Type Default Description $resource_type_field integer Resource type field (metadata field) ID Location include/node_functions.
get_nodes_use_count()
The get_nodes_use_count() function is a PHP function in ResourceSpace that returns an array of node references as keys and the number of resources using them as values. The function takes an array of node references as input and filters out any non-integer values.
render_fa_icon_selector()
render_fa_icon_selector()
get_tabs_by_refs()
The get_tabs_by_refs() function is a PHP function that retrieves entire tab records for a list of IDs. The function takes an array of tab refs as a parameter and returns an array of tab records. The function first filters the array of tab refs to remove any non-integer values.
get_tab_name_options()
The article describes a function called `get_tab_name_options()` that returns a list of all tabs sorted based on the current configuration. The function takes no parameters and returns an array where the key is the tab's ID and the value is its translated name.
create_tab()
The create_tab() function is used to create a new system tab record. The function takes an array as a parameter, which contains the name of the new tab. The function first checks if the user has permission to manage tabs and then inserts the new tab into the database.
delete_tabs()
The delete_tabs() function is a system function that deletes tabs in ResourceSpace. The function takes an array of tab IDs as input and returns a boolean value indicating whether the query was executed successfully or not.
save_tab()
The `save_tab()` function is used to update an existing tab in ResourceSpace. It takes an array of tab records as input and returns a boolean value indicating whether the query was executed successfully or not.
can_use_owner_field()
The can_use_owner_field() function is used for initialization and system checks to ensure that the configuration is correctly enabled to use the owner field and mappings logic. The function accepts no parameters and returns a boolean value.
get_resources_nodes_by_rtf()
The get_resources_nodes_by_rtf() function is a PHP function that retrieves all resource nodes associated with a specific resource type field. The function takes a single parameter, which is the resource type field ID.
update_smart_collection()
update_smart_collection()
data_joins_field_value_translate_and_csv()
The function `data_joins_field_value_translate_and_csv()` is used to convert `$data_joins` value to a user-friendly version. The text value is split by the configured separator and all parts are translated.
can_edit_tile()
The can_edit_tile() function checks whether the current user can edit a dashboard tile. If the tile is only visible to the user, the function checks whether the user is the owner of the tile. If the tile is visible to all users, the function checks whether the user has dashboard admin permissions.
remove_config_option()
Description Remove system/user preferences Parameters Column Type Default Description $user_id ?int Database user ID $name: string $name string Configuration option (variable) name Location include/config_functions.
unrelate_all_collection()
Description Un-relate all resources in a collection Parameters Column Type Default Description $collection integer ID of collection $checkperms true Return boolean Location include/collections_functions.
admin_resource_type_field_option()
Parameters Column Type Default Description $propertyname string $propertytitle string $helptext string $type $currentvalue $fieldtype int $system_date_field bool $resource_type_array; $lang $baseurl_short $FIXED_LIST_FIELD_TYPES $daterange_edtf_support $allfields $newfield $resource_type_array $existingrestypes $regexp_slash_replace Location include/render_functions.
resource_random_jpg()
Description Generates a random JPEG image for a given resource with random background color and text. This function creates an image of specified dimensions with a random background color and text indicating the resource reference.
get_resource_type_field_columns()
Description Get the definitions for resource_type_field columns, including properties and display configurations. Parameters This function accepts no parameters. Return array An associative array of resource type field column definitions.
delete_config_option()
Description Delete entry from the user_preferences table completely (instead of setting to blank via set_config_option). Used by system preferences page when deleting a file to allow fallback to value (if set) in config.
get_all_parents_by_leaf()
Description Build a row consisting of all parents of a given leaf node Example: 1 2 2.3 2.7 2.8.4 2.8.5 2.8.6 2.9 3 Passing in node 5 will return nodes 8,2 in one row Parameters Column Type Default Description $ref integer Node ID of tree leaf $level integer Node depth level (as returned by get_tree_node_level()) Return integer|boolean Location include/node_functions.
get_all_ancestors_for_node()
Description Return a row consisting of all ancestor nodes of a given node Example: 1 2 2.3 2.7 2.8.4 2.8.5 2.8.6 2.9 3 Passing in node 5 will return nodes 8,2 in one row Parameters Column Type Default Description $ref integer A tree node $level integer Node depth level (as returned by get_tree_node_level()) Return array|boolean Location include/node_functions.
is_positive_int_loose()
Description Helper function to check if value is a positive integer looking type. Parameters Column Type Default Description bool { $V: * 'is_positive_or_zero_int_loose'; } /** $ip_restrict $V int|float|string Value to be tested This article was last updated 5th August 2025 08:35 Europe/London time based on the source file dated 1st August 2025 13:40 Europe/London time.
add_download_column()
Description Render the Download info for the resource tool (on view page) Parameters Column Type Default Description $ref int Resource ref $size_info array Preview size information $downloadthissize bool Should the size be downloadable or requested? $view_in_browser bool false Allow the size to be viewed directly in the browser Location include/render_functions.
render_resource_view_image()
Description Render image on view.php "access" - Resource access "edit_access" - Resource edit access Parameters Column Type Default Description $resource array Resource data $context array Array with following named elements Return void * Location include/render_functions.
update_node_active_state()
Description Batch update nodes' active state to the database. The same state will apply to all nodes in the list. For logic on which nodes to toggle {@see toggle_active_state_for_nodes()} Parameters Column Type Default Description $refs list Node IDs $active: bool $active bool Should nodes be active or not? Location include/node_functions.
toggle_active_state_for_nodes()
Description Toggle nodes' active state Parameters Column Type Default Description $refs: array 'ref' 'asc' '' [FIELD_TYPE_CATEGORY_TREE] 'ref'; $refs list Node IDs Return array<int, 0|1> Location include/node_functions.
i18n_merge_translations()
Description Merge values for across multiple translation strings. Where a value is missing for a language used elsewhere i18n_get_translated will be used. If no value is provided and no English (en) string is found then blank will be returned.
validate_resource_files()
Description Validate the files on disk that are associated with the given resources array of resource data e.g, from search results required return values in order to pass the check e.
check_resources()
Description Check integrity of primary resource files then file checksums will be checked Parameters Column Type Default Description $resources array [] Array of resource data e.
reorder_all_featured_collections_with_parent()
Description Re-order all featured collections at a particular tree depth. Parameters Column Type Default Description $parent: ?int ['i' $sql_where_parent->parameters c.
is_valid_rs_path()
Description Check if a given file path is from a valid RS accessible location Parameters Column Type Default Description $path string $override_paths array []: bool { debug_function_call__FUNCTION__ Override checking of the default RS paths to check a specific location only.
render_resource_tools_size_download_options()
Description Render the resource tools for preview sizes Parameters Column Type Default Description $resource array Resource data - {@see get_resource_data()} $ctx: array false $resource['file_extension'] false; bool, array{'download_multisize': "sizes"?: array, 'urlparams': array} $ctx Contextual information.
RenderPlugin()
Description Render the plugin in the Plugin Manager with options to activate and configure. Parameters Column Type Default Description $plugin array An array containing the plugin data, loaded from the plugin table $active boolean true If true, display options to deactivate and allow group configuration Return void Location include/plugin_functions.
File management (uploads)
The article emphasizes the importance of following OWASP best practices for file management, particularly during uploads. It introduces functions in ResourceSpace that aid in handling file processing, such as process_file_upload for moving files to desired destinations, parse_filename_extension for extracting file extensions, and functions like is_banned_extension and check_valid_file_extension to control the types of files that can be uploaded.
process_collection_download()
Description Generate a collection download ZIP file and the download filename This array will be updated and passed to subsidiary functions to keep track of processed file, generate text etc.
set_usergroup_config_option()
Description Save or update config option for user group. Parameters Column Type Default Description $usergroup_id int User group id $param_name string Config parameter name $param_value: ?string $param_value string Config parameter value Location include/config_functions.
get_usergroup_parent_for_inherit_flag()
Description Check if the usergroup has a parent and the specified inherit flag is in use e.g. user group inherits permissions from parent. Parameters Column Type Default Description $usergroup_id int User group of the current user / user group to test.
create_annotated_pdf()
Description Create annotations PDF (old annotate plugin logic) Parameters Column Type Default Description $ref int $is_collection bool false $size string "letter" $cleanup bool false $preview bool false Location include/annotation_functions.