MS-DOS line ending fix
authorErnesto Baschny <ernst@cron-it.de>
Wed, 27 Oct 2010 18:53:02 +0000 (18:53 +0000)
committerErnesto Baschny <ernst@cron-it.de>
Wed, 27 Oct 2010 18:53:02 +0000 (18:53 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Core/trunk@9214 709f56b5-9817-0410-a4d7-c38de5d9e867

33 files changed:
typo3/sysext/cms/tslib/content/class.tslib_content_abstract.php
typo3/sysext/cms/tslib/content/class.tslib_content_case.php
typo3/sysext/cms/tslib/content/class.tslib_content_cleargif.php
typo3/sysext/cms/tslib/content/class.tslib_content_columns.php
typo3/sysext/cms/tslib/content/class.tslib_content_content.php
typo3/sysext/cms/tslib/content/class.tslib_content_contentobjectarray.php
typo3/sysext/cms/tslib/content/class.tslib_content_contentobjectarray_internal.php
typo3/sysext/cms/tslib/content/class.tslib_content_contenttable.php
typo3/sysext/cms/tslib/content/class.tslib_content_file.php
typo3/sysext/cms/tslib/content/class.tslib_content_fluidtemplate.php
typo3/sysext/cms/tslib/content/class.tslib_content_form.php
typo3/sysext/cms/tslib/content/class.tslib_content_hierarchicalmenu.php
typo3/sysext/cms/tslib/content/class.tslib_content_horizontalruler.php
typo3/sysext/cms/tslib/content/class.tslib_content_html.php
typo3/sysext/cms/tslib/content/class.tslib_content_image.php
typo3/sysext/cms/tslib/content/class.tslib_content_imageresource.php
typo3/sysext/cms/tslib/content/class.tslib_content_imagetext.php
typo3/sysext/cms/tslib/content/class.tslib_content_loadregister.php
typo3/sysext/cms/tslib/content/class.tslib_content_media.php
typo3/sysext/cms/tslib/content/class.tslib_content_multimedia.php
typo3/sysext/cms/tslib/content/class.tslib_content_offsettable.php
typo3/sysext/cms/tslib/content/class.tslib_content_phpscript.php
typo3/sysext/cms/tslib/content/class.tslib_content_phpscript_internal.php
typo3/sysext/cms/tslib/content/class.tslib_content_quicktimeobject.php
typo3/sysext/cms/tslib/content/class.tslib_content_records.php
typo3/sysext/cms/tslib/content/class.tslib_content_restoreregister.php
typo3/sysext/cms/tslib/content/class.tslib_content_scalablevectorgraphics.php
typo3/sysext/cms/tslib/content/class.tslib_content_searchresult.php
typo3/sysext/cms/tslib/content/class.tslib_content_shockwaveflashobject.php
typo3/sysext/cms/tslib/content/class.tslib_content_template.php
typo3/sysext/cms/tslib/content/class.tslib_content_text.php
typo3/sysext/cms/tslib/content/class.tslib_content_user.php
typo3/sysext/cms/tslib/content/class.tslib_content_user_internal.php

index 97cb2c0..61d5bd2 100644 (file)
@@ -1,62 +1,62 @@
-<?php\r
-/***************************************************************\r
- *  Copyright notice\r
- *\r
- *  (c) 2010 Xavier Perseguers <typo3@perseguers.ch>\r
- *  (c) 2010 Steffen Kamper <steffen@typo3.org>\r
- *  All rights reserved\r
- *\r
- *  This script is part of the TYPO3 project. The TYPO3 project is\r
- *  free software; you can redistribute it and/or modify\r
- *  it under the terms of the GNU General Public License as published by\r
- *  the Free Software Foundation; either version 2 of the License, or\r
- *  (at your option) any later version.\r
- *\r
- *  The GNU General Public License can be found at\r
- *  http://www.gnu.org/copyleft/gpl.html.\r
- *  A copy is found in the textfile GPL.txt and important notices to the license\r
- *  from the author is found in LICENSE.txt distributed with these scripts.\r
- *\r
- *\r
- *  This script is distributed in the hope that it will be useful,\r
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of\r
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\r
- *  GNU General Public License for more details.\r
- *\r
- *  This copyright notice MUST APPEAR in all copies of the script!\r
- ***************************************************************/\r
-\r
-/**\r
- * Contains an abstract class for all tslib content class implementations.\r
- *\r
- * $Id: class.tslib_content.php 7905 2010-06-13 14:42:33Z ohader $\r
- * @author Xavier Perseguers <typo3@perseguers.ch>\r
- * @author Steffen Kamper <steffen@typo3.org>\r
- */\r
-abstract class tslib_content_Abstract {\r
-\r
-       /**\r
-        * @var $cObj tslib_cObj\r
-        */\r
-       protected $cObj;\r
-\r
-       /**\r
-        * Default constructor.\r
-        *\r
-        * @param tslib_cObj $cObj\r
-        */\r
-       public function __construct(tslib_cObj $cObj) {\r
-               $this->cObj = $cObj;\r
-       }\r
-\r
-       /**\r
-        * Renders the content object.\r
-        *\r
-        * @param array $conf\r
-        * @return string\r
-        */\r
-       public abstract function render($conf = array());\r
-\r
-}\r
-\r
-?>\r
+<?php
+/***************************************************************
+ *  Copyright notice
+ *
+ *  (c) 2010 Xavier Perseguers <typo3@perseguers.ch>
+ *  (c) 2010 Steffen Kamper <steffen@typo3.org>
+ *  All rights reserved
+ *
+ *  This script is part of the TYPO3 project. The TYPO3 project is
+ *  free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.
+ *
+ *  The GNU General Public License can be found at
+ *  http://www.gnu.org/copyleft/gpl.html.
+ *  A copy is found in the textfile GPL.txt and important notices to the license
+ *  from the author is found in LICENSE.txt distributed with these scripts.
+ *
+ *
+ *  This script is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  This copyright notice MUST APPEAR in all copies of the script!
+ ***************************************************************/
+
+/**
+ * Contains an abstract class for all tslib content class implementations.
+ *
+ * $Id: class.tslib_content.php 7905 2010-06-13 14:42:33Z ohader $
+ * @author Xavier Perseguers <typo3@perseguers.ch>
+ * @author Steffen Kamper <steffen@typo3.org>
+ */
+abstract class tslib_content_Abstract {
+
+       /**
+        * @var $cObj tslib_cObj
+        */
+       protected $cObj;
+
+       /**
+        * Default constructor.
+        *
+        * @param tslib_cObj $cObj
+        */
+       public function __construct(tslib_cObj $cObj) {
+               $this->cObj = $cObj;
+       }
+
+       /**
+        * Renders the content object.
+        *
+        * @param array $conf
+        * @return string
+        */
+       public abstract function render($conf = array());
+
+}
+
+?>
index 11ee9f0..973aa1c 100644 (file)
@@ -1,67 +1,67 @@
-<?php\r
-/***************************************************************\r
- *  Copyright notice\r
- *\r
- *  (c) 2010 Xavier Perseguers <typo3@perseguers.ch>\r
- *  (c) 2010 Steffen Kamper <steffen@typo3.org>\r
- *  All rights reserved\r
- *\r
- *  This script is part of the TYPO3 project. The TYPO3 project is\r
- *  free software; you can redistribute it and/or modify\r
- *  it under the terms of the GNU General Public License as published by\r
- *  the Free Software Foundation; either version 2 of the License, or\r
- *  (at your option) any later version.\r
- *\r
- *  The GNU General Public License can be found at\r
- *  http://www.gnu.org/copyleft/gpl.html.\r
- *  A copy is found in the textfile GPL.txt and important notices to the license\r
- *  from the author is found in LICENSE.txt distributed with these scripts.\r
- *\r
- *\r
- *  This script is distributed in the hope that it will be useful,\r
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of\r
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\r
- *  GNU General Public License for more details.\r
- *\r
- *  This copyright notice MUST APPEAR in all copies of the script!\r
- ***************************************************************/\r
-\r
-/**\r
- * Contains CASE class object.\r
- *\r
- * $Id: class.tslib_content.php 7905 2010-06-13 14:42:33Z ohader $\r
- * @author Xavier Perseguers <typo3@perseguers.ch>\r
- * @author Steffen Kamper <steffen@typo3.org>\r
- */\r
-class tslib_content_Case extends tslib_content_Abstract {\r
-\r
-       /**\r
-        * Rendering the cObject, CASE\r
-        *\r
-        * @param       array           Array of TypoScript properties\r
-        * @return      string          Output\r
-        */\r
-       public function render($conf = array()) {\r
-               if ($this->cObj->checkIf($conf['if.'])) {\r
-                       if ($conf['setCurrent'] || $conf['setCurrent.']) {\r
-                               $this->cObj->data[$this->cObj->currentValKey] = $this->cObj->stdWrap($conf['setCurrent'], $conf['setCurrent.']);\r
-                       }\r
-                       $key = $this->cObj->stdWrap($conf['key'], $conf['key.']);\r
-                       $key = strlen($conf[$key]) ? $key : 'default';\r
-                       $name = $conf[$key];\r
-                       $theValue = $this->cObj->cObjGetSingle($name, $conf[$key . '.'], $key);\r
-                       if ($conf['stdWrap.']) {\r
-                               $theValue = $this->cObj->stdWrap($theValue, $conf['stdWrap.']);\r
-                       }\r
-                       return $theValue;\r
-               }\r
-       }\r
-\r
-}\r
-\r
-\r
-if (defined('TYPO3_MODE') && $TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['tslib/content/class.tslib_content_case.php']) {\r
-       include_once ($TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['tslib/content/class.tslib_content_case.php']);\r
-}\r
-\r
-?>\r
+<?php
+/***************************************************************
+ *  Copyright notice
+ *
+ *  (c) 2010 Xavier Perseguers <typo3@perseguers.ch>
+ *  (c) 2010 Steffen Kamper <steffen@typo3.org>
+ *  All rights reserved
+ *
+ *  This script is part of the TYPO3 project. The TYPO3 project is
+ *  free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.
+ *
+ *  The GNU General Public License can be found at
+ *  http://www.gnu.org/copyleft/gpl.html.
+ *  A copy is found in the textfile GPL.txt and important notices to the license
+ *  from the author is found in LICENSE.txt distributed with these scripts.
+ *
+ *
+ *  This script is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  This copyright notice MUST APPEAR in all copies of the script!
+ ***************************************************************/
+
+/**
+ * Contains CASE class object.
+ *
+ * $Id: class.tslib_content.php 7905 2010-06-13 14:42:33Z ohader $
+ * @author Xavier Perseguers <typo3@perseguers.ch>
+ * @author Steffen Kamper <steffen@typo3.org>
+ */
+class tslib_content_Case extends tslib_content_Abstract {
+
+       /**
+        * Rendering the cObject, CASE
+        *
+        * @param       array           Array of TypoScript properties
+        * @return      string          Output
+        */
+       public function render($conf = array()) {
+               if ($this->cObj->checkIf($conf['if.'])) {
+                       if ($conf['setCurrent'] || $conf['setCurrent.']) {
+                               $this->cObj->data[$this->cObj->currentValKey] = $this->cObj->stdWrap($conf['setCurrent'], $conf['setCurrent.']);
+                       }
+                       $key = $this->cObj->stdWrap($conf['key'], $conf['key.']);
+                       $key = strlen($conf[$key]) ? $key : 'default';
+                       $name = $conf[$key];
+                       $theValue = $this->cObj->cObjGetSingle($name, $conf[$key . '.'], $key);
+                       if ($conf['stdWrap.']) {
+                               $theValue = $this->cObj->stdWrap($theValue, $conf['stdWrap.']);
+                       }
+                       return $theValue;
+               }
+       }
+
+}
+
+
+if (defined('TYPO3_MODE') && $TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['tslib/content/class.tslib_content_case.php']) {
+       include_once ($TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['tslib/content/class.tslib_content_case.php']);
+}
+
+?>
index 2577671..a494377 100644 (file)
@@ -1,66 +1,66 @@
-<?php\r
-/***************************************************************\r
- *  Copyright notice\r
- *\r
- *  (c) 2010 Xavier Perseguers <typo3@perseguers.ch>\r
- *  (c) 2010 Steffen Kamper <steffen@typo3.org>\r
- *  All rights reserved\r
- *\r
- *  This script is part of the TYPO3 project. The TYPO3 project is\r
- *  free software; you can redistribute it and/or modify\r
- *  it under the terms of the GNU General Public License as published by\r
- *  the Free Software Foundation; either version 2 of the License, or\r
- *  (at your option) any later version.\r
- *\r
- *  The GNU General Public License can be found at\r
- *  http://www.gnu.org/copyleft/gpl.html.\r
- *  A copy is found in the textfile GPL.txt and important notices to the license\r
- *  from the author is found in LICENSE.txt distributed with these scripts.\r
- *\r
- *\r
- *  This script is distributed in the hope that it will be useful,\r
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of\r
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\r
- *  GNU General Public License for more details.\r
- *\r
- *  This copyright notice MUST APPEAR in all copies of the script!\r
- ***************************************************************/\r
-\r
-/**\r
- * Contains CLEARGIF class object.\r
- *\r
- * $Id: class.tslib_content.php 7905 2010-06-13 14:42:33Z ohader $\r
- * @author Xavier Perseguers <typo3@perseguers.ch>\r
- * @author Steffen Kamper <steffen@typo3.org>\r
- */\r
-class tslib_content_ClearGif extends tslib_content_Abstract {\r
-\r
-       /**\r
-        * Rendering the cObject, CLEARGIF\r
-        *\r
-        * @param       array           Array of TypoScript properties\r
-        * @return      string          Output\r
-        */\r
-       public function render($conf = array()) {\r
-               $w = $this->cObj->stdWrap($conf['width'], $conf['width.']);\r
-               $h = $this->cObj->stdWrap($conf['height'], $conf['height.']);\r
-               $w = $w ? $w : 1;\r
-               $h = $h ? $h : 1;\r
-               $wrap = $conf['wrap'] ? $conf['wrap'] : '|<br />';\r
-               $theValue = $this->cObj->wrap(\r
-                       '<img src="' . $GLOBALS['TSFE']->absRefPrefix . 'clear.gif" width="' . $w . '" height="' . $h . '"' .\r
-                       $this->cObj->getBorderAttr(' border="0"') . ' alt="" title="" />',\r
-                       $wrap\r
-               );\r
-\r
-               return $this->cObj->stdWrap($theValue, $conf['stdWrap.']);\r
-       }\r
-\r
-}\r
-\r
-\r
-if (defined('TYPO3_MODE') && $TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['tslib/content/class.tslib_content_cleargif.php']) {\r
-       include_once ($TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['tslib/content/class.tslib_content_cleargif.php']);\r
-}\r
-\r
-?>\r
+<?php
+/***************************************************************
+ *  Copyright notice
+ *
+ *  (c) 2010 Xavier Perseguers <typo3@perseguers.ch>
+ *  (c) 2010 Steffen Kamper <steffen@typo3.org>
+ *  All rights reserved
+ *
+ *  This script is part of the TYPO3 project. The TYPO3 project is
+ *  free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.
+ *
+ *  The GNU General Public License can be found at
+ *  http://www.gnu.org/copyleft/gpl.html.
+ *  A copy is found in the textfile GPL.txt and important notices to the license
+ *  from the author is found in LICENSE.txt distributed with these scripts.
+ *
+ *
+ *  This script is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  This copyright notice MUST APPEAR in all copies of the script!
+ ***************************************************************/
+
+/**
+ * Contains CLEARGIF class object.
+ *
+ * $Id: class.tslib_content.php 7905 2010-06-13 14:42:33Z ohader $
+ * @author Xavier Perseguers <typo3@perseguers.ch>
+ * @author Steffen Kamper <steffen@typo3.org>
+ */
+class tslib_content_ClearGif extends tslib_content_Abstract {
+
+       /**
+        * Rendering the cObject, CLEARGIF
+        *
+        * @param       array           Array of TypoScript properties
+        * @return      string          Output
+        */
+       public function render($conf = array()) {
+               $w = $this->cObj->stdWrap($conf['width'], $conf['width.']);
+               $h = $this->cObj->stdWrap($conf['height'], $conf['height.']);
+               $w = $w ? $w : 1;
+               $h = $h ? $h : 1;
+               $wrap = $conf['wrap'] ? $conf['wrap'] : '|<br />';
+               $theValue = $this->cObj->wrap(
+                       '<img src="' . $GLOBALS['TSFE']->absRefPrefix . 'clear.gif" width="' . $w . '" height="' . $h . '"' .
+                       $this->cObj->getBorderAttr(' border="0"') . ' alt="" title="" />',
+                       $wrap
+               );
+
+               return $this->cObj->stdWrap($theValue, $conf['stdWrap.']);
+       }
+
+}
+
+
+if (defined('TYPO3_MODE') && $TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['tslib/content/class.tslib_content_cleargif.php']) {
+       include_once ($TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['tslib/content/class.tslib_content_cleargif.php']);
+}
+
+?>
index 137dff3..3097703 100644 (file)
-<?php\r
-/***************************************************************\r
- *  Copyright notice\r
- *\r
- *  (c) 2010 Xavier Perseguers <typo3@perseguers.ch>\r
- *  (c) 2010 Steffen Kamper <steffen@typo3.org>\r
- *  All rights reserved\r
- *\r
- *  This script is part of the TYPO3 project. The TYPO3 project is\r
- *  free software; you can redistribute it and/or modify\r
- *  it under the terms of the GNU General Public License as published by\r
- *  the Free Software Foundation; either version 2 of the License, or\r
- *  (at your option) any later version.\r
- *\r
- *  The GNU General Public License can be found at\r
- *  http://www.gnu.org/copyleft/gpl.html.\r
- *  A copy is found in the textfile GPL.txt and important notices to the license\r
- *  from the author is found in LICENSE.txt distributed with these scripts.\r
- *\r
- *\r
- *  This script is distributed in the hope that it will be useful,\r
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of\r
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\r
- *  GNU General Public License for more details.\r
- *\r
- *  This copyright notice MUST APPEAR in all copies of the script!\r
- ***************************************************************/\r
-\r
-/**\r
- * Contains COLUMNS class object.\r
- *\r
- * $Id: class.tslib_content.php 7905 2010-06-13 14:42:33Z ohader $\r
- * @author Xavier Perseguers <typo3@perseguers.ch>\r
- * @author Steffen Kamper <steffen@typo3.org>\r
- */\r
-class tslib_content_Columns extends tslib_content_Abstract {\r
-\r
-       /**\r
-        * Rendering the cObject, COLUMNS\r
-        *\r
-        * @param       array           Array of TypoScript properties\r
-        * @return      string          Output\r
-        */\r
-       public function render($conf = array()) {\r
-               $content = '';\r
-               if (is_array($conf) && $this->cObj->checkIf($conf['if.'])) {\r
-                       $tdRowCount = 0;\r
-                       $tableParams = $conf['tableParams'] ? ' ' . $conf['tableParams'] : ' border="0" cellspacing="0" cellpadding="0"';\r
-                       $TDparams = $conf['TDparams'] ? ' ' . $conf['TDparams'] : ' valign="top"';\r
-                       $rows = t3lib_div::intInRange($conf['rows'], 2, 20);\r
-                       $totalWidth = intval($conf['totalWidth']);\r
-                       $columnWidth = 0;\r
-\r
-                       $totalGapWidth = 0;\r
-                       $gapData = array(\r
-                               'gapWidth' => $this->cObj->stdWrap($conf['gapWidth'], $conf['gapWidth.']),\r
-                               'gapBgCol' => $this->cObj->stdWrap($conf['gapBgCol'], $conf['gapBgCol.']),\r
-                               'gapLineThickness' => $this->cObj->stdWrap($conf['gapLineThickness'], $conf['gapLineThickness.']),\r
-                               'gapLineCol' => $this->cObj->stdWrap($conf['gapLineCol'], $conf['gapLineCol.']),\r
-                       );\r
-                       $gapData = $GLOBALS['TSFE']->tmpl->splitConfArray($gapData, $rows - 1);\r
-                       foreach ($gapData as $val) {\r
-                               $totalGapWidth += intval($val['gapWidth']);\r
-                       }\r
-\r
-                       if ($totalWidth) {\r
-                               $columnWidth = ceil(($totalWidth - $totalGapWidth) / $rows);\r
-                               $TDparams .= ' width="' . $columnWidth . '"';\r
-                               $tableParams .= ' width="' . $totalWidth . '"';\r
-                       } else {\r
-                               $TDparams .= ' width="' . floor(100 / $rows) . '%"';\r
-                               $tableParams .= ' width="100%"';\r
-                       }\r
-\r
-                       for ($a = 1; $a <= $rows; $a++) {\r
-                               $tdRowCount++;\r
-                               $content .= '<td' . $TDparams . '>';\r
-                               $content .= $this->cObj->cObjGetSingle($conf[$a], $conf[$a . '.'], $a);\r
-                               $content .= '</td>';\r
-                               if ($a < $rows) {\r
-                                       $gapConf = $gapData[($a - 1)];\r
-                                       $gapWidth = intval($gapConf['gapWidth']);\r
-                                       if ($gapWidth) {\r
-                                               $tdPar = $gapConf['gapBgCol'] ? ' bgcolor="' . $gapConf['gapBgCol'] . '"' : '';\r
-                                               $gapLine = intval($gapConf['gapLineThickness']);\r
-                                               if ($gapLine) {\r
-                                                       $gapSurround = t3lib_div::intInRange(($gapWidth - $gapLine) / 2, 1, 1000);\r
-                                                       // right gap\r
-                                                       $content .= '<td' . $tdPar . '><img src="' . $GLOBALS['TSFE']->absRefPrefix . 'clear.gif" width="' .\r
-                                                               $gapSurround . '" height="1" alt="" title="" /></td>';\r
-                                                       $tdRowCount++;\r
-                                                       // line:\r
-                                                       $GtdPar = $gapConf['gapLineCol'] ? ' bgcolor="' . $gapConf['gapLineCol'] . '"' : ' bgcolor="black"';\r
-                                                       $content .= '<td' . $GtdPar . '><img src="' . $GLOBALS['TSFE']->absRefPrefix . 'clear.gif" width="' .\r
-                                                               $gapLine . '" height="1" alt="" title="" /></td>';\r
-                                                       $tdRowCount++;\r
-                                                       // left gap\r
-                                                       $content .= '<td' . $tdPar . '><img src="' . $GLOBALS['TSFE']->absRefPrefix . 'clear.gif" width="' .\r
-                                                               $gapSurround . '" height="1" alt="" title="" /></td>';\r
-                                                       $tdRowCount++;\r
-                                               } else {\r
-                                                       $content .= '<td' . $tdPar . '><img src="' . $GLOBALS['TSFE']->absRefPrefix . 'clear.gif" width="' .\r
-                                                               $gapWidth . '" height="1" alt="" title="" /></td>';\r
-                                                       $tdRowCount++;\r
-                                               }\r
-                                       }\r
-                               }\r
-                       }\r
-                       $content = '<tr>' . $content . '</tr>';\r
-                       $content = '<table' . $tableParams . '>' . $content . '</table>';\r
-                       $content .= $this->cObj->cObjGetSingle($conf['after'], $conf['after.'], 'after');\r
-                       if ($conf['stdWrap.']) {\r
-                               $content = $this->cObj->stdWrap($content, $conf['stdWrap.']);\r
-                       }\r
-               }\r
-               return $content;\r
-       }\r
-\r
-}\r
-\r
-\r
-if (defined('TYPO3_MODE') && $TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['tslib/content/class.tslib_content_columns.php']) {\r
-       include_once ($TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['tslib/content/class.tslib_content_columns.php']);\r
-}\r
-\r
-?>\r
+<?php
+/***************************************************************
+ *  Copyright notice
+ *
+ *  (c) 2010 Xavier Perseguers <typo3@perseguers.ch>
+ *  (c) 2010 Steffen Kamper <steffen@typo3.org>
+ *  All rights reserved
+ *
+ *  This script is part of the TYPO3 project. The TYPO3 project is
+ *  free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.
+ *
+ *  The GNU General Public License can be found at
+ *  http://www.gnu.org/copyleft/gpl.html.
+ *  A copy is found in the textfile GPL.txt and important notices to the license
+ *  from the author is found in LICENSE.txt distributed with these scripts.
+ *
+ *
+ *  This script is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  This copyright notice MUST APPEAR in all copies of the script!
+ ***************************************************************/
+
+/**
+ * Contains COLUMNS class object.
+ *
+ * $Id: class.tslib_content.php 7905 2010-06-13 14:42:33Z ohader $
+ * @author Xavier Perseguers <typo3@perseguers.ch>
+ * @author Steffen Kamper <steffen@typo3.org>
+ */
+class tslib_content_Columns extends tslib_content_Abstract {
+
+       /**
+        * Rendering the cObject, COLUMNS
+        *
+        * @param       array           Array of TypoScript properties
+        * @return      string          Output
+        */
+       public function render($conf = array()) {
+               $content = '';
+               if (is_array($conf) && $this->cObj->checkIf($conf['if.'])) {
+                       $tdRowCount = 0;
+                       $tableParams = $conf['tableParams'] ? ' ' . $conf['tableParams'] : ' border="0" cellspacing="0" cellpadding="0"';
+                       $TDparams = $conf['TDparams'] ? ' ' . $conf['TDparams'] : ' valign="top"';
+                       $rows = t3lib_div::intInRange($conf['rows'], 2, 20);
+                       $totalWidth = intval($conf['totalWidth']);
+                       $columnWidth = 0;
+
+                       $totalGapWidth = 0;
+                       $gapData = array(
+                               'gapWidth' => $this->cObj->stdWrap($conf['gapWidth'], $conf['gapWidth.']),
+                               'gapBgCol' => $this->cObj->stdWrap($conf['gapBgCol'], $conf['gapBgCol.']),
+                               'gapLineThickness' => $this->cObj->stdWrap($conf['gapLineThickness'], $conf['gapLineThickness.']),
+                               'gapLineCol' => $this->cObj->stdWrap($conf['gapLineCol'], $conf['gapLineCol.']),
+                       );
+                       $gapData = $GLOBALS['TSFE']->tmpl->splitConfArray($gapData, $rows - 1);
+                       foreach ($gapData as $val) {
+                               $totalGapWidth += intval($val['gapWidth']);
+                       }
+
+                       if ($totalWidth) {
+                               $columnWidth = ceil(($totalWidth - $totalGapWidth) / $rows);
+                               $TDparams .= ' width="' . $columnWidth . '"';
+                               $tableParams .= ' width="' . $totalWidth . '"';
+                       } else {
+                               $TDparams .= ' width="' . floor(100 / $rows) . '%"';
+                               $tableParams .= ' width="100%"';
+                       }
+
+                       for ($a = 1; $a <= $rows; $a++) {
+                               $tdRowCount++;
+                               $content .= '<td' . $TDparams . '>';
+                               $content .= $this->cObj->cObjGetSingle($conf[$a], $conf[$a . '.'], $a);
+                               $content .= '</td>';
+                               if ($a < $rows) {
+                                       $gapConf = $gapData[($a - 1)];
+                                       $gapWidth = intval($gapConf['gapWidth']);
+                                       if ($gapWidth) {
+                                               $tdPar = $gapConf['gapBgCol'] ? ' bgcolor="' . $gapConf['gapBgCol'] . '"' : '';
+                                               $gapLine = intval($gapConf['gapLineThickness']);
+                                               if ($gapLine) {
+                                                       $gapSurround = t3lib_div::intInRange(($gapWidth - $gapLine) / 2, 1, 1000);
+                                                       // right gap
+                                                       $content .= '<td' . $tdPar . '><img src="' . $GLOBALS['TSFE']->absRefPrefix . 'clear.gif" width="' .
+                                                               $gapSurround . '" height="1" alt="" title="" /></td>';
+                                                       $tdRowCount++;
+                                                       // line:
+                                                       $GtdPar = $gapConf['gapLineCol'] ? ' bgcolor="' . $gapConf['gapLineCol'] . '"' : ' bgcolor="black"';
+                                                       $content .= '<td' . $GtdPar . '><img src="' . $GLOBALS['TSFE']->absRefPrefix . 'clear.gif" width="' .
+                                                               $gapLine . '" height="1" alt="" title="" /></td>';
+                                                       $tdRowCount++;
+                                                       // left gap
+                                                       $content .= '<td' . $tdPar . '><img src="' . $GLOBALS['TSFE']->absRefPrefix . 'clear.gif" width="' .
+                                                               $gapSurround . '" height="1" alt="" title="" /></td>';
+                                                       $tdRowCount++;
+                                               } else {
+                                                       $content .= '<td' . $tdPar . '><img src="' . $GLOBALS['TSFE']->absRefPrefix . 'clear.gif" width="' .
+                                                               $gapWidth . '" height="1" alt="" title="" /></td>';
+                                                       $tdRowCount++;
+                                               }
+                                       }
+                               }
+                       }
+                       $content = '<tr>' . $content . '</tr>';
+                       $content = '<table' . $tableParams . '>' . $content . '</table>';
+                       $content .= $this->cObj->cObjGetSingle($conf['after'], $conf['after.'], 'after');
+                       if ($conf['stdWrap.']) {
+                               $content = $this->cObj->stdWrap($content, $conf['stdWrap.']);
+                       }
+               }
+               return $content;
+       }
+
+}
+
+
+if (defined('TYPO3_MODE') && $TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['tslib/content/class.tslib_content_columns.php']) {
+       include_once ($TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['tslib/content/class.tslib_content_columns.php']);
+}
+
+?>
index 790b59d..0e4b30e 100644 (file)
-<?php\r
-/***************************************************************\r
- *  Copyright notice\r
- *\r
- *  (c) 2010 Xavier Perseguers <typo3@perseguers.ch>\r
- *  (c) 2010 Steffen Kamper <steffen@typo3.org>\r
- *  All rights reserved\r
- *\r
- *  This script is part of the TYPO3 project. The TYPO3 project is\r
- *  free software; you can redistribute it and/or modify\r
- *  it under the terms of the GNU General Public License as published by\r
- *  the Free Software Foundation; either version 2 of the License, or\r
- *  (at your option) any later version.\r
- *\r
- *  The GNU General Public License can be found at\r
- *  http://www.gnu.org/copyleft/gpl.html.\r
- *  A copy is found in the textfile GPL.txt and important notices to the license\r
- *  from the author is found in LICENSE.txt distributed with these scripts.\r
- *\r
- *\r
- *  This script is distributed in the hope that it will be useful,\r
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of\r
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\r
- *  GNU General Public License for more details.\r
- *\r
- *  This copyright notice MUST APPEAR in all copies of the script!\r
- ***************************************************************/\r
-\r
-/**\r
- * Contains CONTENT class object.\r
- *\r
- * $Id: class.tslib_content.php 7905 2010-06-13 14:42:33Z ohader $\r
- * @author Xavier Perseguers <typo3@perseguers.ch>\r
- * @author Steffen Kamper <steffen@typo3.org>\r
- */\r
-class tslib_content_Content extends tslib_content_Abstract {\r
-\r
-       /**\r
-        * Rendering the cObject, CONTENT\r
-        *\r
-        * @param       array           Array of TypoScript properties\r
-        * @return      string          Output\r
-        */\r
-       public function render($conf = array()) {\r
-               $theValue = '';\r
-\r
-               $originalRec = $GLOBALS['TSFE']->currentRecord;\r
-               if ($originalRec) { // If the currentRecord is set, we register, that this record has invoked this function. It's should not be allowed to do this again then!!\r
-                       $GLOBALS['TSFE']->recordRegister[$originalRec]++;\r
-               }\r
-\r
-               $conf['table'] = trim($this->cObj->stdWrap($conf['table'], $conf['table.']));\r
-               if ($conf['table'] == 'pages' || substr($conf['table'], 0, 3) == 'tt_' || substr($conf['table'], 0, 3) == 'fe_' || substr($conf['table'], 0, 3) == 'tx_' || substr($conf['table'], 0, 4) == 'ttx_' || substr($conf['table'], 0, 5) == 'user_' || substr($conf['table'], 0, 7) == 'static_') {\r
-\r
-                       $renderObjName = $conf['renderObj'] ? $conf['renderObj'] : '<' . $conf['table'];\r
-                       $renderObjKey = $conf['renderObj'] ? 'renderObj' : '';\r
-                       $renderObjConf = $conf['renderObj.'];\r
-\r
-                       $slide = intval($conf['slide']) ? intval($conf['slide']) : 0;\r
-                       $slideCollect = intval($conf['slide.']['collect']) ? intval($conf['slide.']['collect']) : 0;\r
-                       $slideCollectReverse = intval($conf['slide.']['collectReverse']) ? TRUE : FALSE;\r
-                       $slideCollectFuzzy = $slideCollect ? (intval($conf['slide.']['collectFuzzy']) ? TRUE : FALSE) : TRUE;\r
-                       $again = FALSE;\r
-\r
-                       do {\r
-                               $res = $this->cObj->exec_getQuery($conf['table'], $conf['select.']);\r
-                               if ($error = $GLOBALS['TYPO3_DB']->sql_error()) {\r
-                                       $GLOBALS['TT']->setTSlogMessage($error, 3);\r
-                               } else {\r
-                                       $this->cObj->currentRecordTotal = $GLOBALS['TYPO3_DB']->sql_num_rows($res);\r
-                                       $GLOBALS['TT']->setTSlogMessage('NUMROWS: ' . $GLOBALS['TYPO3_DB']->sql_num_rows($res));\r
-                                       $cObj = t3lib_div::makeInstance('tslib_cObj');\r
-                                       $cObj->setParent($this->cObj->data, $this->cObj->currentRecord);\r
-                                       $this->cObj->currentRecordNumber = 0;\r
-                                       $cobjValue = '';\r
-                                       while ($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res)) {\r
-\r
-                                                       // Versioning preview:\r
-                                               $GLOBALS['TSFE']->sys_page->versionOL($conf['table'], $row, TRUE);\r
-\r
-                                                       // Language overlay:\r
-                                               if (is_array($row) && $GLOBALS['TSFE']->sys_language_contentOL) {\r
-                                                       $row = $GLOBALS['TSFE']->sys_page->getRecordOverlay($conf['table'], $row, $GLOBALS['TSFE']->sys_language_content, $GLOBALS['TSFE']->sys_language_contentOL);\r
-                                               }\r
-\r
-                                               if (is_array($row)) { // Might be unset in the sys_language_contentOL\r
-                                                       if (!$GLOBALS['TSFE']->recordRegister[$conf['table'] . ':' . $row['uid']]) {\r
-                                                               $this->cObj->currentRecordNumber++;\r
-                                                               $cObj->parentRecordNumber = $this->cObj->currentRecordNumber;\r
-                                                               $GLOBALS['TSFE']->currentRecord = $conf['table'] . ':' . $row['uid'];\r
-                                                               $this->cObj->lastChanged($row['tstamp']);\r
-                                                               $cObj->start($row, $conf['table']);\r
-                                                               $tmpValue = $cObj->cObjGetSingle($renderObjName, $renderObjConf, $renderObjKey);\r
-                                                               $cobjValue .= $tmpValue;\r
-                                                       }\r
-                                               }\r
-                                       }\r
-                                       $GLOBALS['TYPO3_DB']->sql_free_result($res);\r
-                               }\r
-                               if ($slideCollectReverse) {\r
-                                       $theValue = $cobjValue . $theValue;\r
-                               } else {\r
-                                       $theValue .= $cobjValue;\r
-                               }\r
-                               if ($slideCollect > 0) {\r
-                                       $slideCollect--;\r
-                               }\r
-                               if ($slide) {\r
-                                       if ($slide > 0) {\r
-                                               $slide--;\r
-                                       }\r
-                                       $conf['select.']['pidInList'] = $this->cObj->getSlidePids($conf['select.']['pidInList'], $conf['select.']['pidInList.']);\r
-                                       $again = strlen($conf['select.']['pidInList']) ? TRUE : FALSE;\r
-                               }\r
-                       } while ($again && (($slide && !strlen($tmpValue) && $slideCollectFuzzy) || ($slide && $slideCollect)));\r
-               }\r
-\r
-               $theValue = $this->cObj->wrap($theValue, $conf['wrap']);\r
-               if ($conf['stdWrap.'])\r
-                       $theValue = $this->cObj->stdWrap($theValue, $conf['stdWrap.']);\r
-\r
-               $GLOBALS['TSFE']->currentRecord = $originalRec; // Restore\r
-               return $theValue;\r
-       }\r
-\r
-}\r
-\r
-\r
-if (defined('TYPO3_MODE') && $TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['tslib/content/class.tslib_content_content.php']) {\r
-       include_once ($TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['tslib/content/class.tslib_content_content.php']);\r
-}\r
-\r
-?>\r
+<?php
+/***************************************************************
+ *  Copyright notice
+ *
+ *  (c) 2010 Xavier Perseguers <typo3@perseguers.ch>
+ *  (c) 2010 Steffen Kamper <steffen@typo3.org>
+ *  All rights reserved
+ *
+ *  This script is part of the TYPO3 project. The TYPO3 project is
+ *  free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.
+ *
+ *  The GNU General Public License can be found at
+ *  http://www.gnu.org/copyleft/gpl.html.
+ *  A copy is found in the textfile GPL.txt and important notices to the license
+ *  from the author is found in LICENSE.txt distributed with these scripts.
+ *
+ *
+ *  This script is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  This copyright notice MUST APPEAR in all copies of the script!
+ ***************************************************************/
+
+/**
+ * Contains CONTENT class object.
+ *
+ * $Id: class.tslib_content.php 7905 2010-06-13 14:42:33Z ohader $
+ * @author Xavier Perseguers <typo3@perseguers.ch>
+ * @author Steffen Kamper <steffen@typo3.org>
+ */
+class tslib_content_Content extends tslib_content_Abstract {
+
+       /**
+        * Rendering the cObject, CONTENT
+        *
+        * @param       array           Array of TypoScript properties
+        * @return      string          Output
+        */
+       public function render($conf = array()) {
+               $theValue = '';
+
+               $originalRec = $GLOBALS['TSFE']->currentRecord;
+               if ($originalRec) { // If the currentRecord is set, we register, that this record has invoked this function. It's should not be allowed to do this again then!!
+                       $GLOBALS['TSFE']->recordRegister[$originalRec]++;
+               }
+
+               $conf['table'] = trim($this->cObj->stdWrap($conf['table'], $conf['table.']));
+               if ($conf['table'] == 'pages' || substr($conf['table'], 0, 3) == 'tt_' || substr($conf['table'], 0, 3) == 'fe_' || substr($conf['table'], 0, 3) == 'tx_' || substr($conf['table'], 0, 4) == 'ttx_' || substr($conf['table'], 0, 5) == 'user_' || substr($conf['table'], 0, 7) == 'static_') {
+
+                       $renderObjName = $conf['renderObj'] ? $conf['renderObj'] : '<' . $conf['table'];
+                       $renderObjKey = $conf['renderObj'] ? 'renderObj' : '';
+                       $renderObjConf = $conf['renderObj.'];
+
+                       $slide = intval($conf['slide']) ? intval($conf['slide']) : 0;
+                       $slideCollect = intval($conf['slide.']['collect']) ? intval($conf['slide.']['collect']) : 0;
+                       $slideCollectReverse = intval($conf['slide.']['collectReverse']) ? TRUE : FALSE;
+                       $slideCollectFuzzy = $slideCollect ? (intval($conf['slide.']['collectFuzzy']) ? TRUE : FALSE) : TRUE;
+                       $again = FALSE;
+
+                       do {
+                               $res = $this->cObj->exec_getQuery($conf['table'], $conf['select.']);
+                               if ($error = $GLOBALS['TYPO3_DB']->sql_error()) {
+                                       $GLOBALS['TT']->setTSlogMessage($error, 3);
+                               } else {
+                                       $this->cObj->currentRecordTotal = $GLOBALS['TYPO3_DB']->sql_num_rows($res);
+                                       $GLOBALS['TT']->setTSlogMessage('NUMROWS: ' . $GLOBALS['TYPO3_DB']->sql_num_rows($res));
+                                       $cObj = t3lib_div::makeInstance('tslib_cObj');
+                                       $cObj->setParent($this->cObj->data, $this->cObj->currentRecord);
+                                       $this->cObj->currentRecordNumber = 0;
+                                       $cobjValue = '';
+                                       while ($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res)) {
+
+                                                       // Versioning preview:
+                                               $GLOBALS['TSFE']->sys_page->versionOL($conf['table'], $row, TRUE);
+
+                                                       // Language overlay:
+                                               if (is_array($row) && $GLOBALS['TSFE']->sys_language_contentOL) {
+                                                       $row = $GLOBALS['TSFE']->sys_page->getRecordOverlay($conf['table'], $row, $GLOBALS['TSFE']->sys_language_content, $GLOBALS['TSFE']->sys_language_contentOL);
+                                               }
+
+                                               if (is_array($row)) { // Might be unset in the sys_language_contentOL
+                                                       if (!$GLOBALS['TSFE']->recordRegister[$conf['table'] . ':' . $row['uid']]) {
+                                                               $this->cObj->currentRecordNumber++;
+                                                               $cObj->parentRecordNumber = $this->cObj->currentRecordNumber;
+                                                               $GLOBALS['TSFE']->currentRecord = $conf['table'] . ':' . $row['uid'];
+                                                               $this->cObj->lastChanged($row['tstamp']);
+                                                               $cObj->start($row, $conf['table']);
+                                                               $tmpValue = $cObj->cObjGetSingle($renderObjName, $renderObjConf, $renderObjKey);
+                                                               $cobjValue .= $tmpValue;
+                                                       }
+                                               }
+                                       }
+                                       $GLOBALS['TYPO3_DB']->sql_free_result($res);
+                               }
+                               if ($slideCollectReverse) {
+                                       $theValue = $cobjValue . $theValue;
+                               } else {
+                                       $theValue .= $cobjValue;
+                               }
+                               if ($slideCollect > 0) {
+                                       $slideCollect--;
+                               }
+                               if ($slide) {
+                                       if ($slide > 0) {
+                                               $slide--;
+                                       }
+                                       $conf['select.']['pidInList'] = $this->cObj->getSlidePids($conf['select.']['pidInList'], $conf['select.']['pidInList.']);
+                                       $again = strlen($conf['select.']['pidInList']) ? TRUE : FALSE;
+                               }
+                       } while ($again && (($slide && !strlen($tmpValue) && $slideCollectFuzzy) || ($slide && $slideCollect)));
+               }
+
+               $theValue = $this->cObj->wrap($theValue, $conf['wrap']);
+               if ($conf['stdWrap.'])
+                       $theValue = $this->cObj->stdWrap($theValue, $conf['stdWrap.']);
+
+               $GLOBALS['TSFE']->currentRecord = $originalRec; // Restore
+               return $theValue;
+       }
+
+}
+
+
+if (defined('TYPO3_MODE') && $TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['tslib/content/class.tslib_content_content.php']) {
+       include_once ($TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['tslib/content/class.tslib_content_content.php']);
+}
+
+?>
index f385370..f07e874 100644 (file)
@@ -1,70 +1,70 @@
-<?php\r
-/***************************************************************\r
- *  Copyright notice\r
- *\r
- *  (c) 2010 Xavier Perseguers <typo3@perseguers.ch>\r
- *  (c) 2010 Steffen Kamper <steffen@typo3.org>\r
- *  All rights reserved\r
- *\r
- *  This script is part of the TYPO3 project. The TYPO3 project is\r
- *  free software; you can redistribute it and/or modify\r
- *  it under the terms of the GNU General Public License as published by\r
- *  the Free Software Foundation; either version 2 of the License, or\r
- *  (at your option) any later version.\r
- *\r
- *  The GNU General Public License can be found at\r
- *  http://www.gnu.org/copyleft/gpl.html.\r
- *  A copy is found in the textfile GPL.txt and important notices to the license\r
- *  from the author is found in LICENSE.txt distributed with these scripts.\r
- *\r
- *\r
- *  This script is distributed in the hope that it will be useful,\r
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of\r
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\r
- *  GNU General Public License for more details.\r
- *\r
- *  This copyright notice MUST APPEAR in all copies of the script!\r
- ***************************************************************/\r
-\r
-/**\r
- * Contains COA class object.\r
- *\r
- * $Id: class.tslib_content.php 7905 2010-06-13 14:42:33Z ohader $\r
- * @author Xavier Perseguers <typo3@perseguers.ch>\r
- * @author Steffen Kamper <steffen@typo3.org>\r
- */\r
-class tslib_content_ContentObjectArray extends tslib_content_Abstract {\r
-\r
-       /**\r
-        * Rendering the cObject, COBJ_ARRAY / COA\r
-        *\r
-        * @param       array           Array of TypoScript properties\r
-        * @return      string          Output\r
-        */\r
-       public function render($conf = array()) {\r
-               if (is_array($conf)) {\r
-                       $content = '';\r
-                       if ($this->cObj->checkIf($conf['if.'])) {\r
-                               $this->cObj->includeLibs($conf);\r
-                               $content = $this->cObj->cObjGet($conf);\r
-                               if ($conf['wrap']) {\r
-                                       $content = $this->cObj->wrap($content, $conf['wrap']);\r
-                               }\r
-                               if ($conf['stdWrap.']) {\r
-                                       $content = $this->cObj->stdWrap($content, $conf['stdWrap.']);\r
-                               }\r
-                       }\r
-                       return $content;\r
-               } else {\r
-                       $GLOBALS['TT']->setTSlogMessage('No elements in this content object array (COBJ_ARRAY, COA).', 2);\r
-               }\r
-       }\r
-\r
-}\r
-\r
-\r
-if (defined('TYPO3_MODE') && $TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['tslib/content/class.tslib_content_contentobjectarray.php']) {\r
-       include_once ($TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['tslib/content/class.tslib_content_contentobjectarray.php']);\r
-}\r
-\r
-?>\r
+<?php
+/***************************************************************
+ *  Copyright notice
+ *
+ *  (c) 2010 Xavier Perseguers <typo3@perseguers.ch>
+ *  (c) 2010 Steffen Kamper <steffen@typo3.org>
+ *  All rights reserved
+ *
+ *  This script is part of the TYPO3 project. The TYPO3 project is
+ *  free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.
+ *
+ *  The GNU General Public License can be found at
+ *  http://www.gnu.org/copyleft/gpl.html.
+ *  A copy is found in the textfile GPL.txt and important notices to the license
+ *  from the author is found in LICENSE.txt distributed with these scripts.
+ *
+ *
+ *  This script is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  This copyright notice MUST APPEAR in all copies of the script!
+ ***************************************************************/
+
+/**
+ * Contains COA class object.
+ *
+ * $Id: class.tslib_content.php 7905 2010-06-13 14:42:33Z ohader $
+ * @author Xavier Perseguers <typo3@perseguers.ch>
+ * @author Steffen Kamper <steffen@typo3.org>
+ */
+class tslib_content_ContentObjectArray extends tslib_content_Abstract {
+
+       /**
+        * Rendering the cObject, COBJ_ARRAY / COA
+        *
+        * @param       array           Array of TypoScript properties
+        * @return      string          Output
+        */
+       public function render($conf = array()) {
+               if (is_array($conf)) {
+                       $content = '';
+                       if ($this->cObj->checkIf($conf['if.'])) {
+                               $this->cObj->includeLibs($conf);
+                               $content = $this->cObj->cObjGet($conf);
+                               if ($conf['wrap']) {
+                                       $content = $this->cObj->wrap($content, $conf['wrap']);
+                               }
+                               if ($conf['stdWrap.']) {
+                                       $content = $this->cObj->stdWrap($content, $conf['stdWrap.']);
+                               }
+                       }
+                       return $content;
+               } else {
+                       $GLOBALS['TT']->setTSlogMessage('No elements in this content object array (COBJ_ARRAY, COA).', 2);
+               }
+       }
+
+}
+
+
+if (defined('TYPO3_MODE') && $TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['tslib/content/class.tslib_content_contentobjectarray.php']) {
+       include_once ($TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['tslib/content/class.tslib_content_contentobjectarray.php']);
+}
+
+?>
index 1d72e40..6982a12 100644 (file)
@@ -1,67 +1,67 @@
-<?php\r
-/***************************************************************\r
- *  Copyright notice\r
- *\r
- *  (c) 2010 Xavier Perseguers <typo3@perseguers.ch>\r
- *  (c) 2010 Steffen Kamper <steffen@typo3.org>\r
- *  All rights reserved\r
- *\r
- *  This script is part of the TYPO3 project. The TYPO3 project is\r
- *  free software; you can redistribute it and/or modify\r
- *  it under the terms of the GNU General Public License as published by\r
- *  the Free Software Foundation; either version 2 of the License, or\r
- *  (at your option) any later version.\r
- *\r
- *  The GNU General Public License can be found at\r
- *  http://www.gnu.org/copyleft/gpl.html.\r
- *  A copy is found in the textfile GPL.txt and important notices to the license\r
- *  from the author is found in LICENSE.txt distributed with these scripts.\r
- *\r
- *\r
- *  This script is distributed in the hope that it will be useful,\r
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of\r
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\r
- *  GNU General Public License for more details.\r
- *\r
- *  This copyright notice MUST APPEAR in all copies of the script!\r
- ***************************************************************/\r
-\r
-/**\r
- * Contains COA_INT class object.\r
- *\r
- * $Id: class.tslib_content.php 7905 2010-06-13 14:42:33Z ohader $\r
- * @author Xavier Perseguers <typo3@perseguers.ch>\r
- * @author Steffen Kamper <steffen@typo3.org>\r
- */\r
-class tslib_content_ContentObjectArray_Internal extends tslib_content_Abstract {\r
-\r
-       /**\r
-        * Rendering the cObject, COA_INT\r
-        *\r
-        * @param       array           Array of TypoScript properties\r
-        * @return      string          Output\r
-        */\r
-       public function render($conf = array()) {\r
-               if (is_array($conf)) {\r
-                       $substKey = 'INT_SCRIPT.' . $GLOBALS['TSFE']->uniqueHash();\r
-                       $content = '<!--' . $substKey . '-->';\r
-                       $GLOBALS['TSFE']->config['INTincScript'][$substKey] = array (\r
-                               'file' => $conf['includeLibs'],\r
-                               'conf' => $conf,\r
-                               'cObj' => serialize($this->cObj),\r
-                               'type' => 'COA'\r
-                       );\r
-                       return $content;\r
-               } else {\r
-                       $GLOBALS['TT']->setTSlogMessage('No elements in this content object array (COA_INT).', 2);\r
-               }\r
-       }\r
-\r
-}\r
-\r
-\r
-if (defined('TYPO3_MODE') && $TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['tslib/content/class.tslib_content_contentobjectarray_internal.php']) {\r
-       include_once ($TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['tslib/content/class.tslib_content_contentobjectarray_internal.php']);\r
-}\r
-\r
-?>\r
+<?php
+/***************************************************************
+ *  Copyright notice
+ *
+ *  (c) 2010 Xavier Perseguers <typo3@perseguers.ch>
+ *  (c) 2010 Steffen Kamper <steffen@typo3.org>
+ *  All rights reserved
+ *
+ *  This script is part of the TYPO3 project. The TYPO3 project is
+ *  free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.
+ *
+ *  The GNU General Public License can be found at
+ *  http://www.gnu.org/copyleft/gpl.html.
+ *  A copy is found in the textfile GPL.txt and important notices to the license
+ *  from the author is found in LICENSE.txt distributed with these scripts.
+ *
+ *
+ *  This script is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  This copyright notice MUST APPEAR in all copies of the script!
+ ***************************************************************/
+
+/**
+ * Contains COA_INT class object.
+ *
+ * $Id: class.tslib_content.php 7905 2010-06-13 14:42:33Z ohader $
+ * @author Xavier Perseguers <typo3@perseguers.ch>
+ * @author Steffen Kamper <steffen@typo3.org>
+ */
+class tslib_content_ContentObjectArray_Internal extends tslib_content_Abstract {
+
+       /**
+        * Rendering the cObject, COA_INT
+        *
+        * @param       array           Array of TypoScript properties
+        * @return      string          Output
+        */
+       public function render($conf = array()) {
+               if (is_array($conf)) {
+                       $substKey = 'INT_SCRIPT.' . $GLOBALS['TSFE']->uniqueHash();
+                       $content = '<!--' . $substKey . '-->';
+                       $GLOBALS['TSFE']->config['INTincScript'][$substKey] = array (
+                               'file' => $conf['includeLibs'],
+                               'conf' => $conf,
+                               'cObj' => serialize($this->cObj),
+                               'type' => 'COA'
+                       );
+                       return $content;
+               } else {
+                       $GLOBALS['TT']->setTSlogMessage('No elements in this content object array (COA_INT).', 2);
+               }
+       }
+
+}
+
+
+if (defined('TYPO3_MODE') && $TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['tslib/content/class.tslib_content_contentobjectarray_internal.php']) {
+       include_once ($TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['tslib/content/class.tslib_content_contentobjectarray_internal.php']);
+}
+
+?>
index 7eb1ab0..6ed43aa 100644 (file)
@@ -1,82 +1,82 @@
-<?php\r
-/***************************************************************\r
- *  Copyright notice\r
- *\r
- *  (c) 2010 Xavier Perseguers <typo3@perseguers.ch>\r
- *  (c) 2010 Steffen Kamper <steffen@typo3.org>\r
- *  All rights reserved\r
- *\r
- *  This script is part of the TYPO3 project. The TYPO3 project is\r
- *  free software; you can redistribute it and/or modify\r
- *  it under the terms of the GNU General Public License as published by\r
- *  the Free Software Foundation; either version 2 of the License, or\r
- *  (at your option) any later version.\r
- *\r
- *  The GNU General Public License can be found at\r
- *  http://www.gnu.org/copyleft/gpl.html.\r
- *  A copy is found in the textfile GPL.txt and important notices to the license\r
- *  from the author is found in LICENSE.txt distributed with these scripts.\r
- *\r
- *\r
- *  This script is distributed in the hope that it will be useful,\r
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of\r
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\r
- *  GNU General Public License for more details.\r
- *\r
- *  This copyright notice MUST APPEAR in all copies of the script!\r
- ***************************************************************/\r
-\r
-/**\r
- * Contains CTABLE class object.\r
- *\r
- * $Id: class.tslib_content.php 7905 2010-06-13 14:42:33Z ohader $\r
- * @author Xavier Perseguers <typo3@perseguers.ch>\r
- * @author Steffen Kamper <steffen@typo3.org>\r
- */\r
-class tslib_content_ContentTable extends tslib_content_Abstract {\r
-\r
-       /**\r
-        * Rendering the cObject, CTABLE\r
-        *\r
-        * @param       array           Array of TypoScript properties\r
-        * @return      string          Output\r
-        */\r
-       public function render($conf = array()) {\r
-               $controlTable = t3lib_div::makeInstance('tslib_controlTable');\r
-               if ($conf['tableParams']) {\r
-                       $controlTable->tableParams = $conf['tableParams'];\r
-               }\r
-                       // loads the pagecontent\r
-               $controlTable->contentW = $conf['cWidth'];\r
-               // loads the menues if any\r
-               if (is_array($conf['c.'])) {\r
-                       $controlTable->content = $this->cObj->cObjGet($conf['c.'], 'c.');\r
-                       $controlTable->contentTDparams = isset($conf['c.']['TDParams']) ? $conf['c.']['TDParams'] : 'valign="top"';\r
-               }\r
-               if (is_array($conf['lm.'])) {\r
-                       $controlTable->lm = $this->cObj->cObjGet($conf['lm.'], 'lm.');\r
-                       $controlTable->lmTDparams = isset($conf['lm.']['TDParams']) ? $conf['lm.']['TDParams'] : 'valign="top"';\r
-               }\r
-               if (is_array($conf['tm.'])) {\r
-                       $controlTable->tm = $this->cObj->cObjGet($conf['tm.'], 'tm.');\r
-                       $controlTable->tmTDparams = isset($conf['tm.']['TDParams']) ? $conf['tm.']['TDParams'] : 'valign="top"';\r
-               }\r
-               if (is_array($conf['rm.'])) {\r
-                       $controlTable->rm = $this->cObj->cObjGet($conf['rm.'], 'rm.');\r
-                       $controlTable->rmTDparams = isset($conf['rm.']['TDParams']) ? $conf['rm.']['TDParams'] : 'valign="top"';\r
-               }\r
-               if (is_array($conf['bm.'])) {\r
-                       $controlTable->bm = $this->cObj->cObjGet($conf['bm.'], 'bm.');\r
-                       $controlTable->bmTDparams = isset($conf['bm.']['TDParams']) ? $conf['bm.']['TDParams'] : 'valign="top"';\r
-               }\r
-               return $controlTable->start($conf['offset'], $conf['cMargins']);\r
-       }\r
-\r
-}\r
-\r
-\r
-if (defined('TYPO3_MODE') && $TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['tslib/content/class.tslib_content_contenttable.php']) {\r
-       include_once ($TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['tslib/content/class.tslib_content_contenttable.php']);\r
-}\r
-\r
-?>\r
+<?php
+/***************************************************************
+ *  Copyright notice
+ *
+ *  (c) 2010 Xavier Perseguers <typo3@perseguers.ch>
+ *  (c) 2010 Steffen Kamper <steffen@typo3.org>
+ *  All rights reserved
+ *
+ *  This script is part of the TYPO3 project. The TYPO3 project is
+ *  free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.
+ *
+ *  The GNU General Public License can be found at
+ *  http://www.gnu.org/copyleft/gpl.html.
+ *  A copy is found in the textfile GPL.txt and important notices to the license
+ *  from the author is found in LICENSE.txt distributed with these scripts.
+ *
+ *
+ *  This script is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  This copyright notice MUST APPEAR in all copies of the script!
+ ***************************************************************/
+
+/**
+ * Contains CTABLE class object.
+ *
+ * $Id: class.tslib_content.php 7905 2010-06-13 14:42:33Z ohader $
+ * @author Xavier Perseguers <typo3@perseguers.ch>
+ * @author Steffen Kamper <steffen@typo3.org>
+ */
+class tslib_content_ContentTable extends tslib_content_Abstract {
+
+       /**
+        * Rendering the cObject, CTABLE
+        *
+        * @param       array           Array of TypoScript properties
+        * @return      string          Output
+        */
+       public function render($conf = array()) {
+               $controlTable = t3lib_div::makeInstance('tslib_controlTable');
+               if ($conf['tableParams']) {
+                       $controlTable->tableParams = $conf['tableParams'];
+               }
+                       // loads the pagecontent
+               $controlTable->contentW = $conf['cWidth'];
+               // loads the menues if any
+               if (is_array($conf['c.'])) {
+                       $controlTable->content = $this->cObj->cObjGet($conf['c.'], 'c.');
+                       $controlTable->contentTDparams = isset($conf['c.']['TDParams']) ? $conf['c.']['TDParams'] : 'valign="top"';
+               }
+               if (is_array($conf['lm.'])) {
+                       $controlTable->lm = $this->cObj->cObjGet($conf['lm.'], 'lm.');
+                       $controlTable->lmTDparams = isset($conf['lm.']['TDParams']) ? $conf['lm.']['TDParams'] : 'valign="top"';
+               }
+               if (is_array($conf['tm.'])) {
+                       $controlTable->tm = $this->cObj->cObjGet($conf['tm.'], 'tm.');
+                       $controlTable->tmTDparams = isset($conf['tm.']['TDParams']) ? $conf['tm.']['TDParams'] : 'valign="top"';
+               }
+               if (is_array($conf['rm.'])) {
+                       $controlTable->rm = $this->cObj->cObjGet($conf['rm.'], 'rm.');
+                       $controlTable->rmTDparams = isset($conf['rm.']['TDParams']) ? $conf['rm.']['TDParams'] : 'valign="top"';
+               }
+               if (is_array($conf['bm.'])) {
+                       $controlTable->bm = $this->cObj->cObjGet($conf['bm.'], 'bm.');
+                       $controlTable->bmTDparams = isset($conf['bm.']['TDParams']) ? $conf['bm.']['TDParams'] : 'valign="top"';
+               }
+               return $controlTable->start($conf['offset'], $conf['cMargins']);
+       }
+
+}
+
+
+if (defined('TYPO3_MODE') && $TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['tslib/content/class.tslib_content_contenttable.php']) {
+       include_once ($TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['tslib/content/class.tslib_content_contenttable.php']);
+}
+
+?>
index 603b817..1a2c557 100644 (file)
@@ -1,59 +1,59 @@
-<?php\r
-/***************************************************************\r
- *  Copyright notice\r
- *\r
- *  (c) 2010 Xavier Perseguers <typo3@perseguers.ch>\r
- *  (c) 2010 Steffen Kamper <steffen@typo3.org>\r
- *  All rights reserved\r
- *\r
- *  This script is part of the TYPO3 project. The TYPO3 project is\r
- *  free software; you can redistribute it and/or modify\r
- *  it under the terms of the GNU General Public License as published by\r
- *  the Free Software Foundation; either version 2 of the License, or\r
- *  (at your option) any later version.\r
- *\r
- *  The GNU General Public License can be found at\r
- *  http://www.gnu.org/copyleft/gpl.html.\r
- *  A copy is found in the textfile GPL.txt and important notices to the license\r
- *  from the author is found in LICENSE.txt distributed with these scripts.\r
- *\r
- *\r
- *  This script is distributed in the hope that it will be useful,\r
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of\r
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\r
- *  GNU General Public License for more details.\r
- *\r
- *  This copyright notice MUST APPEAR in all copies of the script!\r
- ***************************************************************/\r
-\r
-/**\r
- * Contains FILE class object.\r
- *\r
- * $Id: class.tslib_content.php 7905 2010-06-13 14:42:33Z ohader $\r
- * @author Xavier Perseguers <typo3@perseguers.ch>\r
- * @author Steffen Kamper <steffen@typo3.org>\r
- */\r
-class tslib_content_File extends tslib_content_Abstract {\r
-\r
-       /**\r
-        * Rendering the cObject, FILE\r
-        *\r
-        * @param       array           Array of TypoScript properties\r
-        * @return      string          Output\r
-        */\r
-       public function render($conf = array()) {\r
-               $theValue = $this->cObj->fileResource($this->cObj->stdWrap($conf['file'], $conf['file.']), trim($this->cObj->getAltParam($conf, false)));\r
-               if ($conf['linkWrap']) {\r
-                       $theValue = $this->cObj->linkWrap($theValue, $conf['linkWrap']);\r
-               }\r
-               return $this->cObj->wrap($theValue, $conf['wrap']);\r
-       }\r
-\r
-}\r
-\r
-\r
-if (defined('TYPO3_MODE') && $TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['tslib/content/class.tslib_content_file.php']) {\r
-       include_once ($TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['tslib/content/class.tslib_content_file.php']);\r
-}\r
-\r
-?>\r
+<?php
+/***************************************************************
+ *  Copyright notice
+ *
+ *  (c) 2010 Xavier Perseguers <typo3@perseguers.ch>
+ *  (c) 2010 Steffen Kamper <steffen@typo3.org>
+ *  All rights reserved
+ *
+ *  This script is part of the TYPO3 project. The TYPO3 project is
+ *  free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.
+ *
+ *  The GNU General Public License can be found at
+ *  http://www.gnu.org/copyleft/gpl.html.
+ *  A copy is found in the textfile GPL.txt and important notices to the license
+ *  from the author is found in LICENSE.txt distributed with these scripts.
+ *
+ *
+ *  This script is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  This copyright notice MUST APPEAR in all copies of the script!
+ ***************************************************************/
+
+/**
+ * Contains FILE class object.
+ *
+ * $Id: class.tslib_content.php 7905 2010-06-13 14:42:33Z ohader $
+ * @author Xavier Perseguers <typo3@perseguers.ch>
+ * @author Steffen Kamper <steffen@typo3.org>
+ */
+class tslib_content_File extends tslib_content_Abstract {
+
+       /**
+        * Rendering the cObject, FILE
+        *
+        * @param       array           Array of TypoScript properties
+        * @return      string          Output
+        */
+       public function render($conf = array()) {
+               $theValue = $this->cObj->fileResource($this->cObj->stdWrap($conf['file'], $conf['file.']), trim($this->cObj->getAltParam($conf, false)));
+               if ($conf['linkWrap']) {
+                       $theValue = $this->cObj->linkWrap($theValue, $conf['linkWrap']);
+               }
+               return $this->cObj->wrap($theValue, $conf['wrap']);
+       }
+
+}
+
+
+if (defined('TYPO3_MODE') && $TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['tslib/content/class.tslib_content_file.php']) {
+       include_once ($TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['tslib/content/class.tslib_content_file.php']);
+}
+
+?>
index 51a4b87..4537305 100644 (file)
-<?php\r
-/***************************************************************\r
- *  Copyright notice\r
- *\r
- *  (c) 2010 Xavier Perseguers <typo3@perseguers.ch>\r
- *  (c) 2010 Steffen Kamper <steffen@typo3.org>\r
- *  All rights reserved\r
- *\r
- *  This script is part of the TYPO3 project. The TYPO3 project is\r
- *  free software; you can redistribute it and/or modify\r
- *  it under the terms of the GNU General Public License as published by\r
- *  the Free Software Foundation; either version 2 of the License, or\r
- *  (at your option) any later version.\r
- *\r
- *  The GNU General Public License can be found at\r
- *  http://www.gnu.org/copyleft/gpl.html.\r
- *  A copy is found in the textfile GPL.txt and important notices to the license\r
- *  from the author is found in LICENSE.txt distributed with these scripts.\r
- *\r
- *\r
- *  This script is distributed in the hope that it will be useful,\r
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of\r
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\r
- *  GNU General Public License for more details.\r
- *\r
- *  This copyright notice MUST APPEAR in all copies of the script!\r
- ***************************************************************/\r
-\r
-/**\r
- * Contains TEMPLATE class object.\r
- *\r
- * $Id: class.tslib_content.php 7905 2010-06-13 14:42:33Z ohader $\r
- * @author Xavier Perseguers <typo3@perseguers.ch>\r
- * @author Steffen Kamper <steffen@typo3.org>\r
- */\r
-class tslib_content_FluidTemplate extends tslib_content_Abstract {\r
-\r
-       /**\r
-        * Rendering the cObject, TEMPLATE\r
-        *\r
-        * @param       array           array of TypoScript properties\r
-        * @return      string          Output\r
-        * @see substituteMarkerArrayCached()\r
-        */\r
-       function TEMPLATE($conf) {\r
-               return $this->getContentObject('TEMPLATE')->render($conf);\r
-       }\r
-\r
-       /**\r
-        * Rendering the cObject, FLUIDTEMPLATE\r
-        *   configuration properties are:\r
-        *   - file     string+stdWrap  the FLUID template file\r
-        *   - extbase.pluginName, extbase.controllerExtensionName,\r
-        *   - extbase.controllerName, extbase.controllerActionName\r
-        *   - layoutRootPath   filepath+stdWrap        by default,\r
-        *   - partialRootPath  filepath+stdWrap        the\r
-        *   - variables        array of cObjects, the keys are the variable names in fluid\r
-        *\r
-        * an example would be\r
-        * 10 = FLUIDTEMPLATE\r
-        * 10.file = fileadmin/templates/mytemplate.html\r
-        * 10.partialRootPath = fileadmin/templates/partial/\r
-        * 10.variables {\r
-        *    mylabel = TEXT\r
-        *    mylabel.value = Label from TypoScript coming\r
-        * }\r
-        *\r
-        * @param       array           array of TypoScript properties\r
-        * @return      string          the HTML output\r
-        * @author      Steffen Ritter  <info@steffen-ritter.net>\r
-        * @author      Benjamin Mack   <benni@typo3.org>\r
-        */\r
-       public function render($conf = array()) {\r
-                       // check if the needed extensions are installed\r
-               if (!t3lib_extMgm::isLoaded('fluid')) {\r
-                       return 'You need to install "Fluid" in order to use the FLUIDTEMPLATE content element';\r
-               }\r
-               if (!t3lib_extMgm::isLoaded('extbase')) {\r
-                       return 'You need to install "Extbase" in order to use the FLUIDTEMPLATE content element';\r
-               }\r
-\r
-                       // initialize the extbase autoloader,\r
-                       // see Extbase_Dispatcher->initializeClassLoader\r
-               if (!class_exists('Tx_Extbase_Utility_ClassLoader')) {\r
-                       require(t3lib_extmgm::extPath('extbase') . 'Classes/Utility/ClassLoader.php');\r
-\r
-                       $classLoader = new Tx_Extbase_Utility_ClassLoader();\r
-                       spl_autoload_register(array($classLoader, 'loadClass'));\r
-               }\r
-\r
-\r
-               /**\r
-                * 1. initializing configuration parameters\r
-                **/\r
-\r
-                       // fetch the FLUID file\r
-               $templateFile = $GLOBALS['TSFE']->tmpl->getFileName($this->cObj->stdWrap($conf['file'], $conf['file.']));\r
-               $templatePath = dirname($templateFile) . '/';\r
-               $layoutRootPath = $templatePath . 'Layouts';\r
-               $partialRootPath = $templatePath . 'Partials';\r
-\r
-                       // override the default layout path via typoscript\r
-               if (isset($conf['layoutRootPath']) || isset($conf['layoutRootPath.'])) {\r
-                       $layoutRootPath = $this->cObj->stdWrap($conf['layoutRootPath'], $conf['layoutRootPath.']);\r
-                       $layoutRootPath = t3lib_div::getFileAbsFileName($layoutRootPath);\r
-               }\r
-\r
-                       // override the default partials path via typoscript\r
-               if (isset($conf['partialRootPath']) || isset($conf['partialRootPath.'])) {\r
-                       $partialRootPath = $this->cObj->stdWrap($conf['partialRootPath'], $conf['partialRootPath.']);\r
-                       $partialRootPath = t3lib_div::getFileAbsFileName($partialRootPath);\r
-               }\r
-\r
-\r
-                       // set some default variables for initializing Extbase\r
-               if (isset($conf['extbase.']['pluginName'])) {\r
-                       $requestPluginName = $conf['extbase.']['pluginName'];\r
-               } else {\r
-                       $requestPluginName = 'pi1';\r
-               }\r
-\r
-               if (isset($conf['extbase.']['controllerExtensionName'])) {\r
-                       $requestControllerExtensionName = $conf['extbase.']['controllerExtensionName'];\r
-               } else {\r
-                       $requestControllerExtensionName = 'cms';\r
-               }\r
-\r
-               if (isset($conf['extbase.']['controllerName'])) {\r
-                       $requestControllerName = $conf['extbase.']['controllerName'];\r
-               } else {\r
-                       $requestControllerName = 'cms';\r
-               }\r
-\r
-               if (isset($conf['extbase.']['controllerActionName'])) {\r
-                       $requestControllerActionName = $conf['extbase.']['controllerActionName'];\r
-               } else {\r
-                       $requestControllerActionName = 'index';\r
-               }\r
-\r
-\r
-               /**\r
-                * 2. initializing Fluid classes,\r
-                * first, the controller context needs to be created\r
-                **/\r
-               $objectManager = t3lib_div::makeInstance('Tx_Fluid_Compatibility_ObjectManager');\r
-\r
-                       // creating a request object\r
-               $controllerContext = $objectManager->create('Tx_Extbase_MVC_Controller_ControllerContext');\r
-               /**\r
-                * @var $request Tx_Extbase_MVC_Web_Request\r
-                */\r
-               $request = t3lib_div::makeInstance('Tx_Extbase_MVC_Web_Request');\r
-               $request->setPluginName($requestPluginName);\r
-               $request->setControllerExtensionName($requestControllerExtensionName);\r
-               $request->setControllerName($requestControllerName);\r
-               $request->setControllerActionName($requestControllerActionName);\r
-               $request->setRequestURI(t3lib_div::getIndpEnv('TYPO3_REQUEST_URL'));\r
-               $request->setBaseURI(t3lib_div::getIndpEnv('TYPO3_SITE_URL'));\r
-\r
-               /**\r
-                * @var $uriBuilder Tx_Extbase_MVC_Web_Routing_UriBuilder\r
-                */\r
-               $uriBuilder = t3lib_div::makeInstance('Tx_Extbase_MVC_Web_Routing_UriBuilder');\r
-               $uriBuilder->setRequest($request);\r
-\r
-               $controllerContext->setRequest($request);\r
-               $controllerContext->setUriBuilder($uriBuilder);\r
-\r
-               /**\r
-                * @var $view Tx_Fluid_View_TemplateView\r
-                */\r
-               $view = t3lib_div::makeInstance('Tx_Fluid_View_TemplateView');\r
-               $view->setControllerContext($controllerContext);\r
-\r
-                       // setting the paths for the template and the layouts/partials\r
-               $view->setTemplatePathAndFilename($templateFile);\r
-               $view->setLayoutRootPath($layoutRootPath);\r
-               $view->setPartialRootPath($partialRootPath);\r
-\r
-                       // In FLOW3, solved through Object Lifecycle methods,\r
-                       // v4 needs to call it explicitely\r
-               $view->initializeView();\r
-\r
-\r
-               /**\r
-                * 3. variable replacement\r
-                */\r
-               $reservedVariables = array('data', 'current');\r
-                       // accumulate the variables to be replaced\r
-                       // and loop them through cObjGetSingle\r
-               $variables = (array) $conf['variables.'];\r
-               foreach ($variables as $variableName => $cObjType) {\r
-                       if(!in_array($variableName, $reservedVariables)) {\r
-                               if (!is_array($cObjType)) {\r
-                                       $view->assign($variableName, $this->cObj->cObjGetSingle($cObjType, $variables[$variableName . '.']));\r
-                               }\r
-                       } else {\r
-                               throw new InvalidArgumentException('Cannot use reserved name "' . $variableName . '" as variable name in FLUIDTEMPLATE');\r
-                       }\r
-               }\r
-               $view->assign('data', $this->cObj->data);\r
-               $view->assign('current', $this->cObj->data[$this->cObj->currentValKey]);\r
-\r
-               /**\r
-                * 4. render the content\r
-                */\r
-               $content = $view->render();\r
-               return $this->cObj->stdWrap($content, $conf['stdWrap.']);\r
-       }\r
-\r
-}\r
-\r
-\r
-if (defined('TYPO3_MODE') && $TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['tslib/content/class.tslib_content_fluidtemplate.php']) {\r
-       include_once ($TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['tslib/content/class.tslib_content_fluidtemplate.php']);\r
-}\r
-\r
-?>\r
+<?php
+/***************************************************************
+ *  Copyright notice
+ *
+ *  (c) 2010 Xavier Perseguers <typo3@perseguers.ch>
+ *  (c) 2010 Steffen Kamper <steffen@typo3.org>
+ *  All rights reserved
+ *
+ *  This script is part of the TYPO3 project. The TYPO3 project is
+ *  free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.
+ *
+ *  The GNU General Public License can be found at
+ *  http://www.gnu.org/copyleft/gpl.html.
+ *  A copy is found in the textfile GPL.txt and important notices to the license
+ *  from the author is found in LICENSE.txt distributed with these scripts.
+ *
+ *
+ *  This script is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  This copyright notice MUST APPEAR in all copies of the script!
+ ***************************************************************/
+
+/**
+ * Contains TEMPLATE class object.
+ *
+ * $Id: class.tslib_content.php 7905 2010-06-13 14:42:33Z ohader $
+ * @author Xavier Perseguers <typo3@perseguers.ch>
+ * @author Steffen Kamper <steffen@typo3.org>
+ */
+class tslib_content_FluidTemplate extends tslib_content_Abstract {
+
+       /**
+        * Rendering the cObject, TEMPLATE
+        *
+        * @param       array           array of TypoScript properties
+        * @return      string          Output
+        * @see substituteMarkerArrayCached()
+        */
+       function TEMPLATE($conf) {
+               return $this->getContentObject('TEMPLATE')->render($conf);
+       }
+
+       /**
+        * Rendering the cObject, FLUIDTEMPLATE
+        *   configuration properties are:
+        *   - file     string+stdWrap  the FLUID template file
+        *   - extbase.pluginName, extbase.controllerExtensionName,
+        *   - extbase.controllerName, extbase.controllerActionName
+        *   - layoutRootPath   filepath+stdWrap        by default,
+        *   - partialRootPath  filepath+stdWrap        the
+        *   - variables        array of cObjects, the keys are the variable names in fluid
+        *
+        * an example would be
+        * 10 = FLUIDTEMPLATE
+        * 10.file = fileadmin/templates/mytemplate.html
+        * 10.partialRootPath = fileadmin/templates/partial/
+        * 10.variables {
+        *    mylabel = TEXT
+        *    mylabel.value = Label from TypoScript coming
+        * }
+        *
+        * @param       array           array of TypoScript properties
+        * @return      string          the HTML output
+        * @author      Steffen Ritter  <info@steffen-ritter.net>
+        * @author      Benjamin Mack   <benni@typo3.org>
+        */
+       public function render($conf = array()) {
+                       // check if the needed extensions are installed
+               if (!t3lib_extMgm::isLoaded('fluid')) {
+                       return 'You need to install "Fluid" in order to use the FLUIDTEMPLATE content element';
+               }
+               if (!t3lib_extMgm::isLoaded('extbase')) {
+                       return 'You need to install "Extbase" in order to use the FLUIDTEMPLATE content element';
+               }
+
+                       // initialize the extbase autoloader,
+                       // see Extbase_Dispatcher->initializeClassLoader
+               if (!class_exists('Tx_Extbase_Utility_ClassLoader')) {
+                       require(t3lib_extmgm::extPath('extbase') . 'Classes/Utility/ClassLoader.php');
+
+                       $classLoader = new Tx_Extbase_Utility_ClassLoader();
+                       spl_autoload_register(array($classLoader, 'loadClass'));
+               }
+
+
+               /**
+                * 1. initializing configuration parameters
+                **/
+
+                       // fetch the FLUID file
+               $templateFile = $GLOBALS['TSFE']->tmpl->getFileName($this->cObj->stdWrap($conf['file'], $conf['file.']));
+               $templatePath = dirname($templateFile) . '/';
+               $layoutRootPath = $templatePath . 'Layouts';
+               $partialRootPath = $templatePath . 'Partials';
+
+                       // override the default layout path via typoscript
+               if (isset($conf['layoutRootPath']) || isset($conf['layoutRootPath.'])) {
+                       $layoutRootPath = $this->cObj->stdWrap($conf['layoutRootPath'], $conf['layoutRootPath.']);
+                       $layoutRootPath = t3lib_div::getFileAbsFileName($layoutRootPath);
+               }
+
+                       // override the default partials path via typoscript
+               if (isset($conf['partialRootPath']) || isset($conf['partialRootPath.'])) {
+                       $partialRootPath = $this->cObj->stdWrap($conf['partialRootPath'], $conf['partialRootPath.']);
+                       $partialRootPath = t3lib_div::getFileAbsFileName($partialRootPath);
+               }
+
+
+                       // set some default variables for initializing Extbase
+               if (isset($conf['extbase.']['pluginName'])) {
+                       $requestPluginName = $conf['extbase.']['pluginName'];
+               } else {
+                       $requestPluginName = 'pi1';
+               }
+
+               if (isset($conf['extbase.']['controllerExtensionName'])) {
+                       $requestControllerExtensionName = $conf['extbase.']['controllerExtensionName'];
+               } else {
+                       $requestControllerExtensionName = 'cms';
+               }
+
+               if (isset($conf['extbase.']['controllerName'])) {
+                       $requestControllerName = $conf['extbase.']['controllerName'];
+               } else {
+                       $requestControllerName = 'cms';
+               }
+
+               if (isset($conf['extbase.']['controllerActionName'])) {
+                       $requestControllerActionName = $conf['extbase.']['controllerActionName'];
+               } else {
+                       $requestControllerActionName = 'index';
+               }
+
+
+               /**
+                * 2. initializing Fluid classes,
+                * first, the controller context needs to be created
+                **/
+               $objectManager = t3lib_div::makeInstance('Tx_Fluid_Compatibility_ObjectManager');
+
+                       // creating a request object
+               $controllerContext = $objectManager->create('Tx_Extbase_MVC_Controller_ControllerContext');
+               /**
+                * @var $request Tx_Extbase_MVC_Web_Request
+                */
+               $request = t3lib_div::makeInstance('Tx_Extbase_MVC_Web_Request');
+               $request->setPluginName($requestPluginName);
+               $request->setControllerExtensionName($requestControllerExtensionName);
+               $request->setControllerName($requestControllerName);
+               $request->setControllerActionName($requestControllerActionName);
+               $request->setRequestURI(t3lib_div::getIndpEnv('TYPO3_REQUEST_URL'));
+               $request->setBaseURI(t3lib_div::getIndpEnv('TYPO3_SITE_URL'));
+
+               /**
+                * @var $uriBuilder Tx_Extbase_MVC_Web_Routing_UriBuilder
+                */
+               $uriBuilder = t3lib_div::makeInstance('Tx_Extbase_MVC_Web_Routing_UriBuilder');
+               $uriBuilder->setRequest($request);
+
+               $controllerContext->setRequest($request);
+               $controllerContext->setUriBuilder($uriBuilder);
+
+               /**
+                * @var $view Tx_Fluid_View_TemplateView
+                */
+               $view = t3lib_div::makeInstance('Tx_Fluid_View_TemplateView');
+               $view->setControllerContext($controllerContext);
+
+                       // setting the paths for the template and the layouts/partials
+               $view->setTemplatePathAndFilename($templateFile);
+               $view->setLayoutRootPath($layoutRootPath);
+               $view->setPartialRootPath($partialRootPath);
+
+                       // In FLOW3, solved through Object Lifecycle methods,
+                       // v4 needs to call it explicitely
+               $view->initializeView();
+
+
+               /**
+                * 3. variable replacement
+                */
+               $reservedVariables = array('data', 'current');
+                       // accumulate the variables to be replaced
+                       // and loop them through cObjGetSingle
+               $variables = (array) $conf['variables.'];
+               foreach ($variables as $variableName => $cObjType) {
+                       if(!in_array($variableName, $reservedVariables)) {
+                               if (!is_array($cObjType)) {
+                                       $view->assign($variableName, $this->cObj->cObjGetSingle($cObjType, $variables[$variableName . '.']));
+                               }
+                       } else {
+                               throw new InvalidArgumentException('Cannot use reserved name "' . $variableName . '" as variable name in FLUIDTEMPLATE');
+                       }
+               }
+               $view->assign('data', $this->cObj->data);
+               $view->assign('current', $this->cObj->data[$this->cObj->currentValKey]);
+
+               /**
+                * 4. render the content
+                */
+               $content = $view->render();
+               return $this->cObj->stdWrap($content, $conf['stdWrap.']);
+       }
+
+}
+
+
+if (defined('TYPO3_MODE') && $TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['tslib/content/class.tslib_content_fluidtemplate.php']) {
+       include_once ($TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['tslib/content/class.tslib_content_fluidtemplate.php']);
+}
+
+?>
index 2f5b703..675c49f 100644 (file)
-<?php\r
-/***************************************************************\r
- *  Copyright notice\r
- *\r
- *  (c) 2010 Xavier Perseguers <typo3@perseguers.ch>\r
- *  (c) 2010 Steffen Kamper <steffen@typo3.org>\r
- *  All rights reserved\r
- *\r
- *  This script is part of the TYPO3 project. The TYPO3 project is\r
- *  free software; you can redistribute it and/or modify\r
- *  it under the terms of the GNU General Public License as published by\r
- *  the Free Software Foundation; either version 2 of the License, or\r
- *  (at your option) any later version.\r
- *\r
- *  The GNU General Public License can be found at\r
- *  http://www.gnu.org/copyleft/gpl.html.\r
- *  A copy is found in the textfile GPL.txt and important notices to the license\r
- *  from the author is found in LICENSE.txt distributed with these scripts.\r
- *\r
- *\r
- *  This script is distributed in the hope that it will be useful,\r
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of\r
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\r
- *  GNU General Public License for more details.\r
- *\r
- *  This copyright notice MUST APPEAR in all copies of the script!\r
- ***************************************************************/\r
-\r
-/**\r
- * Contains FORM class object.\r
- *\r
- * $Id: class.tslib_content.php 7905 2010-06-13 14:42:33Z ohader $\r
- * @author Xavier Perseguers <typo3@perseguers.ch>\r
- * @author Steffen Kamper <steffen@typo3.org>\r
- */\r
-class tslib_content_Form extends tslib_content_Abstract {\r
-\r
-       /**\r
-        * Rendering the cObject, FORM\r
-        *\r
-        * Note on $formData:\r
-        * In the optional $formData array each entry represents a line in the ordinary setup.\r
-        * In those entries each entry (0,1,2...) represents a space normally divided by the '|' line.\r
-        *\r
-        * $formData [] = array('Name:', 'name=input, 25 ', 'Default value....');\r
-        * $formData [] = array('Email:', 'email=input, 25 ', 'Default value for email....');\r
-        *\r
-        * - corresponds to the $conf['data'] value being :\r
-        * Name:|name=input, 25 |Default value....||Email:|email=input, 25 |Default value for email....\r
-        *\r
-        * If $formData is an array the value of $conf['data'] is ignored.\r
-        *\r
-        * @param       array           Array of TypoScript properties\r
-        * @param       array           Alternative formdata overriding whatever comes from TypoScript\r
-        * @return      string          Output\r
-        */\r
-       public function render($conf = array(), $formData = '') {\r
-               $content = '';\r
-               if (is_array($formData)) {\r
-                       $dataArr = $formData;\r
-               } else {\r
-                       $data = $this->cObj->stdWrap($conf['data'], $conf['data.']);\r
-                               // Clearing dataArr\r
-                       $dataArr = array();\r
-                               // Getting the original config\r
-                       if (trim($data)) {\r
-                               $data = str_replace(LF, '||', $data);\r
-                               $dataArr = explode('||', $data);\r
-                       }\r
-                               // Adding the new dataArray config form:\r
-                       if (is_array($conf['dataArray.'])) { // dataArray is supplied\r
-                               $sKeyArray = t3lib_TStemplate::sortedKeyList($conf['dataArray.'], TRUE);\r
-                               foreach ($sKeyArray as $theKey) {\r
-                                       $dAA = $conf['dataArray.'][$theKey . '.'];\r
-                                       if (is_array($dAA)) {\r
-                                               $temp = array();\r
-                                               list ($temp[0]) = explode('|', $dAA['label.'] ? $this->cObj->stdWrap($dAA['label'], $dAA['label.']) : $dAA['label']);\r
-                                               list ($temp[1]) = explode('|', $dAA['type']);\r
-                                               if ($dAA['required']) {\r
-                                                       $temp[1] = '*' . $temp[1];\r
-                                               }\r
-                                               list ($temp[2]) = explode('|', $dAA['value.'] ? $this->cObj->stdWrap($dAA['value'], $dAA['value.']) : $dAA['value']);\r
-                                                       // If value array is set, then implode those values.\r
-                                               if (is_array($dAA['valueArray.'])) {\r
-                                                       $temp_accum = array();\r
-                                                       foreach ($dAA['valueArray.'] as $dAKey_vA => $dAA_vA) {\r
-                                                               if (is_array($dAA_vA) && !strcmp(intval($dAKey_vA) . '.', $dAKey_vA)) {\r
-                                                                       $temp_vA = array();\r
-                                                                       list ($temp_vA[0]) = explode('=', $dAA_vA['label.'] ? $this->cObj->stdWrap($dAA_vA['label'], $dAA_vA['label.']) : $dAA_vA['label']);\r
-                                                                       if ($dAA_vA['selected']) {\r
-                                                                               $temp_vA[0] = '*' . $temp_vA[0];\r
-                                                                       }\r
-                                                                       list ($temp_vA[1]) = explode(',', $dAA_vA['value']);\r
-                                                               }\r
-                                                               $temp_accum[] = implode('=', $temp_vA);\r
-                                                       }\r
-                                                       $temp[2] = implode(',', $temp_accum);\r
-                                               }\r
-                                               list ($temp[3]) = explode('|', $dAA['specialEval.'] ? $this->cObj->stdWrap($dAA['specialEval'], $dAA['specialEval.']) : $dAA['specialEval']);\r
-\r
-                                                       // adding the form entry to the dataArray\r
-                                               $dataArr[] = implode('|', $temp);\r
-                                       }\r
-                               }\r
-                       }\r
-               }\r
-\r
-               $attachmentCounter = '';\r
-               $hiddenfields = '';\r
-               $fieldlist = array();\r
-               $propertyOverride = array();\r
-               $fieldname_hashArray = array();\r
-               $cc = 0;\r
-\r
-               $xhtmlStrict = t3lib_div::inList('xhtml_strict,xhtml_11,xhtml_2', $GLOBALS['TSFE']->xhtmlDoctype);\r
-                       // Formname\r
-               if ($conf['formName']) {\r
-                       $formname = $this->cObj->cleanFormName($conf['formName']);\r
-               } else {\r
-                       $formname = $GLOBALS['TSFE']->uniqueHash();\r
-                       $formname = 'a' . $formname; // form name has to start with a letter to reach XHTML compliance\r
-               }\r
-\r
-               if (isset($conf['fieldPrefix'])) {\r
-                       if ($conf['fieldPrefix']) {\r
-                               $prefix = $this->cObj->cleanFormName($conf['fieldPrefix']);\r
-                       } else {\r
-                               $prefix = '';\r
-                       }\r
-               } else {\r
-                       $prefix = $formname;\r
-               }\r
-\r
-               foreach ($dataArr as $val) {\r
-\r
-                       $cc++;\r
-                       $confData = array();\r
-                       if (is_array($formData)) {\r
-                               $parts = $val;\r
-                               $val = 1; // TRUE...\r
-                       } else {\r
-                               $val = trim($val);\r
-                               $parts = explode('|', $val);\r
-                       }\r
-                       if ($val && strcspn($val, '#/')) {\r
-                                       // label:\r
-                               $confData['label'] = trim($parts[0]);\r
-                                       // field:\r
-                               $fParts = explode(',', $parts[1]);\r
-                               $fParts[0] = trim($fParts[0]);\r
-                               if (substr($fParts[0], 0, 1) == '*') {\r
-                                       $confData['required'] = 1;\r
-                                       $fParts[0] = substr($fParts[0], 1);\r
-                               }\r
-                               $typeParts = explode('=', $fParts[0]);\r
-                               $confData['type'] = trim(strtolower(end($typeParts)));\r
-                               if (count($typeParts) == 1) {\r
-                                       $confData['fieldname'] = $this->cObj->cleanFormName($parts[0]);\r
-                                       if (strtolower(preg_replace('/[^[:alnum:]]/', '', $confData['fieldname'])) == 'email') {\r
-                                               $confData['fieldname'] = 'email';\r
-                                       }\r
-                                               // Duplicate fieldnames resolved\r
-                                       if (isset($fieldname_hashArray[md5($confData['fieldname'])])) {\r
-                                               $confData['fieldname'] .= '_' . $cc;\r
-                                       }\r
-                                       $fieldname_hashArray[md5($confData['fieldname'])] = $confData['fieldname'];\r
-                                               // Attachment names...\r
-                                       if ($confData['type'] == 'file') {\r
-                                               $confData['fieldname'] = 'attachment' . $attachmentCounter;\r
-                                               $attachmentCounter = intval($attachmentCounter) + 1;\r
-                                       }\r
-                               } else {\r
-                                       $confData['fieldname'] = str_replace(' ', '_', trim($typeParts[0]));\r
-                               }\r
-                               $fieldCode = '';\r
-\r
-                               if ($conf['wrapFieldName']) {\r
-                                       $confData['fieldname'] = $this->cObj->wrap($confData['fieldname'], $conf['wrapFieldName']);\r
-                               }\r
-\r
-                                       // Set field name as current:\r
-                               $this->cObj->setCurrentVal($confData['fieldname']);\r
-\r
-                                       // Additional parameters\r
-                               if (trim($confData['type'])) {\r
-                                       $addParams = trim($conf['params']);\r
-                                       if (is_array($conf['params.']) && isset($conf['params.'][$confData['type']])) {\r
-                                               $addParams = trim($conf['params.'][$confData['type']]);\r
-                                       }\r
-                                       if (strcmp('', $addParams)) {\r
-                                               $addParams = ' ' . $addParams;\r
-                                       }\r
-                               } else\r
-                                       $addParams = '';\r
-\r
-                               if ($conf['dontMd5FieldNames']) {\r
-                                       $fName = $confData['fieldname'];\r
-                               } else {\r
-                                       $fName = md5($confData['fieldname']);\r
-                               }\r
-\r
-                                       // Accessibility: Set id = fieldname attribute:\r
-                               if ($conf['accessibility'] || $xhtmlStrict) {\r
-                                       $elementIdAttribute = ' id="' . $prefix . $fName . '"';\r
-                               } else {\r
-                                       $elementIdAttribute = '';\r
-                               }\r
-\r
-                                       // Create form field based on configuration/type:\r
-                               switch ($confData['type']) {\r
-                                       case 'textarea' :\r
-                                               $cols = trim($fParts[1]) ? intval($fParts[1]) : 20;\r
-                                               $compWidth = doubleval($conf['compensateFieldWidth']\r
-                                                                               ? $conf['compensateFieldWidth']\r
-                                                                               : $GLOBALS['TSFE']->compensateFieldWidth\r
-                                                                       );\r
-                                               $compWidth = $compWidth ? $compWidth : 1;\r
-                                               $cols = t3lib_div::intInRange($cols * $compWidth, 1, 120);\r
-\r
-                                               $rows = trim($fParts[2]) ? t3lib_div::intInRange($fParts[2], 1, 30) : 5;\r
-                                               $wrap = trim($fParts[3]);\r
-                                               if ($conf['noWrapAttr'] || $wrap === 'disabled') {\r
-                                                       $wrap = '';\r
-                                               } else {\r
-                                                       $wrap = $wrap ? ' wrap="' . $wrap . '"' : ' wrap="virtual"';\r
-                                               }\r
-                                               $default = $this->cObj->getFieldDefaultValue(\r
-                                                       $conf['noValueInsert'],\r
-                                                       $confData['fieldname'],\r
-                                                       str_replace('\n', LF, trim($parts[2]))\r
-                                               );\r
-                                               $fieldCode = sprintf(\r
-                                                       '<textarea name="%s"%s cols="%s" rows="%s"%s%s>%s</textarea>',\r
-                                                       $confData['fieldname'],\r
-                                                       $elementIdAttribute,\r
-                                                       $cols,\r
-                                                       $rows,\r
-                                                       $wrap,\r
-                                                       $addParams,\r
-                                                       t3lib_div::formatForTextarea($default)\r
-                                               );\r
-                                       break;\r
-                                       case 'input' :\r
-                                       case 'password' :\r
-                                               $size = trim($fParts[1]) ? intval($fParts[1]) : 20;\r
-                                               $compWidth = doubleval($conf['compensateFieldWidth']\r
-                                                                               ? $conf['compensateFieldWidth']\r
-                                                                               : $GLOBALS['TSFE']->compensateFieldWidth\r
-                                                                       );\r
-                                               $compWidth = $compWidth ? $compWidth : 1;\r
-                                               $size = t3lib_div::intInRange($size * $compWidth, 1, 120);\r
-                                               $default = $this->cObj->getFieldDefaultValue($conf['noValueInsert'], $confData['fieldname'], trim($parts[2]));\r
-\r
-                                               if ($confData['type'] == 'password') {\r
-                                                       $default = '';\r
-                                               }\r
-\r
-                                               $max = trim($fParts[2]) ? ' maxlength="' . t3lib_div::intInRange($fParts[2], 1, 1000) . '"' : "";\r
-                                               $theType = $confData['type'] == 'input' ? 'text' : 'password';\r
-\r
-                                               $fieldCode = sprintf(\r
-                                                       '<input type="%s" name="%s"%s size="%s"%s value="%s"%s />',\r
-                                                       $theType,\r
-                                                       $confData['fieldname'],\r
-                                                       $elementIdAttribute,\r
-                                                       $size,\r
-                                                       $max,\r
-                                                       htmlspecialchars($default),\r
-                                                       $addParams\r
-                                               );\r
-\r
-                                       break;\r
-                                       case 'file' :\r
-                                               $size = trim($fParts[1]) ? t3lib_div::intInRange($fParts[1], 1, 60) : 20;\r
-                                               $fieldCode = sprintf(\r
-                                                       '<input type="file" name="%s"%s size="%s"%s />',\r
-                                                       $confData['fieldname'],\r
-                                                       $elementIdAttribute,\r
-                                                       $size,\r
-                                                       $addParams\r
-                                               );\r
-                                       break;\r
-                                       case 'check' :\r
-                                                       // alternative default value:\r
-                                               $default = $this->cObj->getFieldDefaultValue($conf['noValueInsert'], $confData['fieldname'], trim($parts[2]));\r
-                                               $checked = $default ? ' checked="checked"' : '';\r
-                                               $fieldCode = sprintf(\r
-                                                       '<input type="checkbox" value="%s" name="%s"%s%s%s />',\r
-                                                       1,\r
-                                                       $confData['fieldname'],\r
-                                                       $elementIdAttribute,\r
-                                                       $checked,\r
-                                                       $addParams\r
-                                               );\r
-                                       break;\r
-                                       case 'select' :\r
-                                               $option = '';\r
-                                               $valueParts = explode(',', $parts[2]);\r
-                                                       // size\r
-                                               if (strtolower(trim($fParts[1])) == 'auto') {\r
-                                                       $fParts[1] = count($valueParts);\r
-                                               } // Auto size set here. Max 20\r
-                                               $size = trim($fParts[1]) ? t3lib_div::intInRange($fParts[1], 1, 20) : 1;\r
-                                                       // multiple\r
-                                               $multiple = strtolower(trim($fParts[2])) == 'm' ? ' multiple="multiple"' : '';\r
-\r
-                                               $items = array(); // Where the items will be\r
-                                               $defaults = array(); //RTF\r
-                                               $pCount = count($valueParts);\r
-                                               for ($a = 0; $a < $pCount; $a++) {\r
-                                                       $valueParts[$a] = trim($valueParts[$a]);\r
-                                                       if (substr($valueParts[$a], 0, 1) == '*') { // Finding default value\r
-                                                               $sel = 'selected';\r
-                                                               $valueParts[$a] = substr($valueParts[$a], 1);\r
-                                                       } else\r
-                                                               $sel = '';\r
-                                                               // Get value/label\r
-                                                       $subParts = explode('=', $valueParts[$a]);\r
-                                                       $subParts[1] = (isset($subParts[1]) ? trim($subParts[1]) : trim($subParts[0])); // Sets the value\r
-                                                       $items[] = $subParts; // Adds the value/label pair to the items-array\r
-                                                       if ($sel) {\r
-                                                               $defaults[] = $subParts[1];\r
-                                                       } // Sets the default value if value/label pair is marked as default.\r
-                                               }\r
-                                                       // alternative default value:\r
-                                               $default = $this->cObj->getFieldDefaultValue($conf['noValueInsert'], $confData['fieldname'], $defaults);\r
-                                               if (!is_array($default)) {\r
-                                                       $defaults = array();\r
-                                                       $defaults[] = $default;\r
-                                               } else {\r
-                                                       $defaults = $default;\r
-                                               }\r
-                                                       // Create the select-box:\r
-                                               $iCount = count($items);\r
-                                               for ($a = 0; $a < $iCount; $a++) {\r
-                                                       $option .= '<option value="' . $items[$a][1] . '"' . (in_array($items[$a][1], $defaults) ? ' selected="selected"' : '') . '>' . trim($items[$a][0]) . '</option>'; //RTF\r
-                                               }\r
-\r
-                                               if ($multiple) {\r
-                                                               // The fieldname must be prepended '[]' if multiple select. And the reason why it's prepended is, because the required-field list later must also have [] prepended.\r
-                                                       $confData['fieldname'] .= '[]';\r
-                                               }\r
-                                               $fieldCode = sprintf(\r
-                                                       '<select name="%s"%s size="%s"%s%s>%s</select>',\r
-                                                       $confData['fieldname'],\r
-                                                       $elementIdAttribute,\r
-                                                       $size,\r
-                                                       $multiple,\r
-                                                       $addParams,\r
-                                                       $option\r
-                                               ); //RTF\r
-                                       break;\r
-                                       case 'radio' :\r
-                                               $option = '';\r
-\r
-                                               $valueParts = explode(',', $parts[2]);\r
-                                               $items = array(); // Where the items will be\r
-                                               $default = '';\r
-                                               $pCount = count($valueParts);\r
-                                               for ($a = 0; $a < $pCount; $a++) {\r
-                                                       $valueParts[$a] = trim($valueParts[$a]);\r
-                                                       if (substr($valueParts[$a], 0, 1) == '*') {\r
-                                                               $sel = 'checked';\r
-                                                               $valueParts[$a] = substr($valueParts[$a], 1);\r
-                                                       } else\r
-                                                               $sel = '';\r
-                                                               // Get value/label\r
-                                                       $subParts = explode('=', $valueParts[$a]);\r
-                                                       $subParts[1] = (isset($subParts[1]) ? trim($subParts[1]) : trim($subParts[0])); // Sets the value\r
-                                                       $items[] = $subParts; // Adds the value/label pair to the items-array\r
-                                                       if ($sel) {\r
-                                                               $default = $subParts[1];\r
-                                                       } // Sets the default value if value/label pair is marked as default.\r
-                                               }\r
-                                                       // alternative default value:\r
-                                               $default = $this->cObj->getFieldDefaultValue($conf['noValueInsert'], $confData['fieldname'], $default);\r
-                                                       // Create the select-box:\r
-                                               $iCount = count($items);\r
-                                               for ($a = 0; $a < $iCount; $a++) {\r
-                                                       $optionParts = '';\r
-                                                       $radioId = $prefix . $fName . $this->cObj->cleanFormName($items[$a][0]);\r
-                                                       if ($conf['accessibility']) {\r
-                                                               $radioLabelIdAttribute = ' id="' . $radioId . '"';\r
-                                                       } else {\r
-                                                               $radioLabelIdAttribute = '';\r
-                                                       }\r
-                                                       $optionParts .= '<input type="radio" name="' . $confData['fieldname'] . '"' .\r
-                                                                       $radioLabelIdAttribute . ' value="' . $items[$a][1] . '"' .\r
-                                                                       (!strcmp($items[$a][1], $default) ? ' checked="checked"' : '') . $addParams . ' />';\r
-                                                       if ($conf['accessibility']) {\r
-                                                               $optionParts .= '<label for="' . $radioId . '">' . $this->cObj->stdWrap(trim($items[$a][0]),\r
-                                                                       $conf['radioWrap.']) . '</label>';\r
-                                                       } else {\r
-                                                               $optionParts .= $this->cObj->stdWrap(trim($items[$a][0]), $conf['radioWrap.']);\r
-                                                       }\r
-                                                       $option .= $this->cObj->stdWrap($optionParts, $conf['radioInputWrap.']);\r
-                                               }\r
-\r
-                                               if ($conf['accessibility']) {\r
-                                                       $accessibilityWrap = $conf['radioWrap.']['accessibilityWrap'];\r
-\r
-                                                       $search = array(\r
-                                                               '###RADIO_FIELD_ID###', '###RADIO_GROUP_LABEL###'\r
-                                                       );\r
-                                                       $replace = array(\r
-                                                               $elementIdAttribute, $confData['label']\r
-                                                       );\r
-                                                       $accessibilityWrap = str_replace($search, $replace, $accessibilityWrap);\r
-\r
-                                                       $option = $this->cObj->wrap($option, $accessibilityWrap);\r
-                                               }\r
-\r
-                                               $fieldCode = $option;\r
-                                       break;\r
-                                       case 'hidden' :\r
-                                               $value = trim($parts[2]);\r
-\r
-                                                       // If this form includes an auto responder message, include a HMAC checksum field\r
-                                                       // in order to verify potential abuse of this feature.\r
-                                               if (strlen($value) && t3lib_div::inList($confData['fieldname'], 'auto_respond_msg')) {\r
-                                                       $hmacChecksum = t3lib_div::hmac($value);\r
-                                                       $hiddenfields .= sprintf(\r
-                                                               '<input type="hidden" name="auto_respond_checksum" id="%sauto_respond_checksum" value="%s" />',\r
-                                                               $prefix,\r
-                                                               $hmacChecksum\r
-                                                       );\r
-                                               }\r
-\r
-                                               if (strlen($value) && t3lib_div::inList('recipient_copy,recipient',\r
-                                                       $confData['fieldname']) && $GLOBALS['TYPO3_CONF_VARS']['FE']['secureFormmail']) {\r
-                                                       break;\r
-                                               }\r
-                                               if (strlen($value) && t3lib_div::inList('recipient_copy,recipient', $confData['fieldname'])) {\r
-                                                       $value = $GLOBALS['TSFE']->codeString($value);\r
-                                               }\r
-                                               $hiddenfields .= sprintf(\r
-                                                       '<input type="hidden" name="%s"%s value="%s" />',\r
-                                                       $confData['fieldname'],\r
-                                                       $elementIdAttribute,\r
-                                                       htmlspecialchars($value)\r
-                                               );\r
-                                       break;\r
-                                       case 'property' :\r
-                                               if (t3lib_div::inList('type,locationData,goodMess,badMess,emailMess', $confData['fieldname'])) {\r
-                                                       $value = trim($parts[2]);\r
-                                                       $propertyOverride[$confData['fieldname']] = $value;\r
-                                                       $conf[$confData['fieldname']] = $value;\r
-                                               }\r
-                                       break;\r
-                                       case 'submit' :\r
-                                               $value = trim($parts[2]);\r
-                                               if ($conf['image.']) {\r
-                                                       $this->cObj->data[$this->cObj->currentValKey] = $value;\r
-                                                       $image = $this->cObj->IMG_RESOURCE($conf['image.']);\r
-                                                       $params = $conf['image.']['params'] ? ' ' . $conf['image.']['params'] : '';\r
-                                                       $params .= $this->cObj->getAltParam($conf['image.'], FALSE);\r
-                                                       $params .= $addParams;\r
-                                               } else {\r
-                                                       $image = '';\r
-                                               }\r
-                                               if ($image) {\r
-                                                       $fieldCode = sprintf(\r
-                                                               '<input type="image" name="%s"%s src="%s"%s />',\r
-                                                               $confData['fieldname'],\r
-                                                               $elementIdAttribute,\r
-                                                               $image,\r
-                                                               $params\r
-                                                       );\r
-                                               } else {\r
-                                                       $fieldCode = sprintf(\r
-                                                               '<input type="submit" name="%s"%s value="%s"%s />',\r
-                                                               $confData['fieldname'],\r
-                                                               $elementIdAttribute,\r
-                                                               t3lib_div::deHSCentities(htmlspecialchars($value)),\r
-                                                               $addParams\r
-                                                       );\r
-                                               }\r
-                                       break;\r
-                                       case 'reset' :\r
-                                               $value = trim($parts[2]);\r
-                                               $fieldCode = sprintf(\r
-                                                       '<input type="reset" name="%s"%s value="%s"%s />',\r
-                                                       $confData['fieldname'],\r
-                                                       $elementIdAttribute,\r
-                                                       t3lib_div::deHSCentities(htmlspecialchars($value)),\r
-                                                       $addParams\r
-                                               );\r
-                                       break;\r
-                                       case 'label' :\r
-                                               $fieldCode = nl2br(htmlspecialchars(trim($parts[2])));\r
-                                       break;\r
-                                       default :\r
-                                               $confData['type'] = 'comment';\r
-                                               $fieldCode = trim($parts[2]) . '&nbsp;';\r
-                                       break;\r
-                               }\r
-                               if ($fieldCode) {\r
-\r
-                                               // Checking for special evaluation modes:\r
-                                       if (t3lib_div::inList('textarea,input,password', $confData['type']) && strlen(trim($parts[3]))) {\r
-                                               $modeParameters = t3lib_div::trimExplode(':', $parts[3]);\r
-                                       } else {\r
-                                               $modeParameters = array();\r
-                                       }\r
-\r
-                                       // Adding evaluation based on settings:\r
-                                       switch ((string) $modeParameters[0]) {\r
-                                               case 'EREG' :\r
-                                                       $fieldlist[] = '_EREG';\r
-                                                       $fieldlist[] = $modeParameters[1];\r
-                                                       $fieldlist[] = $modeParameters[2];\r
-                                                       $fieldlist[] = $confData['fieldname'];\r
-                                                       $fieldlist[] = $confData['label'];\r
-                                                       $confData['required'] = 1; // Setting this so "required" layout is used.\r
-                                               break;\r
-                                               case 'EMAIL' :\r
-                                                       $fieldlist[] = '_EMAIL';\r
-                                                       $fieldlist[] = $confData['fieldname'];\r
-                                                       $fieldlist[] = $confData['label'];\r
-                                                       $confData['required'] = 1; // Setting this so "required" layout is used.\r
-                                               break;\r
-                                               default :\r
-                                                       if ($confData['required']) {\r
-                                                               $fieldlist[] = $confData['fieldname'];\r
-                                                               $fieldlist[] = $confData['label'];\r
-                                                       }\r
-                                               break;\r
-                                       }\r
-\r
-                                               // Field:\r
-                                       $fieldLabel = $confData['label'];\r
-                                       if ($conf['accessibility'] && trim($fieldLabel) && !preg_match('/^(label|hidden|comment)$/', $confData['type'])) {\r
-                                               $fieldLabel = '<label for="' . $prefix . $fName . '">' . $fieldLabel . '</label>';\r
-                                       }\r
-\r
-                                               // Getting template code:\r
-                                       $fieldCode = $this->cObj->stdWrap($fieldCode, $conf['fieldWrap.']);\r
-                                       $labelCode = $this->cObj->stdWrap($fieldLabel, $conf['labelWrap.']);\r
-                                       $commentCode = $this->cObj->stdWrap($confData['label'], $conf['commentWrap.']); // RTF\r
-                                       $result = $conf['layout'];\r
-                                       if ($conf['REQ'] && $confData['required']) {\r
-                                               if (is_array($conf['REQ.']['fieldWrap.']))\r
-                                                       $fieldCode = $this->cObj->stdWrap($fieldCode, $conf['REQ.']['fieldWrap.']);\r
-                                               if (is_array($conf['REQ.']['labelWrap.']))\r
-                                                       $labelCode = $this->cObj->stdWrap($fieldLabel, $conf['REQ.']['labelWrap.']);\r
-                                               if ($conf['REQ.']['layout']) {\r
-                                                       $result = $conf['REQ.']['layout'];\r
-                                               }\r
-                                       }\r
-                                       if ($confData['type'] == 'comment' && $conf['COMMENT.']['layout']) {\r
-                                               $result = $conf['COMMENT.']['layout'];\r
-                                       }\r
-                                       if ($confData['type'] == 'check' && $conf['CHECK.']['layout']) {\r
-                                               $result = $conf['CHECK.']['layout'];\r
-                                       }\r
-                                       if ($confData['type'] == 'radio' && $conf['RADIO.']['layout']) {\r
-                                               $result = $conf['RADIO.']['layout'];\r
-                                       }\r
-                                       if ($confData['type'] == 'label' && $conf['LABEL.']['layout']) {\r
-                                               $result = $conf['LABEL.']['layout'];\r
-                                       }\r
-                                       $result = str_replace('###FIELD###', $fieldCode, $result);\r
-                                       $result = str_replace('###LABEL###', $labelCode, $result);\r
-                                       $result = str_replace('###COMMENT###', $commentCode, $result); //RTF\r
-                                       $content .= $result;\r
-                               }\r
-                       }\r
-               }\r
-               if ($conf['stdWrap.']) {\r
-                       $content = $this->cObj->stdWrap($content, $conf['stdWrap.']);\r
-               }\r
-\r
-\r
-                       // redirect (external: where to go afterwards. internal: where to submit to)\r
-               $theRedirect = $this->cObj->stdWrap($conf['redirect'], $conf['redirect.']); // redirect should be set to the page to redirect to after an external script has been used. If internal scripts is used, and if no 'type' is set that dictates otherwise, redirect is used as the url to jump to as long as it's an integer (page)\r
-               $page = $GLOBALS['TSFE']->page;\r
-               if (!$theRedirect) { // Internal: Just submit to current page\r
-                       $LD = $GLOBALS['TSFE']->tmpl->linkData(\r
-                               $page,\r
-                               $conf['target'],\r
-                               $conf['no_cache'],\r
-                               'index.php',\r
-                               '',\r
-                               $this->cObj->getClosestMPvalueForPage($page['uid'])\r
-                       );\r
-               } elseif (t3lib_div::testInt($theRedirect)) { // Internal: Submit to page with ID $theRedirect\r
-                       $page = $GLOBALS['TSFE']->sys_page->getPage_noCheck($theRedirect);\r
-                       $LD = $GLOBALS['TSFE']->tmpl->linkData(\r
-                               $page,\r
-                               $conf['target'],\r
-                               $conf['no_cache'],\r
-                               'index.php',\r
-                               '',\r
-                               $this->cObj->getClosestMPvalueForPage($page['uid'])\r
-                       );\r
-               } else { // External URL, redirect-hidden field is rendered!\r
-                       $LD = $GLOBALS['TSFE']->tmpl->linkData(\r
-                               $page,\r
-                               $conf['target'],\r
-                               $conf['no_cache'],\r
-                               '',\r
-                               '',\r
-                               $this->cObj->getClosestMPvalueForPage($page['uid'])\r
-                       );\r
-                       $LD['totalURL'] = $theRedirect;\r
-                       $hiddenfields .= '<input type="hidden" name="redirect" value="' . htmlspecialchars($LD['totalURL']) . '" />'; // 18-09-00 added\r
-               }\r
-\r
-                       // Formtype (where to submit to!):\r
-               $formtype = $propertyOverride['type'] ? $propertyOverride['type'] : $this->cObj->stdWrap($conf['type'], $conf['type.']);\r
-               if (t3lib_div::testInt($formtype)) { // Submit to a specific page\r
-                       $page = $GLOBALS['TSFE']->sys_page->getPage_noCheck($formtype);\r
-                       $LD_A = $GLOBALS['TSFE']->tmpl->linkData(\r
-                               $page,\r
-                               $conf['target'],\r
-                               $conf['no_cache'],\r
-                               '',\r
-                               '',\r
-                               $this->cObj->getClosestMPvalueForPage($page['uid'])\r
-                       );\r
-                       $action = $LD_A['totalURL'];\r
-               } elseif ($formtype) { // Submit to external script\r
-                       $LD_A = $LD;\r
-                       $action = $formtype;\r
-               } elseif (t3lib_div::testInt($theRedirect)) {\r
-                       $LD_A = $LD;\r
-                       $action = $LD_A['totalURL'];\r
-               } else { // Submit to "nothing" - which is current page\r
-                       $LD_A = $GLOBALS['TSFE']->tmpl->linkData(\r
-                               $GLOBALS['TSFE']->page,\r
-                               $conf['target'],\r
-                               $conf['no_cache'],\r
-                               '',\r
-                               '',\r
-                               $this->cObj->getClosestMPvalueForPage($page['uid'])\r
-                       );\r
-                       $action = $LD_A['totalURL'];\r
-               }\r
-\r
-                       // Recipient:\r
-               $theEmail = $this->cObj->stdWrap($conf['recipient'], $conf['recipient.']);\r
-               if ($theEmail && !$GLOBALS['TYPO3_CONF_VARS']['FE']['secureFormmail']) {\r
-                       $theEmail = $GLOBALS['TSFE']->codeString($theEmail);\r
-                       $hiddenfields .= '<input type="hidden" name="recipient" value="' . htmlspecialchars($theEmail) . '" />';\r
-               }\r
-\r
-                       // location data:\r
-               if ($conf['locationData']) {\r
-                       if ($conf['locationData'] == 'HTTP_POST_VARS' && isset($_POST['locationData'])) {\r
-                               $locationData = t3lib_div::_POST('locationData');\r
-                       } else {\r
-                                       // locationData is [hte page id]:[tablename]:[uid of record]. Indicates on which page the record (from tablename with uid) is shown. Used to check access.\r
-                               $locationData = $GLOBALS['TSFE']->id . ':' . $this->cObj->currentRecord;\r
-                       }\r
-                       $hiddenfields .= '<input type="hidden" name="locationData" value="' . htmlspecialchars($locationData) . '" />';\r
-               }\r
-\r
-                       // hidden fields:\r
-               if (is_array($conf['hiddenFields.'])) {\r
-                       foreach ($conf['hiddenFields.'] as $hF_key => $hF_conf) {\r
-                               if (substr($hF_key, -1) != '.') {\r
-                                       $hF_value = $this->cObj->cObjGetSingle($hF_conf, $conf['hiddenFields.'][$hF_key . '.'], 'hiddenfields');\r
-                                       if (strlen($hF_value) && t3lib_div::inList('recipient_copy,recipient', $hF_key)) {\r
-                                               if ($GLOBALS['TYPO3_CONF_VARS']['FE']['secureFormmail']) {\r
-                                                       continue;\r
-                                               }\r
-                                               $hF_value = $GLOBALS['TSFE']->codeString($hF_value);\r
-                                       }\r
-                                       $hiddenfields .= '<input type="hidden" name="' . $hF_key . '" value="' . htmlspecialchars($hF_value) . '" />';\r
-                               }\r
-                       }\r
-               }\r
-\r
-                       // Wrap all hidden fields in a div tag (see http://bugs.typo3.org/view.php?id=678)\r
-               $hiddenfields = '<div style="display:none;">' . $hiddenfields . '</div>';\r
-\r
-               if ($conf['REQ']) {\r
-                       $validateForm = ' onsubmit="return validateForm(\'' . $formname . '\',\'' . implode(',', $fieldlist)\r
-                               . '\',' . t3lib_div::quoteJSvalue($conf['goodMess']) . ',' .\r
-                               t3lib_div::quoteJSvalue($conf['badMess']) . ',' .\r
-                               t3lib_div::quoteJSvalue($conf['emailMess']) . ')"';\r
-                       $GLOBALS['TSFE']->additionalHeaderData['JSFormValidate'] = '<script type="text/javascript" src="' .\r
-                               t3lib_div::createVersionNumberedFilename($GLOBALS['TSFE']->absRefPrefix .\r
-                               't3lib/jsfunc.validateform.js') . '"></script>';\r
-               } else {\r
-                       $validateForm = '';\r
-               }\r
-\r
-                       // Create form tag:\r
-               $theTarget = ($theRedirect ? $LD['target'] : $LD_A['target']);\r
-               $content = array(\r
-                       '<form' . ' action="' . htmlspecialchars($action) . '"' . ' id="' .\r
-                       $formname . '"' . ($xhtmlStrict ? '' : ' name="' . $formname . '"') .\r
-                       ' enctype="' . $GLOBALS['TYPO3_CONF_VARS']['SYS']['form_enctype'] . '"' .\r
-                       ' method="' . ($conf['method'] ? $conf['method'] : 'post') . '"' .\r
-                       ($theTarget ? ' target="' . $theTarget . '"' : '') .\r
-                       $validateForm . '>', $hiddenfields . $content,\r
-                       '</form>'\r
-               );\r
-\r
-               if ($conf['arrayReturnMode']) {\r
-                       $content['validateForm'] = $validateForm;\r
-                       $content['formname'] = $formname;\r
-                       return $content;\r
-               } else {\r
-                       return implode('', $content);\r
-               }\r
-       }\r
-\r
-}\r
-\r
-\r
-if (defined('TYPO3_MODE') && $TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['tslib/content/class.tslib_content_form.php']) {\r
-       include_once ($TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['tslib/content/class.tslib_content_form.php']);\r
-}\r
-\r
-?>\r
+<?php
+/***************************************************************
+ *  Copyright notice
+ *
+ *  (c) 2010 Xavier Perseguers <typo3@perseguers.ch>
+ *  (c) 2010 Steffen Kamper <steffen@typo3.org>
+ *  All rights reserved
+ *
+ *  This script is part of the TYPO3 project. The TYPO3 project is
+ *  free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.
+ *
+ *  The GNU General Public License can be found at
+ *  http://www.gnu.org/copyleft/gpl.html.
+ *  A copy is found in the textfile GPL.txt and important notices to the license
+ *  from the author is found in LICENSE.txt distributed with these scripts.
+ *
+ *
+ *  This script is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  This copyright notice MUST APPEAR in all copies of the script!
+ ***************************************************************/
+
+/**
+ * Contains FORM class object.
+ *
+ * $Id: class.tslib_content.php 7905 2010-06-13 14:42:33Z ohader $
+ * @author Xavier Perseguers <typo3@perseguers.ch>
+ * @author Steffen Kamper <steffen@typo3.org>
+ */
+class tslib_content_Form extends tslib_content_Abstract {
+
+       /**
+        * Rendering the cObject, FORM
+        *
+        * Note on $formData:
+        * In the optional $formData array each entry represents a line in the ordinary setup.
+        * In those entries each entry (0,1,2...) represents a space normally divided by the '|' line.
+        *
+        * $formData [] = array('Name:', 'name=input, 25 ', 'Default value....');
+        * $formData [] = array('Email:', 'email=input, 25 ', 'Default value for email....');
+        *
+        * - corresponds to the $conf['data'] value being :
+        * Name:|name=input, 25 |Default value....||Email:|email=input, 25 |Default value for email....
+        *
+        * If $formData is an array the value of $conf['data'] is ignored.
+        *
+        * @param       array           Array of TypoScript properties
+        * @param       array           Alternative formdata overriding whatever comes from TypoScript
+        * @return      string          Output
+        */
+       public function render($conf = array(), $formData = '') {
+               $content = '';
+               if (is_array($formData)) {
+                       $dataArr = $formData;
+               } else {
+                       $data = $this->cObj->stdWrap($conf['data'], $conf['data.']);
+                               // Clearing dataArr
+                       $dataArr = array();
+                               // Getting the original config
+                       if (trim($data)) {
+                               $data = str_replace(LF, '||', $data);
+                               $dataArr = explode('||', $data);
+                       }
+                               // Adding the new dataArray config form:
+                       if (is_array($conf['dataArray.'])) { // dataArray is supplied
+                               $sKeyArray = t3lib_TStemplate::sortedKeyList($conf['dataArray.'], TRUE);
+                               foreach ($sKeyArray as $theKey) {
+                                       $dAA = $conf['dataArray.'][$theKey . '.'];
+                                       if (is_array($dAA)) {
+                                               $temp = array();
+                                               list ($temp[0]) = explode('|', $dAA['label.'] ? $this->cObj->stdWrap($dAA['label'], $dAA['label.']) : $dAA['label']);
+                                               list ($temp[1]) = explode('|', $dAA['type']);
+                                               if ($dAA['required']) {
+                                                       $temp[1] = '*' . $temp[1];
+                                               }
+                                               list ($temp[2]) = explode('|', $dAA['value.'] ? $this->cObj->stdWrap($dAA['value'], $dAA['value.']) : $dAA['value']);
+                                                       // If value array is set, then implode those values.
+                                               if (is_array($dAA['valueArray.'])) {
+                                                       $temp_accum = array();
+                                                       foreach ($dAA['valueArray.'] as $dAKey_vA => $dAA_vA) {
+                                                               if (is_array($dAA_vA) && !strcmp(intval($dAKey_vA) . '.', $dAKey_vA)) {
+                                                                       $temp_vA = array();
+                                                                       list ($temp_vA[0]) = explode('=', $dAA_vA['label.'] ? $this->cObj->stdWrap($dAA_vA['label'], $dAA_vA['label.']) : $dAA_vA['label']);
+                                                                       if ($dAA_vA['selected']) {
+                                                                               $temp_vA[0] = '*' . $temp_vA[0];
+                                                                       }
+                                                                       list ($temp_vA[1]) = explode(',', $dAA_vA['value']);
+                                                               }
+                                                               $temp_accum[] = implode('=', $temp_vA);
+                                                       }
+                                                       $temp[2] = implode(',', $temp_accum);
+                                               }
+                                               list ($temp[3]) = explode('|', $dAA['specialEval.'] ? $this->cObj->stdWrap($dAA['specialEval'], $dAA['specialEval.']) : $dAA['specialEval']);
+
+                                                       // adding the form entry to the dataArray
+                                               $dataArr[] = implode('|', $temp);
+                                       }
+                               }
+                       }
+               }
+
+               $attachmentCounter = '';
+               $hiddenfields = '';
+               $fieldlist = array();
+               $propertyOverride = array();
+               $fieldname_hashArray = array();
+               $cc = 0;
+
+               $xhtmlStrict = t3lib_div::inList('xhtml_strict,xhtml_11,xhtml_2', $GLOBALS['TSFE']->xhtmlDoctype);
+                       // Formname
+               if ($conf['formName']) {
+                       $formname = $this->cObj->cleanFormName($conf['formName']);
+               } else {
+                       $formname = $GLOBALS['TSFE']->uniqueHash();
+                       $formname = 'a' . $formname; // form name has to start with a letter to reach XHTML compliance
+               }
+
+               if (isset($conf['fieldPrefix'])) {
+                       if ($conf['fieldPrefix']) {
+                               $prefix = $this->cObj->cleanFormName($conf['fieldPrefix']);
+                       } else {
+                               $prefix = '';
+                       }
+               } else {
+                       $prefix = $formname;
+               }
+
+               foreach ($dataArr as $val) {
+
+                       $cc++;
+                       $confData = array();
+                       if (is_array($formData)) {
+                               $parts = $val;
+                               $val = 1; // TRUE...
+                       } else {
+                               $val = trim($val);
+                               $parts = explode('|', $val);
+                       }
+                       if ($val && strcspn($val, '#/')) {
+                                       // label:
+                               $confData['label'] = trim($parts[0]);
+                                       // field:
+                               $fParts = explode(',', $parts[1]);
+                               $fParts[0] = trim($fParts[0]);
+                               if (substr($fParts[0], 0, 1) == '*') {
+                                       $confData['required'] = 1;
+                                       $fParts[0] = substr($fParts[0], 1);
+                               }
+                               $typeParts = explode('=', $fParts[0]);
+                               $confData['type'] = trim(strtolower(end($typeParts)));
+                               if (count($typeParts) == 1) {
+                                       $confData['fieldname'] = $this->cObj->cleanFormName($parts[0]);
+                                       if (strtolower(preg_replace('/[^[:alnum:]]/', '', $confData['fieldname'])) == 'email') {
+                                               $confData['fieldname'] = 'email';
+                                       }
+                                               // Duplicate fieldnames resolved
+                                       if (isset($fieldname_hashArray[md5($confData['fieldname'])])) {
+                                               $confData['fieldname'] .= '_' . $cc;
+                                       }
+                                       $fieldname_hashArray[md5($confData['fieldname'])] = $confData['fieldname'];
+                                               // Attachment names...
+                                       if ($confData['type'] == 'file') {
+                                               $confData['fieldname'] = 'attachment' . $attachmentCounter;
+                                               $attachmentCounter = intval($attachmentCounter) + 1;
+                                       }
+                               } else {
+                                       $confData['fieldname'] = str_replace(' ', '_', trim($typeParts[0]));
+                               }
+                               $fieldCode = '';
+
+                               if ($conf['wrapFieldName']) {
+                                       $confData['fieldname'] = $this->cObj->wrap($confData['fieldname'], $conf['wrapFieldName']);
+                               }
+
+                                       // Set field name as current:
+                               $this->cObj->setCurrentVal($confData['fieldname']);
+
+                                       // Additional parameters
+                               if (trim($confData['type'])) {
+                                       $addParams = trim($conf['params']);
+                                       if (is_array($conf['params.']) && isset($conf['params.'][$confData['type']])) {
+                                               $addParams = trim($conf['params.'][$confData['type']]);
+                                       }
+                                       if (strcmp('', $addParams)) {
+                                               $addParams = ' ' . $addParams;
+                                       }
+                               } else
+                                       $addParams = '';
+
+                               if ($conf['dontMd5FieldNames']) {
+                                       $fName = $confData['fieldname'];
+                               } else {
+                                       $fName = md5($confData['fieldname']);
+                               }
+
+                                       // Accessibility: Set id = fieldname attribute:
+                               if ($conf['accessibility'] || $xhtmlStrict) {
+                                       $elementIdAttribute = ' id="' . $prefix . $fName . '"';
+                               } else {
+                                       $elementIdAttribute = '';
+                               }
+
+                                       // Create form field based on configuration/type:
+                               switch ($confData['type']) {
+                                       case 'textarea' :
+                                               $cols = trim($fParts[1]) ? intval($fParts[1]) : 20;
+                                               $compWidth = doubleval($conf['compensateFieldWidth']
+                                                                               ? $conf['compensateFieldWidth']
+                                                                               : $GLOBALS['TSFE']->compensateFieldWidth
+                                                                       );
+                                               $compWidth = $compWidth ? $compWidth : 1;
+                                               $cols = t3lib_div::intInRange($cols * $compWidth, 1, 120);
+
+                                               $rows = trim($fParts[2]) ? t3lib_div::intInRange($fParts[2], 1, 30) : 5;
+                                               $wrap = trim($fParts[3]);
+                                               if ($conf['noWrapAttr'] || $wrap === 'disabled') {
+                                                       $wrap = '';
+                                               } else {
+                                                       $wrap = $wrap ? ' wrap="' . $wrap . '"' : ' wrap="virtual"';
+                                               }
+                                               $default = $this->cObj->getFieldDefaultValue(
+                                                       $conf['noValueInsert'],
+                                                       $confData['fieldname'],
+                                                       str_replace('\n', LF, trim($parts[2]))
+                                               );
+                                               $fieldCode = sprintf(
+                                                       '<textarea name="%s"%s cols="%s" rows="%s"%s%s>%s</textarea>',
+                                                       $confData['fieldname'],
+                                                       $elementIdAttribute,
+                                                       $cols,
+                                                       $rows,
+                                                       $wrap,
+                                                       $addParams,
+                                                       t3lib_div::formatForTextarea($default)
+                                               );
+                                       break;
+                                       case 'input' :
+                                       case 'password' :
+                                               $size = trim($fParts[1]) ? intval($fParts[1]) : 20;
+                                               $compWidth = doubleval($conf['compensateFieldWidth']
+                                                                               ? $conf['compensateFieldWidth']
+                                                                               : $GLOBALS['TSFE']->compensateFieldWidth
+                                                                       );
+                                               $compWidth = $compWidth ? $compWidth : 1;
+                                               $size = t3lib_div::intInRange($size * $compWidth, 1, 120);
+                                               $default = $this->cObj->getFieldDefaultValue($conf['noValueInsert'], $confData['fieldname'], trim($parts[2]));
+
+                                               if ($confData['type'] == 'password') {
+                                                       $default = '';
+                                               }
+
+                                               $max = trim($fParts[2]) ? ' maxlength="' . t3lib_div::intInRange($fParts[2], 1, 1000) . '"' : "";
+                                               $theType = $confData['type'] == 'input' ? 'text' : 'password';
+
+                                               $fieldCode = sprintf(
+                                                       '<input type="%s" name="%s"%s size="%s"%s value="%s"%s />',
+                                                       $theType,
+                                                       $confData['fieldname'],
+                                                       $elementIdAttribute,
+                                                       $size,
+                                                       $max,
+                                                       htmlspecialchars($default),
+                                                       $addParams
+                                               );
+
+                                       break;
+                                       case 'file' :
+                                               $size = trim($fParts[1]) ? t3lib_div::intInRange($fParts[1], 1, 60) : 20;
+                                               $fieldCode = sprintf(
+                                                       '<input type="file" name="%s"%s size="%s"%s />',
+                                                       $confData['fieldname'],
+                                                       $elementIdAttribute,
+                                                       $size,
+                                                       $addParams
+                                               );
+                                       break;
+                                       case 'check' :
+                                                       // alternative default value:
+                                               $default = $this->cObj->getFieldDefaultValue($conf['noValueInsert'], $confData['fieldname'], trim($parts[2]));
+                                               $checked = $default ? ' checked="checked"' : '';
+                                               $fieldCode = sprintf(
+                                                       '<input type="checkbox" value="%s" name="%s"%s%s%s />',
+                                                       1,
+                                                       $confData['fieldname'],
+                                                       $elementIdAttribute,
+                                                       $checked,
+                                                       $addParams
+                                               );
+                                       break;
+                                       case 'select' :
+                                               $option = '';
+                                               $valueParts = explode(',', $parts[2]);
+                                                       // size
+                                               if (strtolower(trim($fParts[1])) == 'auto') {
+                                                       $fParts[1] = count($valueParts);
+                                               } // Auto size set here. Max 20
+                                               $size = trim($fParts[1]) ? t3lib_div::intInRange($fParts[1], 1, 20) : 1;
+                                                       // multiple
+                                               $multiple = strtolower(trim($fParts[2])) == 'm' ? ' multiple="multiple"' : '';
+
+                                               $items = array(); // Where the items will be
+                                               $defaults = array(); //RTF
+                                               $pCount = count($valueParts);
+                                               for ($a = 0; $a < $pCount; $a++) {
+                                                       $valueParts[$a] = trim($valueParts[$a]);
+                                                       if (substr($valueParts[$a], 0, 1) == '*') { // Finding default value
+                                                               $sel = 'selected';
+                                                               $valueParts[$a] = substr($valueParts[$a], 1);
+                                                       } else
+                                                               $sel = '';
+                                                               // Get value/label
+                                                       $subParts = explode('=', $valueParts[$a]);
+                                                       $subParts[1] = (isset($subParts[1]) ? trim($subParts[1]) : trim($subParts[0])); // Sets the value
+                                                       $items[] = $subParts; // Adds the value/label pair to the items-array
+                                                       if ($sel) {
+                                                               $defaults[] = $subParts[1];
+                                                       } // Sets the default value if value/label pair is marked as default.
+                                               }
+                                                       // alternative default value:
+                                               $default = $this->cObj->getFieldDefaultValue($conf['noValueInsert'], $confData['fieldname'], $defaults);
+                                               if (!is_array($default)) {
+                                                       $defaults = array();
+                                                       $defaults[] = $default;
+                                               } else {
+                                                       $defaults = $default;
+                                               }
+                                                       // Create the select-box:
+                                               $iCount = count($items);
+                                               for ($a = 0; $a < $iCount; $a++) {
+                                                       $option .= '<option value="' . $items[$a][1] . '"' . (in_array($items[$a][1], $defaults) ? ' selected="selected"' : '') . '>' . trim($items[$a][0]) . '</option>'; //RTF
+                                               }
+
+                                               if ($multiple) {
+                                                               // The fieldname must be prepended '[]' if multiple select. And the reason why it's prepended is, because the required-field list later must also have [] prepended.
+                                                       $confData['fieldname'] .= '[]';
+                                               }
+                                               $fieldCode = sprintf(
+                                                       '<select name="%s"%s size="%s"%s%s>%s</select>',
+                                                       $confData['fieldname'],
+                                                       $elementIdAttribute,
+                                                       $size,
+                                                       $multiple,
+                                                       $addParams,
+                                                       $option
+                                               ); //RTF
+                                       break;
+                                       case 'radio' :
+                                               $option = '';
+
+                                               $valueParts = explode(',', $parts[2]);
+                                               $items = array(); // Where the items will be
+                                               $default = '';
+                                               $pCount = count($valueParts);
+                                               for ($a = 0; $a < $pCount; $a++) {
+                                                       $valueParts[$a] = trim($valueParts[$a]);
+                                                       if (substr($valueParts[$a], 0, 1) == '*') {
+                                                               $sel = 'checked';
+                                                               $valueParts[$a] = substr($valueParts[$a], 1);
+                                                       } else
+                                                               $sel = '';
+                                                               // Get value/label
+                                                       $subParts = explode('=', $valueParts[$a]);
+                                                       $subParts[1] = (isset($subParts[1]) ? trim($subParts[1]) : trim($subParts[0])); // Sets the value
+                                                       $items[] = $subParts; // Adds the value/label pair to the items-array
+                                                       if ($sel) {
+                                                               $default = $subParts[1];
+                                                       } // Sets the default value if value/label pair is marked as default.
+                                               }
+                                                       // alternative default value:
+                                               $default = $this->cObj->getFieldDefaultValue($conf['noValueInsert'], $confData['fieldname'], $default);
+                                                       // Create the select-box:
+                                               $iCount = count($items);
+                                               for ($a = 0; $a < $iCount; $a++) {
+                                                       $optionParts = '';
+                                                       $radioId = $prefix . $fName . $this->cObj->cleanFormName($items[$a][0]);
+                                                       if ($conf['accessibility']) {
+                                                               $radioLabelIdAttribute = ' id="' . $radioId . '"';
+                                                       } else {
+                                                               $radioLabelIdAttribute = '';
+                                                       }
+                                                       $optionParts .= '<input type="radio" name="' . $confData['fieldname'] . '"' .
+                                                                       $radioLabelIdAttribute . ' value="' . $items[$a][1] . '"' .
+                                                                       (!strcmp($items[$a][1], $default) ? ' checked="checked"' : '') . $addParams . ' />';
+                                                       if ($conf['accessibility']) {
+                                                               $optionParts .= '<label for="' . $radioId . '">' . $this->cObj->stdWrap(trim($items[$a][0]),
+                                                                       $conf['radioWrap.']) . '</label>';
+                                                       } else {
+                                                               $optionParts .= $this->cObj->stdWrap(trim($items[$a][0]), $conf['radioWrap.']);
+                                                       }
+                                                       $option .= $this->cObj->stdWrap($optionParts, $conf['radioInputWrap.']);
+                                               }
+
+                                               if ($conf['accessibility']) {
+                                                       $accessibilityWrap = $conf['radioWrap.']['accessibilityWrap'];
+
+                                                       $search = array(
+                                                               '###RADIO_FIELD_ID###', '###RADIO_GROUP_LABEL###'
+                                                       );
+                                                       $replace = array(
+                                                               $elementIdAttribute, $confData['label']
+                                                       );
+                                                       $accessibilityWrap = str_replace($search, $replace, $accessibilityWrap);
+
+                                                       $option = $this->cObj->wrap($option, $accessibilityWrap);
+                                               }
+
+                                               $fieldCode = $option;
+                                       break;
+                                       case 'hidden' :
+                                               $value = trim($parts[2]);
+
+                                                       // If this form includes an auto responder message, include a HMAC checksum field
+                                                       // in order to verify potential abuse of this feature.
+                                               if (strlen($value) && t3lib_div::inList($confData['fieldname'], 'auto_respond_msg')) {
+                                                       $hmacChecksum = t3lib_div::hmac($value);
+                                                       $hiddenfields .= sprintf(
+                                                               '<input type="hidden" name="auto_respond_checksum" id="%sauto_respond_checksum" value="%s" />',
+                                                               $prefix,
+                                                               $hmacChecksum
+                                                       );
+                                               }
+
+                                               if (strlen($value) && t3lib_div::inList('recipient_copy,recipient',
+                                                       $confData['fieldname']) && $GLOBALS['TYPO3_CONF_VARS']['FE']['secureFormmail']) {
+                                                       break;
+                                               }
+                                               if (strlen($value) && t3lib_div::inList('recipient_copy,recipient', $confData['fieldname'])) {
+                                                       $value = $GLOBALS['TSFE']->codeString($value);
+                                               }
+                                               $hiddenfields .= sprintf(
+                                                       '<input type="hidden" name="%s"%s value="%s" />',
+                                                       $confData['fieldname'],
+                                                       $elementIdAttribute,
+                                                       htmlspecialchars($value)
+                                               );
+                                       break;
+                                       case 'property' :
+                                               if (t3lib_div::inList('type,locationData,goodMess,badMess,emailMess', $confData['fieldname'])) {
+                                                       $value = trim($parts[2]);
+                                                       $propertyOverride[$confData['fieldname']] = $value;
+                                                       $conf[$confData['fieldname']] = $value;
+                                               }
+                                       break;
+                                       case 'submit' :
+                                               $value = trim($parts[2]);
+                                               if ($conf['image.']) {
+                                                       $this->cObj->data[$this->cObj->currentValKey] = $value;
+                                                       $image = $this->cObj->IMG_RESOURCE($conf['image.']);
+                                                       $params = $conf['image.']['params'] ? ' ' . $conf['image.']['params'] : '';
+                                                       $params .= $this->cObj->getAltParam($conf['image.'], FALSE);
+                                                       $params .= $addParams;
+                                               } else {
+                                                       $image = '';
+                                               }
+                                               if ($image) {
+                                                       $fieldCode = sprintf(
+                                                               '<input type="image" name="%s"%s src="%s"%s />',
+                                                               $confData['fieldname'],
+                                                               $elementIdAttribute,
+                                                               $image,
+                                                               $params
+                                                       );
+                                               } else {
+                                                       $fieldCode = sprintf(
+                                                               '<input type="submit" name="%s"%s value="%s"%s />',
+                                                               $confData['fieldname'],
+                                                               $elementIdAttribute,
+                                                               t3lib_div::deHSCentities(htmlspecialchars($value)),
+                                                               $addParams
+                                                       );
+                                               }
+                                       break;
+                                       case 'reset' :
+                                               $value = trim($parts[2]);
+                                               $fieldCode = sprintf(
+                                                       '<input type="reset" name="%s"%s value="%s"%s />',
+                                                       $confData['fieldname'],
+                                                       $elementIdAttribute,
+                                                       t3lib_div::deHSCentities(htmlspecialchars($value)),
+                                                       $addParams
+                                               );
+                                       break;
+                                       case 'label' :
+                                               $fieldCode = nl2br(htmlspecialchars(trim($parts[2])));
+                                       break;
+                                       default :
+                                               $confData['type'] = 'comment';
+                                               $fieldCode = trim($parts[2]) . '&nbsp;';
+                                       break;
+                               }
+                               if ($fieldCode) {
+
+                                               // Checking for special evaluation modes:
+                                       if (t3lib_div::inList('textarea,input,password', $confData['type']) && strlen(trim($parts[3]))) {
+                                               $modeParameters = t3lib_div::trimExplode(':', $parts[3]);
+                                       } else {
+                                               $modeParameters = array();
+                                       }
+
+                                       // Adding evaluation based on settings:
+                                       switch ((string) $modeParameters[0]) {
+                                               case 'EREG' :
+                                                       $fieldlist[] = '_EREG';
+                                                       $fieldlist[] = $modeParameters[1];
+                                                       $fieldlist[] = $modeParameters[2];
+                                                       $fieldlist[] = $confData['fieldname'];
+                                                       $fieldlist[] = $confData['label'];
+                                                       $confData['required'] = 1; // Setting this so "required" layout is used.
+                                               break;
+                                               case 'EMAIL' :
+                                                       $fieldlist[] = '_EMAIL';
+                                                       $fieldlist[] = $confData['fieldname'];
+                                                       $fieldlist[] = $confData['label'];
+                                                       $confData['required'] = 1; // Setting this so "required" layout is used.
+                                               break;
+                                               default :
+                                                       if ($confData['required']) {
+                                                               $fieldlist[] = $confData['fieldname'];
+                                                               $fieldlist[] = $confData['label'];
+                                                       }
+                                               break;
+                                       }
+
+                                               // Field:
+                                       $fieldLabel = $confData['label'];
+                                       if ($conf['accessibility'] && trim($fieldLabel) && !preg_match('/^(label|hidden|comment)$/', $confData['type'])) {
+                                               $fieldLabel = '<label for="' . $prefix . $fName . '">' . $fieldLabel . '</label>';
+                                       }
+
+                                               // Getting template code:
+                                       $fieldCode = $this->cObj->stdWrap($fieldCode, $conf['fieldWrap.']);
+                                       $labelCode = $this->cObj->stdWrap($fieldLabel, $conf['labelWrap.']);
+                                       $commentCode = $this->cObj->stdWrap($confData['label'], $conf['commentWrap.']); // RTF
+                                       $result = $conf['layout'];
+                                       if ($conf['REQ'] && $confData['required']) {
+                                               if (is_array($conf['REQ.']['fieldWrap.']))
+                                                       $fieldCode = $this->cObj->stdWrap($fieldCode, $conf['REQ.']['fieldWrap.']);
+                                               if (is_array($conf['REQ.']['labelWrap.']))
+                                                       $labelCode = $this->cObj->stdWrap($fieldLabel, $conf['REQ.']['labelWrap.']);
+                                               if ($conf['REQ.']['layout']) {
+                                                       $result = $conf['REQ.']['layout'];
+                                               }
+                                       }
+                                       if ($confData['type'] == 'comment' && $conf['COMMENT.']['layout']) {
+                                               $result = $conf['COMMENT.']['layout'];
+                                       }
+                                       if ($confData['type'] == 'check' && $conf['CHECK.']['layout']) {
+                                               $result = $conf['CHECK.']['layout'];
+                                       }
+                                       if ($confData['type'] == 'radio' && $conf['RADIO.']['layout']) {
+                                               $result = $conf['RADIO.']['layout'];
+                                       }
+                                       if ($confData['type'] == 'label' && $conf['LABEL.']['layout']) {
+                                               $result = $conf['LABEL.']['layout'];
+                                       }
+                                       $result = str_replace('###FIELD###', $fieldCode, $result);
+                                       $result = str_replace('###LABEL###', $labelCode, $result);
+                                       $result = str_replace('###COMMENT###', $commentCode, $result); //RTF
+                                       $content .= $result;
+                               }
+                       }
+               }
+               if ($conf['stdWrap.']) {
+                       $content = $this->cObj->stdWrap($content, $conf['stdWrap.']);
+               }
+
+
+                       // redirect (external: where to go afterwards. internal: where to submit to)
+               $theRedirect = $this->cObj->stdWrap($conf['redirect'], $conf['redirect.']); // redirect should be set to the page to redirect to after an external script has been used. If internal scripts is used, and if no 'type' is set that dictates otherwise, redirect is used as the url to jump to as long as it's an integer (page)
+               $page = $GLOBALS['TSFE']->page;
+               if (!$theRedirect) { // Internal: Just submit to current page
+                       $LD = $GLOBALS['TSFE']->tmpl->linkData(
+                               $page,
+                               $conf['target'],
+                               $conf['no_cache'],
+                               'index.php',
+                               '',
+                               $this->cObj->getClosestMPvalueForPage($page['uid'])
+                       );
+               } elseif (t3lib_div::testInt($theRedirect)) { // Internal: Submit to page with ID $theRedirect
+                       $page = $GLOBALS['TSFE']->sys_page->getPage_noCheck($theRedirect);
+                       $LD = $GLOBALS['TSFE']->tmpl->linkData(
+                               $page,
+                               $conf['target'],
+                               $conf['no_cache'],
+                               'index.php',
+                               '',
+                               $this->cObj->getClosestMPvalueForPage($page['uid'])
+                       );
+               } else { // External URL, redirect-hidden field is rendered!
+                       $LD = $GLOBALS['TSFE']->tmpl->linkData(
+                               $page,
+                               $conf['target'],
+                               $conf['no_cache'],
+                               '',
+                               '',
+                               $this->cObj->getClosestMPvalueForPage($page['uid'])
+                       );
+                       $LD['totalURL'] = $theRedirect;
+                       $hiddenfields .= '<input type="hidden" name="redirect" value="' . htmlspecialchars($LD['totalURL']) . '" />'; // 18-09-00 added
+               }
+
+                       // Formtype (where to submit to!):
+               $formtype = $propertyOverride['type'] ? $propertyOverride['type'] : $this->cObj->stdWrap($conf['type'], $conf['type.']);
+               if (t3lib_div::testInt($formtype)) { // Submit to a specific page
+                       $page = $GLOBALS['TSFE']->sys_page->getPage_noCheck($formtype);
+                       $LD_A = $GLOBALS['TSFE']->tmpl->linkData(
+                               $page,
+                               $conf['target'],
+                               $conf['no_cache'],
+                               '',
+                               '',
+                               $this->cObj->getClosestMPvalueForPage($page['uid'])
+                       );
+                       $action = $LD_A['totalURL'];
+               } elseif ($formtype) { // Submit to external script
+                       $LD_A = $LD;
+                       $action = $formtype;
+               } elseif (t3lib_div::testInt($theRedirect)) {
+                       $LD_A = $LD;
+                       $action = $LD_A['totalURL'];
+               } else { // Submit to "nothing" - which is current page
+                       $LD_A = $GLOBALS['TSFE']->tmpl->linkData(
+                               $GLOBALS['TSFE']->page,
+                               $conf['target'],
+                               $conf['no_cache'],
+                               '',
+                               '',
+                               $this->cObj->getClosestMPvalueForPage($page['uid'])
+                       );
+                       $action = $LD_A['totalURL'];
+               }
+
+                       // Recipient:
+               $theEmail = $this->cObj->stdWrap($conf['recipient'], $conf['recipient.']);
+               if ($theEmail && !$GLOBALS['TYPO3_CONF_VARS']['FE']['secureFormmail']) {
+                       $theEmail = $GLOBALS['TSFE']->codeString($theEmail);
+                       $hiddenfields .= '<input type="hidden" name="recipient" value="' . htmlspecialchars($theEmail) . '" />';
+               }
+
+                       // location data:
+               if ($conf['locationData']) {
+                       if ($conf['locationData'] == 'HTTP_POST_VARS' && isset($_POST['locationData'])) {
+                               $locationData = t3lib_div::_POST('locationData');
+                       } else {
+                                       // locationData is [hte page id]:[tablename]:[uid of record]. Indicates on which page the record (from tablename with uid) is shown. Used to check access.
+                               $locationData = $GLOBALS['TSFE']->id . ':' . $this->cObj->currentRecord;
+                       }
+                       $hiddenfields .= '<input type="hidden" name="locationData" value="' . htmlspecialchars($locationData) . '" />';
+               }
+
+                       // hidden fields:
+               if (is_array($conf['hiddenFields.'])) {
+                       foreach ($conf['hiddenFields.'] as $hF_key => $hF_conf) {
+                               if (substr($hF_key, -1) != '.') {
+                                       $hF_value = $this->cObj->cObjGetSingle($hF_conf, $conf['hiddenFields.'][$hF_key . '.'], 'hiddenfields');
+                                       if (strlen($hF_value) && t3lib_div::inList('recipient_copy,recipient', $hF_key)) {
+                                               if ($GLOBALS['TYPO3_CONF_VARS']['FE']['secureFormmail']) {
+                                                       continue;
+                                               }
+                                               $hF_value = $GLOBALS['TSFE']->codeString($hF_value);
+                                       }
+                                       $hiddenfields .= '<input type="hidden" name="' . $hF_key . '" value="' . htmlspecialchars($hF_value) . '" />';
+                               }
+                       }
+               }
+
+                       // Wrap all hidden fields in a div tag (see http://bugs.typo3.org/view.php?id=678)
+               $hiddenfields = '<div style="display:none;">' . $hiddenfields . '</div>';
+
+               if ($conf['REQ']) {
+                       $validateForm = ' onsubmit="return validateForm(\'' . $formname . '\',\'' . implode(',', $fieldlist)
+                               . '\',' . t3lib_div::quoteJSvalue($conf['goodMess']) . ',' .
+                               t3lib_div::quoteJSvalue($conf['badMess']) . ',' .
+                               t3lib_div::quoteJSvalue($conf['emailMess']) . ')"';
+                       $GLOBALS['TSFE']->additionalHeaderData['JSFormValidate'] = '<script type="text/javascript" src="' .
+                               t3lib_div::createVersionNumberedFilename($GLOBALS['TSFE']->absRefPrefix .
+                               't3lib/jsfunc.validateform.js') . '"></script>';
+               } else {
+                       $validateForm = '';
+               }
+
+                       // Create form tag:
+               $theTarget = ($theRedirect ? $LD['target'] : $LD_A['target']);
+               $content = array(
+                       '<form' . ' action="' . htmlspecialchars($action) . '"' . ' id="' .
+                       $formname . '"' . ($xhtmlStrict ? '' : ' name="' . $formname . '"') .
+                       ' enctype="' . $GLOBALS['TYPO3_CONF_VARS']['SYS']['form_enctype'] . '"' .
+                       ' method="' . ($conf['method'] ? $conf['method'] : 'post') . '"' .
+                       ($theTarget ? ' target="' . $theTarget . '"' : '') .
+                       $validateForm . '>', $hiddenfields . $content,
+                       '</form>'
+               );
+
+               if ($conf['arrayReturnMode']) {
+                       $content['validateForm'] = $validateForm;
+                       $content['formname'] = $formname;
+                       return $content;
+               } else {
+                       return implode('', $content);
+               }
+       }
+
+}
+
+
+if (defined('TYPO3_MODE') && $TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['tslib/content/class.tslib_content_form.php']) {
+       include_once ($TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['tslib/content/class.tslib_content_form.php']);
+}
+
+?>
index 366bb15..15fac35 100644 (file)
@@ -1,78 +1,78 @@
-<?php\r
-/***************************************************************\r
- *  Copyright notice\r
- *\r
- *  (c) 2010 Xavier Perseguers <typo3@perseguers.ch>\r
- *  (c) 2010 Steffen Kamper <steffen@typo3.org>\r
- *  All rights reserved\r
- *\r
- *  This script is part of the TYPO3 project. The TYPO3 project is\r
- *  free software; you can redistribute it and/or modify\r
- *  it under the terms of the GNU General Public License as published by\r
- *  the Free Software Foundation; either version 2 of the License, or\r
- *  (at your option) any later version.\r
- *\r
- *  The GNU General Public License can be found at\r
- *  http://www.gnu.org/copyleft/gpl.html.\r
- *  A copy is found in the textfile GPL.txt and important notices to the license\r
- *  from the author is found in LICENSE.txt distributed with these scripts.\r
- *\r
- *\r
- *  This script is distributed in the hope that it will be useful,\r
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of\r
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\r
- *  GNU General Public License for more details.\r
- *\r
- *  This copyright notice MUST APPEAR in all copies of the script!\r
- ***************************************************************/\r
-\r
-/**\r
- * Contains HMENU class object.\r
- *\r
- * $Id: class.tslib_content.php 7905 2010-06-13 14:42:33Z ohader $\r
- * @author Xavier Perseguers <typo3@perseguers.ch>\r
- * @author Steffen Kamper <steffen@typo3.org>\r
- */\r
-class tslib_content_HierarchicalMenu extends tslib_content_Abstract {\r
-\r
-       /**\r
-        * Rendering the cObject, HMENU\r
-        *\r
-        * @param       array           Array of TypoScript properties\r
-        * @return      string          Output\r
-        */\r
-       public function render($conf = array()) {\r
-               $content = '';\r
-               if ($this->cObj->checkIf($conf['if.'])) {\r
-                       $cls = strtolower($conf[1]);\r
-                       if (t3lib_div::inList($GLOBALS['TSFE']->tmpl->menuclasses, $cls)) {\r
-                               if ($conf['special.']['value.']) {\r
-                                       $conf['special.']['value'] = $this->cObj->stdWrap($conf['special.']['value'], $conf['special.']['value.']);\r
-                               }\r
-                               $GLOBALS['TSFE']->register['count_HMENU']++;\r
-                               $GLOBALS['TSFE']->register['count_HMENU_MENUOBJ'] = 0;\r
-                               $GLOBALS['TSFE']->applicationData['GMENU_LAYERS']['WMid'] = array();\r
-                               $GLOBALS['TSFE']->applicationData['GMENU_LAYERS']['WMparentId'] = array();\r
-\r
-                               $menu = t3lib_div::makeInstance('tslib_' . $cls);\r
-                               $menu->parent_cObj = $this->cObj;\r
-                               $menu->start($GLOBALS['TSFE']->tmpl, $GLOBALS['TSFE']->sys_page, '', $conf, 1);\r
-                               $menu->makeMenu();\r
-                               $content .= $menu->writeMenu();\r
-                       }\r
-                       if ($conf['wrap'])\r
-                               $content = $this->cObj->wrap($content, $conf['wrap']);\r
-                       if ($conf['stdWrap.'])\r
-                               $content = $this->cObj->stdWrap($content, $conf['stdWrap.']);\r
-               }\r
-               return $content;\r
-       }\r
-\r
-}\r
-\r
-\r
-if (defined('TYPO3_MODE') && $TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['tslib/content/class.tslib_content_hierarchicalmenu.php']) {\r
-       include_once ($TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['tslib/content/class.tslib_content_hierarchicalmenu.php']);\r
-}\r
-\r
-?>\r
+<?php
+/***************************************************************
+ *  Copyright notice
+ *
+ *  (c) 2010 Xavier Perseguers <typo3@perseguers.ch>
+ *  (c) 2010 Steffen Kamper <steffen@typo3.org>
+ *  All rights reserved
+ *
+ *  This script is part of the TYPO3 project. The TYPO3 project is
+ *  free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.
+ *
+ *  The GNU General Public License can be found at
+ *  http://www.gnu.org/copyleft/gpl.html.
+ *  A copy is found in the textfile GPL.txt and important notices to the license
+ *  from the author is found in LICENSE.txt distributed with these scripts.
+ *
+ *
+ *  This script is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  This copyright notice MUST APPEAR in all copies of the script!
+ ***************************************************************/
+
+/**
+ * Contains HMENU class object.
+ *
+ * $Id: class.tslib_content.php 7905 2010-06-13 14:42:33Z ohader $
+ * @author Xavier Perseguers <typo3@perseguers.ch>
+ * @author Steffen Kamper <steffen@typo3.org>
+ */
+class tslib_content_HierarchicalMenu extends tslib_content_Abstract {
+
+       /**
+        * Rendering the cObject, HMENU
+        *
+        * @param       array           Array of TypoScript properties
+        * @return      string          Output
+        */
+       public function render($conf = array()) {
+               $content = '';
+               if ($this->cObj->checkIf($conf['if.'])) {
+                       $cls = strtolower($conf[1]);
+                       if (t3lib_div::inList($GLOBALS['TSFE']->tmpl->menuclasses, $cls)) {
+                               if ($conf['special.']['value.']) {
+                                       $conf['special.']['value'] = $this->cObj->stdWrap($conf['special.']['value'], $conf['special.']['value.']);
+                               }
+                               $GLOBALS['TSFE']->register['count_HMENU']++;
+                               $GLOBALS['TSFE']->register['count_HMENU_MENUOBJ'] = 0;
+                               $GLOBALS['TSFE']->applicationData['GMENU_LAYERS']['WMid'] = array();
+                               $GLOBALS['TSFE']->applicationData['GMENU_LAYERS']['WMparentId'] = array();
+
+                               $menu = t3lib_div::makeInstance('tslib_' . $cls);
+                               $menu->parent_cObj = $this->cObj;
+                               $menu->start($GLOBALS['TSFE']->tmpl, $GLOBALS['TSFE']->sys_page, '', $conf, 1);
+                               $menu->makeMenu();
+                               $content .= $menu->writeMenu();
+                       }
+                       if ($conf['wrap'])
+                               $content = $this->cObj->wrap($content, $conf['wrap']);
+                       if ($conf['stdWrap.'])
+                               $content = $this->cObj->stdWrap($content, $conf['stdWrap.']);
+               }
+               return $content;
+       }
+
+}
+
+
+if (defined('TYPO3_MODE') && $TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['tslib/content/class.tslib_content_hierarchicalmenu.php']) {
+       include_once ($TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['tslib/content/class.tslib_content_hierarchicalmenu.php']);
+}
+
+?>
index 8db8dfc..7c2622e 100644 (file)
@@ -1,76 +1,76 @@
-<?php\r
-/***************************************************************\r
- *  Copyright notice\r
- *\r
- *  (c) 2010 Xavier Perseguers <typo3@perseguers.ch>\r
- *  (c) 2010 Steffen Kamper <steffen@typo3.org>\r
- *  All rights reserved\r
- *\r
- *  This script is part of the TYPO3 project. The TYPO3 project is\r
- *  free software; you can redistribute it and/or modify\r
- *  it under the terms of the GNU General Public License as published by\r
- *  the Free Software Foundation; either version 2 of the License, or\r
- *  (at your option) any later version.\r
- *\r
- *  The GNU General Public License can be found at\r
- *  http://www.gnu.org/copyleft/gpl.html.\r
- *  A copy is found in the textfile GPL.txt and important notices to the license\r
- *  from the author is found in LICENSE.txt distributed with these scripts.\r
- *\r
- *\r
- *  This script is distributed in the hope that it will be useful,\r
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of\r
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\r
- *  GNU General Public License for more details.\r
- *\r
- *  This copyright notice MUST APPEAR in all copies of the script!\r
- ***************************************************************/\r
-\r
-/**\r
- * Contains TEXT class object.\r
- *\r
- * $Id: class.tslib_content.php 7905 2010-06-13 14:42:33Z ohader $\r
- * @author Xavier Perseguers <typo3@perseguers.ch>\r
- * @author Steffen Kamper <steffen@typo3.org>\r
- */\r
-class tslib_content_HorizontalRuler extends tslib_content_Abstract {\r
-\r
-       /**\r
-        * Rendering the cObject, HRULER\r
-        *\r
-        * @param       array           Array of TypoScript properties\r
-        * @return      string          Output\r
-        */\r
-       public function render($conf = array()) {\r
-               $lineThickness = t3lib_div::intInRange($this->cObj->stdWrap($conf['lineThickness'], $conf['lineThickness.']), 1, 50);\r
-               $lineColor = $conf['lineColor'] ? $conf['lineColor'] : 'black';\r
-               $spaceBefore = intval($conf['spaceLeft']);\r
-               $spaceAfter = intval($conf['spaceRight']);\r
-               $tableWidth = $conf['tableWidth'] ? $conf['tableWidth'] : '99%';\r
-               $content = '';\r
-\r
-               $content .= '<table border="0" cellspacing="0" cellpadding="0" width="' . htmlspecialchars($tableWidth) . '" summary=""><tr>';\r
-               if ($spaceBefore) {\r
-                       $content .= '<td width="1"><img src="' . $GLOBALS['TSFE']->absRefPrefix . 'clear.gif" width="' .\r
-                               $spaceBefore . '" height="1" alt="" title="" /></td>';\r
-               }\r
-               $content .= '<td bgcolor="' . $lineColor . '"><img src="' . $GLOBALS['TSFE']->absRefPrefix . 'clear.gif" width="1" height="' .\r
-                       $lineThickness . '" alt="" title="" /></td>';\r
-               if ($spaceAfter) {\r
-                       $content .= '<td width="1"><img src="' . $GLOBALS['TSFE']->absRefPrefix . 'clear.gif" width="' .\r
-                               $spaceAfter . '" height="1" alt="" title="" /></td>';\r
-               }\r
-               $content .= '</tr></table>';\r
-\r
-               $content = $this->cObj->stdWrap($content, $conf['stdWrap.']);\r
-               return $content;\r
-       }\r
-\r
-}\r
-\r
-\r
-if (defined('TYPO3_MODE') && $TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['tslib/content/class.tslib_content_horizontalruler.php']) {\r
-       include_once ($TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['tslib/content/class.tslib_content_horizontalruler.php']);\r
-}\r
-\r
-?>\r
+<?php
+/***************************************************************
+ *  Copyright notice
+ *
+ *  (c) 2010 Xavier Perseguers <typo3@perseguers.ch>
+ *  (c) 2010 Steffen Kamper <steffen@typo3.org>
+ *  All rights reserved
+ *
+ *  This script is part of the TYPO3 project. The TYPO3 project is
+ *  free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.
+ *
+ *  The GNU General Public License can be found at
+ *  http://www.gnu.org/copyleft/gpl.html.
+ *  A copy is found in the textfile GPL.txt and important notices to the license
+ *  from the author is found in LICENSE.txt distributed with these scripts.
+ *
+ *
+ *  This script is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  This copyright notice MUST APPEAR in all copies of the script!
+ ***************************************************************/
+
+/**
+ * Contains TEXT class object.
+ *
+ * $Id: class.tslib_content.php 7905 2010-06-13 14:42:33Z ohader $
+ * @author Xavier Perseguers <typo3@perseguers.ch>
+ * @author Steffen Kamper <steffen@typo3.org>
+ */
+class tslib_content_HorizontalRuler extends tslib_content_Abstract {
+
+       /**
+        * Rendering the cObject, HRULER
+        *
+        * @param       array           Array of TypoScript properties
+        * @return      string          Output
+        */
+       public function render($conf = array()) {
+               $lineThickness = t3lib_div::intInRange($this->cObj->stdWrap($conf['lineThickness'], $conf['lineThickness.']), 1, 50);
+               $lineColor = $conf['lineColor'] ? $conf['lineColor'] : 'black';
+               $spaceBefore = intval($conf['spaceLeft']);
+               $spaceAfter = intval($conf['spaceRight']);
+               $tableWidth = $conf['tableWidth'] ? $conf['tableWidth'] : '99%';
+               $content = '';
+
+               $content .= '<table border="0" cellspacing="0" cellpadding="0" width="' . htmlspecialchars($tableWidth) . '" summary=""><tr>';
+               if ($spaceBefore) {
+                       $content .= '<td width="1"><img src="' . $GLOBALS['TSFE']->absRefPrefix . 'clear.gif" width="' .
+                               $spaceBefore . '" height="1" alt="" title="" /></td>';
+               }
+               $content .= '<td bgcolor="' . $lineColor . '"><img src="' . $GLOBALS['TSFE']->absRefPrefix . 'clear.gif" width="1" height="' .
+                       $lineThickness . '" alt="" title="" /></td>';
+               if ($spaceAfter) {
+                       $content .= '<td width="1"><img src="' . $GLOBALS['TSFE']->absRefPrefix . 'clear.gif" width="' .
+                               $spaceAfter . '" height="1" alt="" title="" /></td>';
+               }
+               $content .= '</tr></table>';
+
+               $content = $this->cObj->stdWrap($content, $conf['stdWrap.']);
+               return $content;
+       }
+
+}
+
+
+if (defined('TYPO3_MODE') && $TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['tslib/content/class.tslib_content_horizontalruler.php']) {
+       include_once ($TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['tslib/content/class.tslib_content_horizontalruler.php']);
+}
+
+?>
index 2dad329..d739078 100644 (file)
@@ -1,55 +1,55 @@
-<?php\r
-/***************************************************************\r
- *  Copyright notice\r
- *\r
- *  (c) 2010 Xavier Perseguers <typo3@perseguers.ch>\r
- *  (c) 2010 Steffen Kamper <steffen@typo3.org>\r
- *  All rights reserved\r
- *\r
- *  This script is part of the TYPO3 project. The TYPO3 project is\r
- *  free software; you can redistribute it and/or modify\r
- *  it under the terms of the GNU General Public License as published by\r
- *  the Free Software Foundation; either version 2 of the License, or\r
- *  (at your option) any later version.\r
- *\r
- *  The GNU General Public License can be found at\r
- *  http://www.gnu.org/copyleft/gpl.html.\r
- *  A copy is found in the textfile GPL.txt and important notices to the license\r
- *  from the author is found in LICENSE.txt distributed with these scripts.\r
- *\r
- *\r
- *  This script is distributed in the hope that it will be useful,\r
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of\r
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\r
- *  GNU General Public License for more details.\r
- *\r
- *  This copyright notice MUST APPEAR in all copies of the script!\r
- ***************************************************************/\r
-\r
-/**\r
- * Contains HTML class object.\r
- *\r
- * $Id: class.tslib_content.php 7905 2010-06-13 14:42:33Z ohader $\r
- * @author Xavier Perseguers <typo3@perseguers.ch>\r
- * @author Steffen Kamper <steffen@typo3.org>\r
- */\r
-class tslib_content_Html extends tslib_content_Abstract {\r
-\r
-       /**\r
-        * Rendering the cObject, HTML\r
-        *\r
-        * @param       array           Array of TypoScript properties\r
-        * @return      string          Output\r
-        */\r
-       public function render($conf = array()) {\r
-               return $this->cObj->stdWrap($conf['value'], $conf['value.']);\r
-       }\r
-\r
-}\r
-\r
-\r
-if (defined('TYPO3_MODE') && $TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['tslib/content/class.tslib_content_html.php']) {\r
-       include_once ($TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['tslib/content/class.tslib_content_html.php']);\r
-}\r
-\r
-?>\r
+<?php
+/***************************************************************
+ *  Copyright notice
+ *
+ *  (c) 2010 Xavier Perseguers <typo3@perseguers.ch>
+ *  (c) 2010 Steffen Kamper <steffen@typo3.org>
+ *  All rights reserved
+ *
+ *  This script is part of the TYPO3 project. The TYPO3 project is
+ *  free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.
+ *
+ *  The GNU General Public License can be found at
+ *  http://www.gnu.org/copyleft/gpl.html.
+ *  A copy is found in the textfile GPL.txt and important notices to the license
+ *  from the author is found in LICENSE.txt distributed with these scripts.
+ *
+ *
+ *  This script is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  This copyright notice MUST APPEAR in all copies of the script!
+ ***************************************************************/
+
+/**
+ * Contains HTML class object.
+ *
+ * $Id: class.tslib_content.php 7905 2010-06-13 14:42:33Z ohader $
+ * @author Xavier Perseguers <typo3@perseguers.ch>
+ * @author Steffen Kamper <steffen@typo3.org>
+ */
+class tslib_content_Html extends tslib_content_Abstract {
+
+       /**
+        * Rendering the cObject, HTML
+        *
+        * @param       array           Array of TypoScript properties
+        * @return      string          Output
+        */
+       public function render($conf = array()) {
+               return $this->cObj->stdWrap($conf['value'], $conf['value.']);
+       }
+
+}
+
+
+if (defined('TYPO3_MODE') && $TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['tslib/content/class.tslib_content_html.php']) {
+       include_once ($TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['tslib/content/class.tslib_content_html.php']);
+}
+
+?>
index b293495..1efe538 100644 (file)
@@ -1,61 +1,61 @@
-<?php\r
-/***************************************************************\r
- *  Copyright notice\r
- *\r
- *  (c) 2010 Xavier Perseguers <typo3@perseguers.ch>\r
- *  (c) 2010 Steffen Kamper <steffen@typo3.org>\r
- *  All rights reserved\r
- *\r
- *  This script is part of the TYPO3 project. The TYPO3 project is\r
- *  free software; you can redistribute it and/or modify\r
- *  it under the terms of the GNU General Public License as published by\r
- *  the Free Software Foundation; either version 2 of the License, or\r
- *  (at your option) any later version.\r
- *\r
- *  The GNU General Public License can be found at\r
- *  http://www.gnu.org/copyleft/gpl.html.\r
- *  A copy is found in the textfile GPL.txt and important notices to the license\r
- *  from the author is found in LICENSE.txt distributed with these scripts.\r
- *\r
- *\r
- *  This script is distributed in the hope that it will be useful,\r
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of\r
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\r
- *  GNU General Public License for more details.\r
- *\r
- *  This copyright notice MUST APPEAR in all copies of the script!\r
- ***************************************************************/\r
-\r
-/**\r
- * Contains IMAGE class object.\r
- *\r
- * $Id: class.tslib_content.php 7905 2010-06-13 14:42:33Z ohader $\r
- * @author Xavier Perseguers <typo3@perseguers.ch>\r
- * @author Steffen Kamper <steffen@typo3.org>\r
- */\r
-class tslib_content_Image extends tslib_content_Abstract {\r
-\r
-       /**\r
-        * Rendering the cObject, IMAGE\r
-        *\r
-        * @param       array           Array of TypoScript properties\r
-        * @return      string          Output\r
-        */\r
-       public function render($conf = array()) {\r
-               if ($this->cObj->checkIf($conf['if.'])) {\r
-                       $theValue = $this->cObj->cImage($conf['file'], $conf);\r
-                       if ($conf['stdWrap.']) {\r
-                               $theValue = $this->cObj->stdWrap($theValue, $conf['stdWrap.']);\r
-                       }\r
-                       return $theValue;\r
-               }\r
-       }\r
-\r
-}\r
-\r
-\r
-if (defined('TYPO3_MODE') && $TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['tslib/content/class.tslib_content_image.php']) {\r
-       include_once ($TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['tslib/content/class.tslib_content_image.php']);\r
-}\r
-\r
-?>\r
+<?php
+/***************************************************************
+ *  Copyright notice
+ *
+ *  (c) 2010 Xavier Perseguers <typo3@perseguers.ch>
+ *  (c) 2010 Steffen Kamper <steffen@typo3.org>
+ *  All rights reserved
+ *
+ *  This script is part of the TYPO3 project. The TYPO3 project is
+ *  free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.
+ *
+ *  The GNU General Public License can be found at
+ *  http://www.gnu.org/copyleft/gpl.html.
+ *  A copy is found in the textfile GPL.txt and important notices to the license
+ *  from the author is found in LICENSE.txt distributed with these scripts.
+ *
+ *
+ *  This script is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  This copyright notice MUST APPEAR in all copies of the script!
+ ***************************************************************/
+
+/**
+ * Contains IMAGE class object.
+ *
+ * $Id: class.tslib_content.php 7905 2010-06-13 14:42:33Z ohader $
+ * @author Xavier Perseguers <typo3@perseguers.ch>
+ * @author Steffen Kamper <steffen@typo3.org>
+ */
+class tslib_content_Image extends tslib_content_Abstract {
+
+       /**
+        * Rendering the cObject, IMAGE
+        *
+        * @param       array           Array of TypoScript properties
+        * @return      string          Output
+        */
+       public function render($conf = array()) {
+               if ($this->cObj->checkIf($conf['if.'])) {
+                       $theValue = $this->cObj->cImage($conf['file'], $conf);
+                       if ($conf['stdWrap.']) {
+                               $theValue = $this->cObj->stdWrap($theValue, $conf['stdWrap.']);
+                       }
+                       return $theValue;
+               }
+       }
+
+}
+
+
+if (defined('TYPO3_MODE') && $TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['tslib/content/class.tslib_content_image.php']) {
+       include_once ($TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['tslib/content/class.tslib_content_image.php']);
+}
+
+?>
index 7223c16..d4bb5da 100644 (file)
@@ -1,56 +1,56 @@
-<?php\r
-/***************************************************************\r
- *  Copyright notice\r
- *\r
- *  (c) 2010 Xavier Perseguers <typo3@perseguers.ch>\r
- *  (c) 2010 Steffen Kamper <steffen@typo3.org>\r
- *  All rights reserved\r
- *\r
- *  This script is part of the TYPO3 project. The TYPO3 project is\r
- *  free software; you can redistribute it and/or modify\r
- *  it under the terms of the GNU General Public License as published by\r
- *  the Free Software Foundation; either version 2 of the License, or\r
- *  (at your option) any later version.\r
- *\r
- *  The GNU General Public License can be found at\r
- *  http://www.gnu.org/copyleft/gpl.html.\r
- *  A copy is found in the textfile GPL.txt and important notices to the license\r
- *  from the author is found in LICENSE.txt distributed with these scripts.\r
- *\r
- *\r
- *  This script is distributed in the hope that it will be useful,\r
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of\r
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\r
- *  GNU General Public License for more details.\r
- *\r
- *  This copyright notice MUST APPEAR in all copies of the script!\r
- ***************************************************************/\r
-\r
-/**\r
- * Contains IMG_RESOURCE class object.\r
- *\r
- * $Id: class.tslib_content.php 7905 2010-06-13 14:42:33Z ohader $\r
- * @author Xavier Perseguers <typo3@perseguers.ch>\r
- * @author Steffen Kamper <steffen@typo3.org>\r
- */\r
-class tslib_content_ImageResource extends tslib_content_Abstract {\r
-\r
-       /**\r
-        * Rendering the cObject, IMG_RESOURCE\r
-        *\r
-        * @param       array           Array of TypoScript properties\r
-        * @return      string          Output\r
-        */\r
-       public function render($conf = array()) {\r
-               $GLOBALS['TSFE']->lastImgResourceInfo = $this->cObj->getImgResource($conf['file'], $conf['file.']);\r
-               return $this->cObj->stdWrap($GLOBALS['TSFE']->lastImgResourceInfo[3], $conf['stdWrap.']);\r
-       }\r
-\r
-}\r
-\r
-\r
-if (defined('TYPO3_MODE') && $TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['tslib/content/class.tslib_content_imageresource.php']) {\r
-       include_once ($TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['tslib/content/class.tslib_content_imageresource.php']);\r
-}\r
-\r
+<?php
+/***************************************************************
+ *  Copyright notice
+ *
+ *  (c) 2010 Xavier Perseguers <typo3@perseguers.ch>
+ *  (c) 2010 Steffen Kamper <steffen@typo3.org>
+ *  All rights reserved
+ *
+ *  This script is part of the TYPO3 project. The TYPO3 project is
+ *  free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.
+ *
+ *  The GNU General Public License can be found at
+ *  http://www.gnu.org/copyleft/gpl.html.
+ *  A copy is found in the textfile GPL.txt and important notices to the license
+ *  from the author is found in LICENSE.txt distributed with these scripts.
+ *
+ *
+ *  This script is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  This copyright notice MUST APPEAR in all copies of the script!
+ ***************************************************************/
+
+/**
+ * Contains IMG_RESOURCE class object.
+ *
+ * $Id: class.tslib_content.php 7905 2010-06-13 14:42:33Z ohader $
+ * @author Xavier Perseguers <typo3@perseguers.ch>
+ * @author Steffen Kamper <steffen@typo3.org>
+ */
+class tslib_content_ImageResource extends tslib_content_Abstract {
+
+       /**
+        * Rendering the cObject, IMG_RESOURCE
+        *
+        * @param       array           Array of TypoScript properties
+        * @return      string          Output
+        */
+       public function render($conf = array()) {
+               $GLOBALS['TSFE']->lastImgResourceInfo = $this->cObj->getImgResource($conf['file'], $conf['file.']);
+               return $this->cObj->stdWrap($GLOBALS['TSFE']->lastImgResourceInfo[3], $conf['stdWrap.']);
+       }
+
+}
+
+
+if (defined('TYPO3_MODE') && $TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['tslib/content/class.tslib_content_imageresource.php']) {
+       include_once ($TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['tslib/content/class.tslib_content_imageresource.php']);
+}
+
 ?>
\ No newline at end of file
index 8325602..b40ceed 100644 (file)
-<?php\r
-/***************************************************************\r
- *  Copyright notice\r
- *\r
- *  (c) 2010 Xavier Perseguers <typo3@perseguers.ch>\r
- *  (c) 2010 Steffen Kamper <steffen@typo3.org>\r
- *  All rights reserved\r
- *\r
- *  This script is part of the TYPO3 project. The TYPO3 project is\r
- *  free software; you can redistribute it and/or modify\r
- *  it under the terms of the GNU General Public License as published by\r
- *  the Free Software Foundation; either version 2 of the License, or\r
- *  (at your option) any later version.\r
- *\r
- *  The GNU General Public License can be found at\r
- *  http://www.gnu.org/copyleft/gpl.html.\r
- *  A copy is found in the textfile GPL.txt and important notices to the license\r
- *  from the author is found in LICENSE.txt distributed with these scripts.\r
- *\r
- *\r
- *  This script is distributed in the hope that it will be useful,\r
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of\r
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\r
- *  GNU General Public License for more details.\r
- *\r
- *  This copyright notice MUST APPEAR in all copies of the script!\r
- ***************************************************************/\r
-\r
-/**\r
- * Contains IMAGE class object.\r
- *\r
- * $Id: class.tslib_content.php 7905 2010-06-13 14:42:33Z ohader $\r
- * @author Xavier Perseguers <typo3@perseguers.ch>\r
- * @author Steffen Kamper <steffen@typo3.org>\r
- */\r
-class tslib_content_ImageText extends tslib_content_Abstract {\r
-\r
-       /**\r
-        * Rendering the cObject, IMAGE\r
-        *\r
-        * @param       array           Array of TypoScript properties\r
-        * @return      string          Output\r
-        */\r
-       public function render($conf = array()) {\r
-               $content = '';\r
-               if (is_array($conf['text.'])) {\r
-                       $content .= $this->cObj->stdWrap($this->cObj->cObjGet($conf['text.'], 'text.'), $conf['text.']); // this gets the surrounding content\r
-               }\r
-               $imgList = trim($this->cObj->stdWrap($conf['imgList'], $conf['imgList.'])); // gets images\r
-               if ($imgList) {\r
-                       $imgs = t3lib_div::trimExplode(',', $imgList);\r
-                       $imgStart = intval($this->cObj->stdWrap($conf['imgStart'], $conf['imgStart.']));\r
-\r
-                       $imgCount = count($imgs) - $imgStart;\r
-\r
-                       $imgMax = intval($this->cObj->stdWrap($conf['imgMax'], $conf['imgMax.']));\r
-                       if ($imgMax) {\r
-                               $imgCount = t3lib_div::intInRange($imgCount, 0, $imgMax); // reduces the number of images.\r
-                       }\r
-\r
-                       $imgPath = $this->cObj->stdWrap($conf['imgPath'], $conf['imgPath.']);\r
-\r
-                               // initialisation\r
-                       $caption = '';\r
-                       $captionArray = array();\r
-                       if (!$conf['captionSplit'] && !$conf['imageTextSplit'] && is_array($conf['caption.'])) {\r
-                               $caption = $this->cObj->stdWrap($this->cObj->cObjGet($conf['caption.'], 'caption.'), $conf['caption.']); // global caption, no splitting\r
-                       }\r
-                       if ($conf['captionSplit'] && $conf['captionSplit.']['cObject']) {\r
-                               $legacyCaptionSplit = 1;\r
-                               $capSplit = $this->cObj->stdWrap($conf['captionSplit.']['token'], $conf['captionSplit.']['token.']);\r
-                               if (!$capSplit) {\r
-                                       $capSplit = LF;\r
-                               }\r
-                               $captionArray = explode($capSplit, $this->cObj->cObjGetSingle(\r
-                                       $conf['captionSplit.']['cObject'],\r
-                                               $conf['captionSplit.']['cObject.'],\r
-                                               'captionSplit.cObject')\r
-                                       );\r
-                               foreach ($captionArray as $ca_key => $ca_val) {\r
-                                       $captionArray[$ca_key] = $this->cObj->stdWrap(trim($captionArray[$ca_key]), $conf['captionSplit.']['stdWrap.']);\r
-                               }\r
-                       }\r
-\r
-                       $tablecode = '';\r
-                       $position = $this->cObj->stdWrap($conf['textPos'], $conf['textPos.']);\r
-\r
-                       $tmppos = $position & 7;\r
-                       $contentPosition = $position & 24;\r
-                       $align = $this->cObj->align[$tmppos];\r
-                       $cap = ($caption) ? 1 : 0;\r
-                       $txtMarg = intval($this->cObj->stdWrap($conf['textMargin'], $conf['textMargin.']));\r
-                       if (!$conf['textMargin_outOfText'] && $contentPosition < 16) {\r
-                               $txtMarg = 0;\r
-                       }\r
-\r
-                       $cols = intval($this->cObj->stdWrap($conf['cols'], $conf['cols.']));\r
-                       $rows = intval($this->cObj->stdWrap($conf['rows'], $conf['rows.']));\r
-                       $colspacing = intval($this->cObj->stdWrap($conf['colSpace'], $conf['colSpace.']));\r
-                       $rowspacing = intval($this->cObj->stdWrap($conf['rowSpace'], $conf['rowSpace.']));\r
-\r
-                       $border = intval($this->cObj->stdWrap($conf['border'], $conf['border.'])) ? 1 : 0;\r
-                       $borderColor = $this->cObj->stdWrap($conf['borderCol'], $conf['borderCol.']);\r
-                       $borderThickness = intval($this->cObj->stdWrap($conf['borderThick'], $conf['borderThick.']));\r
-\r
-                       $borderColor = $borderColor ? $borderColor : 'black';\r
-                       $borderThickness = $borderThickness ? $borderThickness : 1;\r
-\r
-                       $caption_align = $this->cObj->stdWrap($conf['captionAlign'], $conf['captionAlign.']);\r
-                       if (!$caption_align) {\r
-                               $caption_align = $align;\r
-                       }\r
-                               // generate cols\r
-                       $colCount = ($cols > 1) ? $cols : 1;\r
-                       if ($colCount > $imgCount) {\r
-                               $colCount = $imgCount;\r
-                       }\r
-                       $rowCount = ($colCount > 1) ? ceil($imgCount / $colCount) : $imgCount;\r
-                               // generate rows\r
-                       if ($rows > 1) {\r
-                               $rowCount = $rows;\r
-                               if ($rowCount > $imgCount) {\r
-                                       $rowCount = $imgCount;\r
-                               }\r
-                               $colCount = ($rowCount > 1) ? ceil($imgCount / $rowCount) : $imgCount;\r
-                       }\r
-\r
-                               // max Width\r
-                       $colRelations = trim($this->cObj->stdWrap($conf['colRelations'], $conf['colRelations.']));\r
-                       $maxW = intval($this->cObj->stdWrap($conf['maxW'], $conf['maxW.']));\r
-\r
-                       $maxWInText = intval($this->cObj->stdWrap($conf['maxWInText'], $conf['maxWInText.']));\r
-                       if (!$maxWInText) { // If maxWInText is not set, it's calculated to the 50 % of the max...\r
-                               $maxWInText = round($maxW / 2);\r
-                       }\r
-\r
-                       if ($maxWInText && $contentPosition >= 16) { // inText\r
-                               $maxW = $maxWInText;\r
-                       }\r
-\r
-                       if ($maxW && $colCount > 0) { // If there is a max width and if colCount is greater than  column\r
-                               $maxW = ceil(($maxW - $colspacing * ($colCount - 1) - $colCount * $border * $borderThickness * 2) / $colCount);\r
-                       }\r
-                               // create the relation between rows\r
-                       $colMaxW = array();\r
-                       if ($colRelations) {\r
-                               $rel_parts = explode(':', $colRelations);\r
-                               $rel_total = 0;\r
-                               for ($a = 0; $a < $colCount; $a++) {\r
-                                       $rel_parts[$a] = intval($rel_parts[$a]);\r
-                                       $rel_total += $rel_parts[$a];\r
-                               }\r
-                               if ($rel_total) {\r
-                                       for ($a = 0; $a < $colCount; $a++) {\r
-                                               $colMaxW[$a] = round(($maxW * $colCount) / $rel_total * $rel_parts[$a]);\r
-                                       }\r
-                                       if (min($colMaxW) <= 0 || max($rel_parts) / min($rel_parts) > 10) { // The difference in size between the largest and smalles must be within a factor of ten.\r
-                                               $colMaxW = array();\r
-                                       }\r
-                               }\r
-                       }\r
-                       $image_compression = intval($this->cObj->stdWrap($conf['image_compression'], $conf['image_compression.']));\r
-                       $image_effects = intval($this->cObj->stdWrap($conf['image_effects'], $conf['image_effects.']));\r
-                       $image_frames = intval($this->cObj->stdWrap($conf['image_frames.']['key'], $conf['image_frames.']['key.']));\r
-\r
-                               // fetches pictures\r
-                       $splitArr = array();\r
-                       $splitArr['imgObjNum'] = $conf['imgObjNum'];\r
-                       $splitArr = $GLOBALS['TSFE']->tmpl->splitConfArray($splitArr, $imgCount);\r
-\r
-                               // EqualHeight\r
-                       $equalHeight = intval($this->cObj->stdWrap($conf['equalH'], $conf['equalH.']));\r
-                       if ($equalHeight) { // Initiate gifbuilder object in order to get dimensions AND calculate the imageWidth's\r
-                               $gifCreator = t3lib_div::makeInstance('tslib_gifbuilder');\r
-                               $gifCreator->init();\r
-                               $relations = array();\r
-                               $relations_cols = array();\r
-                               $totalMaxW = $maxW * $colCount;\r
-                               for ($a = 0; $a < $imgCount; $a++) {\r
-                                       $imgKey = $a + $imgStart;\r
-                                       $imgInfo = $gifCreator->getImageDimensions($imgPath . $imgs[$imgKey]);\r
-                                       $relations[$a] = $imgInfo[1] / $equalHeight; // relationship between the original height and the wished height\r
-                                       if ($relations[$a]) { // if relations is zero, then the addition of this value is omitted as the image is not expected to display because of some error.\r
-                                               $relations_cols[floor($a / $colCount)] += $imgInfo[0] / $relations[$a]; // counts the total width of the row with the new height taken into consideration.\r
-                                       }\r
-                               }\r
-                       }\r
-\r
-                       $imageRowsFinalWidths = array(); // contains the width of every image row\r
-                       $imageRowsMaxHeights = array();\r
-                       $imgsTag = array();\r
-                       $origImages = array();\r
-                       for ($a = 0; $a < $imgCount; $a++) {\r
-                               $GLOBALS['TSFE']->register['IMAGE_NUM'] = $a;\r
-                               $GLOBALS['TSFE']->register['IMAGE_NUM_CURRENT'] = $a;\r
-\r
-                               $imgKey = $a + $imgStart;\r
-                               $totalImagePath = $imgPath . $imgs[$imgKey];\r
-                               $this->cObj->data[$this->cObj->currentValKey] = $totalImagePath;\r
-                               $imgObjNum = intval($splitArr[$a]['imgObjNum']);\r
-                               $imgConf = $conf[$imgObjNum . '.'];\r
-\r
-                               if ($equalHeight) {\r
-                                       $scale = 1;\r
-                                       if ($totalMaxW) {\r
-                                               $rowTotalMaxW = $relations_cols[floor($a / $colCount)];\r
-                                               if ($rowTotalMaxW > $totalMaxW) {\r
-                                                       $scale = $rowTotalMaxW / $totalMaxW;\r
-                                               }\r
-                                       }\r
-                                               // transfer info to the imageObject. Please note, that\r
-                                       $imgConf['file.']['height'] = round($equalHeight / $scale);\r
-\r
-                                       unset(\r
-                                               $imgConf['file.']['width'],\r
-                                               $imgConf['file.']['maxW'],\r
-                                               $imgConf['file.']['maxH'],\r
-                                               $imgConf['file.']['minW'],\r
-                                               $imgConf['file.']['minH'],\r
-                                               $imgConf['file.']['width.'],\r
-                                               $imgConf['file.']['maxW.'],\r
-                                               $imgConf['file.']['maxH.'],\r
-                                               $imgConf['file.']['minW.'],\r
-                                               $imgConf['file.']['minH.']\r
-                                       );\r
-                                       $maxW = 0; // setting this to zero, so that it doesn't disturb\r
-                               }\r
-\r
-                               if ($maxW) {\r
-                                       if (count($colMaxW)) {\r
-                                               $imgConf['file.']['maxW'] = $colMaxW[($a % $colCount)];\r
-                                       } else {\r
-                                               $imgConf['file.']['maxW'] = $maxW;\r
-                                       }\r
-                               }\r
-\r
-                                       // Image Object supplied:\r
-                               if (is_array($imgConf)) {\r
-                                       if ($this->cObj->image_effects[$image_effects]) {\r
-                                               $imgConf['file.']['params'] .= ' ' . $this->cObj->image_effects[$image_effects];\r
-                                       }\r
-                                       if ($image_frames) {\r
-                                               if (is_array($conf['image_frames.'][$image_frames . '.'])) {\r
-                                                       $imgConf['file.']['m.'] = $conf['image_frames.'][$image_frames . '.'];\r
-                                               }\r
-                                       }\r
-                                       if ($image_compression && $imgConf['file'] != 'GIFBUILDER') {\r
-                                               if ($image_compression == 1) {\r
-                                                       $tempImport = $imgConf['file.']['import'];\r
-                                                       $tempImport_dot = $imgConf['file.']['import.'];\r
-                                                       unset($imgConf['file.']);\r
-                                                       $imgConf['file.']['import'] = $tempImport;\r
-                                                       $imgConf['file.']['import.'] = $tempImport_dot;\r
-                                               } elseif (isset($this->cObj->image_compression[$image_compression])) {\r
-                                                       $imgConf['file.']['params'] .= ' ' . $this->cObj->image_compression[$image_compression]['params'];\r
-                                                       $imgConf['file.']['ext'] = $this->cObj->image_compression[$image_compression]['ext'];\r
-                                                       unset($imgConf['file.']['ext.']);\r
-                                               }\r
-                                       }\r
-\r
-                                               // "alt", "title" and "longdesc" attributes:\r
-                                       if (!strlen($imgConf['altText']) && !is_array($imgConf['altText.'])) {\r
-                                               $imgConf['altText'] = $conf['altText'];\r
-                                               $imgConf['altText.'] = $conf['altText.'];\r
-                                       }\r
-                                       if (!strlen($imgConf['titleText']) && !is_array($imgConf['titleText.'])) {\r
-                                               $imgConf['titleText'] = $conf['titleText'];\r
-                                               $imgConf['titleText.'] = $conf['titleText.'];\r
-                                       }\r
-                                       if (!strlen($imgConf['longdescURL']) && !is_array($imgConf['longdescURL.'])) {\r
-                                               $imgConf['longdescURL'] = $conf['longdescURL'];\r
-                                               $imgConf['longdescURL.'] = $conf['longdescURL.'];\r
-                                       }\r
-                               } else {\r
-                                       $imgConf = array(\r
-                                               'altText' => $conf['altText'],\r
-                                               'titleText' => $conf['titleText'],\r
-                                               'longdescURL' => $conf['longdescURL'],\r
-                                               'file' => $totalImagePath\r
-                                       );\r
-                               }\r
-\r
-                               $imgsTag[$imgKey] = $this->cObj->IMAGE($imgConf);\r
-\r
-                                       // Store the original filepath\r
-                               $origImages[$imgKey] = $GLOBALS['TSFE']->lastImageInfo;\r
-\r
-                               $imageRowsFinalWidths[floor($a / $colCount)] += $GLOBALS['TSFE']->lastImageInfo[0];\r
-                               if ($GLOBALS['TSFE']->lastImageInfo[1] > $imageRowsMaxHeights[floor($a / $colCount)]) {\r
-                                       $imageRowsMaxHeights[floor($a / $colCount)] = $GLOBALS['TSFE']->lastImageInfo[1];\r
-                               }\r
-                       }\r
-                               // calculating the tableWidth:\r
-                               // TableWidth problems: It creates problems if the pictures are NOT as wide as the tableWidth.\r
-                       $tableWidth = max($imageRowsFinalWidths) + $colspacing * ($colCount - 1) + $colCount * $border * $borderThickness * 2;\r
-\r
-                               // make table for pictures\r
-                       $index = $imgIndex = $imgStart;\r
-\r
-                       $noRows = $this->cObj->stdWrap($conf['noRows'], $conf['noRows.']);\r
-                       $noCols = $this->cObj->stdWrap($conf['noCols'], $conf['noCols.']);\r
-                       if ($noRows) {\r
-                               $noCols = 0;\r
-                       } // noRows overrides noCols. They cannot exist at the same time.\r
-                       if ($equalHeight) {\r
-                               $noCols = 1;\r
-                               $noRows = 0;\r
-                       }\r
-\r
-                       $rowCount_temp = 1;\r
-                       $colCount_temp = $colCount;\r
-                       if ($noRows) {\r
-                               $rowCount_temp = $rowCount;\r
-                               $rowCount = 1;\r
-                       }\r
-                       if ($noCols) {\r
-                               $colCount = 1;\r
-                       }\r
-                               // col- and rowspans calculated\r
-                       $colspan = (($colspacing) ? $colCount * 2 - 1 : $colCount);\r
-                       $rowspan = (($rowspacing) ? $rowCount * 2 - 1 : $rowCount) + $cap;\r
-\r
-\r
-                               // Edit icons:\r
-                       $editIconsHTML = $conf['editIcons'] && $GLOBALS['TSFE']->beUserLogin\r
-                               ? $this->cObj->editIcons('', $conf['editIcons'], $conf['editIcons.'])\r
-                               : '';\r
-\r
-                               // strech out table:\r
-                       $tablecode = '';\r
-                       $flag = 0;\r
-                       if ($conf['noStretchAndMarginCells'] != 1) {\r
-                               $tablecode .= '<tr>';\r
-                               if ($txtMarg && $align == 'right') { // If right aligned, the textborder is added on the right side\r
-                                       $tablecode .= '<td rowspan="' . ($rowspan + 1) . '" valign="top"><img src="' .\r
-                                               $GLOBALS['TSFE']->absRefPrefix . 'clear.gif" width="' . $txtMarg . '" height="1" alt="" title="" />' .\r
-                                               ($editIconsHTML ? '<br />' . $editIconsHTML : '') . '</td>';\r
-                                       $editIconsHTML = ''