contenido\includes\functions.con.php
Description: Defines the 'con' related functions in Contenido
Requirements:
- Author
- Olaf Niemann, Jan Lengowski
- Con_php_req
- 5.0
- Copyright
- four for business AG
- License
- http://www.contenido.org/license/LIZENZ.txt
- Link
- http://www.4fb.de
- Link
- http://www.contenido.org
- Package
- Contenido Backend includes
- Since
- file available since contenido release <= 4.6 {@internal created unknown modified 2008-11-24, Mario Diaz, function conFlagOnOffline: Set publish date if article goes online modified 2008-06-25, Frederic Schneider, add security fix modified 2008-06-26, Timo.Trautmann, add security fix fix setting article online was not possible modified 2008-08-29, Murat Purc, add new chain execution, and handling og new field con_cat_lang.urlname modified 2008-09-07, Murat Purc, bugfix in conCopyArtLang at chain execution modified 2008-09-12, Oliver Lohkemper, bugfix in function conChangeTemplateForCat, add conGenerateCodeForAllartsInCategory() modified 2009-04-23, Andreas Lindner, also copy alias of article when syncing article to another language modified 2009-05-05, Timo Trautmann - optional use for copy label on copy proccess modified 2009-10-07, Murat Purc, bugfix in conMoveArticles (missing apostrophe) modified 2009-12-01, Dominik Ziegler, bugfix in conFlagOnOffline (article is still offline if enddate in time management is missing) modified 2009-10-27, Murat Purc, fixed/modified CEC_Hook, see [#CON-256] modified 2010-10-13, Dominik Ziegler, No copy label per default when copying articles or categories (CON-352) $Id: functions.con.php 1229 2010-10-13 11:41:23Z dominik.ziegler $: }}
- Version
- 1.0.4
Functions
conChangeTemplateForCat(int $idcat, int $idtpl) : voidChange the template of a category
| Name | Type | Description |
|---|---|---|
| $idcat | int | Category Id |
| $idtpl | int | Template Id |
- Author
- Jan Lengowski
- Copyright
- four for business AG
conCopyArtLang( $srcidart, $dstidart, $newtitle, $bUseCopyLabel = true) : void| Name | Type | Description |
|---|---|---|
| $srcidart | ||
| $dstidart | ||
| $newtitle | ||
| $bUseCopyLabel |
conCopyArticle( $srcidart, $targetcat = 0, $newtitle = "", $bUseCopyLabel = true) : void| Name | Type | Description |
|---|---|---|
| $srcidart | ||
| $targetcat | ||
| $newtitle | ||
| $bUseCopyLabel |
conCopyContainerConf( $srcidtplcfg, $dstidtplcfg) : void| Name | Type | Description |
|---|---|---|
| $srcidtplcfg | ||
| $dstidtplcfg |
conCopyContent( $srcidartlang, $dstidartlang) : void| Name | Type | Description |
|---|---|---|
| $srcidartlang | ||
| $dstidartlang |
conCreateLocationString(int $idcat, string $seperator, string $cat_str, boolean $makeLink = false, string $linkClass = "", integer $firstTreeElementToUse = 0, $uselang = 0, $final = true, $usecache = false) : stringRecursive function to create an location string
| Name | Type | Description |
|---|---|---|
| $idcat | int | ID of the starting category |
| $seperator | string | Seperation string |
| $cat_str | string | Category location string (by reference) |
| $makeLink | boolean | create location string with links |
| $linkClass | string | stylesheet class for the links |
| $firstTreeElementToUse | integer | first navigation level location string should be printed out (first level = 0!!) |
| $uselang | ||
| $final | ||
| $usecache |
| Type | Description |
|---|---|
| string | location string |
- Author
- Jan Lengowski
- Author
- Marco Jahn
- Copyright
- four for business AG
conDeeperCategoriesArray( $idcat_start) : arrayFetch all deeper categories by a given id
| Name | Type | Description |
|---|---|---|
| $idcat_start |
| Type | Description |
|---|---|
| array | Array with all deeper categories |
- Author
- Olaf Niemann
Jan Lengowski - Copyright
- four for business AG
conDeleteart(int $idart) : voidDelete an Article
| Name | Type | Description |
|---|---|---|
| $idart | int | Article Id |
- Author
- Olaf Niemann
Jan Lengowski - Copyright
- four for business AG
conEditArt(mixed $idcat, $idcatnew, $idart, $is_start, $idtpl, $idartlang, $idlang, $title, $summary, $artspec, $created, $lastmodified, $author, $online, $datestart, $dateend, $artsort, $keyart = 0) : voidEdit an existing article
| Name | Type | Description |
|---|---|---|
| $idcat | mixed | many |
| $idcatnew | ||
| $idart | ||
| $is_start | ||
| $idtpl | ||
| $idartlang | ||
| $idlang | ||
| $title | ||
| $summary | ||
| $artspec | ||
| $created | ||
| $lastmodified | ||
| $author | ||
| $online | ||
| $datestart | ||
| $dateend | ||
| $artsort | ||
| $keyart |
- Author
- Olaf Niemann
- Copyright
- four for business AG
conEditFirstTime(mixed $idcat, $idcatnew, $idart, $is_start, $idtpl, $idartlang, $idlang, $title, $summary, $artspec, $created, $lastmodified, $author, $online, $datestart, $dateend, $artsort, $keyart = 0) : intCreate a new Article
| Name | Type | Description |
|---|---|---|
| $idcat | mixed | many |
| $idcatnew | ||
| $idart | ||
| $is_start | ||
| $idtpl | ||
| $idartlang | ||
| $idlang | ||
| $title | ||
| $summary | ||
| $artspec | ||
| $created | ||
| $lastmodified | ||
| $author | ||
| $online | ||
| $datestart | ||
| $dateend | ||
| $artsort | ||
| $keyart |
| Type | Description |
|---|---|
| int | Id of the new article |
- Author
- Olaf Niemann
- Copyright
- four for business AG
conFetchCategoryTree( $client = false, $lang = false) : void| Name | Type | Description |
|---|---|---|
| $client | ||
| $lang |
conFlagOnOffline() : voidSet articles on/offline for the time management function
- Author
- Timo A. Hummel
- Copyright
- four for business AG 2003
conGenerateCodeForAllArts() : voidCreate code for all articles
- Author
- Jan Lengowski
- Copyright
- four for business AG 2003
conGenerateCodeForAllArtsInCategory(int $idcat) : voidGenerate code for all articles in a category
| Name | Type | Description |
|---|---|---|
| $idcat | int | Category ID |
- Author
- Jan Lengowski
- Copyright
- four for business AG 2003
conGenerateCodeForAllArtsUsingTemplate(int $idtpl) : voidGenerate code for all articles using one template
| Name | Type | Description |
|---|---|---|
| $idtpl | int | Template-Id |
- Author
- Jan Lengowski
- Copyright
- four for business AG 2003
conGenerateCodeForAllartsUsingLayout(int $idlay) : voidCreate code for all arts using the same layout
| Name | Type | Description |
|---|---|---|
| $idlay | int | Layout-ID |
- Author
- Jan Lengowski
- Copyright
- four for business AG 2003
conGenerateCodeForAllartsUsingMod(int $idmod) : voidCreate code for all articles using the same module
| Name | Type | Description |
|---|---|---|
| $idmod | int | Module id |
- Author
- Jan Lengowski
- Copyright
- four for business AG 2003
conGenerateCodeForArtInAllCategories(int $idart) : voidCreate code for one article in all categorys
| Name | Type | Description |
|---|---|---|
| $idart | int | Article ID |
- Author
- Jan Lengowski
- Copyright
- four for business AG 2003
conGenerateCodeForClient() : voidGenerate code for the active client
- Author
- Jan Lengowski
- Copyright
- four for business AG 2003
conGetCategoryAssignments(\idart $idart, \db $db = false) : arrayReturns all categories in which the given article is in.
| Name | Type | Description |
|---|---|---|
| $idart | \idart | int Article ID |
| $db | \db | object Optional; if specified, uses the given db object |
| Type | Description |
|---|---|
| array | Flat array which contains all category id's |
conLock(int $idart, \ing $lang) : voidToggle the lock status of an article
| Name | Type | Description |
|---|---|---|
| $idart | int | Article Id |
| $lang | \ing | Language Id |
conMakeArticleIndex( $idartlang, integer $idart) : voidgenerate index of article content
added by stese removed from function conSaveContentEntry before Touch the article to update last modified date
| Name | Type | Description |
|---|---|---|
| $idartlang | ||
| $idart | integer |
- See
- \global\conSaveContentEntry
conMakeCatOnline(int $idcat, int $lang, int $status) : voidToggle the online status of a category
| Name | Type | Description |
|---|---|---|
| $idcat | int | id of the category |
| $lang | int | id of the language |
| $status | int | status of the category |
- Author
- Jan Lengowski
- Copyright
- four for business AG
conMakeOnline(int $idart, \ing $lang) : voidToggle the online status of an article
| Name | Type | Description |
|---|---|---|
| $idart | int | Article Id |
| $lang | \ing | Language Id |
- Author
- Olaf Niemann
Jan Lengowski - Copyright
- four for business AG
conMakePublic(int | int $idcat, $lang, $public) : voidToggle the public status of a category
Almost the same function as strMakePublic in functions.str.php (conDeeperCategoriesArray instead of strDeeperCategoriesArray)
| Name | Type | Description |
|---|---|---|
| $idcat | int | int | Article Id |
| $lang | ||
| $public |
- Author
- Olaf Niemann
Jan Lengowski - Copyright
- four for business AG
conMakeStart(int $idcatart, $is_start) : voidSet a start-article
| Name | Type | Description |
|---|---|---|
| $idcatart | int | Idcatart of the article |
| $is_start |
- Author
- Olaf Niemann
Jan Lengowski - Copyright
- four for business AG
conMoveArticles() : voidMove articles for the time management function
- Author
- Timo A. Hummel
- Copyright
- four for business AG 2003
conSaveContentEntry(integer $idartlang, string $type, integer $typeid, string $value, $bForce = false) : voidSave a content element and generate index
| Name | Type | Description |
|---|---|---|
| $idartlang | integer | idartlang of the article |
| $type | string | Type of content element |
| $typeid | integer | Serial number of the content element |
| $value | string | Content |
| $bForce |
- Author
- Olaf Niemann
Jan Lengowski - Copyright
- four for business AG
conSetCodeFlag(int $idcatart) : voidSet code creation flag to true
| Name | Type | Description |
|---|---|---|
| $idcatart | int | Contenido Category-Article-ID |
- Author
- Jan Lengowski
- Copyright
- four for business AG 2003
conSyncArticle( $idart, $srclang, $dstlang) : void| Name | Type | Description |
|---|---|---|
| $idart | ||
| $srclang | ||
| $dstlang |
extractNumber(string $string) : voidExtract a number from a string
| Name | Type | Description |
|---|---|---|
| $string | string | String var by reference |
- Author
- Olaf Niemann
Jan Lengowski - Copyright
- four for business AG