Every config file has its own parameters that need to be changed with the our project environment.
Changing the parameters of Dédalo backend config file
config4.php
1
Locate the file into the directory: /dedalo/lib/dedalo/config/
cd /dedalo/lib/dedalo/config/
2
Edit the config4.php
nano config4.php
3
Locate and change the PROPERTY with the proper configuration.
Diffusion domain
config4.php
DEDALO_DIFFUSION_DOMAIN
This parameter would be set with the diffusion domain of our project publication, diffusion domain is the target domain or the part of diffusion ontology that will be used to get the tables and fields and the relation components in the back-end.
The definition for diffusion domain in the configuration file can set only one ontology diffusion_domain for our installation, it can have different diffusion groups or diffusion elements with different databases and tables.
string
define('DEDALO_DIFFUSION_DOMAIN', 'default')
Any other ‘section_tipo’ are accepted and it can be other standard tlds used in the ontology like oh1 or ich1. If your institution has a specific tld space in the ontology, you can use your own tld into the DEDALO_DIFFUSION_DOMAIN.
Seting the API web user code for multiple DDBB
config4.php
API_WEB_USER_CODE_MULTIPLE
The access to the public API is controlled with a code that we can define and store into the parameter. This code can be public or private, if you want open access to your public data you can share this code.
The array specifies two key params; 'db_name' and 'code'. The combination of these two params get the access to the data.
array
define('API_WEB_USER_CODE_MULTIPLE' , [
		[
			'db_name'	=> 'dedalo_public',
			'code'		=> 'Udeluf$udj371J2_dj3!udn_ucC29x'
		]
	]);
In a simple installation with only one DDBB you can use the param 'API_WEB_USER_CODE'.
Diffusion languages
config4.php
DEDALO_DIFFUSION_LANGS
This parameter would be set with the diffusion languages, the languages we would like to publish as an output to the public side. As a result, in the target table it would be created a row per language (see some examples in DEDALO PUBLICATION DATA FORMAT).
serialized array
define('DEDALO_DIFFUSION_LANGS', serialize( ['lg-spa','lg-eng'] ));
Dédalo uses the pattern: lg-xxx
lg = identify the term as language
xxx = with the official tld of the ISO 639-6, Alpha-4 code for comprehensive coverage of language variants.
Value Diffusion language
lg-spa Spanish
lg-cat Catalan
lg-eus Basque
lg-eng English
lg-fra French
Resolution levels; going to the deeper information
config4.php
DEDALO_DIFFUSION_RESOLVE_LEVELS
This parameter would be set with the number of resolution levels we would like to accomplish. By default, its value is set to '2' (see a resolution level explanation in image below).
integrer
define('DEDALO_DIFFUSION_RESOLVE_LEVELS', 2)
Every other positive, numerical value will be accepted.
The resolution of linked information that Dédalo can be resolved in the publication process. The information inside Dédalo has a relation model resolved by locators, and one section can have a lot of ramifications to different resources, thesaurus, etc. every linked information from portals or autocompletes is a level of information. The direct linked information to the main level is the first level, the information that is linked to the first level is the second, etc..
Ex: If you have 1 interview of oh with 1 linked image and this image has a person linked as author that has 1 linked toponym for the birthplace. For publishing all linked information will be necessary 3 levels of resolution:
If you increase the value of this parameter, the time needed by Dédalo to resolve the linked data in the publication process will also increase.
Check the publication state
config4.php
skip_publication_state_check
When one user publishes some record, Dédalo checks if this information has changes that are not published, if Dédalo found new data to publish the diffusion process began and the information will be replaced in MySQL. If the register doesn't have new information the process is stopped for this record.
Checking the publication status prevent double, triple o more publications of the same record and all process will be faster (some records will not published), but in some cases can be useful that Dédalo don't check the diffusion state, and perform the publication process for every record has new information or no.
This property configures the publication process to check the new data status or ignore it. This property is stored into the global Dédalo $_SESSION.
integrer
$_SESSION['dedalo4']['config']['skip_publication_state_check'] = 1;
Value skip state check?
0 don't check
1 check
Changing the parameters of Dédalo backend config DB file
config4_db.php
This is the main database config for all Dédalo system, this file is used to configure the connection of both back-end and front-end databases: PostgreSQL (back-end) and MySQL (front-end).. In publication context, the db configuration will be used to get the MySQL connection.
Dédalo needs to transform the information stored in the back-end database to the standard SQL version of the data. This file is used for the system to add, remove and reformat data in the MySQL public database.
1
Locate the file into the directory: /dedalo/lib/dedalo/config/
cd /dedalo/lib/dedalo/config/
2
Edit the config4_db.php
nano config4_db.php
3
Locate and change the PROPERTIES with the proper configuration.
It is recommended to read the official MySQL connection manual before configuring this file
Setting MySQL connection
config4_db.php
MYSQL_DEDALO_HOSTNAME_CONN
Set the hostname of the MySQl server.
string
define('MYSQL_DEDALO_HOSTNAME_CONN', ,'localhost');
Is possible set the hostname with 'localhost' or the name of the server host or use the ip to connect external server
Setting MySQL username
config4_db.php
MYSQL_DEDALO_USERNAME_CONN
Set the username that will use Dédalo to change the MySQl database. The user needs to be the owner of the database because Dédalo needs to create, delete, update any table, records, etc that conform the publication process.
string
define('MYSQL_DEDALO_USERNAME_CONN', ,'dedalo_demo');
The username used in this config file is used only for the back-end, don't use the same user for the public API connection, for the API use a read-only user.
Setting MySQL password
config4_db.php
MYSQL_DEDALO_PASSWORD_CONN
Set the password to connect the MySQl database.
string
define('MYSQL_DEDALO_PASSWORD_CONN' ,'mySuperSecurePassword876543210!');
Is very recommendable to use a strong password for this connection.
Setting MySQL database
config4_db.php
MYSQL_DEDALO_DATABASE_CONN
Set the database name to use to store the public data into MySQl. This database needs to be created before Dédalo connects to it. Dédalo doesn't create databases directly.
string
define('MYSQL_DEDALO_DATABASE_CONN' ,'dedalo_public');
Setting MySQL port
config4_db.php
MYSQL_DEDALO_DB_PORT_CONN
Set the port used in the connection. By default MySQL uses the 3306 port but it is very recommendable to change it to avoid DOS attacks.
string
define('MYSQL_DEDALO_DB_PORT_CONN', ,'3306');
Setting MySQL socket
config4_db.php
MYSQL_DEDALO_SOCKET_CONN
Set the socket used in the connection. The name of the Unix socket file to use for connections made using a named pipe to a local server. The default Unix socket file name is /tmp/mysql.sock.
string
define('MYSQL_DEDALO_SOCKET_CONN', '/tmp/mysql.sock');
Changing the parameters of Dédalo API server config file
server_config_api.php
This config file sets specific values to configure the publication API.
The server API could be on a separate server and therefore you will have to edit and reformulate some existing values in the Dédalo configuration files, such as those for connection to the database or the user code.
1
Locate the file into the directory: ../dedalo/lib/dedalo/publication/server_api/v1/config_api/
cd ../dedalo/lib/dedalo/publication/server_api/v1/config_api/
2
Edit the server_config_api.php.
nano server_config_api.php
3
Locate and change the PROPERTIES with the proper configuration.
Setting the root directory for the API server
server_config_api.php
API_ROOT
Define the main server API directory. This constant is used to set a root directory for access to the files and libs of the server API.
string
define('API_ROOT', dirname(dirname(__FILE__)));
Setting the API entity
server_config_api.php
Set the entity name that is publication data.
string
define('API_ENTITY', 'my_entity');
API_ENTITY
Setting the authorisation code.
server_config_api.php
API_WEB_USER_CODE
Set authorization code that will use in the clients to get API server calls.
The access to the public API is controlled with a code that we can define and store into the parameter. This code can be public or private, if you want open access to your public data you can share this code.
string
define('API_WEB_USER_CODE', '&My_user_code$777');
Setting the default lang of get data
server_config_api.php
WEB_CURRENT_LANG_CODE
Set the default language for get data. If the request to the API don't get information in other language, the API will do a fallback to the language defined here.
string
define('WEB_CURRENT_LANG_CODE', 'lg-eng');
Dédalo uses the pattern: lg-xxx
lg = identify the term as language
xxx = with the official tld of the ISO 639-6, Alpha-4 code for comprehensive coverage of language variants.
Value Diffusion language
lg-spa Spanish
lg-cat Catalan
lg-eus Basque
lg-eng English
lg-fra French
Setting the library path
server_config_api.php
DEDALO_LIB_BASE_PATH
Set the main directory used to load externa libraries like LeafLet, Boostrap or other libraries. This path is a Linux path, a internal path used by php.
string
define('DEDALO_LIB_BASE_PATH', dirname(dirname(dirname(API_ROOT))) );
Setting the library URI
server_config_api.php
DEDALO_LIB_BASE_URL
Set the main directory used to load externa libraries like LeafLet, Boostrap or other library. This path is a uri path, external path will used by the browser to get the libraries.
string
define('DEDALO_LIB_BASE_URL', '/dedalo/lib/dedalo');
Setting a fixed filter for publication column
server_config_api.php
PUBLICACION_FILTER_SQL
Set a global filter to the publication records. It will be apply only to the publication column.
array of strings
define('PUBLICACION_FILTER_SQL', " ");
Deprecated
Setting the database connection
Setting MySQL connection
server_config_api.php
MYSQL_DEDALO_HOSTNAME_CONN
Set the hostname of the MySQl server.
string
define('MYSQL_DEDALO_HOSTNAME_CONN','localhost');
Is possible set the hostname with 'localhost' or the name of the server host or use the ip to connect external server
Setting MySQL username
server_config_api.php
MYSQL_DEDALO_USERNAME_CONN
Set the username that will use the API server to read MySQl database. For the API server, the MySQL user can be read-only user.
string
define('MYSQL_DEDALO_USERNAME_CONN','dedalo_api_demo');
The username used in this config file is used only for the front-end, don't use the priviledged user of the back-end, for the API use a read-only user.
Setting MySQL password
server_config_api.php
MYSQL_DEDALO_PASSWORD_CONN
Set the password to connect the MySQl database.
string
define('MYSQL_DEDALO_PASSWORD_CONN','MyRead-Only_SecurePassword8763210!');
Is very recommendable to use a strong password for this connection. And don't use the same pasword of the priviledged user used in the back-end.
Setting MySQL database
server_config_api.php
MYSQL_DEDALO_DATABASE_CONN
Set the database name will be use to read the public data into MySQl.
string
define('MYSQL_DEDALO_DATABASE_CONN', 'dedalo_public');
Is possible use the variable $db_name for change the database used in MySQL connection.
For use this functionality you can send the name of the database to the server as POST or GET request that will set into the var $db_name by the json/index.php file.
http://my_domain.org/server_api/json/?db_name=my_other_public_database
You can configure it with this sample code:
$db_name = !empty($db_name)
		? $db_name
		: 'web_' . API_ENTITY;
	define('MYSQL_DEDALO_DATABASE_CONN', $db_name);
Setting MySQL port
server_config_api.php
MYSQL_DEDALO_DB_PORT_CONN
Set the port used in the connection. By default MySQL uses the 3306 port but it is very recommendable to change it to avoid DOS attacks.
string
define('MYSQL_DEDALO_DB_PORT_CONN', '3306');
Setting MySQL socket
server_config_api.php
MYSQL_DEDALO_SOCKET_CONN
Set the socket used in the connection. The name of the Unix socket file to use for connections made using a named pipe to a local server. The default Unix socket file name is /tmp/mysql.sock.
string
define('MYSQL_DEDALO_SOCKET_CONN','/tmp/mysql.sock');
Setting tables for Oral History / Memory
Setting the interview table name
server_config_api.php
TABLE_INTERVIEW
Set the interview table name that will be used for get if the interview referenced by the resources data is active. Sometimes is possible that an audiovisual resource linked two or more interviews, and one of them could not to be published, and the public data need to banned.
This parameter set the public table for interviews.
string
define('TABLE_INTERVIEW', 'interview');
Setting the informant table name
server_config_api.php
TABLE_INFORMANT
Set the informat table name (people from whom we obtain information). This variable will be used for locate informants from the indexations in the thesaurus tables.
string
define('TABLE_INFORMANT', 'informant');
Define the interview summary field name
server_config_api.php
FIELD_SUMMARY
Define the field name of the interview summary for the component_tipo 'oh23' in Dédalo ontology. It is used only for Oral history/memory.
string
define('FIELD_SUMMARY', 'abstract');
Define interview date field name
server_config_api.php
FIELD_INTERVIEW_DATE
Define the field name of the interview date for the component_tipo 'oh29' in Dédalo ontology. It is used only for Oral history/memory.
string
define('FIELD_INTERVIEW_DATE', 'date');
Define the interview informant field
server_config_api.php
FIELD_INFORMANT
Define the field name of the interview informant (interviewed) for the component_tipo 'oh24' in Dédalo ontology. It is used only for Oral history/memory.
string
define('FIELD_INFORMANT', 'informant');
Define the interview image field
server_config_api.php
FIELD_IMAGE
Define the field name of the interview image for the component_tipo 'oh17' in Dédalo ontology. It is used only for Oral history/memory.
string
define('FIELD_IMAGE', 'image');
Define the interviewed name field
server_config_api.php
FIELD_NAME
Define the field name of the interviewed for the component_tipo 'rsc85' in Dédalo ontology. It is used only for Oral history/memory.
string
define('FIELD_NAME', 'name');
Define the interviewed surname field
server_config_api.php
FIELD_SURNAME
Define the field name for the surname of the interviewed for the component_tipo 'rsc86' in Dédalo ontology. It is used only for Oral history/memory.
string
define('FIELD_SURNAME', 'surname');
Define the interviewed birthdate field
server_config_api.php
FIELD_BIRTHDATE
Define the field name for the interviewee's birthdate for the component_tipo 'rsc89' in Dédalo ontology. It is used only for Oral history/memory.
string
define('FIELD_BIRTHDATE', 'birthdate');
Define the interviewee's birthplace field
server_config_api.php
FIELD_BIRTHPLACE
Define the field name for the interviewee's birthplace for the component_tipo 'rsc91' in Dédalo ontology. It is used only for Oral history/memory.
string
define('FIELD_BIRTHPLACE', 'birthplace');
Define the audiovisual file field name
server_config_api.php
FIELD_VIDEO
Define the field name for the audiovisual file for the component_tipo 'rsc35' in Dédalo ontology. It is used only for Oral history/memory.
string
define('FIELD_VIDEO', 'video');
Define the interview code field name
server_config_api.php
FIELD_CODE
Define the field name for the interview code for the component_tipo 'oh14' in Dédalo ontology. It is used only for Oral history/memory.
string
define('FIELD_CODE', 'code');
Define the audiovisual interview field name
server_config_api.php
FIELD_AUDIOVISUAL
Define the field name for the audiovisual interview, the component_tipo 'oh25' in Dédalo ontology. It is used only for Oral history/memory.
string
define('FIELD_AUDIOVISUAL', 'audiovisual');
Define the transcription component_tipo
server_config_api.php
FIELD_TRANSCRIPTION
Define the 'component_tipo' in Dédalo ontology used for stored the transcription of the audiovisual files.
This param is used for get the full transciption locator used in indexations.
string
define('FIELD_TRANSCRIPTION', TRANSCRIPTION_TIPO);
Define the audiovisual section_tipo
server_config_api.php
AUDIOVISUAL_SECTION_TIPO
Define the 'section_tipo' in Dédalo ontology used for stored the audiovisual information.
This param is used in combination with the AV_TIPO to comform the full name of the audiovisual file.
The name of audiovisual files has his own locator to find it. The locator is used in the flat format: 'component_tipo'_'section_tipo'_'section_id' + extension
Example: rsc35_rsc167_36.mp4
string
define('AUDIOVISUAL_SECTION_TIPO', 'rsc167');
Define the audiovisual component_tipo
server_config_api.php
AV_TIPO
Define the 'component_tipo' in Dédalo ontology used for stored the audiovisual file.
This param is used in combination with the AUDIOVISUAL_SECTION_TIPO to comform the full name of the audiovisual file.
The name of audiovisual files has his own locator to find it. The locator is used in the flat format: 'component_tipo'_'section_tipo'_'section_id' + extension
Example: rsc35_rsc167_36.mp4
string
define('AV_TIPO', 'rsc35');
Define the duration column
server_config_api.php
FIELD_DURATION
Define the name in the audiovisual table for the component_tipo 'rsc54' in Dédalo ontology used for stored the duration of the audiovisual files.
This param is used for get the duration of the audiovisual file in the real time cuts and don't calculate it every time.
string
define('FIELD_DURATION', 'duration');
Switching the debugger
server_config_api.php
SHOW_DEBUG
Enabling or disambling the debugger for the server API. This parameter is used for development purposes.
bolean
define('SHOW_DEBUG', false);
Setting the media
Setting the media directory URI
server_config_api.php
DEDALO_MEDIA_BASE_URL
Set the main directory used to locate media files like images, audiovisual, pdf, etc.
string
define('DEDALO_MEDIA_BASE_URL', '/dedalo/media');
Setting the URI for data server.
server_config_api.php
Set the root domain of the public website. The API is linked the this main domain to get the media and create the relative links between data.
Web base URL from where the contents are served.
__CONTENT_BASE_URL__
string
define('__CONTENT_BASE_URL__', 'https://my_domain.org');
Setting the default quality for audiovisual footage
server_config_api.php
DEDALO_AV_QUALITY_DEFAULT
Set the default quality version that will use to get the audiovisual file.
string
define('DEDALO_AV_QUALITY_DEFAULT', '404');
By defaul Dédalo use a '404' version (720x404).
ValueQualityMedia Path
originalMultiple. The quality of the file../media/av/original
10801920x1080../media/av/1080
7201280x720../media/av/720
576768x576../media/av/576
404720x404../media/av/404
240320x240../media/av/240
audionone../media/av/audio
Setting the main directory for audiovisual footage
server_config_api.php
DEDALO_AV_FOLDER
Set the main directory used to locate audiovisual media.
string
define('DEDALO_AV_FOLDER', '/av');
Setting the posterframe image format with file extension
server_config_api.php
DEDALO_AV_POSTERFRAME_EXTENSION
Set the main image format used for the audivisual posterframe. By deaful Dédalo use 'jpg'.
string
define('DEDALO_AV_POSTERFRAME_EXTENSION', 'jpg');
Define the section used for stored audiovisual resources
server_config_api.php
DEDALO_SECTION_RESOURCES_AV_TIPO
Define the 'section_tipo' in Dédalo ontology used for stored the audiovisual information.
This param is used in combination with the DEDALO_COMPONENT_RESOURCES_AV_TIPO to comform the full name of the audiovisual file.
The name of audiovisual files has his own locator to find it. The locator is used in the flat format: 'component_tipo'_'section_tipo'_'section_id' + extension
Example: rsc35_rsc167_36.mp4
string
define('DEDALO_SECTION_RESOURCES_AV_TIPO', 'rsc167');
Define the 'field' with component_tipo used for stored audiovisual resources
server_config_api.php
DEDALO_COMPONENT_RESOURCES_AV_TIPO
Define the 'component_tipo' in Dédalo ontology used for stored the audiovisual file.
This param is used in combination with the DEDALO_SECTION_RESOURCES_AV_TIPO to comform the full name of the audiovisual file.
The name of audiovisual files has his own locator to find it. The locator is used in the flat format: 'component_tipo'_'section_tipo'_'section_id' + extension
Example: rsc35_rsc167_36.mp4
string
define('DEDALO_COMPONENT_RESOURCES_AV_TIPO', 'rsc35');
Define the component_tipo used for store the duration for audiovisual resources
server_config_api.php
DEDALO_COMPONENT_RESOURCES_AV_DURATION_TIPO
Define the 'component_tipo' in Dédalo ontology used for stored the duration of the audiovisual files.
This param is used for get the duration of the audiovisual file in the real time cuts and don't calculate it every time.
string
define('DEDALO_COMPONENT_RESOURCES_AV_TIPO', 'rsc35');
Define the component_tipo used for store the transcription of audiovisual resources
server_config_api.php
DEDALO_COMPONENT_RESOURCES_TR_TIPO
Define the 'component_tipo' in Dédalo ontology used for stored the transcription of the audiovisual files.
This param is used for get the full transciption locator used in indexations.
string
define('DEDALO_COMPONENT_RESOURCES_TR_TIPO', 'rsc36');
Define the component_tipo used for store the transcription annotations
server_config_api.php
DEDALO_NOTES_TEXT_TIPO
Define the 'component_tipo' in Dédalo ontology used for stored the annotations in the transcriptions of the audiovisual files.
This param is used for get the annotations locator used in transcriptions.
string
define('DEDALO_NOTES_TEXT_TIPO', 'rsc329');
Setting the main audiovisual URI
server_config_api.php
WEB_VIDEO_BASE_URL
Set the public URI of the audiovisual files.
string
define('WEB_VIDEO_BASE_URL', '/dedalo/media/av/404');
Setting the audiovisual table name
server_config_api.php
TABLE_AUDIOVISUAL
Set the audiovisual table name. This variable will be used for locate audiovisual fragments from the indexations in the thesaurus tables.
string
define('TABLE_AUDIOVISUAL', 'audiovisual');
Setting the image table name
server_config_api.php
TABLE_IMAGE
Set the image table name. This variable will be used for locate images from the indexations in the thesaurus tables.
string
define('TABLE_IMAGE', 'image');
Define the transcription component_tipo
server_config_api.php
TRANSCRIPTION_TIPO
Define the 'component_tipo' in Dédalo ontology used for stored the transcription of the audiovisual files.
This param is used for get the full transciption locator used in indexations.
string
define('TRANSCRIPTION_TIPO', 'rsc36');
Setting the thesaurus tables
Setting the thesaurus table map
server_config_api.php
$table_thesaurus_map
This global variable is used to define the map of thesaurus tables and the correspondence with section_tipo defined by locators.
Many backend data are locators that are used to point other information (the locator are a realation between data), the original locator in Dédalo use the section_tipo defined in the ontology to point the target data.
When the data is published, sometimes the section_tipo for the thesaurus definition is changed to be more "human readable" format, but the original locators are not point these new table name. The table resolution will change the locator to point the rigth name, but some times, if the project has a lot thesarus tables, could be convenient create the map for get a fast mapping of the ts tables.
This varibale get the thesaurus map resolved fast to avoid unnecessary union tables, this variable is optional. Is possible use it when you need manage various tables at same time (toponymy for example)
associative array
$table_thesaurus_map = array('ts1'=>'ts_tematics');
Set tables with thesaurus structure
server_config_api.php
TABLE_THESAURUS
Set the tables that has thesaurus structure and can be used in common way. The thesaurus tables can be used in common search, unions, and other uses.
string with comma separated values
define('TABLE_THESAURUS', "ts_tematics,ts_ono");
Setting the main hierarchy table
server_config_api.php
TABLE_HIERARCHY
Set the hierarchy table for get the main root term of the thesaurus tables. Thesaurus tables has a hierarchy relations between terms and is necesary identify the main or root tem or the tree.
string
define('TABLE_HIERARCHY', 'hierarchy');
Define the locator column name for ts tables
server_config_api.php
FIELD_TERM_ID
Define the field name for the locator (in flat mode) that define the tesaure. This paramenter will use for get the terms of the correct tables.
string
define('FIELD_TERM_ID', 'term_id');
Define the field name of the term for ts tables
server_config_api.php
FIELD_TERM
Define the field name of the tesaure term for the component_tipo 'hierarchy25' in Dédalo ontology. Used for store the term of descriptors.
string
define('FIELD_TERM', 'term');
Define the order number of thesaurus term field name
server_config_api.php
FIELD_NORDER
Define the field name for the order number of the thesaurus term, the component_tipo 'hierarchy36' in Dédalo ontology.
string
define('FIELD_NORDER', 'norder');
Setting the locator used as restriction.
server_config_api.php
TERM_ID_RESTRICTED
Set the locator, in flat mode, of the term used in the indexation for remove parts in audiovisual files. Resticted parts of audivoisual files can not be showed.
string
define('TERM_ID_RESTRICTED', 'ts1_23');
If you want to use multiple resticted terms you can use the property: AR_RESTRICTED_TERMS
Setting the multiple locators used as restriction.
server_config_api.php
AR_RESTRICTED_TERMS
Set the locator, in flat mode, of the term used in the indexation for remove parts in audiovisual files. Restricted parts of audiovisual files can not be showed.
array of strings
define('AR_RESTRICTED_TERMS', json_encode(['ts1_23, 'on_4']));
If you want to use only one restricted term you can use the property: TERM_ID_RESTRICTED