API Documentation

API Documentation / Wiki

The following pages provide an overview about all functions of the API (Application Programming Interface) of the hyper Content & Digital Asset Management Server.
Please note, that you might usually only require few functions for the development of Plugins, template functions like navigation, sitemap and so on. Please read the Template Designers Guide and Programers Guide for a better insight.
The API is primarily used for the realization of standalone applications that leverage the capabilities of the hyper Content & Digital Asset Management Server. The API is not to be confused with the OpenAPI, which is based on a SOA (Service Oriented Architecture), and is not part of the Free Edition.

 

hyperCMS API Function Reference

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

Main API Functions

correctnumber


Syntax
correctnumber ($number)

Input parameters
$number ... formated number

global input parameters
$mgmt_config

Output
correct mathematical number / false on error

cleancontent


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

Input parameters
$text ... text as string or array
$charset ... character set (optional)

global input parameters
$mgmt_config

Output
cleaned text / false on error

remove_utf8_bom


Syntax
remove_utf8_bom ($text)

Input parameters
$text ... text as 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 as string or array
$charset_from ... input character set (optional)
$charset_to ... output character set (optional)

global input parameters
$mgmt_config

Output
converted expression / original expression on error

specialchr


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

Input parameters
$expression ... expression
$accept ... list of characters to be excluded from search (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
$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

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

object_exists


Syntax
object_exists ($path)

Input parameters
$path ... path to an object

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

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

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

Output
array with string splitted into array / false on error

is_emptyfolder


Syntax
is_emptyfolder ($dir)

Input parameters
$dir ... path to folder

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
$file ... file name or file extension

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 (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

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 as string
$format ... date format (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

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

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

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

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

global input parameters
$mgmt_config
$hcms_ext

Output
true / false

Description
This function determines if a certain file is a video

is_audio


Syntax
is_audio ($file)

Input parameters
$file ... file name or file extension

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

copyrecursive


Syntax
copyrecursive ($src, $dst)

Input parameters
$src ... source directory
$dst ... destination directory

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

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
$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

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
$filename ... file or directory name
$user ... user name

global input parameters
$mgmt_config
$hcms_lang
$lang

Output
correct filename/false

correctpath


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

Input parameters
$path ... path to folder
$slash ... directory seperator (optional)

Output
correct path/false

convertpath


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

Input parameters
$site ... publication
$path ... content management path to folder or object
$cat ... object category ['page

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
$path ... publication management path to folder or object
$cat ... object category ['page

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
$type ... convert to file system path or URL [file
$specialchr_transform ... url] (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
$type ... convert to file system path or URL [file

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.

createviewlink


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

Input parameters
$site ... publication
$mediafile ... media file name
$name ... media name (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
$location ... location (optional)
$object ... object (optional)
$cat ... category [page, comp] (optional)
$object_id ... object-ID (optional)
$login ... user login
$type ... link type [al, dl] (optional)
$lifetime ... token lifetime in seconds (optional)
$formats ... formats (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 (optional)
$location ... location (optional)
$object ... object (optional)
$cat ... category [page, comp] (optional)
$object_id ... object ID (optional)
$container_id ... container-ID (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 (optional)
$location ... location (optional)
$object ... object (optional)
$cat ... category [page, comp] (optional)
$object_id ... object ID (optional)
$container_id ... container-ID (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 (optional)
$location ... location (optional)
$object ... object (optional)
$cat ... category [page, comp] (optional)
$object_id ... object ID (optional)
$container_id ... container-ID (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
$multiobject ... multiobject string (optional)
$media ... media file name (optional)
$location ... location (optional)
$name ... presentation name (optional)
$user ... user name
$type ... conversion type (format
$mediacfg ... e.g: jpg)
$linktype ... media configuration used for conversion (e.g.: 1024x768px)

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

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
$file ... media file name or container name
$user ... user name (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
$location ... location
$page ... object name
$container_version ... container version name
$user ... user name (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
$container_version ... location
$user ... object name

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 (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
$filename ... file name

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
$filename ... file name

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
$filename ... file name

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
$abs_path ... path to file
$filename ... file name
$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
$filename ... file name
$filedata ... file content

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
$abs_path ... path to file
$filename ... file name
$filedata ... file content

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
$filename ... file name
$filedata ... file content

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
$abs_path ... path to file
$filename ... file name

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
$abs_path ... path to file
$filename ... file name

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
$filename ... file or directory name
$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
$mediafile ... media file name

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
$medialocation ... media file location
$mediafile ... media file name
$user ... user name (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
$mediafile ... mediafile name
$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 (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
$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
$object ... object name
$container ... content container
$lang ... language (optional)
$user ... user name (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
$force ... force file wrapper or download or no file headers for WebDAV [download, wrapper, noheader]
$user ... user name (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)
$type ... optional container type [published
$user ... work

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)
$type ... optional container type [published, work, version]
$data ... container content
$user ... user
$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 ... nothing

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
$settings ... settings array
$user ... user name

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
$content ... content as string
$user ... user name

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
$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
$user ... user name

global input parameters
$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
$setting ... publication settings array
$user ... user name

global input parameters
$eventsystem
$mgmt_config
$hcms_lang
$lang

Output
result array

Description
This function saves the settings of a publication

editpublicationsetting


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

Input parameters
$site_name ... publication name
$setting ... publication settings name (see publication config file for details)
$value ... value
$user ... user name

global input parameters
$eventsystem
$mgmt_config
$hcms_lang
$lang

Output
true/false

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
$user ... user name

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
$pers_name ... personalization profile or tracking name
$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
$pers_name ... personalization profile or tracking name
$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
$template ... template name
$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
$template ... template file name

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
$template ... template file name
$cat ... category [page, comp, meta, inc]
$user ... template content (optional)
$content ... template extension (optional)
$extension ... temlate application (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
$template ... template file name
$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 (optional)
$login ... login name
$password ... password
$confirm_password ... confirmed password
$user ... user name

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

Output
array

Description
This function creates a new user

edituser


Syntax
edituser ($site, $login, $old_password="", $password="", $confirm_password="", $superadmin="0", $realname="", $language="en", $theme="", $email="", $signature="", $usergroup="", $usersite="", $user="sys")

Input parameters
$site ... publication name
$login ... login name
$old_password ... new login name
$password ... password
$confirm_password ... confirmed password
$superadmin ... super administrator [0, 1]
$realname ... real name
$language ... language setting [de, en]
$theme ... theme name (optional)
$email ... email
$signature ... usergroup string [group1|group2]
$usergroup ... member of site(s) string [site1|site2]]
$usersite ... user name
$user

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

Output
array

Description
This function edits a user

deleteuser


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

Input parameters
$site ... publication where the user should be removed [*Null*] for all publications
$login ... login name
$user ... user name

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 anem
$group_name ... group name
$user ... user name

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
$group_name ... group name
$pageaccess ... page folder access array
$compaccess ... component folder access array
$permission ... permissions array
$user ... user name

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
$group_name ... group name
$user ... user name

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
$cat ... cat[page, comp]
$folder_curr ... old location
$folder_new ... new location
$user ... user

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
$cat ... cat[page, comp]
$folderpath ... path to the folder
$user ... user

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
$cat ... cat[page, comp]
$folder_curr ... old location
$folder_new ... new location
$user ... user

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
$cat ... cat[page, comp]
$folderpath ... location of folder
$user ... user

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
$mediacat_name ... media category name

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
$mediacat_name_curr ... old media category name
$mediacat_name ... new media category name

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
$mediacat_name ... media category name

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
$mediacat_name ... media category name
$global_files ... PHP FILES 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
$mediafile ... media file name

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
$location ... location
$foldernew ... folder name
$user ... user name

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
$location ... location
$foldernew ... folder name
$user ... user name

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
$location ... location
$folder ... folder name

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
$location ... location (source)
$locationnew ... new location (destination)
$folder ... folder name
$user ... user name

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 for pasteobject function.

deletefolder


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

Input parameters
$site ... publication name
$location ... location
$folder ... folder name
$user ... user name

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
$location ... location
$folder ... folder name
$foldernew ... new folder name
$user ... user name

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

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
$location ... location
$page ... object
$template ... template
$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=0, $createthumbnail=0, $imageresize="", $imagepercentage="", $user="sys", $checkduplicates=true, $versioning=false)

Input parameters
$site ... publication name
$location ... destination location
$cat ... category [page/comp]
$global_files ... uploaded file (array as defined by PHP autoglobale $_FILES)
$page ... unzip [1/0]
$unzip ... object name (only for media file update of existing object)
$createthumbnail ... create only a new thumbnail [1/0]
$imageresize ... imageresize [percentage
$imagepercentage ... null]
$user ... imagepercentage (%-value as integer)
$checkduplicates ... user name
$versioning ... check for duplicates [true, false]

global input parameters
$mgmt_config
$mgmt_uncompress
$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, 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)

Input parameters
$site ... publication name
$location ... destination location
$file ... file name
$path_source_file ... path to source multimedia file (uploaded file in temp directory)
$user ... user name
$imagepercentage ... resize original image (100%) by percentage (optional)

global input parameters
$mgmt_config
$mgmt_imageoptions
$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

createmediaobjects


Syntax
createmediaobjects ($site, $location_source, $location_destination, $user)

Input parameters
$site ... publication name
$location_source ... source location
$location_destination ... destination location
$user ... user name

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
$location ... locationr
$page ... object name
$format ... format (file extension w/o dot) (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
$location ... location
$page ... object name
$pagenew ... new object name (exkl. extension except for action "file_rename")
$user ... user
$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
$location ... location
$page ... object
$user ... user name

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
$location ... location
$page ... object
$user ... user name

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
$location ... location
$page ... object
$user ... user name

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
$location ... location
$page ... object
$pagenew ... new object name exkl. file extension
$user ... user

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
$location ... location
$page ... object
$pagenew ... new object including file extension
$user ... user name

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[string]
$user ... user[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 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[string]
$user ... user[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[string]
$user ... user[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[string]
$clipboard_array ... clipboard entries as 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
$location ... location
$page ... object
$user ... user

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
$location ... location
$page ... object
$user ... user

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
$location ... location
$page ... object (full name incl. extension)
$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
$location ... location
$page ... object
$user ... user name

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
$location ... location
$page ... object
$user

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

Output
array

Description
This function unpublishes a page or component 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
$location ... location
$file ... object name
$published_only ... only published objects [pub, all]
$user ... user name

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. 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
$site ... publication name
$cat ... category [page, comp]
$location ... location
$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.

remoteclient


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

Input parameters
$action ... action [save
$root ... copy
$site ... delete
$location ... rename
$locationnew ... get]
$page ... root [abs_path_link
$pagenew ... abs_path_media

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[array] (raw data)
$contenttype ... content-type [application/x-www-form-urlencoded
$charset ... multipart/form-data]
$referrer ... character set [string]

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[array] (raw data) (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 ... name of log file without extension (optional)
$logfile ... 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 ... logname (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

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
$location ... location
$object ... object name
$event ... event name [oncreate, onedit, onmove, ondelete]
$user_from ... user name

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
$cat ... category [page, comp]
$folderpath ... folder path
$text_id ... text ID for text field
$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.

html_diff


Syntax
html_diff ($old, $new)

Input parameters
$old ... old text
$new ... new text

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 (optional)
$location ... location (optional)
$page ... object name (optional)
$id ... identifier (object ID
$user ... object hash) (optional)

global input parameters
$mgmt_config

Output
true / false

deletefavorite


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

Input parameters
$site ... publication name (optional)
$location ... location (optional)
$page ... object name (optional)
$id ... identifier (object ID
$user ... object hash) (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
$text_id ... text ID array (text-ID as key and URL paramaters as value)
$uri ... requested URI as string
$exclude_dir_esc ... exclude path as 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
$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!

sendmessage


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

Input parameters
$from_user ... from_user name
$to_user ... to_user name
$title ... title
$message ... message
$object_id ... object ID or object path (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 ()

Input parameters

Output
Returns the average system load (the number of processes in the system run queue) over the last minute and the number of CPU cores as array

getconfigvalue


Syntax
getconfigvalue ($config, $in_key="")

Input parameters
$config ... settings array
$in_key ... value/substring in array key (optional)

Output
value of setting

Description
Help function for createinstance

getsession


Syntax
getsession ($variable, $default="")

Input parameters
$variable ... session variable name
$default ... default session value (optional)

Output
session value

getrequest


Syntax
getrequest ($variable, $force_type=false, $default="")

Input parameters
$variable ... request variable name
$force_type ... must be of certain type [numeric, array, publicationname, locationname, objectname, url, bool] (optional)
$default ... default value (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
$force_type ... must be of certain type [numeric, array, publicationname, locationname, objectname] (optional)
$default ... default value (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
$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 (optional)

global input parameters
$mgmt_config

Output
language file name

getcodepage


Syntax
getcodepage ($lang="en")

Input parameters
$lang ... language code (optional)

global input parameters
$mgmt_config
$hcms_lang_codepage

Output
code page (character set)

getcalendarlang


Syntax
getcalendarlang ($lang="en")

Input parameters
$lang ... language code (optional)

global input parameters
$mgmt_config

Output
supported language code for calendar

getescapedtext


Syntax
getescapedtext ($text, $charset="", $lang="")

Input parameters
$text ... word as string
$charset ... 2-digit language code (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 (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
$lang ... language code (optional)
$tax_id ... taxonomy parent ID (optional)

global input parameters
$mgmt_config
$mgmt_lang_shortcut_default
$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 (optional)
$lang ... language code (optional)
$expression ... taxonomy ID or expression or taxonomy path in the form %taxonomy%/publication-name or 'default'/language-code/taxonomy-ID/taxonomy-child-levels as string
$childlevels ... taxonomy child levels as integer (optional)
$id_only ... only return taxonomy IDs without language and keyword information [true, false] (optional)

global input parameters
$mgmt_config
$mgmt_lang_shortcut_default
$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
$selectname ... hierarchy name (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

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 (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 as string
$language ... language to be used for stop word list [de, en, ...] (optional)
$charset ... character set (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 as 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 anme
$dir ... directory path
$url ... URL to directory
$getpara ... GET parameters to use for new versions of the URL as array (optional)
$permalink ... permanent links text-ID to use for location as array (optional)
$chfreq ... frequency of google scrawler [never, weekly, daily] (optional)
$prio ... priority [1 or less] (optional)
$ignore ... ignore file names as array (optional)
$filetypes ... allowed file types as 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 of file attribute of list of 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="\n", $template="")

Input parameters
$location ... location
$object ... object (both optional if container is given)
$container ... container name/ID or container content (optional)
$seperator ... seperator of meta data fields [any string, array] (optional)
$template ... publication name/template name to extract label names (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 as array
$user ... user name

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
$text_id_array ... array of text IDs

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)

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

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
$type ... container type [published

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 ()

Input parameters

global input parameters
$mgmt_config

Output
URL of wallpaper image / false

Description
Provides a wallpaper image used for the logon screen.

getcontainername


Syntax
getcontainername ($container)

Input parameters
$container ... container name (e.g. 0000112.xml.wrk) or container ID

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
$location ... location path (as absolute path or converted path)
$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 (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 (optional)
$location ... location path

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

Output
publication name

Description
Extract the publication name of a location path

getlocation


Syntax
getlocation ($path)

Input parameters
$path ... location path

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

Output
object or folder name

Description
Extract the object or folder of a location path

getmediacontainername


Syntax
getmediacontainername ($file)

Input parameters
$file ... file name

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

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 |

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 |

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

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
$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
$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
$template ... template name

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 (optional)
$file ... file name incl. extension
$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 file is published = true else = false
$result['deleted']: if file is deleted = true else = false

getobjectinfo


Syntax
getobjectinfo ($site, $location, $object, $user="sys", $container_version="")

Input parameters
$site ... publication name
$location ... location
$object ... object name
$user ... user name (optional)
$container_version ... container version (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

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

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

global input parameters
$mgmt_config
$hcms_ext

Output
file type to be saved in database based on file extension

getpdfinfo


Syntax
getpdfinfo ($filepath, $box="MediaBox")

Input parameters
$filepath ... path to PDF file
$box ... box attribute [BleedBox, CropBox, MediaBox] (optional)

global input parameters
$mgmt_config
$mgmt_imagepreview
$user

Output
result array with width and height as keys / 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

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
$type ... type [url_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)

Input parameters
$site ... publication name
$file ... multimedia file name (including hcm-ID)
$type ... type [url_path_media

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.

getlockedfileinfo


Syntax
getlockedfileinfo ($location, $file)

Input parameters
$location ... location to file
$file ... file name

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")

Input parameters
$user ... user name
$output ... output [path, id] (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

global input parameters
$mgmt_config

Output
selected home box names of user as array / false

getusersonline


Syntax
getusersonline ()

Input parameters

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
$tagname ... hyperCMS tag name in page or component

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

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
$tag ... full hyperCMS tag (or other identifier)

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
$tag ... full hyperCMS tag or other identifier in html tag

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
$attribute ... attribute name
$secure ... secure attribute value reg. XSS (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
$option ... option name

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
$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

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

Output
element id/false on error

Description
Extract the element ID from the tag ID

getfirstkey


Syntax
getfirstkey ($array)

Input parameters
$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
$pattern ... pattern as 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 name [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 or array
$content ... value as string or array (optional)
$write ... write session data for load balancer [true, false] (optional)

Output
true / false on error

settaxonomy


Syntax
settaxonomy ($site, $container_id, $langcode="")

Input parameters
$site ... publication name
$container_id ... container ID
$langcode ... 2-digit language code (optional)

global input parameters
$mgmt_config
$taxonomy

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).
Global variable $taxonomy can be used to pass the taxonomy as array.

setarticle


Syntax
setarticle ($site, $contentdata, $contentfile, $arttitle, $artstatus, $artdatefrom, $artdateto, $artuser, $user)

Input parameters
$site ... publication name
$contentdata ... container (XML)
$contentfile ... container name
$arttitle ... article title array
$artstatus ... article status array
$artdatefrom ... article beginn date array
$artdateto ... article end date array
$artuser ... user array or string
$user ... user name

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, $type, $art, $textuser, $user, $charset="", $addmicrotime=false)

Input parameters
$site ... publication name
$contentdata ... container (XML)
$contentfile ... container name
$text ... text array
$type ... type array or string [u, f, l, c, d, k]
$art ... article array or string [yes, no]
$textuser ... text user array or string
$user ... user name
$charset ... character set of text content
$addmicrotime ... add microtime to ID [true, false] used for comments

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, $mediaobject_curr, $mediaobject, $mediaalttext, $mediaalign, $mediawidth, $mediaheight, $art, $mediauser, $user, $charset="")

Input parameters
$site ... publication name
$contentdata ... container (XML)
$contentfile ... container name
$mediafile ... media arrays (some are optional)
$mediaobject_curr ... article array or string [yes, no]
$mediaobject ... content user array or string
$mediaalttext ... user name
$mediaalign ... chracter set of text content
$mediawidth
$mediaheight
$art
$mediauser
$user
$charset

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, $linkhref, $linktarget, $linktext, $art, $linkuser, $user, $charset="")

Input parameters
$site ... publication name
$contentdata ... container (XML)
$contentfile ... container name
$linkhref_curr ... current link array
$linkhref ... new link array
$linktarget ... link target array
$linktext ... link text array
$art ... article array or string [yes, no]
$linkuser ... content user array or string
$user ... user name
$charset ... chracter set of text content

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, $component, $condition, $art, $compuser, $user)

Input parameters
$site ... publication name
$contentdata ... container (XML)
$contentfile ... container name
$component_curr ... component arrays (some are optional)
$component ... article array or string [yes, no]
$condition ... content user array or string
$art ... user name
$compuser
$user

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, $user, $charset="")

Input parameters
$site ... publication name
$contentdata ... container (XML)
$contentfile ... container name
$headcontent ... content array
$user ... user name
$charset ... chracter set of text content

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
$tagname ... hyperCMS tag name in page or component [content
$value ... template

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 as array or string
$user ... user name

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
$user ... user name
$passwd ... password
$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

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
$remote_file ... path to file on FTP server
$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
$local_file ... path to local file
$remote_file ... path to file on FTP server
$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_filelist


Syntax
ftp_filelist ($conn_id, $path=".", $passive=true)

Input parameters
$conn_id ... FTP connection
$path ... path to remote directory (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
$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
$url ... message to share
$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
$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
$url ... title
$title ... summary (optional)
$summary ... source (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
$image_url ... title
$title ... description (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
$site_admin ... publication admin
$permission_str ... permission string from group

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
$permission_str ... permission string from group

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
$permission_str ... permission string from group

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
$location ... location (path to folder)
$cat ... object category ['page

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)
$location ... object category ['page
$cat ... comp']

global input parameters
$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
$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
$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

global input parameters
$rootpermission

Output
true/false

Description
Checks root permission

checkglobalpermission


Syntax
checkglobalpermission ($site, $name)

Input parameters
$site ... publication name
$name ... permission name

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
$group ... user group name
$name ... permission name

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 ... username
$passwd ... password
$hash ... hash code of user
$objref ... object reference for hcms linking (object ID)
$objcode ... object code for hcms linking (crypted object ID)
$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 ... instance name
$load_config ... load main config of instance [true/false] (optional)

global input parameters
$mgmt_config

Output
true/false

createchecksum


Syntax
createchecksum ($permissions="")

Input parameters
$permissions ... array or empty

Output
MD5 checksum

Description
Creates the checksum of the user permissions

writesession


Syntax
writesession ($user, $passwd, $checksum)

Input parameters
$user ... user name
$passwd ... password
$checksum ... checksum

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 (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 ... user count (optional)
$site ... publication names (use | as seperator) (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 a 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
$user ... user logon name (optional)

global input parameters
$mgmt_config

Output
true / false on error

checkuserip


Syntax
checkuserip ($client_ip, $user="", $timeout="")

Input parameters
$client_ip ... client IP address
$user ... user logon name (optional)
$timeout ... timeout in minutes (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 (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 (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

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)

Output
true / false

Description
Checks if a publication name includes forbidden characters in order to prevent directory browsing

html_encode


Syntax
html_encode ($expression, $encoding="", $js_protection=false)

Input parameters
$expression ... variable as string or array
$encoding ... conversion of all special characters based on given character set or to ASCII (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 as string or array
$encoding ... conversion of all special characters based on character set (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 as 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 as string
$identifier_start ... identifier of script begin
$identifier_end ... and end

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=3, $application="PHP")

Input parameters
$content ... content as string
$type ... cleaning level type from none = 0 to strong = 3 (no cleaning = 0
$application ... basic set of disabled functions = 1

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 as 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 as 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 as 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)

Input parameters
$variable ... variable as string or array

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
$start ... start position
$length ... length for string extraction

global input parameters
$mgmt_config

Output
encoded string / false on error

Description
Unidrectional encryption using crypt, MD5 and urlencode

hcms_encrypt


Syntax
hcms_encrypt ($string, $key="", $crypt_level="", $encoding="url")

Input parameters
$string ... string to encode
$key ... key of length 16 or 24 or 32 (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
$key ... key of length 16 or 24 or 32 (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 (optional)
$secret ... secret value (optional)

global input parameters
$mgmt_config

Output
token / false on error

checktimetoken


Syntax
checktimetoken ($token, $secret=4)

Input parameters
$token ... token
$secret ... secret value (optional)

global input parameters
$mgmt_config

Output
true / false

createtoken


Syntax
createtoken ($user="sys", $lifetime=0, $secret=4)

Input parameters
$user ... user name (optional)
$lifetime ... token lifetime in seconds (optional)
$secret ... secret value (optional)

global input parameters
$mgmt_config

Output
token / false on error

checktoken


Syntax
checktoken ($token, $user="sys", $secret=4)

Input parameters
$token ... token
$user ... user name (optional)
$secret ... secret value (optional)

global input parameters
$mgmt_config

Output
true / false

createuniquetoken


Syntax
createuniquetoken ($length=16)

Input parameters
$length ... token length (optional)

global input parameters
$mgmt_config

Output
token as string / false

rand_secure


Syntax
rand_secure ($min=1000, $max=999999999999)

Input parameters
$min ... min and max value as integer (optional)
$max

Output
secure random number / false

Media API Functions

indexcontent


Syntax
indexcontent ($site, $location, $file, $container="", $container_content="", $user)

Input parameters
$site ... publication name
$location ... path to multimedia file
$file ... multimedia file name (file to be indexed)
$container ... container name or ID (optional)
$container_content ... container XML-content (optional)
$user ... user name

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
$location ... file location
$file ... file name
$container ... multimedia file to index
$container_content ... container name or ID
$user ... container XML-content

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
$container_id_array ... container IDs as array (optional)

global input parameters
$mgmt_config

Output
true / false

Description
Reindexes all media files of a publication and only for specific containers.

createthumbnail_indesign


Syntax
createthumbnail_indesign ($site, $location_source, $location_dest, $file)

Input parameters
$site ... publication
$location_source ... path to source dir
$location_dest ... path to destination dir
$file ... file name

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
$location_source ... path to source dir
$location_dest ... path to destination dir
$file ... file name
$frame ... frame of video in the 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 (saves only thumbnail media file in destination location
only jpeg format is supported as output)

Description
Creates a thumbnail picture of a video frame

createmedia


Syntax
createmedia ($site, $location_source, $location_dest, $file, $format="", $type="thumbnail", $force_no_encrypt=false)

Input parameters
$site ... publication
$location_source ... path to source dir
$location_dest ... path to destination dir
$file ... file name
$format ... format (file extension w/o dot) (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), any other string present in $mgmt_imageoptions/$mgmt_mediaoptions] (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 from original 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.

convertmedia


Syntax
convertmedia ($site, $location_source, $location_dest, $mediafile, $format, $media_config="", $force_no_encrypt=false)

Input parameters
$site ... publication name
$location_source ... path to source dir
$location_dest ... path to destination dir
$mediafile ... file name
$format ... target format (file extension w/o dot) of destination file
$media_config ... media configuration to be used (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

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 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
$file_source ... path to source image file
$location_dest ... path to destination dir
$format ... format (file extension w/o dot) of destination file (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 (optional)
$width ... height in pixel/mm/inch (optional)
$height ... slug in pixel/mm/inch (optional)
$slug ... units for width
$units ... height and slug [px, mm, inch] (optional)
$dpi ... dpi (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
$filepath ... path to source media file
$angle ... rotation angle
$imageformat ... destination image format [jpg, png, gif]

global input parameters
$mgmt_config

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
$file ... media file name

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

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

Output
RGB-color as array / false on error

rgb2hex


Syntax
rgb2hex ($red, $green, $blue)

Input parameters
$red ... image color in RGB
$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
$configfile ... config file name

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
$configfile ... media config file name
$mediafiles ... media file name array or string
$width ... width in px (optional)
$height ... height in px (optional)
$rotation ... rotation in degree (optional)
$filesize ... file size in kB (optional)
$duration ... duration in hh:mmm:ss (optional)
$videobitrate ... video bitrate in kb/s (optional)
$audiobitrate ... audio bitrate in kb/s (optional)
$audiofrequenzy ... audio frequenzy in Hz (optional)
$audiochannels ... audio channels [mono
$video_codec ... stereo] (optional)
$audio_codec ... video codec name (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
$location_source ... path to source location
$location_dest ... path to destination location
$file ... file name
$format ... destination file format (extension w/o dot)
$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
$zipfilepath ... path to source zip file
$location ... path to destination location
$filename ... category [page, comp]
$cat ... name of file for extraction
$user ... user

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
$source ... source location
$destination ... destination location
$user ... user name
$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


Syntax
zipfiles ($site, $multiobject_array, $destination="", $zipfilename, $user, $activity="")

Input parameters
$site ... publication
$multiobject_array ... array with path to source zip files
$destination ... destination location (if this is null then the $location where the zip-file resists will be used)
$zipfilename ... name of ZIP-file
$user ... user name
$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
$dpi ... dpi (optional)

Output
pixel / false

Description
Convert mm to pixel

px2inch


Syntax
px2inch ($pixel, $dpi=72)

Input parameters
$pixel ... pixel
$dpi ... dpi (optional)

Output
inch / false

Description
Convert pixel to inches

inch2px


Syntax
inch2px ($inch, $dpi=72)

Input parameters
$inch ... pixel
$dpi ... dpi (optional)

Output
pixel / false

Description
Convert inches to pixel

mediasize2frame


Syntax
mediasize2frame ($mediawidth, $mediaheight, $framewidth="", $frameheight="", $keepmaxsize=true)

Input parameters
$mediawidth ... media width
$mediaheight ... media height
$framewidth ... frame width (optional)
$frameheight ... frame height (optional)
$keepmaxsize ... keep maximum media size based on original dimensions of media [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 ... VTT 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
$location ... location
$file ... path to CSV file
$user ... user name
$type ... type array or string [u, f, l, c, d, k] (optional)
$delimiter ... delimiter (optional)
$enclosure ... enclosure (optional)
$charset ... character set (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.

createtaxonomy


Syntax
createtaxonomy ($recreate=false)

Input parameters
$recreate ... recreate taxonomy file [true, false] (optional)

global input parameters
$mgmt_config

Output
true / false

Description
Generates a PHP array from a taxonomy defintion file and saves the PHP file in data/include/publication-name.taxonomy.inc.php

splitkeywords


Syntax
splitkeywords ($keywords, $charset="UTF-8")

Input parameters
$keywords ... comma seperated keywords string
$charset ... character set (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
$file_dest ... path to destination file

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

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 as object
$namespace ... namespace as 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

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
$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
$text ... text array (from content container)

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

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
$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
$text ... text array (from content container)

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
$min ... minutes
$sec ... seconds
$hemi ... hemisphere [N, O, S, W]

Output
decimal result / false

exif_getdata


Syntax
exif_getdata ($file)

Input parameters
$file ... path to image file

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

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

Output
charset 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)
$tag ... code of tag (e.g. 025)
$value ... value of tag

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
$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
$text ... text array (from content container)

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
$mapping ... mapping definition

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

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
$location ... location path (optional)
$object ... object name (optional)
$mediafile ... media file name (optional)
$mapping ... mapping array [meta data tag name -> text-id] (optional)
$containerdata ... container content as XML string (optional)
$user ... user name
$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 (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
$user ... user name

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 ... site

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
$user ... user name

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 ... site
$user ... user

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
$link_db ... link database [2 dim. array]
$attribute ... attribute ['object'
$contentfile ... 'link']
$cat ... content container [optional] [string]
$link_curr ... link category [optional] ['comp'
$link_new ... 'page']
$option ... current link [optional

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
$link_db ... link database [2 dim. array]
$contentfile ... content container
$cat ... link category ['comp
$object ... page']

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
$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 |)

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
$container ... container name
$link_old ... old link (converted)
$link_new ... new link (converted)

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
$location ... location
$page ... object (name and extension)
$cat ... category [page

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
$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 as string
$identifier ... link identifiert ("href" for hyperreferences

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 as string
$pluginFolder ... plugin directory

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 as 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
$array ... configuration array containing the values and keys

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 as 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
$page ... plugin page (relative reference to the plugins main page)
$control ... control (relative reference to the plugins control page)
$additionalGetParameters ... additional GET parameters

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 [object] (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 [object] (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

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".

showshorttext


Syntax
showshorttext ($text, $length=0, $linebreak=false, $charset="UTF-8")

Input parameters
$text ... text as string
$length ... max. length of text (minus length starting from the end) (optional)
$linebreak ... line break instead of cut [true, false] only if length is positive (optional)
$charset ... character set for encoding (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
$lang ... language code (optional)
$close_link ... close button link (optional)
$close_target ... link target (optional)
$individual_button ... individual button (optional)
$id ... ID of div-layer (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
$menu_array ... menu as array [key=name
$lang ... value=properties/events]
$close_link ... language code (optional)
$close_target ... close button link (optional)
$id ... link target (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
$width ... width in pixel (optional)
$height ... height in pixel (optional)
$lang ... language code (optional)
$style ... additional style definitions of div-layer (optional)
$id ... ID of div-layer (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
$lang ... language code (optional)
$onload ... on load JS events (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
$lang ... language code (optional)
$style ... additional style definitions of div-layer (optional)
$id ... ID of div-layer (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
$mediafile ... media file name
$lang ... language code (optional)
$style ... additional style definitions of div-layer (optional)
$id ... ID of div-layer (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 ... meta data as array
$lang ... hierarchy level
$class_headline ... CSS-class with background-color for headlines (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
$location ... location
$page ... object name
$cat ... category [page, comp] (optional)
$name ... object name (optional)

global input parameters
$mgmt_config
$hcms_charset
$hcms_lang
$lang

Output
html presentation / false

showmedia


Syntax
showmedia ($mediafile, $medianame, $viewtype, $id="", $width="", $height="", $class="hcmsImageItem")

Input parameters
$mediafile ... mediafile (publication/filename)
$medianame ... name of mediafile for display
$viewtype ... view type [template, media_only, preview, preview_download, preview_no_rendering]
$id ... ID of the HTML media tag
$width ... width in px (optional)
$height ... height in px (optional)
$class ... CSS class (optional)

global input parameters
$mgmt_config
$mgmt_mediapreview
$mgmt_mediaoptions
$mgmt_imagepreview
$mgmt_docpreview
$mgmt_docconvert
$hcms_charset
$hcms_lang_codepage
$hcms_lang
$lang
$site
$location
$cat
$page
$user
$pageaccess
$compaccess
$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
$dir ... current explorer location
$location_esc ... object location (optional)
$page ... object name (optional)
$compcat ... component category [single, multi, media] (optional)
$search_expression ... search expression (optional)
$search_format ... search format [object, document, image, video, audio] (optional)
$mediatype ... media-type [audio, video, text, flash, image, compressed, binary] (optional)
$lang ... callback of CKEditor (optional)
$callback ... saclingfactor for images (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
$hypertagname ... hypertag name
$id ... hypertag id
$contentbot ... content
$sizewidth ... width
$sizeheight ... height of the editor
$toolbar ... toolbar set
$lang ... language
$dpi ... dpi for scaling images

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 ... language

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
$hypertag ... hypertag
$id ... hypertag id
$contentbot ... content
$sizewidth ... width
$sizeheight ... height of the editor
$toolbar ... toolbar set
$lang ... language
$contenttype ... content-type
$cat ... category[page, comp]
$location_esc ... converted location
$page ... object name
$contentfile ... container name
$db_connect ... DB-connect file name
$token ... security token

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 ... videoArray (Array) containing the different html sources
$video_array ... width (Integer) Width of the video in pixel
$width ... height (Integer) Height of the video in pixel
$height ... logo_url (String) Link to the logo which is displayed before you click on play (If the value is null the default logo will be used)
$logo_url ... id (String) The ID of the video (will be generated when empty)
$id ... title (String) The title for this video
$title ... autoplay (Boolean) Should the video be played on load (true)
$autoplay ... default is false
$fullscreen ... enableFullScreen (Boolean) Is it possible to view the video in fullScreen (true)
$loop ... play loop (optional) [true, false]
$muted ... muted/no sound (optional) [true, false]
$controls ... player controls (optional) [true, false]
$iframe ... use video in iframe (optional) [true, false]
$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_'
$fullscreen ... is it possible to view the video in fullScreen [true, false]

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
$audioArray ... audio files as array (Array)
$width ... ID of the tag (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_'

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
$rowSeparator ... separator for a Row on screen/file
$ignoreFunctions ... functionnames to be ignored

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
$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
$docroot ... location
$object ... object name
$view ... view [see view parameters of function buildview]
$user ... user name

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
$docroot ... document root for navigation
$urlroot ... URL root for navigation
$view ... view [see view parameters of function buildview]
$currentobject ... path to current object (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 array (created by function readnavigation)
$level ... level as 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)
$selected_value ... use values of array as option value and text [true, false] (optional)
$id ... selected value (optional)
$attributes ... attributes of select tags like name or id or events (optional)

Output
HTML select box presentation / false

showtranslator


Syntax
showtranslator ($site, $id, $type, $charset="UTF-8", $lang="en", $style="")

Input parameters
$site ... publication name
$id ... editor/text-tag ID
$type ... unformatted or formatted texttag-type [u, f]
$charset ... character set (optional)
$lang ... language code (optional)
$style ... style of div tag (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
$lang ... language code (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.

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: $view = "template or any other word" -> the standard text (in table) will be included for the view $view = "preview" -> preview of the content of the included file $view = "publish" -> view the content of the included file as ist is (for publishing)
$charset

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

Output
view on 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
$location ... location
$page ... object
$user ... user
$buildview ... view parameter (optional)
$ctrlreload ... reload workplace control frame and add html & body tags if missing [yes, no] (optional)
$template ... template name (optional)
$container ... container name (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:
$buildview = "formedit": use form for content editing
$buildview = "formmeta": use form for content viewing only for meta informations (tag-type must be meta)
$buildview = "formlock": use form for content viewing
$buildview = "cmsview": view of page based on template, includes hyperCMS specific code (buttons)
$buildview = "inlineview": view of page based on template, includes hyperCMS specific code (buttons) and inline text editing
$buildview = "publish": view of page for publishing based on template without CMS specific code (buttons)
$buildview = "preview": view of page based on template for preview (inactive hyperlinks) without CMS specific code (buttons)
$buildview = "template": view of template based on template for preview (inactive hyperlinks) without CMS specific code (buttons)

buildsearchform


Syntax
buildsearchform ($site="", $template="", $report="", $ownergroup="", $css_display="inline-block")

Input parameters
$site ... publication name (optional for report)
$template ... template name (optional)
$report ... or report name (optional)
$ownergroup ... group access as array (optional)
$css_display ... CSS display value for label tag (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
$paper_width ... width of paper in pixel
$paper_height ... height of paper in pixel
$paper_top ... top space in pixel
$paper_left ... left space in pixel
$x_axis ... x-axis values as array
$y1_axis ... y1-axis values as array
$y2_axis ... y2-axis values as array (optional)
$y3_axis ... y3-axis values as array (optional)
$paper_style ... paper CSS style
$bar1_style ... 1st bar chart CSS style
$bar2_style ... 2nd bar chart CSS style
$bar3_style ... 3rd bar chart CSS style
$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

Output
true / false on error

Description
Verifies a tag name

setxmlparameter


Syntax
setxmlparameter ($xmldata, $parameter, $value)

Input parameters
$xmldata ... XML content container
$parameter ... paramater name
$value ... paramater value

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
$starttagname ... tag name

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
$starttagname ... tag name

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
$starttagname ... tag name

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
$starttagname ... tag name

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
$starttagname ... tag name of requested XML node
$startcondtag ... tag holding the conditional value inside the given starttagname
$condvalue ... conditional value

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
$starttagname ... tag name of requested XML node
$startcondtag ... tag holding the conditional value inside the given starttagname
$condvalue ... conditional value

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
$starttagname ... tag name of requested XML node
$startcondtag ... tag holding the conditional value inside the given starttagname
$condvalue ... conditional value

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
$starttagname ... tag name of requested XML node
$startcondtag ... tag holding the conditional value inside the given starttagname
$condvalue ... conditional value

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
$starttagname ... tag name of requested XML node
$startcondtag ... tag holding the conditional value inside the given starttagname
$condvalue ... conditional value

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
$starttagname ... tag name of requested XML node
$startcondtag ... tag holding the conditional value inside the given starttagname
$condvalue ... conditional value

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
$startparenttagname ... parent tag name
$starttagname ... tag name of XML node for the new content
$contentnew ... new XML node to be inserted
$startcondtag ... tag holding the conditional value inside the given starttagname
$condvalue ... conditional value

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
$startparenttagname ... parent tag name
$starttagname ... tag name of XML node for the new content
$contentnew ... new XML node to be inserted
$startcondtag ... tag holding the conditional value inside the given starttagname
$condvalue ... conditional value

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
$startparenttagname ... parent tag name
$starttagname ... tag name of XML node for the new content
$contentnew ... new XML node to be inserted
$startcondtag ... tag holding the conditional value inside the given starttagname
$condvalue ... conditional value

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
$xmlnode ... XML node to be replaced
$xmlnodenew ... new XML node

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
$insertxmldata ... XML node to be inserted in starttagname
$starttagname ... tag name of the parent XML node

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
$insertxmldata ... XML node to be inserted in starttagname
$starttagname ... tag name of the parent XML node

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
$sub_xmldata ... xml node to be inserted
$startgrandtagname ... grandparent tag name
$startcondtag ... tag holding the conditional value inside the given starttagname
$condvalue ... conditional value
$startparenttagname ... parent tag name
$starttagname ... tag name of XML node for the new content
$contentnew ... new XML node to be inserted

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
$sub_xmldata ... xml node to be inserted
$startgrandtagname ... grandparent tag name
$startcondtag ... tag holding the conditional value inside the given starttagname
$condvalue ... conditional value
$startparenttagname ... parent tag name
$starttagname ... tag name of XML node for the new content
$contentnew ... new XML node to be inserted

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

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
$config ... report configuration as 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

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

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 as 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
$x_title ... chart x-axis title
$x_value ... chart x-axis array key name holding the values
$y_title ... chart y-axis title
$y_value ... chart y-axis array key name holding the values
$data_array ... assoz. data array
$width ... chart width in pixels (optional)
$height ... chart height in pixels (optional)
$id ... ID of chart (optional)
$suffix ... function name suffix (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
$x_title ... chart x-axis title
$x_value ... chart x-axis array key name holding the values
$y1_title ... chart y1-axis title
$y1_value ... chart y1-axis array key name holding the values
$y2_title ... chart y2-axis title
$y2_value ... chart y2-axis array key name holding the values
$y3_title ... chart y3-axis title
$y3_value ... chart y3-axis array key name holding the values
$data_array ... assoz. data array
$width ... chart width in pixels (optional)
$height ... chart height in pixels (optional)
$id ... ID of chart (optional)
$suffix ... function name suffix (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
$y_title ... chart y-axis title
$y_value ... chart y-axis array key name holding the values
$x1_title ... chart x1-axis title
$x1_value ... chart x1-axis array key name holding the values
$x2_title ... chart x2-axis title
$x2_value ... chart x2-axis array key name holding the values
$data_array ... assoz. data array
$width ... chart width in pixels (optional)
$height ... chart height in pixels (optional)
$id ... ID of chart (optional)
$suffix ... function name suffix (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
$marker_value ... array key name holding the value for the marker title
$lat_value ... array key name holding the value for the latitude of the marker
$lng_value ... array key name holding the value for the longitude of the marker
$link_value ... array key name holding the value for the marker link
$data_array ... assoz. data array
$width ... chart width in pixels (optional)
$height ... chart height in pixels (optional)
$id ... ID of chart (optional)
$suffix ... function name suffix (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)
$object_id ... object ID or path to object (optional)
$user ... user name of sub/project owner
$projectname ... project name
$description ... project description (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
$subproject_id ... ID of main project (only if project is a subproject)
$object_id ... object ID or path to object (optional)
$user ... user name of sub/project owner (optional)
$projectname ... project name (optional)
$description ... project description (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

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

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)
$masterproject_id ... ID of master project

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
$task_title ... task title
$task_value ... task array key name holding the values
$resource_title ... resouce title (optional)
$resource_value ... resource array key name holding the values (optional)
$start_title ... task start date title
$start_value ... task start date array key name holding the values
$end_title ... task finish date title
$end_value ... task finish date array key name holding the values
$status_title ... work status title (optional)
$status_value ... work status array key name holding the values (optional)
$data_array ... assoz. data array
$width ... chart width in pixels (optional)
$height ... chart height in pixels (optional)
$id ... ID of chart (optional)
$suffix ... function name suffix (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 (optional)
$from_user ... from_user name
$from_email ... from_email [email-address] (optional)
$to_user ... to_user name
$to_email ... to_email [email-address] (optional)
$startdate ... start date (optional)
$finishdate ... finish date (optional)
$category ... category [link, user, workflow] (optional)
$object_id ... object ID or object path
$taskname ... task name
$message ... message (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 (optional)
$planned ... planned effort in taskunit (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
$object_id ... object ID pr path to object (optional)
$to_user ... to_user name (optional)
$startdate ... start date (optional)
$finishdate ... finish date (optional)
$taskname ... name of task (optional)
$message ... task message/description (optional)
$sendmail ... sendmail [true/false]
$priority ... priority [high, medium, low] (optional)
$status ... status in percent [0-100] (optional)
$planned ... planned effort in taskunit (optional)
$actual ... actual effort in taskunit (optional)
$project_id ... project/subproject ID the task belongs to (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

global input parameters
$mgmt_config
$hcms_lang
$lang

Output
true/false

Description
Deletes user tasks.

tasknotification


Syntax
tasknotification ($date)

Input parameters
$date ... date

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
$wf_name ... worfklow name
$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 [2 dim. Array]

Output
workflow item

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
$location ... media file location
$file ... media file name
$user ... user name (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
$location ... media file location
$file ... media file name
$user ... user name (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
$location ... media file location
$file_old ... source media file name
$file_new ... destination media file name
$user ... user name (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
$location ... media file location
$file_old ... old media file name
$file_new ... new media file name
$user ... user name (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
$location ... media file location
$file ... media file name
$user ... user name (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 (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'].

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.