API Dokumentation

API Dokumentation / Wiki

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

Fragen und Antworten bitte innerhalb der Google Group.

hyperCMS API Function Reference

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

Get API Functions

getserverload


Syntax
getserverload ($interval=0)

Input parameters
  • $interval ... intervall for the average system load can be 1

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


getconfigvalue


Description
Help function for createinstance

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

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

Output
  • value of setting


getsession


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

Input parameters
  • $variable ... session variable name [string]
  • $default ... default session value [string] (optional)

Output
  • session value


getrequest


Description
Returns the value of a POST, GET or COOKIE request, or a default value if not valid.

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

Input parameters
  • $variable ... request variable name [string]
  • $force_type ... must be of certain type [numeric, array, publicationname, locationname, objectname, url, bool] (optional)
  • $default ... default value [string] (optional)

Output
  • request value


getrequest_esc


Description
Returns the escaped value in order to prevent XSS from POST, GET or COOKIE variables. Returns a default value if not valid.

Syntax
getrequest_esc ($variable, $force_type=false, $default="", $js_protection=false)

Input parameters
  • $variable ... request variable name [string]
  • $force_type ... must be of certain type [numeric, array, publicationname, locationname, objectname] (optional)
  • $default ... default value [string] (optional)
  • $js_protection ... remove characters to avoid JS injection [boolean] (optional)

Output
  • request value


getuserip


Description
Retrieves the IP address of the client/user.

Syntax
getuserip ()

Input parameters

Output
  • IP address of client / false on error


getobjectlistcells


Syntax
getobjectlistcells ($viewportwidth, $is_mobile=0)

Input parameters
  • $viewportwidth ... width of viewport or window in pixels [integer]
  • $is_mobile ... is mobile device [0, 1] (optional)

Output
  • number of table cells/rows for the gallery view of object lists


getlanguageoptions


Syntax
getlanguageoptions ()

Input parameters

global input parameters
  • $mgmt_config

Output
  • array with 2-digit language code as key and language name in English as value / false on error


getlanguagefile


Syntax
getlanguagefile ($lang="en")

Input parameters
  • $lang ... language code [string] (optional)

global input parameters
  • $mgmt_config

Output
  • language file name


getcodepage


Syntax
getcodepage ($lang="en")

Input parameters
  • $lang ... language code [string] (optional)

global input parameters
  • $mgmt_config
  • $hcms_lang_codepage

Output
  • code page (character set)


getcalendarlang


Syntax
getcalendarlang ($lang="en")

Input parameters
  • $lang ... 2-digits language code [string] (optional)

global input parameters
  • $mgmt_config

Output
  • supported language code for calendar


getscaytlang


Syntax
getscaytlang ($lang="en")

Input parameters
  • $lang ... 2-digits language code [string] (optional)

global input parameters
  • $mgmt_config

Output
  • supported language locale for CKEditor scayt plugin


getescapedtext


Description
Returns the synonyms of a word.

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

Input parameters
  • $text ... word [string]
  • $charset ... 2-digit language code [string] (optional)
  • $lang

global input parameters
  • $mgmt_config

Output
  • array holding all synonyms including the provided word / false on error


getsearchhistory


Syntax
getsearchhistory ($user="", $clean=false)

Input parameters
  • $user ... user name [string] (optional)
  • $clean ... clean history [boolean] (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


Description
Returns the sorted keywords of a taxonomy level (multilingual support based on taxonomies).
The global variable $taxonomy can be used to pass the taxonomy as array.

Syntax
gettaxonomy_sublevel ($site, $lang="en", $tax_id="0")

Input parameters
  • $site ... publication name [string]
  • $lang ... language code [string] (optional)
  • $tax_id ... taxonomy parent ID [string] (optional)

global input parameters
  • $mgmt_config
  • $taxonomy

Output
  • array holding all keywords of the next taxonomy level / false on error


gettaxonomy_childs


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

Syntax
gettaxonomy_childs ($site, $lang, $expression, $childlevels=1, $id_only=true, $id_path=false)

Input parameters
  • $site ... publication name [string] (optional)
  • $lang ... taxonomy language code [string] (optional)
  • $expression ... taxonomy ID or expression or taxonomy path in the form %taxonomy%/publication-name/language-code/taxonomy-ID/taxonomy-child-levels or 'default'/language-code/taxonomy-ID/taxonomy-child-levels [string]
  • $childlevels ... taxonomy child levels to include [integer] (optional)
  • $id_only ... only return taxonomy IDs without language and keyword information [boolean] (optional)
  • $id_path ... return taxonomy ID path [boolean] (optional)

global input parameters
  • $mgmt_config
  • $taxonomy

Output
  • array holding all taxonomy IDs / false on error


gethierarchy_definition


Description
Reads the metadata/content hierarchy defintion and returns a multidimensinal array.

Syntax
gethierarchy_definition ($site, $selectname="")

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

global input parameters
  • $mgmt_config

Output
  • hierarchy array in form of array[name][level][text-id][language] = label / false on error


gethierarchy_sublevel


Description
Returns sorted values of a metadata/content hierarchy level.

Syntax
gethierarchy_sublevel ($hierarchy_url)

Input parameters
  • $hierarchy_url ... hierarchy URL in form of %hierarchy%/publication-name/hierarchy-name/hierarchy-level-of-last-element/text-ID-1=value-1/text-ID-2=value-2/text-ID-3 [string]

global input parameters
  • $mgmt_config
  • $lang

Output
  • array holding all hierarchy URLs as key and text content or label as value / false on error


getkeywords


Description
Generates an array holding all keywords and the number as value and keyword ID as key.

Syntax
getkeywords ($site="")

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

global input parameters
  • $mgmt_config

Output
  • keywords as array / false on error


getmetakeywords


Description
Generates a keyword list from a plain text. Stop word lists are defined in data/include/stopwords.inc.php

Syntax
getmetakeywords ($text, $language="en", $charset="UTF-8")

Input parameters
  • $text ... text [string]
  • $language ... language to be used for stop word list [de, en, ...] (optional)
  • $charset ... character set [string] (optional)

global input parameters
  • $mgmt_config

Output
  • keywords as array /false on error


getmetadescription


Description
Generates a description from a text, to be used as meta information.

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

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

Output
  • cleanded description of provided text /false on error


getgooglesitemap


Description
Generates a google sitemap xml-output

Syntax
getgooglesitemap ($site, $dir, $url, $getpara=array(), $permalink=array(), $chfreq="weekly", $prio="", $ignore=array(), $filetypes=array('cfm', 'htm', 'html', 'xhtml', 'asp', 'aspx', 'jsp', 'php', 'pdf'), $show_freq=true, $show_prio=true)

Input parameters
  • $site ... publication name [string]
  • $dir ... directory path [string]
  • $url ... URL to directory [string]
  • $getpara ... GET parameters to use for new versions of the URL as array (optional)
  • $permalink ... permanent links text-ID to use for location [array] (optional)
  • $chfreq ... frequency of google scrawler [never, weekly, daily] (optional)
  • $prio ... priority [1 or less] (optional)
  • $ignore ... ignore file names [array] (optional)
  • $filetypes ... allowed file types [array] (optional)
  • $show_freq ... include frequenzy tag [boolean] (optional)
  • $show_prio ... include priority tag [boolean] (optional)

global input parameters
  • $mgmt_config
  • $publ_config

Output
  • xml sitemap / false on error


getgoogleanalytics


Description
Generates a google analytics code segment for embedding.

Syntax
getgoogleanalytics ($google_analytics_key)

Input parameters
  • $google_analytics_key ... google analytics key publication name [string]

global input parameters
  • $mgmt_config

Output
  • JS code as string / false on error


getlistelements


Syntax
getlistelements ($list_sourcefile)

Input parameters
  • $list_sourcefile ... content attribute value of list or keyword tag

global input parameters
  • $mgmt_config
  • $lang

Output
  • string with list/keyword elements sperated by commas / false


getmetadata


Syntax
getmetadata ($location, $object, $container="", $seperator="\r\n", $template="")

Input parameters
  • $location ... location [string]
  • $object ... object name (both optional if container is given) [string]
  • $container ... container name/ID or container content [string] (optional)
  • $seperator ... seperator of meta data fields [any string, array] (optional)
  • $template ... publication name/template name to extract label names [string] (optional)

global input parameters
  • $mgmt_config

Output
  • string with all metadata from given object based on container / false


getmetadata_multiobjects


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.

Syntax
getmetadata_multiobjects ($multiobject_array, $user, $include_subfolders=false)

Input parameters
  • $multiobject_array ... converted path of multiple objects [array]
  • $user ... user name [string]
  • $include_subfolders ... include content of subfolders [boolean] (optional)

global input parameters
  • $mgmt_config
  • $siteaccess
  • $pageaccess
  • $compaccess
  • $hiddenfolder
  • $adminpermission
  • $localpermission

Output
  • assoziatve array with all text content and meta data / false


getmetadata_container


Description
Extracts container, media, and metadata information of a container.
This function is used for the presentation of metadata for objectlist views.

Syntax
getmetadata_container ($container_id, $text_id_array=array())

Input parameters
  • $container_id ... container ID [string]
  • $text_id_array ... array of text IDs [array] (optional)

global input parameters
  • $mgmt_config
  • $labels

Output
  • assoziatve array with all text content and meta data / false


getobjectlist


Description
Get all objects of a location. This is a simplified wrapper for function rdbms_searchcontent.

Syntax
getobjectlist ($site="", $location="", $folderhash="", $objectlistcols=array())

Input parameters
  • $site ... publication name [string] (optional)
  • $location ... location [string] (optional)
  • $folderhash ... folder hash code [string] (optional)
  • $objectlistcols ... text IDs to be returned e.g. text:Title [array] (optional)

global input parameters
  • $mgmt_config
  • $user

Output
  • result array / false on error


getobjectcontainer


Description
Loads the content container of a given object (page, component, folder).

Syntax
getobjectcontainer ($site, $location, $object, $user, $type="work")

Input parameters
  • $site ... publication name [string]
  • $location ... location [string]
  • $object ... object name [string]
  • $user ... user name [string]
  • $type ... container type [work, published] (optional)

global input parameters
  • $mgmt_config

Output
  • Content Container [XML]/false


getcontainer


Description
Obsolete function used as an alias for the loadcontainer function without the possibility to load locked containers

Syntax
getcontainer ($containerid, $type)

Input parameters
  • $containerid ... container name or container ID [string]
  • $type ... container type [published, work]

global input parameters
  • $mgmt_config

Output
  • Contant Container [XML]/false


getwallpaper


Description
Provides a wallpaper image or video used for the logon and home screen.

Syntax
getwallpaper ($theme="", $version="")

Input parameters
  • $theme ... design theme name [string] (optional)
  • $version ... version number for the wallpaper service [string] (optional)

global input parameters
  • $mgmt_config
  • $is_mobile

Output
  • URL of wallpaper image / false


getcontainername


Syntax
getcontainername ($container)

Input parameters
  • $container ... container name (e.g. 0000112.xml.wrk) or container ID [string]

global input parameters
  • $mgmt_config

Output
  • Array with file name of the working content container (locked or unlocked!) and username if locked


getlocationname


Syntax
getlocationname ($site, $location, $cat, $source="path")

Input parameters
  • $site ... publication name [string]
  • $location ... location path (as absolute path or converted path) [string]
  • $cat ... category [page, comp]
  • $source ... source for name [path, name]

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

Output
  • location with readable names instead of directory and file names / false on error


getthemes


Description
Returns all design theme names as values and the techical names (path) as key of the result array.

Syntax
getthemes ($site_array=array())

Input parameters
  • $site_array ... publication name as string or array [string, array] (optional)

global input parameters
  • $mgmt_config

Output
  • all design theme names as array / false


getthemelocation


Description
Returns the absolute path (URL) of the theme (css and images).
If the main configuration setting $mgmt_config['theme'] defines a theme, this theme will be mandatory in case it exists.

Syntax
getthemelocation ($theme="")

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

global input parameters
  • $mgmt_config

Output
  • path to theme / false


getcategory


Description
Evaluates the category ['page, comp'] of a location

Syntax
getcategory ($site, $location)

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

global input parameters
  • $mgmt_config
  • $publ_config

Output
  • category ['page
  • comp'] / false on error


getpublication


Description
Extract the publication name of a location path

Syntax
getpublication ($path)

Input parameters
  • $path ... converted location path [string]

Output
  • publication name


getlocation


Description
Extract the location excluding object or folder of a location path

Syntax
getlocation ($path)

Input parameters
  • $path ... location path [string]

Output
  • location (without object or folder)


getobject


Description
Extract the object or folder of a location path

Syntax
getobject ($path)

Input parameters
  • $path ... location path [string]

Output
  • object or folder name


getmediacontainername


Description
Extract the container name from a multimedia file name by using the hcm-ID

Syntax
getmediacontainername ($file)

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

Output
  • container name / false on error


getmediafileversion


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.

Syntax
getmediafileversion ($container)

Input parameters
  • $container ... container name or container ID [string]

global input parameters
  • $mgmt_config
  • $user

Output
  • media file name / false on error


getobjectid


Description
Converts the object path to the object ID of any object

Syntax
getobjectid ($objectlink)

Input parameters
  • $objectlink ... converted object path or pathes separated by | [string]

Output
  • object ID


getobjectpath


Description
Returns the location path of an object as string. This function is an alias for function rdbms_getobject in DB Connect.

Syntax
getobjectpath ($object_identifier)

Input parameters
  • $object_identifier ... object identifier (object hash OR object ID OR access hash) [string]

global input parameters
  • $mgmt_config

Output
  • object path / false


getobjectlink


Description
Converts the object ID to the object path of any object

Syntax
getobjectlink ($objectid)

Input parameters
  • $objectid ... converted object ID or IDs separated by | [string]

Output
  • converted object link


getcontainerversions


Syntax
getcontainerversions ($container)

Input parameters
  • $container ... container ID or container name [string]

global input parameters
  • $mgmt_config

Output
  • array of all versions (array[version-extension] = file-name) / false


getlocaltemplates


Description
This function returns a list of all templates of a publication without inherited templates from other publications.

Syntax
getlocaltemplates ($site, $cat="all")

Input parameters
  • $site ... publication name [string]
  • $cat ... template category [all, page, comp, meta, inc, portal] (optional)

global input parameters
  • $mgmt_config

Output
  • array with all template names / false


gettemplates


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.
Portal templates are not supoported by the template inheritance due to the fact that the portal access link permission is connected to a specific publication.

Syntax
gettemplates ($site, $cat="all")

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

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

Output
  • template file name list as array / false on error


gettemplateversions


Syntax
gettemplateversions ($site, $template)

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

global input parameters
  • $mgmt_config

Output
  • array of all versions (array['YYYY-MM-DD HH:MM:SS'] = file-name) / false


getfileinfo


Description
defines file properties based on the file extension and returns file info as an array:
$result['file']: file name without hypercms management extension
$result['name']: readable file name without hypercms management extension
$result['filename']: file name without file extensions
$result['icon']: file name of the file icon
$result['type']: file type
$result['ext']: file extension incl. dot in lower case
$result['published']: if page or component is published (true) or not (false), true in all other cases
$result['deleted']: if file is deleted = true else = false

Syntax
getfileinfo ($site, $file, $cat="comp")

Input parameters
  • $site ... publication name [string] (optional)
  • $file ... file name incl. extension [string]
  • $cat ... category [page, comp] (optional)

global input parameters
  • $mgmt_config

Output
  • result array / false on error


getobjectinfo


Description
Get all file pointers (container, media, template) and object name from object file and collect info from container version, if provided.

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

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

global input parameters
  • $mgmt_config

Output
  • result array / false on error


getfilesize


Description
This function won't give you a proper result of the file size of multimedia components, if there is no Database installed.

Syntax
getfilesize ($file)

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

global input parameters
  • $mgmt_config

Output
  • result array with file size in kB and file count / false on error


getmimetype


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.

Syntax
getmimetype ($file)

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

global input parameters
  • $mgmt_config

Output
  • mime_type


getbase64fileextension


Description
Returns the file extension based on the base64 encoded file content.

Syntax
getbase64fileextension ($base64)

Input parameters
  • $base64 ... base 64 encoded file content [string]

global input parameters
  • $mgmt_config

Output
  • file extension


getfiletype


Syntax
getfiletype ($file_ext)

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

global input parameters
  • $mgmt_config
  • $hcms_ext

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


getpreviewwidth


Description
Returns the default preview/annotation width in pixel of a document, image, or video

Syntax
getpreviewwidth ($site, $filepath, $width_orig="")

Input parameters
  • $site ... publication name [string] (optional)
  • $filepath ... path to file or file name [string]
  • $width_orig ... original width [string] (optional)

global input parameters
  • $mgmt_config
  • $hcms_ext

Output
  • result array with width and height / false on error


getimagecolorkey


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

Syntax
getimagecolorkey ($image)

Input parameters
  • $image ... image resource [resource]

global input parameters
  • $mgmt_config

Output
  • color key of image / false on error


getimagecolors


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)

Syntax
getimagecolors ($site, $file)

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

global input parameters
  • $mgmt_config
  • $user

Output
  • result array


getbrightness


Syntax
getbrightness ($color)

Input parameters
  • $color ... hex color code [string]

Output
  • Brightness level (dark < 130 and light > 130) / false on error


getmediasize


Syntax
getmediasize ($filepath)

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

global input parameters
  • $mgmt_config
  • $mgmt_imagepreview
  • $user

Output
  • Array with media width and height / false on error


getimageinfo


Syntax
getimageinfo ($filepath)

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

global input parameters
  • $mgmt_config
  • $mgmt_imagepreview
  • $user

Output
  • Array with image information like md5 hash
  • file type
  • file size
  • width
  • height
  • colors / false on error


getpdfinfo


Description
Extracts width and height in pixel of a PDF file based on the MediaBox in the files content or ImageMagick as fallback

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

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

global input parameters
  • $mgmt_config
  • $mgmt_imagepreview
  • $user

Output
  • result array with MD5 hash
  • file type
  • file size
  • last modfied date and time
  • width
  • height / false on error


getvideoinfo


Description
Extract video metadata from video file.

Syntax
getvideoinfo ($filepath)

Input parameters
  • $filepath ... path to video file [string]

global input parameters
  • $mgmt_config
  • $mgmt_mediapreview
  • $user

Output
  • video file information as result array / false on error


getbrowserinfo


Syntax
getbrowserinfo ()

Input parameters

Output
  • client browser and version as array / false on error


getcontentlocation


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.

Syntax
getcontentlocation ($container_id, $type="abs_path_content")

Input parameters
  • $container_id ... container id [string]
  • $type ... type [url_path_content, abs_path_content]

global input parameters
  • $mgmt_config

Output
  • location of the container file / false on error


getmedialocation


Description
Gets the media repsitory location from $mgmt_config array. The function supports up to 10 media repositories.
Any other rules for splitting the media files on multiple devices can be implemented as well by the function getmedialocation_rule.
If the file resides outside the repository (symbolic link is used in the repository), the full path including the file name can be returned.
Use the prefix .hcms. for the media file name if you want to media location withour verification of the media file.

Syntax
getmedialocation ($site, $file, $type, $resolve_symlink=false)

Input parameters
  • $site ... publication name [string]
  • $file ... multimedia file name (including hcm-ID) [string]
  • $type ... type [url_path_media, abs_path_media, url_publ_media, abs_publ_media]
  • $resolve_symlink ... resolve symbolik links [boolean] (optional)

global input parameters
  • $mgmt_config
  • $publ_config

Output
  • location of the multimedia file / false on error


getlockedfileinfo


Description
Finds the locked file and returns the name and user as array

Syntax
getlockedfileinfo ($location, $file)

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

global input parameters
  • $mgmt_config

Output
  • Array holding file name incl. lock extension and user name / false on error


getfavorites


Syntax
getfavorites ($user, $output="path", $return_text_id=array())

Input parameters
  • $user ... user name [string]
  • $output ... output format [path, id] (optional)
  • $return_text_id ... text IDs to be returned if output=path [array] (optional)

global input parameters
  • $mgmt_config

Output
  • object info or object id array of users favorites / false


getclipboard


Syntax
getclipboard ($output="path", $return_text_id=array())

Input parameters
  • $output ... output format [path, id] (optional)
  • $return_text_id ... text IDs to be returned if output=path [array] (optional)

global input parameters
  • $mgmt_config

Output
  • object info or object id array of the users clipboard objects / false


gethomeboxes


Syntax
gethomeboxes ($site_array=array())

Input parameters
  • $site_array ... pupblication name [array] (optional)

global input parameters
  • $mgmt_config

Output
  • All home boxes as array with technical name as key and readable name as value / false


getuserboxes


Syntax
getuserboxes ($user)

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

global input parameters
  • $mgmt_config

Output
  • selected home box of a user with technical name as key and readable name as value [array]


getusersonline


Syntax
getusersonline ($sites=array())

Input parameters
  • $sites ... publication names [array] (optional)

global input parameters
  • $mgmt_config
  • $siteaccess

Output
  • Array of online user names / false


getchatstate


Syntax
getchatstate ($register=true)

Input parameters
  • $register ... register stat in session [true/false] (optional)

global input parameters
  • $mgmt_config

Output
  • state of chat / false on error


getimagelib


Syntax
getimagelib ()

Input parameters

global input parameters
  • $mgmt_imagepreview

Output
  • name of image library used [GD
  • ImageMagick] / false on error


getfilename


Description
Extracts the file name of the content and template pointer tags of an object file

Syntax
getfilename ($filedata, $tagname)

Input parameters
  • $filedata ... file content [string]
  • $tagname ... hyperCMS tag name in page or component [string]

Output
  • file name


gethypertag


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.

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


gethypertagname


Description
Reads the name of the hyperCMS tag

Syntax
gethypertagname ($tagdata)

Input parameters
  • $tagdata ... full hyperCMS tag [string]

Output
  • full hyperCMS tag name/false on error


gethtmltag


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!

Syntax
gethtmltag ($filedata, $tag)

Input parameters
  • $filedata ... file content [string]
  • $tag ... full hyperCMS tag (or other identifier) [string]

Output
  • full html tag/false on error


gethtmltags


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.

Syntax
gethtmltags ($filedata, $tag)

Input parameters
  • $filedata ... file content [string]
  • $tag ... full hyperCMS tag or other identifier in html tag [string]

Output
  • string from html tag start to end tag/false on error


getattribute


Description
Get the value of a certain attribute out of a string (...attributname=value....)

Syntax
getattribute ($string, $attribute, $secure=true)

Input parameters
  • $string ... string including attributes [string]
  • $attribute ... attribute name [string]
  • $secure ... secure attribute value reg. XSS [boolean] (optional)

Output
  • attribute value/false on error


getoption


Description
Get the value of a certain option out of a string (-c:v value -ar 44100)

Syntax
getoption ($string, $option)

Input parameters
  • $string ... string including options [string]
  • $option ... option name [string]

Output
  • option value / false on error


getcharset


Description
Extract the content-type definition and the character set from the template (1st priority), content container (2nd priority) or publication settings (3rd priority)

Syntax
getcharset ($site, $data)

Input parameters
  • $site ... publication name [string]
  • $data ... data from template or content container [string]

global input parameters
  • $mgmt_config

Output
  • array with content-type and charset / false on error


getartid


Description
Extract the article ID from the tag ID

Syntax
getartid ($id)

Input parameters
  • $id ... string including id [string]

Output
  • article id/false on error


getelementid


Description
Extract the element ID from the tag ID

Syntax
getelementid ($id)

Input parameters
  • $id ... string including id [string]

Output
  • element id/false on error


getfirstkey


Syntax
getfirstkey ($array)

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

Output
  • array key of first element in array if $value is not empty / false on error


getdirectoryfiles


Syntax
getdirectoryfiles ($dir, $pattern="")

Input parameters
  • $dir ... path to directory [string]
  • $pattern ... pattern as string [string] (optional)

Output
  • sorted array of all files matching the pattern / false on error


getuserinformation


Description
This function creates an assoziative array with user information, e.g. for a user select box.

Syntax
getuserinformation ($login="")

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

global input parameters
  • $mgmt_config
  • $user

Output
  • assoziative array with basic user information [publication->username->attribute] / false


getworkflowitem


Syntax
getworkflowitem ($site, $workflow_file, $workflow, $user)

Input parameters
  • $site ... publication name [string]
  • $workflow_file ... location [string]
  • $workflow ... object name [string]
  • $user ... workflow file name [string]

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

Output
  • workflow item [XML-string]


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