Added feature #14465: Make use of the new sprite API through the TYPO3 core (thanks...
[Packages/TYPO3.CMS.git] / typo3 / sysext / cms / layout / db_new_content_el.php
1 <?php
2 /***************************************************************
3 * Copyright notice
4 *
5 * (c) 1999-2009 Kasper Skaarhoj (kasperYYYY@typo3.com)
6 * All rights reserved
7 *
8 * This script is part of the TYPO3 project. The TYPO3 project is
9 * free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License as published by
11 * the Free Software Foundation; either version 2 of the License, or
12 * (at your option) any later version.
13 *
14 * The GNU General Public License can be found at
15 * http://www.gnu.org/copyleft/gpl.html.
16 * A copy is found in the textfile GPL.txt and important notices to the license
17 * from the author is found in LICENSE.txt distributed with these scripts.
18 *
19 *
20 * This script is distributed in the hope that it will be useful,
21 * but WITHOUT ANY WARRANTY; without even the implied warranty of
22 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
23 * GNU General Public License for more details.
24 *
25 * This copyright notice MUST APPEAR in all copies of the script!
26 ***************************************************************/
27 /**
28 * New content elements wizard
29 * (Part of the 'cms' extension)
30 *
31 * $Id$
32 * Revised for TYPO3 3.6 November/2003 by Kasper Skaarhoj
33 * XHTML compatible.
34 *
35 * @author Kasper Skaarhoj <kasperYYYY@typo3.com>
36 */
37 /**
38 * [CLASS/FUNCTION INDEX of SCRIPT]
39 *
40 *
41 *
42 * 101: class ext_posMap extends t3lib_positionMap
43 * 111: function wrapRecordTitle($str,$row)
44 * 125: function onClickInsertRecord($row,$vv,$moveUid,$pid,$sys_lang=0)
45 *
46 *
47 * 153: class SC_db_new_content_el
48 * 176: function init()
49 * 212: function main()
50 * 359: function printContent()
51 *
52 * SECTION: OTHER FUNCTIONS:
53 * 388: function getWizardItems()
54 * 398: function wizardArray()
55 * 549: function removeInvalidElements(&$wizardItems)
56 *
57 * TOTAL FUNCTIONS: 8
58 * (This index is automatically created/updated by the extension "extdeveval")
59 *
60 */
61
62
63 unset($MCONF);
64 require('conf.php');
65 require($BACK_PATH.'init.php');
66 require($BACK_PATH.'template.php');
67
68 // Unset MCONF/MLANG since all we wanted was back path etc. for this particular script.
69 unset($MCONF);
70 unset($MLANG);
71
72 // Merging locallang files/arrays:
73 $LANG->includeLLFile('EXT:lang/locallang_misc.xml');
74 $LOCAL_LANG_orig = $LOCAL_LANG;
75 $LANG->includeLLFile('EXT:cms/layout/locallang_db_new_content_el.xml');
76 $LOCAL_LANG = t3lib_div::array_merge_recursive_overrule($LOCAL_LANG_orig,$LOCAL_LANG);
77
78 // Exits if 'cms' extension is not loaded:
79 t3lib_extMgm::isLoaded('cms',1);
80
81
82
83
84
85
86
87 /**
88 * Local position map class
89 *
90 * @author Kasper Skaarhoj <kasperYYYY@typo3.com>
91 * @package TYPO3
92 * @subpackage core
93 */
94 class ext_posMap extends t3lib_positionMap {
95 var $dontPrintPageInsertIcons = 1;
96
97 /**
98 * Wrapping the title of the record - here we just return it.
99 *
100 * @param string The title value.
101 * @param array The record row.
102 * @return string Wrapped title string.
103 */
104 function wrapRecordTitle($str,$row) {
105 return $str;
106 }
107
108 /**
109 * Create on-click event value.
110 *
111 * @param array The record.
112 * @param string Column position value.
113 * @param integer Move uid
114 * @param integer PID value.
115 * @param integer System language
116 * @return string
117 */
118 function onClickInsertRecord($row,$vv,$moveUid,$pid,$sys_lang=0) {
119 $table='tt_content';
120
121 $location=$this->backPath.'alt_doc.php?edit[tt_content]['.(is_array($row)?-$row['uid']:$pid).']=new&defVals[tt_content][colPos]='.$vv.'&defVals[tt_content][sys_language_uid]='.$sys_lang.'&returnUrl='.rawurlencode($GLOBALS['SOBE']->R_URI);
122
123 return 'window.location.href=\''.$location.'\'+document.editForm.defValues.value; return false;';
124 }
125 }
126
127
128
129
130
131
132
133
134
135
136
137
138
139 /**
140 * Script Class for the New Content element wizard
141 *
142 * @author Kasper Skaarhoj <kasperYYYY@typo3.com>
143 * @package TYPO3
144 * @subpackage core
145 */
146 class SC_db_new_content_el {
147
148 // Internal, static (from GPvars):
149 var $id; // Page id
150 var $sys_language=0; // Sys language
151 var $R_URI=''; // Return URL.
152 var $colPos; // If set, the content is destined for a specific column.
153 var $uid_pid; //
154
155 // Internal, static:
156 var $modTSconfig=array(); // Module TSconfig.
157
158 /**
159 * Internal backend template object
160 *
161 * @var mediumDoc
162 */
163 var $doc;
164
165 // Internal, dynamic:
166 var $include_once = array(); // Includes a list of files to include between init() and main() - see init()
167 var $content; // Used to accumulate the content of the module.
168 var $access; // Access boolean.
169 var $config; // config of the wizard
170
171
172 /**
173 * Constructor, initializing internal variables.
174 *
175 * @return void
176 */
177 function init() {
178 global $BE_USER,$BACK_PATH,$TBE_MODULES_EXT;
179
180 // Setting class files to include:
181 if (is_array($TBE_MODULES_EXT['xMOD_db_new_content_el']['addElClasses'])) {
182 $this->include_once = array_merge($this->include_once,$TBE_MODULES_EXT['xMOD_db_new_content_el']['addElClasses']);
183 }
184
185 // Setting internal vars:
186 $this->id = intval(t3lib_div::_GP('id'));
187 $this->sys_language = intval(t3lib_div::_GP('sys_language_uid'));
188 $this->R_URI = t3lib_div::_GP('returnUrl');
189 $this->colPos = t3lib_div::_GP('colPos');
190 $this->uid_pid = intval(t3lib_div::_GP('uid_pid'));
191
192 $this->MCONF['name'] = 'xMOD_db_new_content_el';
193 $this->modTSconfig = t3lib_BEfunc::getModTSconfig($this->id, 'mod.wizards.newContentElement');
194
195 $config = t3lib_BEfunc::getPagesTSconfig($this->id);
196 $this->config = $config['mod.']['wizards.']['newContentElement.'];
197
198 // Starting the document template object:
199 $this->doc = t3lib_div::makeInstance('template');
200 $this->doc->backPath = $BACK_PATH;
201 $this->doc->setModuleTemplate('templates/db_new_content_el.html');
202 $this->doc->JScode='';
203 $this->doc->JScodeLibArray['dyntabmenu'] = $this->doc->getDynTabMenuJScode();
204 $this->doc->form='<form action="" name="editForm"><input type="hidden" name="defValues" value="" />';
205
206 // Setting up the context sensitive menu:
207 $this->doc->getContextMenuCode();
208
209 // Getting the current page and receiving access information (used in main())
210 $perms_clause = $BE_USER->getPagePermsClause(1);
211 $this->pageinfo = t3lib_BEfunc::readPageAccess($this->id,$perms_clause);
212 $this->access = is_array($this->pageinfo) ? 1 : 0;
213 }
214
215 /**
216 * Creating the module output.
217 *
218 * @return void
219 */
220 function main() {
221 global $LANG,$BACK_PATH;
222
223
224 if ($this->id && $this->access) {
225
226 // Init position map object:
227 $posMap = t3lib_div::makeInstance('ext_posMap');
228 $posMap->cur_sys_language = $this->sys_language;
229 $posMap->backPath = $BACK_PATH;
230
231 if ((string)$this->colPos!='') { // If a column is pre-set:
232 if ($this->uid_pid<0) {
233 $row=array();
234 $row['uid']=abs($this->uid_pid);
235 } else {
236 $row='';
237 }
238 $this->onClickEvent = $posMap->onClickInsertRecord($row, $this->colPos, '', $this->uid_pid, $this->sys_language);
239 } else {
240 $this->onClickEvent = '';
241 }
242
243
244 // ***************************
245 // Creating content
246 // ***************************
247 // use a wrapper div
248 $this->content .= '<div id="user-setup-wrapper">';
249 $this->content.=$this->doc->header($LANG->getLL('newContentElement'));
250 $this->content.=$this->doc->spacer(5);
251
252 // Wizard
253 $code='';
254 $wizardItems = $this->getWizardItems();
255
256 // Wrapper for wizards
257 $this->elementWrapper['sectionHeader'] = array('<h3 class="bgColor5">', '</h3>');
258 $this->elementWrapper['section'] = array('<table border="0" cellpadding="1" cellspacing="2">', '</table>');
259 $this->elementWrapper['wizard'] = array('<tr>', '</tr>');
260 $this->elementWrapper['wizardPart'] = array('<td>', '</td>');
261 // copy wrapper for tabs
262 $this->elementWrapperForTabs = $this->elementWrapper;
263
264
265 // Hook for manipulating wizardItems, wrapper, onClickEvent etc.
266 if(is_array($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['cms']['db_new_content_el']['wizardItemsHook'])) {
267 foreach($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['cms']['db_new_content_el']['wizardItemsHook'] as $classData) {
268 $hookObject = t3lib_div::getUserObj($classData);
269
270 if(!($hookObject instanceof cms_newContentElementWizardsHook)) {
271 throw new UnexpectedValueException('$hookObject must implement interface cms_newContentElementWizardItemsHook', 1227834741);
272 }
273
274 $hookObject->manipulateWizardItems($wizardItems, $this);
275 }
276 }
277
278 if ($this->config['renderMode'] == 'tabs' && $this->elementWrapperForTabs != $this->elementWrapper) {
279 // restore wrapper for tabs if they are overwritten in hook
280 $this->elementWrapper = $this->elementWrapperForTabs;
281 }
282
283 // add document inline javascript
284 $this->doc->JScode = $this->doc->wrapScriptTags('
285 function goToalt_doc() { //
286 ' . $this->onClickEvent . '
287 }
288
289 if(top.refreshMenu) {
290 top.refreshMenu();
291 } else {
292 top.TYPO3ModuleMenu.refreshMenu();
293 }
294
295 if(top.shortcutFrame) {
296 top.shortcutFrame.refreshShortcuts();
297 }
298 ');
299
300 // Traverse items for the wizard.
301 // An item is either a header or an item rendered with a radio button and title/description and icon:
302 $cc = $key = 0;
303 $menuItems = array();
304 foreach ($wizardItems as $k => $wInfo) {
305 if ($wInfo['header']) {
306 $menuItems[] = array(
307 'label' => htmlspecialchars($wInfo['header']),
308 'content' => $this->elementWrapper['section'][0]
309 );
310 $key = count($menuItems) - 1;
311 } else {
312 $content = '';
313 // Radio button:
314 $oC = "document.editForm.defValues.value=unescape('".rawurlencode($wInfo['params'])."');goToalt_doc();".(!$this->onClickEvent?"window.location.hash='#sel2';":'');
315 $content .= $this->elementWrapper['wizardPart'][0] .
316 '<input type="radio" name="tempB" value="' . htmlspecialchars($k) . '" onclick="' . htmlspecialchars($this->doc->thisBlur().$oC) . '" />' .
317 $this->elementWrapper['wizardPart'][1];
318
319 // Onclick action for icon/title:
320 $aOnClick = 'document.getElementsByName(\'tempB\')['.$cc.'].checked=1;'.$this->doc->thisBlur().$oC.'return false;';
321
322 // Icon:
323 $iInfo = @getimagesize($wInfo['icon']);
324 $content .= $this->elementWrapper['wizardPart'][0] .
325 '<a href="#" onclick="' . htmlspecialchars($aOnClick) . '">
326 <img' . t3lib_iconWorks::skinImg($this->doc->backPath, $wInfo['icon'], '') . ' alt="" /></a>' .
327 $this->elementWrapper['wizardPart'][1];
328
329 // Title + description:
330 $content .= $this->elementWrapper['wizardPart'][0] .
331 '<a href="#" onclick="' . htmlspecialchars($aOnClick) . '"><strong>' . htmlspecialchars($wInfo['title']) . '</strong><br />' .
332 nl2br(htmlspecialchars(trim($wInfo['description']))) . '</a>' .
333 $this->elementWrapper['wizardPart'][1];
334
335 // Finally, put it together in a container:
336 $menuItems[$key]['content'] .= $this->elementWrapper['wizard'][0] . $content . $this->elementWrapper['wizard'][1];
337 $cc++;
338 }
339 }
340 // add closing section-tag
341 foreach ($menuItems as $key => $val) {
342 $menuItems[$key]['content'] .= $this->elementWrapper['section'][1];
343 }
344
345
346
347 // Add the wizard table to the content, wrapped in tabs:
348 if ($this->config['renderMode'] == 'tabs') {
349 $this->doc->inDocStylesArray[] = '
350 .typo3-dyntabmenu-divs { background-color: #fafafa; border: 1px solid #000; width: 680px; }
351 .typo3-dyntabmenu-divs table { margin: 15px; }
352 .typo3-dyntabmenu-divs table td { padding: 3px; }
353 ';
354 $code = $LANG->getLL('sel1',1) . '<br /><br />' . $this->doc->getDynTabMenu($menuItems, 'new-content-element-wizard', false, false, 100);
355 } else {
356 $code = $LANG->getLL('sel1',1) . '<br /><br />';
357 foreach ($menuItems as $section) {
358 $code .= $this->elementWrapper['sectionHeader'][0] . $section['label'] . $this->elementWrapper['sectionHeader'][1] . $section['content'];
359 }
360 }
361
362 $this->content.= $this->doc->section(!$this->onClickEvent ? $LANG->getLL('1_selectType') : '', $code, 0, 1);
363
364
365
366 // If the user must also select a column:
367 if (!$this->onClickEvent) {
368
369 // Add anchor "sel2"
370 $this->content.= $this->doc->section('','<a name="sel2"></a>');
371 $this->content.= $this->doc->spacer(20);
372
373 // Select position
374 $code = $LANG->getLL('sel2',1).'<br /><br />';
375
376 // Load SHARED page-TSconfig settings and retrieve column list from there, if applicable:
377 $modTSconfig_SHARED = t3lib_BEfunc::getModTSconfig($this->id,'mod.SHARED');
378 $colPosList = strcmp(trim($modTSconfig_SHARED['properties']['colPos_list']),'') ? trim($modTSconfig_SHARED['properties']['colPos_list']) : '1,0,2,3';
379 $colPosList = implode(',',array_unique(t3lib_div::intExplode(',',$colPosList))); // Removing duplicates, if any
380
381 // Finally, add the content of the column selector to the content:
382 $code.= $posMap->printContentElementColumns($this->id,0,$colPosList,1,$this->R_URI);
383 $this->content.= $this->doc->section($LANG->getLL('2_selectPosition'),$code,0,1);
384 }
385 } else { // In case of no access:
386 $this->content = '';
387 $this->content.= $this->doc->header($LANG->getLL('newContentElement'));
388 $this->content.= $this->doc->spacer(5);
389 }
390
391 // Setting up the buttons and markers for docheader
392 $docHeaderButtons = $this->getButtons();
393 $markers['CSH'] = $docHeaderButtons['csh'];
394 $markers['CONTENT'] = $this->content;
395
396 // Build the <body> for the module
397 $this->content = $this->doc->startPage($LANG->getLL('newContentElement'));
398 $this->content.= $this->doc->moduleBody($this->pageinfo, $docHeaderButtons, $markers);
399 $this->content .= $this->doc->sectionEnd();
400 $this->content.= $this->doc->endPage();
401 $this->content = $this->doc->insertStylesAndJS($this->content);
402 }
403
404 /**
405 * Print out the accumulated content:
406 *
407 * @return void
408 */
409 function printContent() {
410 echo $this->content;
411 }
412
413 /**
414 * Create the panel of buttons for submitting the form or otherwise perform operations.
415 *
416 * @return array all available buttons as an assoc. array
417 */
418 protected function getButtons() {
419 global $LANG, $BACK_PATH;
420
421 $buttons = array(
422 'csh' => '',
423 'back' => ''
424 );
425
426
427 if ($this->id && $this->access) {
428 // CSH
429 $buttons['csh'] = t3lib_BEfunc::cshItem('xMOD_csh_corebe', 'new_ce', $GLOBALS['BACK_PATH'], '', TRUE);
430
431 // Back
432 if ($this->R_URI) {
433 $buttons['back'] = '<a href="' . htmlspecialchars($this->R_URI) . '" class="typo3-goBack" title="' . $LANG->getLL('goBack', TRUE) . '">' .
434 t3lib_iconWorks::getSpriteIcon('actions-go-back') .
435 '</a>';
436 }
437 }
438
439
440 return $buttons;
441 }
442
443
444
445
446
447
448
449
450
451 /***************************
452 *
453 * OTHER FUNCTIONS:
454 *
455 ***************************/
456
457
458 /**
459 * Returns the content of wizardArray() function...
460 *
461 * @return array Returns the content of wizardArray() function...
462 */
463 function getWizardItems() {
464 return $this->wizardArray();
465 }
466
467 /**
468 * Returns the array of elements in the wizard display.
469 * For the plugin section there is support for adding elements there from a global variable.
470 *
471 * @return array
472 */
473 function wizardArray() {
474
475 if (is_array($this->config)) {
476 $wizards = $this->config['wizardItems.'];
477 }
478 $appendWizards = $this->wizard_appendWizards($wizards['elements.']);
479
480 $wizardItems = array();
481
482 if (is_array($wizards)) {
483 foreach ($wizards as $groupKey => $wizardGroup) {
484 $groupKey = preg_replace('/\.$/', '', $groupKey);
485 $showItems = t3lib_div::trimExplode(',', $wizardGroup['show'], true);
486 $showAll = (strcmp($wizardGroup['show'], '*') ? false : true);
487 $groupItems = array();
488
489 if (is_array($appendWizards[$groupKey . '.']['elements.'])) {
490 $wizardElements = array_merge((array) $wizardGroup['elements.'], $appendWizards[$groupKey . '.']['elements.']);
491 } else {
492 $wizardElements = $wizardGroup['elements.'];
493 }
494
495 if (is_array($wizardElements)) {
496 foreach ($wizardElements as $itemKey => $itemConf) {
497 $itemKey = preg_replace('/\.$/', '', $itemKey);
498 if ($showAll || in_array($itemKey, $showItems)) {
499 $tmpItem = $this->wizard_getItem($groupKey, $itemKey, $itemConf);
500 if ($tmpItem) {
501 $groupItems[$groupKey . '_' . $itemKey] = $tmpItem;
502 }
503 }
504 }
505 }
506 if (count($groupItems)) {
507 $wizardItems[$groupKey] = $this->wizard_getGroupHeader($groupKey, $wizardGroup);
508 $wizardItems = array_merge($wizardItems, $groupItems);
509 }
510 }
511 }
512
513 // Remove elements where preset values are not allowed:
514 $this->removeInvalidElements($wizardItems);
515
516 return $wizardItems;
517 }
518
519 function wizard_appendWizards($wizardElements) {
520 if (!is_array($wizardElements)) {
521 $wizardElements = array();
522 }
523 if (is_array($GLOBALS['TBE_MODULES_EXT']['xMOD_db_new_content_el']['addElClasses'])) {
524 foreach ($GLOBALS['TBE_MODULES_EXT']['xMOD_db_new_content_el']['addElClasses'] as $class => $path) {
525 require_once($path);
526 $modObj = t3lib_div::makeInstance($class);
527 $wizardElements = $modObj->proc($wizardElements);
528 }
529 }
530 $returnElements = array();
531 foreach ($wizardElements as $key => $wizardItem) {
532 preg_match('/^[a-zA-Z0-9]+_/', $key, $group);
533 $wizardGroup = $group[0] ? substr($group[0], 0, -1) . '.' : $key;
534 $returnElements[$wizardGroup]['elements.'][substr($key, strlen($wizardGroup)) . '.'] = $wizardItem;
535 }
536 return $returnElements;
537 }
538
539
540 function wizard_getItem($groupKey, $itemKey, $itemConf) {
541 $itemConf['title'] = $GLOBALS['LANG']->sL($itemConf['title']);
542 $itemConf['description'] = $GLOBALS['LANG']->sL($itemConf['description']);
543 $itemConf['tt_content_defValues'] = $itemConf['tt_content_defValues.'];
544 unset($itemConf['tt_content_defValues.']);
545 return $itemConf;
546 }
547
548 function wizard_getGroupHeader($groupKey, $wizardGroup) {
549 return array(
550 'header' => $GLOBALS['LANG']->sL($wizardGroup['header'])
551 );
552 }
553
554
555 /**
556 * Checks the array for elements which might contain unallowed default values and will unset them!
557 * Looks for the "tt_content_defValues" key in each element and if found it will traverse that array as fieldname / value pairs and check. The values will be added to the "params" key of the array (which should probably be unset or empty by default).
558 *
559 * @param array Wizard items, passed by reference
560 * @return void
561 */
562 function removeInvalidElements(&$wizardItems) {
563 global $TCA;
564
565 // Load full table definition:
566 t3lib_div::loadTCA('tt_content');
567
568 // Get TCEFORM from TSconfig of current page
569 $row = array('pid' => $this->id);
570 $TCEFORM_TSconfig = t3lib_BEfunc::getTCEFORM_TSconfig('tt_content', $row);
571 $removeItems = t3lib_div::trimExplode(',', $TCEFORM_TSconfig['CType']['removeItems'], 1);
572 $keepItems = t3lib_div::trimExplode(',', $TCEFORM_TSconfig['CType']['keepItems'], 1);
573
574 $headersUsed = Array();
575 // Traverse wizard items:
576 foreach($wizardItems as $key => $cfg) {
577
578 // Exploding parameter string, if any (old style)
579 if ($wizardItems[$key]['params']) {
580 // Explode GET vars recursively
581 $tempGetVars = t3lib_div::explodeUrl2Array($wizardItems[$key]['params'],TRUE);
582 // If tt_content values are set, merge them into the tt_content_defValues array, unset them from $tempGetVars and re-implode $tempGetVars into the param string (in case remaining parameters are around).
583 if (is_array($tempGetVars['defVals']['tt_content'])) {
584 $wizardItems[$key]['tt_content_defValues'] = array_merge(is_array($wizardItems[$key]['tt_content_defValues']) ? $wizardItems[$key]['tt_content_defValues'] : array(), $tempGetVars['defVals']['tt_content']);
585 unset($tempGetVars['defVals']['tt_content']);
586 $wizardItems[$key]['params'] = t3lib_div::implodeArrayForUrl('',$tempGetVars);
587 }
588 }
589
590 // If tt_content_defValues are defined...:
591 if (is_array($wizardItems[$key]['tt_content_defValues'])) {
592
593 // Traverse field values:
594 foreach($wizardItems[$key]['tt_content_defValues'] as $fN => $fV) {
595 if (is_array($TCA['tt_content']['columns'][$fN])) {
596 // Get information about if the field value is OK:
597 $config = &$TCA['tt_content']['columns'][$fN]['config'];
598 $authModeDeny = ($config['type']=='select' && $config['authMode'] && !$GLOBALS['BE_USER']->checkAuthMode('tt_content', $fN, $fV, $config['authMode']));
599 $isNotInKeepItems = (count($keepItems) && !in_array($fV, $keepItems));
600
601 if ($authModeDeny || ($fN=='CType' && in_array($fV,$removeItems)) || $isNotInKeepItems) {
602 // Remove element all together:
603 unset($wizardItems[$key]);
604 break;
605 } else {
606 // Add the parameter:
607 $wizardItems[$key]['params'].= '&defVals[tt_content]['.$fN.']='.rawurlencode($fV);
608 $tmp = explode('_', $key);
609 $headersUsed[$tmp[0]] = $tmp[0];
610 }
611 }
612 }
613 }
614 }
615 // remove headers without elements
616 foreach ($wizardItems as $key => $cfg) {
617 $tmp = explode('_',$key);
618 if ($tmp[0] && !$tmp[1] && !in_array($tmp[0], $headersUsed)) {
619 unset($wizardItems[$key]);
620 }
621 }
622 }
623 }
624
625
626 if (defined('TYPO3_MODE') && $TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['ext/cms/layout/db_new_content_el.php']) {
627 include_once($TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['ext/cms/layout/db_new_content_el.php']);
628 }
629
630
631
632 // Make instance:
633 $SOBE = t3lib_div::makeInstance('SC_db_new_content_el');
634 $SOBE->init();
635
636 // Include files?
637 foreach($SOBE->include_once as $INC_FILE) include_once($INC_FILE);
638
639 $SOBE->main();
640 $SOBE->printContent();
641
642 ?>