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 Realisierung 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.
hyperCMS API Function Reference
- Main API Functions
- Get API Functions
- Set API Functions
- Connect API Functions
- Security API Functions
- Media API Functions
- Metadata API Functions
- Link API Functions
- Plugin API Functions
- User Interface API Functions
- Template Engine API Functions
- XML API Functions
- Report API Functions
- Project API Functions
- Task API Functions
- Workflow API Functions
- Cloud Storage API Functions
- 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
cleancontent
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
Description
Removes all HTML tags, scripts and other special characters from the content in order to create a plain text
remove_utf8_bom
Syntax
remove_utf8_bom ($text)
Input parameters
$text ... text [string]
Output
cleaned text / false on error
Description
Remove UTF-8 BOM sequences
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
Syntax
specialchr ($expression, $accept="")
Input parameters
$expression ... expression [string]
$accept ... list of characters to be excluded from search [string] (optional)
Output
true/false
Description
Tests if an expression includes special characters (true) or does not (false).
Allows you to accept characters through including it into $accept (e.g. #$...)
specialchr_encode
Syntax
specialchr_encode ($expression, $remove="no")
Input parameters
$expression ... expression [string]
$remove ... remove all special characters [yes, no]
global input parameters
$user
$mgmt_config
$hcms_lang
$lang
Output
expression without special characters (for file names)
Description
Renames all special characters for file names to an expression according to given rules
specialchr_decode
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) / false
Description
This is the decode function for function specialchr_encode
convertdate
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
Description
This function converts a date to a different time zone and format.
offsettime
Syntax
offsettime ()
Input parameters
Output
Description
This function calculates the offset time from UTC (Coordinated Universal Time).
object_exists
Syntax
object_exists ($path)
Input parameters
$path ... path to an object [string]
global input parameters
$user
$mgmt_config
$hcms_lang
$lang
Output
true / false
Description
This function verifies if an object exists already.
is_utf8
Syntax
is_utf8 ($str)
Input parameters
$str ... expression [string]
Output
if string is utf-8 encoded true / false otherwise
Description
This function is an alternative to mb_check_encoding (which requires an extra PHP module).
It is not failsave!
is_latin1
Syntax
is_latin1 ($str)
Input parameters
$str ... expression [string]
Output
if string is latin 1 encoded true / false otherwise
Description
This function is an alternative to mb_check_encoding (which requires an extra PHP module).
It is not failsave!
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_emptyfolder
Syntax
is_emptyfolder ($dir)
Input parameters
$dir ... path to folder [string]
global input parameters
$mgmt_config
Output
true / false
Description
Checks if a directory/folder is empty (has no published objects or other files)
is_supported
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]
Output
true / false
Description
This function determines if a certain file type by its file extension is supported by the systems media conversion
is_cloudstorage
Syntax
is_cloudstorage ($site="")
Input parameters
$site ... publication name [string] (optional)
global input parameters
$mgmt_config
Output
true / false
Description
This function determines if a cloud storage has been defined in the main configuration or for a specific publication
is_cloudobject
Syntax
is_cloudobject ($file)
Input parameters
$file ... path to media file or media file name [string]
global input parameters
$mgmt_config
Output
true / false
Description
This functions verifies if an object/file is available in the cloud storage
is_date
Syntax
is_date ($date, $format="Y-m-d")
Input parameters
$date ... date [string]
$format ... date format [string] (optional)
Output
true / false
Description
This function determines if a string represents a valid date format
is_tempfile
Syntax
is_tempfile ($path)
Input parameters
$path ... file name or path [string]
global input parameters
$user
$mgmt_config
$hcms_lang
$lang
Output
if file is a temp file true / false on error
Description
This functions checks if the provided file name is a temporary file
is_thumbnail
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 [true, false]
global input parameters
$user
$mgmt_config
$hcms_lang
$lang
Output
if file is a thumbnail file true / false on error
Description
This functions checks if the provided file name is a thumbnail file
is_config
Syntax
is_config ($media)
Input parameters
$media ... file name or path [string]
global input parameters
$user
$mgmt_config
$hcms_lang
$lang
Output
if file is a config file true / false if not
Description
This functions checks if the provided file name is a config file
is_encryptedfile
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
Description
This functions checks if the provided file is encrypted
is_document
Syntax
is_document ($file)
Input parameters
$file ... file name or file extension [string]
global input parameters
$mgmt_config
$hcms_ext
Output
true / false
Description
This function determines if a certain file is a document (binary and text based)
is_image
Syntax
is_image ($file)
Input parameters
$file ... file name or file extension [string]
global input parameters
$mgmt_config
$hcms_ext
Output
true / false
Description
This function determines if a certain file is an image
is_rawimage
Syntax
is_rawimage ($file)
Input parameters
$file ... file name or file extension [string]
global input parameters
$mgmt_config
$hcms_ext
Output
true / false
Description
This function determines if a certain file is a raw image
is_aiimage
Syntax
is_aiimage ($file)
Input parameters
$file ... file name or file extension [string]
Output
true / false
Description
This function determines if a certain file is a vector-based Adobe Illustrator (AI) or AI-compatible EPS file
is_video
Syntax
is_video ($file)
Input parameters
$file ... file name or file extension [string]
global input parameters
$mgmt_config
$hcms_ext
Output
true / false
Description
This function determines if a certain file is a video
is_rawvideo
Syntax
is_rawvideo ($file)
Input parameters
$file ... file name or file extension [string]
global input parameters
$mgmt_config
$hcms_ext
Output
true / false
Description
This function determines if a certain file is a RAW video
is_audio
Syntax
is_audio ($file)
Input parameters
$file ... file name or file extension [string]
global input parameters
$mgmt_config
$hcms_ext
Output
true / false
Description
This function determines if a certain file is an audio file
is_mobilebrowser
Syntax
is_mobilebrowser ()
Input parameters
global input parameters
$user
$mgmt_config
Output
true / false
Description
Detects mobile browsers (smartphones and tablets)
is_iOS
Syntax
is_iOS ()
Input parameters
global input parameters
$user
$mgmt_config
Output
true / false
Description
Detects if a mobile browser is an iPhone, iPad or IPod
is_activelanguage
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
Description
This function determines if a language has been enabled for automatic translation in the publication settings
copyrecursive
Syntax
copyrecursive ($src, $dst)
Input parameters
$src ... source directory [string]
$dst ... destination directory [string]
Output
true/false
Description
This function copyies all directories and files from source to destination directory
array_iunique
Syntax
array_iunique ($array)
Input parameters
$array ... array [array]
Output
unique array / false
Description
This function is the case-insensitive form of PHPs array_unique function
in_array_substr
Syntax
in_array_substr ($search, $array)
Input parameters
$search ... search expression [string]
$array ... array [array]
Output
true / false
Description
This function is supporting the search of substrings in the array values compared to PHPs in_array function
createfilename
Syntax
createfilename ($filename)
Input parameters
$filename ... path to file or directory [string]
global input parameters
$mgmt_config
$hcms_lang
$lang
Output
new filename/false
Description
Create an valid file name without special characters that does not exceed the maximum file name length
correctfile
Syntax
correctfile ($abs_path, $filename, $user="")
Input parameters
$abs_path ... path to file or directory [string]
$filename ... file or directory name [string]
$user ... user name [string]
global input parameters
$mgmt_config
$hcms_lang
$lang
Output
correct filename/false
correctpath
Syntax
correctpath ($path, $slash="/")
Input parameters
$path ... path to folder [string]
$slash ... directory seperator [string] (optional)
Output
correct path/false
convertpath
Syntax
convertpath ($site, $path, $cat="")
Input parameters
$site ... publication name [string]
$path ... content management path to folder or object [string]
$cat ... object category [page, comp]
global input parameters
$user
$mgmt_config
$hcms_lang
$lang
Output
converted path or URL / false on error
Description
This function replaces object pathes of the content management config with %page% and %comp% path variables
convertlink
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
Description
This function replaces pathes of the publication management config with %page% and %comp% path variables.
deconvertpath
Syntax
deconvertpath ($objectpath, $type="file", $specialchr_transform=true)
Input parameters
$objectpath ... string including path to folder or object [string]
$type ... convert to file system path or URL [file, url] (optional)
$specialchr_transform ... transform special characters using specialchr_encode [true, false] (optional)
global input parameters
$user
$mgmt_config
$hcms_lang
$lang
Output
deconverted path/false
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 transform special characters as well.
BE AWARE: The input path must not provide template data since valid_publicationname mightreturn false.
deconvertlink
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
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.
mediapublicaccess
Syntax
mediapublicaccess ($mediafile)
Input parameters
$mediafile ... media file name [string]
global input parameters
$mgmt_config
Output
true / false
Description
Is the media file public accessible (has it been published or has publicdownload in main configuration been enabled).
This function does not include direct links to the media files (used in websites).
createviewlink
Syntax
createviewlink ($site, $mediafile, $name="", $force_reload=false, $type="wrapper")
Input parameters
$site ... publication name [string]
$mediafile ... media file name [string]
$name ... media name [string] (optional)
$force_reload ... force reload [true, false] (optional)
$type ... link type [wrapper, download] (optional)
global input parameters
$user
$mgmt_config
Output
URL for download of the multimedia file / false on error
Description
The view link is mainly used inside the system in order to reference and load a multimedia file.
The database is not required since the object hash or ID is not needed to create the view link.
createaccesslink
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 login name [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 given object / false on error
createobjectaccesslink
Syntax
createobjectaccesslink ($site="", $location="", $object="", $cat="", $object_id="", $container_id="")
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 [string] (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
createwrapperlink
Syntax
createwrapperlink ($site="", $location="", $object="", $cat="", $object_id="", $container_id="")
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 [string] (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
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]
createdownloadlink
Syntax
createdownloadlink ($site="", $location="", $object="", $cat="", $object_id="", $container_id="")
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 [string] (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
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]
createmultidownloadlink
Syntax
createmultidownloadlink ($site, $multiobject="", $media="", $location="", $name="", $user, $type="", $mediacfg="", $linktype="download")
Input parameters
$site ... publication name [string]
$multiobject ... multiobject string [string] (optional)
$media ... media file name [string] (optional)
$location ... location [string] (optional)
$name ... presentation name [string] (optional)
$user ... user name [string]
$type ... conversion type (format
$mediacfg ... e.g: jpg) [string]
$linktype ... media configuration used for conversion (e.g.: 1024x768px) [string]
global input parameters
$mgmt_config
$mgmt_compress
$pageaccess
$compaccess
$hiddenfolder
$hcms_linking
$globalpermission
$setlocalpermission
$hcms_lang
$lang
Output
download link / false on error
Description
Generates a download link of a single media file, folder or multi objects.
Priority if multiple input parameters for media file, folder or multi objects are given:
1st...multi objects
2nd...media file
3rd...folder
cleandomain
Syntax
cleandomain ($path)
Input parameters
$path ... string to clean from http(s)://domain [string]
global input parameters
$mgmt_config
$hcms_lang
$lang
Output
cleanded string / false on error
Description
Returns the URL notation without the protocoll://domain.
fileversion
Syntax
fileversion ($file)
Input parameters
$file ... file name [string]
Output
versioned file name [string] / false on error
Description
Creates a version file name
createversion
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
Description
Creates a new version of a multimedia file and container
rollbackversion
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
Description
Makes an older object version to the current version
deleteversion
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
Description
Removes the version of an object
deleteversions
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
Description
Removes all versions of all objects or templates
loadfile_header
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
Description
Loads the file header, represented by a defined header size.
loadfile_fast
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
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.
loadfile
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
Description
This function loads a file and waits up to 3 seconds for locked files to be unlocked
loadlockfile
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
Description
This function loads and locks a file for a sepecific user. It waits up to 3 seconds for locked files to be unlocked.
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.
savefile
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
Description
This function saves content to a file
savelockfile
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
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.
appendfile
Syntax
appendfile ($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
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.
lockfile
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
Description
This functions lockes a file for a specific user
unlockfile
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
Description
This functions unlockes a file for a specific user
deletefile
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 [true, false]
global input parameters
$user
$mgmt_config
$hcms_lang
$lang
Output
true/false
Description
Deletes a file or directory. If parameter recursive is et to true all items of a directory will be removed as well.
restoremediafile
Syntax
restoremediafile ($site, $mediafile)
Input parameters
$site ... publication name [string]
$mediafile ... media file name [string]
global input parameters
$mgmt_config
Output
result array
Description
Moves an exported media file back to the media repository.
preparemediafile
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
Description
Prepares a media file for use in the system (load from cloud, decrypt content)
deletemediafiles
Syntax
deletemediafiles ($site, $mediafile, $delete_original=false)
Input parameters
$site ... publication name [string]
$mediafile ... mediafile name [string]
$delete_original ... delete original media file [true, false] (optional)
global input parameters
$user
$mgmt_config
$mgmt_mediaoptions
$mgmt_docoptions
$hcms_ext
$hcms_lang
$lang
Output
true/false
Description
Deletes all derivates (thumbnails, config files, converted versions of the file) of a specific media file resource. Deletes the original media file optionally .
avoidfilecollision
Syntax
avoidfilecollision ($data="tempdata", $force=false)
Input parameters
$data ... data string [string] (optional)
$force ... force execution [true, false]
global input parameters
$mgmt_config
$site
Output
true / false on error
Description
Appending data to a file ensures that the previous write process is finished (required due to issue when editing encrypted files)
substr_in_array
Syntax
substr_in_array ($search, $array)
Input parameters
$search ... search-string [string]
$array ... array [array]
Output
array with found values / false
Description
Searches for substring in array
downloadobject
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
Description
This functions provides an object via http for viewing, not suitable for multimedia objects!
downloadfile
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
Output
stream of file content / false on error
Description
This functions provides a file via http for view or download
loadcontainer
Syntax
loadcontainer ($container, $type="work", $user)
Input parameters
$container ... container file name or container id (working container will be loaded by default) [string]
$type ... optional container type [published, work, version]
$user ... user name [string]
global input parameters
$mgmt_config
$hcms_lang
$lang
Output
XML content of container / false on error
Description
This functions loads a content container
savecontainer
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 [string]
$user ... user name [string]
$init ... save container initally [true, false] (optional)
global input parameters
$mgmt_config
$hcms_lang
$lang
Output
true / false on error
Description
Saves data into existing content container by default. Only if $init is set to true it will initally save a non existing container.
checkworkflow
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
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.
inherit_db_load
Syntax
inherit_db_load ($user)
Input parameters
$user ... %
global input parameters
$siteaccess
$mgmt_config
$hcms_lang
$lang
Output
inheritance database [2 dim. array]/false
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
inherit_db_read
Syntax
inherit_db_read ()
Input parameters
global input parameters
$user
$mgmt_config
$hcms_lang
$lang
Output
inheritance database [2 dim. array]/false
Description
This function loads the inheritance database for reading
inherit_db_close
Syntax
inherit_db_close ($user)
Input parameters
$user ... %
global input parameters
$mgmt_config
$hcms_lang
$lang
Output
true/false
Description
Closes and unlocks the inheritance management database
inherit_db_save
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
Description
This function saves und unlocks the inheritance management database
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
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]
Description
This function updates and insert all references from a child an its parents
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
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
Description
This function creates a new instance with all its files and the mySQL database
editinstance
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
Description
This function saves the instance configuration in the config file
deleteinstance
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
Description
This function creates a new instance with all its files and the mySQL database
createpublication
Syntax
createpublication ($site_name, $user="sys")
Input parameters
$site_name ... publication name [string]
$user ... user name [string]
global input parameters
$siteaccess
$eventsystem
$mgmt_config
$hcms_lang
$lang
Output
result array
Description
This function creates a new publication with all its files
editpublication
Syntax
editpublication ($site_name, $setting, $user="sys")
Input parameters
$site_name ... publication name [string]
$setting ... publication settings with setting name as key and paramater as value [array]
$user ... user name [string]
global input parameters
$eventsystem
$mgmt_config
$hcms_lang
$lang
Output
result array
Description
This function saves all settings of a publication. It is a good avice to load the settings of a publication and minpulate the values in order to provide all settings as input.
editpublicationsetting
Syntax
editpublicationsetting ($site_name, $setting, $user="sys")
Input parameters
$site_name ... publication name [string]
$setting ... publication settings with setting name as key and setting paramater as value (see publication config file for details) [array]
$user ... user name [string]
global input parameters
$eventsystem
$mgmt_config
$hcms_lang
$lang
Output
result array
Description
This function can be used to edit a single settings of a publication
deletepublication
Syntax
deletepublication ($site_name, $user="sys")
Input parameters
$site_name ... publication name [string]
$user ... user name [string]
global input parameters
$mgmt_config
$eventsystem
$hcms_lang
$lang
Output
result array
Description
This function deletes a publication with all its files
createpersonalization
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
Description
This function creates a new customer personalization tracking or profile
deletepersonalization
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
Description
This function deletes a customer personalization tracking or profile
createtemplate
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
Description
This function creates a new template
loadtemplate
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
Description
This function loads templates by given 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.
edittemplate
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 ... template content [string] (optional)
$content ... template extension [string] (optional)
$extension ... temlate application [string] (optional)
$application
global input parameters
$eventsystem
$mgmt_config
$hcms_lang
$lang
Output
result array
Description
This function edites a template
deletetemplate
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
Description
This function deletes a template
createuser
Syntax
createuser ($site="", $login, $password, $confirm_password, $user="sys")
Input parameters
$site ... publication name [string] (optional)
$login ... user login name [string]
$password ... password [string]
$confirm_password ... confirmed password [string]
$user ... user name [string] (optional)
global input parameters
$eventsystem
$mgmt_config
$mgmt_lang_shortcut_default
$hcms_lang
$lang
Output
result array
Description
This function creates a new user. Use *Null* for publication name to remove access to all publications.
edituser
Syntax
edituser ($site, $login, $old_password="", $password="", $confirm_password="", $superadmin="0", $realname="", $language="en", $timezone="", $theme="", $email="", $phone="", $signature="", $usergroup="", $usersite="", $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] (optional)
$realname ... real name [string] (optional)
$language ... language setting [en, de, ...] (optional)
$timezone ... time zone [string] (optional) theme name (optional)
$theme ... email [string] (optional)
$email ... phone (optional)
$phone ... usergroup string [group1|group2] (optional)
$signature ... member of publication(s) string [site1|site2] (optional)
$usergroup ... user name [string] (optional)
$usersite
$user
global input parameters
$eventsystem
$login_cat
$group
$mgmt_config
$hcms_lang
$lang
Output
result array
Description
This function edits a user. Use *Leave* as input if a value should not be changed. Use *Null* for publication name to remove access to all publications. Use *Null* for user group to remove user from all user groups of the publication.
deleteuser
Syntax
deleteuser ($site, $login, $user="sys")
Input parameters
$site ... publication where the user should be removed [*Null*] for all publications [string]
$login ... user login name [string]
$user ... user name [string]
global input parameters
$eventsystem
$mgmt_config
$hcms_lang
$lang
Output
array
Description
This function removes a user
creategroup
Syntax
creategroup ($site, $group_name, $user="sys")
Input parameters
$site ... publication name [string]
$group_name ... group name [string]
$user ... user name [string]
global input parameters
$eventsystem
$mgmt_config
$hcms_lang
$lang
Output
array
Description
This function creates a new user group
editgroup
Syntax
editgroup ($site, $group_name, $pageaccess, $compaccess, $permission, $user)
Input parameters
$site ... publication name [string]
$group_name ... group name [string]
$pageaccess ... page folder access array [array]
$compaccess ... component folder access array [array]
$permission ... permissions [array]
$user ... user name [string]
global input parameters
$eventsystem
$mgmt_config
$hcms_lang
$lang
Output
array
Description
This function removes a user group
deletegroup
Syntax
deletegroup ($site, $group_name, $user)
Input parameters
$site ... publication name [string]
$group_name ... group name [string]
$user ... user name [string]
global input parameters
$eventsystem
$mgmt_config
$hcms_lang
$lang
Output
array
Description
This function removes a user group
renamegroupfolder
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
Description
This function renames a workgroup folder
deletegroupfolder
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
Description
This function removes a group folder
renameworkflowfolder
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
Description
This function renames a workgroup folder
deleteworkflowfolder
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
Description
This function removes a workgroup folder
createmediacat
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
Description
Creates a new media category in the template media index file. Only used for template media.
renamemediacat
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
Description
Renames a new media category in the template media index file
deletemediacat
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
Description
Deletes a new media category in the template media index file
uploadtomediacat
Syntax
uploadtomediacat ($site, $mediacat_name, $global_files)
Input parameters
$site ... publication name [string]
$mediacat_name ... media category name [string]
$global_files ... PHP FILES array [array]
global input parameters
$user
$eventsystem
$mgmt_config
$hcms_lang
$lang
Output
Array with onload JS-code and message
Description
Uploads a media file into a given template media category
deletefrommediacat
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
Description
Deletes a media file from the template media category index
createfolder
Syntax
createfolder ($site, $location, $foldernew, $user)
Input parameters
$site ... publication name [string]
$location ... location [string]
$foldernew ... folder name [string]
$user ... user name [string]
global input parameters
$eventsystem
$mgmt_config
$cat
$pageaccess
$compaccess
$hiddenfolder
$hcms_linking
$hcms_lang
$lang
Output
result array
Description
This function creates a new folder. The folder name must not match the temp file patterns defined in include/tempfilepatterns.inc.php
createfolders
Syntax
createfolders ($site, $location, $foldernew, $user)
Input parameters
$site ... publication name [string]
$location ... location [string]
$foldernew ... folder name [string]
$user ... user name [string]
global input parameters
$eventsystem
$mgmt_config
$cat
$pageaccess
$compaccess
$hiddenfolder
$hcms_linking
$hcms_lang
$lang
Output
array
Description
This function creates all folders recursively
collectfolders
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
Description
Help function to create the collection of folders
copyfolders
Syntax
copyfolders ($site, $location, $locationnew, $folder, $user)
Input parameters
$site ... publication name [string]
$location ... location (source) [string]
$locationnew ... new location (destination) [string]
$folder ... folder name [string]
$user ... user name [string]
global input parameters
$mgmt_config
$cat
$pageaccess
$compaccess
$hiddenfolder
$hcms_linking
$hcms_lang
$lang
Output
result array equal to createfolder
Description
This function copies/creates all folders of the source location using mkdir (only directories will be created!). Used by pasteobject function.
deletefolder
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
$cat
$pageaccess
$compaccess
$hiddenfolder
$hcms_linking
$hcms_lang
$lang
Output
array
Description
This function removes an folder. The folder must be empty in order to be removed from the system.
renamefolder
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
$cat
$pageaccess
$compaccess
$hiddenfolder
$hcms_linking
$hcms_lang
$lang
Output
array
Description
This function renames a folder
correctcontainername
Syntax
correctcontainername ($container_id)
Input parameters
$container_id ... container ID [string]
Output
corrected name / false on error
Description
This function adds zeros to the container ID to create the correct file name of the content container.
createobject
Syntax
createobject ($site, $location, $page, $template, $user)
Input parameters
$site ... publication name [string]
$location ... location [string]
$page ... object name [string]
$template ... template name [string]
$user
global input parameters
$eventsystem
$mgmt_config
$pageaccess
$compaccess
$hiddenfolder
$hcms_linking
$hcms_lang
$lang
Output
result array
Description
This function creates a new page or component
uploadfile
Syntax
uploadfile ($site, $location, $cat, $global_files, $page="", $unzip="", $createthumbnail=0, $imageresize="", $imagepercentage="", $user="sys", $checkduplicates=true, $versioning=false, $zipfilename="", $zipfilecount=0)
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]
$unzip ... object name (only for media file update of existing object) [string]
$createthumbnail ... create only a new thumbnail [1, 0] (optional)
$imageresize ... imageresize [percentage, null] (optional)
$imagepercentage ... imagepercentage [%-value as integer] (optional)
$user ... user name [string] (optional)
$checkduplicates ... check for duplicates [true, false] (optional)
$versioning ... versioning of file [true, false] (optional)
$zipfilename ... name of zip file [string] (optional)
$zipfilecount ... number of files to be compressed [integer] (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
Output
result array
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.
createmediaobject
Syntax
createmediaobject ($site, $location, $file, $path_source_file, $user, $imagepercentage=0, $leavefile=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 directory and create a symbolic link to the file [true, false] (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
Output
result array
Description
This function creates an asset (multimedia object) by reading a given source file. The file name must not match the temp file patterns defined in include/tempfilepatterns.inc.php and .recycle for recycled files.
The metadata template is based on the template of the folder the objects resides in.
createmediaobjects
Syntax
createmediaobjects ($site, $location_source, $location_destination, $user)
Input parameters
$site ... publication name [string]
$location_source ... source location [string]
$location_destination ... destination location [string]
$user ... user name [string]
global input parameters
$mgmt_config
$mgmt_imageoptions
$eventsystem
$pageaccess
$compaccess
$hiddenfolder
$hcms_linking
$hcms_lang
$lang
Output
result array with all objects created / false
Description
This function creates media objects by reading all media files from a given source location (used after unzipfile).
The file namey must not match the temp file patterns defined in include/tempfilepatterns.inc.php
editmediaobject
Syntax
editmediaobject ($site, $location, $page, $format="jpg", $type="thumbnail", $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(thumbail made from original video/audio), original, any other string present in $mgmt_imageoptions] (optional)
$user
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 / false on error (saves original or thumbnail media file of an object
for thumbnail only jpeg format is supported as output)
user name
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
manipulateobject
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
$cat
$hcms_lang
$lang
Output
array
Description
This function removes, unpublishs, renames and pastes objects and is used by other functions which works as a shell for this function
deletemarkobject
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
Description
This function marks a page, asset, or component as deleted.
deleteunmarkobject
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
Description
This function unmarks a page, asset, or component as deleted.
deleteobject
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
Output
result array
Description
This function removes a page, asset, or component by calling the function manipulateobject.
renameobject
Syntax
renameobject ($site, $location, $page, $pagenew, $user)
Input parameters
$site ... publication name [string]
$location ... location [string]
$page ... object name [string]
$pagenew ... new object name exkl. file extension [string]
$user ... user name [string]
global input parameters
$eventsystem
$mgmt_config
$cat
$pageaccess
$compaccess
$hiddenfolder
$hcms_linking
$hcms_lang
$lang
Output
array
Description
This function renames a page or component and calls the function manipulateobject
renamefile
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
array
Description
This function renames a file (NOT a page or component) 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 renameobject.
cutobject
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 [true, false] (optional)
$clipboard_session ... save clipboard in session [true, false] (optional)
global input parameters
$eventsystem
$mgmt_config
$cat
$hcms_lang
$lang
Output
result array
Description
This function cuts a page or component
copyobject
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 [true, false] (optional)
$clipboard_session ... save clipboard in session [true, false] (optional)
global input parameters
$eventsystem
$mgmt_config
$cat
$hcms_lang
$lang
Output
array
Description
This function copies a page or component
copyconnectedobject
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 [true, false] (optional)
$clipboard_session ... save clipboard in session [true, false] (optional)
global input parameters
$eventsystem
$mgmt_config
$cat
$hcms_lang
$lang
Output
array
Description
This function makes a connected copy of a page or component
pasteobject
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
array
Description
This function pastes an object by calling and calls the function manipulateobject
lockobject
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
$cat
$hcms_lang
$lang
Output
array
Description
This function locks an object for a specific user
unlockobject
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
$cat
$hcms_lang
$lang
Output
array
Description
This function unlocks an object of a specific user
publishobject
Syntax
publishobject ($site, $location, $page, $user)
Input parameters
$site ... publication name [string]
$location ... location [string]
$page ... object name (full name incl. extension) [string]
$user
global input parameters
$eventsystem
$mgmt_config
$cat
$ctrlreload
$pageaccess
$compaccess
$hiddenfolder
$hcms_linking
$hcms_lang
$lang
Output
array
Description
This function publishes a page, component or asset
publishlinkedobject
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
$cat
$ctrlreload
$hcms_lang
$lang
Output
array
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.
unpublishobject
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
array
Description
This function unpublishes a page, component, or asset and calls the function manipulateobject
processobjects
Syntax
processobjects ($action, $site, $location, $file, $published_only="0", $user)
Input parameters
$action ... action [publish, unpublish, delete]
$site ... publication name [string]
$location ... location [string]
$file ... object name or mail ID [string]
$published_only ... only published objects [pub, all]
$user ... user name [string]
global input parameters
$eventsystem
$mgmt_config
$pageaccess
$compaccess
$hiddenfolder
$hcms_linking
$hcms_lang
$lang
Output
true/false on error
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!
collectobjects
Syntax
collectobjects ($root_id, $site, $cat, $location, $published_only="0")
Input parameters
$root_id ... root ID [string]
$site ... publication name [string]
$cat ... category [page, comp]
$location ... location [string]
$published_only ... collect only published objects [0, 1]
global input parameters
$user
$pageaccess
$compaccess
$mgmt_config
$hiddenfolder
$hcms_lang
$lang
Output
result array / false
Description
Help function used to create a list of all objects inside a folder
manipulateallobjects
Syntax
manipulateallobjects ($action, $objectpath_array, $method="", $force="start", $published_only=0, $user, $tempfile="", $maxitems=5)
Input parameters
$action ... action [publish
$objectpath_array ... unpublish
$method ... deletemark
$force ... deleteunmark/restore
$published_only ... emptypin
$user ... delete
$tempfile ... paste]
$maxitems ... objectpath [array]
global input parameters
$eventsystem
$mgmt_config
$cat
$pageaccess
$compaccess
$hiddenfolder
$hcms_lang
$lang
Output
true/false
Description
This function is used to perform actions on multiple objects and is mainly used by popup_status.php.
This functions should only be used in connection with the GUI of the system.
createqueueentry
Syntax
createqueueentry ($action, $object, $date, $published_only, $data="", $user)
Input parameters
$action ... action [publish, unpublish, delete, mail]
$object ... object path [string] or object ID [integer]
$date ... date and time [YYY-MM-DD HH:MM]
$published_only ... publish only published objects [0, 1]
$data ... data to be saved in queue [array] (optional)
$user ... user name [string]
global input parameters
$mgmt_config
Output
true / false
Description
Creates a new item in the queue
savemessage
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
Description
Saves the data of a sent e-mail message.
remoteclient
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 answer [string] or false
Description
Sends data to remote client via http post
HTTP_Post
Syntax
HTTP_Post ($URL, $data, $contenttype="application/x-www-form-urlencoded", $charset="UTF-8", $referrer="")
Input parameters
$URL ... URL [string]
$data ... data (raw data) [array]
$contenttype ... content-type [application/x-www-form-urlencoded, multipart/form-data]
$charset ... character set [string]
$referrer
Output
http response [string] / false on error
Description
Sends data via http post and returns response
HTTP_Get
Syntax
HTTP_Get ($URL, $data="", $contenttype="application/x-www-form-urlencoded", $charset="UTF-8")
Input parameters
$URL ... URL [string]
$data ... data (raw data) [array] (optional)
$contenttype ... content-type [string excl. charset] (optional)
$charset ... character set [string] (optional)
Output
http response [string] / false on error
Description
Sends data via http get and returns response
HTTP_Proxy
Syntax
HTTP_Proxy ($URL, $enable_file=false)
Input parameters
$URL ... URL [string]
$enable_file ... enable post of files [true, false] (optional)
global input parameters
$mgmt_config
Output
http response [string] / false on error
Description
Sends all global POST/GET and FILES data via http post and returns response
loadbalancer
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
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.
savelog
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
$site
$eventsystem
$mgmt_config
$hcms_lang
$lang
Output
true / false on error
Description
Adds new entries to log file.
An error entry must be formed like:
date[YYYY-MM-DD hh:mm]|name of scipt file|error type: "error", "warning" or "information"|unique error code in script file|error message
loadlog
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
Description
Loads a log file an returns the data as string or array for all log records.
deletelog
Syntax
deletelog ($logname="")
Input parameters
$logname ... log name [string] (optional)
global input parameters
$user
$eventsystem
$mgmt_config
$hcms_lang
$lang
Output
result array
Description
Deletes a log file.
debuglog
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
Description
Writes code lines into debug file in data/log/debug.log
notifyusers
Syntax
notifyusers ($site, $location, $object, $event, $user_from)
Input parameters
$site ... publication name [string]
$location ... location [string]
$object ... object name [string]
$event ... event name [oncreate, onedit, onmove, ondelete]
$user_from ... user name [string]
global input parameters
$user
$mgmt_config
$hcms_lang_codepage
$hcms_lang
$lang
Output
true / false on error
Description
Notifies all users based on the given event and location
sendlicensenotification
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
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.
licensenotification
Syntax
licensenotification ()
Input parameters
global input parameters
$eventsystem
$mgmt_config
$hcms_lang_codepage
$hcms_lang
$lang
Output
true / false on error
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.
sendresetpassword
Syntax
sendresetpassword ($login, $link=false, $instance="")
Input parameters
$login ... user name [string], provide logon link [true, false] (optional)
$link ... instance name [string] (optional)
$instance
global input parameters
$eventsystem
$mgmt_config
$hcms_lang
$lang
Output
message as string
Description
Send a new password to the users e-mail address.
html_diff
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
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.
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 paramaters as value) [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
target URI / false on error
rewrite_homepage
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
target URI / false on error
Description
Uses the page root directory of the publication configuration and forwards to the default index page. No page include supported!
load_csv
Syntax
load_csv ($file, $delimiter=";", $enclosure='"', $charset="utf-8")
Input parameters
$file ... path to CSV file [string]
$delimiter ... delimiter [string] (optional)
$enclosure ... enclosure [string] (optional)
$charset ... character set [string] (optional)
global input parameters
$mgmt_config
$eventsystem
Output
array / false on error
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 row index of 1.
sendmessage
Syntax
sendmessage ($from_user="", $to_user, $title, $message, $object_id="", $site="")
Input parameters
$from_user ... from user name [string] (optional)
$to_user ... to user name [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
Description
Sends a message via e-mail to a user.
▲ Get API Functions
getserverload
Syntax
getserverload ($interval=0)
Input parameters
$interval ... intervall for average system load can be 1
Output
Returns the average system load (the number of processes in the system run queue) over the last minute
the number of CPU cores
and the memory usage as array
getconfigvalue
Syntax
getconfigvalue ($config, $in_key="")
Input parameters
$config ... settings [array]
$in_key ... value/substring in array key [string] (optional)
Output
value of setting
Description
Help function for createinstance
getsession
Syntax
getsession ($variable, $default="")
Input parameters
$variable ... session variable name [string]
$default ... default session value [string] (optional)
Output
session value
getrequest
Syntax
getrequest ($variable, $force_type=false, $default="")
Input parameters
$variable ... request variable name [string]
$force_type ... must be of certain type [numeric, array, publicationname, locationname, objectname, url, bool] (optional)
$default ... default value [string] (optional)
Output
request value
Description
Returns the value of a POST, GET or COOKIE request, or a default value if not valid.
getrequest_esc
Syntax
getrequest_esc ($variable, $force_type=false, $default="", $js_protection=false)
Input parameters
$variable ... request variable name [string]
$force_type ... must be of certain type [numeric, array, publicationname, locationname, objectname] (optional)
$default ... default value [string] (optional)
$js_protection ... remove characters to avoid JS injection [true, false] (optional)
Output
request value
Description
Returns the escaped value in order to prevent XSS from POST, GET or COOKIE variables. Returns a default value if not valid.
getuserip
Syntax
getuserip ()
Input parameters
Output
IP address of client / false on error
Description
Retrieves the IP address of the client/user.
getobjectlistcells
Syntax
getobjectlistcells ($viewportwidth, $is_mobile=0)
Input parameters
$viewportwidth ... width of viewport or window in pixels [integer]
$is_mobile ... is mobile device [0, 1] (optional)
Output
number of table cells/rows for the gallery view of object lists
getlanguageoptions
Syntax
getlanguageoptions ()
Input parameters
global input parameters
$mgmt_config
Output
array with 2-digit language code as key and language name in English as value / false on error
getlanguagefile
Syntax
getlanguagefile ($lang="en")
Input parameters
$lang ... language code [string] (optional)
global input parameters
$mgmt_config
Output
language file name
getcodepage
Syntax
getcodepage ($lang="en")
Input parameters
$lang ... language code [string] (optional)
global input parameters
$mgmt_config
$hcms_lang_codepage
Output
code page (character set)
getcalendarlang
Syntax
getcalendarlang ($lang="en")
Input parameters
$lang ... language code [string] (optional)
global input parameters
$mgmt_config
Output
supported language code for calendar
getescapedtext
Syntax
getescapedtext ($text, $charset="", $lang="")
Input parameters
$text ... word [string]
$charset ... 2-digit language code [string] (optional)
$lang
global input parameters
$mgmt_config
Output
array holding all synonyms including the provided word / false on error
Description
Returns the synonyms of a word.
getsearchhistory
Syntax
getsearchhistory ($user="")
Input parameters
$user ... user name [string] (optional)
global input parameters
$mgmt_config
Output
array holding all expressions (in single quotes) of the search history of a user / false on error
gettaxonomy_sublevel
Syntax
gettaxonomy_sublevel ($site, $lang="en", $tax_id="0")
Input parameters
$site ... publication name [string]
$lang ... language code [string] (optional)
$tax_id ... taxonomy parent ID [string] (optional)
global input parameters
$mgmt_config
$taxonomy
Output
array holding all keywords of the next taxonomy level / false on error
Description
Returns sorted keywords of a taxonomy level (multilingual support based on taxonomies).
Global variable $taxonomy can be used to pass the taxonomy as array.
gettaxonomy_childs
Syntax
gettaxonomy_childs ($site="", $lang="", $expression, $childlevels=1, $id_only=true)
Input parameters
$site ... publication name [string] (optional)
$lang ... language code [string] (optional)
$expression ... taxonomy ID or expression or taxonomy path in the form %taxonomy%/publication-name or 'default'/language-code/taxonomy-ID/taxonomy-child-levels [string]
$childlevels ... taxonomy child levels [integer] (optional)
$id_only ... only return taxonomy IDs without language and keyword information [true, false] (optional)
global input parameters
$mgmt_config
$taxonomy
Output
array holding all taxonomy IDs / false on error
Description
Returns keywords based on taxonomy defintion and synonyms if expression is a keyword (multilingual support based on taxonomies and synonyms).
The expression can be a taxonomy path in the form of %taxonomy%/site/language-code/taxonomy-ID/taxonomy-child-levels (use "all" for all languages and "0" for all taxonomy-IDs on first level).
Global variable $taxonomy can be used to pass the taxonomy as array.
gethierarchy_defintion
Syntax
gethierarchy_defintion ($site, $selectname="")
Input parameters
$site ... publication name [string]
$selectname ... hierarchy name [string] (optional)
global input parameters
$mgmt_config
Output
hierarchy array in form of array[name][level][text-id][language] = label / false on error
Description
Reads the metadata/content hierarchy defintion and returns a multidimensinal array.
gethierarchy_sublevel
Syntax
gethierarchy_sublevel ($hierarchy_url)
Input parameters
$hierarchy_url ... hierarchy URL in form of %hierarchy%/publication-name/hierarchy-name/hierarchy-level-of-last-element/text-ID-1=value-1/text-ID-2=value-2/text-ID-3 [string]
global input parameters
$mgmt_config
$lang
Output
array holding all hierarchy URLs as key and text content or label as value / false on error
Description
Returns sorted values of a metadata/content hierarchy level.
getkeywords
Syntax
getkeywords ($site="")
Input parameters
$site ... publication name [string] (optional)
global input parameters
$mgmt_config
Output
keywords as array / false on error
Description
Generates an array holding all keywords and the number as value and keyword ID as key.
getmetakeywords
Syntax
getmetakeywords ($text, $language="en", $charset="UTF-8")
Input parameters
$text ... text [string]
$language ... language to be used for stop word list [de, en, ...] (optional)
$charset ... character set [string] (optional)
global input parameters
$mgmt_config
Output
keywords as array /false on error
Description
Generates a keyword list from a plain text. Stop word lists are defined in data/include/stopwords.inc.php
getmetadescription
Syntax
getmetadescription ($text, $charset="UTF-8")
Input parameters
$text ... text [string]
$charset
Output
cleanded description of provided text /false on error
Description
Generates a description from a text, to be used as meta information.
getgooglesitemap
Syntax
getgooglesitemap ($site, $dir, $url, $getpara=array(), $permalink=array(), $chfreq="weekly", $prio="", $ignore=array(), $filetypes=array('cfm', 'htm', 'html', 'xhtml', 'asp', 'aspx', 'jsp', 'php', 'pdf'), $show_freq=true, $show_prio=true)
Input parameters
$site ... publication name [string]
$dir ... directory path [string]
$url ... URL to directory [string]
$getpara ... GET parameters to use for new versions of the URL as array (optional)
$permalink ... permanent links text-ID to use for location [array] (optional)
$chfreq ... frequency of google scrawler [never, weekly, daily] (optional)
$prio ... priority [1 or less] (optional)
$ignore ... ignore file names [array] (optional)
$filetypes ... allowed file types [array] (optional)
$show_freq ... include frequenzy tag [true, false] (optional)
$show_prio ... include priority tag [true, false] (optional)
global input parameters
$mgmt_config
$publ_config
Output
xml sitemap / false on error
Description
Generates a google sitemap xml-output
getlistelements
Syntax
getlistelements ($list_sourcefile)
Input parameters
$list_sourcefile ... content attribute value of list or keyword tag
global input parameters
$mgmt_config
$lang
Output
string with list/keyword elements sperated by commas / false
getmetadata
Syntax
getmetadata ($location, $object, $container="", $seperator="\r\n", $template="")
Input parameters
$location ... location [string]
$object ... object name (both optional if container is given) [string]
$container ... container name/ID or container content [string] (optional)
$seperator ... seperator of meta data fields [any string, array] (optional)
$template ... publication name/template name to extract label names [string] (optional)
global input parameters
$mgmt_config
Output
string with all metadata from given object based on container / false
getmetadata_multiobjects
Syntax
getmetadata_multiobjects ($multiobject_array, $user)
Input parameters
$multiobject_array ... converted path of multiple objects [array]
$user ... user name [string]
global input parameters
$mgmt_config
$siteaccess
$pageaccess
$compaccess
$hiddenfolder
$adminpermission
$localpermission
Output
assoziatve array with all text content and meta data / false
Description
Extracts all metadata including media information for a provided list of objects.
This function is used for the CSV export in the objectlist views and also evaluates the access permissions of the user.
getmetadata_container
Syntax
getmetadata_container ($container_id, $text_id_array)
Input parameters
$container_id ... container ID [string]
$text_id_array ... array of text IDs [array]
global input parameters
$mgmt_config
$labels
Output
assoziatve array with all text content and meta data / false
Description
Extracts container, media, and metadata information of a container.
This function is used for the presentation of metadata for objectlist views.
getobjectcontainer
Syntax
getobjectcontainer ($site, $location, $object, $user, $type="work")
Input parameters
$site ... publication name [string]
$location ... location [string]
$object ... object name [string]
$user ... user name [string]
$type ... container type [work, published] (optional)
global input parameters
$mgmt_config
Output
Content Container [XML]/false
Description
Loads the content container of a given object (page, component, folder)
getcontainer
Syntax
getcontainer ($containerid, $type)
Input parameters
$containerid ... container name or container ID [string]
$type ... container type [published, work]
global input parameters
$mgmt_config
Output
Contant Container [XML]/false
Description
Obsolete function used as an alias for the loadcontainer function without the possibility to load locked containers
getwallpaper
Syntax
getwallpaper ($version="")
Input parameters
$version ... version number [string] (optional)
global input parameters
$mgmt_config
Output
URL of wallpaper image / false
Description
Provides a wallpaper image or video used for the logon and home screen.
getmediasize
Syntax
getmediasize ($file)
Input parameters
$file ... path to media file [string]
Output
Array with media width and height / false on error
getcontainername
Syntax
getcontainername ($container)
Input parameters
$container ... container name (e.g. 0000112.xml.wrk) or container ID [string]
global input parameters
$mgmt_config
Output
Array with file name of the working content container (locked or unlocked!) and username if locked
getlocationname
Syntax
getlocationname ($site, $location, $cat, $source="path")
Input parameters
$site ... publication name [string]
$location ... location path (as absolute path or converted path) [string]
$cat ... category [page, comp]
$source ... source for name [path, name]
global input parameters
$mgmt_config
$lang
$hcms_lang_codepage
Output
location with readable names instead of file names / false on error
getthemelocation
Syntax
getthemelocation ($theme="")
Input parameters
$theme ... theme name [string] (optional)
global input parameters
$mgmt_config
Output
path to theme / false
Description
Returns the absolute path (URL) of the theme (css and images).
getcategory
Syntax
getcategory ($site="", $location)
Input parameters
$site ... publication name [string] (optional)
$location ... location path [string]
global input parameters
$mgmt_config
$publ_config
Output
category ['page
comp'] / false on error
Description
Evaluates the category ['page, comp'] of a location
getpublication
Syntax
getpublication ($path)
Input parameters
$path ... converted location path [string]
Output
publication name
Description
Extract the publication name of a location path
getlocation
Syntax
getlocation ($path)
Input parameters
$path ... location path [string]
Output
location (without object or folder)
Description
Extract the location excluding object or folder of a location path
getobject
Syntax
getobject ($path)
Input parameters
$path ... location path [string]
Output
object or folder name
Description
Extract the object or folder of a location path
getmediacontainername
Syntax
getmediacontainername ($file)
Input parameters
$file ... file name [string]
Output
container name / false on error
Description
Extract the container name from a multimedia file name by using the hcm-ID
getmediafileversion
Syntax
getmediafileversion ($container)
Input parameters
$container ... container name or container ID [string]
global input parameters
$mgmt_config
$user
Output
media file name / false on error
Description
Extracts the name from the multimedia file by container name or ID in order to get the media file of older content versions.
if the result is false, there is no older media file version.
getobjectid
Syntax
getobjectid ($objectlink)
Input parameters
$objectlink ... converted object path or pathes separated by | [string]
Output
object ID
Description
Converts the object path to the object ID of any object
getobjectlink
Syntax
getobjectlink ($objectid)
Input parameters
$objectid ... converted object ID or IDs separated by | [string]
Output
converted object link
Description
Converts the object ID to the object path of any object
getcontainerversions
Syntax
getcontainerversions ($container)
Input parameters
$container ... container ID or container name [string]
global input parameters
$mgmt_config
Output
array of all versions (array[version-extension] = file-name) / false
getlocaltemplates
Syntax
getlocaltemplates ($site, $cat="")
Input parameters
$site ... publication name [string]
$cat ... template category [page, comp, meta, inc] (optional)
global input parameters
$mgmt_config
Output
array with all template names / false
Description
This function returns a list of all templates of a publication without inherited templates from other publications.
gettemplates
Syntax
gettemplates ($site, $cat="all")
Input parameters
$site ... publication name [string]
$cat ... object category [all, page, comp, meta] (optional)
global input parameters
$user
$mgmt_config
$hcms_lang
$lang
Output
template file name list as array / false on error
Description
This function returns a list of all templates for pages or components.
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.
gettemplateversions
Syntax
gettemplateversions ($site, $template)
Input parameters
$site ... publication name [string]
$template ... template name [string]
global input parameters
$mgmt_config
Output
array of all versions (array['YYYY-MM-DD HH:MM:SS'] = file-name) / false
getfileinfo
Syntax
getfileinfo ($site, $file, $cat="comp")
Input parameters
$site ... publication name [string] (optional)
$file ... file name incl. extension [string]
$cat ... category [page, comp] (optional)
global input parameters
$mgmt_config
Output
array/false
Description
defines file properties based on the file extension and returns file info as an array:
$result['file']: file name without hypercms management extension
$result['name']: readable file name without hypercms management extension
$result['filename']: file name without file extensions
$result['icon']: file name of the file icon
$result['type']: file type
$result['ext']: file extension incl. dot in lower case
$result['published']: if page or component is published (true) or not (false), true in all other cases
$result['deleted']: if file is deleted = true else = false
getobjectinfo
Syntax
getobjectinfo ($site, $location, $object, $user="sys", $container_version="")
Input parameters
$site ... publication name [string]
$location ... location [string]
$object ... object name [string]
$user ... user name [string] (optional)
$container_version ... container version [string] (optional)
global input parameters
$mgmt_config
Output
result array / false on error
Description
Get all file pointers (container, media, template) and object name from object file and collect info from container version, if provided
getfilesize
Syntax
getfilesize ($file)
Input parameters
$file ... converted path to file or directory [string]
global input parameters
$mgmt_config
Output
result array with file size in kB and file count / false on error
Description
This function won't give you a proper result of the file size of multimedia components, if there is no Database installed.
getmimetype
Syntax
getmimetype ($file)
Input parameters
$file ... file name incl. extension [string]
global input parameters
$mgmt_config
Output
mime_type
Description
Gets the mime-type of the file by its extension.
If file has a version file extension the next file extension will be used.
getfiletype
Syntax
getfiletype ($file_ext)
Input parameters
$file_ext ... file extension or file name [string]
global input parameters
$mgmt_config
$hcms_ext
Output
file type to be saved in database based on file extension
getpreviewwidth
Syntax
getpreviewwidth ($site, $filepath, $width_orig="")
Input parameters
$site ... publication name [string] (optional)
$filepath ... path to file or file name [string]
$width_orig ... original width [string] (optional)
global input parameters
$mgmt_config
$hcms_ext
Output
result array with width and height / false on error
Description
Returns the default preview/annotation width in pixel of a document, image, or video
getpdfinfo
Syntax
getpdfinfo ($filepath, $box="MediaBox")
Input parameters
$filepath ... path to PDF file [string]
$box ... box attribute [BleedBox, CropBox, MediaBox] (optional)
global input parameters
$mgmt_config
$mgmt_imagepreview
$user
Output
result array with width and height / false on error
Description
Extracts width and height in pixel of a PDF file based on the MediaBox in the filex content or ImageMagick as fallback
getvideoinfo
Syntax
getvideoinfo ($mediafile)
Input parameters
$mediafile ... path to video file [string]
global input parameters
$mgmt_config
$mgmt_mediapreview
$user
Output
video file information as result array / false on error
Description
Extract video metadata from video file.
getbrowserinfo
Syntax
getbrowserinfo ()
Input parameters
Output
client browser and version as array / false on error
getcontentlocation
Syntax
getcontentlocation ($container_id, $type="abs_path_content")
Input parameters
$container_id ... container id [string]
$type ... type [url_path_content, abs_path_content]
global input parameters
$mgmt_config
Output
location of the container file / false on error
Description
Gets the content location based on the given container id.
The use of various directories is necessary since the number of directories is limited by the filesystem, e.g. Linux ext3 is limited to 32000.
getmedialocation
Syntax
getmedialocation ($site, $file, $type, $resolve_symlink=false)
Input parameters
$site ... publication name [string]
$file ... multimedia file name (including hcm-ID) [string]
$type ... type [url_path_media, abs_path_media, url_publ_media, abs_publ_media]
$resolve_symlink ... resolve symbolik links [true, false] (optional)
global input parameters
$mgmt_config
$publ_config
Output
location of the multimedia file / false on error
Description
Gets the media repsitory location from $mgmt_config array. The function supports up to 10 media repositories.
Any other rules for splitting the media files on multiple devices can be implemented as well by the function getmedialocation_rule.
If the file resides outside the repository (symbolic link is used in the repository), the full path including the file name can be returned.
getlockedfileinfo
Syntax
getlockedfileinfo ($location, $file)
Input parameters
$location ... location to file [string]
$file ... file name [string]
global input parameters
$mgmt_config
Output
Array holding file name incl. lock extension and user name / false on error
Description
Finds the locked file and returns the name and user as array
getfavorites
Syntax
getfavorites ($user, $output="path", $return_text_id=array())
Input parameters
$user ... user name [string]
$output ... output [path, id] (optional)
$return_text_id ... text IDs to be returned if output=path [array] (optional)
global input parameters
$mgmt_config
Output
object info or object id array of users favorites / false
getboxes
Syntax
getboxes ($user)
Input parameters
$user ... user name [string]
global input parameters
$mgmt_config
Output
selected home box names of user as array / false
getusersonline
Syntax
getusersonline ($sites=array())
Input parameters
$sites ... publication names [array] (optional)
global input parameters
$mgmt_config
$siteaccess
Output
Array of online user names / false
getchatstate
Syntax
getchatstate ($register=true)
Input parameters
$register ... register stat in session [true/false] (optional)
global input parameters
$mgmt_config
Output
state of chat / false on error
getimagelib
Syntax
getimagelib ()
Input parameters
global input parameters
$mgmt_imagepreview
Output
name of image library used [GD
ImageMagick] / false on error
getfilename
Syntax
getfilename ($filedata, $tagname)
Input parameters
$filedata ... file content [string]
$tagname ... hyperCMS tag name in page or component [string]
Output
file name
Description
Extracts the file name of the content and template pointer tags of an object file
gethypertag
Syntax
gethypertag ($filedata, $tagname, $offset=0)
Input parameters
$filedata ... file content [string]
$tagname ... full/partly hyperCMS tag name (with or without hyperCMS:) [string]
$offset ... offset position [integer]
Output
full hyperCMS tag array [array]/false on error
Description
Finds the hyperCMS tag start and end position and returns an array of the whole tags including all information.
Offset value must be integer value and is used to skip search for hyperCMS tag till offset position of filedata.
gethypertagname
Syntax
gethypertagname ($tagdata)
Input parameters
$tagdata ... full hyperCMS tag [string]
Output
full hyperCMS tag name/false on error
Description
Reads the name of the hyperCMS tag
gethtmltag
Syntax
gethtmltag ($filedata, $tag)
Input parameters
$filedata ... file content [string]
$tag ... full hyperCMS tag (or other identifier) [string]
Output
full html tag/false on error
Description
Finds the first html tag start and end position of a nested hyperCMS tag and returns the whole tag including all information.
Works also if other script tags are nested in the HTML-tag.
This function is not case sensitive!
gethtmltags
Syntax
gethtmltags ($filedata, $tag)
Input parameters
$filedata ... file content [string]
$tag ... full hyperCMS tag or other identifier in html tag [string]
Output
string from html tag start to end tag/false on error
Description
Finds the nearest html tag start and end position of a nested hyperCMS tag and returns the whole tag including all information.
This functions works also for html-tag pairs like <a href></a>, <div></div> and so on.
getattribute
Syntax
getattribute ($string, $attribute, $secure=true)
Input parameters
$string ... string including attributes [string]
$attribute ... attribute name [string]
$secure ... secure attribute value reg. XSS [true, false] (optional)
Output
attribute value/false on error
Description
Get the value of a certain attribute out of a string (...attributname=value....)
getoption
Syntax
getoption ($string, $option)
Input parameters
$string ... string including options [string]
$option ... option name [string]
Output
option value / false on error
Description
Get the value of a certain option out of a string (-c:v value -ar 44100)
getcharset
Syntax
getcharset ($site, $data)
Input parameters
$site ... publication name [string]
$data ... data from template or content container [string]
global input parameters
$mgmt_config
Output
array with content-type and charset / false on error
Description
Extract the content-type definition and the character set from the template (1st priority), content container (2nd priority) or publication settings (3rd priority)
getartid
Syntax
getartid ($id)
Input parameters
$id ... string including id [string]
Output
article id/false on error
Description
Extract the article ID from the tag ID
getelementid
Syntax
getelementid ($id)
Input parameters
$id ... string including id [string]
Output
element id/false on error
Description
Extract the element ID from the tag ID
getfirstkey
Syntax
getfirstkey ($array)
Input parameters
$array ... array [array]
Output
array key of first element in array if $value is not empty / false on error
getdirectoryfiles
Syntax
getdirectoryfiles ($dir, $pattern="")
Input parameters
$dir ... path to directory [string]
$pattern ... pattern as string [string] (optional)
Output
sorted array of all files matching the pattern / false on error
getuserinformation
Syntax
getuserinformation ()
Input parameters
global input parameters
$mgmt_config
$user
Output
assoziative array with basic user information [publication->username->attribute] / false
Description
This function creates an assoziative array with user information, e.g. for a user select box.
getworkflowitem
Syntax
getworkflowitem ($site, $workflow_file, $workflow, $user)
Input parameters
$site ... publication name [string]
$workflow_file ... location [string]
$workflow ... object name [string]
$user ... workflow file name [string]
global input parameters
$mgmt_config
$hcms_lang
$lang
Output
workflow item [XML-string]
▲ Set API Functions
setsession
Syntax
setsession ($variable, $content="", $write=false)
Input parameters
$variable ... temporary hyperCMS variable name [string or array]
$content ... value [string or array] (optional)
$write ... write session data for load balancer [true, false] (optional)
Output
true / false on error
settemplate
Syntax
settemplate ($site, $location, $object, $template, $recursive=false)
Input parameters
$site ... publication name [string]
$location ... location [string]
$object ... object [string]
$template ... template name [string]
$recursive ... recursive [true, false] (optional)
global input parameters
$mgmt_config
Output
true/false
Description
This function sets the template for a single folder/object or all objects in a folder.
settaxonomy
Syntax
settaxonomy ($site, $container_id, $langcode="", $taxonomy="")
Input parameters
$site ... publication name [string]
$container_id ... container ID [string]
$langcode ... 2-digit language code [string] (optional)
$taxonomy ... taxonomy definition [array] (optional)
global input parameters
$mgmt_config
Output
result array / false on error
Description
Analyzes the content regarding all taxonomy keywords, saves results in database and returns an array (multilingual support based on taxonomies).
setarticle
Syntax
setarticle ($site, $contentdata, $contentfile, $arttitle=array(), $artstatus=array(), $artdatefrom=array(), $artdateto=array(), $artuser=array(), $user="sys")
Input parameters
$site ... publication name [string]
$contentdata ... container (XML) [string]
$contentfile ... container name [string]
$arttitle ... article title [array]
$artstatus ... article status [array]
$artdatefrom ... article beginn date [array] (optional)
$artdateto ... article end date [array] (optional)
$artuser ... article user name [array or string] (optional)
$user ... user name [string] (optional)
global input parameters
$mgmt_config
Output
updated content container (XML)
false on error
Description
Set article content in container. The content container will be returned and not saved.
settext
Syntax
settext ($site, $contentdata, $contentfile, $text=array(), $type=array(), $art="no", $textuser=array(), $user="sys", $charset="", $addmicrotime=false)
Input parameters
$site ... publication name [string]
$contentdata ... container (XML) [string]
$contentfile ... container name [string]
$text ... text with tag Id as key and text as value [array]
$type ... text type [array or string] [u, f, l, c, d, k]
$art ... article [array or string] [yes, no] (optional)
$textuser ... text user [array or string] (optional)
$user ... user name [string] (optional)
$charset ... character set of text content [string] (optional)
$addmicrotime ... add microtime to ID used for comments [true, false] (optional)
global input parameters
$mgmt_config
$publ_config
Output
updated content container (XML)
false on error
Description
Set text content in container and database. The content container will be returned and not saved.
setmedia
Syntax
setmedia ($site, $contentdata, $contentfile, $mediafile=array(), $mediaobject_curr=array(), $mediaobject=array(), $mediaalttext=array(), $mediaalign=array(), $mediawidth=array(), $mediaheight=array(), $art="no", $mediauser="", $user="sys", $charset="")
Input parameters
$site ... publication name [string]
$contentdata ... container (XML) [string]
$contentfile ... container name [string]
$mediafile ... media files with tag ID as key and reference as value [array]
$mediaobject_curr ... currently used mediobjects [array]
$mediaobject ... media objects [array]
$mediaalttext ... media alternative text [array] (optional)
$mediaalign ... media alignment [array] (optional)
$mediawidth ... media width [array] (optional)
$mediaheight ... media height [array] (optional)
$art ... article [array or string] [yes, no] (optional)
$mediauser ... content user [array or string] (optional)
$user ... user name [string] (optional)
$charset ... character set of text content [string] (optional)
global input parameters
$mgmt_config
Output
updated content container (XML)
false on error
Description
Set media content in container and database. The content container will be returned and not saved.
setpagelink
Syntax
setpagelink ($site, $contentdata, $contentfile, $linkhref_curr=array(), $linkhref=array(), $linktarget=array(), $linktext=array(), $art="no", $linkuser=array(), $user="sys", $charset="")
Input parameters
$site ... publication name [string]
$contentdata ... container (XML) [string]
$contentfile ... container name [string]
$linkhref_curr ... current link with tag Id as key and link reference as value [array]
$linkhref ... new link [array]
$linktarget ... link target [array] (optional)
$linktext ... link text [array] (optional)
$art ... article [array or string] [yes, no] (optional)
$linkuser ... content user [array or string] (optional)
$user ... user name [string] (optional)
$charset ... character set of text content [string] (optional)
global input parameters
$mgmt_config
Output
updated content container (XML)
false on error
Description
Set link content in container and database. The content container will be returned and not saved.
setcomplink
Syntax
setcomplink ($site, $contentdata, $contentfile, $component_curr=array(), $component=array(), $condition=array(), $art="no", $compuser=array(), $user="sys")
Input parameters
$site ... publication name [string]
$contentdata ... container (XML) [string]
$contentfile ... container name [string]
$component_curr ... currently used components with tag ID as key and component reference as value [array]
$component ... new components [array]
$condition ... conditions [array] (optional)
$art ... article [array or string] [yes, no] (optional)
$compuser ... content user [array or string] (optional)
$user ... user name [string] (optional)
global input parameters
$mgmt_config
Output
updated content container (XML)
false on error
Description
Set component link content in container and database. The content container will be returned and not saved.
sethead
Syntax
sethead ($site, $contentdata, $contentfile, $headcontent=array(), $user="sys", $charset="")
Input parameters
$site ... publication name [string]
$contentdata ... container (XML) [string]
$contentfile ... container name [string]
$headcontent ... head content with tagname as ID and text as value [array]
$user ... user name [string] (optional)
$charset ... character set of text content [string] (optional)
global input parameters
$mgmt_config
Output
updated content container (XML)
false on error
Description
Only used for content in general head information of container.
setfilename
Syntax
setfilename ($filedata, $tagname, $value)
Input parameters
$filedata ... file content [string]
$tagname ... hyperCMS tag name in page or component [content, template, media, name]
$value ... new value [string]
Output
filedata/false on error
Description
Sets or creates the file name of the hyperCMS content file, template file, media file or file name pointer
setboxes
Syntax
setboxes ($name_array, $user)
Input parameters
$name_array ... home box names [array or string]
$user ... user name [string]
global input parameters
$mgmt_config
Output
true / false
▲ Connect API Functions
ftp_userlogon
Syntax
ftp_userlogon ($server, $user, $passwd, $ssl=false)
Input parameters
$server ... FTP servername or IP [string]
$user ... user name [string]
$passwd ... password [string]
$ssl ... SSL [true, false] (optional)
global input parameters
$mgmt_config
Output
true / false on error
Description
This function connects and performs logon to an FTP server.
ftp_userlogout
Syntax
ftp_userlogout ($conn_id)
Input parameters
$conn_id ... FTP connection [resource]
global input parameters
$mgmt_config
Output
true / false on error
Description
This function disconnects from an FTP server.
ftp_getfile
Syntax
ftp_getfile ($conn_id, $remote_file, $local_file, $passive=true)
Input parameters
$conn_id ... FTP connection [resource]
$remote_file ... path to file on FTP server [string]
$local_file ... passive mode [true, false] (optional)
$passive
global input parameters
$mgmt_config
Output
true / false on error
Description
This function gets a file from the FTP server.
ftp_putfile
Syntax
ftp_putfile ($conn_id, $local_file, $remote_file, $passive=true)
Input parameters
$conn_id ... FTP connection [resource]
$local_file ... path to local file [string]
$remote_file ... path to file on FTP server [string]
$passive ... passive mode [true, false] (optional)
global input parameters
$mgmt_config
Output
true / false on error
Description
This function puts a file to the FTP server.
ftp_deletefile
Syntax
ftp_deletefile ($conn_id, $remote_file, $passive=true)
Input parameters
$conn_id ... FTP connection [resource]
$remote_file ... path to file on FTP server [string]
$passive ... passive mode [true, false] (optional)
global input parameters
$mgmt_config
Output
true / false on error
Description
This function deletes a file from the FTP server.
ftp_filelist
Syntax
ftp_filelist ($conn_id, $path=".", $passive=true)
Input parameters
$conn_id ... FTP connection [resource]
$path ... path to remote directory [string] (optional)
$passive ... passive mode [true, false] (optional)
global input parameters
$mgmt_config
Output
result array / false on error
Description
This function gets a file/directory listing of the FTP server.
createsharelink_facebook
Syntax
createsharelink_facebook ($site, $url)
Input parameters
$site ... URL to share [string]
$url
global input parameters
$mgmt_config
Output
Share URL / false on error
createsharelink_twitter
Syntax
createsharelink_twitter ($site, $url, $text)
Input parameters
$site ... URL to share [string]
$url ... message to share [string]
$text
global input parameters
$mgmt_config
Output
Share URL / false on error
createsharelink_googleplus
Syntax
createsharelink_googleplus ($site, $url)
Input parameters
$site ... URL to share [string]
$url
global input parameters
$mgmt_config
Output
Share URL / false on error
createsharelink_linkedin
Syntax
createsharelink_linkedin ($site, $url, $title, $summary, $source)
Input parameters
$site ... URL to share [string]
$url ... title [string]
$title ... summary [string] (optional)
$summary ... source [string] (optional)
$source
global input parameters
$mgmt_config
Output
Share URL / false on error
createsharelink_pinterest
Syntax
createsharelink_pinterest ($site, $image_url, $title, $description)
Input parameters
$site ... image URL to share [string]
$image_url ... title [string]
$title ... description [string] (optional)
$description
global input parameters
$mgmt_config
Output
Share URL / false on error
▲ Security API Functions
rootpermission
Syntax
rootpermission ($site_name, $site_admin, $permission_str)
Input parameters
$site_name ... publication name [string]
$site_admin ... publication admin [true, false]
$permission_str ... permission string from group [string]
global input parameters
$rootpermission
$mgmt_config
Output
global permission array/false
Description
Deseralizes the permission string and and returns the root permission array
globalpermission
Syntax
globalpermission ($site_name, $permission_str)
Input parameters
$site_name ... publication name [string]
$permission_str ... permission string from group [string]
Output
global permission array/false
Description
Deseralizes the permission string and returns the global permission array
localpermission
Syntax
localpermission ($site_name, $permission_str)
Input parameters
$site_name ... publication name [string]
$permission_str ... permission string from group [string]
Output
local permission array/false
Description
Deseralizes the permission string and returns the local permission array
accessgeneral
Syntax
accessgeneral ($site, $location, $cat)
Input parameters
$site ... publication name [string]
$location ... location (path to folder) [string]
$cat ... object category [page, comp]
global input parameters
$mgmt_config
$hiddenfolder
$siteaccess
Output
true/false
Description
Checks general access to certain system folders, publications and returns true if access is granted
accesspermission
Syntax
accesspermission ($site, $location, $cat)
Input parameters
$site ... location (path to folder) [string]
$location ... object category [page, comp]
$cat
global input parameters
$user
$pageaccess
$compaccess
$hiddenfolder
$hcms_linking
$mgmt_config
Output
group with access permissions as array / false on error
Description
Evaluates page and component access permissions and returns group(s)
setlocalpermission
Syntax
setlocalpermission ($site, $group_array, $cat)
Input parameters
$site ... publication name [string]
$group_array ... group name [array]
$cat ... object category [page, comp]
global input parameters
$localpermission
Output
local permission array / false on error
Description
Sets local permissions of a user group for a specific publication
checkpublicationpermission
Syntax
checkpublicationpermission ($site, $strict=true)
Input parameters
$site ... publication name [string]
$strict ... strictly limited to siteaccess only without inheritance [true, false] (optional)
global input parameters
$mgmt_config
$siteaccess
Output
"direct" for direct access via group permission / "inherited" for access through inheritance / false
Description
Checks access to a publication based on the site access and inheritance settings
checkadminpermission
Syntax
checkadminpermission ()
Input parameters
global input parameters
$adminpermission
Output
true/false
Description
Checks super admin permission
checkrootpermission
Syntax
checkrootpermission ($name)
Input parameters
$name ... permission name [string]
global input parameters
$rootpermission
Output
true/false
Description
Checks root permission
checkglobalpermission
Syntax
checkglobalpermission ($site, $name)
Input parameters
$site ... publication name [string]
$name ... permission name [string]
global input parameters
$globalpermission
Output
true/false
Description
Checks global permission for a publication
checklocalpermission
Syntax
checklocalpermission ($site, $group, $name)
Input parameters
$site ... publication name [string]
$group ... user group name [string]
$name ... permission name [string]
global input parameters
$$localpermission
Output
true/false
Description
Checks local permissions of a user group for a specific publication
userlogin
Syntax
userlogin ($user, $passwd, $hash="", $objref="", $objcode="", $ignore_password=false, $locking=true)
Input parameters
$user ... user name [string]
$passwd ... password [string]
$hash ... hash code of user [string]
$objref ... object reference for hcms linking (object ID) [string]
$objcode ... object code for hcms linking (crypted object ID) [string]
$ignore_password ... ignore passwordcheck needed for WebDAV or access link [true, false]
$locking ... lock IP after 10 failed attempts to login [true, false]
global input parameters
$mgmt_config
$eventsystem
$hcms_lang_codepage
$hcms_lang
$lang
Output
result array
Description
Login of user by sending user and password using the variables: $sentuser, $sentpasswd
This procedure will register the user in the hypercms session and in the php session.
The procedure will return true or false using the variable $result.
registerinstance
Syntax
registerinstance ($instance, $load_config=true)
Input parameters
$instance ... user hash [string]
$load_config ... object hash [string] (optional)
global input parameters
$mgmt_config
Output
true/false
createchecksum
Syntax
createchecksum ($permissions="")
Input parameters
$permissions ... array or empty [array]
Output
MD5 checksum
Description
Creates the checksum of the user permissions
writesession
Syntax
writesession ($user, $passwd, $checksum, $siteaccess=array())
Input parameters
$user ... user name [string]
$passwd ... password [string]
$checksum ... checksum [string]
$siteaccess ... publicaion access [array]
global input parameters
$mgmt_config
Output
true / false on error
Description
Writes hyperCMS specific session data of a user
writesessiondata
Syntax
writesessiondata ()
Input parameters
global input parameters
$mgmt_config
Output
true / false on error
Description
Serializes and writes all session data of a user
createsession
Syntax
createsession ()
Input parameters
global input parameters
$mgmt_config
Output
true
Description
Checks if session data of a user is available. This function does access session variables directly!
killsession
Syntax
killsession ($user="", $destroy_php=true)
Input parameters
$user ... user name for hyperCMS session [string] (optional)
$destroy_php ... destroy php session [true, false] (optional)
global input parameters
$mgmt_config
Output
true
Description
Destroys session data of user
checkdiskkey
Syntax
checkdiskkey ($users="", $site="")
Input parameters
$users ... users XML [string] (optional)
$site ... publication names (use | as seperator) [string] (optional)
global input parameters
$mgmt_config
Output
true / false
Description
Checks the disc key of the installation.
checkpassword
Syntax
checkpassword ($password)
Input parameters
$password ... password [string]
global input parameters
$mgmt_config
$lang
Output
true if passed / error message as string
Description
This function checks the strength of a password and return the error messages or true
loguserip
Syntax
loguserip ($client_ip, $user="sys")
Input parameters
$client_ip ... client IP address [string]
$user ... user logon name [string] (optional)
global input parameters
$mgmt_config
Output
true / false on error
checkuserip
Syntax
checkuserip ($client_ip, $user="", $timeout=0)
Input parameters
$client_ip ... client IP address [string]
$user ... user logon name [string] (optional)
$timeout ... timeout in minutes [integer] (optional)
global input parameters
$mgmt_config
Output
true if IP is not locked / false if IP is locked or on error
checkuserrequests
Syntax
checkuserrequests ($user="sys")
Input parameters
$user ... user name [string] (optional)
global input parameters
$mgmt_config
Output
true / false if a certain amount of reguests per minute is exceeded
Description
Provides security for Cross-Site Request Forgery
checkusersession
Syntax
checkusersession ($user="sys", $CSRF_detection=true)
Input parameters
$user ... user name [string] (optional)
$CSRF_detection ... include CSRF detection [true, false]
global input parameters
$mgmt_config
Output
true / html-output followed by termination requires config.inc.php
Description
Checks if session data of user is correct. This function does access session variables directly!
allowuserip
Syntax
allowuserip ($site)
Input parameters
$site ... publication name [string]
global input parameters
$mgmt_config
Output
true / false requires config.inc.php
Description
Verifies if the client IP is in the range of valid IPs and logs IP addresses with no access
valid_objectname
Syntax
valid_objectname ($variable)
Input parameters
$variable ... variable [string or array]
Output
true / false
Description
Checks if an object name includes forbidden characters in order to prevent directory browsing
valid_locationname
Syntax
valid_locationname ($variable)
Input parameters
$variable ... variable [string or array]
Output
true / false
Description
Checks if an location includes forbidden characters in order to prevent directory browsing
valid_publicationname
Syntax
valid_publicationname ($variable)
Input parameters
$variable ... variable [string or array]
global input parameters
$siteaccess
Output
true / false
Description
Checks if a publication name includes forbidden characters in order to prevent directory browsing.
Optionally verifies if the publication name is included in the siteaccess variable.
html_encode
Syntax
html_encode ($expression, $encoding="", $js_protection=false)
Input parameters
$expression ... variable [string or array]
$encoding ... conversion of all special characters based on given character set or to ASCII [string] (optional)
$js_protection ... remove characters to avoid JS injection [true, false] (optional)
Output
html encoded value as array or string / false on error
Description
This function encodes certain characters (&, <, >, ", ') into their HTML character entity equivalents to protect against XSS.
Converts a string into the html equivalents (also used for XSS protection).
Supports multibyte character sets like UTF-8 as well based on the ASCII value of the character.
html_decode
Syntax
html_decode ($expression, $encoding="")
Input parameters
$expression ... epxression [string or array]
$encoding ... conversion of all special characters based on character set [string] (optional)
Output
html decoded value as array or string / false on error
Description
This function decodes all characters which have been converted by html_encode
scriptcode_encode
Syntax
scriptcode_encode ($content)
Input parameters
$content ... content [string]
global input parameters
$mgmt_config
Output
escaped content as string / false on error
Description
This function escapes all script tags.
This function must be used to clean all user input in the CMS by removing all server side scripts tags.
scriptcode_extract
Syntax
scriptcode_extract ($content, $identifier_start="<?", $identifier_end="?>")
Input parameters
$content ... content [string]
$identifier_start ... identifier of script begin [string]
$identifier_end ... identifier of script end [string]
Output
script code as array / false on error or if noting was found
Description
This function extracts the script code of a given content
scriptcode_clean_functions
Syntax
scriptcode_clean_functions ($content, $type=4, $application="PHP")
Input parameters
$content ... content [string]
$type ... cleaning level type: no cleaning = 0; basic set of disabled functions = 1; 1 + file access functions = 2; 2 + include functions = 3; 3 + hyperCMS API file functions = 4; No server side script allowed = 5 [0, 1, 2, 3, 4, 5] (optional)
$application ... application [PHP, ASP, JSP] (optional)
global input parameters
$mgmt_config
Output
result array / false on error
Description
This function removes all dangerous PHP functions
sql_clean_functions
Syntax
sql_clean_functions ($content)
Input parameters
$content ... SQL statement [string]
global input parameters
$mgmt_config
Output
result array / false on error
Description
This function checks SQL statements for write operations
url_encode
Syntax
url_encode ($variable)
Input parameters
$variable ... variable [string or array]
global input parameters
$mgmt_config
Output
urlencoded value as array or string / false on error
Description
This function encodes all characters
url_decode
Syntax
url_decode ($variable)
Input parameters
$variable ... variable [string or array]
global input parameters
$mgmt_config
Output
urldecoded value as array or string / false on error
Description
This function decodes all characters which have been converted by url_encode or urlencode (PHP)
shellcmd_encode
Syntax
shellcmd_encode ($variable, $type="")
Input parameters
$variable ... variable [string or array]
$type ... type [%, strict] (optional)
Output
encoded value as array or string / false on error
Description
This function encodes/escapes characters to secure the shell comand.
hcms_crypt
Syntax
hcms_crypt ($string, $start=0, $length=0)
Input parameters
$string ... string to encode [string]
$start ... start position [integer]
$length ... length for string extraction [integer]
global input parameters
$mgmt_config
Output
encoded string / false on error
Description
Unidrectional encryption using crc32 and urlencode. Used to create tokens for simple view links in the system.
The tokens can be verified by calculating the hash of the media file name and comparing the hash values.
Don't use this function to secure any string or to for password hashing.
hcms_encrypt
Syntax
hcms_encrypt ($string, $key="", $crypt_level="", $encoding="url")
Input parameters
$string ... string to encode [string]
$key ... key of length 16 or 24 or 32 [string] (optional)
$crypt_level ... crypt strength level [weak, standard, strong] (optional)
$encoding ... encoding [base64, url, none] (optional)
global input parameters
$mgmt_config
Output
encoded string / false on error
Description
Encryption of a string. Only strong encryption is binary-safe!
hcms_decrypt
Syntax
hcms_decrypt ($string, $key="", $crypt_level="", $encoding="url")
Input parameters
$string ... hash-string to decode [string]
$key ... key of length 16 or 24 or 32 [string] (optional)
$crypt_level ... crypt strength level [weak, standard, strong] (optional)
$encoding ... encoding [base64, url, none] (optional)
global input parameters
$mgmt_config
Output
decoded string / false on error
Description
Decryption of a string. Only strong encryption is binary-safe!
createtimetoken
Syntax
createtimetoken ($lifetime=0, $secret=4)
Input parameters
$lifetime ... token lifetime in seconds [integer] (optional)
$secret ... secret value [integer] (optional)
global input parameters
$mgmt_config
Output
token / false on error
checktimetoken
Syntax
checktimetoken ($token, $secret=4)
Input parameters
$token ... token [string]
$secret ... secret value [integer] (optional)
global input parameters
$mgmt_config
Output
true / false
createtoken
Syntax
createtoken ($user="sys", $lifetime=0, $secret=4)
Input parameters
$user ... user name [string] (optional)
$lifetime ... token lifetime in seconds [integer] (optional)
$secret ... secret value [integer] (optional)
global input parameters
$mgmt_config
Output
token / false on error
checktoken
Syntax
checktoken ($token, $user="sys", $secret=4)
Input parameters
$token ... token [string]
$user ... user name [string] (optional)
$secret ... secret value [integer] (optional)
global input parameters
$mgmt_config
Output
true / false
createuniquetoken
Syntax
createuniquetoken ($length=16)
Input parameters
$length ... token length [integer] (optional)
global input parameters
$mgmt_config
Output
token as string / false
createpassword
Syntax
createpassword ($length=10)
Input parameters
$length ... password length [integer] (optional)
global input parameters
$mgmt_config
Output
password as string / false
rand_secure
Syntax
rand_secure ($min=1000, $max=999999999999)
Input parameters
$min ... min and max value [integer] (optional)
$max
Output
secure random number / false
▲ Media API Functions
ocr_extractcontent
Syntax
ocr_extractcontent ($site, $location, $file)
Input parameters
$site ... publication name [string]
$location ... path to multimedia file [string]
$file ... multimedia file name (file to be indexed) [string]
global input parameters
$mgmt_config
$mgmt_parser
$mgmt_imagepreview
$hcms_lang
$lang
Output
extracted content as text string / false
Description
This function extracts the text content of multimedia objects using OCR and returns the text.
It is a helper function for function indexcontent.
indexcontent
Syntax
indexcontent ($site, $location, $file, $container="", $container_content="", $user, $return_content=false)
Input parameters
$site ... publication name [string]
$location ... path to multimedia file [string]
$file ... multimedia file name (file to be indexed) [string]
$container ... container name or ID [string] (optional)
$container_content ... container XML-content [string] (optional)
$user ... user name [string]
$return_content ... return the content without saving it in the system [true, false] (optonal)
global input parameters
$mgmt_config
$mgmt_parser
$mgmt_imagepreview
$mgmt_uncompress
$hcms_ext
$hcms_lang
$lang
Output
true / false
Description
This function extracts the text content of multimedia objects and writes it the text to the container.
The given charset of the publication (not set by default), container or publication (not set by default) will be used.
The default character set of default.meta.tpl is UTF-8, so all content should be saved in UTF-8.
unindexcontent
Syntax
unindexcontent ($site, $location, $file, $container, $container_content, $user)
Input parameters
$site ... publication name [string]
$location ... file location [string]
$file ... file name [string]
$container ... multimedia file to index [string]
$container_content ... container name or ID [string]
$user ... container XML-content [string]
global input parameters
$mgmt_config
$mgmt_parser
$hcms_lang
$lang
Output
true / false
Description
This function removes media objects from the container
reindexcontent
Syntax
reindexcontent ($site, $container_id_array="")
Input parameters
$site ... publication name [string]
$container_id_array ... container IDs [array] (optional)
global input parameters
$mgmt_config
Output
true / false
Description
Reindexes all media files of a publication. Optionally only for specific containers.
createthumbnail_indesign
Syntax
createthumbnail_indesign ($site, $location_source, $location_dest, $file)
Input parameters
$site ... publication name [string]
$location_source ... path to source dir [string]
$location_dest ... path to destination dir [string]
$file ... file name [string]
global input parameters
$mgmt_config
$user
Output
new file name / false on error (saves only thumbnail media file in destination location
only jpeg format is supported as output)
Description
Creates a thumbnail by extracting the thumbnail from an indesign file and transferes the generated image via remoteclient.
For good results, InDesign Preferences must be set to save preview image and at extra large size.
createthumbnail_video
Syntax
createthumbnail_video ($site, $location_source, $location_dest, $file, $frame, $autorotate=false)
Input parameters
$site ... publication name [string]
$location_source ... path to source dir [string]
$location_dest ... path to destination dir [string]
$file ... file name [string]
$frame ... frame of video in seconds or hh:mm:ss[.xxx]
$autorotate ... autorotate [true, false] (optional)
global input parameters
$mgmt_config
$mgmt_mediapreview
$mgmt_mediaoptions
$user
Output
new file name / false on error
Description
Creates a thumbnail picture of a video frame. Saves only the thumbnail media file in destination location. Only jpeg format is supported as output.
createimages_video
Syntax
createimages_video ($site, $location_source, $location_dest, $file, $name="", $fs=1, $format="jpg", $autorotate=false)
Input parameters
$site ... publication name [string]
$location_source ... path to source dir [string]
$location_dest ... path to destination dir [string]
$file ... file name [string]
$name ... name for image files [string] (optional)
$fs ... frames per second to create from the video [number] (optional)
$format ... image format [jpg, png, bmp] (optional)
$autorotate ... autorotate [true, false] (optional)
global input parameters
$mgmt_config
$mgmt_mediapreview
$mgmt_mediaoptions
$user
Output
true / false on error
Description
Creates and saves images of video screen size from a video to a directory.
createmedia
Syntax
createmedia ($site, $location_source, $location_dest, $file, $format="", $type="thumbnail", $force_no_encrypt=false)
Input parameters
$site ... publication name [string]
$location_source ... path to source dir [string]
$location_dest ... path to destination dir [string]
$file ... file name [string]
$format ... format (file extension w/o dot) [string] (optional)
$type ... type of image/video/audio file [thumbnail(for thumbnails of images), origthumb(thumbnail made from original video/audio), original(to overwrite original video/audio file), annotation(for annotation images), any other string present in $mgmt_imageoptions/$mgmt_mediaoptions, temp(for temporary files)] (optional)
$force_no_encrypt ... force the file to be not encrypted even if the content of the publication must be encrypted [true, false] (optional)
global input parameters
$mgmt_config
$mgmt_imagepreview
$mgmt_mediapreview
$mgmt_mediaoptions
$mgmt_imageoptions
$mgmt_maxsizepreview
$mgmt_mediametadata
$hcms_ext
$user
Output
new file name / false on error
Description
Creates an new image or video from the original file or creates a thumbnail and transferes the generated image via remoteclient.
Saves original or thumbnail media file in destination location, for thumbnail only jpeg format is supported as output.
splitmedia
Syntax
splitmedia ($site, $location_source, $location_dest, $file, $sec=60, $format="", $force_no_encrypt=false)
Input parameters
$site ... publication name [string]
$location_source ... path to source dir [string]
$location_dest ... path to destination dir [string]
$file ... file name [string]
$sec ... seconds of a segment [integer] (optional)
$format ... target format (file extension w/o dot) of destination file [string] (optional)
$force_no_encrypt ... force the file to be not encrypted even if the content of the publication must be encrypted [true, false] (optional)
global input parameters
$mgmt_config
$mgmt_imagepreview
$mgmt_mediapreview
$mgmt_mediaoptions
$mgmt_imageoptions
$mgmt_maxsizepreview
$mgmt_mediametadata
$hcms_ext
$user
Output
array of new file names / false on error
Description
Splits a video or audio file in segments measured in seconds. Used for synchronous Google Cloud Speech Service that only supports max. 1 minute audio files.
convertmedia
Syntax
convertmedia ($site, $location_source, $location_dest, $mediafile, $format, $media_config="", $force_no_encrypt=false)
Input parameters
$site ... publication name [string]
$location_source ... path to source dir [string]
$location_dest ... path to destination dir [string]
$mediafile ... file name [string]
$format ... target format (file extension w/o dot) of destination file [string]
$media_config ... media configuration to be used [string] (optional)
$force_no_encrypt ... force the file to be not encrypted even if the content of the publication must be encrypted [true, false] (optional)
global input parameters
$mgmt_config
$mgmt_imagepreview
$mgmt_mediapreview
$mgmt_mediaoptions
$mgmt_imageoptions
$mgmt_maxsizepreview
$mgmt_mediametadata
$mgmt_compress
$hcms_ext
Output
new file name / false on error
Description
Converts and creates a new image/video/audio or document from original. This is a wrapper function for createmedia, createimages_video and createdocument.
convertimage
Syntax
convertimage ($site, $file_source, $location_dest, $format="jpg", $colorspace="RGB", $iccprofile="", $width="", $height="", $slug=0, $units="px", $dpi=72, $quality="")
Input parameters
$site ... publication name [string]
$file_source ... path to source image file [string]
$location_dest ... path to destination dir [string]
$format ... format (file extension w/o dot) of destination file [string] (optional)
$colorspace ... colorspace of new image [CMY, CMYK, Gray, HCL, HCLp, HSB, HSI, HSL, HSV, HWB, Lab, LCHab, LCHuv, LMS, Log, Luv, OHTA, Rec601YCbCr, Rec709YCbCr, RGB, scRGB, sRGB, Transparent, XYZ, YCbCr, YCC, YDbDr, YIQ, YPbPr, YUV] (optional)
$iccprofile ... width in pixel/mm/inch [integer] (optional)
$width ... height in pixel/mm/inch [integer] (optional)
$height ... slug in pixel/mm/inch [integer] (optional)
$slug ... units for width [string]
$units ... height and slug [px, mm, inch] (optional)
$dpi ... dpi [integer] (optional)
$quality ... image quality [1 to 100]
global input parameters
$mgmt_config
$mgmt_imagepreview
$mgmt_mediapreview
$mgmt_mediaoptions
$mgmt_imageoptions
$mgmt_maxsizepreview
$mgmt_mediametadata
$hcms_ext
$user
Output
new file name / false on error
Description
Converts and creates a new image from original. The new image keeps will be resized and cropped to fit width and height.
This is a wrapper function for createmedia.
rotateimage
Syntax
rotateimage ($site, $filepath, $angle, $imageformat)
Input parameters
$site ... publication name [string]
$filepath ... path to source media file [string]
$angle ... rotation angle [integer]
$imageformat ... destination image format [jpg, png, gif]
global input parameters
$mgmt_config
$user
Output
new image file name / false on error
Description
Rotates an image (must be jpg, png or gif) using GD library. not used if ImageMagick is available
getimagecolors
Syntax
getimagecolors ($site, $file)
Input parameters
$site ... publication name [string]
$file ... media file name [string]
global input parameters
$mgmt_config
$user
Output
result array / false on error
Description
Uses the thumbnail image to calculate the mean color (red, green, blue), defines the colorkey (5 most commonly used colors) and the image type (landscape, portrait, square)
getimagecolorkey
Syntax
getimagecolorkey ($image)
Input parameters
$image ... image resource [resource]
global input parameters
$mgmt_config
Output
color key of image / false on error
Description
Extracts the color key for an image that represents the 5 mostly used colors:
K...black
W...white
E...grey
R...red
G...green
B...blue
C...cyan
M...magenta
Y...yellow
O...orange
P...pink
N...brown
hex2rgb
Syntax
hex2rgb ($hex)
Input parameters
$hex ... image color as hex-code [string]
Output
RGB-color as array / false on error
rgb2hex
Syntax
rgb2hex ($red, $green, $blue)
Input parameters
$red ... image color in RGB [string]
$green
$blue
Output
hex-color as string / false on error
readmediaplayer_config
Syntax
readmediaplayer_config ($location, $configfile)
Input parameters
$location ... path to media config file [string]
$configfile ... config file name [string]
global input parameters
$mgmt_config
$user
Output
config array / false on error
savemediaplayer_config
Syntax
savemediaplayer_config ($location, $configfile, $mediafiles, $width=320, $height=240, $rotation="", $filesize="", $duration="", $videobitrate="", $audiobitrate="", $audiofrequenzy="", $audiochannels="", $video_codec="", $audio_codec="")
Input parameters
$location ... path to media config file [string]
$configfile ... media config file name [string]
$mediafiles ... media file name [array or string]
$width ... width in px [integer] (optional)
$height ... height in px [integer] (optional)
$rotation ... rotation in degree [integer] (optional)
$filesize ... file size in kB [integer] (optional)
$duration ... duration [hh:mmm:ss] (optional)
$videobitrate ... video bitrate in kb/s [string] (optional)
$audiobitrate ... audio bitrate in kb/s [string] (optional)
$audiofrequenzy ... audio frequenzy in Hz [string] (optional)
$audiochannels ... audio channels [mono, stereo] (optional)
$video_codec ... video codec name [string] (optional)
$audio_codec ... audio codec name [string] (optional)
global input parameters
$mgmt_config
$user
Output
true / false on error
createdocument
Syntax
createdocument ($site, $location_source, $location_dest, $file, $format="", $force_no_encrypt=false)
Input parameters
$site ... publication name [string]
$location_source ... path to source location [string]
$location_dest ... path to destination location [string]
$file ... file name [string]
$format ... destination file format (extension w/o dot) [string]
$force_no_encrypt ... force the file to be not encrypted even if the content of the publication must be encrypted [true, false] (optional)
global input parameters
$mgmt_config
$mgmt_docpreview
$mgmt_docoptions
$mgmt_docconvert
$mgmt_maxsizepreview
$hcms_ext
$hcms_lang
$lang
$user
Output
new file name / false on error
Description
Creates a new multimedia file of given format at source destination using UNOCONV and saves it as thumbnail file at the desitnation location
unzipfile
Syntax
unzipfile ($site, $zipfilepath, $location, $filename, $cat="comp", $user)
Input parameters
$site ... publication name [string]
$zipfilepath ... path to source zip file [string]
$location ... path to destination location [string]
$filename ... category [page, comp]
$cat ... name of file for extraction [string]
$user ... user name [string]
global input parameters
$mgmt_config
$mgmt_uncompress
$mgmt_imagepreview
$mgmt_mediapreview
$mgmt_mediaoptions
Output
result array with all object paths / false
Description
Unpacks ZIP file and creates media files in destination location for components or unzips files directly for pages (not recommended due to securoty risks by uplaoding unsecured files).
clonefolder
Syntax
clonefolder ($site, $source, $destination, $user, $activity="")
Input parameters
$site ... publication name [string]
$source ... source location [string]
$destination ... destination location [string]
$user ... user name [string]
$activity ... activity that need to be set for daily stats [download] (optional)
global input parameters
$mgmt_config
$pageaccess
$compaccess
$hiddenfolder
$hcms_linking
$globalpermission
$setlocalpermission
Output
true/false
Description
Help function for function zipfiles that reads all multimedia files from their multimedia objects and copies them to the same folder structure using the object names.
zipfiles_helper
Syntax
zipfiles_helper ($source, $destination, $zipfilename, $remove=false)
Input parameters
$source ... source directory [string]
$destination ... destination directory [string]
$zipfilename ... name of ZIP-file [string]
$remove ... remouse all files from source [true, false] (optional)
global input parameters
$mgmt_config
$mgmt_compress
Output
true/false
Description
Compresses all files and includes their folder structure in a ZIP file. This function does not support multimedia objects and is only a helper function for native file system operations.
zipfiles
Syntax
zipfiles ($site, $multiobject_array, $destination="", $zipfilename, $user, $activity="")
Input parameters
$site ... publication name [string]
$multiobject_array ... array with path to source files [array]
$destination ... destination location (if this is null then the $location where the zip-file resists will be used) [string]
$zipfilename ... name of ZIP-file [string]
$user ... user name [string]
$activity ... activity that need to be set for daily stats [download] (optional)
global input parameters
$mgmt_config
$mgmt_compress
$pageaccess
$compaccess
$hiddenfolder
$hcms_linking
$globalpermission
$setlocalpermission
Output
true/false
Description
Compresses all media files and includes their folder structure in a ZIP file.
px2mm
Syntax
px2mm ($pixel, $dpi=72)
Input parameters
$pixel ... pixel [integer]
$dpi ... dpi [integer] (optional)
Output
pixel / false
Description
Convert mm to pixel
px2inch
Syntax
px2inch ($pixel, $dpi=72)
Input parameters
$pixel ... pixel [integer]
$dpi ... dpi [integer] (optional)
Output
inch / false
Description
Convert pixel to inches
inch2px
Syntax
inch2px ($inch, $dpi=72)
Input parameters
$inch ... pixel [integer]
$dpi ... dpi [integer] (optional)
Output
pixel / false
Description
Convert inches to pixel
sec2time
Syntax
sec2time ($input)
Input parameters
$input ... time in seconds [float]
Output
time in hh:mm:ss.mmm / false
Description
Convert seconds to time format hh:mm:ss.mmm
mediasize2frame
Syntax
mediasize2frame ($mediawidth, $mediaheight, $framewidth="", $frameheight="", $keepmaxsize=true)
Input parameters
$mediawidth ... media width [integer]
$mediaheight ... media height [integer]
$framewidth ... frame width [integer] (optional)
$frameheight ... frame height [integer] (optional)
$keepmaxsize ... keep maximum media size based on original dimensions of media without stretching [true, false] (optional)
Output
width and height as array / false
Description
Calculates the width and height of a media to fit into a given frame size.
vtt2array
Syntax
vtt2array ($vtt)
Input parameters
$vtt ... video text track [string]
Output
array / false
Description
Converts VTT string to array
▲ Metadata API Functions
importmetadata
Syntax
importmetadata ($site, $location, $file, $user, $type="", $delimiter=";", $enclosure='"', $charset="utf-8")
Input parameters
$site ... publication name [string]
$location ... location [string]
$file ... path to CSV file [string]
$user ... user name [string]
$type ... type array or string [u, f, l, c, d, k] (optional)
$delimiter ... delimiter [string] (optional)
$enclosure ... enclosure [string] (optional)
$charset ... character set [string] (optional)
global input parameters
$mgmt_config
$eventsystem
Output
true / false
Description
Imports metadata form CSV file for various assets linked by name or conatiner ID. Empty rows or rows without a delimiter will be ignored.
In order to identify an asset the file name as "Name" or the container ID as "containerID" must be provided in the first row before the content rows.
loadtaxonomy
Syntax
loadtaxonomy ($site, $start=1, $perpage=100000)
Input parameters
$site ... publication name [string]
$start ... return rows starting with row number [integer] (optional)
$perpage ... return number of rows [integer] (optional)
global input parameters
$mgmt_config
Output
true / false
Description
Generates an array from a taxonomy definition file located in data/include/ to be used for presentation or CSV export.
savetaxonomy
Syntax
savetaxonomy ($site, $taxonomy, $saveindex_start, $saveindex_stop)
Input parameters
$site ... publication name [string]
$taxonomy ... taxonomy with rows and languages as keys [array]
$saveindex_start ... replace rows starting with row number [integer]
$saveindex_stop ... replace rows ending with row number [integer]
global input parameters
$mgmt_config
Output
true / false
Description
Generates an array from a taxonomy definition file located in data/include/ to be used for presentation or CSV export.
createtaxonomy
Syntax
createtaxonomy ($site_name="", $recreate=false)
Input parameters
$site_name ... publication name [string] (optional)
$recreate ... recreate taxonomy file [true, false] (optional)
global input parameters
$mgmt_config
Output
true / false
Description
Generates an array from a taxonomy defintion file (CSV) and saves the PHP file in data/include/publication-name.taxonomy.inc.php.
Recreates the taxonomy for all objects if the taxonomy defintion has been uodated.
splitkeywords
Syntax
splitkeywords ($keywords, $charset="UTF-8")
Input parameters
$keywords ... comma seperated keywords [string]
$charset ... character set [string] (optional)
Output
keywords as array / false on error
Description
Generates a keyword list from a text by splitting and transforming the comma seperated string.
copymetadata
Syntax
copymetadata ($file_source, $file_dest)
Input parameters
$file_source ... path to source file [string]
$file_dest ... path to destination file [string]
global input parameters
$mgmt_config
$mgmt_mediametadata
$user
Output
true / false
Description
Copies all meta data from source to destination file using EXIFTOOL
extractmetadata
Syntax
extractmetadata ($file)
Input parameters
$file ... path to image file [string]
global input parameters
$user
$mgmt_config
$mgmt_mediametadata
Output
result array / false on error
Description
Extracts all meta data from a file using EXIFTOOL
xmlobject2array
Syntax
xmlobject2array ($obj, $namespace="")
Input parameters
$obj ... XML [object]
$namespace ... namespace [array] (optional)
Output
result array / false
Description
Converts an xmlobject to an array, provided by xaviered at gmail dot com
id3_getdata
Syntax
id3_getdata ($file)
Input parameters
$file ... path to audio file [string]
global input parameters
$mgmt_config
$hcms_ext
Output
result array / false on error
Description
Requires getID3 library since EXIFTOOL cannot write ID3 tags so far
id3_writefile
Syntax
id3_writefile ($file, $id3, $keep_data=true, $movetempfile=true)
Input parameters
$file ... abs. path to audio file [string]
$id3 ... ID3 tag [array]
$keep_data ... keep existing ID3 data of file [true, false] (optional)
$movetempfile ... move tempoarary file from unecrypted to encrypted [true, false] (optional)
global input parameters
$user
$mgmt_config
$mgmt_mediametadata
$hcms_ext
Output
true / false on error
Description
Writes ID3 tags into audio file for supported file types and keeps the existing ID3 tags
id3_create
Syntax
id3_create ($site, $text)
Input parameters
$site ... publication name [string]
$text ... text from content container [array]
global input parameters
$mgmt_config
Output
ID3 tag array / false on error
Description
Defines ID3 tag array based on the media mapping of a publication.
xmp_getdata
Syntax
xmp_getdata ($file)
Input parameters
$file ... path to image file [string]
global input parameters
$user
$mgmt_config
$hcms_ext
Output
result array / false on error
xmp_writefile
Syntax
xmp_writefile ($file, $xmp, $keep_data=true, $movetempfile=true)
Input parameters
$file ... abs. path to image file [string]
$xmp ... XMP tag [array]
$keep_data ... keep existing XMP data of file [true, false] (optional)
$movetempfile ... move tempoarary file from unecrypted to encrypted [true, false] (optional)
global input parameters
$user
$mgmt_config
$mgmt_mediametadata
$hcms_ext
Output
true / false on error
Description
Writes XMP tags into image file for supported file types and keeps the existing XMP tags
xmp_create
Syntax
xmp_create ($site, $text)
Input parameters
$site ... publication name [string]
$text ... text from content container [array]
global input parameters
$mgmt_config
Output
XMP tag array / false on error
Description
Defines XMP tag array based on the media mapping of a publication
geo2decimal
Syntax
geo2decimal ($deg, $min, $sec, $hemi)
Input parameters
$deg ... geo location in degree [integer]
$min ... minutes [integer]
$sec ... seconds [integer]
$hemi ... hemisphere [N, O, S, W]
Output
decimal result / false
exif_getdata
Syntax
exif_getdata ($file)
Input parameters
$file ... path to image file [string]
global input parameters
$user
$mgmt_config
$hcms_ext
Output
result array / false
iptc_getdata
Syntax
iptc_getdata ($file)
Input parameters
$file ... path to image file [string]
global input parameters
$user
$mgmt_config
$hcms_ext
Output
result array / false
iptc_getcharset
Syntax
iptc_getcharset ($tag)
Input parameters
$tag ... iptc tag that holds character set information [string]
Output
character set as string / false on error
Description
Copied from MediaWiki!
Warning, this function does not (and is not intended to) detect all iso 2022 escape codes.
In practise, the code for utf-8 is the only code that seems to have wide use. It does detect that code.
According to iim standard, charset is defined by the tag 1:90.
in which there are iso 2022 escape sequences to specify the character set.
the iim standard seems to encourage that all necessary escape sequences are
in the 1:90 tag, but says it doesn't have to be.
This is in need of more testing probably. This is definitely not complete.
however reading the docs of some other iptc software, it appears that most iptc software
only recognizes utf-8. If 1:90 tag is not present content is
usually ascii or iso-8859-1 (and sometimes utf-8), but no guarantee.
This also won't work if there are more than one escape sequence in the 1:90 tag
or if something is put in the G2, or G3 charsets, etc. It will only reliably recognize utf-8.
This is just going through the charsets mentioned in appendix C of the iim standard.
iptc_maketag
Syntax
iptc_maketag ($record=2, $tag, $value)
Input parameters
$record ... type of tag (e.g. 2) [integer]
$tag ... code of tag (e.g. 025) [string]
$value ... value of tag [string]
Output
binary IPTC tag / false on error
Description
Convert the IPTC tag to binary code
iptc_writefile
Syntax
iptc_writefile ($file, $iptc, $keep_data=true, $movetempfile=true)
Input parameters
$file ... abs. path to image file [string]
$iptc ... IPTC tag [array]
$keep_data ... keep existing IPTC data of file [true, false] (optional)
$movetempfile ... move tempoarary file from unecrypted to encrypted [true, false] (optional)
global input parameters
$user
$mgmt_config
$mgmt_mediametadata
Output
true / false on error
Description
Writes IPTC tags into image file for supported file types and keeps the existing IPTC tags
iptc_create
Syntax
iptc_create ($site, $text)
Input parameters
$site ... publication name [string]
$text ... text from content container [array]
global input parameters
$mgmt_config
Output
IPTC tag array / false on error
Description
Defines IPTC tag array based on the medai mapping of a publication
createmapping
Syntax
createmapping ($site, $mapping)
Input parameters
$site ... publication name [string]
$mapping ... mapping definition [string]
global input parameters
$mgmt_config
Output
true / false on error
Description
Prepares the PHP mapping array from the provided mapping definition and saves media mapping file
getmapping
Syntax
getmapping ($site)
Input parameters
$site ... publication name [string]
global input parameters
$mgmt_config
Output
mapping code for display / false
Description
Load the mapping file of the provided publication.
setmetadata
Syntax
setmetadata ($site, $location="", $object="", $mediafile="", $mapping="", $containerdata="", $user, $savecontainer=true)
Input parameters
$site ... publication name [string]
$location ... location path [string] (optional)
$object ... object name [string] (optional)
$mediafile ... media file name [string] (optional)
$mapping ... mapping [array:metadata-tag-name => text-id] (optional)
$containerdata ... container content as XML [string] (optional)
$user ... user name [string]
$savecontainer ... save content container [true, false] (optional)
global input parameters
$eventsystem
$mgmt_config
$hcms_ext
Output
container content as XML string / false
Description
Saves meta data of a multimedia file using a provided mapping in the proper fields of the content container.
If no mapping is given a default mapping will be used.
▲ Link API Functions
link_db_restore
Syntax
link_db_restore ($site="")
Input parameters
$site ... publication name [string] (optional)
global input parameters
$mgmt_config
Output
true / false on error
Description
This function restores a given or all link management index files
link_db_load
Syntax
link_db_load ($site, $user)
Input parameters
$site ... publication name [string]
$user ... user name [string]
global input parameters
$mgmt_config
Output
link database [2 dim. array] or true / false on error
Description
This function loads and locks the link management database
each record of the link management database has the following design:
xml-content container :| absolute path to 1-n objects :| 1-m links used by 1-n objects
important: the link management database has to saved or closed after loading it.
link_db_read
Syntax
link_db_read ($site)
Input parameters
$site ... publication name [string]
global input parameters
$mgmt_config
Output
link database [2 dim. array] or true / false on error
Description
This function loads the link management database for reading without locking
link_db_close
Syntax
link_db_close ($site, $user)
Input parameters
$site ... publication name [string]
$user ... user name [string]
global input parameters
$mgmt_config
Output
true/false
Description
closes and unlocks the link management database.
link_db_save
Syntax
link_db_save ($site, $link_db, $user)
Input parameters
$site ... link database [array]
$link_db ... publication name [string]
$user ... user name [string]
global input parameters
$mgmt_config
Output
true/false on error
Description
This function saves und unlocks the link management database
link_db_update
Syntax
link_db_update ($site, $link_db, $attribute, $contentfile="", $cat="", $link_curr="", $link_new="", $option)
Input parameters
$site ... publication name [string]
$link_db ... link database [2 dim. array]
$attribute ... attribute [object, link]
$contentfile ... content container [string] (optional)
$cat ... link category [comp, page] (optional)
$link_curr ... current link [must be URL
$link_new ... abs. or rel. path] (optional)
$option ... new link [must be URL
global input parameters
$mgmt_config
Output
link database [2 dim. array] or true / false on error
Description
This function inserts, updates and removes objects and their links from the link management database (add or update a link)
depending on which link is left empty:
link_curr = "": add new link (just one link matching given category!)
link_new = "": delete current link in use (just one linkm matching given category!)
link_curr & link_new are not empty: update current link with the new one
link_db_insert
Syntax
link_db_insert ($site, $link_db, $contentfile, $cat, $object="")
Input parameters
$site ... publication name [string]
$link_db ... link database [2 dim. array]
$contentfile ... content container name [string]
$cat ... link category [comp, page]
$object ... object name (optional)
global input parameters
$mgmt_config
Output
link database [2 dim. array] or true / false
Description
This function inserts a new record in the link management database
optionally the created object can be also inserted
link_db_delete
Syntax
link_db_delete ($site, $link_db, $contentfile)
Input parameters
$site ... link database [2 dim. array]
$link_db ... content container name [string]
$contentfile
global input parameters
$mgmt_config
Output
link database [2 dim. array] or true / false on error
Description
This function deletes a record in the link management database
link_db_getobject
Syntax
link_db_getobject ($multiobject)
Input parameters
$multiobject ... link database attribut (references to objects seperated by |) [string]
global input parameters
$mgmt_config
Output
objects [array] / false on error
Description
This function splits the object string into an array of objects.
link_update
Syntax
link_update ($site, $container, $link_old, $link_new)
Input parameters
$site ... publication name [string]
$container ... container name [string]
$link_old ... old link (converted) [string]
$link_new ... new link (converted) [string]
global input parameters
$user
$mgmt_config
Output
true/false
Description
This function updates the link of the published and working content container and link file
getlinkedobject
Syntax
getlinkedobject ($site, $location, $page, $cat)
Input parameters
$site ... publication name [string]
$location ... location [string]
$page ... object (name and extension) [string]
$cat ... category [page, comp] (optional)
global input parameters
$mgmt_config
Output
objects which link to the given object [array] or true / false
Description
This function gets all objects which link to the given object.
works with pages (page links) and components (component links) if link management is enabled.
getconnectedobject
Syntax
getconnectedobject ($container, $type="work")
Input parameters
$container ... container name [string]
$type ... container type [work, published, version] (optional)
global input parameters
$mgmt_config
$user
Output
connected objects[array]
Description
This function gets all objects which use the same content container and are therefore connected.
extractlinks
Syntax
extractlinks ($textcontent, $identifier)
Input parameters
$textcontent ... text content [string]
$identifier ... link identifiert ["href" for hyperreferences, "src" for image references or embed references (flash), "value" for paramter (flash)]
global input parameters
$mgmt_config
Output
object links [array] / false on error
Description
This function extracts all links based on it's identifier from a text and returns an array of all links
▲ Plugin API Functions
plugin_getdefaultconf
Syntax
plugin_getdefaultconf ()
Input parameters
Output
default value as array
plugin_readmenu
Syntax
plugin_readmenu ($xml, $pluginFolder)
Input parameters
$xml ... plugin xml [string]
$pluginFolder ... plugin directory [string]
global input parameters
$mgmt_config
Output
menu point array used by navigator
Description
Reads Menupoints and menugroups from the xml data.
Be carefull with nesting, function getcontent is used and you can't nest groups inside of groups as a subpoint!
Input parameter $pluginFolder contains the directory of the plugin.
Returns an Array containing every group and menupoint with its configuration.
plugin_parse
Syntax
plugin_parse ($oldData=array())
Input parameters
$oldData ... mgmt_plugin [array] (optional)
global input parameters
$mgmt_config
Output
mgmt_plugin as array
Description
Reads the plugin configurations from the file system.
Checks the folder defined in mgmt_config and searched for plugins and their configurations files.
It either takes needed values from the configuration, from the $oldData or defaultConfiguration.
plugin_generatedefinition
Syntax
plugin_generatedefinition ($arrayName, $array)
Input parameters
$arrayName ... name of array holding the plugin definitions [string]
$array ... configuration containing the values and keys [array]
global input parameters
$mgmt_config
Output
plugin array / false on error
Description
Generates the Array definition used in php for $array with the name of $arrayName.
Run recursively through the array and supports boolean, numeric and string types for the key and value.
plugin_saveconfig
Syntax
plugin_saveconfig ($configuration)
Input parameters
$configuration ... configuration [array]
global input parameters
$mgmt_config
Output
true / false on error
Description
Saves the plugin configuration $configuration into the configuration file.
The configuration file is located in the data/config directory and is named plugin.conf.php.
plugin_generatelink
Syntax
plugin_generatelink ($plugin, $page, $control=false, $additionalGetParameters=false)
Input parameters
$plugin ... plugin name [string]
$page ... plugin page (relative reference to the plugins main page) [string]
$control ... control (relative reference to the plugins control page) [string]
$additionalGetParameters ... additional GET parameters [string]
global input parameters
$mgmt_config
Output
plugin link
Description
Generates a link to be used when linking to other pages inside of a plugin
▲ User Interface API Functions
windowwidth
Syntax
windowwidth ($type="object")
Input parameters
$type ... type [string] (optional)
global input parameters
$mgmt_config
Output
window width in pixels
Description
Returns the width of the object window when editing/opening an object
windowheight
Syntax
windowheight ($type="object")
Input parameters
$type ... type [string] (optional)
global input parameters
$mgmt_config
Output
window height in pixels
Description
Returns the height of the object window when editing/opening an object
toggleview
Syntax
toggleview ($view)
Input parameters
$view ... view [detail, small, medium, large]
global input parameters
$mgmt_config
Output
true / false
Description
Sets explorer objectlist view parameter
togglesidebar
Syntax
togglesidebar ($view)
Input parameters
$view ... view [true, false]
global input parameters
$mgmt_config
Output
true / false
Description
Enables or disables the sidebar
setfilter
Syntax
setfilter ($filter_set)
Input parameters
$filter_set ... set of filters as array with keys [comp, image, document, video, audio] and value [0, 1]
global input parameters
$mgmt_config
Output
true / false
Description
Set filter settings for object view in session
objectfilter
Syntax
objectfilter ($file)
Input parameters
$file ... file name [string]
global input parameters
$mgmt_config
$hcms_ext
Output
true / false
Description
If an object name is passing the filter-test. One or more filters need to be set in the session "hcms_objectfilter".
showdate
Syntax
showdate ($date, $sourceformat="Y-m-d H:i", $targetformat="Y-m-d H:i", $timezone=true)
Input parameters
$date ... date and time [string
$sourceformat ... date input format [string]
$targetformat ... date output format [string]
$timezone ... correct time zone [true, false] (optional)
global input parameters
$mgmt_config
Output
date and time
Description
Prepares the date and time for the display in the users time zone and format.
showshorttext
Syntax
showshorttext ($text, $length=0, $linebreak=false, $charset="UTF-8")
Input parameters
$text ... text [string]
$length ... max. length of text (minus length starting from the end) [integer] (optional)
$linebreak ... line break instead of cut [true, false] only if length is positive (optional)
$charset ... character set for encoding [string] (optional)
Output
shortened text if possible
or orignal text
Description
Reduce the length of a string and add "..." at the end
showtopbar
Syntax
showtopbar ($show, $lang="en", $close_link="", $close_target="", $individual_button="", $id="bar")
Input parameters
$show ... message [string]
$lang ... language code [string] (optional)
$close_link ... close button link [string] (optional)
$close_target ... link target [string] (optional)
$individual_button ... individual button [string] (optional)
$id ... ID of div-layer [string] (optional)
global input parameters
$mgmt_config
$hcms_charset
$hcms_lang
Output
top bar box / false on error
Description
Returns the standard top bar with or without close button
showtopmenubar
Syntax
showtopmenubar ($show, $menu_array, $lang="en", $close_link="", $close_target="", $id="bar")
Input parameters
$show ... message [string]
$menu_array ... menu [array:name => properties/events]
$lang ... language code [string] (optional)
$close_link ... close button link [string] (optional)
$close_target ... link target [string] (optional)
$id ... ID of div-layer [string] (optional)
global input parameters
$mgmt_config
$hcms_charset
$hcms_lang
Output
top bar box / false on error
Description
Returns the menu top bar with or without close button
showmessage
Syntax
showmessage ($show, $width="580px", $height="70px", $lang="en", $style="", $id="hcms_messageLayer")
Input parameters
$show ... message [string]
$width ... width in pixel [integer] (optional)
$height ... height in pixel [integer] (optional)
$lang ... language code [string] (optional)
$style ... additional style definitions of div-layer [string] (optional)
$id ... ID of div-layer [string] (optional)
global input parameters
$mgmt_config
$hcms_charset
$hcms_lang
Output
message box / false on error
Description
Returns the standard message box with close button
showinfopage
Syntax
showinfopage ($show, $lang="en", $onload="")
Input parameters
$show ... message [string]
$lang ... language code [string] (optional)
$onload ... on load JS events [string] (optional)
global input parameters
$mgmt_config
$hcms_charset
$hcms_lang_codepage
$hcms_lang
Output
message on html info page / false on error
Description
Returns a full html info page
showinfobox
Syntax
showinfobox ($show, $lang="en", $style="", $id="hcms_infoboxLayer")
Input parameters
$show ... message [string]
$lang ... language code [string] (optional)
$style ... additional style definitions of div-layer [string] (optional)
$id ... ID of div-layer [string] (optional)
global input parameters
$mgmt_config
$hcms_charset
$hcms_lang_codepage
$hcms_lang
Output
message in div layer / false on error
Description
Returns the infobox as long as it has not been closed. Saves the close event in localstorage of browser.
showsharelinks
Syntax
showsharelinks ($link, $mediafile, $lang="en", $style="", $id="hcms_shareLayer")
Input parameters
$link ... link to share [string]
$mediafile ... media file name [string]
$lang ... language code [string] (optional)
$style ... additional style definitions of div-layer [string] (optional)
$id ... ID of div-layer [string] (optional)
global input parameters
$mgmt_config
$hcms_charset
$hcms_lang_codepage
$hcms_lang
Output
message in div layer / false on error
Description
Returns the presenation of share links of social media platforms
showmetadata
Syntax
showmetadata ($data, $lang="en", $class_headline="hcmsRowData2")
Input parameters
$data ... metadata [array]
$lang ... 2 digits language code [string]
$class_headline ... CSS-class with background-color for headlines [string] (optional)
global input parameters
$mgmt_config
$hcms_charset
$hcms_lang_codepage
$hcms_lang
Output
result as HTML unordered list / false on error
showobject
Syntax
showobject ($site, $location, $page, $cat="", $name="")
Input parameters
$site ... publication name [string]
$location ... location [string]
$page ... object name [string]
$cat ... category [page, comp] (optional)
$name ... object name [string] (optional)
global input parameters
$mgmt_config
$hcms_charset
$hcms_lang
$hcms_lang_date
$lang
Output
html presentation / false
showmedia
Syntax
showmedia ($mediafile, $medianame, $viewtype, $id="", $width="", $height="", $class="hcmsImageItem")
Input parameters
$mediafile ... mediafile (publication/filename) [string]
$medianame ... name of mediafile for display [string]
$viewtype ... view type [template, media_only, preview, preview_download, preview_no_rendering]
$id ... ID of the HTML media tag [string]
$width ... width in px [integer] (optional)
$height ... height in px [integer] (optional)
$class ... CSS class [string] (optional)
global input parameters
$site
$mgmt_config
$mgmt_mediapreview
$mgmt_mediaoptions
$mgmt_imagepreview
$mgmt_docpreview
$mgmt_docconvert
$mgmt_maxsizepreview
$hcms_charset
$hcms_lang_codepage
$hcms_lang_date
$hcms_lang
$lang
$site
$location
$cat
$page
$user
$pageaccess
$compaccess
$downloadformats
$hiddenfolder
$hcms_linking
$setlocalpermission
$mgmt_imageoptions
$is_mobile
$is_iphone
Output
html presentation of any media asset / false
Description
This function requires site, location and cat to be set as global variable in order to validate the access permission of the user
showcompexplorer
Syntax
showcompexplorer ($site, $dir, $location_esc="", $page="", $compcat="multi", $search_expression="", $search_format="", $mediatype="", $lang="en", $callback="", $scalingfactor="1")
Input parameters
$site ... publication name [string]
$dir ... current explorer location [string]
$location_esc ... object location [string] (optional)
$page ... object name [string] (optional)
$compcat ... component category [single, multi, media] (optional)
$search_expression ... search expression [string] (optional)
$search_format ... search format [object, document, image, video, audio, watermark] (optional)
$mediatype ... media-type [audio, video, text, flash, image, compressed, binary] (optional)
$lang ... callback of CKEditor [string] (optional)
$callback ... saclingfactor for images [integer] (optional)
$scalingfactor
global input parameters
$user
$mgmt_config
$siteaccess
$pageaccess
$compaccess
$rootpermission
$globalpermission
$localpermission
$hiddenfolder
$html5file
$temp_complocation
$hcms_charset
$hcms_lang
Output
explorer with search / false on error
Description
Creates component explorer including the search form
showeditor
Syntax
showeditor ($site, $hypertagname, $id, $contentbot="", $sizewidth=600, $sizeheight=300, $toolbar="Default", $lang="en", $dpi=72)
Input parameters
$site ... publication name [string]
$hypertagname ... hypertag name [string]
$id ... hypertag id [string]
$contentbot ... content [string]
$sizewidth ... width of the editor [integer]
$sizeheight ... height of the editor [integer]
$toolbar ... toolbar set [string]
$lang ... 2 digit language code [string]
$dpi ... dpi for scaling images [integer]
global input parameters
$mgmt_config
$publ_config
Output
rich text editor code / false on error
Description
Returns the rich text editor code
showinlineeditor_head
Syntax
showinlineeditor_head ($lang)
Input parameters
$lang ... 2 digit language code [string]
global input parameters
$mgmt_config
$hcms_charset
$hcms_lang
Output
rich text editor code for html head section / false on error
Description
Returns the rich text editor code (JS, CSS) for include into the html head section
showinlinedatepicker_head
Syntax
showinlinedatepicker_head ()
Input parameters
global input parameters
$mgmt_config
Output
date picker code for html head section / false on error
Description
Returns the date picker code (JS, CSS) for include into the html head section
showinlineeditor
Syntax
showinlineeditor ($site, $hypertag, $id, $contentbot="", $sizewidth=600, $sizeheight=300, $toolbar="Default", $lang="en", $contenttype="", $cat="", $location_esc="", $page="", $contentfile="", $db_connect=0, $token="")
Input parameters
$site ... publication name [string]
$hypertag ... hypertag [string]
$id ... hypertag id [string]
$contentbot ... content [string]
$sizewidth ... width of the editor [integer]
$sizeheight ... height of the editor [integer]
$toolbar ... toolbar set [string]
$lang ... 2 digit language code [string]
$contenttype ... content-type [string]
$cat ... category [page, comp]
$location_esc ... converted location [string]
$page ... object name [string]
$contentfile ... container name [string]
$db_connect ... DB-connect file name [string]
$token ... security token [string]
global input parameters
$mgmt_config
$publ_config
$hcms_charset
$hcms_lang
Output
rich text editor code / false on error
Description
shows the rich text inline editor
showvideoplayer
Syntax
showvideoplayer ($site, $video_array, $width=320, $height=240, $logo_url="", $id="", $title="", $autoplay=true, $fullscreen=true, $loop=false, $muted=false, $controls=true, $iframe=false, $force_reload=false)
Input parameters
$site ... video array containing the different html sources [array]
$video_array ... width of the video in pixel [integer]
$width ... height of the video in pixel [integer]
$height ... link to the logo which is displayed before you click on play (If the value is null the default logo will be used) [string]
$logo_url ... ID of the video (will be generated when empty) [string]
$id ... title for this video [string]
$title ... autoplay video on load (true)
$autoplay ... default is false [true, false]
$fullscreen ... view the video in full screen [true, false]
$loop ... play loop [true, false] (optional)
$muted ... muted/no sound [true, false] (optional)
$controls ... player controls [true, false] (optional)
$iframe ... use video in iframe [true, false] (optional)
$force_reload ... reload video sources to prevent the browser cache to show the same video even if it has been changed [true, false] (optional)
global input parameters
$mgmt_config
Output
HTML code of the video player / false on error
Description
Generates a html segment for the video player code
showvideoplayer_head
Syntax
showvideoplayer_head ($secureHref=true, $fullscreen=true)
Input parameters
$secureHref ... secure hyperreferences by adding 'hypercms_' [true, false] (optional)
$fullscreen ... is it possible to view the video in fullScreen [true, false] (optional)
global input parameters
$mgmt_config
Output
head for video player / false on error
showaudioplayer
Syntax
showaudioplayer ($site, $audioArray, $width=320, $height=320, $logo_url="", $id="", $autoplay=false, $loop=false, $controls=true, $force_reload=false)
Input parameters
$site ... publication name [string]
$audioArray ... audio files [array]
$width ... ID of the tag [string] (optional)
$height ... autoplay (optional) [true, false]
$logo_url ... play loop (optional) [true, false]
$id ... player controls (optional) [true, false]
$autoplay
$loop
$controls
$force_reload
global input parameters
$mgmt_config
Output
code of the HTML5 player / false
Description
Generates the html segment for the video player code
showaudioplayer_head
Syntax
showaudioplayer_head ($secureHref=true)
Input parameters
$secureHref ... secure hyperreferences by adding 'hypercms_' [true, false] (optional)
global input parameters
$mgmt_config
Output
head for audio player
debug_getbacktracestring
Syntax
debug_getbacktracestring ($valueSeparator, $rowSeparator, $ignoreFunctions=array())
Input parameters
$valueSeparator ... separator for arguments [string]
$rowSeparator ... separator for a row on screen/file [string]
$ignoreFunctions ... functionnames to be ignored [array]
Output
debug message
Description
Returns the current backtrace as a good readable string.
Ignores debug and debug_getbacktracestring.
showAPIdocs
Syntax
showAPIdocs ($file, $return="html")
Input parameters
$file ... path to API file [string]
$return ... return result as HTML or array [html, array] (optional)
global input parameters
= array()
Output
HTML output of documentation / false on error
Description
Generates the documentation of an API file
readnavigation
Syntax
readnavigation ($site, $docroot, $object, $view="publish", $user="sys")
Input parameters
$site ... publication name [string]
$docroot ... location [string]
$object ... object name [string]
$view ... view name (see view parameters of function buildview) [string]
$user ... user name [string]
global input parameters
$mgmt_config
$navi_config
Output
navigation item array / false
Description
Reads the content from the container and collects information about a single navigation item
createnavigation
Syntax
createnavigation ($site, $docroot, $urlroot, $view="publish", $currentobject="", $recursive=true)
Input parameters
$site ... publication name [string]
$docroot ... document root for navigation [string]
$urlroot ... URL root for navigation [string]
$view ... view name (see view parameters of function buildview) [string]
$currentobject ... path to current object [string] (optional)
$recursive ... recursive [true, false] (optional)
global input parameters
$mgmt_config
$navi_config
Output
navigation array / false
Description
Generates an associative array (item => nav-item, sub => array with sub-items).
Example
$navi_config = array();
document root definitions
$navi_config['root_path'] = "%abs_page%/";
$navi_config['root_url'] = "%url_page%/";
HTML / CSS class defintions
$navi_config['attr_ul_top'] = "class=\"nav navbar-nav\"";
$navi_config['attr_ul_dropdown'] = "class=\"dropdown-menu\"";
$navi_config['attr_li_active'] = "class=\"active\"";
$navi_config['attr_li_dropdown'] = "class=\"dropdown\"";
$navi_config['attr_href_dropdown'] = "class=\"dropdown-toggle\" data-toggle=\"dropdown\"";
$navi_config['tag_li'] = "<li %attr_li%><a href=\"%link%\" %attr_href%>%title%</a>%sub%</li>\n";
$navi_config['tag_ul'] = "<ul %attr_ul%>%list%</ul>\n";
Language definitions
Session variable name that holds the language setting
$navi_config['lang_session'] = "langcode";
2nd key = langcode & value = text_id of textnode
$navi_config['lang_text_id']['DE'] = "Titel_DE";
$navi_config['lang_text_id']['EN'] = "Titel_EN";
PermaLink definitions
2nd key = langcode & value = text_id of textnode
$navi_config['permalink_text_id']['DE'] = "PermaLink_DE";
$navi_config['permalink_text_id']['EN'] = "PermaLink_EN";
Hide navigation item (any value or empty) and use sort order (number or empty)
$navi_config['hide_text_id'] = "NavigationHide";
$navi_config['sort_text_id'] = "NavigationSortOrder";
Use only index file of directory as navigation item, e.g. index.html or index.php (Keep empty if all objects of a folder should be included)
$navi_config['index_file'] = "";
$navigation = createnavigation ("%publication%", $navi_config['root_path'], $navi_config['root_url'], "%view%", "%abs_location%/%object%");
echo shownavigation ($navigation);
shownavigation
Syntax
shownavigation ($navigation, $level=1)
Input parameters
$navigation ... navigation (created by function readnavigation) [array]
$level ... level [integer] (optional)
global input parameters
$mgmt_config
$navi_config
Output
navigation HTML presentation / false
Description
display navigation as HTML code.
The following example configures the navigation:
$navi_config = array();
document root definitions:
$navi_config['root_path'] = "%abs_page%/";
$navi_config['root_url'] = "%url_page%/";
HTML / CSS class defintions (names between percentage signs are placeholders):
$navi_config['attr_ul_top'] = "class=\"nav navbar-nav\"";
$navi_config['attr_ul_dropdown'] = "class=\"dropdown-menu\"";
$navi_config['attr_li_active'] = "class=\"active\"";
$navi_config['attr_li_dropdown'] = "class=\"dropdown\"";
$navi_config['attr_href_dropdown'] = "class=\"dropdown-toggle\" data-toggle=\"dropdown\"";
$navi_config['tag_li'] = "<li %attr_li%><a href=\"%link%\" %attr_href%>%title%</a>%sub%</li>\n";
$navi_config['tag_ul'] = "<ul %attr_ul%>%list%</ul>\n";
language definitions
Session variable name that holds the language setting
$navi_config['lang_session'] = "langcode";
note: key = langcode & value = text_id of textnode
$navi_config['lang_text_id']['DE'] = "Titel_DE";
$navi_config['lang_text_id']['EN'] = "Titel_EN";
PermaLink defintions
note: key = langcode & value = text_id of textnode
$navi_config['permalink_text_id']['DE'] = "PermaLink_DE";
$navi_config['permalink_text_id']['EN'] = "PermaLink_EN";
Navigation hide and sort order defintions
$navi_config['hide_text_id'] = "NavigationHide";
$navi_config['sort_text_id'] = "NavigationSortOrder";
Use the first object of a folder for the main navigation item and display all following objects as sub navigation items [true, false]
$navi_config['use_1st_folderitem'] = false;
showselect
Syntax
showselect ($value_array, $only_text=false, $selected_value="", $id="", $attributes="")
Input parameters
$value_array ... values array (array-key = value
$only_text ... array-value = text) [array]
$selected_value ... use values of array as option value and text [true, false] (optional)
$id ... selected value [string] (optional)
$attributes ... attributes of select tags like name or id or events [string] (optional)
Output
HTML select box presentation / false
showtranslator
Syntax
showtranslator ($site, $id, $type, $charset="UTF-8", $lang="en", $style="")
Input parameters
$site ... publication name [string]
$id ... editor/text-tag ID [string]
$type ... unformatted or formatted texttag-type [u, f]
$charset ... character set [string] (optional)
$lang ... 2 digit language code [string] (optional)
$style ... style of div tag [string] (optional)
global input parameters
$mgmt_config
$hcms_lang
Output
HTML translator box presentation / false
showmapping
Syntax
showmapping ($site, $lang="en")
Input parameters
$site ... publication name [string]
$lang ... 2 digit language code [string] (optional)
global input parameters
$mgmt_config
$hcms_charset
$hcms_lang
Output
table with form fields for display / false
Description
Present the mapping form of the provided publication.
showgallery
Syntax
showgallery ($multiobject, $thumbsize=100, $openlink=false, $user="sys")
Input parameters
$multiobject ... multiobjects represented by their path or object ID [array]
$thumbsize ... thumbnail size in pixels [integer] (optional)
$openlink ... open object on click [true, false] (optional)
$user ... user name [string] (optional)
global input parameters
$mgmt_config
$pageaccess
$compaccess
$hiddenfolder
$hcms_linking
$globalpermission
$setlocalpermission
$hcms_lang
$lang
Output
gallery view / false
Description
Presents all objects in a gallery with their thumbnails.
▲ Template Engine API Functions
checklanguage
Syntax
checklanguage ($language_array, $language_value)
Input parameters
$language_array ... language array with all valid values
$language_value ... language value of attribute in hyperCMS tag
Output
true if language array holds the given language value / false if not found
checkgroupaccess
Syntax
checkgroupaccess ($groupaccess, $ownergroup)
Input parameters
$groupaccess ... group access string from hyperCMS group-tag attribute
$ownergroup ... owner groups as array
Output
true if current ownergroup has access or invalid input / false if not
transformlink
Syntax
transformlink ($viewstore)
Input parameters
$viewstore ... view of object
global input parameters
$site
$location_esc
$page
$ctrlreload
$mgmt_config
Output
view with transformed links for easyedit mode
followlink
Syntax
followlink ($site, $follow)
Input parameters
$site ... publication name
$follow ... link to follow
global input parameters
$mgmt_config
Output
prepared input (location plus page) for easyedit mode (buildview) / false on error
errorhandler
Syntax
errorhandler ($source_code, $return_code, $error_identifier)
Input parameters
$source_code ... source code
$return_code ... return code
$error_identifier ... error identifier
Output
error message and view of the code with line identifiers
viewinclusions
Syntax
viewinclusions ($site, $viewstore, $hypertag, $view, $application, $charset="UTF-8")
Input parameters
$site ... view of object
$viewstore ... hypertag to create view of inlcuded objects
$hypertag ... view parameter
$view ... application
$application ... character set used (optional) view-parameter explanation: "template or any other word": the standard text (in table) will be included for the view "preview": preview of the content of the included file "publish": view the content of the included file as it is (for publishing)
$charset
global input parameters
$user
$mgmt_config
$location
$hcms_lang
$lang
Output
view of the content including the content of included objects
buildview
Syntax
buildview ($site, $location, $page, $user, $buildview="template", $ctrlreload="no", $template="", $container="", $force_cat="", $execute_code=true)
Input parameters
$site ... publication name [string]
$location ... location [string]
$page ... object name [string]
$user ... user name [string]
$buildview ... view parameter [string] (optional)
$ctrlreload ... reload workplace control frame and add html & body tags if missing [yes, no] (optional)
$template ... template name [string] (optional)
$container ... container name [string] (optional)
$force_cat ... force category to use different location path [page, comp] (optional)
$execute_code ... execute_code [true, false] (optional)
global input parameters
$container_collection
$eventsystem
$db_connect
$mgmt_config
$siteaccess
$adminpermission
$setlocalpermission
$token
$is_mobile
$is_iphone
$viewportwidth
$mgmt_lang_shortcut_default
$hcms_charset
$hcms_lang_name
$hcms_lang_shortcut
$hcms_lang_codepage
$hcms_lang_date
$hcms_lang
$lang
Output
result array with view of the content / false on error
Description
buildview parameter may have the following values:
"formedit": use form for content editing
"formmeta": use form for content viewing only for meta informations (tag-type must be meta)
"formlock": use form for content viewing
"cmsview": view of page based on template, includes hyperCMS specific code (buttons)
"inlineview": view of page based on template, includes hyperCMS specific code (buttons) and inline text editing
"publish": view of page for publishing based on template without CMS specific code (editing)
"unpublish": execution of the code for unpublishing an object
"preview": view of page based on template for preview (inactive hyperlinks) without CMS specific code (buttons)
"template": view of template based on template for preview (inactive hyperlinks) without CMS specific code (buttons)
unescapeview
Syntax
unescapeview ($viewstore, $application="php")
Input parameters
$viewstore ... code [string]
$application ... application name [string] (optional)
Output
unescaped code / false on error
buildsearchform
Syntax
buildsearchform ($site="", $template="", $report="", $ownergroup="", $css_display="inline-block", $css_width_field="90%")
Input parameters
$site ... publication name [string] (optional for report)
$template ... template name [string] (optional)
$report ... or report name [string] (optional)
$ownergroup ... group access [array] (optional)
$css_display ... CSS display value for label tag [string] (optional)
$css_width_field ... CSS field width (optional)
global input parameters
$user
$mgmt_config
$mgmt_lang_shortcut_default
$hcms_charset
$hcms_lang_name
$hcms_lang_shortcut
$hcms_lang_codepage
$hcms_lang_date
$hcms_lang
$lang
Output
form view / false on error
buildbarchart
Syntax
buildbarchart ($paper_name, $paper_width=600, $paper_height=300, $paper_top=10, $paper_left=40, $x_axis, $y1_axis, $y2_axis="", $y3_axis="", $paper_style="", $bar1_style="", $bar2_style="", $bar3_style="", $show_value=false)
Input parameters
$paper_name ... name/id of paper [string]
$paper_width ... width of paper in pixel [integer]
$paper_height ... height of paper in pixel [integer]
$paper_top ... top space in pixel [integer]
$paper_left ... left space in pixel [integer]
$x_axis ... x-axis values [array]
$y1_axis ... y1-axis values [array]
$y2_axis ... y2-axis values [array] (optional)
$y3_axis ... y3-axis values [array] (optional)
$paper_style ... paper CSS style [string]
$bar1_style ... 1st bar chart CSS style [string]
$bar2_style ... 2nd bar chart CSS style [string]
$bar3_style ... 3rd bar chart CSS style [string]
$show_value ... show y-value in bar [true, false]
global input parameters
$lang
$mgmt_config
Output
bar chart view / false on error
▲ XML API Functions
valid_tagname
Syntax
valid_tagname ($tagname)
Input parameters
$tagname ... tag name [string]
Output
true / false on error
Description
Verifies a tag name
setxmlparameter
Syntax
setxmlparameter ($xmldata, $parameter, $value)
Input parameters
$xmldata ... XML content container [string]
$parameter ... paramater name [string]
$value ... paramater value [string]
Output
XML content container / false on error
Description
Set parameter values in XML declaration (e.g. encoding): encoding="UTF-8"
getcontent
Syntax
getcontent ($xmldata, $starttagname)
Input parameters
$xmldata ... XML content container [string]
$starttagname ... tag name [string]
Output
result array with the content of the requested XML node (tag) / false on error
Description
<tagname>content</tagname>
Extracts the content between the given $starttagname xml-tags.
Only this function will decode special characters (&, <, >) in the content and removes CDATA.
Function getcontent will only decode values if they are non-xml and non_html. so content inside child nodes including tags won't be decoded.
Wild card character "*" can be used at the end of $starttagname.
geticontent
Syntax
geticontent ($xmldata, $starttagname)
Input parameters
$xmldata ... XML content container [string]
$starttagname ... tag name [string]
Output
result array with the content of the requested XML node (tag) / false on error
Description
CASE-Insensitive version (XML parser are however always case-sensitive!)
<tagname>content</tagname>
Extracts the content between the given $starttagname xml-tags.
Only this function will decode special characters (&, <, >) in the content and removes CDATA.
getcontent will only decode values if they are non-xml and non_html. so content inside child nodes including tags won't be decoded.
Wild card character "*" can be used at the end of $starttagname
getxmlcontent
Syntax
getxmlcontent ($xmldata, $starttagname)
Input parameters
$xmldata ... XML content container [string]
$starttagname ... tag name [string]
Output
result array with the content of the requested XML node (tag) / false on error
Description
<tagname>content</tagname>
Extracts the content together with the $starttagname xml tags.
This function will NOT decode special characters like function getcontent!
Wild card character "*" can be used at the end of $starttagname.
getxmlicontent
Syntax
getxmlicontent ($xmldata, $starttagname)
Input parameters
$xmldata ... XML content container [string]
$starttagname ... tag name [string]
Output
result array with the content of the requested XML node (tag) / false on error
Description
CASE-Insensitive version (XML parser are always case-sensitive!)
<tagname>content</tagname>
Extracts the content together with the $starttagname xml tags.
This function will NOT decode special characters like function getcontent!
Wild card character "*" can be used at the end of $starttagname.
selectcontent
Syntax
selectcontent ($xmldata, $starttagname, $startcondtag, $condvalue)
Input parameters
$xmldata ... XML content container [string]
$starttagname ... tag name of requested XML node [string]
$startcondtag ... tag holding the conditional value inside the given starttagname [string]
$condvalue ... conditional value [string]
Output
result array with the content of the requested XML node (tag) / false on error
Description
<tagname>
.......
<condtag>condvalue</condtag>
.........
</tagname>
Extracts the content between the given $starttagname xml tags where the child xml tag $startcondtag value is equal with the target value $condvalue.
Wild card character "*" can be used at the end of $starttagname.
Wild card character "*" can be used at begin and end of $condvalue.
Be Aware: $startcondtag must be a child of $starttagname!
selecticontent
Syntax
selecticontent ($xmldata, $starttagname, $startcondtag, $condvalue)
Input parameters
$xmldata ... XML content container [string]
$starttagname ... tag name of requested XML node [string]
$startcondtag ... tag holding the conditional value inside the given starttagname [string]
$condvalue ... conditional value [string]
Output
result array with the content of the requested XML node (tag) / false on error
Description
CASE-Insensitive version (XML parser are always case-sensitive!)
<tagname>
.......
<condtag>condvalue</condtag>
.........
</tagname>
Extracts the content between the given $starttagname xml tags where the child xml tag $startcondtag value is equal with the target value $condvalue.
Wild card character "*" can be used at the end of $starttagname.
Wild card character "*" can be used at begin and end of $condvalue.
Be Aware: $startcondtag must be a child of $starttagname!
selectxmlcontent
Syntax
selectxmlcontent ($xmldata, $starttagname, $startcondtag, $condvalue)
Input parameters
$xmldata ... XML content container [string]
$starttagname ... tag name of requested XML node [string]
$startcondtag ... tag holding the conditional value inside the given starttagnamev
$condvalue ... conditional value [string]
Output
result array with the content of the requested XML node (tag) / false on error
Description
<tagname>
.......
<condtag>condvalue</condtag>
.......
</tagname>
Extracts the content between the given $starttagname xml tags where the child xml tag $startcondtag value is equal with the target value $condvalue
Wild card character "*" can be used at begin and end of $condvalue.
Be Aware: $startcondtag must be a child of $starttagname!
selectxmlicontent
Syntax
selectxmlicontent ($xmldata, $starttagname, $startcondtag, $condvalue)
Input parameters
$xmldata ... XML content container [string]
$starttagname ... tag name of requested XML node [string]
$startcondtag ... tag holding the conditional value inside the given starttagname [string]
$condvalue ... conditional value [string]
Output
result array with the content of the requested XML node (tag) / false on error
Description
CASE-Insensitive version (XML parser are always case-sensitive!)
<tagname>
.......
<condtag>condvalue</condtag>
.......
</tagname>
Extracts the content between the given $starttagname xml tags where the child xml tag $startcondtag value is equal with the target value $condvalue.
Wild card character "*" can be used at begin and end of $condvalue.
Be Aware: $startcondtag must be a child of $starttagname!
deletecontent
Syntax
deletecontent ($xmldata, $starttagname, $startcondtag="", $condvalue="")
Input parameters
$xmldata ... XML content container [string]
$starttagname ... tag name of requested XML node [string]
$startcondtag ... tag holding the conditional value inside the given starttagname [string] (optional)
$condvalue ... conditional value [string] (optional)
Output
XML content container / false on error
Description
<tagname>
<condtag>condvalue</condtag>
</tagname>
Deletes the whole xml content including <tagname>.
Wild card character "*" can be used at begin and end of $condvalue.
deleteicontent
Syntax
deleteicontent ($xmldata, $starttagname, $startcondtag="", $condvalue="")
Input parameters
$xmldata ... XML content container [string]
$starttagname ... tag name of requested XML node [string]
$startcondtag ... tag holding the conditional value inside the given starttagname [string] (optional)
$condvalue ... conditional value [string] (optional)
Output
XML content container / false on error
Description
CASE-Insensitive version (XML parser are always case-sensitive!)
<tagname>
<condtag>condvalue</condtag>
</tagname>
Deletes the whole xml content including <tagname>.
Wild card character "*" can be used at begin and end of $condvalue.
setcontent
Syntax
setcontent ($xmldata, $startparenttagname, $starttagname, $contentnew, $startcondtag="", $condvalue="")
Input parameters
$xmldata ... XML content container [string]
$startparenttagname ... parent tag name [string]
$starttagname ... tag name of XML node for the new content [string]
$contentnew ... new XML node to be inserted
$startcondtag ... tag holding the conditional value inside the given starttagname [string]
$condvalue ... conditional value [string]
Output
XML content container / false on error
Description
<parenttagname>
<condtag>condvalue</condtag>
<tagname>contentnew</tagname>
</parenttagname>
$xmldata = data string to be parsed
$startparenttagname = name of the tag that is a parent node of starttagname (necessary if condition has been set!)
$starttagname = name of the tag (child node)
$contentnew = the content that will be inserted between the child tags $starttagname
$startcondtag = child xml tag where condition will be set
$condvalue = value of the condition
Wild card character "*" can be used at begin and end of $condvalue.
seticontent
Syntax
seticontent ($xmldata, $startparenttagname, $starttagname, $contentnew, $startcondtag, $condvalue)
Input parameters
$xmldata ... XML content container [string]
$startparenttagname ... parent tag name [string]
$starttagname ... tag name of XML node for the new content [string]
$contentnew ... new XML node to be inserted [string]
$startcondtag ... tag holding the conditional value inside the given starttagname [string]
$condvalue ... conditional value [string]
Output
XML content container / false on error
Description
CASE-Insensitive version (XML parser are always case-sensitive!)
<parenttagname>
<condtag>condvalue</condtag>
<tagname>contentnew</tagname>
</parenttagname>
$xmldata = data string to be parsed
$startparenttagname = name of the tag that is the parent node of starttagname (necessary if condition has been set!)
$starttagname = name of the tag (child node)
$contentnew = the content that will be inserted between the child tags $starttagname
$startcondtag = child xml tag where condition will be set
$condvalue = value of the condition
Wild card character "*" can be used at begin and end of $condvalue.
setcontent_fast
Syntax
setcontent_fast ($xmldata, $startparenttagname, $starttagname, $contentnew, $startcondtag="", $condvalue="")
Input parameters
$xmldata ... XML content container [string]
$startparenttagname ... parent tag name [string]
$starttagname ... tag name of XML node for the new content [string]
$contentnew ... new XML node to be inserted
$startcondtag ... tag holding the conditional value inside the given starttagname [string]
$condvalue ... conditional value [string]
Output
XML content container / false on error
Description
function designed for link management, extremely fast but with limitations (only CASE-Sensitive!)
<parenttagname>
<condtag>condvalue</condtag>
<tagname>contentnew</tagname>
</parenttagname>
$xmldata = data string to be parsed
$startparenttagname = name of the tag that is the parent node of starttagname (necessary if condition has been set!)
$starttagname = name of the tag (child node)
$contentnew = the content that will be inserted between the child tags $starttagname
$startcondtag = child xml tag where condition will be set
$condvalue = value of the condition
Wild card character "*" can be used at begin and end of $condvalue.
updatecontent
Syntax
updatecontent ($xmldata, $xmlnode, $xmlnodenew)
Input parameters
$xmldata ... XML content container [string]
$xmlnode ... XML node to be replaced [string]
$xmlnodenew ... new XML node [string]
Output
XML content container / false on error
Description
Updates a given xml string $xmlnode in $xmldata with the content $xmlnodenew.
This method provides a faster way to update xml nodes when the node was selected before.
insertcontent
Syntax
insertcontent ($xmldata, $insertxmldata, $starttagname)
Input parameters
$xmldata ... XML content container [string]
$insertxmldata ... XML node to be inserted in starttagname [string]
$starttagname ... tag name of the parent XML node [string]
Output
XML content container / false on error
Description
.....................
.......................
<tagname> <- list start
......................
......................
insertxmldata <- insertxmldata
</tagname> <- list end
.....................
Inserts $insertxmldata string at the end of all child between the parent $tagname .
inserticontent
Syntax
inserticontent ($xmldata, $insertxmldata, $starttagname)
Input parameters
$xmldata ... XML content container [string]
$insertxmldata ... XML node to be inserted in starttagname [string]
$starttagname ... tag name of the parent XML node [string]
Output
XML content container / false on error
Description
CASE-Insensitive version (XML parser are always case-sensitive!)
.....................
.......................
<tagname> <- list start
......................
......................
insertxmldata <- insertxmldata
</tagname> <- list end
.....................
Inserts $insertxmldata string at the end of all child between the parent $tagname.
addcontent
Syntax
addcontent ($xmldata, $sub_xmldata, $startgrandtagname, $startcondtag, $condvalue, $startparenttagname, $starttagname, $contentnew)
Input parameters
$xmldata ... XML content container [string]
$sub_xmldata ... xml node to be inserted [string]
$startgrandtagname ... grandparent tag name [string]
$startcondtag ... tag holding the conditional value inside the given starttagname [string]
$condvalue ... conditional value [string]
$startparenttagname ... parent tag name [string]
$starttagname ... tag name of XML node for the new content [string]
$contentnew ... new XML node to be inserted [string]
Output
XML content container / false on error
Description
<grandtagname>
<condtag>condvalue</condtag>
<parenttagname> <- list start
......................
......................
...................... }
<tagname>contentnew</tagname> } <- sub_xmldata
...................... }
</parenttagname> <- list end
</grandtagname>
$xmldata = data string to be parsed
$sub_xmldata = xml node to be inserted
$startgrandtagname (optional) = name of the grand xml tag of parent xml tag where (article)
$startcondtag (optional) = xml tag inside the parent xml tags where condition will be set
$condvalue (optional) = value of the condition
$startparenttagname (optional) = name of the parent xml tag where the xml subschema should be added (list)
$starttagname (optional) = name of the tag (child)
$contentnew (optional) = the content that will be inserted between the child tags
addicontent
Syntax
addicontent ($xmldata, $sub_xmldata, $startgrandtagname, $startcondtag, $condvalue, $startparenttagname, $starttagname, $contentnew)
Input parameters
$xmldata ... XML content container [string]
$sub_xmldata ... xml node to be inserted [string]
$startgrandtagname ... grandparent tag name [string]
$startcondtag ... tag holding the conditional value inside the given starttagname [string]
$condvalue ... conditional value [string]
$startparenttagname ... parent tag name [string]
$starttagname ... tag name of XML node for the new content [string]
$contentnew ... new XML node to be inserted [string]
Output
XML content container / false on error
Description
CASE-Insensitive version (XML parser are always case-sensitive!)
<grandtagname>
<condtag>condvalue</condtag>
<parenttagname> <- list start
......................
......................
...................... }
<tagname>contentnew</tagname> } <- sub_xmldata
...................... }
</parenttagname> <- list end
</grandtagname>
$xmldata = data string to be parsed
$sub_xmldata = xml subschema to be inserted
$startgrandtagname (optional) = name of the grand xml tag of parent xml tag where (article)
$startcondtag (optional) = xml tag inside the parent xml tags where condition will be set
$condvalue (optional) = value of the condition
$startparenttagname (optional) = name of the parent xml tag where the xml subschema should be added (list)
$starttagname (optional) = name of the tag (child)
$contentnew (optional) = the content that will be inserted between the child tags
▲ Report API Functions
createreport
Syntax
createreport ($report_name)
Input parameters
$report_name ... report name [string]
global input parameters
$user
$eventsystem
$mgmt_config
$hcms_lang
$lang
Output
result array
Description
This function creates a new report
editreport
Syntax
editreport ($report_name, $config)
Input parameters
$report_name ... report name [string]
$config ... report configuration [array]
global input parameters
$user
$eventsystem
$mgmt_config
$hcms_lang
$lang
Output
result array
Description
This function saves the configuration of a report.
loadreport
Syntax
loadreport ($report_name)
Input parameters
$report_name ... report name [string]
global input parameters
$user
$eventsystem
$mgmt_config
$hcms_lang
$lang
Output
result array / false
Description
This function loads the report configuration file and provides the data as array.
deletereport
Syntax
deletereport ($report_name)
Input parameters
$report_name ... report name [string]
global input parameters
$user
$eventsystem
$mgmt_config
$hcms_lang
$lang
Output
result array
Description
This function deletes a report
analyzeSQLselect
Syntax
analyzeSQLselect ($sql)
Input parameters
$sql ... SQL statement [string]
Output
result array
Description
This function analyzes an SQL Select statement and return its parts in an array
showpiechart
Syntax
showpiechart ($title="", $x_title, $x_value, $y_title, $y_value, $data_array, $width="100%", $height="100%", $id="hcmsPieChart", $suffix="", $loadAPI=true)
Input parameters
$title ... chart title [string]
$x_title ... chart x-axis title [string]
$x_value ... chart x-axis array key name holding the values [string]
$y_title ... chart y-axis title [string]
$y_value ... chart y-axis array key name holding the values [string]
$data_array ... assoz. data array [array]
$width ... chart width [string] (optional)
$height ... chart height [string] (optional)
$id ... ID of chart [string] (optional)
$suffix ... function name suffix [string] (optional)
$loadAPI ... load Google Chart API [true, false] (optional)
global input parameters
$mgmt_config
$hcms_lang
$lang
Output
Google Chart code / false
Description
This function creates the Google Chart Code for a pie chart. The Google Chart API need to be loaded first!
showcolumnchart
Syntax
showcolumnchart ($title="", $x_title, $x_value, $y1_title, $y1_value, $y2_title="", $y2_value="", $y3_title="", $y3_value="", $data_array, $width="100%", $height="100%", $id="hcmsColumnChart", $suffix="", $loadAPI=true)
Input parameters
$title ... chart title [string]
$x_title ... chart x-axis title [string]
$x_value ... chart x-axis array key name holding the values [string]
$y1_title ... chart y1-axis title [string]
$y1_value ... chart y1-axis array key name holding the values [string]
$y2_title ... chart y2-axis title [string]
$y2_value ... chart y2-axis array key name holding the values [string]
$y3_title ... chart y3-axis title
$y3_value ... chart y3-axis array key name holding the values [string]
$data_array ... assoz. data array [array]
$width ... chart width [string] (optional)
$height ... chart height [string] (optional)
$id ... ID of chart [string] (optional)
$suffix ... function name suffix [string] (optional)
$loadAPI
global input parameters
$mgmt_config
$hcms_lang
$lang
Output
Google Chart code / false
Description
This function creates the Google Chart Code for a column chart. The Google Chart API need to be loaded first!
showtimelinechart
Syntax
showtimelinechart ($title="", $y_title, $y_value, $x1_title, $x1_value, $x2_title="", $x2_value="", $data_array, $width="100%", $height="100%", $id="hcmsTimelineChart", $suffix="", $loadAPI=true)
Input parameters
$title ... chart title [string]
$y_title ... chart y-axis title [string]
$y_value ... chart y-axis array key name holding the values [string]
$x1_title ... chart x1-axis title
$x1_value ... chart x1-axis array key name holding the values [string]
$x2_title ... chart x2-axis title [string]
$x2_value ... chart x2-axis array key name holding the values [string]
$data_array ... assoz. data array [array]
$width ... chart width [string] (optional)
$height ... chart height [string] (optional)
$id ... ID of chart [string] (optional)
$suffix ... function name suffix [string] (optional)
$loadAPI ... load Google Chart API [true, false] (optional)
global input parameters
$mgmt_config
$hcms_lang
$lang
Output
Google Chart code / false
Description
This function creates the Google Chart Code for a timeline chart. The Google Chart API need to be loaded first!
showgeolocationchart
Syntax
showgeolocationchart ($title="", $marker_value, $lat_value, $lng_value, $link_value, $data_array, $width="100%", $height="100%", $id="hcmsGeolocationChart", $suffix="", $loadAPI=true)
Input parameters
$title ... chart title [string]
$marker_value ... array key name holding the value for the marker title [string]
$lat_value ... array key name holding the value for the latitude of the marker [string]
$lng_value ... array key name holding the value for the longitude of the marker [string]
$link_value ... array key name holding the value for the marker link [string]
$data_array ... assoz. data array [array]
$width ... chart width [string] (optional)
$height ... chart height [string] (optional)
$id ... ID of chart [string] (optional)
$suffix ... function name suffix [string] (optional)
$loadAPI ... load Google Maps API [true, false] (optional)
global input parameters
$mgmt_config
$hcms_lang
$lang
Output
Google Chart code / false
Description
This function creates the Google Maps Code for a geolocation chart. The Google Maps API need to be loaded first!
▲ ProjectAPI Functions
createproject
Syntax
createproject ($subproject_id=0, $object_id="", $user, $projectname, $description="")
Input parameters
$subproject_id ... ID of main project (only if the project is a subproject) [integer]
$object_id ... object ID or path to object [string] (optional)
$user ... user name of sub/project owner [string]
$projectname ... project name [string]
$description ... project description [string] (optional)
global input parameters
$mgmt_config
$hcms_lang_codepage
$hcms_lang
$lang
Output
result array
Description
This function creates a new project.
editproject
Syntax
editproject ($project_id, $subproject_id=0, $object_id="", $user="", $projectname="", $description="")
Input parameters
$project_id ... project ID [integer]
$subproject_id ... ID of main project (only if project is a subproject) [integer]
$object_id ... object ID or path to object [string] (optional)
$user ... user name of sub/project owner [string] (optional)
$projectname ... project name [string] (optional)
$description ... project description [string] (optional)
global input parameters
$mgmt_config
$hcms_lang_codepage
$hcms_lang
$lang
Output
result array
Description
This function saves data of an exitsing project
deleteproject
Syntax
deleteproject ($project_id)
Input parameters
$project_id ... project ID or array of project IDs to be deleted [string or array]
global input parameters
$mgmt_config
$hcms_lang
$lang
Output
result array
Description
This function removes projects.
getprojectstructure
Syntax
getprojectstructure ($project_id)
Input parameters
$project_id ... project ID [integer]
global input parameters
$mgmt_config
Output
assoziative result array / false
Description
This function creates an assoziatve array presenting the project structure (project -> subprojects -> tasks)
showprojectrecord
Syntax
showprojectrecord ($project_record, $masterproject_id)
Input parameters
$project_record ... project record as array (project/subproject/task) [array]
$masterproject_id ... ID of master project [integer]
global input parameters
$mgmt_config
$hcms_lang
$lang
$siteaccess
$user_array
Output
html presentation of the record / false
Description
This function creates a table row for the projects presentation
showganttchart
Syntax
showganttchart ($title="", $task_title, $task_value, $resource_title="", $resource_value="", $start_title, $start_value, $end_title="", $end_value="", $status_title="", $status_value="", $data_array, $width="100%", $height="100%", $id="hcmsTimelineChart", $suffix="", $loadAPI=true)
Input parameters
$title ... chart title [string]
$task_title ... task title [string]
$task_value ... task array key name holding the values [array]
$resource_title ... resouce title [string] (optional)
$resource_value ... resource array key name holding the values [string] (optional)
$start_title ... task start date title [string]
$start_value ... task start date array key name holding the values [string]
$end_title ... task finish date title [string]
$end_value ... task finish date array key name holding the values [string]
$status_title ... work status title [string] (optional)
$status_value ... work status array key name holding the values [string] (optional)
$data_array ... assoz. data array [array]
$width ... chart width [string] (optional)
$height ... chart height [string] (optional)
$id ... ID of chart [string] (optional)
$suffix ... function name suffix [string] (optional)
$loadAPI ... load Google Chart API [true, false] (optional)
global input parameters
$mgmt_config
$hcms_lang
$lang
Output
Google Chart code / false
Description
This function creates the Google Chart Code for a Gantt chart. The Google Chart API need to be loaded first!
▲ Task API Functions
createtask
Syntax
createtask ($site="", $from_user, $from_email="", $to_user, $to_email="", $startdate="", $finishdate="", $category="", $object_id="", $taskname, $message="", $sendmail=true, $priority="low", $project_id=0, $planned="")
Input parameters
$site ... publication name [string] (optional)
$from_user ... from_user name [string]
$from_email ... from_email [email-address] (optional)
$to_user ... to_user name [string]
$to_email ... to_email [email-address] (optional)
$startdate ... start date [yyyy-mm-dd] (optional)
$finishdate ... finish date [yyyy-mm-dd] (optional)
$category ... category [link, user, workflow] (optional)
$object_id ... object ID or object path [string]
$taskname ... task name [string]
$message ... message [string] (optional)
$sendmail ... sendmail [true, false]
$priority ... priority [high, medium, low] (optional)
$project_id ... project/subproject ID if the task should be assigned to a project [integer] (optional)
$planned ... planned effort in taskunit [integer] (optional)
global input parameters
$mgmt_config
$hcms_lang_codepage
$hcms_lang
$lang
Output
result array
Description
Creates a new user task and send optional e-mail to user.
Since verion 5.8.4 the data will be stored in RDBMS instead of XML files.
edittask
Syntax
edittask ($task_id, $object_id="", $to_user="", $startdate="", $finishdate="", $taskname="", $message="", $sendmail=true, $priority="", $status="", $planned="", $actual="", $project_id=0)
Input parameters
$task_id ... task ID [integer]
$object_id ... object ID pr path to object [string] (optional)
$to_user ... to_user name [string] (optional)
$startdate ... start date [yyyy-mm-dd] (optional)
$finishdate ... finish date [yyyy-mm-dd] (optional)
$taskname ... name of task [string] (optional)
$message ... task message/description [string] (optional)
$sendmail ... sendmail [true/false]
$priority ... priority [high, medium, low] (optional)
$status ... status in percent [0-100] (optional)
$planned ... planned effort in taskunit [integer] (optional)
$actual ... actual effort in taskunit [integer] (optional)
$project_id ... project/subproject ID the task belongs to [integer] (optional)
global input parameters
$mgmt_config
$hcms_lang_codepage
$hcms_lang
$lang
Output
result array
Description
Saves data of a user task and send optional e-mail to user.
Since verion 5.8.4 the data will be stored in RDBMS instead of XML files.
deletetask
Syntax
deletetask ($task_id)
Input parameters
$task_id ... task ID or array of task IDs to be deleted [integer]
global input parameters
$mgmt_config
$hcms_lang
$lang
Output
true/false
Description
Deletes user tasks.
tasknotification
Syntax
tasknotification ($date)
Input parameters
$date ... date [yyyy-mm-dd]
global input parameters
$mgmt_config
$hcms_lang_codepage
$hcms_lang
$lang
Output
true/false
Description
Sends e-mail notifications to users if a task starts or ends on the given date.
▲ Workflow API Functions
deleteworkflow
Syntax
deleteworkflow ($site, $wf_name, $cat)
Input parameters
$site ... publication name [string]
$wf_name ... worfklow name [string]
$cat ... category [man, script]
global input parameters
$user
$eventsystem
$mgmt_config
$hcms_lang
$lang
Output
result array
Description
This function deletes a workflow.
buildworkflow
Syntax
buildworkflow ($workflow_data)
Input parameters
$workflow_data ... workflow [XML]
Output
workflow items as array
workflowaccept
Syntax
workflowaccept ($site, $location, $object, $workflow, $item_id, $user, $message, $sendmail=true, $priority="medium")
Input parameters
$site ... publication name [string]
$location ... location name [string]
$object ... object name [string]
$workflow ... workflow [XML-string]
$item_id ... item id [string]
$user ... user name [string]
$message ... task message [string]
$sendmail ... sendmail [true, false]
$priority ... priority [high, medium, low]
global input parameters
$mgmt_config
$hcms_lang_codepage
$hcms_lang
$lang
Output
workflow [XML-string]/false
acceptobject
Syntax
acceptobject ($site, $location, $object, $item_id, $user, $message, $sendmail, $priority="medium")
Input parameters
$site ... publication name [string]
$location ... location name [string]
$object ... object name [string]
$item_id ... workflow item id [string]
$user ... user name [string]
$message ... task message [string]
$sendmail ... sendmail [true, false]
$priority ... priority [high, medium, low]
global input parameters
$mgmt_config
$contentfile
$hcms_lang_codepage
$hcms_lang
$lang
Output
array/false
workflowreject
Syntax
workflowreject ($site, $location, $object, $workflow, $item_id, $user, $message, $sendmail, $priority="medium")
Input parameters
$site ... publication name [string]
$location ... location name [string]
$object ... object name [string]
$workflow ... workflow [XML-string]
$item_id ... workflow item id [string]
$user ... user name [string]
$message ... task message [string]
$sendmail ... send mail [true, false]
$priority ... priority [high, medium, low]
global input parameters
$mgmt_config
$hcms_lang
$lang
Output
workflow [XML-string]/false
rejectobject
Syntax
rejectobject ($site, $location, $object, $item_id, $user, $message, $sendmail, $priority="medium")
Input parameters
$site ... publication name [string]
$location ... location name [string]
$object ... object name [string]
$item_id ... workflow item id [string]
$user ... user name [string]
$message ... task message [string]
$sendmail ... send mail [true, false]
$priority ... priority [high, medium, low]
global input parameters
$mgmt_config
$contentfile
$hcms_lang
$lang
Output
array/false
▲ Cloud Storage API Functions
loadcloudobject
Syntax
loadcloudobject ($site, $location, $file, $user="", $save=true, $directoutput=false)
Input parameters
$site ... publication name [string]
$location ... media file location [string]
$file ... media file name [string]
$user ... user name [string] (optional)
$save ... save file in local media repository or return content as result [true, false] (optional)
$directoutput ... direct output of the streamed content [true, false] (optional)
global input parameters
$mgmt_config
Output
data / false on error
Description
This functions load/streams an object/file from the cloud storage and saves it the local media repository on request
savecloudobject
Syntax
savecloudobject ($site, $location, $file, $user="")
Input parameters
$site ... publication name [string]
$location ... media file location [string]
$file ... media file name [string]
$user ... user name [string] (optional)
global input parameters
$mgmt_config
Output
true / false on error
Description
This function saves an object/file in the cloud storage if no daily cloud snyc has been defined, see main configuration setting $mgmt_config['storage_dailycloudsnyc']
copycloudobject
Syntax
copycloudobject ($site, $location, $file_old, $file_new, $user="")
Input parameters
$site ... publication name [string]
$location ... media file location [string]
$file_old ... source media file name [string]
$file_new ... destination media file name [string]
$user ... user name [string] (optional)
global input parameters
$mgmt_config
Output
true / false on error
Description
This functions renames an object/file in the cloud storage
renamecloudobject
Syntax
renamecloudobject ($site, $location, $file_old, $file_new, $user="")
Input parameters
$site ... publication name [string]
$location ... media file location [string]
$file_old ... old media file name [string]
$file_new ... new media file name [string]
$user ... user name [string] (optional)
global input parameters
$mgmt_config
Output
true / false on error
Description
This functions renames an object/file in the cloud storage
deletecloudobject
Syntax
deletecloudobject ($site, $location, $file, $user="")
Input parameters
$site ... publication name [string]
$location ... media file location [string]
$file ... media file name [string]
$user ... user name [string] (optional)
global input parameters
$mgmt_config
Output
true / false on error
Description
This function deletes an object/file and its data from the cloud storage
synccloudobjects
Syntax
synccloudobjects ($user="")
Input parameters
$user ... user name [string] (optional)
global input parameters
$mgmt_config
Output
true / false on error
Description
This function snychronizes all local objects/files with the cloud storage.
See also main configuration settings $mgmt_config['storage_dailycloudsnyc'] and $mgmt_config['storage_type'].
GCanalyzevideo
Syntax
GCanalyzevideo ($path)
Input parameters
$path ... path or URI to a video file [string]
global input parameters
$mgmt_config
Output
result array / false on error
Description
Analyzes a video and finds labels, based on Google Video Intelligence.
GCanalyzeimage
Syntax
GCanalyzeimage ($path)
Input parameters
$path ... path or URI to a video file [string]
global input parameters
$mgmt_config
Output
result array / false on error
Description
Analyzes an image and finds labels, based on Google Vision.
GCspeech2text
Syntax
GCspeech2text ($site, $path, $langcode="en-US")
Input parameters
$site ... publication name [string]
$path ... path or URI to a video file [string]
$langcode ... language code [string] (optional)
global input parameters
$mgmt_config
$mgmt_imagepreview
$mgmt_mediapreview
$mgmt_mediaoptions
$mgmt_imageoptions
$mgmt_maxsizepreview
$mgmt_mediametadata
$mgmt_compress
$hcms_ext
Output
result array / false on error
Description
Analyzes a video or audio and extracts the text from the audio stream, based on Google Cloud Speech.
Google Speech supports the following language codes:
af-ZA, am-ET, hy-AM, az-AZ, id-ID, ms-MY, bn-BD, bn-IN, ca-ES, cs-CZ, da-DK, de-DE, en-AU, en-CA, en-GH, en-GB, en-IN, en-IE, en-KE, en-NZ, en-NG, en-PH, en-ZA, en-TZ, en-US,
es-AR, es-BO, es-CL, es-CO, es-CR, es-EC, es-SV, es-ES, es-US, es-GT, es-HN, es-MX, es-NI, es-PA, es-PY, es-PE, es-PR, es-DO, es-UY, es-VE, eu-ES, fil-PH, fr-CA, fr-FR, gl-ES, ka-GE, gu-IN,
hr-HR, zu-ZA, is-IS, it-IT, jv-ID, kn-IN, km-KH, lo-LA, lv-LV, lt-LT, hu-HU, ml-IN, mr-IN, nl-NL, ne-NP, nb-NO, pl-PL, pt-BR, pt-PT, ro-RO, si-LK, sk-SK, sl-SI, su-ID, sw-TZ, sw-KE, fi-FI, sv-SE,
ta-IN, ta-SG, ta-LK, ta-MY, te-IN, vi-VN, tr-TR, ur-PK, ur-IN, el-GR, bg-BG, ru-RU, sr-RS, uk-UA, he-IL, ar-IL,
ar-JO, ar-AE, ar-BH, ar-DZ, ar-SA, ar-IQ, ar-KW, ar-MA, ar-TN, ar-OM, ar-PS, ar-QA, ar-LB, ar-EG, fa-IR, hi-IN, th-TH, ko-KR, cmn-Hant-TW, yue-Hant-HK, ja-JP, cmn-Hans-HK, cmn-Hans-CN
▲ Import/Export API Functions
exportobjects
Syntax
exportobjects ()
Input parameters
global input parameters
$mgmt_config
Output
true / false
Description
Executes the export job.
importobjects
Syntax
importobjects ()
Input parameters
global input parameters
$mgmt_config
Output
true / false
Description
Executes the import job.
importmediafiles
Syntax
importmediafiles ($importdir, $location, $createfolders=false, $leavefiles=false, $deletefiles=false, $report=true, $user="sys")
Input parameters
$importdir ...
$location
$createfolders
$leavefiles
$deletefiles
$report
$user
global input parameters
$mgmt_config
Output
true/false
Description
This function imports all directories and files from import directory to location.
importxmlfiles
Syntax
importxmlfiles ($importdir, $createfolders=false, $ignoremissinglinks=false, $leavefiles=false, $deletefiles=false, $report=true, $user="sys")
Input parameters
$importdir ... path of the import directory [string]
$createfolders ... create folder [true, false] (optional)
$ignoremissinglinks ... ignore or keep links to missing objects [true, false] (optional)
$leavefiles ... leave the files in the import directory and create symbolic link to the file [true, false] (optional)
$deletefiles ... delete files after successful import [true, false] (optional)
$report ... print report [true, false] (optional)
$user ... user name [string] (optional)
global input parameters
$mgmt_config
Output
true / false
Description
Import of content and media files based on the XML import schema.
calculatedate
Syntax
calculatedate ($days)
Input parameters
$days ... number of days [integer]
Output
date based on number of days in the past from today
exportxmlfiles
Syntax
exportxmlfiles ($location, $object="", $exportdir, $recursive=false, $preserve=false, $symlink=false, $delete=false, $createdays=0, $editdays=0, $accessdays=0, $filesize=0, $contentrules="", $report=true, $user="sys")
Input parameters
$location ... location [string]
$object ... object name [string] (optional)
$exportdir ... path of the export directory or FTP server path [string]
$recursive ... export all items in subfolders recursively [true, false] (optional)
$preserve ... preserve container ID [true, false] (optional)
$symlink ... export only the media files and use a symbolic link to the file [true, false] (optional)
$delete ... delete files after successful export [true, false] (optional)
$createdays ... age in days after creation of the object [integer] (optional)
$editdays ... age in days after last modification of the object [integer] (optional)
$accessdays ... age in days after last access of the object [integer] (optional)
$filesize ... minimum file size of the asset in MB [integer] (optional)
$contentrules ... content rules/conditions for text content based on SQL Syntax [string]
$report ... print report [true, false] (optional)
$user ... user name [string] (optional)
global input parameters
$mgmt_config
Output
true / false
Description
Export of content and media files based on the XMLexport schema.