Feature #36243 ยป own_constants_subcategories.diff
typo3_src-4.6.7/t3lib/class.t3lib_tsparser_ext.php 2012-04-17 20:27:53.505029098 +0200 | ||
---|---|---|
'color' => Array('Colors', 'e'),
|
||
'links' => Array('Links and targets', 'f'),
|
||
'language' => Array('Language specific constants', 'g'),
|
||
'' => Array('Others', 'h'),
|
||
// subcategories based on the default content elements
|
||
'cheader' => Array('Content: \'Header\'', 'ma'),
|
||
... | ... | |
break;
|
||
case 'cat':
|
||
// list of categories.
|
||
$catSplit = explode('/', strtolower($keyValPair[1]));
|
||
$catSplit = explode('/', $keyValPair[1]);
|
||
$editableComments[$const]['cat'] = trim($catSplit[0]);
|
||
$catSplit[1] = trim($catSplit[1]); // This is the subcategory. Must be a key in $this->subCategories[]. catSplit[2] represents the search-order within the subcat.
|
||
if ($catSplit[1] && isset($this->subCategories[$catSplit[1]])) {
|
||
$editableComments[$const]['subcat_name'] = $catSplit[1];
|
||
$editableComments[$const]['subcat'] = $this->subCategories[$catSplit[1]][1] . '/' .
|
||
$catSplit[1] . '/' . trim($catSplit[2]) . 'z';
|
||
if (isset($this->subCategories[strtolower($catSplit[1])])) {
|
||
$editableComments[$const]['subcat_name'] = $this->subCategories[strtolower($catSplit[1])][0];
|
||
$editableComments[$const]['subcat'] = $this->subCategories[strtolower($catSplit[1])][1] . '/' . $catSplit[1] . '/' . trim($catSplit[2]) . 'z';
|
||
} else {
|
||
$editableComments[$const]['subcat'] = 'x' . '/' . trim($catSplit[2]) . 'z';
|
||
$editableComments[$const]['subcat_name'] = $catSplit[1];
|
||
$editableComments[$const]['subcat'] = $catSplit[1] . '/' . trim($catSplit[2]) . 'z';
|
||
}
|
||
break;
|
||
case 'label':
|
||
... | ... | |
if (is_array($params)) {
|
||
if ($subcat != $params['subcat_name']) {
|
||
$subcat = $params['subcat_name'];
|
||
$subcat_name = $params['subcat_name'] ? $this->subCategories[$params['subcat_name']][0] : 'Others';
|
||
$subcat_name = $params['subcat_name'];
|
||
$output .= '<h2 class="typo3-tstemplate-ceditor-subcat">' . $subcat_name . '</h2>';
|
||
}
|