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
- Main API Functions
- Get API Functions
- Set API Functions
- Connect API Functions
- Security API Functions
- Media API Functions
- Metadata API Functions
- Link API Functions
- Plugin API Functions
- User Interface API Functions
- Template Engine API Functions
- XML API Functions
- Report API Functions
- Project API Functions
- Task API Functions
- Workflow API Functions
- Cloud Storage API Functions
- Import/Export API Functions
▲ Link API Functions
link_db_restore
Description
This function restores a link management index file of a publication
Syntax
link_db_restore ($site)
Input parameters
- $site ... publication name [string]
global input parameters
Output
link_db_load
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.
Syntax
link_db_load ($site, $user)
Input parameters
- $site ... publication name [string]
- $user ... user name [string]
global input parameters
Output
- link database [2 dim. array] or true / false on error
link_db_read
Description
This function loads the link management database for reading without locking
Syntax
link_db_read ($site)
Input parameters
- $site ... publication name [string]
global input parameters
Output
- link database [2 dim. array] or true / false on error
link_db_close
Description
closes and unlocks the link management database.
Syntax
link_db_close ($site, $user)
Input parameters
- $site ... publication name [string]
- $user ... user name [string]
global input parameters
Output
link_db_save
Description
This function saves und unlocks the link management database
Syntax
link_db_save ($site, $link_db, $user)
Input parameters
- $site ... link database [array]
- $link_db ... publication name [string]
- $user ... user name [string]
global input parameters
Output
link_db_update
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 link matching given category)
link_curr & link_new are not empty and not equal: update current link with the new one
Syntax
link_db_update ($site, $link_db, $attribute, $contentfile="", $cat="", $link_curr="", $link_new="", $option="unique")
Input parameters
- $site ... publication name [string]
- $link_db ... link database [2 dim. array]
- $attribute ... attribute [object, link]
- $contentfile ... content container [string] (optional)
- $cat ... link category [comp, page] (optional)
- $link_curr ... current link must be an URL or absolute/relative path [string] (optional)
- $link_new ... new link must be an URL or absolute/relative path [string] (optional)
- $option ... update option [all, unique]
global input parameters
Output
- link database [array] or true if link index database is not used / false on error
link_db_insert
Description
This function inserts a new record in the link management database
optionally the created object can be also inserted
Syntax
link_db_insert ($site, $link_db, $contentfile, $cat, $object="")
Input parameters
- $site ... publication name [string]
- $link_db ... link database [2 dim. array]
- $contentfile ... content container name [string]
- $cat ... link category [comp, page]
- $object ... object name (optional)
global input parameters
Output
- link database [2 dim. array] or true / false
link_db_delete
Description
This function deletes a record in the link management database
Syntax
link_db_delete ($site, $link_db, $contentfile)
Input parameters
- $site ... link database [2 dim. array]
- $link_db ... content container name [string]
- $contentfile
global input parameters
Output
- link database [2 dim. array] or true / false on error
link_db_getobject
Description
This function splits the object string into an array of objects.
Syntax
link_db_getobject ($multiobject)
Input parameters
- $multiobject ... link database attribut (references to objects seperated by |) [string]
global input parameters
Output
- objects [array] / false on error
link_update
Description
This function updates the link of the published and working content container and link file
Syntax
link_update ($site, $container, $link_old, $link_new, $media_old="", $media_new="")
Input parameters
- $site ... publication name [string]
- $container ... container name [string]
- $link_old ... old link (converted) [string]
- $link_new ... new link (converted) [string]
- $media_old ... old media file name [string] (optional)
- $media_new ... new media file name [string] (optional)
global input parameters
Output
getlinkedobject
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.
Syntax
getlinkedobject ($site, $location, $page, $cat)
Input parameters
- $site ... publication name [string]
- $location ... location [string]
- $page ... object (name and extension) [string]
- $cat ... category [page, comp] (optional)
global input parameters
Output
- objects which link to the given object [array] or true / false
getconnectedobject
Description
This function gets all objects which use the same content container and are therefore connected.
Syntax
getconnectedobject ($container, $type="work")
Input parameters
- $container ... container name or ID [string]
- $type ... container type [work, published, version] (optional)
global input parameters
Output
extractlinks
Description
This function extracts all links based on it's identifier from a text and returns an array of all links
Syntax
extractlinks ($textcontent, $identifier)
Input parameters
- $textcontent ... text content [string]
- $identifier ... link identifiert ["href" for hyperreferences, "src" for image references or embed references (flash), "value" for paramter (flash)]
global input parameters
Output
- object links [array] / false on error