API Dokumentation

API Dokumentation / Wiki

Die folgenden Seiten geben einen Überblick über die Funktionen des API (Programmierschnittstelle) des hyper Content & Digital Asset Management Servers.
Bitte beachten Sie, dass Sie in der Regel nur wenige Funktionen für die Entwicklung von Plugins oder speziellen Template-Funktionen, wie automatische Erstellung einer Navigation, Sitemap und so weiter, benötigen. Bitte studieren Sie den Template Designers Guide und Programers Guide für eine bessere Einsicht in die Handhabung dieser Funktionen.
Das API dient primär für die Umsetzung eigenständiger Anwendungen, die die Funktionen des hyper Content & Digital Asset Management Servers nutzen. Das API ist nicht mit dem OpenAPI zu verwechseln, welchen auf einer SOA (Service Oriented Architecture) basiert und nicht Bestandteil der Free Edition ist.

Fragen und Antworten bitte innerhalb der Google Group.

hyperCMS API Function Reference

  1. Main API Functions
  2. Get API Functions
  3. Set API Functions
  4. Connect API Functions
  5. Security API Functions
  6. Media API Functions
  7. Metadata API Functions
  8. Link API Functions
  9. Plugin API Functions
  10. User Interface API Functions
  11. Template Engine API Functions
  12. XML API Functions
  13. Report API Functions
  14. Project API Functions
  15. Task API Functions
  16. Workflow API Functions
  17. Cloud Storage API Functions
  18. Import/Export API Functions

Main API Functions

correctnumber


Syntax
correctnumber ($number)

Input parameters
  • $number ... formated number [string]

global input parameters
  • $mgmt_config

Output
  • correct mathematical number / false on error


fixintegeroverflow


Description
Fix for overflowing signed 32 bit integers, works for sizes up to 2^32-1 bytes (4 GiB - 1).

Syntax
fixintegeroverflow ($size)

Input parameters
  • $size ... file size [integer]

Output
  • corrected number


cleancontent


Description
Removes all HTML tags, scripts and other special characters from the content in order to create a plain text.

Syntax
cleancontent ($text, $charset="UTF-8")

Input parameters
  • $text ... text [string or array]
  • $charset ... character set [string] (optional)

global input parameters
  • $mgmt_config

Output
  • cleaned text / false on error


remove_utf8_bom


Description
Remove UTF-8 BOM sequences

Syntax
remove_utf8_bom ($text)

Input parameters
  • $text ... text [string]

Output
  • cleaned text / false on error


convert_utf8


Syntax
convert_utf8 ($in)

Input parameters
  • $in ... expression [string or array]

Output
  • UTF-8 converted expression / original expression on error


convert_unicode2utf8


Description
This function is used to correct files names that have been encoded by ZIP.

Syntax
convert_unicode2utf8 ($in)

Input parameters
  • $in ... expression [string]

Output
  • UTF-8 converted expression / original expression on error


convertchars


Syntax
convertchars ($expression, $charset_from="UTF-8", $charset_to="UTF-8")

Input parameters
  • $expression ... expression [string or array]
  • $charset_from ... input character set [string] (optional)
  • $charset_to ... output character set [string] (optional)

global input parameters
  • $mgmt_config

Output
  • converted expression / original expression on error


specialchr


Description
Tests if an expression includes special characters (true) or does not (false).
Allow characters through including them in $accept (e.g. #$...)

Syntax
specialchr ($expression, $accept="")

Input parameters
  • $expression ... expression [string]
  • $accept ... list of characters to be excluded from search [string] (optional)

Output
  • true/false


specialchr_encode


Description
Renames all special characters for file names according to a set of rules

Syntax
specialchr_encode ($expression, $remove=false)

Input parameters
  • $expression ... expression [string]
  • $remove ... remove all special characters [bollean] (optional)

global input parameters
  • $user
  • $mgmt_config
  • $hcms_lang
  • $lang

Output
  • expression without special characters (for file names)


specialchr_decode


Description
This is the decode function for function specialchr_encode.

Syntax
specialchr_decode ($expression)

Input parameters
  • $expression ... expression [string]

global input parameters
  • $user
  • $mgmt_config
  • $hcms_lang
  • $lang

Output
  • expression with special characters (for file names)


convertdate


Description
This function converts a date to a different time zone and format.

Syntax
convertdate ($date, $timezone1="", $dateformat1="Y-m-d H:i:s", $timezone2="", $dateformat2="Y-m-d H:i:s")

Input parameters
  • $date ... date and time [string]
  • $timezone1 ... time zone source [string]
  • $dateformat1 ... source date format [string] (optional)
  • $timezone2 ... time zone target [string]
  • $dateformat2 ... target date format [string] (optional)

Output
  • converted date as tring / false


offsettime


Description
This function calculates the offset time from UTC (Coordinated Universal Time).

Syntax
offsettime ()

Input parameters

Output
  • offset time in hh:mm from UTC


is_uploadfilechunk


Description
This function verifies if the uploaded file is a part of a file (based on HTTP_CONTENT_RANGE)

Syntax
is_uploadfilechunk ()

Input parameters

Output
  • true / false


file_iexists


Description
This function verifies if the file or directory exists in case-insensitive mode.
This is the case-insensitive version of the PHP function file_exists.

Syntax
file_iexists ($path)

Input parameters
  • $path ... path to a file or directory [string]

Output
  • true / false


is_ifile


Description
This function verifies if the file exists in case-insensitive mode.
This is the case-insensitive version of the PHP function is_file.

Syntax
is_ifile ($path)

Input parameters
  • $path ... path to a file [string]

Output
  • true / false


is_idir


Description
This function verifies if the directory exists in case-insensitive mode.
This is the case-insensitive version of the PHP function is_dir.

Syntax
is_idir ($path)

Input parameters
  • $path ... path to a directory [string]

Output
  • true / false


object_exists


Description
This function verifies if an object exists already.

Syntax
object_exists ($path)

Input parameters
  • $path ... path to an object [string]

global input parameters
  • $user
  • $mgmt_config
  • $hcms_lang
  • $lang

Output
  • true / false


is_utf8


Description
This function is an alternative to mb_check_encoding (which requires an extra PHP module).
It is not failsave!

Syntax
is_utf8 ($str)

Input parameters
  • $str ... expression [string]

Output
  • true if string is utf-8 encoded / false


is_latin1


Description
This function is an alternative to mb_check_encoding (which requires the mbstring PHP extension).
It is not failsave!

Syntax
is_latin1 ($str)

Input parameters
  • $str ... expression [string]

Output
  • true if string is latin 1 encoded / false


makestring


Syntax
makestring ($array)

Input parameters
  • $array ... (multidimensional) array

Output
  • string including all array values / false on error


splitstring


Syntax
splitstring ($string)

Input parameters
  • $string ... string with ";" or ", " as seperator [string]

Output
  • array with string splitted into array / false on error


is_folder


Description
Checks if the provided path to an object is a folder

Syntax
is_folder ($path)

Input parameters
  • $path ... path to any object [string]

global input parameters
  • $mgmt_config

Output
  • true if folder / false


is_emptyfolder


Description
Checks if a directory/folder is empty (has no published objects or other files)

Syntax
is_emptyfolder ($dir)

Input parameters
  • $dir ... path to folder [string]

global input parameters
  • $mgmt_config

Output
  • true if empty folder / false


is_supported


Description
This function determines if a certain file type by its file extension is supported by the systems media conversion

Syntax
is_supported ($preview_array, $file)

Input parameters
  • $preview_array ... preview array holding the supported file extensions as key and references to executables as value [array]
  • $file ... file name or file extension [string]

global input parameters
  • $mgmt_config

Output
  • true if supported / false


is_cloudstorage


Description
This function determines if a cloud storage has been defined in the main configuration or for a specific publication

Syntax
is_cloudstorage ($site="")

Input parameters
  • $site ... publication name [string] (optional)

global input parameters
  • $mgmt_config

Output
  • true if cloud storage / false


is_cloudobject


Description
This function verifies if an object/file is available in the cloud storage

Syntax
is_cloudobject ($file)

Input parameters
  • $file ... path to media file or media file name [string]

global input parameters
  • $mgmt_config

Output
  • true if cloud object / false


is_date


Description
This function determines if a string represents a valid date format

Syntax
is_date ($date, $format="Y-m-d")

Input parameters
  • $date ... date [string]
  • $format ... date format [string] (optional)

global input parameters
  • $mgmt_config

Output
  • true if valid date / false


is_tempfile


Description
This function checks if the provided file name is a temporary file that should not be uploaded in the system

Syntax
is_tempfile ($path)

Input parameters
  • $path ... file name or path [string]

global input parameters
  • $mgmt_config

Output
  • true if file is a temp file / false


is_hiddenfile


Description
This function checks if the provided file name is a hidden file that should not be displayed

Syntax
is_hiddenfile ($path)

Input parameters
  • $path ... file name or path [string]

global input parameters
  • $mgmt_config

Output
  • true if file is a hidden file / false


is_keyword


Description
This function checks if the provided expression can be used as a keyword

Syntax
is_keyword ($keyword)

Input parameters
  • $keyword ... keyword [string]

Output
  • true if expression can be used as a keyword / false


is_thumbnail


Description
This function checks if the provided file name is a thumbnail file

Syntax
is_thumbnail ($media, $images_only=true)

Input parameters
  • $media ... file name or path [string]
  • $images_only ... only thumbnail images should be considered as thumbnail [boolean]

Output
  • true if file is a thumbnail file / false


is_newthumbnail


Description
Verifies if a new thumbnail has been created for a specific container ID

Syntax
is_newthumbnail ($container_id, $recreate_index=false)

Input parameters
  • $container_id ... container ID [string]
  • $recreate_index ... recreate thumbnail index [boolean] (optional)

global input parameters
  • $mgmt_config
  • $temp_thumbnails

Output
  • thumbnail file time in seconds / false


is_preview


Description
This function checks if the provided file name is a preview file

Syntax
is_preview ($media)

Input parameters
  • $media ... file name or path [string]

Output
  • true if file is a preview file / false


is_config


Description
This function checks if the provided file name is a config file

Syntax
is_config ($media)

Input parameters
  • $media ... file name or path [string]

Output
  • true if file is a config file / false


is_encryptedfile


Description
This function checks if the provided file is encrypted

Syntax
is_encryptedfile ($location, $file)

Input parameters
  • $location ... path to file [string]
  • $file ... file name [string]

global input parameters
  • $user
  • $mgmt_config
  • $hcms_lang
  • $lang

Output
  • true / false


is_document


Description
This function determines if a certain file is a document (binary and text based)

Syntax
is_document ($file)

Input parameters
  • $file ... file name or file extension [string]

global input parameters
  • $mgmt_config
  • $hcms_ext

Output
  • true / false


is_image


Description
This function determines if a certain file is an image

Syntax
is_image ($file)

Input parameters
  • $file ... file name or file extension [string]

global input parameters
  • $mgmt_config
  • $hcms_ext

Output
  • true / false


is_rawimage


Description
This function determines if a certain file is a raw image

Syntax
is_rawimage ($file)

Input parameters
  • $file ... file name or file extension [string]

global input parameters
  • $mgmt_config
  • $hcms_ext

Output
  • true / false


is_kritaimage


Description
This function determines if a certain file is a KRITA image

Syntax
is_kritaimage ($file)

Input parameters
  • $file ... file name or file extension [string]

global input parameters
  • $mgmt_config
  • $hcms_ext

Output
  • true / false


is_aiimage


Description
This function determines if a certain file is a vector-based Adobe Illustrator (AI) or AI-compatible EPS file

Syntax
is_aiimage ($file)

Input parameters
  • $file ... file name or file extension [string]

Output
  • true / false


is_video


Description
This function determines if a certain file is a video

Syntax
is_video ($file)

Input parameters
  • $file ... file name or file extension [string]

global input parameters
  • $mgmt_config
  • $hcms_ext

Output
  • true / false


is_rawvideo


Description
This function determines if a certain file is a RAW video

Syntax
is_rawvideo ($file)

Input parameters
  • $file ... file name or file extension [string]

global input parameters
  • $mgmt_config
  • $hcms_ext

Output
  • true / false


is_audio


Description
This function determines if a certain file is an audio file

Syntax
is_audio ($file)

Input parameters
  • $file ... file name or file extension [string]

global input parameters
  • $mgmt_config
  • $hcms_ext

Output
  • true / false


is_mobilebrowser


Description
Detects mobile browsers (smartphones and tablets)

Syntax
is_mobilebrowser ()

Input parameters

global input parameters
  • $user
  • $mgmt_config

Output
  • true / false


is_iOS


Description
Detects if a mobile browser is an iPhone, iPad or IPod

Syntax
is_iOS ()

Input parameters

global input parameters
  • $user
  • $mgmt_config

Output
  • true / false


is_activelanguage


Description
This function determines if a language has been enabled for automatic translation in the publication settings

Syntax
is_activelanguage ($site, $langcode)

Input parameters
  • $site ... publication name [string]
  • $langcode ... 2-digits language code [string]

global input parameters
  • $mgmt_config

Output
  • true / false


is_annotation


Description
This function determines if the annotation feature has been enabled and is installed.

Syntax
is_annotation ()

Input parameters

global input parameters
  • $mgmt_config

Output
  • true / false


is_facerecognition


Description
This function determines if the face recognition feature and service has been enabled for the automatic face recognition.
Provide system user "sys" for general verification of the face recognition feature (if enabled and is supported by the browser).

Syntax
is_facerecognition ($user)

Input parameters
  • $user ... user or service user name [string]

global input parameters
  • $mgmt_config
  • $is_mobile

Output
  • true / false


createfacerecognitionservice


Description
This function registers the face recognition service and creates the service URL.

Syntax
createfacerecognitionservice ($user)

Input parameters
  • $user ... user name [string]

global input parameters
  • $mgmt_config

Output
  • URL of face recognition service / false


copyrecursive


Description
This function copyies all directories and files from source to destination directory

Syntax
copyrecursive ($src, $dst)

Input parameters
  • $src ... source directory [string]
  • $dst ... destination directory [string]

Output
  • true/false


array_iunique


Description
This function is the case-insensitive form of PHPs array_unique function

Syntax
array_iunique ($array)

Input parameters
  • $array ... array [array]

Output
  • unique array / false


in_array_substr


Description
This function is supporting the search of substrings in the array values compared to PHPs in_array function

Syntax
in_array_substr ($search, $array)

Input parameters
  • $search ... search expression [string]
  • $array ... array [array]

Output
  • true / false


includefooter


Description
Includes the footer for GA code integration

Syntax
includefooter ()

Input parameters

global input parameters
  • $mgmt_config

Output
  • true / false


flushoutputbuffer


Description
Flushes the webserver output buffer for immediate output to the client

Syntax
flushoutputbuffer ()

Input parameters

Output
  • true


is_longfilename


Description
Checks if the file or directory name might have been shortened by function createfilename

Syntax
is_longfilename ($filename)

Input parameters
  • $filename ... file or directory name [string]

global input parameters
  • $mgmt_config
  • $hcms_lang
  • $lang
  • $is_webdav

Output
  • true / false


createfilename


Description
Creates a valid file name without special characters that does not exceed the maximum file name length.

Syntax
createfilename ($filename, $shorten=false)

Input parameters
  • $filename ... file or directory name [string]
  • $shorten ... shorten file name automatically (required for new object or folder names) [optional]

global input parameters
  • $mgmt_config
  • $hcms_lang
  • $lang
  • $is_webdav

Output
  • new filename/false


createlocationname


Description
Creates a valid location path without special characters that does not exceed the maximum file name length.

Syntax
createlocationname ($site, $location, $cat, $shorten=false)

Input parameters
  • $site ... publication name [string]
  • $location ... absolute or relative location path [string]
  • $cat ... category [comp, page]
  • $shorten ... shorten file name automatically (required for new object or folder names) [optional]

Output
  • new filename/false


createlockname


Syntax
createlockname ($user)

Input parameters
  • $user ... user name [string]

global input parameters
  • $mgmt_config

Output
  • correct user name for locking / false


correctfile


Syntax
correctfile ($abs_path, $filename, $user="", $specialchr_encode=false)

Input parameters
  • $abs_path ... path to file or directory [string]
  • $filename ... file or directory name [string]
  • $user ... user name [string] (optional)
  • $specialchr_encode ... encode special characters in file name with function createfilename [boolean] (optional)

global input parameters
  • $mgmt_config
  • $hcms_lang
  • $lang

Output
  • correct filename/false


correctpath


Description
This function adds as slash at the end if it is missing. It should not be used for a path that includes a file.
The path can also be encoded in order to replace special characters.

Syntax
correctpath ($path, $slash="/", $specialchr_encode=false)

Input parameters
  • $path ... path to folder [string]
  • $slash ... directory separator [string] (optional)
  • $specialchr_encode ... encode special characters [boolean] (optional)

global input parameters
  • $mgmt_config

Output
  • corrected path / false


convertpath


Description
This function replaces object pathes of the content management config with %page% and %comp% path variables

Syntax
convertpath ($site, $path, $cat="", $specialchr_decode=false)

Input parameters
  • $site ... publication name [string]
  • $path ... content management path to folder or object [string]
  • $cat ... object category [page, comp] (optional)
  • $specialchr_decode ... decode special characters in path [boolean] (optional)

global input parameters
  • $user
  • $mgmt_config
  • $hcms_lang
  • $lang

Output
  • converted path or URL / false on error


convertlink


Description
This function replaces pathes of the publication management config with %page% and %comp% path variables.

Syntax
convertlink ($site, $path, $cat)

Input parameters
  • $site ... publication name [string]
  • $path ... publication management path to folder or object [string]
  • $cat ... object category [page, comp]

global input parameters
  • $user
  • $mgmt_config
  • $publ_config
  • $hcms_lang
  • $lang

Output
  • converted path or URL / false on error


deconvertpath


Description
This function replaces all %page% and %comp% path variables with the path of the content management config.
It converts the path only on content management side not for the publication target.
It optionally encodes special characters in case a readable path has been provided as input.
BE AWARE: The input path must not be template code including pathes since valid_publicationname might return false.

Syntax
deconvertpath ($objectpath, $type="file", $specialchr_encode=false)

Input parameters
  • $objectpath ... string including path to folder or object [string]
  • $type ... convert to file system path or URL [file, url] (optional)
  • $specialchr_encode ... encode special characters using specialchr_encode [boolean] (optional)

global input parameters
  • $user
  • $mgmt_config
  • $hcms_lang
  • $lang

Output
  • deconverted path/false


deconvertlink


Description
This function deconverts the path only for the publication target.
It should be used for page linking, otherwise the function will return the absolute link including the host for component links.

Syntax
deconvertlink ($path, $type="url")

Input parameters
  • $path ... path to folder or object [string]
  • $type ... convert to file system path or URL [file, url]

global input parameters
  • $user
  • $mgmt_config
  • $publ_config
  • $hcms_lang
  • $lang

Output
  • converted absolute link without host/false


mediapublicaccess


Description
Is the media file public accessible. Has it been published or has the setting 'publicdownload' in the main configuration been enabled.
This function does not include direct links to the media files (used in websites).

Syntax
mediapublicaccess ($mediafile)

Input parameters
  • $mediafile ... media file name [string]

global input parameters
  • $mgmt_config

Output
  • true / false


createviewlink


Description
The view link is mainly used inside the system as a reference to a multimedia file.
The database is not required since the object hash or ID is not needed to create the view link.

Syntax
createviewlink ($site, $mediafile, $name="", $force_reload=false, $type="wrapper", $altfile="")

Input parameters
  • $site ... publication name [string]
  • $mediafile ... media file name [string]
  • $name ... media name [string] (optional)
  • $force_reload ... force reload [boolean] (optional)
  • $type ... link type [wrapper, download] (optional)
  • $altfile ... alternative file name from design theme [string] (optional)

global input parameters
  • $mgmt_config

Output
  • URL for download of the multimedia file / false on error


createportallink


Description
The portal access link is used to provide public access without logon based on a certain user profile and user hash that is connected with the portal.

Syntax
createportallink ($site, $portal)

Input parameters
  • $site ... publication name [string]
  • $portal ... portal name [string]

global input parameters
  • $mgmt_config

Output
  • URL for download of the multimedia file / false on error


createaccesslink


Description
Creates an access link to any object based on the permissions of the provided user account.

Syntax
createaccesslink ($site, $location="", $object="", $cat="", $object_id="", $login="", $type="al", $lifetime=0, $formats="")

Input parameters
  • $site ... publication name [string]
  • $location ... location [string] (optional)
  • $object ... object [string] (optional)
  • $cat ... category [page, comp] (optional)
  • $object_id ... object-ID [string] (optional)
  • $login ... user name of the user account to be used for access [string]
  • $type ... link type [al, dl] (optional)
  • $lifetime ... token lifetime in seconds [integer] (optional)
  • $formats ... formats defined in main configuration [JSON-string] (optional)

global input parameters
  • $user
  • $mgmt_config
  • $hcms_lang
  • $lang

Output
  • URL for access to given object / false on error


createobjectaccesslink


Description
Creates an access link to any object based on the permissions of the user account defined in the publication settings.

Syntax
createobjectaccesslink ($site="", $location="", $object="", $cat="", $object_id="", $container_id="", $recreate_hash=false)

Input parameters
  • $site ... publication name [string] (optional)
  • $location ... location [string] (optional)
  • $object ... object [string] (optional)
  • $cat ... category [page, comp] (optional)
  • $object_id ... object ID [string] (optional)
  • $container_id ... container-ID or repository media file [string] (optional)
  • $recreate_hash ... recreate object and its hash [boolean] (optional)

global input parameters
  • $user
  • $mgmt_config
  • $hcms_lang
  • $lang
  • $is_webdav

Output
  • URL for download of the multimedia file of the given object or folder / false on error


createwrapperlink


Description
In order to track and include external user IDs in the daily statistics you need to manually add the 'user' parameter to the link in the form of: &user=[user-ID]

Syntax
createwrapperlink ($site="", $location="", $object="", $cat="", $object_id="", $container_id="", $type="", $mediaconfig="", $recreate_hash=false)

Input parameters
  • $site ... publication name [string] (optional)
  • $location ... location [string] (optional)
  • $object ... object [string] (optional)
  • $cat ... category [page, comp] (optional)
  • $object_id ... object ID [string] (optional)
  • $container_id ... container-ID or repository media file [string] (optional)
  • $type ... media file extension or type based on main config settings [string] (optional)
  • $mediaconfig ... media configuration based on main config settings [string] (optional)
  • $recreate_hash ... recreate object and its hash [boolean] (optional)

global input parameters
  • $user
  • $mgmt_config
  • $hcms_lang
  • $lang

Output
  • URL for download of the multimedia file of the given object or folder / false on error


createdownloadlink


Description
In order to track and include external user IDs in the daily statistics you need to manually add the 'user' parameter to the link in the form of: &user=[user-ID]

Syntax
createdownloadlink ($site="", $location="", $object="", $cat="", $object_id="", $container_id="", $type="", $mediaconfig="", $recreate_hash=false)

Input parameters
  • $site ... publication name [string] (optional)
  • $location ... location [string] (optional)
  • $object ... object [string] (optional)
  • $cat ... category [page, comp] (optional)
  • $object_id ... object ID [string] (optional)
  • $container_id ... container-ID or repository media file [string] (optional)
  • $type ... media file extension or type based on main config settings [string] (optional)
  • $mediaconfig ... media configuration based on main config settings [string] (optional)
  • $recreate_hash ... recreate object and its hash [boolean] (optional)

global input parameters
  • $user
  • $mgmt_config
  • $hcms_lang
  • $lang
  • $is_webdav

Output
  • URL for download of the multimedia file of the given object or folder / false on error


createmultiaccesslink


Description
Creates an access link to any object based on the permissions of the provided user account.

Syntax
createmultiaccesslink ($multiobject, $login, $type="al", $lifetime=0, $formats="")

Input parameters
  • $multiobject ... multiobject [path1|path2|path3] or [array]
  • $login ... user name of the user account to be used for access [string]
  • $type ... link type [al, dl] (optional)
  • $lifetime ... token lifetime in seconds [integer] (optional)
  • $formats ... formats [string] (optional)

global input parameters
  • $user
  • $mgmt_config
  • $hcms_lang
  • $lang

Output
  • URL for access to the requested objects / false on error


createmultidownloadlink


Description
Generates a download link of a selection of media objects. Pages and components will be ignored.
There is a difference in the file conversion functionality:
Case 1: multiobject (min. 2 objects or object is a folder) without the support of file conversion
Case 2: multiobject with only one object (must not be a folder) with support of file conversion

Syntax
createmultidownloadlink ($site, $multiobject, $name="", $user="", $type="", $mediacfg="", $linktype="download", $flatzip=false)

Input parameters
  • $site ... publication name [string]
  • $multiobject ... multiobject using | as seperator [string] or [array] (optional)
  • $name ... presentation name [string] (optional)
  • $user ... user name [string]
  • $type ... conversion type example: jpg [string]
  • $mediacfg ... media configuration used for conversion (e.g.: 1024x768px) [string]
  • $linktype ... link type [wrapper, download] (optional)
  • $flatzip ... flat hierarchy means no directories [boolean] (optional)

global input parameters
  • $mgmt_config
  • $mgmt_compress
  • $pageaccess
  • $compaccess
  • $hiddenfolder
  • $hcms_linking
  • $globalpermission
  • $setlocalpermission
  • $hcms_lang
  • $lang

Output
  • URL for download of the requested objects / false on error


cleandomain


Description
Returns the URL notation without the protocoll://domain.com
If you wan't to integrate hyperCMS API code into a webapplication operated in a different domain,
you need to define the main configuation setting $mgmt_config['cleandomain'] = false;

Syntax
cleandomain ($path)

Input parameters
  • $path ... string to clean from http(s)://domain [string]

global input parameters
  • $mgmt_config
  • $hcms_lang
  • $lang

Output
  • string without protocol and domain / false on error


fileversion


Description
Creates a version file name

Syntax
fileversion ($file)

Input parameters
  • $file ... file name [string]

Output
  • versioned file name [string] / false on error


createversion


Description
Creates a new version of a multimedia file and container

Syntax
createversion ($site, $file, $user="sys")

Input parameters
  • $site ... publication name [string]
  • $file ... media file name or container name [string]
  • $user ... user name [string] (optional)

global input parameters
  • $mgmt_config
  • $mgmt_mediaoptions
  • $mgmt_docoptions
  • $hcms_ext
  • $user

Output
  • true / false


rollbackversion


Description
Makes an older object version the current version

Syntax
rollbackversion ($site, $location, $page, $container_version, $user="sys")

Input parameters
  • $site ... publication name [string]
  • $location ... location [string]
  • $page ... object name [string]
  • $container_version ... container version name [string]
  • $user ... user name [string] (optional)

global input parameters
  • $mgmt_config
  • $mgmt_mediaoptions
  • $mgmt_docoptions
  • $hcms_ext
  • $hcms_lang
  • $lang

Output
  • result_array


deleteversion


Description
Removes the version of an object

Syntax
deleteversion ($site, $container_version, $user="sys")

Input parameters
  • $site ... publication name [string]
  • $container_version ... location [string]
  • $user ... object name [string]

global input parameters
  • $mgmt_config

Output
  • true / false


deleteversions


Description
Removes all versions of all objects or templates

Syntax
deleteversions ($type, $report, $user="sys")

Input parameters
  • $type ... type [content, template] or valid path in filesystem
  • $report ... report [yes, no]
  • $user ... user name [string] (optional)

global input parameters
  • $user
  • $mgmt_config
  • $hcms_lang
  • $lang

Output
  • true [report=no] or report [report=yes]
  • false on error


loadfile_header


Description
Loads the file header based on a defined header size.

Syntax
loadfile_header ($abs_path, $filename)

Input parameters
  • $abs_path ... path to file [string]
  • $filename ... file name [string]

global input parameters
  • $user
  • $mgmt_config
  • $hcms_lang
  • $lang

Output
  • file content


loadfile_fast


Description
This functions is identical to loadfile, but it does not wait for locked files to be unlocked again.
It should only be used on files that won't be locked by the system. It is therefore recommended to use loadfile.

Syntax
loadfile_fast ($abs_path, $filename)

Input parameters
  • $abs_path ... path to file [string]
  • $filename ... file name [string]

global input parameters
  • $user
  • $mgmt_config
  • $hcms_lang
  • $lang

Output
  • file content


loadfile


Description
This function loads a file and waits up to 3 seconds for locked files to be unlocked

Syntax
loadfile ($abs_path, $filename)

Input parameters
  • $abs_path ... path to file [string]
  • $filename ... file name [string]

global input parameters
  • $user
  • $mgmt_config
  • $hcms_lang
  • $lang

Output
  • file content


loadlockfile


Description
This function loads and locks a file for a specific user. It waits up to x seconds for locked files to be unlocked.
Function loadlockfile and savelockfile includes a locking mechanismn for files.
Every time you want to lock a file during your operations use loadlockfile.
It is important to use savelockfile to save and unlock the file again.
Function savelockfile requires the file to be opened by loadlockfile.
Keep in mind that the locking is based on the user. The same user can therefore read a file that has been locked for him.

Syntax
loadlockfile ($user, $abs_path, $filename, $force_unlock=3)

Input parameters
  • $user ... user name [string]
  • $abs_path ... path to file [string]
  • $filename ... file name [string]
  • $force_unlock ... force unlock of file after x seconds [integer]

global input parameters
  • $mgmt_config
  • $hcms_lang
  • $lang

Output
  • file content


savefile


Description
This function saves content to a file

Syntax
savefile ($abs_path, $filename, $filedata)

Input parameters
  • $abs_path ... path to file [string]
  • $filename ... file name [string]
  • $filedata ... file content [string]

global input parameters
  • $user
  • $mgmt_config
  • $hcms_lang
  • $lang

Output
  • true/false


savelockfile


Description
Saves content to a locked file. It requires the file to be opened by loadlockfile.
Function loadlockfile and savelockfile includes a locking mechanismen for files.
Every time you want to lock a file during your operations use loadlockfile.
It is important to use savelockfile to save and unlock the file again.
savelockfile requires the file to be opened by loadlockfile before.

Syntax
savelockfile ($user, $abs_path, $filename, $filedata)

Input parameters
  • $user ... user name [string]
  • $abs_path ... path to file [string]
  • $filename ... file name [string]
  • $filedata ... file content [string]

global input parameters
  • $mgmt_config
  • $hcms_lang
  • $lang

Output
  • true/false


appendfile


Description
Appends data to a file but cannot create a new file!
Waits up to 3 seconds for locked files to be unlocked again.
Files won't be unlocked if the file is already locked.

Syntax
appendfile ($abs_path, $filename, $filedata, $savefile=false)

Input parameters
  • $abs_path ... path to file [string]
  • $filename ... file name [string]
  • $filedata ... file content [string]
  • $savefile ... save file if it doesn not exist [boolean] (optional)

global input parameters
  • $user
  • $mgmt_config
  • $hcms_lang
  • $lang

Output
  • true/false


lockfile


Description
This functions lockes a file for a specific user

Syntax
lockfile ($user, $abs_path, $filename)

Input parameters
  • $user ... user name [string]
  • $abs_path ... path to file [string]
  • $filename ... file name [string]

global input parameters
  • $mgmt_config
  • $hcms_lang
  • $lang

Output
  • true/false


unlockfile


Description
This functions unlockes a file for a specific user

Syntax
unlockfile ($user, $abs_path, $filename)

Input parameters
  • $user ... user name [string]
  • $abs_path ... path to file [string]
  • $filename ... file name [string]

global input parameters
  • $mgmt_config
  • $hcms_lang
  • $lang

Output
  • true/false


deletefile


Description
Deletes a file or directory. If parameter recursive is set to true all items in a directory will be removed as well.

Syntax
deletefile ($abs_path, $filename, $recursive=false)

Input parameters
  • $abs_path ... path to file [string]
  • $filename ... file or directory name [string]
  • $recursive ... delete all files in directory recursively including symbolic links [boolean]

global input parameters
  • $user
  • $mgmt_config
  • $hcms_lang
  • $lang

Output
  • true/false


restoremediafile


Description
Moves an exported media file back to the media repository.

Syntax
restoremediafile ($site, $mediafile)

Input parameters
  • $site ... publication name [string]
  • $mediafile ... media file name [string]

global input parameters
  • $mgmt_config

Output
  • result array


preparemediafile


Description
Prepares a media file for the use in the system (load from cloud, decrypt content)

Syntax
preparemediafile ($site, $medialocation, $mediafile, $user="")

Input parameters
  • $site ... publication name [string]
  • $medialocation ... media file location [string]
  • $mediafile ... media file name [string]
  • $user ... user name [string] (optional)

global input parameters
  • $mgmt_config

Output
  • result array / false on error


preparekeywords


Description
Prepares a list of comma separated keywords for the use in the system

Syntax
preparekeywords ($keywords, $result="string", $sort=true)

Input parameters
  • $keywords ... string with keywords separated by commas [string]
  • $result ... result type [string, array] (optional)
  • $sort ... sort [boolean] (optional)

global input parameters
  • $mgmt_config

Output
  • keywords as comma separated string or result array / false on error


deleteannotationimages


Description
Deletes all annoation images which have been created for the source images and documents

Syntax
deleteannotationimages ($site, $mediafile)

Input parameters
  • $site ... publication name [string]
  • $mediafile ... mediafile name [string]

global input parameters
  • $user
  • $mgmt_config

Output
  • true/false


deletemediafiles


Description
Deletes all derivates (thumbnails, config files, converted versions of the file) of a specific media file resource. Deletes the original media file optionally.

Syntax
deletemediafiles ($site, $mediafile, $delete_original=false, $delete_json_image=false)

Input parameters
  • $site ... publication name [string]
  • $mediafile ... mediafile name [string]
  • $delete_original ... delete original media file [boolean] (optional)
  • $delete_json_image ... delete JSON image editor file [boolean] (optional)

global input parameters
  • $user
  • $mgmt_config
  • $mgmt_mediaoptions
  • $mgmt_docoptions
  • $hcms_ext
  • $hcms_lang
  • $lang

Output
  • true/false


avoidfilecollision


Description
Appending data to a file ensures that the previous write process is finished (required due to issue when editing encrypted files)

Syntax
avoidfilecollision ($data="tempdata", $force=false)

Input parameters
  • $data ... data string [string] (optional)
  • $force ... force execution [boolean]

global input parameters
  • $mgmt_config
  • $site

Output
  • true / false on error


substr_in_array


Description
Searches for substring in array

Syntax
substr_in_array ($search, $array)

Input parameters
  • $search ... search-string [string]
  • $array ... array [array]

Output
  • array with found values / false


downloadobject


Description
This functions provides an object via http for viewing. Not suitable for multimedia objects!

Syntax
downloadobject ($location, $object, $container="", $lang="en", $user="")

Input parameters
  • $location ... location [string]
  • $object ... object name [string]
  • $container ... content container [string]
  • $lang ... language [string] (optional)
  • $user ... user name [string] (optional)

global input parameters
  • $mgmt_config
  • $eventsystem
  • $hcms_lang
  • $lang

Output
  • stream of file content / false on error


downloadfile


Description
This functions provides a file via http for view or download. The session will be closed and not recreated for non-blocking.

Syntax
downloadfile ($filepath, $name, $force="wrapper", $user="")

Input parameters
  • $filepath ... path to file [string]
  • $name ... file name to show for download via http [string]
  • $force ... force file wrapper or download or no file headers for WebDAV [download, wrapper, noheader]
  • $user ... user name [string] (optional)

global input parameters
  • $mgmt_config
  • $eventsystem
  • $hcms_lang
  • $lang
  • $is_iphone
  • $is_webdav

Output
  • stream of file content / false on error


loadcontainer


Description
This function loads a content container

Syntax
loadcontainer ($container, $type="work", $user="")

Input parameters
  • $container ... container file name or container id (working container will be loaded by default) [string]
  • $type ... container type [published, work, version] (optional)
  • $user ... user name [string]

global input parameters
  • $mgmt_config
  • $hcms_lang
  • $lang

Output
  • XML content of container / false on error


savecontainer


Description
Saves data into existing content container by default. Only if $init is set to true it will initially save a non existing container.

Syntax
savecontainer ($container, $type="work", $data="", $user="", $init=false)

Input parameters
  • $container ... container file name or container id (working container will be loaded by default) [string]
  • $type ... container type [published, work, version] (optional)
  • $data ... container content [XML]
  • $user ... user name [string]
  • $init ... save container initially [boolean] (optional)

global input parameters
  • $mgmt_config
  • $hcms_lang
  • $lang

Output
  • true / false on error


checkworkflow


Description
Help function for function buildview to evaluate the workflow of an object and return the manipulated view store, view name, workflow ID, workflow role and the encrypted workflow token.
Workflow roles:
0 ... user is not a member of workflow (no permissions)
1 ... read
2 ... read + edit
3 ... read + publish
4 ... read + edit + publish
5 ... no workflow (users permissions apply)

Syntax
checkworkflow ($site, $location, $page, $cat="", $contentfile="", $contentdata="", $buildview="cmsview", $viewstore="", $user="")

Input parameters
  • $site ... publication name [string]
  • $location ... location [string]
  • $page ... object name [string]
  • $cat ... category [page, comp] (optional)
  • $contentfile ... container name [string] (optional)
  • $contentdata ... container [XML string] (optional)
  • $buildview ... view name [string] (optional)
  • $viewstore ... view store [string] (optional)
  • $user ... user name [string]

global input parameters
  • $mgmt_config

Output
  • result array


inherit_db_load


Description
This function loads and locks the inheritance database.
Each record of the inherit management database has the following design:
xml-content container :| absolute path to 1-n objects :| 1-m inherits used by 1-n objects
Important: The inherit management database needs to be saved or closed after loading it

Syntax
inherit_db_load ($user)

Input parameters
  • $user ... %

global input parameters
  • $siteaccess
  • $mgmt_config
  • $hcms_lang
  • $lang

Output
  • inheritance database [2 dim. array]/false


inherit_db_read


Description
This function loads the inheritance database for reading

Syntax
inherit_db_read ()

Input parameters

global input parameters
  • $user
  • $mgmt_config
  • $hcms_lang
  • $lang

Output
  • inheritance database [2 dim. array]/false


inherit_db_close


Description
Closes and unlocks the inheritance management database

Syntax
inherit_db_close ($user)

Input parameters
  • $user ... %

global input parameters
  • $mgmt_config
  • $hcms_lang
  • $lang

Output
  • true/false


inherit_db_save


Description
This function saves und unlocks the inheritance management database

Syntax
inherit_db_save ($inherit_db, $user)

Input parameters
  • $inherit_db ... inherit database [array]
  • $user

global input parameters
  • $mgmt_config
  • $hcms_lang
  • $lang

Output
  • true/false


inherit_db_getparent


Syntax
inherit_db_getparent ($inherit_db, $child)

Input parameters
  • $inherit_db ... inherit database [2 dim. array]
  • $child ... child [string]

Output
  • all parents of given child [1 dim. array] / false


inherit_db_getchild


Syntax
inherit_db_getchild ($inherit_db, $parent)

Input parameters
  • $inherit_db ... parent [string]
  • $parent

Output
  • all childs of given parent [1 dim. array] / false


inherit_db_setparent


Description
This function updates and insert all references from a child an its parents

Syntax
inherit_db_setparent ($inherit_db, $child, $parent_array)

Input parameters
  • $inherit_db ... inherit database [2 dim. array]
  • $child ... child [string]
  • $parent_array ... parents [array]

Output
  • inherit database [2 dim. array]


inherit_db_insertparent


Syntax
inherit_db_insertparent ($inherit_db, $parent, $child_array)

Input parameters
  • $inherit_db ... inherit database [2 dim. array]
  • $parent ... parent [string]
  • $child_array ... childs [array]

Output
  • inherit database [2 dim. array]


inherit_db_deleteparent


Syntax
inherit_db_deleteparent ($inherit_db, $parent)

Input parameters
  • $inherit_db ... inherit database [2 dim. array]
  • $parent ... parent [string]

Output
  • inherit database [2 dim. array]


createinstance


Description
This function creates a new instance with all its files and the mySQL database

Syntax
createinstance ($instance_name, $settings, $user="sys")

Input parameters
  • $instance_name ... instance name [string]
  • $settings ... settings array [array]
  • $user ... user name [string]

global input parameters
  • $eventsystem
  • $mgmt_config
  • $hcms_lang
  • $lang

Output
  • result array


editinstance


Description
This function saves the instance configuration in the config file

Syntax
editinstance ($instance_name, $content, $user="sys")

Input parameters
  • $instance_name ... instance name [string]
  • $content ... content [string]
  • $user ... user name [string]

global input parameters
  • $eventsystem
  • $mgmt_config
  • $hcms_lang
  • $lang

Output
  • result array


deleteinstance


Description
This function creates a new instance with all its files and the mySQL database

Syntax
deleteinstance ($instance_name, $user="sys")

Input parameters
  • $instance_name ... instance name [string]
  • $user ... settings [array]

global input parameters
  • $eventsystem
  • $mgmt_config
  • $hcms_lang
  • $lang

Output
  • result array


createpublication


Description
This function creates a new publication with all its files

Syntax
createpublication ($site_name, $user="sys")

Input parameters
  • $site_name ... publication name [string]
  • $user ... user name [string] (optional)

global input parameters
  • $siteaccess
  • $eventsystem
  • $mgmt_config
  • $hcms_lang
  • $lang

Output
  • result array


editpublication


Description
This function saves all settings of a publication. It is a good advice to load the settings of a publication and manipulate the values in order to provide all settings as input.
Settings (keys for settings array):
inherit_comp ... inherit components [boolean]
inherit_tpl ... inherit templates [boolean]
youtube_token ... Youtube token [string]
registration ... enable registration of new users [boolean]
registration_group ... assign new users to the group [string]
registration_notify ... notify the users whenever a new user registered [string]
site_admin0 ... enable publication management [true]
url_path_page ... URL to page root on management server [string]
abs_path_page .... absolute path to page root on management server [string]
exclude_folders ... exlude folders from the system [string]
allow_ip ... only enable access for the provided IP addresses [string]
webdav ... enable WebDAV access [boolean]
webdav_dl ... enable download links for WebDAV [boolean]
webdav_al ... enable access links for WebDAV [boolean]
default_codepage ... deafult charcter set of the publication [string]
sendmail ... enable send mail [boolean]
mailserver ... mailserver name [string]
portalaccesslink ... enable portal access via public link [boolean]
accesslinkuser ... user to be used for access links [string]
watermark_image ... watermark settings for images (-wm /home/hypercms/public_html/logo_watermark.png->topleft->10) [string]
watermark_video ... watermark settings for videos (-wm /home/hypercms/public_html/logo_watermark.png->topleft->10) [string]
sharesociallink ... enable social media link sharing [boolean]
youtube ... enbale Youtube upload [boolean]
theme ... standard design theme of the publication [string]
translate ... languges that can be used for automated translation (en, fr, de) [string]
ocr ... languges that can be used for OCR (en, de, ...) [string]
crypt_content ... encrypt content [boolean]
connector_rest ... Enable RESTful API [boolean]
connector_soap ... enable SOAP API [boolean]
storage_limit ... storage limit in MB [integer]
gs_access_json ... Google Cloud service JSON access code [string]
gs_analyze_image ... Enable automatted image tagging [boolean]
gs_analyze_video ... Enable automatted video tagging [boolean]
gs_speech2text ... Enable automatted speech to text translation for video and audio files [boolean]
gs_speech2text_langcode ... language code to be used for Google Speech2Text Cloud service (en-US) [string]
openai_appkey ... OpenAI API key [string]
url_publ_page ... URL to page root on publication server [string]
abs_publ_page ... absolute path to page root on publication server [string]
url_publ_rep ... URL to repository root on publication server [string]
abs_publ_rep ... absolute path to repository root on publication server [string]
abs_publ_app ... absolute path to application root on publication server [string]
publ_os ... operating system used (UNIX or WIN) [string]
remoteclient ... URL to remote client on remote webserver [string]
ldap_servers ... The domain controllers option is an array of servers located on your network that serve Active Directory [string]
ldap_base_dn ... The base distinguished name is the base distinguished name you'd like to perform operations on. An example base DN would be `DC=corp, DC=acme, DC=org`. [string]
ldap_userdomain ... The user domain is the suffix of your user accounts in AD [string]
ldap_version ... LDAP protocol version [2, 3]
ldap_port ... The port option is used for authenticating and binding to your AD/LDAP server. The default ports are already used for non SSL and SSL connections (389 and 636). Only insert a port if your AD server uses a unique port. [integer]
ldap_follow_referrals ... The follow referrals option is a boolean to tell active directory to follow a referral to another server on your network if the server queried knows the information you are asking for exists, but does not yet contain a copy of it locally. This option is defaulted to false. [boolean]
ldap_use_ssl ... If you need to be able to change user passwords on your server, then an SSL or TLS connection is required [boolean]
ldap_use_tls ... If you need to be able to change user passwords on your server, then an SSL or TLS connection is required [boolean]
ldap_sync ... Synchronize LDAP users with system user (create and edit user) [boolean]
ldap_delete_user ... Delete user that do not exist in LDAP [boolean]
ldap_keep_groups ... Keep existing group memberships of user [boolean]
ldap_username_dn ... Define the user DN for the LDAP bind (required by some LDAP servers, e.g.: uid=%user%, cn=users) [string]
ldap_user_filter ... Define the user filter for the search in LDAP/AD (sAMAccountName) [string]
ldap_user_attributes ... Define the user attributes you want so sync with LDAP/AD ('memberof', 'givenname', 'sn', 'telephonenumber', 'mail') [array]
ldap_sync_groups_mapping ... Mapping based on a search string that defines the users group membership like "OU=MANAGER GROUP"=>"ChiefEditor" [array]

Syntax
editpublication ($site_name, $setting, $user="sys")

Input parameters
  • $site_name ... publication name [string]
  • $setting ... publication settings with setting name as key and parameter as value [array]
  • $user ... user name [string] (optional)

global input parameters
  • $eventsystem
  • $mgmt_config
  • $hcms_lang
  • $lang

Output
  • result array


editpublicationsetting


Description
This function can be used to edit a single setting of a publication

Syntax
editpublicationsetting ($site_name, $setting, $user="sys")

Input parameters
  • $site_name ... publication name [string]
  • $setting ... publication settings with setting name as key and setting parameter as value (see publication config file for details) [array]
  • $user ... user name [string] (optional)

global input parameters
  • $eventsystem
  • $mgmt_config
  • $hcms_lang
  • $lang

Output
  • result array


deletepublication


Description
This function deletes a publication with all its files

Syntax
deletepublication ($site_name, $user="sys")

Input parameters
  • $site_name ... publication name [string]
  • $user ... user name [string] (optional)

global input parameters
  • $mgmt_config
  • $eventsystem
  • $hcms_lang
  • $lang

Output
  • result array


createpersonalization


Description
This function creates a new customer personalization tracking or profile

Syntax
createpersonalization ($site, $pers_name, $cat)

Input parameters
  • $site ... publication name [string]
  • $pers_name ... personalization profile or tracking name [string]
  • $cat ... category [profile, tracking]

global input parameters
  • $user
  • $eventsystem
  • $mgmt_config
  • $hcms_lang
  • $lang

Output
  • result array


deletepersonalization


Description
This function deletes a customer personalization tracking or profile

Syntax
deletepersonalization ($site, $pers_name, $cat)

Input parameters
  • $site ... publication name [string]
  • $pers_name ... personalization profile or tracking name [string]
  • $cat ... category [profile, tracking]

global input parameters
  • $user
  • $eventsystem
  • $mgmt_config
  • $hcms_lang
  • $lang

Output
  • result array


loadtemplate


Description
This function loads a template by the provided name.
Based on the inheritance settings of the publication the template will be loaded
with highest priority from the own publication and if not available from a parent
publication. If the parent publications have double entries the sort mechanism will
define the priority. First priority have numbers, second are upper case letters and
last priority have lower case letters.

Syntax
loadtemplate ($site, $template)

Input parameters
  • $site ... publication name [string]
  • $template ... template file name [string]

global input parameters
  • $user
  • $mgmt_config
  • $hcms_lang
  • $lang

Output
  • array (template content [XML string]
  • publication
  • result[true/false]) / false on error


createtemplate


Description
This function creates a new template

Syntax
createtemplate ($site, $template, $cat)

Input parameters
  • $site ... publication name [string]
  • $template ... template name [string]
  • $cat ... category [page, comp, meta, inc]

global input parameters
  • $user
  • $eventsystem
  • $mgmt_config
  • $hcms_lang
  • $lang

Output
  • result array


edittemplate


Description
This function edites a template

Syntax
edittemplate ($site, $template, $cat, $user, $content="", $extension="", $application="")

Input parameters
  • $site ... publication name [string]
  • $template ... template file name [string]
  • $cat ... category [page, comp, meta, inc]
  • $user ... user name [string]
  • $content ... template content [string] (optional)
  • $extension ... template extension [string] (optional)
  • $application ... template application [string] (optional)

global input parameters
  • $eventsystem
  • $mgmt_config
  • $hcms_lang
  • $lang

Output
  • result array


deletetemplate


Description
This function deletes a template

Syntax
deletetemplate ($site, $template, $cat)

Input parameters
  • $site ... publication name [string]
  • $template ... template file name [string]
  • $cat ... category [page, comp, meta, inc]

global input parameters
  • $user
  • $eventsystem
  • $mgmt_config
  • $hcms_lang
  • $lang

Output
  • result array


createportal


Description
This function creates a new portal template

Syntax
createportal ($site, $template)

Input parameters
  • $site ... publication name [string]
  • $template ... portal template name [string]

global input parameters
  • $user
  • $eventsystem
  • $mgmt_config
  • $hcms_lang
  • $lang

Output
  • result array


editportal


Description
This function edites the settings of a portal.

Syntax
editportal ($site, $template, $portaluser, $design="day", $primarycolor="", $hovercolor="", $global_files=array(), $mainnavigation="left", $navigation=array(), $formats="", $user="sys")

Input parameters
  • $site ... publication name [string]
  • $template ... template name or file name [string]
  • $portaluser ... portal user name [string]
  • $design ... design theme name [string] (optional)
  • $primarycolor ... primary color as hex code [string] (optional)
  • $hovercolor ... hover color as hex code [string] (optional)
  • $global_files ... PHP global FILES variable for file upload/remove [array] (optional)
  • $mainnavigation ... main navigation tree position [left, top] (optional)
  • $navigation ... navigation tree names [array] (optional)
  • $formats ... download formats [JSON-string] (optional)
  • $user ... user name [string] (optional)

global input parameters
  • $eventsystem
  • $mgmt_config
  • $hcms_lang
  • $lang

Output
  • result array


deleteportal


Description
This function deletes a portal

Syntax
deleteportal ($site, $template)

Input parameters
  • $site ... publication name [string]
  • $template ... template file name [string]

global input parameters
  • $user
  • $eventsystem
  • $mgmt_config
  • $hcms_lang
  • $lang

Output
  • result array


createuser


Description
This function creates a new user. Use *Null* for publication name to remove access to all publications.

Syntax
createuser ($site, $login, $password, $confirm_password, $nologon=0, $user="sys")

Input parameters
  • $site ... publication name [string] (optional)
  • $login ... user login name [string]
  • $password ... password [string]
  • $confirm_password ... confirmed password [string]
  • $nologon ... no logon allowed [0, 1] (optional)
  • $user ... user name [string] (optional)

global input parameters
  • $eventsystem
  • $mgmt_config
  • $mgmt_lang_shortcut_default
  • $hcms_lang
  • $lang

Output
  • result array


edituser


Description
This function edits a user. Use *Leave* as input if a value should not be changed.
Use *Null* for the publication membership to remove access to all publications.
Use *Null* for the user group membership to remove user from all user groups of the publication.

Syntax
edituser ($site="*Null*", $login="", $old_password="", $password="", $confirm_password="", $superadmin="*Leave*", $nologon="*Leave*", $realname="*Leave*", $language="en", $timezone="*Leave*", $theme="*Leave*", $email="*Leave*", $phone="*Leave*", $signature="*Leave*", $usergroup="*Leave*", $usersite="*Leave*", $validdatefrom="*Leave*", $validdateto="*Leave*", $user="sys")

Input parameters
  • $site ... publication name [string]
  • $login ... user login name [string]
  • $old_password ... new login name [string] (optional)
  • $password ... password [string] (optional)
  • $confirm_password ... confirmed password [string] (optional)
  • $superadmin ... super administrator [0, 1, *Leave*] (optional)
  • $nologon ... no logon allowed [0, 1, *Leave*] (optional)
  • $realname ... real name [string] (optional)
  • $language ... language setting [en, de, ...] (optional)
  • $timezone ... time zone [string] (optional)
  • $theme ... theme name (optional)
  • $email ... email [string] (optional)
  • $phone ... phone [string] (optional)
  • $signature ... signature [string] (optional)
  • $usergroup ... member of usergroup string [group1|group2] or usergroup array [array] (optional)
  • $usersite ... member of publications string [site1|site2] or publications array [array] (optional)
  • $validdatefrom ... valid date from [date] (optional)
  • $validdateto ... valid date to [date] (optional)
  • $user ... user name [string] (optional)

global input parameters
  • $eventsystem
  • $login_cat
  • $group
  • $mgmt_config
  • $hcms_lang
  • $lang

Output
  • result array


deleteuser


Description
This function removes a user

Syntax
deleteuser ($site, $login, $user="sys")

Input parameters
  • $site ... publication frmo where the user should be removed [*Null*] for all publications [string]
  • $login ... login name of the account that will be removed [string]
  • $user ... user name [string]

global input parameters
  • $eventsystem
  • $mgmt_config
  • $hcms_lang
  • $lang

Output
  • result array


creategroup


Description
This function creates a new user group

Syntax
creategroup ($site, $groupname, $user="sys")

Input parameters
  • $site ... publication name [string]
  • $groupname ... group name [string]
  • $user ... user name [string]

global input parameters
  • $eventsystem
  • $mgmt_config
  • $hcms_lang
  • $lang

Output
  • result array


editgroup


Description
This function edits the settings of a user group.
The following permissions can be used:
desktopglobal
desktopsetting
desktoptaskmgmt
desktopcheckedout
desktoptimetravel
userglobal
usercreate
userdelete
useredit
groupglobal
groupcreate
groupdelete
groupedit
siteglobal
sitecreate
sitedelete
siteedit
persglobal
perstrack
perstrackcreate
perstrackdelete
perstrackedit
persprof
persprofcreate
persprofdelete
persprofedit
workflowglobal
workflowproc
workflowproccreate
workflowprocdelete
workflowprocedit
workflowprocfolder
workflowscript
workflowscriptcreate
workflowscriptdelete
workflowscriptedit
templateglobal
tpl
tplcreate
tpldelete
tpledit
tplmedia
tplmediacatcreate
tplmediacatdelete
tplmediacatrename
tplmediaupload
tplmediadelete
componentglobal
compupload
compdownload
compsendlink
compfoldercreate
compfolderdelete
compfolderrename
compcreate
compdelete
comprename
comppublish
pageglobal
pagesendlink
pagefoldercreate
pagefolderdelete
pagefolderrename
pagecreate
pagedelete
pagerename
pagepublish
The value of each parameter can be 1 for granted permission or 0 for no permission.
If you need further explanation about the permissions, please have a look at the Administrators Guide.

Syntax
editgroup ($site, $groupname, $pageaccess, $compaccess, $permission, $plugins, $user)

Input parameters
  • $site ... publication name [string]
  • $groupname ... group name [string]
  • $pageaccess ... page folder access array [array]
  • $compaccess ... component folder access array [array]
  • $permission ... permissions with permission name as key and value of 1 or 0 [array]
  • $plugins ... enabled plugin names [array]
  • $user ... user name [string]

global input parameters
  • $eventsystem
  • $mgmt_config
  • $hcms_lang
  • $lang

Output
  • result array


deletegroup


Description
This function removes a user group

Syntax
deletegroup ($site, $groupname, $user)

Input parameters
  • $site ... publication name [string]
  • $groupname ... group name [string]
  • $user ... user name [string]

global input parameters
  • $eventsystem
  • $mgmt_config
  • $hcms_lang
  • $lang

Output
  • result array


renamegroupfolder


Description
This function renames a workgroup folder

Syntax
renamegroupfolder ($site, $cat, $folder_curr, $folder_new, $user)

Input parameters
  • $site ... publication name [string]
  • $cat ... category [page, comp]
  • $folder_curr ... old location [string]
  • $folder_new ... new location [string]
  • $user ... user name [string]

global input parameters
  • $mgmt_config
  • $hcms_lang
  • $lang

Output
  • true / false on error


deletegroupfolder


Description
This function removes a group folder.

Syntax
deletegroupfolder ($site, $cat, $folderpath, $user)

Input parameters
  • $site ... publication name [string]
  • $cat ... category [page, comp]
  • $folderpath ... path to the folder [string]
  • $user ... user name [string]

global input parameters
  • $mgmt_config
  • $hcms_lang
  • $lang

Output
  • true / false on error


renameworkflowfolder


Description
This function renames a workgroup folder

Syntax
renameworkflowfolder ($site, $cat, $folder_curr, $folder_new, $user)

Input parameters
  • $site ... publication name [string]
  • $cat ... category [page, comp]
  • $folder_curr ... old location [string]
  • $folder_new ... new location [string]
  • $user ... user name [string]

global input parameters
  • $mgmt_config
  • $hcms_lang
  • $lang

Output
  • true / false on error


deleteworkflowfolder


Description
This function removes a workgroup folder

Syntax
deleteworkflowfolder ($site, $cat, $folderpath, $user)

Input parameters
  • $site ... publication name [string]
  • $cat ... category [page, comp]
  • $folderpath ... location of folder [string]
  • $user ... user name [string]

global input parameters
  • $mgmt_config
  • $hcms_lang
  • $lang

Output
  • true / false on error


createmediacat


Description
Creates a new media category in the template media index file. Only used for template media.

Syntax
createmediacat ($site, $mediacat_name)

Input parameters
  • $site ... publication name [string]
  • $mediacat_name ... media category name [string]

global input parameters
  • $user
  • $eventsystem
  • $mgmt_config
  • $hcms_lang
  • $lang

Output
  • Array with onload JS-code and message


renamemediacat


Description
Renames a new media category in the template media index file

Syntax
renamemediacat ($site, $mediacat_name_curr, $mediacat_name)

Input parameters
  • $site ... publication name [string]
  • $mediacat_name_curr ... old media category name [string]
  • $mediacat_name ... new media category name [string]

global input parameters
  • $user
  • $eventsystem
  • $mgmt_config
  • $hcms_lang
  • $lang

Output
  • Array with onload JS-code and message


deletemediacat


Description
Deletes a new media category in the template media index file

Syntax
deletemediacat ($site, $mediacat_name)

Input parameters
  • $site ... publication name [string]
  • $mediacat_name ... media category name [string]

global input parameters
  • $user
  • $eventsystem
  • $mgmt_config
  • $hcms_lang
  • $lang

Output
  • Array with onload JS-code and message


uploadtomediacat


Description
Uploads a media file into a given template media category

Syntax
uploadtomediacat ($site, $mediacat_name, $global_files)

Input parameters
  • $site ... publication name [string]
  • $mediacat_name ... media category name [string]
  • $global_files ... PHP global FILES variable [array]

global input parameters
  • $user
  • $eventsystem
  • $mgmt_config
  • $hcms_lang
  • $lang

Output
  • Array with onload JS-code and message


deletefrommediacat


Description
Deletes a media file from the template media category index

Syntax
deletefrommediacat ($site, $mediafile)

Input parameters
  • $site ... publication name [string]
  • $mediafile ... media file name [string]

global input parameters
  • $user
  • $eventsystem
  • $mgmt_config
  • $hcms_lang
  • $lang

Output
  • Array with onload JS-code and message


createfolder


Description
This function creates a new folder. The folder name must not match any temp file pattern.

Syntax
createfolder ($site, $location, $folder, $user)

Input parameters
  • $site ... publication name [string]
  • $location ... location [string]
  • $folder ... folder name [string]
  • $user ... user name [string]

global input parameters
  • $eventsystem
  • $mgmt_config
  • $cat
  • $pageaccess
  • $compaccess
  • $hiddenfolder
  • $hcms_linking
  • $hcms_lang
  • $lang
  • $is_webdav

Output
  • result array


createfolders


Description
This function creates all folders recursively

Syntax
createfolders ($site, $location, $folder, $user)

Input parameters
  • $site ... publication name [string]
  • $location ... location [string]
  • $folder ... folder name [string]
  • $user ... user name [string]

global input parameters
  • $eventsystem
  • $mgmt_config
  • $pageaccess
  • $compaccess
  • $hiddenfolder
  • $hcms_linking
  • $hcms_lang
  • $lang

Output
  • result array


collectfolders


Description
Help function to create the collection of folders

Syntax
collectfolders ($site, $location, $folder)

Input parameters
  • $site ... publication name [string]
  • $location ... location [string]
  • $folder ... folder name [string]

global input parameters
  • $user
  • $mgmt_config
  • $hcms_lang
  • $lang

Output
  • result array / false


copyfolders


Description
This function copies/creates all folders of the source location using mkdir (only directories will be created!). Used by pasteobject function.

Syntax
copyfolders ($site, $location, $locationnew, $folder, $user, $no_duplicates=true)

Input parameters
  • $site ... publication name [string]
  • $location ... location (source) [string]
  • $locationnew ... new location (destination) [string]
  • $folder ... folder name [string]
  • $user ... user name [string]
  • $no_duplicates ... do not create a copy of the folder if it exist already [boolean] (optional)

global input parameters
  • $mgmt_config
  • $pageaccess
  • $compaccess
  • $hiddenfolder
  • $hcms_linking
  • $hcms_lang
  • $lang

Output
  • result array similar to createfolder


deletefolder


Description
This function removes a folder. The folder must be empty in order to be removed from the system.

Syntax
deletefolder ($site, $location, $folder, $user)

Input parameters
  • $site ... publication name [string]
  • $location ... location [string]
  • $folder ... folder name [string]
  • $user ... user name [string]

global input parameters
  • $eventsystem
  • $mgmt_config
  • $pageaccess
  • $compaccess
  • $hiddenfolder
  • $hcms_linking
  • $hcms_lang
  • $lang
  • $is_webdav

Output
  • result array


renamefolder


Description
This function renames a folder.

Syntax
renamefolder ($site, $location, $folder, $foldernew, $user)

Input parameters
  • $site ... publication name [string]
  • $location ... location [string]
  • $folder ... folder name [string]
  • $foldernew ... new folder name [string]
  • $user ... user name [string]

global input parameters
  • $eventsystem
  • $mgmt_config
  • $pageaccess
  • $compaccess
  • $hiddenfolder
  • $hcms_linking
  • $hcms_lang
  • $lang
  • $is_webdav

Output
  • result array


correctcontainername


Description
This function adds zeros to the container ID to create the correct file name of the content container.

Syntax
correctcontainername ($container_id)

Input parameters
  • $container_id ... container ID [string]

Output
  • corrected name / false on error


contentcount


Description
This functions returnes the contentcount for the creation of a new container.

Syntax
contentcount ()

Input parameters

global input parameters
  • $mgmt_config

Output
  • true/false


createobject


Description
This function creates a new page or component.

Syntax
createobject ($site, $location, $page, $template, $user)

Input parameters
  • $site ... publication name [string]
  • $location ... location [string]
  • $page ... object name without file extension [string]
  • $template ... template name [string]
  • $user ... user name [string]

global input parameters
  • $eventsystem
  • $mgmt_config
  • $pageaccess
  • $compaccess
  • $hiddenfolder
  • $hcms_linking
  • $hcms_lang
  • $lang
  • $is_webdav

Output
  • result array


uploadhandler


Description
This function manages the upload of a single file

Syntax
uploadhandler ($uploaded_file, $save_file, $is_remote_file=false, $webdav_support=true)

Input parameters
  • $uploaded_file ... path to uploaded file [string]
  • $save_file ... destination file path [string]
  • $is_remote_file ... is the file a remote file and has not been uploaded [boolean] (optional)
  • $webdav_support ... WebDAV support [boolean] (optional)

global input parameters
  • $mgmt_config
  • $hcms_lang
  • $lang
  • $is_webdav

Output
  • result array


uploadfile


Description
This function manages all file uploads, like unzip files, zip a collection of files, create media objects and resize images.
The container name will be extracted from the media file name for updating an existing multimedia file.

Syntax
uploadfile ($site, $location, $cat, $global_files, $page="", $unzip="", $createthumbnail=0, $imageresize="", $imagepercentage="", $user="sys", $checkduplicates=true, $overwrite=false, $versioning=false, $zipfilename="", $zipfilecount=0, $createmedia_in_background=false, $report=false)

Input parameters
  • $site ... publication name [string]
  • $location ... destination location [string]
  • $cat ... category [page, comp]
  • $global_files ... uploaded file (array as defined by PHP autoglobale $_FILES) [array]
  • $page ... unzip/zip [unzip, zip, NULL]
  • $unzip ... object name (only for media file update of existing object) [string]
  • $createthumbnail ... create only a new thumbnail from the uploaded image file [1, 0] (optional)
  • $imageresize ... resize image [percentage, NULL] (optional)
  • $imagepercentage ... image resize percentage value [integer] (optional)
  • $user ... user name [string] (optional)
  • $checkduplicates ... check for duplicates [boolean] (optional)
  • $overwrite ... overwrite existing file [boolean] (optional)
  • $versioning ... versioning of file [boolean] (optional)
  • $zipfilename ... name of zip file [string] (optional)
  • $zipfilecount ... number of files to be compressed [integer] (optional)
  • $createmedia_in_background ... create media files in the background [boolean] (optional)
  • $report ... output report [boolean] (optional)

global input parameters
  • $mgmt_config
  • $mgmt_uncompress
  • $mgmt_compress
  • $mgmt_imagepreview
  • $mgmt_mediapreview
  • $mgmt_mediaoptions
  • $mgmt_imageoptions
  • $mgmt_maxsizepreview
  • $mgmt_parser
  • $eventsystem
  • $pageaccess
  • $compaccess
  • $hiddenfolder
  • $localpermission
  • $hcms_lang
  • $lang
  • $is_webdav

Output
  • result array


createmediaobject


Description
This function creates an asset (multimedia object) by reading the provided source file. The file name must not match any temp file pattern.
The metadata template is based on the template of the folder the objects resides in.

Syntax
createmediaobject ($site, $location, $file, $path_source_file, $user, $imagepercentage=0, $leavefile=false, $deletefile=true, $createmedia_in_background=false)

Input parameters
  • $site ... publication name [string]
  • $location ... destination location [string]
  • $file ... file name [string]
  • $path_source_file ... path to source multimedia file (uploaded file in temp directory) [string]
  • $user ... user name [string]
  • $imagepercentage ... resize original image (100%) by percentage [integer] (optional)
  • $leavefile ... leave file in the source directory and create a symbolic link to the file [boolean] (optional)
  • $deletefile ... delete file in the source directory if no symbolic link is used [boolean] (optional)
  • $createmedia_in_background ... create media files in background [boolean] (optional)

global input parameters
  • $mgmt_config
  • $mgmt_imagepreview
  • $mgmt_mediapreview
  • $mgmt_mediaoptions
  • $mgmt_imageoptions
  • $mgmt_maxsizepreview
  • $mgmt_mediametadata
  • $mgmt_parser
  • $mgmt_imagepreview
  • $mgmt_uncompress
  • $hcms_ext
  • $eventsystem
  • $pageaccess
  • $compaccess
  • $hiddenfolder
  • $hcms_linking
  • $hcms_lang
  • $lang
  • $is_webdav

Output
  • result array


createmediaobjects


Description
This function creates media objects by reading all media files from a given source location (used after unzipfile).
The file name must not match any temp file pattern.

Syntax
createmediaobjects ($site, $location_source, $location_destination, $user, $createmedia_in_background=false, $report=false)

Input parameters
  • $site ... publication name [string]
  • $location_source ... source location [string]
  • $location_destination ... destination location [string]
  • $user ... user name [string]
  • $createmedia_in_background ... create media files in the background [boolean] (optional)
  • $report ... output report [boolean] (optional)

global input parameters
  • $mgmt_config
  • $mgmt_imageoptions
  • $eventsystem
  • $pageaccess
  • $compaccess
  • $hiddenfolder
  • $hcms_linking
  • $hcms_lang
  • $lang

Output
  • result array with all objects created / false on error


editmediaobject


Description
This function mainly uses function createmedia to render the objects media, but at the same time takes care of versioning and the object name, if the file extension has been changed.

Syntax
editmediaobject ($site, $location, $page, $format="jpg", $type="thumbnail", $mediadata="", $user="")

Input parameters
  • $site ... publication name [string]
  • $location ... location [string]
  • $page ... object name [string]
  • $format ... format (file extension w/o dot) [string] (optional)
  • $type ... type of image/video/audio file [thumbnail, origthumb(thumbnail made from original video/audio), original, any other string present in $mgmt_imageoptions] (optional)
  • $mediadata ... base64 encoded media data as alternative to server-side conversion using createmedia [string] (optional)
  • $user ... user name [string]

global input parameters
  • $wf_token
  • $mgmt_config
  • $mgmt_imagepreview
  • $mgmt_mediapreview
  • $mgmt_mediaoptions
  • $mgmt_imageoptions
  • $mgmt_maxsizepreview
  • $mgmt_mediametadata
  • $hcms_ext
  • $hcms_lang
  • $lang

Output
  • result array


manipulateobject


Description
This function removes, unpublishs, renames and pastes objects and is used by other functions which works as a shell for this function

Syntax
manipulateobject ($site, $location, $page, $pagenew, $user, $action, $clipboard_array=array())

Input parameters
  • $site ... publication name [string]
  • $location ... location [string]
  • $page ... object name [string]
  • $pagenew ... new object name (exkl. extension except for action "file_rename") [string]
  • $user ... user name [string]
  • $action ... action [page_delete
  • $clipboard_array ... page_rename

global input parameters
  • $wf_token
  • $eventsystem
  • $mgmt_config
  • $mgmt_mediaoptions
  • $mgmt_docoptions
  • $hcms_ext
  • $pageaccess
  • $compaccess
  • $hiddenfolder
  • $hcms_linking
  • $hcms_lang
  • $lang
  • $is_webdav

Output
  • array


deletemarkobject


Description
This function marks a page, asset, or component as deleted.

Syntax
deletemarkobject ($site, $location, $page, $user)

Input parameters
  • $site ... publication name [string]
  • $location ... location [string]
  • $page ... object name [string]
  • $user ... user name [string]

global input parameters
  • $wf_token
  • $eventsystem
  • $mgmt_config
  • $cat
  • $pageaccess
  • $compaccess
  • $hiddenfolder
  • $hcms_linking
  • $hcms_lang
  • $lang

Output
  • result array


deleteunmarkobject


Description
This function unmarks a page, asset, or component as deleted.

Syntax
deleteunmarkobject ($site, $location, $page, $user)

Input parameters
  • $site ... publication name [string]
  • $location ... location [string]
  • $page ... object name [string]
  • $user ... user name [string]

global input parameters
  • $wf_token
  • $eventsystem
  • $mgmt_config
  • $cat
  • $pageaccess
  • $compaccess
  • $hiddenfolder
  • $hcms_linking
  • $hcms_lang
  • $lang

Output
  • result array


deleteobject


Description
This function removes a page, asset, or component by calling the function manipulateobject.

Syntax
deleteobject ($site, $location, $page, $user)

Input parameters
  • $site ... publication name [string]
  • $location ... location [string]
  • $page ... object name [string]
  • $user ... user name [string]

global input parameters
  • $eventsystem
  • $mgmt_config
  • $cat
  • $pageaccess
  • $compaccess
  • $hiddenfolder
  • $hcms_linking
  • $hcms_lang
  • $lang
  • $is_webdav

Output
  • result array


renameobject


Description
This function renames a page, component or asset and calls the function manipulateobject

Syntax
renameobject ($site, $location, $page, $pagenew, $user)

Input parameters
  • $site ... publication name [string]
  • $location ... location [string]
  • $page ... object name [string]
  • $pagenew ... new object name without file extension [string]
  • $user ... user name [string]

global input parameters
  • $eventsystem
  • $mgmt_config
  • $cat
  • $pageaccess
  • $compaccess
  • $hiddenfolder
  • $hcms_linking
  • $hcms_lang
  • $lang
  • $is_webdav

Output
  • result array


renamefile


Description
This function renames a file (NOT a page, component or asset) and calls the function manipulateobject.
This function renames the file name including the extension and not only the name of an object.
The event that will be executed in the event system is the same as for renameobject.

Syntax
renamefile ($site, $location, $page, $pagenew, $user)

Input parameters
  • $site ... publication name [string]
  • $location ... location [string]
  • $page ... object name [string]
  • $pagenew ... new object including file extension [string]
  • $user ... user name [string]

global input parameters
  • $eventsystem
  • $mgmt_config
  • $cat
  • $pageaccess
  • $compaccess
  • $hiddenfolder
  • $hcms_linking
  • $hcms_lang
  • $lang

Output
  • result array


cutobject


Description
This function cuts a page, component or asset.

Syntax
cutobject ($site, $location, $page, $user, $clipboard_add=false, $clipboard_session=true)

Input parameters
  • $site ... publication name [string]
  • $location ... location [string]
  • $page ... object name [string]
  • $user ... user name [string]
  • $clipboard_add ... add to existing clipboard entries [boolean] (optional)
  • $clipboard_session ... save clipboard in session [boolean] (optional)

global input parameters
  • $eventsystem
  • $mgmt_config
  • $hcms_lang
  • $lang

Output
  • result array


copyobject


Description
This function copies a page, component or asset.

Syntax
copyobject ($site, $location, $page, $user, $clipboard_add=false, $clipboard_session=true)

Input parameters
  • $site ... publication name [string]
  • $location ... location [string]
  • $page ... object name [string]
  • $user ... user name [string]
  • $clipboard_add ... add to existing clipboard entries [boolean] (optional)
  • $clipboard_session ... save clipboard in session [boolean] (optional)

global input parameters
  • $eventsystem
  • $mgmt_config
  • $hcms_lang
  • $lang

Output
  • result array


copyconnectedobject


Description
This function makes a connected copy of a page, component or asset.

Syntax
copyconnectedobject ($site, $location, $page, $user, $clipboard_add=false, $clipboard_session=true)

Input parameters
  • $site ... publication name [string]
  • $location ... location [string]
  • $page ... object name [string]
  • $user ... user name [string]
  • $clipboard_add ... add to existing clipboard entries [boolean] (optional)
  • $clipboard_session ... save clipboard in session [boolean] (optional)

global input parameters
  • $eventsystem
  • $mgmt_config
  • $hcms_lang
  • $lang

Output
  • result array


pasteobject


Description
This function pastes an object by calling and calls the function manipulateobject

Syntax
pasteobject ($site, $location, $user, $clipboard_array=array())

Input parameters
  • $site ... publication name [string]
  • $location ... location [string]
  • $user ... user name [string]
  • $clipboard_array ... clipboard entries [array] (optional)

global input parameters
  • $eventsystem
  • $mgmt_config
  • $cat
  • $pageaccess
  • $compaccess
  • $hiddenfolder
  • $hcms_linking
  • $hcms_lang
  • $lang

Output
  • result array


lockobject


Description
This function locks an object for a specific user

Syntax
lockobject ($site, $location, $page, $user)

Input parameters
  • $site ... publication name [string]
  • $location ... location [string]
  • $page ... object name [string]
  • $user ... user name [string]

global input parameters
  • $eventsystem
  • $mgmt_config
  • $hcms_lang
  • $lang

Output
  • result array


unlockobject


Description
This function unlocks an object of a specific user

Syntax
unlockobject ($site, $location, $page, $user)

Input parameters
  • $site ... publication name [string]
  • $location ... location [string]
  • $page ... object name [string]
  • $user ... user name [string]

global input parameters
  • $eventsystem
  • $mgmt_config
  • $hcms_lang
  • $lang

Output
  • array


publishobject


Description
This function publishes a page, component or asset

Syntax
publishobject ($site, $location, $page, $user)

Input parameters
  • $site ... publication name [string]
  • $location ... location [string]
  • $page ... object name (full name incl. extension) [string]
  • $user ... user name [string]

global input parameters
  • $eventsystem
  • $mgmt_config
  • $ctrlreload
  • $pageaccess
  • $compaccess
  • $hiddenfolder
  • $hcms_linking
  • $hcms_lang
  • $lang

Output
  • result array


publishlinkedobject


Description
This function publishes all linked objects of a given object.
All objects with component links (references) to the given object will be published.
This funtion is only used by publishobject.

Syntax
publishlinkedobject ($site, $location, $page, $user)

Input parameters
  • $site ... publication name [string]
  • $location ... location [string]
  • $page ... object name [string]
  • $user ... user name [string]

global input parameters
  • $eventsystem
  • $mgmt_config
  • $ctrlreload
  • $hcms_lang
  • $lang

Output
  • array


unpublishobject


Description
This function unpublishes a page, component, or asset and calls the function manipulateobject

Syntax
unpublishobject ($site, $location, $page, $user)

Input parameters
  • $site ... publication name [string]
  • $location ... location [string]
  • $page ... object name [string]
  • $user ... user name [string]

global input parameters
  • $eventsystem
  • $mgmt_config
  • $cat
  • $ctrlreload
  • $pageaccess
  • $compaccess
  • $hiddenfolder
  • $hcms_linking
  • $hcms_lang
  • $lang

Output
  • result array


processobjects


Description
Publish, unpublish or delete all objects recursively, and send mails stored in the queue. This function is used by the job 'minutely' to process all objects of the queue.
In order to process all objects recursively a folder name need to be provided and not the .folder file.
This function should not be used for the graphical user interface since it does not provide feedback about the process state!

Syntax
processobjects ($action, $site, $location, $file, $published_only=false, $user="")

Input parameters
  • $action ... action [publish, unpublish, delete, exec]
  • $site ... publication name [string]
  • $location ... location [string]
  • $file ... object name or mail ID [string]
  • $published_only ... only published objects [boolean]
  • $user ... user name [string]

global input parameters
  • $eventsystem
  • $mgmt_config
  • $pageaccess
  • $compaccess
  • $hiddenfolder
  • $hcms_linking
  • $hcms_lang
  • $lang

Output
  • true/false


collectobjects


Description
Help function used to create a list of all objects inside the provided location.

Syntax
collectobjects ($root_id, $site, $cat, $location, $published_only=false)

Input parameters
  • $root_id ... root ID [string]
  • $site ... publication name [string]
  • $cat ... category [page, comp]
  • $location ... location [string]
  • $published_only ... collect only published objects [boolean]

global input parameters
  • $user
  • $pageaccess
  • $compaccess
  • $mgmt_config
  • $hiddenfolder
  • $hcms_lang
  • $lang

Output
  • result array / false


manipulateallobjects


Description
This function is used to perform actions on multiple objects and is mainly used by popup_status.php.
This function should only be used in the GUI of the system.

Syntax
manipulateallobjects ($action, $objectpath_array, $method="", $force="start", $published_only=false, $user="", $process_id="", $maxitems=10)

Input parameters
  • $action ... action [publish, unpublish, deletemark, deleteunmark/restore, emptypin, delete, paste]
  • $objectpath_array ... objectpath [array]
  • $method ... method (only for paste action) [copy, linkcopy, cut]
  • $force ... force [start, stop, continue]
  • $published_only ... collect only published objects [boolean]
  • $user ... user name [string]
  • $process_id ... process ID (created automatically but must be provided for the subsequent calls of the same process) [string] (optional)
  • $maxitems ... max. number of items processed per request/step [integer] (optional)

global input parameters
  • $eventsystem
  • $mgmt_config
  • $pageaccess
  • $compaccess
  • $hiddenfolder
  • $hcms_lang
  • $lang
  • $is_webdav

Output
  • true/false


createqueueentry


Description
Creates a new item in the queue

Syntax
createqueueentry ($action, $object, $date, $published_only, $data="", $user="")

Input parameters
  • $action ... action [publish, unpublish, delete, mail, exec]
  • $object ... object path [string] or object ID [integer]
  • $date ... date and time [YYY-MM-DD HH:MM]
  • $published_only ... publish only published objects [boolean]
  • $data ... PHP command as string or data as array to be saved in the queue [string or array] (optional)
  • $user ... user name [string]

global input parameters
  • $mgmt_config

Output
  • true / false


savemessage


Description
Saves the data of a sent e-mail message.

Syntax
savemessage ($data, $type="mail", $user="")

Input parameters
  • $data ... data to be saved in queue [array]
  • $type ... message type [mail, chat] (optional)
  • $user ... user name [string]

global input parameters
  • $mgmt_config

Output
  • true / false


remoteclient


Description
Sends data to remote client via http post

Syntax
remoteclient ($action, $root, $site, $location, $locationnew, $page, $pagenew)

Input parameters
  • $action ... action [save, copy, delete, rename, get]
  • $root ... root [abs_path_link, abs_path_media, abs_path_comp, abs_path_page, abs_path_rep]
  • $site ... publication name [string]
  • $location ... location [string]
  • $locationnew ... new location [string]
  • $page ... object name [string]
  • $pagenew ... new object name [string]

global input parameters
  • $user
  • $mgmt_config
  • $hcms_lang
  • $lang

Output
  • HTTP response body [string] / false


HTTP_getheader


Description
Extracts the HTTP headers from the response string (header and body are separated by an empty line)

Syntax
HTTP_getheader ($response)

Input parameters
  • $response ... HTTP response [string]

Output
  • HTTP header [array] / false on error


HTTP_getbody


Description
Extracts the HTTP body from the response string (header and body are separated by an empty line)

Syntax
HTTP_getbody ($response)

Input parameters
  • $response ... HTTP response [string]

Output
  • HTTP body [string]


HTTP_Post


Description
Sends data via HTTP post and returns the response header or body

Syntax
HTTP_Post ($URL, $data, $contenttype="application/x-www-form-urlencoded", $charset="UTF-8", $referrer="", $response_type="body", $insecure=true)

Input parameters
  • $URL ... URL [string]
  • $data ... data (raw data) [array]
  • $contenttype ... content-type [application/x-www-form-urlencoded, multipart/form-data] (optional)
  • $charset ... character set [string] (optional)
  • $referrer ... referrer [string] (optional)
  • $response_type ... response type [header, body] (optional)
  • $insecure ... without the certificate issuer verification [bollean] (optional)

global input parameters
  • $mgmt_config

Output
  • HTTP response [string]
  • header [array]
  • or body [string] based on the requested response type / false on error


HTTP_Get


Description
Sends data via http get and returns the response

Syntax
HTTP_Get ($URL, $data="", $contenttype="application/x-www-form-urlencoded", $charset="UTF-8", $response_type="body")

Input parameters
  • $URL ... URL [string]
  • $data ... data (raw data) [array] (optional)
  • $contenttype ... content-type [string excl. charset] (optional)
  • $charset ... character set [string] (optional)
  • $response_type ... response type [full, header, body] (optional)

global input parameters
  • $mgmt_config

Output
  • HTTP response [string]
  • header [array]
  • or body [string] based on the requested response type / false on error


HTTP_Get_contents


Description
Sends a standard http get request with or without certificate issuer verification and returns the response.
This is a wrapper function for the PHP function file_get_contents.

Syntax
HTTP_Get_contents ($URL, $response_type="body", $insecure=true)

Input parameters
  • $URL ... URL or path [string]
  • $response_type ... response type [header, body] (optional)
  • $insecure ... without the certificate issuer verification [bollean] (optional)

global input parameters
  • $mgmt_config

Output
  • response [string] / false on error


HTTP_Proxy


Description
Sends all global POST/GET and FILES data via http post and returns response

Syntax
HTTP_Proxy ($URL, $enable_file=false)

Input parameters
  • $URL ... URL [string]
  • $enable_file ... enable post of files [boolean] (optional)

global input parameters
  • $mgmt_config

Output
  • http response [string] / false on error


loadbalancer


Description
Balances the load by sending all global POST/GET and FILES to one service ressource of a given array of service ressources.
Don't define and use the same server ressources in $mgmt_config['url_path_service'], this can lead to an infinite loop.

Syntax
loadbalancer ($type)

Input parameters
  • $type ... type [renderimage, rendervideo, uploadfile]

global input parameters
  • $mgmt_config

Output
  • http response [string] / false on error or if disabled


createlogentry


Description
Escapes vertical bars and retuns a valid log entry.

Syntax
createlogentry ($values)

Input parameters
  • $values ... log entry values [array]

global input parameters
  • $mgmt_config

Output
  • log entry / false on error


savelog


Description
Adds new entries to a log file.
A log entry must be formed like:
date [YYYY-MM-DD hh:mm]|name of script file [string]|type ["error", "warning" or "information"]|unique code in script file [integer]|description [string]
Use a tabspace /t for a line break in the description for the full view using popup_log.

Syntax
savelog ($error, $logfile="event")

Input parameters
  • $error ... error log entries [array]
  • $logfile ... name of log file without extension [string] (optional)

global input parameters
  • $user
  • $login
  • $site
  • $eventsystem
  • $mgmt_config
  • $hcms_lang
  • $lang

Output
  • true / false on error


loadlog


Description
Loads a log file an returns the data as string or array for all log records.

Syntax
loadlog ($logfile="event", $return_type="array")

Input parameters
  • $logfile ... name of log file without extension [string] (optional)
  • $return_type ... return type [string, array] (optional)

global input parameters
  • $user
  • $eventsystem
  • $mgmt_config
  • $hcms_lang
  • $lang

Output
  • true / false on error


deletelog


Description
Deletes a log file.

Syntax
deletelog ($logname="")

Input parameters
  • $logname ... log name [string] (optional)

global input parameters
  • $user
  • $eventsystem
  • $mgmt_config
  • $hcms_lang
  • $lang

Output
  • result array


debuglog


Description
Writes code lines into debug file in data/log/debug.log

Syntax
debuglog ($code)

Input parameters
  • $code ... code to write to debug file [string]

global input parameters
  • $user
  • $mgmt_config
  • $hcms_lang
  • $lang

Output
  • true / false


checksoftwareversion


Description
Compares the installed or updated software version with a provided version and returns true if the provided version has been installed or updated.

Syntax
checksoftwareversion ($version)

Input parameters
  • $version ... software version for comparison with installed version [string]

global input parameters
  • $mgmt_config

Output
  • true / false


insertuploadlog


Description
This function inserts a log record into the temporary log file.

Syntax
insertuploadlog ($location_esc, $user, $totalcount)

Input parameters
  • $location_esc ... converted location [string]
  • $user ... user name [string]
  • $totalcount ... total files count [integer]

global input parameters
  • $mgmt_config

Output
  • true / false


updateuploadlog


Description
This function reduces the total count by -1 from the temporary log file due to the finished upload by a user.

Syntax
updateuploadlog ($location_esc, $user)

Input parameters
  • $location_esc ... converted location [string]
  • $user ... log record [string]

global input parameters
  • $mgmt_config

Output
  • true / false


loaduploadlog


Description
Loads a temporary upload log file an returns the data as string or array for all log records.

Syntax
loaduploadlog ($location_esc, $return_type="array")

Input parameters
  • $location_esc ... converted location [string]
  • $return_type ... return type [string, array] (optional)

global input parameters
  • $mgmt_config

Output
  • file content as string or array / false


notifyusers


Description
Notifies all users whoch are oberserving an event and location

Syntax
notifyusers ($site, $location, $object, $event, $from_user)

Input parameters
  • $site ... publication name [string]
  • $location ... location [string]
  • $object ... object name [string]
  • $event ... event name [oncreate, onedit, onmove, ondelete]
  • $from_user ... user name of the sender [string]

global input parameters
  • $user
  • $mgmt_config
  • $hcms_lang_codepage
  • $hcms_lang
  • $lang

Output
  • true / false on error


sendlicensenotification


Description
Searches for objects with a date in a defined text field that has to be between the defined date limits and sends a message to the defined users.
This is a helper function for function licensenotification.

Syntax
sendlicensenotification ($site, $cat, $folderpath, $text_id, $date_begin, $date_end, $user, $format="%Y-%m-%d")

Input parameters
  • $site ... publication name [string]
  • $cat ... category [page, comp]
  • $folderpath ... folder path [string]
  • $text_id ... text ID for text field [string]
  • $date_begin ... search from date [YYYY-MM-DD]
  • $date_end ... search till date [YYYY-MM-DD]
  • $user ... user name [string or array] (optional)
  • $format ... date format (optional)

global input parameters
  • $eventsystem
  • $mgmt_config
  • $hcms_lang_codepage
  • $hcms_lang
  • $lang

Output
  • true / false on error


licensenotification


Description
This function reads the license notification configuration and looks up all objects with a date in a defined text field
that has to be between the defined date limits and sends a message to the defined users.

Syntax
licensenotification ()

Input parameters

global input parameters
  • $eventsystem
  • $mgmt_config
  • $hcms_lang_codepage
  • $hcms_lang
  • $lang

Output
  • true / false on error


sendresetpassword


Description
Send a new password to the users e-mail address.

Syntax
sendresetpassword ($login, $type="passwordreset", $instance="")

Input parameters
  • $login ... user name [string]
  • $type ... type of password reset [multifactorauth, passwordreset] (optional)
  • $instance ... instance name [string] (optional)

global input parameters
  • $eventsystem
  • $mgmt_config
  • $hcms_lang
  • $lang

Output
  • message as string


sendloginrequest


Description
Send a login request to the users e-mail address.
This is used in case the LDAP/AD connector is used and users password is not valid anymore and can't be verified if a WebDAV client is used for the logon.

Syntax
sendloginrequest ($login, $instance="")

Input parameters
  • $login ... user name [string]
  • $instance ... instance name [string] (optional)

global input parameters
  • $eventsystem
  • $mgmt_config
  • $hcms_lang
  • $lang

Output
  • message as string


html_diff


Description
Paul's Simple Diff Algorithm v 0.1
Function html_diff is a wrapper for the diff command, it takes two strings and
returns the differences in HTML. The tags used are <ins> and <del>,
which can easily be styled with CSS.

Syntax
html_diff ($old, $new)

Input parameters
  • $old ... old text [string]
  • $new ... new text [string]

Output
  • result text showing deleted and inserted words/differences / false on error


createfavorite


Syntax
createfavorite ($site="", $location="", $page="", $id="", $user="")

Input parameters
  • $site ... publication name [string] (optional)
  • $location ... location [string] (optional)
  • $page ... object name [string] (optional)
  • $id ... identifier (object ID
  • $user ... object hash) [string] (optional)

global input parameters
  • $mgmt_config

Output
  • true / false


deletefavorite


Syntax
deletefavorite ($site="", $location="", $page="", $id="", $user="")

Input parameters
  • $site ... publication name [string] (optional)
  • $location ... location [string] (optional)
  • $page ... object name [string] (optional)
  • $id ... identifier (object ID
  • $user ... object hash) [string] (optional)

global input parameters
  • $mgmt_config

Output
  • true / false


rewrite_targetURI


Syntax
rewrite_targetURI ($site, $text_id, $uri, $exclude_dir_esc="", $rewrite_type="include")

Input parameters
  • $site ... publication name [string]
  • $text_id ... text ID array (text-ID as key and URL parameters as value) to search for in the database [string]
  • $uri ... requested URI [string]
  • $exclude_dir_esc ... exclude path [array] (optional)
  • $rewrite_type ... rewrite type [none, forward, include] (optional)

global input parameters
  • $mgmt_config
  • $publ_config

Output
  • HTTP header with target URL as location / false on error


rewrite_homepage


Description
Uses the page root directory of the publication configuration and forwards to the default index page. No page include supported!

Syntax
rewrite_homepage ($site, $rewrite_type="forward")

Input parameters
  • $site ... publication name [string]
  • $rewrite_type ... rewrite type [none, forward] (optional)

global input parameters
  • $mgmt_config
  • $publ_config

Output
  • HTTP header with target URL as location / false on error


load_csv


Description
Analyzes the content from the CSV file and detects delimiter and enclosure characters if left empty. On success the data will be returned as array starting with a row index of 1.

Syntax
load_csv ($file, $delimiter=";", $enclosure='"', $charset_from="utf-8", $charset_to="utf-8")

Input parameters
  • $file ... path to CSV file [string]
  • $delimiter ... delimiter [string] (optional)
  • $enclosure ... enclosure [string] (optional)
  • $charset_from ... character set of the source data [string] (optional)
  • $charset_to ... character set of the output data [string] (optional)

global input parameters
  • $mgmt_config
  • $eventsystem

Output
  • result array / false on error


create_csv


Description
Creates a CSV file from an associative data array and returns the file as download or writes the file to the file system if a valid path to a directory has been provided.
For support of MS Excel the encoding should be UTF-16LE in older versions or an UTF-8 BOM need to be added for newer versions of Excel.

Syntax
create_csv ($assoc_array, $filename="export.csv", $filepath="php://output", $delimiter=";", $enclosure='"', $charset_from="utf-8", $charset_to="utf-8", $add_bom=false)

Input parameters
  • $assoc_array ... associative data with row-id and column name as keys [array]
  • $filename ... file name [string] (optonal)
  • $filepath ... file path for saving the CSV file [string] (optional)
  • $delimiter ... delimiter [string] (optional)
  • $enclosure ... enclosure [string] (optional)
  • $charset_from ... character set of input data [string] (optional)
  • $charset_to ... character set of output data [string] (optional)
  • $add_bom ... add UTF-8 BOM [boolean] (optional)

Output
  • true / false on error


sendmessage


Description
Sends a message via e-mail to a user.

Syntax
sendmessage ($from_user="", $to_user="", $title="", $message="", $object_id="", $site="")

Input parameters
  • $from_user ... from user name [string] (optional)
  • $to_user ... user name of receiver [string]
  • $title ... title [string]
  • $message ... message [string]
  • $object_id ... object ID or object path [string] (optional)
  • $site ... publication name [string] (optional)

global input parameters
  • $mgmt_config
  • $hcms_lang_codepage
  • $hcms_lang
  • $lang

Output
  • true/false


linking_valid


Description
Verifies if a valid access linking exists.

Syntax
linking_valid ()

Input parameters

global input parameters
  • $mgmt_config
  • $hcms_linking

Output
  • true/false


linking_objects


Description
Returns the all objects of an access link as an array.

Syntax
linking_objects ($return_text_id=array())

Input parameters
  • $return_text_id ... %

global input parameters
  • $mgmt_config
  • $hcms_linking

Output
  • result array / false on error


linking_inscope


Description
Verifies if the provided location path is in the scope of the access linking.

Syntax
linking_inscope ($site, $location, $page="", $cat="")

Input parameters
  • $site ... publication name [string] (optional)
  • $location ... location [string]
  • $page ... object name [string] (optional)
  • $cat ... object category [comp, page] (optional)

global input parameters
  • $mgmt_config
  • $hcms_linking

Output
  • true/false


savecontent


Description
Saves the provided content for a specific object. Only the provided content based on its ID will be saved. Existing content with a different ID will not be deleted.
This is a simplified version of the service savecontent that is used by the multiedit feature and the OpenAPI (SOAP Webservice).
Example of a page content array as content input:
array(
array(
"pagetitle"=>"My Page",
"pageauthor"=>"Thomas Tester",
"pagedescription"=>"Just an example"
),
array(
"id"=>"MyText",
"textu"=>"I am a text"
),
array(
"id"=>"MyKeywords",
"textk"=>"apple, car, mobile",
"language"=>"en"
),
array(
"id"=>"MyImage",
"mediaobject"=>"%comp%/myPublication/image.jpg",
"mediaalttext"=>"This is my image",
"mediaalign"=>"top",
"mediawidth"=>"260",
"mediaheight"=>"140",
),
array(
"id"=>"MyLink",
"linkhref"=>"http://www.hypercms.com",
"linktarget"=>"_SELF",
"linktext"=>"hyperCMS Home"
),
array(
"id"=>"MyComponent",
"componentm"=>"%comp%/comp_1.html|%comp%/comp_2.html",
"condition"=>""
)
)

Syntax
savecontent ($site, $location, $page, $content, $charset="UTF-8", $user="", $db_connect="")

Input parameters
  • $site ... publication name [string]
  • $location ... location [string]
  • $page ... object name [string]
  • $content ... content array with 1st key as index number and 2nd keys as id or name according to the template tags [array]
  • $charset ... character set [string] (optional)
  • $user ... user name [string]
  • $db_connect ... DB connectivity file name [string] (optional)

global input parameters
  • $mgmt_config
  • $lang
  • $hcms_lang
  • $eventsystem
  • $rootpermission
  • $globalpermission
  • $localpermission
  • $siteaccess
  • $pageaccess
  • $compaccess
  • $adminpermission
  • $hiddenfolder

Output
  • true/false


createCORSheader


Description
Create the CORS HTTP header required for cross-domain services. It will allow any GET, POST, or OPTIONS requests from any allowed origin.

Syntax
createCORSheader ($allow_origins)

Input parameters
  • $allow_origins ... allowed origin [string]

Output
  • CORS http headers


Noch Fragen?
Diese Website verwendet Cookies, um Ihnen das bestmögliche Erlebnis auf unserer Website zu ermöglichen. Mehr info