CHG: changed end of line to unix
authorsimonschaufi <simonschaufi@735d13b6-9817-0410-8766-e36946ffe9aa>
Mon, 21 Feb 2011 18:27:35 +0000 (18:27 +0000)
committersimonschaufi <simonschaufi@735d13b6-9817-0410-8766-e36946ffe9aa>
Mon, 21 Feb 2011 18:27:35 +0000 (18:27 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Extensions/macina_banners/trunk@43977 735d13b6-9817-0410-8766-e36946ffe9aa

class.tx_macinabanners_tt_content_tx_macinabanners_placement.php [changed mode: 0644->0755]
ext_conf_template.txt [changed mode: 0644->0755]
ext_localconf.php [changed mode: 0644->0755]
ext_tables.php [changed mode: 0644->0755]
ext_tables.sql [changed mode: 0644->0755]
ext_typoscript_setup.txt [changed mode: 0644->0755]
locallang.php [changed mode: 0644->0755]
locallang_csh_banners.php [changed mode: 0644->0755]
locallang_db.php [changed mode: 0644->0755]
pi1/class.tx_macinabanners_pi1.php [changed mode: 0644->0755]
tca.php [changed mode: 0644->0755]

old mode 100644 (file)
new mode 100755 (executable)
index 861d4d3..4130fe7
@@ -1,61 +1,59 @@
-<?php\r\r
-/***************************************************************\r\r
-*  Copyright notice\r\r
-*\r\r
-*  (c) 2006 Markus Friedrich (markus.friedrich@media-lights.de)\r\r
-*  All rights reserved\r\r
-*\r\r
-*  This script is part of the TYPO3 project. The TYPO3 project is\r\r
-*  free software; you can redistribute it and/or modify\r\r
-*  it under the terms of the GNU General Public License as published by\r\r
-*  the Free Software Foundation; either version 2 of the License, or\r\r
-*  (at your option) any later version.\r\r
-*\r\r
-*  The GNU General Public License can be found at\r\r
-*  http://www.gnu.org/copyleft/gpl.html.\r\r
-*\r\r
-*  This script is distributed in the hope that it will be useful,\r\r
-*  but WITHOUT ANY WARRANTY; without even the implied warranty of\r\r
-*  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\r\r
-*  GNU General Public License for more details.\r\r
-*\r\r
-*  This copyright notice MUST APPEAR in all copies of the script!\r\r
-***************************************************************/\r\r
-/**\r\r
- * Class/Function which manipulates the item-array for table/field tt_content_tx_macinabanners_placement.\r\r
- *\r\r
- * @author    Markus Friedrich <markus.friedrich@media-lights.de>\r\r
- */\r\r
-\r\r
-\r\r
-class tx_macinabanners_tt_content_tx_macinabanners_placement {\r\r
-       \r\r
-       function main(&$params,&$pObj)    {\r\r
-               global $TYPO3_DB, $TCA;\r\r
-               \r\r
-               //get upload folder\r\r
-               t3lib_div::loadTCA('tx_macinabanners_categories');\r\r
-               $uploadFolder = $TCA['tx_macinabanners_categories']['columns']['icon']['config']['uploadfolder'];\r\r
-               \r\r
-               //get items from database and add them to the list\r\r
-               $RS = $TYPO3_DB->exec_SELECTquery('*', 'tx_macinabanners_categories', '');\r\r
-               while ($row = $TYPO3_DB->sql_fetch_assoc($RS)) {\r\r
-                       //check if there is an icon\r\r
-                       if (!empty($row['icon']) && file_exists(PATH_site.$uploadFolder.'/'.$row['icon'])) {\r\r
-                               $icon = '../' . $uploadFolder . '/' . $row['icon'];\r\r
-                       } else {\r\r
-                               $icon = '';\r\r
-                       }\r\r
-                       \r\r
-                       $params['items'][]=Array($row['description'], 'tx_macinabanners_categories:'.$row['uid'], $icon);\r\r
-               }\r\r
-       }\r\r
-}\r\r
-\r\r
-\r\r
-\r\r
-if (defined('TYPO3_MODE') && $TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['ext/macina_banners/class.tx_macinabanners_tt_content_tx_macinabanners_placement.php'])    {\r\r
-    include_once($TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['ext/macina_banners/class.tx_macinabanners_tt_content_tx_macinabanners_placement.php']);\r\r
-}\r\r
-\r\r
+<?php
+
+/***************************************************************
+*  Copyright notice
+*
+*  (c) 2006 Markus Friedrich (markus.friedrich@media-lights.de)
+*  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.
+*
+*  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!
+***************************************************************/
+
+/**
+ * Class/Function which manipulates the item-array for table/field tt_content_tx_macinabanners_placement.
+ *
+ * @author    Markus Friedrich <markus.friedrich@media-lights.de>
+ */
+class tx_macinabanners_tt_content_tx_macinabanners_placement {
+
+       function main(&$params,&$pObj) {
+       
+               global $TYPO3_DB, $TCA;
+               
+               //get upload folder
+               t3lib_div::loadTCA('tx_macinabanners_categories');
+               $uploadFolder = $TCA['tx_macinabanners_categories']['columns']['icon']['config']['uploadfolder'];
+               
+               //get items from database and add them to the list
+               $rows = $TYPO3_DB->exec_SELECTquery('*', 'tx_macinabanners_categories', '');
+               while ($row = $TYPO3_DB->sql_fetch_assoc($rows)) {
+                       //check if there is an icon
+                       if (!empty($row['icon']) && file_exists(PATH_site.$uploadFolder.'/'.$row['icon'])) {
+                               $icon = '../' . $uploadFolder . '/' . $row['icon'];
+                       } else {
+                               $icon = '';
+                       }
+                       
+                       $params['items'][] = array($row['description'], 'tx_macinabanners_categories:'.$row['uid'], $icon);
+               }
+       }
+}
+
+if (defined('TYPO3_MODE') && $TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['ext/macina_banners/class.tx_macinabanners_tt_content_tx_macinabanners_placement.php'])    {
+    include_once($TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['ext/macina_banners/class.tx_macinabanners_tt_content_tx_macinabanners_placement.php']);
+}
 ?>
\ No newline at end of file
old mode 100644 (file)
new mode 100755 (executable)
index 21b2514..cbaf222
@@ -1,5 +1,5 @@
-# cat=basic; type=boolean; label=activateDefaultCategories: If set macina_banners will provide default categories e.g. top\r\r
-activateDefaultCategories = 1\r\r
-\r\r
-# cat=basic//40; type=options[two_boxes,singlebox,checkbox]; label=renderMode: Decide how the categories should be selected\r
+# cat=basic; type=boolean; label=activateDefaultCategories: If set macina_banners will provide default categories e.g. top
+activateDefaultCategories = 1
+
+# cat=basic//40; type=options[two_boxes,singlebox,checkbox]; label=renderMode: Decide how the categories should be selected
 renderMode = two_boxes
\ No newline at end of file
old mode 100644 (file)
new mode 100755 (executable)
index 1608652..901a29e
@@ -1,27 +1,26 @@
-<?php\r
-if (!defined ('TYPO3_MODE'))   die ('Access denied.');\r
-\r
-t3lib_extMgm::addUserTSConfig('options.saveDocNew.tx_macinabanners_banners=1');\r
-\r
-  ## Extending TypoScript from static template uid=43 to set up userdefined tag:\r
-t3lib_extMgm::addTypoScript($_EXTKEY,'editorcfg','\r
-       tt_content.CSS_editor.ch.tx_macinabanners_pi1 = < plugin.tx_macinabanners_pi1.CSS_editor\r
-',43);\r
-\r
-\r
-//medialights: deactivated caching \r
-//t3lib_extMgm::addPItoST43($_EXTKEY,'pi1/class.tx_macinabanners_pi1.php','_pi1','list_type',0);\r
-t3lib_extMgm::addPItoST43($_EXTKEY,'pi1/class.tx_macinabanners_pi1.php','_pi1','list_type',1);\r
-\r
-t3lib_extMgm::addTypoScript($_EXTKEY,'setup','\r
-       tt_content.shortcut.20.0.conf.tx_macinabanners_banners = < plugin.'.t3lib_extMgm::getCN($_EXTKEY).'_pi1\r
-       tt_content.shortcut.20.0.conf.tx_macinabanners_banners.CMD = singleView\r
-',43);\r
-\r
-// Support for banners in the Page module\r
-$TYPO3_CONF_VARS['EXTCONF']['cms']['db_layout']['addTables']['tx_macinabanners_banners'][0] = array(\r
-    'fList' => 'customer;image;url;placement,bannertype',\r
-    'icon' => TRUE\r
-);\r
-\r
+<?php
+if (!defined ('TYPO3_MODE'))   die ('Access denied.');
+
+t3lib_extMgm::addUserTSConfig('options.saveDocNew.tx_macinabanners_banners=1');
+
+## Extending TypoScript from static template uid=43 to set up userdefined tag:
+t3lib_extMgm::addTypoScript($_EXTKEY,'editorcfg','
+       tt_content.CSS_editor.ch.tx_macinabanners_pi1 = < plugin.tx_macinabanners_pi1.CSS_editor
+',43);
+
+//medialights: deactivated caching 
+//t3lib_extMgm::addPItoST43($_EXTKEY,'pi1/class.tx_macinabanners_pi1.php','_pi1','list_type',0);
+t3lib_extMgm::addPItoST43($_EXTKEY,'pi1/class.tx_macinabanners_pi1.php','_pi1','list_type',1);
+
+t3lib_extMgm::addTypoScript($_EXTKEY,'setup','
+       tt_content.shortcut.20.0.conf.tx_macinabanners_banners = < plugin.'.t3lib_extMgm::getCN($_EXTKEY).'_pi1
+       tt_content.shortcut.20.0.conf.tx_macinabanners_banners.CMD = singleView
+',43);
+
+// Support for banners in the Page module
+$TYPO3_CONF_VARS['EXTCONF']['cms']['db_layout']['addTables']['tx_macinabanners_banners'][0] = array(
+       'fList' => 'customer;image;url;placement,bannertype',
+       'icon' => TRUE
+);
+
 ?>
\ No newline at end of file
old mode 100644 (file)
new mode 100755 (executable)
index f5c3683..ea74ad9
-<?php\r
-if (!defined ('TYPO3_MODE'))   die ('Access denied.');\r
-$tempColumns = Array (\r
-       'tx_macinabanners_placement' => Array (         \r
-               'exclude' => 0,         \r
-               'label' => 'LLL:EXT:macina_banners/locallang_db.php:tt_content.tx_macinabanners_placement',             \r
-               'config' => Array (\r
-                       'type' => 'select',\r
-                       /* medialights: default categories are only added if configured in the EM\r
-                       'items' => Array (\r
-                               Array('LLL:EXT:macina_banners/locallang_db.php:tt_content.tx_macinabanners_placement.I.0', 'top', t3lib_extMgm::extRelPath('macina_banners').'selicon_tt_content_tx_macinabanners_placement_0.gif'),\r
-                               Array('LLL:EXT:macina_banners/locallang_db.php:tt_content.tx_macinabanners_placement.I.1', 'right', t3lib_extMgm::extRelPath('macina_banners').'selicon_tt_content_tx_macinabanners_placement_1.gif'),\r
-                               Array('LLL:EXT:macina_banners/locallang_db.php:tt_content.tx_macinabanners_placement.I.2', 'bottom', t3lib_extMgm::extRelPath('macina_banners').'selicon_tt_content_tx_macinabanners_placement_2.gif'),\r
-                               Array('LLL:EXT:macina_banners/locallang_db.php:tt_content.tx_macinabanners_placement.I.3', 'left', t3lib_extMgm::extRelPath('macina_banners').'selicon_tt_content_tx_macinabanners_placement_3.gif'),\r
-                       ),\r
-                       */\r
-                       'itemsProcFunc' => 'tx_macinabanners_tt_content_tx_macinabanners_placement->main',\r
-                       //medialights: size and maxitems increased from 1\r
-                       'size' => 5,    \r
-                       'maxitems' => 50,\r
-                       \r
-                       //medialights: activate icons in select boxes\r
-                       'iconsInOptionTags' => 1\r
-               )\r
-       ),\r
-       'tx_macinabanners_mode' => Array (              \r
-               'exclude' => 0,         \r
-               'label' => 'LLL:EXT:macina_banners/locallang_db.php:tt_content.tx_macinabanners_mode',          \r
-               'config' => Array (\r
-                       'type' => 'select',\r
-                       'items' => Array (\r
-                               Array('LLL:EXT:macina_banners/locallang_db.php:tt_content.tx_macinabanners_mode.I.0', 'all', t3lib_extMgm::extRelPath('macina_banners').'selicon_tt_content_tx_macinabanners_mode_0.gif'),\r
-                               Array('LLL:EXT:macina_banners/locallang_db.php:tt_content.tx_macinabanners_mode.I.1', 'random', t3lib_extMgm::extRelPath('macina_banners').'selicon_tt_content_tx_macinabanners_mode_1.gif'),\r
-                               //medialights: add 'all banners randomized' mode\r
-                               Array('LLL:EXT:macina_banners/locallang_db.php:tt_content.tx_macinabanners_mode.I.2', 'random_all', t3lib_extMgm::extRelPath('macina_banners').'selicon_tt_content_tx_macinabanners_mode_2.gif'),\r
-                       ),\r
-                       'size' => 1,    \r
-                       'maxitems' => 1,\r
-               )\r
-       ),\r
-);\r
-\r
-//medialights: include itemProcFunc\r
-if (TYPO3_MODE=='BE') {\r
-       include_once(t3lib_extMgm::extPath('macina_banners').'class.tx_macinabanners_tt_content_tx_macinabanners_placement.php');\r
-}\r
-\r
-//medialights: include default categories if demanded\r
-$macinaCfg = unserialize($GLOBALS['TYPO3_CONF_VARS']['EXT']['extConf']['macina_banners']);\r
-if ($macinaCfg['activateDefaultCategories']) {\r
-       $tempColumns['tx_macinabanners_placement']['config']['items'] = array (\r
-               array('LLL:EXT:macina_banners/locallang_db.php:tx_macinabanners_banners.placement.I.0', 'top', t3lib_extMgm::extRelPath('macina_banners').'selicon_tx_macinabanners_banners_placement_0.gif'),\r
-               array('LLL:EXT:macina_banners/locallang_db.php:tx_macinabanners_banners.placement.I.1', 'right', t3lib_extMgm::extRelPath('macina_banners').'selicon_tx_macinabanners_banners_placement_1.gif'),\r
-               array('LLL:EXT:macina_banners/locallang_db.php:tx_macinabanners_banners.placement.I.2', 'bottom', t3lib_extMgm::extRelPath('macina_banners').'selicon_tx_macinabanners_banners_placement_2.gif'),\r
-               array('LLL:EXT:macina_banners/locallang_db.php:tx_macinabanners_banners.placement.I.3', 'left', t3lib_extMgm::extRelPath('macina_banners').'selicon_tx_macinabanners_banners_placement_3.gif'),\r
-       );\r
-}\r
-\r
-//medialights: configure the renderMode placement\r
-if ($macinaCfg['renderMode'] == 'singlebox' || $macinaCfg['renderMode'] == 'checkbox') {\r
-       $tempColumns['tx_macinabanners_placement']['config']['renderMode'] = $macinaCfg['renderMode'];\r
-}\r
-unset ($macinaCfg);\r
-\r
-t3lib_div::loadTCA('tt_content');\r
-t3lib_extMgm::addTCAcolumns('tt_content',$tempColumns,1);\r
-t3lib_extMgm::allowTableOnStandardPages('tx_macinabanners_banners');\r
-t3lib_extMgm::addToInsertRecords('tx_macinabanners_banners');\r
-$TCA['tx_macinabanners_banners'] = Array (\r
-       'ctrl' => Array (\r
-               'title' => 'LLL:EXT:macina_banners/locallang_db.php:tx_macinabanners_banners',          \r
-               'label' => 'customer',  \r
-               'tstamp' => 'tstamp',\r
-               'crdate' => 'crdate',\r
-               'cruser_id' => 'cruser_id',\r
-               'type' => 'bannertype', \r
-               'sortby' => 'sorting',  \r
-               'delete' => 'deleted',  \r
-               'thumbnail' => 'image',\r
-               'versioning'=>1,\r
-               'versioning_followPages'=>1,\r
-               'transOrigPointerField'=>'l18n_parent',\r
-               'transOrigDiffSourceField'=>'l18n_diffsource',\r
-               'languageField'=>'sys_language_uid',\r
-               'dividers2tabs'=>1,\r
-               'enablecolumns' => Array (              \r
-                       'disabled' => 'hidden', \r
-                       'starttime' => 'starttime',     \r
-                       'endtime' => 'endtime', \r
-                       'fe_group' => 'fe_group',\r
-               ),\r
-               'dynamicConfigFile' => t3lib_extMgm::extPath($_EXTKEY).'tca.php',\r
-               'iconfile' => t3lib_extMgm::extRelPath($_EXTKEY).'icon_tx_macinabanners_banners.gif',\r
-       ),\r
-       'feInterface' => Array (\r
-               //medialights: add html\r
-               'fe_admin_fieldList' => 'hidden, starttime, endtime, fe_group, sys_language_uid, t3ver_label, l18n_parent, customer, bannertype, image, maxw, alttext, url, swf, flash_width, flash_height, html, placement, border_top, border_right, border_bottom, border_left, pages, impressions, clicks, parameters',\r
-       )\r
-);\r
-\r
-\r
-// medialights: initalize 'context sensitive help' (csh)\r
-t3lib_extMgm::addLLrefForTCAdescr('tx_macinabanners_banners','EXT:macina_banners/locallang_csh_banners.php');\r
-\r
-t3lib_div::loadTCA('tt_content');\r
-$TCA['tt_content']['types']['list']['subtypes_excludelist'][$_EXTKEY.'_pi1']='layout,select_key';\r
-$TCA['tt_content']['types']['list']['subtypes_addlist'][$_EXTKEY.'_pi1']='tx_macinabanners_placement;;;;1-1-1, tx_macinabanners_mode';\r
-\r
-\r
-//medialights: add definition for 'tx_macinabanners_categories'\r
-$TCA['tx_macinabanners_categories'] = Array (\r
-       'ctrl' => Array (\r
-               'title' => 'LLL:EXT:macina_banners/locallang_db.php:tx_macinabanners_categories',        \r
-               'label' => 'description',    \r
-               'tstamp' => 'tstamp',\r
-               'crdate' => 'crdate',\r
-               'cruser_id' => 'cruser_id',\r
-               'default_sortby' => 'ORDER BY description',    \r
-               'dynamicConfigFile' => t3lib_extMgm::extPath($_EXTKEY).'tca.php',\r
-               'iconfile' => t3lib_extMgm::extRelPath($_EXTKEY).'ext_icon.gif',\r
-               'thumbnail' => 'icon',\r
-       ),\r
-       'feInterface' => Array (\r
-               'fe_admin_fieldList' => 'description, icon',\r
-       )\r
-);\r
-\r
-\r
-t3lib_extMgm::addPlugin(Array('LLL:EXT:macina_banners/locallang_db.php:tt_content.list_type_pi1', $_EXTKEY.'_pi1'),'list_type');\r
-// visionate removed static incluses\r
-#t3lib_extMgm::addStaticFile($_EXTKEY,'pi1/static/','Bannermodule');                                           \r
-\r
-\r
-if (TYPO3_MODE=='BE') $TBE_MODULES_EXT['xMOD_db_new_content_el']['addElClasses']['tx_macinabanners_pi1_wizicon'] = t3lib_extMgm::extPath($_EXTKEY).'pi1/class.tx_macinabanners_pi1_wizicon.php';\r
+<?php
+if (!defined ('TYPO3_MODE'))   die ('Access denied.');
+$tempColumns = array (
+       'tx_macinabanners_placement' => array (
+               'exclude' => 0,
+               'label' => 'LLL:EXT:macina_banners/locallang_db.php:tt_content.tx_macinabanners_placement',
+               'config' => array (
+                       'type' => 'select',
+                       /* medialights: default categories are only added if configured in the EM
+                       'items' => array (
+                               array('LLL:EXT:macina_banners/locallang_db.php:tt_content.tx_macinabanners_placement.I.0', 'top', t3lib_extMgm::extRelPath('macina_banners').'selicon_tt_content_tx_macinabanners_placement_0.gif'),
+                               array('LLL:EXT:macina_banners/locallang_db.php:tt_content.tx_macinabanners_placement.I.1', 'right', t3lib_extMgm::extRelPath('macina_banners').'selicon_tt_content_tx_macinabanners_placement_1.gif'),
+                               array('LLL:EXT:macina_banners/locallang_db.php:tt_content.tx_macinabanners_placement.I.2', 'bottom', t3lib_extMgm::extRelPath('macina_banners').'selicon_tt_content_tx_macinabanners_placement_2.gif'),
+                               array('LLL:EXT:macina_banners/locallang_db.php:tt_content.tx_macinabanners_placement.I.3', 'left', t3lib_extMgm::extRelPath('macina_banners').'selicon_tt_content_tx_macinabanners_placement_3.gif'),
+                       ),
+                       */
+                       'itemsProcFunc' => 'tx_macinabanners_tt_content_tx_macinabanners_placement->main',
+                       //medialights: size and maxitems increased from 1
+                       'size' => 5,
+                       'maxitems' => 50,
+
+                       //medialights: activate icons in select boxes
+                       'iconsInOptionTags' => 1
+               )
+       ),
+       'tx_macinabanners_mode' => array (
+               'exclude' => 0,
+               'label' => 'LLL:EXT:macina_banners/locallang_db.php:tt_content.tx_macinabanners_mode',
+               'config' => array (
+                       'type' => 'select',
+                       'items' => array (
+                               array('LLL:EXT:macina_banners/locallang_db.php:tt_content.tx_macinabanners_mode.I.0', 'all', t3lib_extMgm::extRelPath('macina_banners').'selicon_tt_content_tx_macinabanners_mode_0.gif'),
+                               array('LLL:EXT:macina_banners/locallang_db.php:tt_content.tx_macinabanners_mode.I.1', 'random', t3lib_extMgm::extRelPath('macina_banners').'selicon_tt_content_tx_macinabanners_mode_1.gif'),
+                               //medialights: add 'all banners randomized' mode
+                               array('LLL:EXT:macina_banners/locallang_db.php:tt_content.tx_macinabanners_mode.I.2', 'random_all', t3lib_extMgm::extRelPath('macina_banners').'selicon_tt_content_tx_macinabanners_mode_2.gif'),
+                       ),
+                       'size' => 1,
+                       'maxitems' => 1,
+               )
+       ),
+);
+
+//medialights: include itemProcFunc
+if (TYPO3_MODE=='BE') {
+       include_once(t3lib_extMgm::extPath('macina_banners').'class.tx_macinabanners_tt_content_tx_macinabanners_placement.php');
+}
+
+//medialights: include default categories if demanded
+$macinaCfg = unserialize($GLOBALS['TYPO3_CONF_VARS']['EXT']['extConf']['macina_banners']);
+if ($macinaCfg['activateDefaultCategories']) {
+       $tempColumns['tx_macinabanners_placement']['config']['items'] = array (
+               array('LLL:EXT:macina_banners/locallang_db.php:tx_macinabanners_banners.placement.I.0', 'top', t3lib_extMgm::extRelPath('macina_banners').'selicon_tx_macinabanners_banners_placement_0.gif'),
+               array('LLL:EXT:macina_banners/locallang_db.php:tx_macinabanners_banners.placement.I.1', 'right', t3lib_extMgm::extRelPath('macina_banners').'selicon_tx_macinabanners_banners_placement_1.gif'),
+               array('LLL:EXT:macina_banners/locallang_db.php:tx_macinabanners_banners.placement.I.2', 'bottom', t3lib_extMgm::extRelPath('macina_banners').'selicon_tx_macinabanners_banners_placement_2.gif'),
+               array('LLL:EXT:macina_banners/locallang_db.php:tx_macinabanners_banners.placement.I.3', 'left', t3lib_extMgm::extRelPath('macina_banners').'selicon_tx_macinabanners_banners_placement_3.gif'),
+       );
+}
+
+//medialights: configure the renderMode placement
+if ($macinaCfg['renderMode'] == 'singlebox' || $macinaCfg['renderMode'] == 'checkbox') {
+       $tempColumns['tx_macinabanners_placement']['config']['renderMode'] = $macinaCfg['renderMode'];
+}
+unset ($macinaCfg);
+
+t3lib_div::loadTCA('tt_content');
+t3lib_extMgm::addTCAcolumns('tt_content',$tempColumns,1);
+t3lib_extMgm::allowTableOnStandardPages('tx_macinabanners_banners');
+t3lib_extMgm::addToInsertRecords('tx_macinabanners_banners');
+$TCA['tx_macinabanners_banners'] = array (
+       'ctrl' => array (
+               'title' => 'LLL:EXT:macina_banners/locallang_db.php:tx_macinabanners_banners',
+               'label' => 'customer',
+               'tstamp' => 'tstamp',
+               'crdate' => 'crdate',
+               'cruser_id' => 'cruser_id',
+               'type' => 'bannertype',
+               'sortby' => 'sorting',
+               'delete' => 'deleted',
+               'thumbnail' => 'image',
+               'versioning'=>1,
+               'versioning_followPages'=>1,
+               'transOrigPointerField'=>'l18n_parent',
+               'transOrigDiffSourceField'=>'l18n_diffsource',
+               'languageField'=>'sys_language_uid',
+               'dividers2tabs'=>1,
+               'enablecolumns' => array (
+                       'disabled' => 'hidden',
+                       'starttime' => 'starttime',
+                       'endtime' => 'endtime',
+                       'fe_group' => 'fe_group',
+               ),
+               'dynamicConfigFile' => t3lib_extMgm::extPath($_EXTKEY).'tca.php',
+               'iconfile' => t3lib_extMgm::extRelPath($_EXTKEY).'icon_tx_macinabanners_banners.gif',
+       ),
+       'feInterface' => array (
+               //medialights: add html
+               'fe_admin_fieldList' => 'hidden, starttime, endtime, fe_group, sys_language_uid, t3ver_label, l18n_parent, customer, bannertype, image, maxw, alttext, url, swf, flash_width, flash_height, html, placement, border_top, border_right, border_bottom, border_left, pages, impressions, clicks, parameters',
+       )
+);
+
+
+// medialights: initalize 'context sensitive help' (csh)
+t3lib_extMgm::addLLrefForTCAdescr('tx_macinabanners_banners','EXT:macina_banners/locallang_csh_banners.php');
+
+t3lib_div::loadTCA('tt_content');
+$TCA['tt_content']['types']['list']['subtypes_excludelist'][$_EXTKEY.'_pi1']='layout,select_key';
+$TCA['tt_content']['types']['list']['subtypes_addlist'][$_EXTKEY.'_pi1']='tx_macinabanners_placement;;;;1-1-1, tx_macinabanners_mode';
+
+
+//medialights: add definition for 'tx_macinabanners_categories'
+$TCA['tx_macinabanners_categories'] = array (
+       'ctrl' => array (
+               'title' => 'LLL:EXT:macina_banners/locallang_db.php:tx_macinabanners_categories',
+               'label' => 'description',
+               'tstamp' => 'tstamp',
+               'crdate' => 'crdate',
+               'cruser_id' => 'cruser_id',
+               'default_sortby' => 'ORDER BY description',
+               'dynamicConfigFile' => t3lib_extMgm::extPath($_EXTKEY).'tca.php',
+               'iconfile' => t3lib_extMgm::extRelPath($_EXTKEY).'ext_icon.gif',
+               'thumbnail' => 'icon',
+       ),
+       'feInterface' => array (
+               'fe_admin_fieldList' => 'description, icon',
+       )
+);
+
+t3lib_extMgm::addPlugin(array('LLL:EXT:macina_banners/locallang_db.php:tt_content.list_type_pi1', $_EXTKEY.'_pi1'),'list_type');
+// visionate removed static incluses
+#t3lib_extMgm::addStaticFile($_EXTKEY,'pi1/static/','Bannermodule');
+
+if (TYPO3_MODE=='BE') {
+       $TBE_MODULES_EXT['xMOD_db_new_content_el']['addElClasses']['tx_macinabanners_pi1_wizicon'] = t3lib_extMgm::extPath($_EXTKEY).'pi1/class.tx_macinabanners_pi1_wizicon.php';
+}
 ?>
\ No newline at end of file
old mode 100644 (file)
new mode 100755 (executable)
index cc636b2..bfa790e
@@ -1,77 +1,75 @@
-#\r
-# Table structure for table 'tt_content'\r
-#\r
-# medialights: changed type of placement\r
-# old setting: "tx_macinabanners_placement varchar(50) DEFAULT '' NOT NULL,"\r
-CREATE TABLE tt_content (\r
-       tx_macinabanners_placement blob NOT NULL,\r
-       tx_macinabanners_mode varchar(10) DEFAULT '' NOT NULL\r
-);\r
-\r
-\r
-\r
-#\r
-# Table structure for table 'tx_macinabanners_banners'\r
-#\r
-# medialights: changed type of placement\r
-# old setting: "placement varchar(50) DEFAULT '' NOT NULL,"\r
-CREATE TABLE tx_macinabanners_banners (\r
-       uid int(11) DEFAULT '0' NOT NULL auto_increment,\r
-       pid int(11) DEFAULT '0' NOT NULL,\r
-       tstamp int(11) unsigned DEFAULT '0' NOT NULL,\r
-       crdate int(11) unsigned DEFAULT '0' NOT NULL,\r
-       cruser_id int(11) unsigned DEFAULT '0' NOT NULL,\r
-       sorting int(10) unsigned DEFAULT '0' NOT NULL,\r
-       deleted tinyint(4) unsigned DEFAULT '0' NOT NULL,\r
-       t3ver_oid int(11) unsigned DEFAULT '0' NOT NULL,\r
-       t3ver_id int(11) unsigned DEFAULT '0' NOT NULL,\r
-       t3ver_label varchar(30) DEFAULT '' NOT NULL,\r
-       sys_language_uid int(11) DEFAULT '0' NOT NULL,\r
-       l18n_parent int(11) DEFAULT '0' NOT NULL,\r
-       l18n_diffsource mediumblob NOT NULL,\r
-       hidden tinyint(4) unsigned DEFAULT '0' NOT NULL,\r
-       starttime int(11) unsigned DEFAULT '0' NOT NULL,\r
-       endtime int(11) unsigned DEFAULT '0' NOT NULL,\r
-       fe_group int(11) DEFAULT '0' NOT NULL,\r
-       customer tinytext NOT NULL,\r
-       bannertype int(11) unsigned DEFAULT '0' NOT NULL,\r
-       image blob NOT NULL,\r
-       maxw int(11) DEFAULT '0' NOT NULL,\r
-       alttext tinytext NOT NULL,\r
-       url tinytext NOT NULL,\r
-       swf blob NOT NULL,\r
-       flash_width int(11) DEFAULT '0' NOT NULL,\r
-       flash_height int(11) DEFAULT '0' NOT NULL,\r
-       html text NOT NULL,\r
-       placement blob NOT NULL,\r
-       border_top int(11) DEFAULT '0' NOT NULL,\r
-       border_right int(11) DEFAULT '0' NOT NULL,\r
-       border_bottom int(11) DEFAULT '0' NOT NULL,\r
-       border_left int(11) DEFAULT '0' NOT NULL,\r
-       pages blob NOT NULL,\r
-       recursiv tinyint(4) unsigned DEFAULT '0' NOT NULL,\r
-       excludepages blob NOT NULL,\r
-       impressions tinytext NOT NULL,\r
-       clicks tinytext NOT NULL,\r
-       parameters text NOT NULL,\r
-       \r
-       PRIMARY KEY (uid),\r
-       KEY parent (pid)\r
-);\r
-\r
-#\r
-# Table structure for table 'tx_macinabanners_categories'\r
-#\r
-# medialights: new table for banner categories\r
-CREATE TABLE tx_macinabanners_categories (\r
-    uid int(11) NOT NULL auto_increment,\r
-    pid int(11) DEFAULT '0' NOT NULL,\r
-    tstamp int(11) DEFAULT '0' NOT NULL,\r
-    crdate int(11) DEFAULT '0' NOT NULL,\r
-    cruser_id int(11) DEFAULT '0' NOT NULL,\r
-    description varchar(255) DEFAULT '' NOT NULL,\r
-    icon blob NOT NULL,\r
-    \r
-    PRIMARY KEY (uid),\r
-    KEY parent (pid)\r
+#
+# Table structure for table 'tt_content'
+#
+# medialights: changed type of placement
+# old setting: "tx_macinabanners_placement varchar(50) DEFAULT '' NOT NULL,"
+CREATE TABLE tt_content (
+       tx_macinabanners_placement blob NOT NULL,
+       tx_macinabanners_mode varchar(10) DEFAULT '' NOT NULL
+);
+
+#
+# Table structure for table 'tx_macinabanners_banners'
+#
+# medialights: changed type of placement
+# old setting: "placement varchar(50) DEFAULT '' NOT NULL,"
+CREATE TABLE tx_macinabanners_banners (
+       uid int(11) DEFAULT '0' NOT NULL auto_increment,
+       pid int(11) DEFAULT '0' NOT NULL,
+       tstamp int(11) unsigned DEFAULT '0' NOT NULL,
+       crdate int(11) unsigned DEFAULT '0' NOT NULL,
+       cruser_id int(11) unsigned DEFAULT '0' NOT NULL,
+       sorting int(10) unsigned DEFAULT '0' NOT NULL,
+       deleted tinyint(4) unsigned DEFAULT '0' NOT NULL,
+       t3ver_oid int(11) unsigned DEFAULT '0' NOT NULL,
+       t3ver_id int(11) unsigned DEFAULT '0' NOT NULL,
+       t3ver_label varchar(30) DEFAULT '' NOT NULL,
+       sys_language_uid int(11) DEFAULT '0' NOT NULL,
+       l18n_parent int(11) DEFAULT '0' NOT NULL,
+       l18n_diffsource mediumblob NOT NULL,
+       hidden tinyint(4) unsigned DEFAULT '0' NOT NULL,
+       starttime int(11) unsigned DEFAULT '0' NOT NULL,
+       endtime int(11) unsigned DEFAULT '0' NOT NULL,
+       fe_group int(11) DEFAULT '0' NOT NULL,
+       customer tinytext NOT NULL,
+       bannertype int(11) unsigned DEFAULT '0' NOT NULL,
+       image blob NOT NULL,
+       maxw int(11) DEFAULT '0' NOT NULL,
+       alttext tinytext NOT NULL,
+       url tinytext NOT NULL,
+       swf blob NOT NULL,
+       flash_width int(11) DEFAULT '0' NOT NULL,
+       flash_height int(11) DEFAULT '0' NOT NULL,
+       html text NOT NULL,
+       placement blob NOT NULL,
+       border_top int(11) DEFAULT '0' NOT NULL,
+       border_right int(11) DEFAULT '0' NOT NULL,
+       border_bottom int(11) DEFAULT '0' NOT NULL,
+       border_left int(11) DEFAULT '0' NOT NULL,
+       pages blob NOT NULL,
+       recursiv tinyint(4) unsigned DEFAULT '0' NOT NULL,
+       excludepages blob NOT NULL,
+       impressions tinytext NOT NULL,
+       clicks tinytext NOT NULL,
+       parameters text NOT NULL,
+
+       PRIMARY KEY (uid),
+       KEY parent (pid)
+);
+
+#
+# Table structure for table 'tx_macinabanners_categories'
+#
+# medialights: new table for banner categories
+CREATE TABLE tx_macinabanners_categories (
+       uid int(11) NOT NULL auto_increment,
+       pid int(11) DEFAULT '0' NOT NULL,
+       tstamp int(11) DEFAULT '0' NOT NULL,
+       crdate int(11) DEFAULT '0' NOT NULL,
+       cruser_id int(11) DEFAULT '0' NOT NULL,
+       description varchar(255) DEFAULT '' NOT NULL,
+       icon blob NOT NULL,
+
+       PRIMARY KEY (uid),
+       KEY parent (pid)
 );
\ No newline at end of file
old mode 100644 (file)
new mode 100755 (executable)
index 69a8def..a9886dd
@@ -1,33 +1,32 @@
-\r
-plugin.tx_macinabanners_pi1 {\r
-       # parser (dont change this)\r
-       parser < tt_content.text.20.parseFunc\r
-       \r
-       # template for plugin\r
-       templateFile = EXT:macina_banners/pi1/template.htm\r
-               \r
-       # list of page ids where the banners should be taken from ( comma seperated f.E.: 1,5,7)\r
-       pidList = \r
-       \r
-       # levels of recoursion to search for banners\r
-       recursive = 0\r
-       \r
-       # show banners with this attribute, default options are: "top, left, bottom, right", all Descriptions of Banner Categories can be used\r
-       placement = top\r
-       \r
-       #mode to show banners, options are: all, random\r
-       mode = all\r
-       \r
-       # how many banner maximum\r
-       results_at_a_time = 100\r
-       \r
-       # image preconfig\r
-       image {\r
-               file.maxW = 468\r
-               #file.params = -quality 90 // activate to force quality 90\r
-               #file.ext = jpg                 // activate to force jpg\r
-       }\r
-\r
-       #enableParameterRestriction: this variable enables the restriction to parameters\r
-       enableParameterRestriction = 0\r
-}\r
+plugin.tx_macinabanners_pi1 {
+       # parser (dont change this)
+       parser < tt_content.text.20.parseFunc
+       
+       # template for plugin
+       templateFile = EXT:macina_banners/pi1/template.htm
+               
+       # list of page ids where the banners should be taken from ( comma seperated f.E.: 1,5,7)
+       pidList = 
+       
+       # levels of recoursion to search for banners
+       recursive = 0
+       
+       # show banners with this attribute, default options are: "top, left, bottom, right", all Descriptions of Banner Categories can be used
+       placement = top
+       
+       #mode to show banners, options are: all, random
+       mode = all
+       
+       # how many banner maximum
+       results_at_a_time = 100
+       
+       # image preconfig
+       image {
+               file.maxW = 468
+               #file.params = -quality 90 // activate to force quality 90
+               #file.ext = jpg                 // activate to force jpg
+       }
+
+       #enableParameterRestriction: this variable enables the restriction to parameters
+       enableParameterRestriction = 0
+}
old mode 100644 (file)
new mode 100755 (executable)
index 7dc1bcb..d283ba5
-<?php\r
-/**\r
- * Language labels for extension "macina_banners"\r
- * \r
- * This file is detected by the translation tool.\r
- */\r
-\r
-$LOCAL_LANG = Array (\r
-       'default' => Array (\r
-               'pi1_title' => 'Bannermodule',\r
-               'pi1_plus_wiz_description' => 'Adds a container to display Banners on the Website',\r
-       ),\r
-       'dk' => Array (\r
-       ),\r
-       'de' => Array (\r
-               'pi1_title' => 'Bannermodul',\r
-               'pi1_plus_wiz_description' => 'Fügt einen Container zum anzeigen von Bannern ein.',\r
-       ),\r
-       'no' => Array (\r
-               'pi1_title' => 'Reklamemodul',\r
-               'pi1_plus_wiz_description' => 'Legger til et element for å vide reklamebannere på webstedet',\r
-       ),\r
-       'it' => Array (\r
-       ),\r
-       'fr' => Array (\r
-       ),\r
-       'es' => Array (\r
-               'pi1_title' => 'Módulo de banners',\r
-               'pi1_plus_wiz_description' => 'Añadir contenedor para mostrar banners',\r
-       ),\r
-       'nl' => Array (\r
-       ),\r
-       'cz' => Array (\r
-       ),\r
-       'pl' => Array (\r
-       ),\r
-       'si' => Array (\r
-       ),\r
-       'fi' => Array (\r
-               'pi1_title' => 'Mainospalkki aliohjelma',\r
-               'pi1_plus_wiz_description' => 'Lisää mainospalkin näytön sivustolle',\r
-       ),\r
-       'tr' => Array (\r
-       ),\r
-       'se' => Array (\r
-       ),\r
-       'pt' => Array (\r
-       ),\r
-       'ru' => Array (\r
-       ),\r
-       'ro' => Array (\r
-       ),\r
-       'ch' => Array (\r
-       ),\r
-       'sk' => Array (\r
-       ),\r
-       'lt' => Array (\r
-       ),\r
-       'is' => Array (\r
-       ),\r
-       'hr' => Array (\r
-               'pi1_title' => 'Banner modul',\r
-               'pi1_plus_wiz_description' => 'Dodaje kontejner u kome æe se prikazivati banneri na web stranicama',\r
-       ),\r
-       'hu' => Array (\r
-       ),\r
-       'gl' => Array (\r
-       ),\r
-       'th' => Array (\r
-       ),\r
-       'gr' => Array (\r
-       ),\r
-       'hk' => Array (\r
-       ),\r
-       'eu' => Array (\r
-       ),\r
-       'bg' => Array (\r
-       ),\r
-       'br' => Array (\r
-       ),\r
-       'et' => Array (\r
-       ),\r
-       'ar' => Array (\r
-       ),\r
-       'he' => Array (\r
-       ),\r
-       'ua' => Array (\r
-       ),\r
-       'lv' => Array (\r
-       ),\r
-       'jp' => Array (\r
-       ),\r
-       'vn' => Array (\r
-       ),\r
-       'ca' => Array (\r
-       ),\r
-       'ba' => Array (\r
-       ),\r
-       'kr' => Array (\r
-       ),\r
-       'eo' => Array (\r
-       ),\r
-       'my' => Array (\r
-       ),\r
-       'hi' => Array (\r
-       ),\r
-);\r
+<?php
+/**
+ * Language labels for extension "macina_banners"
+ * 
+ * This file is detected by the translation tool.
+ */
+
+$LOCAL_LANG = Array (
+       'default' => Array (
+               'pi1_title' => 'Bannermodule',
+               'pi1_plus_wiz_description' => 'Adds a container to display Banners on the Website',
+       ),
+       'dk' => Array (
+       ),
+       'de' => Array (
+               'pi1_title' => 'Bannermodul',
+               'pi1_plus_wiz_description' => 'Fügt einen Container zum anzeigen von Bannern ein.',
+       ),
+       'no' => Array (
+               'pi1_title' => 'Reklamemodul',
+               'pi1_plus_wiz_description' => 'Legger til et element for å vide reklamebannere på webstedet',
+       ),
+       'it' => Array (
+       ),
+       'fr' => Array (
+       ),
+       'es' => Array (
+               'pi1_title' => 'Módulo de banners',
+               'pi1_plus_wiz_description' => 'Añadir contenedor para mostrar banners',
+       ),
+       'nl' => Array (
+       ),
+       'cz' => Array (
+       ),
+       'pl' => Array (
+       ),
+       'si' => Array (
+       ),
+       'fi' => Array (
+               'pi1_title' => 'Mainospalkki aliohjelma',
+               'pi1_plus_wiz_description' => 'Lisää mainospalkin näytön sivustolle',
+       ),
+       'tr' => Array (
+       ),
+       'se' => Array (
+       ),
+       'pt' => Array (
+       ),
+       'ru' => Array (
+       ),
+       'ro' => Array (
+       ),
+       'ch' => Array (
+       ),
+       'sk' => Array (
+       ),
+       'lt' => Array (
+       ),
+       'is' => Array (
+       ),
+       'hr' => Array (
+               'pi1_title' => 'Banner modul',
+               'pi1_plus_wiz_description' => 'Dodaje kontejner u kome æe se prikazivati banneri na web stranicama',
+       ),
+       'hu' => Array (
+       ),
+       'gl' => Array (
+       ),
+       'th' => Array (
+       ),
+       'gr' => Array (
+       ),
+       'hk' => Array (
+       ),
+       'eu' => Array (
+       ),
+       'bg' => Array (
+       ),
+       'br' => Array (
+       ),
+       'et' => Array (
+       ),
+       'ar' => Array (
+       ),
+       'he' => Array (
+       ),
+       'ua' => Array (
+       ),
+       'lv' => Array (
+       ),
+       'jp' => Array (
+       ),
+       'vn' => Array (
+       ),
+       'ca' => Array (
+       ),
+       'ba' => Array (
+       ),
+       'kr' => Array (
+       ),
+       'eo' => Array (
+       ),
+       'my' => Array (
+       ),
+       'hi' => Array (
+       ),
+);
 ?>
\ No newline at end of file
old mode 100644 (file)
new mode 100755 (executable)
index e9d8aed..642e001
@@ -1,19 +1,19 @@
-<?php\r
-/**\r
-* TCA_DESCR for "tx_macinabanners_banners"\r
-*/\r
-$LOCAL_LANG = Array (\r
-       'default' => Array (\r
-               'parameters.description' => 'Valid parameters and values',\r
-               'parameters.details' => 'Enter a list of parameter names with valid values, one parameter per line. E.g. RegionID_cbo = 13,17 will enable this banner if RegionID_cbo has the value 13 or 17.\r
-               \r
-               Note: To enable this feature you have to set the TS Parameter enableParameterRestriction to 1.',\r
-       ),\r
-       'de' => Array (\r
-               'parameters.description' => 'Gültige Parameter und Werte',\r
-               'parameters.details' => 'Geben Sie eine Liste der Parameter mit gültigen Werten an, ein Parameter pro Zeile. Mit RegionID_cbo = 13,17 wird dieser Banner angezeigt wenn RegionID_cbo den Wert 13 oder 17 hat.\r
-               \r
-               Achtung: Um diese Funktion zu aktivieren müssen Sie den TS Parameter enableParameterRestriction auf 1 setzen.',\r
-       ),\r
-);\r
-?>\r
+<?php
+/**
+* TCA_DESCR for "tx_macinabanners_banners"
+*/
+$LOCAL_LANG = Array (
+       'default' => Array (
+               'parameters.description' => 'Valid parameters and values',
+               'parameters.details' => 'Enter a list of parameter names with valid values, one parameter per line. E.g. RegionID_cbo = 13,17 will enable this banner if RegionID_cbo has the value 13 or 17.
+               
+               Note: To enable this feature you have to set the TS Parameter enableParameterRestriction to 1.',
+       ),
+       'de' => Array (
+               'parameters.description' => 'Gültige Parameter und Werte',
+               'parameters.details' => 'Geben Sie eine Liste der Parameter mit gültigen Werten an, ein Parameter pro Zeile. Mit RegionID_cbo = 13,17 wird dieser Banner angezeigt wenn RegionID_cbo den Wert 13 oder 17 hat.
+               
+               Achtung: Um diese Funktion zu aktivieren müssen Sie den TS Parameter enableParameterRestriction auf 1 setzen.',
+       ),
+);
+?>
old mode 100644 (file)
new mode 100755 (executable)
index c1ed94d..59d1600
-<?php\r
-/**\r
- * Language labels for database tables/fields belonging to extension "macina_banners"\r
- * \r
- * This file is detected by the translation tool.\r
- */\r
-\r
-$LOCAL_LANG = Array (\r
-       'default' => Array (\r
-               'tt_content.tx_macinabanners_placement.I.0' => 'top',\r
-               'tt_content.tx_macinabanners_placement.I.1' => 'right',\r
-               'tt_content.tx_macinabanners_placement.I.2' => 'bottom',\r
-               'tt_content.tx_macinabanners_placement.I.3' => 'left',\r
-               'tt_content.tx_macinabanners_placement' => 'Placement',\r
-               'tt_content.tx_macinabanners_mode.I.0' => 'show all attached banner',\r
-               'tt_content.tx_macinabanners_mode.I.1' => 'show random from attached banners',\r
-               //medialights: add "all banners randomized" mode\r
-               'tt_content.tx_macinabanners_mode.I.2' => 'show all banners randomized',\r
-               'tt_content.tx_macinabanners_mode' => 'Mode',\r
-               'tx_macinabanners_banners' => 'Banner',\r
-               'tx_macinabanners_banners.customer' => 'Customer',\r
-               'tx_macinabanners_banners.bannertype.I.0' => 'image',\r
-               'tx_macinabanners_banners.bannertype.I.1' => 'flash (.swf)',\r
-               'tx_macinabanners_banners.bannertype.I.2' => 'html',\r
-               'tx_macinabanners_banners.bannertype' => 'Bannertype',\r
-               'tx_macinabanners_banners.image' => 'Bannerimage',\r
-               'tx_macinabanners_banners.maxw' => 'maximum width',\r
-               'tx_macinabanners_banners.alttext' => 'Image Text',\r
-               'tx_macinabanners_banners.url' => 'Link',\r
-               'tx_macinabanners_banners.swf' => 'flashbanner',\r
-               'tx_macinabanners_banners.flash_width' => 'width of flashmovie',\r
-               'tx_macinabanners_banners.flash_height' => 'height of flashmovie',\r
-               'tx_macinabanners_banners.placement.I.0' => 'top',\r
-               'tx_macinabanners_banners.placement.I.1' => 'right',\r
-               'tx_macinabanners_banners.placement.I.2' => 'bottom',\r
-               'tx_macinabanners_banners.placement.I.3' => 'left',\r
-               'tx_macinabanners_banners.placement' => 'Placement',\r
-               'tx_macinabanners_banners.border_top' => 'top Border',\r
-               'tx_macinabanners_banners.border_right' => 'right Border',\r
-               'tx_macinabanners_banners.border_bottom' => 'bottom Border',\r
-               'tx_macinabanners_banners.border_left' => 'left Border',\r
-               'tx_macinabanners_banners.pages' => 'Show Banner on this Pages ONLY',\r
-               'tx_macinabanners_banners.recursiv' => 'including Subpages',\r
-               'tx_macinabanners_banners.excludepages' => 'DONT show Banner on THIS Pages',\r
-               'tx_macinabanners_banners.impressions' => 'Impressions',\r
-               'tx_macinabanners_banners.clicks' => 'Clickcount',\r
-               'tx_macinabanners_banners.parameters' => 'Parameters',\r
-               'tt_content.list_type_pi1' => 'Bannermodule',\r
-               'tx_macinabanners_banners.sys_language_uid' => 'Banner language',\r
-               'tx_macinabanners_banners.sys_language_independent' => 'Language independent (above seleceted language is ignored!)',\r
-               'tx_macinabanners_banners.general' => 'General',\r
-               'tx_macinabanners_banners.bannerimage' => 'BannerImage',\r
-               'tx_macinabanners_banners.flashfilm' => 'Flashfile',\r
-               'tx_macinabanners_banners.html' => 'HTML',\r
-               'tx_macinabanners_banners.view' => 'View',\r
-               'tx_macinabanners_banners.visibility' => 'Visibility',\r
-               'tx_macinabanners_banners.statistics' => 'Statistics',\r
-               \r
-               'tx_macinabanners_categories' => 'Banner Category',    \r
-               'tx_macinabanners_categories.description' => 'Description',\r
-               'tx_macinabanners_categories.icon' => 'Icon',\r
-       ),\r
-       'dk' => Array (\r
-       ),\r
-       'de' => Array (\r
-               'tt_content.tx_macinabanners_placement.I.0' => 'oben',\r
-               'tt_content.tx_macinabanners_placement.I.1' => 'rechts',\r
-               'tt_content.tx_macinabanners_placement.I.2' => 'unten',\r
-               'tt_content.tx_macinabanners_placement.I.3' => 'links',\r
-               'tt_content.tx_macinabanners_placement' => 'Positionierug',\r
-               'tt_content.tx_macinabanners_mode.I.0' => 'alle dieser Seite angef�gten Banner zeigen',\r
-               'tt_content.tx_macinabanners_mode.I.1' => 'zuf�llig einen der angef�gten Banner zeigen',\r
-               'tt_content.tx_macinabanners_mode.I.2' => 'alle Banner in zuf�lliger Reihenfolge zeigen',\r
-               'tt_content.tx_macinabanners_mode' => 'Anzeigemodus',\r
-               'tx_macinabanners_banners' => 'Banner',\r
-               'tx_macinabanners_banners.customer' => 'Beschreibung',\r
-               'tx_macinabanners_banners.bannertype.I.0' => 'Bild',\r
-               'tx_macinabanners_banners.bannertype.I.1' => 'Flash (.swf)',\r
-               'tx_macinabanners_banners.bannertype.I.2' => 'Html',\r
-               'tx_macinabanners_banners.bannertype' => 'Bannertyp',\r
-               'tx_macinabanners_banners.image' => 'Bannerbilddatei',\r
-               'tx_macinabanners_banners.maxw' => 'maximale Breite',\r
-               'tx_macinabanners_banners.alttext' => 'Bildtext',\r
-               'tx_macinabanners_banners.url' => 'Link',\r
-               'tx_macinabanners_banners.swf' => 'Flashbanner',\r
-               'tx_macinabanners_banners.flash_width' => 'Breite des Flashfilms',\r
-               'tx_macinabanners_banners.flash_height' => 'H�he des Flashfilms',\r
-               'tx_macinabanners_banners.placement.I.0' => 'oben',\r
-               'tx_macinabanners_banners.placement.I.1' => 'rechts',\r
-               'tx_macinabanners_banners.placement.I.2' => 'unten',\r
-               'tx_macinabanners_banners.placement.I.3' => 'links',\r
-               'tx_macinabanners_banners.placement' => 'Positionierug',\r
-               'tx_macinabanners_banners.border_top' => 'oberer Rand',\r
-               'tx_macinabanners_banners.border_right' => 'rechter Rand',\r
-               'tx_macinabanners_banners.border_bottom' => 'unterer Rand',\r
-               'tx_macinabanners_banners.border_left' => 'linker Rand',\r
-               'tx_macinabanners_banners.pages' => 'zeige Banner NUR auf diesen Seiten',\r
-               'tx_macinabanners_banners.recursiv' => 'inclusive Unterseiten',\r
-               'tx_macinabanners_banners.excludepages' => 'zeige Banner NICHT auf diesen Seiten',\r
-               'tx_macinabanners_banners.impressions' => 'Darstellungen',\r
-               'tx_macinabanners_banners.clicks' => 'Anzahl von Clicks',\r
-               'tx_macinabanners_banners_parameters' => 'Parameter',    \r
-               'tt_content.list_type_pi1' => 'Bannermodul',\r
-               'tx_macinabanners_banners.sys_language_uid' => 'Sprache des Banners',\r
-               'tx_macinabanners_banners.sys_language_independent' => 'Sprachunabh�ngig (obige Auswahl wird ignoriert!)',\r
-               'tx_macinabanners_banners.general' => 'Grundeinstellungen',\r
-               'tx_macinabanners_banners.bannerimage' => 'Bannergrafik',\r
-               'tx_macinabanners_banners.flashfilm' => 'Flashfilm',\r
-               'tx_macinabanners_banners.html' => 'HTML',\r
-               'tx_macinabanners_banners.view' => 'Anzeige',\r
-               'tx_macinabanners_banners.visibility' => 'Sichtbarkeit',\r
-               'tx_macinabanners_banners.statistics' => 'Statistik',\r
-               \r
-               'tx_macinabanners_categories' => 'Banner Kategorie',    \r
-               'tx_macinabanners_categories.description' => 'Beschreibung',            \r
-               'tx_macinabanners_categories.icon' => 'Icon',\r
-       ),\r
-       'no' => Array (\r
-               'tt_content.tx_macinabanners_placement.I.0' => 'topp',\r
-               'tt_content.tx_macinabanners_placement.I.1' => 'h�yre',\r
-               'tt_content.tx_macinabanners_placement.I.2' => 'bunn',\r
-               'tt_content.tx_macinabanners_placement.I.3' => 'venstre',\r
-               'tt_content.tx_macinabanners_placement' => 'Plassering',\r
-               'tt_content.tx_macinabanners_mode.I.0' => 'Vis alle tilknyttede bannere',\r
-               'tt_content.tx_macinabanners_mode.I.1' => 'Vis tilfeldig banner blant de tilknyttede',\r
-               'tt_content.tx_macinabanners_mode' => 'Modus',\r
-               'tx_macinabanners_banners' => 'Banner',\r
-               'tx_macinabanners_banners.customer' => 'Kunde',\r
-               'tx_macinabanners_banners.bannertype.I.0' => 'grafikk/bilde',\r
-               'tx_macinabanners_banners.bannertype.I.1' => 'Flash-fil (.swf)',\r
-               'tx_macinabanners_banners.bannertype.I.2' => 'html',\r
-               'tx_macinabanners_banners.bannertype' => 'Type banner',\r
-               'tx_macinabanners_banners.image' => 'Bilde',\r
-               'tx_macinabanners_banners.maxw' => 'Max. bredde',\r
-               'tx_macinabanners_banners.alttext' => 'Bildetekst',\r
-               'tx_macinabanners_banners.url' => 'Lenke',\r
-               'tx_macinabanners_banners.swf' => 'Flash-banner',\r
-               'tx_macinabanners_banners.flash_width' => 'Bredde p� Flash-filmen',\r
-               'tx_macinabanners_banners.flash_height' => 'H�yde p� Flash-filmen',\r
-               'tx_macinabanners_banners.placement.I.0' => 'top',\r
-               'tx_macinabanners_banners.placement.I.1' => 'h�yre',\r
-               'tx_macinabanners_banners.placement.I.2' => 'bunn',\r
-               'tx_macinabanners_banners.placement.I.3' => 'venstre',\r
-               'tx_macinabanners_banners.placement' => 'Plassering',\r
-               'tx_macinabanners_banners.border_top' => 'Luft over',\r
-               'tx_macinabanners_banners.border_right' => 'Luft til h�yre',\r
-               'tx_macinabanners_banners.border_bottom' => 'Luft under',\r
-               'tx_macinabanners_banners.border_left' => 'Luft til venstre',\r
-               'tx_macinabanners_banners.pages' => 'Vis banneret p� disse sidene',\r
-               'tx_macinabanners_banners.impressions' => 'Antall visninger',\r
-               'tx_macinabanners_banners.clicks' => 'Antall klikk',\r
-               'tt_content.list_type_pi1' => 'Reklamemodul',\r
-       ),\r
-       'it' => Array (\r
-       ),\r
-       'fr' => Array (\r
-       ),\r
-       'es' => Array (\r
-               'tt_content.tx_macinabanners_placement.I.0' => 'Superior',\r
-               'tt_content.tx_macinabanners_placement.I.1' => 'Derecha',\r
-               'tt_content.tx_macinabanners_placement.I.2' => 'Inferior',\r
-               'tt_content.tx_macinabanners_placement.I.3' => 'Izquierda',\r
-               'tt_content.tx_macinabanners_placement' => 'Posici�n',\r
-               'tt_content.tx_macinabanners_mode.I.0' => 'Mostrar todos los banners',\r
-               'tt_content.tx_macinabanners_mode.I.1' => 'Mostrar un banner de manera aleatoria',\r
-               'tt_content.tx_macinabanners_mode' => 'Modo',\r
-               'tx_macinabanners_banners' => 'Banner',\r
-               'tx_macinabanners_banners.customer' => 'Cliente',\r
-               'tx_macinabanners_banners.bannertype.I.0' => 'Imagen (.jpg,.gif,.png,etc)',\r
-               'tx_macinabanners_banners.bannertype.I.1' => 'Macromedia Flash (.swf)',\r
-               'tx_macinabanners_banners.bannertype.I.2' => 'html',\r
-               'tx_macinabanners_banners.bannertype' => 'Tipo de banner',\r
-               'tx_macinabanners_banners.image' => 'Imagen del banner',\r
-               'tx_macinabanners_banners.maxw' => 'Ancho m�ximo',\r
-               'tx_macinabanners_banners.alttext' => 'Texto asociado',\r
-               'tx_macinabanners_banners.url' => 'Enlace',\r
-               'tx_macinabanners_banners.swf' => 'Pel�cula Flash',\r
-               'tx_macinabanners_banners.flash_width' => 'Ancho',\r
-               'tx_macinabanners_banners.flash_height' => 'Alto',\r
-               'tx_macinabanners_banners.placement.I.0' => 'Superior',\r
-               'tx_macinabanners_banners.placement.I.1' => 'Derecha',\r
-               'tx_macinabanners_banners.placement.I.2' => 'Inferior',\r
-               'tx_macinabanners_banners.placement.I.3' => 'Izquierda',\r
-               'tx_macinabanners_banners.placement' => 'Posici�n',\r
-               'tx_macinabanners_banners.border_top' => 'Borde superior',\r
-               'tx_macinabanners_banners.border_right' => 'Borde derecho',\r
-               'tx_macinabanners_banners.border_bottom' => 'Borde inferior',\r
-               'tx_macinabanners_banners.border_left' => 'Borde izquierdo',\r
-               'tx_macinabanners_banners.pages' => 'Mostrar banner SOLO en las siguientes p�ginas',\r
-               'tx_macinabanners_banners.recursiv' => 'Incluir subp�ginas',\r
-               'tx_macinabanners_banners.excludepages' => 'NO mostrar este banner en las siguientes paginas',\r
-               'tx_macinabanners_banners.impressions' => 'Impresiones',\r
-               'tx_macinabanners_banners.clicks' => 'N�mero de Clics',\r
-               'tt_content.list_type_pi1' => 'M�dulo de banners',\r
-               'tx_macinabanners_banners.sys_language_uid' => 'Idioma del banner',\r
-               'tx_macinabanners_banners.sys_language_independent' => 'Independiente del idioma (ignorar los idiomas)',\r
-               'tx_macinabanners_banners.general' => 'General',\r
-               'tx_macinabanners_banners.bannerimage' => 'Im�genes del banner',\r
-               'tx_macinabanners_banners.flashfilm' => 'Pel�culas Flash',\r
-               'tx_macinabanners_banners.html' => 'HTML',\r
-               'tx_macinabanners_banners.view' => 'Ver',\r
-               'tx_macinabanners_banners.visibility' => 'Visibilidad',\r
-               'tx_macinabanners_banners.statistics' => 'Estadisticas',\r
-       ),\r
-       'nl' => Array (\r
-       ),\r
-       'cz' => Array (\r
-       ),\r
-       'pl' => Array (\r
-       ),\r
-       'si' => Array (\r
-       ),\r
-       'fi' => Array (\r
-               'tt_content.tx_macinabanners_placement.I.0' => 'yl�s',\r
-               'tt_content.tx_macinabanners_placement.I.1' => 'oikealle',\r
-               'tt_content.tx_macinabanners_placement.I.2' => 'alas',\r
-               'tt_content.tx_macinabanners_placement.I.3' => 'vasemmalle',\r
-               'tt_content.tx_macinabanners_placement' => 'Sijainti',\r
-               'tt_content.tx_macinabanners_mode.I.0' => 'n�yt� kaikki liitetyt mainospalkit',\r
-               'tt_content.tx_macinabanners_mode.I.1' => 'n�yt� satunnaisesti liitetyist� mainospalkeista',\r
-               'tt_content.tx_macinabanners_mode' => 'Moodi',\r
-               'tx_macinabanners_banners' => 'Mainospalkki',\r
-               'tx_macinabanners_banners.customer' => 'Asiakas',\r
-               'tx_macinabanners_banners.bannertype.I.0' => 'kuva',\r
-               'tx_macinabanners_banners.bannertype.I.1' => 'flash (.swf)',\r
-               'tx_macinabanners_banners.bannertype.I.2' => 'html',\r
-               'tx_macinabanners_banners.bannertype' => 'Mainospalkin tyyppi',\r
-               'tx_macinabanners_banners.image' => 'Mainospalkin kuva',\r
-               'tx_macinabanners_banners.maxw' => 'maksimi leveys',\r
-               'tx_macinabanners_banners.alttext' => 'Kuvan teksti',\r
-               'tx_macinabanners_banners.url' => 'Linkki',\r
-               'tx_macinabanners_banners.swf' => 'flash mainospalkki',\r
-               'tx_macinabanners_banners.flash_width' => 'flash elokuvan leveys',\r
-               'tx_macinabanners_banners.flash_height' => 'flash elokuvan koskeus',\r
-               'tx_macinabanners_banners.placement.I.0' => 'yl�s',\r
-               'tx_macinabanners_banners.placement.I.1' => 'oikealle',\r
-               'tx_macinabanners_banners.placement.I.2' => 'alas',\r
-               'tx_macinabanners_banners.placement.I.3' => 'vasemmalle',\r
-               'tx_macinabanners_banners.placement' => 'Sijainto',\r
-               'tx_macinabanners_banners.border_top' => 'yl� raja',\r
-               'tx_macinabanners_banners.border_right' => 'oikea raja',\r
-               'tx_macinabanners_banners.border_bottom' => 'ala raja',\r
-               'tx_macinabanners_banners.border_left' => 'vasen raja',\r
-               'tx_macinabanners_banners.pages' => 'N�yt� mainospalkki n�ill� sivuilla',\r
-               'tx_macinabanners_banners.recursiv' => 'mukaan lukien alasivut',\r
-               'tx_macinabanners_banners.excludepages' => '�L� n�yt� mainospallkkia T�LL� sivulla',\r
-               'tx_macinabanners_banners.impressions' => 'Vaikutelmat',\r
-               'tx_macinabanners_banners.clicks' => 'Valintalaskuri',\r
-               'tt_content.list_type_pi1' => 'Mainospalkki aliohjelma',\r
-               'tx_macinabanners_banners.sys_language_uid' => 'Mainospalkin kieli',\r
-               'tx_macinabanners_banners.sys_language_independent' => 'Kielest� riippumaton (yll� valittu kieli ohitetaan!)',\r
-               'tx_macinabanners_banners.general' => 'Yleist�',\r
-               'tx_macinabanners_banners.bannerimage' => 'Mainospalkin kuva',\r
-               'tx_macinabanners_banners.flashfilm' => 'Flashtiedosto',\r
-               'tx_macinabanners_banners.html' => 'HTML',\r
-               'tx_macinabanners_banners.view' => 'N�yt�',\r
-               'tx_macinabanners_banners.visibility' => 'N�kyvyys',\r
-               'tx_macinabanners_banners.statistics' => 'Tilastot',\r
-       ),\r
-       'tr' => Array (\r
-       ),\r
-       'se' => Array (\r
-       ),\r
-       'pt' => Array (\r
-       ),\r
-       'ru' => Array (\r
-       ),\r
-       'ro' => Array (\r
-       ),\r
-       'ch' => Array (\r
-       ),\r
-       'sk' => Array (\r
-       ),\r
-       'lt' => Array (\r
-       ),\r
-       'is' => Array (\r
-       ),\r
-       'hr' => Array (\r
-               'tt_content.tx_macinabanners_placement.I.0' => 'vrh',\r
-               'tt_content.tx_macinabanners_placement.I.1' => 'desno',\r
-               'tt_content.tx_macinabanners_placement.I.2' => 'dno',\r
-               'tt_content.tx_macinabanners_placement.I.3' => 'lijevo',\r
-               'tt_content.tx_macinabanners_placement' => 'Mjesto',\r
-               'tt_content.tx_macinabanners_mode.I.0' => 'prika�i sve prilo�ene bannere',\r
-               'tt_content.tx_macinabanners_mode.I.1' => 'prika�i nasumi�no prilo�ene bannere',\r
-               'tt_content.tx_macinabanners_mode' => 'Mod',\r
-               'tx_macinabanners_banners' => 'Banner',\r
-               'tx_macinabanners_banners.customer' => 'Klijent',\r
-               'tx_macinabanners_banners.bannertype.I.0' => 'slika',\r
-               'tx_macinabanners_banners.bannertype.I.1' => 'flash (.swf)',\r
-               'tx_macinabanners_banners.bannertype.I.2' => 'html',\r
-               'tx_macinabanners_banners.bannertype' => 'Tip bannera',\r
-               'tx_macinabanners_banners.image' => 'Slika za banner',\r
-               'tx_macinabanners_banners.maxw' => 'maksimalna �irina',\r
-               'tx_macinabanners_banners.alttext' => 'Tekst za sliku',\r
-               'tx_macinabanners_banners.url' => 'Link',\r
-               'tx_macinabanners_banners.swf' => 'flashbanner',\r
-               'tx_macinabanners_banners.flash_width' => '�irina flasha',\r
-               'tx_macinabanners_banners.flash_height' => 'visina flasha',\r
-               'tx_macinabanners_banners.placement.I.0' => 'vrh',\r
-               'tx_macinabanners_banners.placement.I.1' => 'desno',\r
-               'tx_macinabanners_banners.placement.I.2' => 'dno',\r
-               'tx_macinabanners_banners.placement.I.3' => 'lijevo',\r
-               'tx_macinabanners_banners.placement' => 'Mjesto',\r
-               'tx_macinabanners_banners.border_top' => 'okvir na vrhu',\r
-               'tx_macinabanners_banners.border_right' => 'okvir desno',\r
-               'tx_macinabanners_banners.border_bottom' => 'odvir dno',\r
-               'tx_macinabanners_banners.border_left' => 'okvir lijevo',\r
-               'tx_macinabanners_banners.pages' => 'Prika�i banner na stranicama:',\r
-               'tx_macinabanners_banners.impressions' => 'Prikazivanja',\r
-               'tx_macinabanners_banners.clicks' => 'Broj likovi',\r
-               'tt_content.list_type_pi1' => 'Banner modul',\r
-       ),\r
-       'hu' => Array (\r
-       ),\r
-       'gl' => Array (\r
-       ),\r
-       'th' => Array (\r
-       ),\r
-       'gr' => Array (\r
-       ),\r
-       'hk' => Array (\r
-       ),\r
-       'eu' => Array (\r
-       ),\r
-       'bg' => Array (\r
-       ),\r
-       'br' => Array (\r
-       ),\r
-       'et' => Array (\r
-       ),\r
-       'ar' => Array (\r
-       ),\r
-       'he' => Array (\r
-       ),\r
-       'ua' => Array (\r
-       ),\r
-       'lv' => Array (\r
-       ),\r
-       'jp' => Array (\r
-       ),\r
-       'vn' => Array (\r
-       ),\r
-       'ca' => Array (\r
-       ),\r
-       'ba' => Array (\r
-       ),\r
-       'kr' => Array (\r
-       ),\r
-       'eo' => Array (\r
-       ),\r
-       'my' => Array (\r
-       ),\r
-       'hi' => Array (\r
-       ),\r
-);\r
-?>\r
+<?php
+/**
+ * Language labels for database tables/fields belonging to extension "macina_banners"
+ * 
+ * This file is detected by the translation tool.
+ */
+
+$LOCAL_LANG = Array (
+       'default' => Array (
+               'tt_content.tx_macinabanners_placement.I.0' => 'top',
+               'tt_content.tx_macinabanners_placement.I.1' => 'right',
+               'tt_content.tx_macinabanners_placement.I.2' => 'bottom',
+               'tt_content.tx_macinabanners_placement.I.3' => 'left',
+               'tt_content.tx_macinabanners_placement' => 'Placement',
+               'tt_content.tx_macinabanners_mode.I.0' => 'show all attached banner',
+               'tt_content.tx_macinabanners_mode.I.1' => 'show random from attached banners',
+               //medialights: add "all banners randomized" mode
+               'tt_content.tx_macinabanners_mode.I.2' => 'show all banners randomized',
+               'tt_content.tx_macinabanners_mode' => 'Mode',
+               'tx_macinabanners_banners' => 'Banner',
+               'tx_macinabanners_banners.customer' => 'Customer',
+               'tx_macinabanners_banners.bannertype.I.0' => 'image',
+               'tx_macinabanners_banners.bannertype.I.1' => 'flash (.swf)',
+               'tx_macinabanners_banners.bannertype.I.2' => 'html',
+               'tx_macinabanners_banners.bannertype' => 'Bannertype',
+               'tx_macinabanners_banners.image' => 'Bannerimage',
+               'tx_macinabanners_banners.maxw' => 'maximum width',
+               'tx_macinabanners_banners.alttext' => 'Image Text',
+               'tx_macinabanners_banners.url' => 'Link',
+               'tx_macinabanners_banners.swf' => 'flashbanner',
+               'tx_macinabanners_banners.flash_width' => 'width of flashmovie',
+               'tx_macinabanners_banners.flash_height' => 'height of flashmovie',
+               'tx_macinabanners_banners.placement.I.0' => 'top',
+               'tx_macinabanners_banners.placement.I.1' => 'right',
+               'tx_macinabanners_banners.placement.I.2' => 'bottom',
+               'tx_macinabanners_banners.placement.I.3' => 'left',
+               'tx_macinabanners_banners.placement' => 'Placement',
+               'tx_macinabanners_banners.border_top' => 'top Border',
+               'tx_macinabanners_banners.border_right' => 'right Border',
+               'tx_macinabanners_banners.border_bottom' => 'bottom Border',
+               'tx_macinabanners_banners.border_left' => 'left Border',
+               'tx_macinabanners_banners.pages' => 'Show Banner on this Pages ONLY',
+               'tx_macinabanners_banners.recursiv' => 'including Subpages',
+               'tx_macinabanners_banners.excludepages' => 'DONT show Banner on THIS Pages',
+               'tx_macinabanners_banners.impressions' => 'Impressions',
+               'tx_macinabanners_banners.clicks' => 'Clickcount',
+               'tx_macinabanners_banners.parameters' => 'Parameters',
+               'tt_content.list_type_pi1' => 'Bannermodule',
+               'tx_macinabanners_banners.sys_language_uid' => 'Banner language',
+               'tx_macinabanners_banners.sys_language_independent' => 'Language independent (above seleceted language is ignored!)',
+               'tx_macinabanners_banners.general' => 'General',
+               'tx_macinabanners_banners.bannerimage' => 'BannerImage',
+               'tx_macinabanners_banners.flashfilm' => 'Flashfile',
+               'tx_macinabanners_banners.html' => 'HTML',
+               'tx_macinabanners_banners.view' => 'View',
+               'tx_macinabanners_banners.visibility' => 'Visibility',
+               'tx_macinabanners_banners.statistics' => 'Statistics',
+               
+               'tx_macinabanners_categories' => 'Banner Category',    
+               'tx_macinabanners_categories.description' => 'Description',
+               'tx_macinabanners_categories.icon' => 'Icon',
+       ),
+       'dk' => Array (
+       ),
+       'de' => Array (
+               'tt_content.tx_macinabanners_placement.I.0' => 'oben',
+               'tt_content.tx_macinabanners_placement.I.1' => 'rechts',
+               'tt_content.tx_macinabanners_placement.I.2' => 'unten',
+               'tt_content.tx_macinabanners_placement.I.3' => 'links',
+               'tt_content.tx_macinabanners_placement' => 'Positionierug',
+               'tt_content.tx_macinabanners_mode.I.0' => 'alle dieser Seite angef�gten Banner zeigen',
+               'tt_content.tx_macinabanners_mode.I.1' => 'zuf�llig einen der angef�gten Banner zeigen',
+               'tt_content.tx_macinabanners_mode.I.2' => 'alle Banner in zuf�lliger Reihenfolge zeigen',
+               'tt_content.tx_macinabanners_mode' => 'Anzeigemodus',
+               'tx_macinabanners_banners' => 'Banner',
+               'tx_macinabanners_banners.customer' => 'Beschreibung',
+               'tx_macinabanners_banners.bannertype.I.0' => 'Bild',
+               'tx_macinabanners_banners.bannertype.I.1' => 'Flash (.swf)',
+               'tx_macinabanners_banners.bannertype.I.2' => 'Html',
+               'tx_macinabanners_banners.bannertype' => 'Bannertyp',
+               'tx_macinabanners_banners.image' => 'Bannerbilddatei',
+               'tx_macinabanners_banners.maxw' => 'maximale Breite',
+               'tx_macinabanners_banners.alttext' => 'Bildtext',
+               'tx_macinabanners_banners.url' => 'Link',
+               'tx_macinabanners_banners.swf' => 'Flashbanner',
+               'tx_macinabanners_banners.flash_width' => 'Breite des Flashfilms',
+               'tx_macinabanners_banners.flash_height' => 'H�he des Flashfilms',
+               'tx_macinabanners_banners.placement.I.0' => 'oben',
+               'tx_macinabanners_banners.placement.I.1' => 'rechts',
+               'tx_macinabanners_banners.placement.I.2' => 'unten',
+               'tx_macinabanners_banners.placement.I.3' => 'links',
+               'tx_macinabanners_banners.placement' => 'Positionierug',
+               'tx_macinabanners_banners.border_top' => 'oberer Rand',
+               'tx_macinabanners_banners.border_right' => 'rechter Rand',
+               'tx_macinabanners_banners.border_bottom' => 'unterer Rand',
+               'tx_macinabanners_banners.border_left' => 'linker Rand',
+               'tx_macinabanners_banners.pages' => 'zeige Banner NUR auf diesen Seiten',
+               'tx_macinabanners_banners.recursiv' => 'inclusive Unterseiten',
+               'tx_macinabanners_banners.excludepages' => 'zeige Banner NICHT auf diesen Seiten',
+               'tx_macinabanners_banners.impressions' => 'Darstellungen',
+               'tx_macinabanners_banners.clicks' => 'Anzahl von Clicks',
+               'tx_macinabanners_banners_parameters' => 'Parameter',    
+               'tt_content.list_type_pi1' => 'Bannermodul',
+               'tx_macinabanners_banners.sys_language_uid' => 'Sprache des Banners',
+               'tx_macinabanners_banners.sys_language_independent' => 'Sprachunabh�ngig (obige Auswahl wird ignoriert!)',
+               'tx_macinabanners_banners.general' => 'Grundeinstellungen',
+               'tx_macinabanners_banners.bannerimage' => 'Bannergrafik',
+               'tx_macinabanners_banners.flashfilm' => 'Flashfilm',
+               'tx_macinabanners_banners.html' => 'HTML',
+               'tx_macinabanners_banners.view' => 'Anzeige',
+               'tx_macinabanners_banners.visibility' => 'Sichtbarkeit',
+               'tx_macinabanners_banners.statistics' => 'Statistik',
+               
+               'tx_macinabanners_categories' => 'Banner Kategorie',    
+               'tx_macinabanners_categories.description' => 'Beschreibung',            
+               'tx_macinabanners_categories.icon' => 'Icon',
+       ),
+       'no' => Array (
+               'tt_content.tx_macinabanners_placement.I.0' => 'topp',
+               'tt_content.tx_macinabanners_placement.I.1' => 'h�yre',
+               'tt_content.tx_macinabanners_placement.I.2' => 'bunn',
+               'tt_content.tx_macinabanners_placement.I.3' => 'venstre',
+               'tt_content.tx_macinabanners_placement' => 'Plassering',
+               'tt_content.tx_macinabanners_mode.I.0' => 'Vis alle tilknyttede bannere',
+               'tt_content.tx_macinabanners_mode.I.1' => 'Vis tilfeldig banner blant de tilknyttede',
+               'tt_content.tx_macinabanners_mode' => 'Modus',
+               'tx_macinabanners_banners' => 'Banner',
+               'tx_macinabanners_banners.customer' => 'Kunde',
+               'tx_macinabanners_banners.bannertype.I.0' => 'grafikk/bilde',
+               'tx_macinabanners_banners.bannertype.I.1' => 'Flash-fil (.swf)',
+               'tx_macinabanners_banners.bannertype.I.2' => 'html',
+               'tx_macinabanners_banners.bannertype' => 'Type banner',
+               'tx_macinabanners_banners.image' => 'Bilde',
+               'tx_macinabanners_banners.maxw' => 'Max. bredde',
+               'tx_macinabanners_banners.alttext' => 'Bildetekst',
+               'tx_macinabanners_banners.url' => 'Lenke',
+               'tx_macinabanners_banners.swf' => 'Flash-banner',
+               'tx_macinabanners_banners.flash_width' => 'Bredde p� Flash-filmen',
+               'tx_macinabanners_banners.flash_height' => 'H�yde p� Flash-filmen',
+               'tx_macinabanners_banners.placement.I.0' => 'top',
+               'tx_macinabanners_banners.placement.I.1' => 'h�yre',
+               'tx_macinabanners_banners.placement.I.2' => 'bunn',
+               'tx_macinabanners_banners.placement.I.3' => 'venstre',
+               'tx_macinabanners_banners.placement' => 'Plassering',
+               'tx_macinabanners_banners.border_top' => 'Luft over',
+               'tx_macinabanners_banners.border_right' => 'Luft til h�yre',
+               'tx_macinabanners_banners.border_bottom' => 'Luft under',
+               'tx_macinabanners_banners.border_left' => 'Luft til venstre',
+               'tx_macinabanners_banners.pages' => 'Vis banneret p� disse sidene',
+               'tx_macinabanners_banners.impressions' => 'Antall visninger',
+               'tx_macinabanners_banners.clicks' => 'Antall klikk',
+               'tt_content.list_type_pi1' => 'Reklamemodul',
+       ),
+       'it' => Array (
+       ),
+       'fr' => Array (
+       ),
+       'es' => Array (
+               'tt_content.tx_macinabanners_placement.I.0' => 'Superior',
+               'tt_content.tx_macinabanners_placement.I.1' => 'Derecha',
+               'tt_content.tx_macinabanners_placement.I.2' => 'Inferior',
+               'tt_content.tx_macinabanners_placement.I.3' => 'Izquierda',
+               'tt_content.tx_macinabanners_placement' => 'Posici�n',
+               'tt_content.tx_macinabanners_mode.I.0' => 'Mostrar todos los banners',
+               'tt_content.tx_macinabanners_mode.I.1' => 'Mostrar un banner de manera aleatoria',
+               'tt_content.tx_macinabanners_mode' => 'Modo',
+               'tx_macinabanners_banners' => 'Banner',
+               'tx_macinabanners_banners.customer' => 'Cliente',
+               'tx_macinabanners_banners.bannertype.I.0' => 'Imagen (.jpg,.gif,.png,etc)',
+               'tx_macinabanners_banners.bannertype.I.1' => 'Macromedia Flash (.swf)',
+               'tx_macinabanners_banners.bannertype.I.2' => 'html',
+               'tx_macinabanners_banners.bannertype' => 'Tipo de banner',
+               'tx_macinabanners_banners.image' => 'Imagen del banner',
+               'tx_macinabanners_banners.maxw' => 'Ancho m�ximo',
+               'tx_macinabanners_banners.alttext' => 'Texto asociado',
+               'tx_macinabanners_banners.url' => 'Enlace',
+               'tx_macinabanners_banners.swf' => 'Pel�cula Flash',
+               'tx_macinabanners_banners.flash_width' => 'Ancho',
+               'tx_macinabanners_banners.flash_height' => 'Alto',
+               'tx_macinabanners_banners.placement.I.0' => 'Superior',
+               'tx_macinabanners_banners.placement.I.1' => 'Derecha',
+               'tx_macinabanners_banners.placement.I.2' => 'Inferior',
+               'tx_macinabanners_banners.placement.I.3' => 'Izquierda',
+               'tx_macinabanners_banners.placement' => 'Posici�n',
+               'tx_macinabanners_banners.border_top' => 'Borde superior',
+               'tx_macinabanners_banners.border_right' => 'Borde derecho',
+               'tx_macinabanners_banners.border_bottom' => 'Borde inferior',
+               'tx_macinabanners_banners.border_left' => 'Borde izquierdo',
+               'tx_macinabanners_banners.pages' => 'Mostrar banner SOLO en las siguientes p�ginas',
+               'tx_macinabanners_banners.recursiv' => 'Incluir subp�ginas',
+               'tx_macinabanners_banners.excludepages' => 'NO mostrar este banner en las siguientes paginas',
+               'tx_macinabanners_banners.impressions' => 'Impresiones',
+               'tx_macinabanners_banners.clicks' => 'N�mero de Clics',
+               'tt_content.list_type_pi1' => 'M�dulo de banners',
+               'tx_macinabanners_banners.sys_language_uid' => 'Idioma del banner',
+               'tx_macinabanners_banners.sys_language_independent' => 'Independiente del idioma (ignorar los idiomas)',
+               'tx_macinabanners_banners.general' => 'General',
+               'tx_macinabanners_banners.bannerimage' => 'Im�genes del banner',
+               'tx_macinabanners_banners.flashfilm' => 'Pel�culas Flash',
+               'tx_macinabanners_banners.html' => 'HTML',
+               'tx_macinabanners_banners.view' => 'Ver',
+               'tx_macinabanners_banners.visibility' => 'Visibilidad',
+               'tx_macinabanners_banners.statistics' => 'Estadisticas',
+       ),
+       'nl' => Array (
+       ),
+       'cz' => Array (
+       ),
+       'pl' => Array (
+       ),
+       'si' => Array (
+       ),
+       'fi' => Array (
+               'tt_content.tx_macinabanners_placement.I.0' => 'yl�s',
+               'tt_content.tx_macinabanners_placement.I.1' => 'oikealle',
+               'tt_content.tx_macinabanners_placement.I.2' => 'alas',
+               'tt_content.tx_macinabanners_placement.I.3' => 'vasemmalle',
+               'tt_content.tx_macinabanners_placement' => 'Sijainti',
+               'tt_content.tx_macinabanners_mode.I.0' => 'n�yt� kaikki liitetyt mainospalkit',
+               'tt_content.tx_macinabanners_mode.I.1' => 'n�yt� satunnaisesti liitetyist� mainospalkeista',
+               'tt_content.tx_macinabanners_mode' => 'Moodi',
+               'tx_macinabanners_banners' => 'Mainospalkki',
+               'tx_macinabanners_banners.customer' => 'Asiakas',
+               'tx_macinabanners_banners.bannertype.I.0' => 'kuva',
+               'tx_macinabanners_banners.bannertype.I.1' => 'flash (.swf)',
+               'tx_macinabanners_banners.bannertype.I.2' => 'html',
+               'tx_macinabanners_banners.bannertype' => 'Mainospalkin tyyppi',
+               'tx_macinabanners_banners.image' => 'Mainospalkin kuva',
+               'tx_macinabanners_banners.maxw' => 'maksimi leveys',
+               'tx_macinabanners_banners.alttext' => 'Kuvan teksti',
+               'tx_macinabanners_banners.url' => 'Linkki',
+               'tx_macinabanners_banners.swf' => 'flash mainospalkki',
+               'tx_macinabanners_banners.flash_width' => 'flash elokuvan leveys',
+               'tx_macinabanners_banners.flash_height' => 'flash elokuvan koskeus',
+               'tx_macinabanners_banners.placement.I.0' => 'yl�s',
+               'tx_macinabanners_banners.placement.I.1' => 'oikealle',
+               'tx_macinabanners_banners.placement.I.2' => 'alas',
+               'tx_macinabanners_banners.placement.I.3' => 'vasemmalle',
+               'tx_macinabanners_banners.placement' => 'Sijainto',
+               'tx_macinabanners_banners.border_top' => 'yl� raja',
+               'tx_macinabanners_banners.border_right' => 'oikea raja',
+               'tx_macinabanners_banners.border_bottom' => 'ala raja',
+               'tx_macinabanners_banners.border_left' => 'vasen raja',
+               'tx_macinabanners_banners.pages' => 'N�yt� mainospalkki n�ill� sivuilla',
+               'tx_macinabanners_banners.recursiv' => 'mukaan lukien alasivut',
+               'tx_macinabanners_banners.excludepages' => '�L� n�yt� mainospallkkia T�LL� sivulla',
+               'tx_macinabanners_banners.impressions' => 'Vaikutelmat',
+               'tx_macinabanners_banners.clicks' => 'Valintalaskuri',
+               'tt_content.list_type_pi1' => 'Mainospalkki aliohjelma',
+               'tx_macinabanners_banners.sys_language_uid' => 'Mainospalkin kieli',
+               'tx_macinabanners_banners.sys_language_independent' => 'Kielest� riippumaton (yll� valittu kieli ohitetaan!)',
+               'tx_macinabanners_banners.general' => 'Yleist�',
+               'tx_macinabanners_banners.bannerimage' => 'Mainospalkin kuva',
+               'tx_macinabanners_banners.flashfilm' => 'Flashtiedosto',
+               'tx_macinabanners_banners.html' => 'HTML',
+               'tx_macinabanners_banners.view' => 'N�yt�',
+               'tx_macinabanners_banners.visibility' => 'N�kyvyys',
+               'tx_macinabanners_banners.statistics' => 'Tilastot',
+       ),
+       'tr' => Array (
+       ),
+       'se' => Array (
+       ),
+       'pt' => Array (
+       ),
+       'ru' => Array (
+       ),
+       'ro' => Array (
+       ),
+       'ch' => Array (
+       ),
+       'sk' => Array (
+       ),
+       'lt' => Array (
+       ),
+       'is' => Array (
+       ),
+       'hr' => Array (
+               'tt_content.tx_macinabanners_placement.I.0' => 'vrh',
+               'tt_content.tx_macinabanners_placement.I.1' => 'desno',
+               'tt_content.tx_macinabanners_placement.I.2' => 'dno',
+               'tt_content.tx_macinabanners_placement.I.3' => 'lijevo',
+               'tt_content.tx_macinabanners_placement' => 'Mjesto',
+               'tt_content.tx_macinabanners_mode.I.0' => 'prika�i sve prilo�ene bannere',
+               'tt_content.tx_macinabanners_mode.I.1' => 'prika�i nasumi�no prilo�ene bannere',
+               'tt_content.tx_macinabanners_mode' => 'Mod',
+               'tx_macinabanners_banners' => 'Banner',
+               'tx_macinabanners_banners.customer' => 'Klijent',
+               'tx_macinabanners_banners.bannertype.I.0' => 'slika',
+               'tx_macinabanners_banners.bannertype.I.1' => 'flash (.swf)',
+               'tx_macinabanners_banners.bannertype.I.2' => 'html',
+               'tx_macinabanners_banners.bannertype' => 'Tip bannera',
+               'tx_macinabanners_banners.image' => 'Slika za banner',
+               'tx_macinabanners_banners.maxw' => 'maksimalna �irina',
+               'tx_macinabanners_banners.alttext' => 'Tekst za sliku',
+               'tx_macinabanners_banners.url' => 'Link',
+               'tx_macinabanners_banners.swf' => 'flashbanner',
+               'tx_macinabanners_banners.flash_width' => '�irina flasha',
+               'tx_macinabanners_banners.flash_height' => 'visina flasha',
+               'tx_macinabanners_banners.placement.I.0' => 'vrh',
+               'tx_macinabanners_banners.placement.I.1' => 'desno',
+               'tx_macinabanners_banners.placement.I.2' => 'dno',
+               'tx_macinabanners_banners.placement.I.3' => 'lijevo',
+               'tx_macinabanners_banners.placement' => 'Mjesto',
+               'tx_macinabanners_banners.border_top' => 'okvir na vrhu',
+               'tx_macinabanners_banners.border_right' => 'okvir desno',
+               'tx_macinabanners_banners.border_bottom' => 'odvir dno',
+               'tx_macinabanners_banners.border_left' => 'okvir lijevo',
+               'tx_macinabanners_banners.pages' => 'Prika�i banner na stranicama:',
+               'tx_macinabanners_banners.impressions' => 'Prikazivanja',
+               'tx_macinabanners_banners.clicks' => 'Broj likovi',
+               'tt_content.list_type_pi1' => 'Banner modul',
+       ),
+       'hu' => Array (
+       ),
+       'gl' => Array (
+       ),
+       'th' => Array (
+       ),
+       'gr' => Array (
+       ),
+       'hk' => Array (
+       ),
+       'eu' => Array (
+       ),
+       'bg' => Array (
+       ),
+       'br' => Array (
+       ),
+       'et' => Array (
+       ),
+       'ar' => Array (
+       ),
+       'he' => Array (
+       ),
+       'ua' => Array (
+       ),
+       'lv' => Array (
+       ),
+       'jp' => Array (
+       ),
+       'vn' => Array (
+       ),
+       'ca' => Array (
+       ),
+       'ba' => Array (
+       ),
+       'kr' => Array (
+       ),
+       'eo' => Array (
+       ),
+       'my' => Array (
+       ),
+       'hi' => Array (
+       ),
+);
+?>
old mode 100644 (file)
new mode 100755 (executable)
index e3aa977..e00a293
-<?php\r
-/***************************************************************\r
- *  Copyright notice\r
- *\r
- *  (c) 2003 Wolfgang Becker (wb@macina.com)\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
- *\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
- * Plugin 'Bannermodule' for the 'macina_banners' extension.\r
- *\r
- * @author Wolfgang Becker <wb@macina.com>\r
- */\r
-require_once(PATH_tslib . 'class.tslib_pibase.php');\r
-\r
-/**\r
- * Class for creating a banner extension\r
- *\r
- * @author     Wolfgang <wb@macina.com>\r
- * @package TYPO3\r
- * @subpackage tx_macinabanners\r
- */\r
-class tx_macinabanners_pi1 extends tslib_pibase {\r
-\r
-       var $prefixId = 'tx_macinabanners_pi1'; // Same as class name\r
-       var $scriptRelPath = 'pi1/class.tx_macinabanners_pi1.php'; // Path to this script relative to the extension dir.\r
-       var $extKey = 'macina_banners'; // The extension key.\r
-       var $siteRelPath;\r
-\r
-       /**\r
-        * main function invoked by index.php\r
-        *\r
-        * @param       string          $content: main variable carriing the content\r
-        * @param       array           $conf: config array from typoscript\r
-        * @return      string          html content\r
-        */\r
-       function main($content, $conf) {\r
-               global $TYPO3_DB;\r
-               $this->pi_USER_INT_obj=1;\r
-\r
-               // forwareder\r
-               if ($this->piVars['banneruid']){\r
-                       $this->conf = $conf;\r
-                       $this->pi_setPiVarDefaults();\r
-                       $this->pi_loadLL();\r
-\r
-                       // get link details\r
-                       $record = $this->pi_getRecord('tx_macinabanners_banners',$this->piVars['banneruid'],$checkPage=0);\r
-\r
-                       if ($record != false) {\r
-                               // update clicks\r
-                               $TYPO3_DB->exec_UPDATEquery(\r
-                                       'tx_macinabanners_banners',\r
-                                       'uid='.$TYPO3_DB->fullQuoteStr($record['uid'], 'tx_macinabanners_banners'),\r
-                                       array('clicks' => ++$record['clicks'])\r
-                               );\r
-\r
-                               // get URL\r
-                               unset ($this->piVars['banneruid']);\r
-                               header('Location: ' . $this->cObj->getTypoLink_URL($record['url']));\r
-                               exit;\r
-                       }\r
-               }\r
-\r
-               $this->pi_USER_INT_obj = 1; // Any link to yourself won't expect to be cached (no cHash and no_cache=1)\r
-\r
-               switch ((string)$conf['CMD']) {\r
-                       case 'singleView':\r
-                               list($t) = explode(':', $this->cObj->currentRecord);\r
-\r
-                               $this->internal['currentTable'] = $t;\r
-                               $this->internal['currentRow'] = $this->cObj->data;\r
-                               $content = $this->singleView($content, $conf);\r
-\r
-                               return $content;\r
-                       break;\r
-                       default:\r
-\r
-                               if (strstr($this->cObj->currentRecord, 'tt_content')) {\r
-                                       $conf['pidList'] = $this->cObj->data['pages'];\r
-                                       $conf['recursive'] = $this->cObj->data['recursive'];\r
-                                       $conf['placement'] = $this->cObj->data['tx_macinabanners_placement'];\r
-                                       $conf['mode'] = $this->cObj->data['tx_macinabanners_mode'];\r
-                               }\r
-                               /* medialights: didn't work with deactivated caching in 'ext_localconf.php -> addPItoST43'*/\r
-                               //PRS+ 12.08.2005\r
-                               if ($conf['mode'] == 'random' || $conf['mode'] == 'random_all' || $conf['enableParameterRestriction'] == 1)\r
-                               {\r
-                                       $substKey = 'INT_SCRIPT.'.$GLOBALS['TSFE']->uniqueHash();\r
-                                       $link='<!--'.$substKey.'-->';\r
-                                       $conf['userFunc'] = 'tx_macinabanners_pi1->listView';\r
-                                       $GLOBALS['TSFE']->config['INTincScript'][$substKey] = array(\r
-                                               'conf'=>$conf,\r
-                                               'cObj'=>serialize($this->cObj),\r
-                                               'type'=>'FUNC',\r
-                                       );\r
-                                       return $link;\r
-                               } else {\r
-                                       return $this->listView($content, $conf);\r
-                               }\r
-                               //PRS- 12.08.2005\r
-\r
-                               return $this->listView($content, $conf);\r
-                       break;\r
-               }\r
-       }\r
-\r
-       /***************************\r
-        *\r
-        * listfunktions\r
-        *\r
-        **************************/\r
-\r
-       /**\r
-        * main function for output of the listview and the singleview\r
-        *\r
-        * @param       string          $content: main variable carriing the content\r
-        * @param       array           $conf: config array from typoscript\r
-        * @return      string          html content\r
-        */\r
-       function listView($content, $conf) {\r
-               global $TYPO3_DB;\r
-\r
-               $this->conf = $conf; // Setting the TypoScript passed to this function in $this->conf\r
-\r
-               $this->pi_setPiVarDefaults();\r
-               $this->pi_loadLL();     // Loading the LOCAL_LANG values\r
-\r
-\r
-               $this->siteRelPath = $GLOBALS['TYPO3_LOADED_EXT'][$this->extKey]['siteRelPath'];\r
-\r
-               // order by\r
-               $orderby = 'sorting';\r
-\r
-               // passende sprache oder sprachunabhaengig\r
-               $where .= '(sys_language_uid= ' . $GLOBALS['TSFE']->sys_language_uid . ' OR sys_language_uid = -1)';\r
-\r
-               // enable fields\r
-               $where .= $this->cObj->enableFields('tx_macinabanners_banners');\r
-\r
-               // nur banner mit dem richtigen placement (left right top bottom) holen\r
-               $allowedPlacements = t3lib_div::trimExplode(',',$conf['placement']);\r
-               if (count($allowedPlacements) > 0) {\r
-                       $placementClause = '';\r
-                       foreach ($allowedPlacements AS $placement) {\r
-                               if ($placementClause != '') {\r
-                                       $placementClause .= ' OR ';\r
-                               }\r
-\r
-                               $placementClause .= 'placement LIKE \'%'.$placement.'%\'';\r
-                       }\r
-                       $where .= ' AND ('.$placementClause.')';\r
-               }\r
-\r
-               // alle banner die die aktuelle page id nicht in  excludepages stehen haben\r
-               $where .= "AND NOT ( excludepages regexp '[[:<:]]".$GLOBALS['TSFE']->id."[[:>:]]' )";\r
-\r
-               // FIX pidList beachten !! Fuer Version 1.5.2\r
-               if (!empty($conf['pidList'])) {\r
-                       $where .= ' AND pid IN ( '.$conf['pidList'].' ) ';\r
-               }\r
-\r
-               //medialights\r
-               $queryPerformed = true;\r
-               //Prepare and execute listing query\r
-               if (isset($conf['enableParameterRestriction']) && !empty($conf['enableParameterRestriction'])) {\r
-                       //show only banners that match to the selected options\r
-                       $parameters = array();\r
-\r
-                       //get banners list according to parameters\r
-                       $RS = $TYPO3_DB->exec_SELECTquery('uid, parameters', 'tx_macinabanners_banners', '');\r
-                       while ($row = $TYPO3_DB->sql_fetch_assoc($RS)) {\r
-                               if (!empty($row['parameters'])) {\r
-                                       $lines = t3lib_div::trimExplode(chr(10), $row['parameters']);\r
-                                       foreach ($lines AS $line) {\r
-                                               list($parameterName, $details) = t3lib_div::trimExplode('=', $line);\r
-                                               $values = t3lib_div::trimExplode(",", $details);\r
-\r
-                                               foreach ($values AS $value) {\r
-                                                       if (isset($parameters[$parameterName][$value])) {\r
-                                                               $parameters[$parameterName][$value] .= ',' . $row['uid'];\r
-                                                       } else { $parameters[$parameterName][$value] = $row['uid']; }\r
-                                               }\r
-                                       }\r
-                               }\r
-                       }\r
-\r
-                       //get parameters\r
-                       $currentParameters = t3lib_div::_GET() + t3lib_div::_POST();\r
-\r
-                       $ids = '';\r
-                       foreach ($currentParameters as $parameter => $value) {\r
-                               if (!empty($value) && isset($parameters[$parameter][$value])) {\r
-                                       if ($ids != '') { $ids .= ','; }\r
-                                       $ids .= $parameters[$parameter][$value];\r
-                               }\r
-                       }\r
-\r
-                       if ($ids != '') {\r
-                               $res = $TYPO3_DB->exec_SELECTquery('*', 'tx_macinabanners_banners', 'uid IN ('.$ids.')');\r
-                       } else $queryPerformed = false;\r
-\r
-               } else {\r
-                       //show all banners\r
-                       $res = $TYPO3_DB->exec_SELECTquery('*', 'tx_macinabanners_banners', $where, '', $orderby);\r
-               }\r
-\r
-               // for caching\r
-               $parentArr = array();\r
-\r
-               // banner aussortieren\r
-               $bannerdata = array();\r
-               while ($queryPerformed && $row = $TYPO3_DB->sql_fetch_assoc($res)) {\r
-\r
-                       if ($row['pages'] && $row['recursiv']){ // wenn pages nicht leer und rekursiv angehakt ist\r
-\r
-                               // generiert zur aktuellen Seite alle Elternseiten und prueft ob in der Schnittemenge der\r
-                               // Elternseiten mit der erlaubten Bannerseiten mindestens ein Eintrag drinnen ist.\r
-                               if (count($parentArr) == 0) {\r
-                                       foreach ($GLOBALS['TSFE']->tmpl->rootLine as $tmp) {\r
-                                               $parentArr[] = $tmp['uid'];\r
-                                       }\r
-                               }\r
-\r
-                               $bannerPidArr = array_unique(t3lib_div::trimExplode(',',$row['pages'],1));\r
-                               $diffArr = array_intersect($parentArr, $bannerPidArr);\r
-\r
-                               if (count($diffArr) > 0) {\r
-                                       $bannerdata[] = $row;\r
-                               }\r
-                       } else if ($row['pages'] && !$row['recursiv']){\r
-                               // wenn pages nicht leer und rekursiv nicht angehakt ist\r
-                               $pidArray = array_unique(t3lib_div::trimExplode(',',$row['pages'],1));\r
-                               if(in_array($GLOBALS['TSFE']->id,$pidArray)){\r
-                                       $bannerdata[] = $row;\r
-                               }\r
-                       } else {\r
-                               // wenn pages leer und rekursiv nicht angehakt ist\r
-                               $bannerdata[] = $row;\r
-                       }\r
-               }\r
-\r
-               $count = count($bannerdata);\r
-               // use mode "random\r
-               if ($conf['mode'] == 'random' && $count > 1) {\r
-                       $randomselectnum = rand(0, $count - 1);\r
-                       $randombanner = $bannerdata[$randomselectnum];\r
-                       unset($bannerdata);\r
-                       $bannerdata[] = $randombanner;\r
-\r
-               } elseif ($conf['mode'] == 'random_all' && $count > 1) {\r
-                       //media lights: use mode "random_all"\r
-                       shuffle($bannerdata);\r
-               }\r
-\r
-               // get template\r
-               $this->templateCode = $this->cObj->fileResource($this->conf['templateFile']);\r
-\r
-               // get main subpart\r
-               $templateMarker = '###template_banners###';\r
-               $template = array ();\r
-               $template = $this->cObj->getSubpart($this->templateCode, $templateMarker);\r
-\r
-               // get row subpart\r
-               $rowmarker = '###row###';\r
-               $tablerowarray = array ();\r
-               $tablerowarray = $this->cObj->getSubpart($template, $rowmarker);\r
-\r
-               $rowdata = '';\r
-\r
-               // limit number of banners shown\r
-               $qt = $conf['results_at_a_time'] < count($bannerdata) ? $conf['results_at_a_time'] : count($bannerdata);\r
-\r
-               for ($i=0; $i<$qt; $i++){\r
-\r
-                       $row = $bannerdata[$i];\r
-\r
-                       // update impressionsfeld on rendering banner\r
-                       $TYPO3_DB->exec_UPDATEquery(\r
-                               'tx_macinabanners_banners',\r
-                               'uid='.$TYPO3_DB->fullQuoteStr($row['uid'], 'tx_macinabanners_banners'),\r
-                               array('impressions' => ++$row['impressions'])\r
-                       );\r
-\r
-                       // assign borders to array\r
-                       $styles = array ('margin-top' => $row['border_top'],\r
-                                                       'margin-right' => $row['border_right'],\r
-                                                       'margin-bottom' => $row['border_bottom'],\r
-                                                       'margin-left' => $row['border_left'] );\r
-\r
-                       switch($row['bannertype']) {\r
-                               case 0:\r
-\r
-                               /*\r
-                                * Grafik per Typoscript nach belieben zu konfigurieren\r
-                                * Danke an Gernot Ploiner\r
-                                */\r
-                               $img = $this->conf['image.'];\r
-                               $img['file'] = 'uploads/tx_macinabanners/' . $row['image'];\r
-                               $img['alttext'] = $row['alttext'];\r
-\r
-                               $this->ImageName = 'uploads/tx_macinabanners/' . $row['image'];\r
-                               array_walk_recursive($img, array($this, 'replace_field_image'));\r
-\r
-                               $this->AltText = $row['alttext'];\r
-                               array_walk_recursive($img, array($this, 'replace_field_alttext'));\r
-\r
-                               $img = $this->cObj->IMAGE($img);\r
-\r
-                               // link image with pagelink und banneruid as getvar\r
-                               if ($row['url']) {\r
-                                       $linkArray = explode(' ', $row['url']);\r
-                                       $wrappedSubpartArray['###bannerlink###'] = t3lib_div::trimExplode("|", $this->cObj->getTypoLink("|", $GLOBALS['TSFE']->id . " " . $linkArray[1] , array( "no_cache" => 1 , $this->prefixId . "[banneruid]" => $row['uid'] ) ) );\r
-                                       $banner = join($wrappedSubpartArray['###bannerlink###'], $img);\r
-                               } else {\r
-                                       $banner = $img;\r
-                               }\r
-\r
-                               break;\r
-                               case 1:\r
-\r
-                               if ($row['url']) {\r
-                                       $linkArray = explode(' ', $row['url']);\r
-                                       $clickTAG = t3lib_div::getIndpEnv('TYPO3_SITE_URL') . $this->cObj->getTypoLink_URL( $GLOBALS['TSFE']->id, array( "no_cache" => 1 , $this->prefixId . "[banneruid]" => $row['uid'] ) );\r
-                               }\r
-\r
-                               $banner = "\n<object classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" codebase=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0\" width=\"" . $row['flash_width'] . "\" height=\"" . $row['flash_height'] . "\">\n";\r
-                               $banner .= "<param name=\"movie\" value=\"uploads/tx_macinabanners/" . $row['swf'] . "\" />\n";\r
-                               $banner .= "<param name=\"quality\" value=\"high\" />\n";\r
-                               $banner .= "<param name=\"allowScriptAccess\" value=\"sameDomain\" />\n";\r
-                               $banner .= "<param name=\"menu\" value=\"false\" />\n";\r
-                               $banner .= "<param name=\"wmode\" value=\"transparent\" />\n";\r
-                               $banner .= "<param name=\"FlashVars\" value=\"clickTAG=" . urlencode($clickTAG) . "&amp;target=" . $linkArray[1] . "\" />\n";\r
-                               $banner .= "<embed src=\"uploads/tx_macinabanners/" . $row['swf'] . "\" FlashVars=\"" . urlencode($clickTAG) . "&amp;target=" . $linkArray[1] . "\" quality=\"high\" wmode=\"transparent\" pluginspage=\"http://www.macromedia.com/go/getflashplayer\" type=\"application/x-shockwave-flash\" width=\"" . $row['flash_width'] . "\" height=\"" . $row['flash_height'] . "\"></embed>\n";\r
-                               $banner .= "</object>\n";\r
-\r
-                               #t3lib_div::debug(array($clickTAG, $linkArray[1]));\r
-                               break;\r
-\r
-\r
-                               //medialights: html mode\r
-                               case 2:\r
-                               $banner = $row['html'];\r
-                               break;\r
-                       }\r
-\r
-                       // funktion to attach styles to wrapping cell\r
-                       $banner = $this->wrapwithstyles($banner, $styles);\r
-\r
-                       // create the content by replacing the marker in the template\r
-                       $markerArray = array ();\r
-                       $markerArray['###banner###'] = $banner;\r
-                       $markerArray['###alttext###'] = $row['alttext'];\r
-\r
-                       if ($row['bannertype'] == 0)\r
-                               $markerArray['###filename###'] = $row['image'];\r
-                       elseif ($row['bannertype'] == 1)\r
-                               $markerArray['###filename###'] = $row['swf'];\r
-                       else\r
-                               $markerArray['###filename###'] = "";\r
-\r
-\r
-                       $markerArray['###url###'] = $row['url'];\r
-                       $markerArray['###impressions###'] = $row['impressions'];\r
-                       $markerArray['###clicks###'] = $row['clicks'];\r
-                       $markerArray['###edit###'] = $this->pi_getEditPanel($row, 'tx_macinabanners_banners');\r
-\r
-                       $rowdata .= $this->cObj->substituteMarkerArrayCached($tablerowarray, $markerArray, array (), $wrappedSubpartArray);\r
-               }\r
-               if($rowdata) {\r
-                       $subpartArray = array ();\r
-                       $subpartArray['###row###'] = $rowdata;\r
-                       $content = $this->cObj->substituteMarkerArrayCached($template, array (), $subpartArray, array ());\r
-                       return $content;\r
-               } else {\r
-                       return;  // no banners\r
-               }\r
-       }\r
-\r
-       /**\r
-        * output of a single view element called by pi_list_makelist\r
-        *\r
-        * @param       string          $content: main variable carriing the content\r
-        * @param       array           $conf: config array from typoscript\r
-        * @return      string          html content\r
-        */\r
-       function singleView($content, $conf) {\r
-               $this->conf = $conf;\r
-\r
-               $this->pi_setPiVarDefaults();\r
-               $this->pi_loadLL();\r
-\r
-               switch($this->internal['currentRow']['bannertype']) {\r
-               case 0:\r
-\r
-                       /*\r
-                        * Grafik per Typoscript nach belieben zu konfigurieren\r
-                        * Danke an Gernot Ploiner\r
-                        */\r
-                       $img = $this->conf['image.'];\r
-                       $img['file'] = 'uploads/tx_macinabanners/' . $row['image'];\r
-                       $img['alttext'] = $row['alttext'];\r
-\r
-                       $this->ImageName = 'uploads/tx_macinabanners/' . $row['image'];\r
-                       array_walk_recursive($img, array($this, 'replace_field_image'));\r
-\r
-                       $this->AltText = $row['alttext'];\r
-                       array_walk_recursive($img, array($this, 'replace_field_alttext'));\r
-\r
-                       $img = $this->cObj->IMAGE($img);\r
-\r
-                               // link image with pagelink und banneruid as getvar\r
-                       if ( $this->internal['currentRow']['url']) {\r
-                               $linkArray = explode(' ', $this->internal['currentRow']['url']);\r
-                                       $wrappedSubpartArray['###bannerlink###'] = t3lib_div::trimExplode("|", $this->cObj->getTypoLink("|", $GLOBALS['TSFE']->id . " " . $linkArray[1] , array( "no_cache" => 1 , $this->prefixId . "[banneruid]" => $this->internal['currentRow']['uid'] ) ) );\r
-                                       $banner = join($wrappedSubpartArray['###bannerlink###'], $img);\r
-                               } else {\r
-                                       $banner = $img;\r
-                               }\r
-\r
-                       $content = "<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\">\n<tr>\n<td nowrap valign=\"top\">".$banner."</td>\n</tr>\n</table>\n";\r
-                       break;\r
-\r
-               case 1:\r
-                       if ( $this->internal['currentRow']['url']) {\r
-                               $linkArray = explode(' ', $this->internal['currentRow']['url']);\r
-                               $clickTAG = t3lib_div::getIndpEnv('TYPO3_SITE_URL') . $this->cObj->getTypoLink_URL( $GLOBALS['TSFE']->id, array( "no_cache" => 1 , $this->prefixId . "[banneruid]" =>  $this->internal['currentRow']['uid'] ) );\r
-                       }\r
-\r
-                       $banner = "\n<object classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" codebase=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0\" width=\"" . $this->internal['currentRow']['flash_width'] . "\" height=\"" . $this->internal['currentRow']['flash_height'] . "\">\n";\r
-                       $banner .= "<param name=\"movie\" value=\"uploads/tx_macinabanners/" . $this->internal['currentRow']['swf'] . "\" />\n";\r
-                       $banner .= "<param name=\"quality\" value=\"high\" />\n";\r
-                       $banner .= "<param name=\"allowScriptAccess\" value=\"sameDomain\" />\n";\r
-                       $banner .= "<param name=\"menu\" value=\"false\" />\n";\r
-                       $banner .= "<param name=\"wmode\" value=\"transparent\" />\n";\r
-                       $banner .= "<param name=\"FlashVars\" value=\"clickTAG=" . urlencode($clickTAG) . "&amp;target=" . $linkArray[1] . "\" />\n";\r
-                       $banner .= "<embed src=\"uploads/tx_macinabanners/" .  $this->internal['currentRow']['swf'] . "\" FlashVars=\"" . urlencode($clickTAG) . "&amp;target=" . $linkArray[1] . "\" quality=\"high\" wmode=\"transparent\" pluginspage=\"http://www.macromedia.com/go/getflashplayer\" type=\"application/x-shockwave-flash\" width=\"" .  $this->internal['currentRow']['flash_width'] . "\" height=\"" .  $this->internal['currentRow']['flash_height'] . "\"></embed>\n";\r
-                       $banner .= "</object>\n";\r
-\r
-                       $content = $banner;\r
-                       break;\r
-\r
-               case 2:\r
-                       $content .= $this->internal['currentRow']['html'];\r
-                       break;\r
-               }\r
-\r
-               return $content;\r
-       }\r
-\r
-       /**\r
-        * wrapwithstyles wraps the banner with a table that creates the borders left right top and bottom\r
-        *\r
-        * @param       string          $string: contains the html bannercode\r
-        * @param       array           $styles: named array with the styles padding-top, padding bottom ...\r
-        * @return      string          html content\r
-        */\r
-       function wrapwithstyles($string, $styles) {\r
-               $content = '<div style="';\r
-               foreach ($styles as $key => $value) {\r
-                       $content .= $key . ':' . $value . 'px; ';\r
-               }\r
-               $content .= '">' . $string . "</div>\n";\r
-               return $content;\r
-       }\r
-\r
-       function replace_field_image(&$item, $key) {\r
-               if ($item == 'field_image') {\r
-                       $item = $this->ImageName;\r
-               }\r
-       }\r
-\r
-       function replace_field_alttext(&$item, $key) {\r
-               if ($item == 'field_alttext') {\r
-                       $item = $this->AltText;\r
-               }\r
-       }\r
-}\r
-\r
-if (defined('TYPO3_MODE') && $TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['ext/macina_banners/pi1/class.tx_macinabanners_pi1.php']) {\r
-       include_once($TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['ext/macina_banners/pi1/class.tx_macinabanners_pi1.php']);\r
-}\r
+<?php
+/***************************************************************
+ *  Copyright notice
+ *
+ *  (c) 2003 Wolfgang Becker (wb@macina.com)
+ *  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.
+ *
+ *  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!
+ ***************************************************************/
+/**
+ * Plugin 'Bannermodule' for the 'macina_banners' extension.
+ *
+ * @author Wolfgang Becker <wb@macina.com>
+ */
+require_once(PATH_tslib . 'class.tslib_pibase.php');
+
+/**
+ * Class for creating a banner extension
+ *
+ * @author     Wolfgang <wb@macina.com>
+ * @package TYPO3
+ * @subpackage tx_macinabanners
+ */
+class tx_macinabanners_pi1 extends tslib_pibase {
+
+       var $prefixId = 'tx_macinabanners_pi1'; // Same as class name
+       var $scriptRelPath = 'pi1/class.tx_macinabanners_pi1.php'; // Path to this script relative to the extension dir.
+       var $extKey = 'macina_banners'; // The extension key.
+       var $siteRelPath;
+
+       /**
+        * main function invoked by index.php
+        *
+        * @param       string          $content: main variable carriing the content
+        * @param       array           $conf: config array from typoscript
+        * @return      string          html content
+        */
+       function main($content, $conf) {
+               global $TYPO3_DB;
+               $this->pi_USER_INT_obj=1;
+
+               // forwarder
+               if ($this->piVars['banneruid']) {
+                       $this->conf = $conf;
+                       $this->pi_setPiVarDefaults();
+                       $this->pi_loadLL();
+
+                       // get link details
+                       $record = $this->pi_getRecord('tx_macinabanners_banners', $this->piVars['banneruid'],$checkPage=0);
+
+                       if ($record != FALSE) {
+                               // update clicks
+                               $TYPO3_DB->exec_UPDATEquery(
+                                       'tx_macinabanners_banners',
+                                       'uid='.$TYPO3_DB->fullQuoteStr($record['uid'], 'tx_macinabanners_banners'),
+                                       array('clicks' => ++$record['clicks'])
+                               );
+
+                               // get URL
+                               unset ($this->piVars['banneruid']);
+                               header('Location: ' . $this->cObj->getTypoLink_URL($record['url']));
+                               exit;
+                       }
+               }
+
+               $this->pi_USER_INT_obj = 1; // Any link to yourself won't expect to be cached (no cHash and no_cache=1)
+
+               switch ((string)$conf['CMD']) {
+                       case 'singleView':
+                               list($t) = explode(':', $this->cObj->currentRecord);
+
+                               $this->internal['currentTable'] = $t;
+                               $this->internal['currentRow'] = $this->cObj->data;
+                               $content = $this->singleView($content, $conf);
+
+                               return $content;
+                       break;
+                       default:
+
+                               if (strstr($this->cObj->currentRecord, 'tt_content')) {
+                                       $conf['pidList'] = $this->cObj->data['pages'];
+                                       $conf['recursive'] = $this->cObj->data['recursive'];
+                                       $conf['placement'] = $this->cObj->data['tx_macinabanners_placement'];
+                                       $conf['mode'] = $this->cObj->data['tx_macinabanners_mode'];
+                               }
+                               /* medialights: didn't work with deactivated caching in 'ext_localconf.php -> addPItoST43'*/
+                               //PRS+ 12.08.2005
+                               if ($conf['mode'] == 'random' || $conf['mode'] == 'random_all' || $conf['enableParameterRestriction'] == 1) {
+                                       $substKey = 'INT_SCRIPT.'.$GLOBALS['TSFE']->uniqueHash();
+                                       $link='<!--'.$substKey.'-->';
+                                       $conf['userFunc'] = 'tx_macinabanners_pi1->listView';
+                                       $GLOBALS['TSFE']->config['INTincScript'][$substKey] = array(
+                                               'conf'=>$conf,
+                                               'cObj'=>serialize($this->cObj),
+                                               'type'=>'FUNC',
+                                       );
+                                       return $link;
+                               } else {
+                                       return $this->listView($content, $conf);
+                               }
+                               //PRS- 12.08.2005
+
+                               return $this->listView($content, $conf);
+                       break;
+               }
+       }
+
+       /***************************
+        *
+        * listfunktions
+        *
+        **************************/
+
+       /**
+        * main function for output of the listview and the singleview
+        *
+        * @param       string          $content: main variable carriing the content
+        * @param       array           $conf: config array from typoscript
+        * @return      string          html content
+        */
+       function listView($content, $conf) {
+               global $TYPO3_DB;
+
+               $this->conf = $conf; // Setting the TypoScript passed to this function in $this->conf
+
+               $this->pi_setPiVarDefaults();
+               $this->pi_loadLL();     // Loading the LOCAL_LANG values
+
+
+               $this->siteRelPath = $GLOBALS['TYPO3_LOADED_EXT'][$this->extKey]['siteRelPath'];
+
+               // order by
+               $orderby = 'sorting';
+
+               // passende sprache oder sprachunabhaengig
+               $where .= '(sys_language_uid= ' . $GLOBALS['TSFE']->sys_language_uid . ' OR sys_language_uid = -1)';
+
+               // enable fields
+               $where .= $this->cObj->enableFields('tx_macinabanners_banners');
+
+               // nur banner mit dem richtigen placement (left right top bottom) holen
+               $allowedPlacements = t3lib_div::trimExplode(',',$conf['placement']);
+               if (count($allowedPlacements) > 0) {
+                       $placementClause = '';
+                       foreach ($allowedPlacements AS $placement) {
+                               if ($placementClause != '') {
+                                       $placementClause .= ' OR ';
+                               }
+
+                               $placementClause .= 'placement LIKE \'%'.$placement.'%\'';
+                       }
+                       $where .= ' AND ('.$placementClause.')';
+               }
+
+               // alle banner die die aktuelle page id nicht in  excludepages stehen haben
+               $where .= "AND NOT ( excludepages regexp '[[:<:]]".$GLOBALS['TSFE']->id."[[:>:]]' )";
+
+               // FIX pidList beachten !! Fuer Version 1.5.2
+               if (!empty($conf['pidList'])) {
+                       $where .= ' AND pid IN ( '.$conf['pidList'].' ) ';
+               }
+
+               //medialights
+               $queryPerformed = true;
+               //Prepare and execute listing query
+               if (isset($conf['enableParameterRestriction']) && !empty($conf['enableParameterRestriction'])) {
+                       //show only banners that match to the selected options
+                       $parameters = array();
+
+                       //get banners list according to parameters
+                       $RS = $TYPO3_DB->exec_SELECTquery('uid, parameters', 'tx_macinabanners_banners', '');
+                       while ($row = $TYPO3_DB->sql_fetch_assoc($RS)) {
+                               if (!empty($row['parameters'])) {
+                                       $lines = t3lib_div::trimExplode(chr(10), $row['parameters']);
+                                       foreach ($lines AS $line) {
+                                               list($parameterName, $details) = t3lib_div::trimExplode('=', $line);
+                                               $values = t3lib_div::trimExplode(",", $details);
+
+                                               foreach ($values AS $value) {
+                                                       if (isset($parameters[$parameterName][$value])) {
+                                                               $parameters[$parameterName][$value] .= ',' . $row['uid'];
+                                                       } else {
+                                                               $parameters[$parameterName][$value] = $row['uid'];
+                                                       }
+                                               }
+                                       }
+                               }
+                       }
+
+                       //get parameters
+                       $currentParameters = t3lib_div::_GET() + t3lib_div::_POST();
+
+                       $ids = '';
+                       foreach ($currentParameters as $parameter => $value) {
+                               if (!empty($value) && isset($parameters[$parameter][$value])) {
+                                       if ($ids != '') {
+                                               $ids .= ',';
+                                       }
+                                       $ids .= $parameters[$parameter][$value];
+                               }
+                       }
+
+                       if ($ids != '') {
+                               $res = $TYPO3_DB->exec_SELECTquery('*', 'tx_macinabanners_banners', 'uid IN ('.$ids.')');
+                       } else {
+                               $queryPerformed = false;
+                       }
+
+               } else {
+                       //show all banners
+                       $res = $TYPO3_DB->exec_SELECTquery('*', 'tx_macinabanners_banners', $where, '', $orderby);
+               }
+
+               // for caching
+               $parentArr = array();
+
+               // banner aussortieren
+               $bannerdata = array();
+               while ($queryPerformed && $row = $TYPO3_DB->sql_fetch_assoc($res)) {
+
+                       if ($row['pages'] && $row['recursiv']){ // wenn pages nicht leer und rekursiv angehakt ist
+
+                               // generiert zur aktuellen Seite alle Elternseiten und prueft ob in der Schnittemenge der
+                               // Elternseiten mit der erlaubten Bannerseiten mindestens ein Eintrag drinnen ist.
+                               if (count($parentArr) == 0) {
+                                       foreach ($GLOBALS['TSFE']->tmpl->rootLine as $tmp) {
+                                               $parentArr[] = $tmp['uid'];
+                                       }
+                               }
+
+                               $bannerPidArr = array_unique(t3lib_div::trimExplode(',', $row['pages'], 1));
+                               $diffArr = array_intersect($parentArr, $bannerPidArr);
+
+                               if (count($diffArr) > 0) {
+                                       $bannerdata[] = $row;
+                               }
+                       } else if ($row['pages'] && !$row['recursiv']){
+                               // wenn pages nicht leer und rekursiv nicht angehakt ist
+                               $pidArray = array_unique(t3lib_div::trimExplode(',', $row['pages'], 1));
+                               if (in_array($GLOBALS['TSFE']->id, $pidArray)){
+                                       $bannerdata[] = $row;
+                               }
+                       } else {
+                               // wenn pages leer und rekursiv nicht angehakt ist
+                               $bannerdata[] = $row;
+                       }
+               }
+
+               $count = count($bannerdata);
+               // use mode "random
+               if ($conf['mode'] == 'random' && $count > 1) {
+                       $randomselectnum = rand(0, $count - 1);
+                       $randombanner = $bannerdata[$randomselectnum];
+                       unset($bannerdata);
+                       $bannerdata[] = $randombanner;
+
+               } elseif ($conf['mode'] == 'random_all' && $count > 1) {
+                       //media lights: use mode "random_all"
+                       shuffle($bannerdata);
+               }
+
+               // get template
+               $this->templateCode = $this->cObj->fileResource($this->conf['templateFile']);
+
+               // get main subpart
+               $templateMarker = '###template_banners###';
+               $template = array ();
+               $template = $this->cObj->getSubpart($this->templateCode, $templateMarker);
+
+               // get row subpart
+               $rowmarker = '###row###';
+               $tablerowarray = array ();
+               $tablerowarray = $this->cObj->getSubpart($template, $rowmarker);
+
+               $rowdata = '';
+
+               // limit number of banners shown
+               $qt = $conf['results_at_a_time'] < count($bannerdata) ? $conf['results_at_a_time'] : count($bannerdata);
+
+               for ($i=0; $i < $qt; $i++) {
+
+                       $row = $bannerdata[$i];
+
+                       // update impressionsfeld on rendering banner
+                       $TYPO3_DB->exec_UPDATEquery(
+                               'tx_macinabanners_banners',
+                               'uid='.$TYPO3_DB->fullQuoteStr($row['uid'], 'tx_macinabanners_banners'),
+                               array('impressions' => ++$row['impressions'])
+                       );
+
+                       // assign borders to array
+                       $styles = array (
+                               'margin-top' => $row['border_top'],
+                               'margin-right' => $row['border_right'],
+                               'margin-bottom' => $row['border_bottom'],
+                               'margin-left' => $row['border_left']
+                       );
+
+                       switch($row['bannertype']) {
+                               case 0:
+
+                               /*
+                                * Grafik per Typoscript nach belieben zu konfigurieren
+                                * Danke an Gernot Ploiner
+                                */
+                               $img = $this->conf['image.'];
+                               $img['file'] = 'uploads/tx_macinabanners/' . $row['image'];
+                               $img['alttext'] = $row['alttext'];
+
+                               $this->ImageName = 'uploads/tx_macinabanners/' . $row['image'];
+                               array_walk_recursive($img, array($this, 'replace_field_image'));
+
+                               $this->AltText = $row['alttext'];
+                               array_walk_recursive($img, array($this, 'replace_field_alttext'));
+
+                               $img = $this->cObj->IMAGE($img);
+
+                               // link image with pagelink und banneruid as getvar
+                               if ($row['url']) {
+                                       $linkArray = explode(' ', $row['url']);
+                                       $wrappedSubpartArray['###bannerlink###'] = t3lib_div::trimExplode("|", $this->cObj->getTypoLink("|", $GLOBALS['TSFE']->id . " " . $linkArray[1] , array( "no_cache" => 1 , $this->prefixId . "[banneruid]" => $row['uid'] ) ) );
+                                       $banner = join($wrappedSubpartArray['###bannerlink###'], $img);
+                               } else {
+                                       $banner = $img;
+                               }
+
+                               break;
+                               case 1:
+
+                               if ($row['url']) {
+                                       $linkArray = explode(' ', $row['url']);
+                                       $clickTAG = t3lib_div::getIndpEnv('TYPO3_SITE_URL') . $this->cObj->getTypoLink_URL( $GLOBALS['TSFE']->id, array( "no_cache" => 1 , $this->prefixId . "[banneruid]" => $row['uid'] ) );
+                               }
+
+                               $banner = "\n<object classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" codebase=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0\" width=\"" . $row['flash_width'] . "\" height=\"" . $row['flash_height'] . "\">\n";
+                               $banner .= "<param name=\"movie\" value=\"uploads/tx_macinabanners/" . $row['swf'] . "\" />\n";
+                               $banner .= "<param name=\"quality\" value=\"high\" />\n";
+                               $banner .= "<param name=\"allowScriptAccess\" value=\"sameDomain\" />\n";
+                               $banner .= "<param name=\"menu\" value=\"false\" />\n";
+                               $banner .= "<param name=\"wmode\" value=\"transparent\" />\n";
+                               $banner .= "<param name=\"FlashVars\" value=\"clickTAG=" . urlencode($clickTAG) . "&amp;target=" . $linkArray[1] . "\" />\n";
+                               $banner .= "<embed src=\"uploads/tx_macinabanners/" . $row['swf'] . "\" FlashVars=\"" . urlencode($clickTAG) . "&amp;target=" . $linkArray[1] . "\" quality=\"high\" wmode=\"transparent\" pluginspage=\"http://www.macromedia.com/go/getflashplayer\" type=\"application/x-shockwave-flash\" width=\"" . $row['flash_width'] . "\" height=\"" . $row['flash_height'] . "\"></embed>\n";
+                               $banner .= "</object>\n";
+
+                               #t3lib_div::debug(array($clickTAG, $linkArray[1]));
+                               break;
+
+
+                               //medialights: html mode
+                               case 2:
+                               $banner = $row['html'];
+                               break;
+                       }
+
+                       // funktion to attach styles to wrapping cell
+                       $banner = $this->wrapwithstyles($banner, $styles);
+
+                       // create the content by replacing the marker in the template
+                       $markerArray = array ();
+                       $markerArray['###banner###'] = $banner;
+                       $markerArray['###alttext###'] = $row['alttext'];
+
+                       if ($row['bannertype'] == 0)
+                               $markerArray['###filename###'] = $row['image'];
+                       elseif ($row['bannertype'] == 1)
+                               $markerArray['###filename###'] = $row['swf'];
+                       else
+                               $markerArray['###filename###'] = "";
+
+                       $markerArray['###url###'] = $row['url'];
+                       $markerArray['###impressions###'] = $row['impressions'];
+                       $markerArray['###clicks###'] = $row['clicks'];
+                       $markerArray['###edit###'] = $this->pi_getEditPanel($row, 'tx_macinabanners_banners');
+
+                       $rowdata .= $this->cObj->substituteMarkerArrayCached($tablerowarray, $markerArray, array (), $wrappedSubpartArray);
+               }
+               if($rowdata) {
+                       $subpartArray = array ();
+                       $subpartArray['###row###'] = $rowdata;
+                       $content = $this->cObj->substituteMarkerArrayCached($template, array (), $subpartArray, array ());
+                       return $content;
+               } else {
+                       return;  // no banners
+               }
+       }
+
+       /**
+        * output of a single view element called by pi_list_makelist
+        *
+        * @param       string          $content: main variable carriing the content
+        * @param       array           $conf: config array from typoscript
+        * @return      string          html content
+        */
+       function singleView($content, $conf) {
+               $this->conf = $conf;
+
+               $this->pi_setPiVarDefaults();
+               $this->pi_loadLL();
+
+               switch($this->internal['currentRow']['bannertype']) {
+               case 0:
+
+                       /*
+                        * Grafik per Typoscript nach belieben zu konfigurieren
+                        * Danke an Gernot Ploiner
+                        */
+                       $img = $this->conf['image.'];
+                       $img['file'] = 'uploads/tx_macinabanners/' . $row['image'];
+                       $img['alttext'] = $row['alttext'];
+
+                       $this->ImageName = 'uploads/tx_macinabanners/' . $row['image'];
+                       array_walk_recursive($img, array($this, 'replace_field_image'));
+
+                       $this->AltText = $row['alttext'];
+                       array_walk_recursive($img, array($this, 'replace_field_alttext'));
+
+                       $img = $this->cObj->IMAGE($img);
+
+                               // link image with pagelink und banneruid as getvar
+                       if ( $this->internal['currentRow']['url']) {
+                               $linkArray = explode(' ', $this->internal['currentRow']['url']);
+                                       $wrappedSubpartArray['###bannerlink###'] = t3lib_div::trimExplode("|", $this->cObj->getTypoLink("|", $GLOBALS['TSFE']->id . " " . $linkArray[1] , array( "no_cache" => 1 , $this->prefixId . "[banneruid]" => $this->internal['currentRow']['uid'] ) ) );
+                                       $banner = join($wrappedSubpartArray['###bannerlink###'], $img);
+                               } else {
+                                       $banner = $img;
+                               }
+
+                       $content = "<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\">\n<tr>\n<td nowrap valign=\"top\">".$banner."</td>\n</tr>\n</table>\n";
+                       break;
+
+               case 1:
+                       if ( $this->internal['currentRow']['url']) {
+                               $linkArray = explode(' ', $this->internal['currentRow']['url']);
+                               $clickTAG = t3lib_div::getIndpEnv('TYPO3_SITE_URL') . $this->cObj->getTypoLink_URL( $GLOBALS['TSFE']->id, array( "no_cache" => 1 , $this->prefixId . "[banneruid]" =>  $this->internal['currentRow']['uid'] ) );
+                       }
+
+                       $banner = "\n<object classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" codebase=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0\" width=\"" . $this->internal['currentRow']['flash_width'] . "\" height=\"" . $this->internal['currentRow']['flash_height'] . "\">\n";
+                       $banner .= "<param name=\"movie\" value=\"uploads/tx_macinabanners/" . $this->internal['currentRow']['swf'] . "\" />\n";
+                       $banner .= "<param name=\"quality\" value=\"high\" />\n";
+                       $banner .= "<param name=\"allowScriptAccess\" value=\"sameDomain\" />\n";
+                       $banner .= "<param name=\"menu\" value=\"false\" />\n";
+                       $banner .= "<param name=\"wmode\" value=\"transparent\" />\n";
+                       $banner .= "<param name=\"FlashVars\" value=\"clickTAG=" . urlencode($clickTAG) . "&amp;target=" . $linkArray[1] . "\" />\n";
+                       $banner .= "<embed src=\"uploads/tx_macinabanners/" .  $this->internal['currentRow']['swf'] . "\" FlashVars=\"" . urlencode($clickTAG) . "&amp;target=" . $linkArray[1] . "\" quality=\"high\" wmode=\"transparent\" pluginspage=\"http://www.macromedia.com/go/getflashplayer\" type=\"application/x-shockwave-flash\" width=\"" .  $this->internal['currentRow']['flash_width'] . "\" height=\"" .  $this->internal['currentRow']['flash_height'] . "\"></embed>\n";
+                       $banner .= "</object>\n";
+
+                       $content = $banner;
+                       break;
+
+               case 2:
+                       $content .= $this->internal['currentRow']['html'];
+                       break;
+               }
+
+               return $content;
+       }
+
+       /**
+        * wrapwithstyles wraps the banner with a table that creates the borders left right top and bottom
+        *
+        * @param       string          $string: contains the html bannercode
+        * @param       array           $styles: named array with the styles padding-top, padding bottom ...
+        * @return      string          html content
+        */
+       function wrapwithstyles($string, $styles) {
+               $content = '<div style="';
+               foreach ($styles as $key => $value) {
+                       $content .= $key . ':' . $value . 'px; ';
+               }
+               $content .= '">' . $string . "</div>\n";
+               return $content;
+       }
+
+       function replace_field_image(&$item, $key) {
+               if ($item == 'field_image') {
+                       $item = $this->ImageName;
+               }
+       }
+
+       function replace_field_alttext(&$item, $key) {
+               if ($item == 'field_alttext') {
+                       $item = $this->AltText;
+               }
+       }
+}
+
+if (defined('TYPO3_MODE') && $TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['ext/macina_banners/pi1/class.tx_macinabanners_pi1.php']) {
+       include_once($TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['ext/macina_banners/pi1/class.tx_macinabanners_pi1.php']);
+}
 ?>
\ No newline at end of file
diff --git a/tca.php b/tca.php
old mode 100644 (file)
new mode 100755 (executable)
index f4e1a81..9b1264f
--- a/tca.php
+++ b/tca.php
-<?php\r
-if (!defined ('TYPO3_MODE'))   die ('Access denied.');\r
-#aenderung 22.11.04 spracherweiterung\r
-$TCA['tx_macinabanners_banners'] = Array (\r
-       'ctrl' => $TCA['tx_macinabanners_banners']['ctrl'],\r
-       'interface' => Array (\r
-               'showRecordFieldList' => 'hidden,starttime,endtime,fe_group,sys_language_uid,t3ver_label,l18n_parent,customer,bannertype,image,maxw,alttext,url,swf,flash_width,flash_height,html,placement,border_top,border_right,border_bottom,border_left,pages,recursiv,excludepages,impressions,clicks,parameters'\r
-       ),\r
-       'feInterface' => $TCA['tx_macinabanners_banners']['feInterface'],\r
-       'columns' => Array (\r
-               'hidden' => Array (             \r
-                       'exclude' => 1, \r
-                       'label' => 'LLL:EXT:lang/locallang_general.php:LGL.hidden',\r
-                       'config' => Array (\r
-                               'type' => 'check',\r
-                               'default' => '0'\r
-                       )\r
-               ),\r
-               'starttime' => Array (          \r
-                       'exclude' => 1, \r
-                       'label' => 'LLL:EXT:lang/locallang_general.php:LGL.starttime',\r
-                       'config' => Array (\r
-                               'type' => 'input',\r
-                               'size' => '8',\r
-                               'max' => '20',\r
-                               'eval' => 'date',\r
-                               'default' => '0',\r
-                               'checkbox' => '0'\r
-                       )\r
-               ),\r
-               'endtime' => Array (            \r
-                       'exclude' => 1, \r
-                       'label' => 'LLL:EXT:lang/locallang_general.php:LGL.endtime',\r
-                       'config' => Array (\r
-                               'type' => 'input',\r
-                               'size' => '8',\r
-                               'max' => '20',\r
-                               'eval' => 'date',\r
-                               'checkbox' => '0',\r
-                               'default' => '0',\r
-                               'range' => Array (\r
-                                       'upper' => mktime(0,0,0,12,31,2020),\r
-                                       'lower' => mktime(0,0,0,date('m')-1,date('d'),date('Y'))\r
-                               )\r
-                       )\r
-               ),\r
-               'fe_group' => Array (           \r
-                       'exclude' => 1, \r
-                       'label' => 'LLL:EXT:lang/locallang_general.php:LGL.fe_group',\r
-                       'config' => Array (\r
-                               'type' => 'select',     \r
-                               'items' => Array (\r
-                                       Array('', 0),\r
-                                       Array('LLL:EXT:lang/locallang_general.php:LGL.hide_at_login', -1),\r
-                                       Array('LLL:EXT:lang/locallang_general.php:LGL.any_login', -2),\r
-                                       Array('LLL:EXT:lang/locallang_general.php:LGL.usergroups', '--div--')\r
-                               ),\r
-                               'foreign_table' => 'fe_groups'\r
-                       )\r
-               ),\r
-               'customer' => Array (           \r
-                       'exclude' => 0,         \r
-                       'label' => 'LLL:EXT:macina_banners/locallang_db.php:tx_macinabanners_banners.customer',         \r
-                       'config' => Array (\r
-                               'type' => 'input',      \r
-                               'size' => '30', \r
-                               'eval' => 'required',\r
-                       )\r
-               ),\r
-               'bannertype' => Array (         \r
-                       'exclude' => 0,         \r
-                       'label' => 'LLL:EXT:macina_banners/locallang_db.php:tx_macinabanners_banners.bannertype',               \r
-                       'config' => Array (\r
-                               'type' => 'select',\r
-                               'items' => Array (\r
-                                       Array('LLL:EXT:macina_banners/locallang_db.php:tx_macinabanners_banners.bannertype.I.0', '0'),\r
-                                       Array('LLL:EXT:macina_banners/locallang_db.php:tx_macinabanners_banners.bannertype.I.1', '1'),\r
-                                       Array('LLL:EXT:macina_banners/locallang_db.php:tx_macinabanners_banners.bannertype.I.2', '2'),\r
-                               ),\r
-                               'size' => 1,    \r
-                               'maxitems' => 1,\r
-                       )\r
-               ),\r
-               't3ver_label' => Array (\r
-                       'exclude' => 0,\r
-                       'label' => 'LLL:EXT:lang/locallang_general.php:LGL.versionLabel',\r
-                       'config' => Array (\r
-                               'type' => 'input',\r
-                               'size' => 30,\r
-                               'max' => 30,\r
-                       )\r
-               ),              \r
-               'sys_language_uid' => Array (\r
-                       'exclude' => 0,\r
-                       'label' => 'LLL:EXT:lang/locallang_general.php:LGL.language',\r
-                       'config' => Array (\r
-                               'type' => 'select',\r
-                               'foreign_table' => 'sys_language',\r
-                               'foreign_table_where' => 'ORDER BY sys_language.title',\r
-                               'items' => Array(\r
-                                       Array('LLL:EXT:lang/locallang_general.php:LGL.allLanguages',-1),\r
-                                       Array('LLL:EXT:lang/locallang_general.php:LGL.default_value',0)\r
-                               )\r
-                       )\r
-               ),\r
-               'l18n_parent' => Array (\r
-                       'displayCond' => 'FIELD:sys_language_uid:>:0',\r
-                       'exclude' => 0,\r
-                       'label' => 'LLL:EXT:lang/locallang_general.php:LGL.l18n_parent',\r
-                       'config' => Array (\r
-                               'type' => 'select',\r
-                               'items' => Array (\r
-                                       Array('', 0),\r
-                               ),\r
-                               'foreign_table' => 'tx_macinabanners_banners',\r
-                               'foreign_table_where' => 'AND tx_macinabanners_banners.pid=###CURRENT_PID### AND  tx_macinabanners_banners.sys_language_uid IN (-1,0)',\r
-                       )\r
-               ),\r
-               'l18n_diffsource' => Array(\r
-                       'config'=>array('type'=>'passthrough')\r
-               ),              \r
-               'image' => Array (              \r
-                       'exclude' => 0,         \r
-                       'label' => 'LLL:EXT:macina_banners/locallang_db.php:tx_macinabanners_banners.image',            \r
-                       'config' => Array (\r
-                               'type' => 'group',\r
-                               'internal_type' => 'file',\r
-                               'allowed' => $GLOBALS['TYPO3_CONF_VARS']['GFX']['imagefile_ext'],       \r
-                               'max_size' => 1000,     \r
-                               'uploadfolder' => 'uploads/tx_macinabanners',\r
-                               'show_thumbs' => 1,     \r
-                               'size' => 1,    \r
-                               'minitems' => 0,\r
-                               'maxitems' => 1,\r
-                       )\r
-               ),\r
-               'maxw' => Array (               \r
-                       'exclude' => 0,         \r
-                       'label' => 'LLL:EXT:macina_banners/locallang_db.php:tx_macinabanners_banners.maxw',             \r
-                       'config' => Array (\r
-                               'type' => 'input',      \r
-                               'size' => '5',  \r
-                               'eval' => 'int,nospace',\r
-                       )\r
-               ),\r
-               'alttext' => Array (            \r
-                       'exclude' => 0,         \r
-                       'label' => 'LLL:EXT:macina_banners/locallang_db.php:tx_macinabanners_banners.alttext',          \r
-                       'config' => Array (\r
-                               'type' => 'input',      \r
-                               'size' => '30',\r
-                       )\r
-               ),\r
-               'url' => Array (                \r
-                       'exclude' => 0,         \r
-                       'label' => 'LLL:EXT:macina_banners/locallang_db.php:tx_macinabanners_banners.url',              \r
-                       'config' => Array (\r
-                               'type' => 'input',              \r
-                               'size' => '15',\r
-                               'max' => '255',\r
-                               'checkbox' => '',\r
-                               'eval' => 'trim',\r
-                               'wizards' => Array(\r
-                                       '_PADDING' => 2,\r
-                                       'link' => Array(\r
-                                               'type' => 'popup',\r
-                                               'title' => 'Link',\r
-                                               'icon' => 'link_popup.gif',\r
-                                               'script' => 'browse_links.php?mode=wizard',\r
-                                               'JSopenParams' => 'height=300,width=500,status=0,menubar=0,scrollbars=1'\r
-                                       )\r
-                               )\r
-                       )\r
-               ),\r
-               'swf' => Array (                \r
-                       'exclude' => 0,         \r
-                       'label' => 'LLL:EXT:macina_banners/locallang_db.php:tx_macinabanners_banners.swf',              \r
-                       'config' => Array (\r
-                               'type' => 'group',\r
-                               'internal_type' => 'file',\r
-                               'allowed' => '',        \r
-                               'disallowed' => 'php,php3',     \r
-                               'max_size' => 1000,     \r
-                               'uploadfolder' => 'uploads/tx_macinabanners',\r
-                               'size' => 1,    \r
-                               'minitems' => 0,\r
-                               'maxitems' => 1,\r
-                       )\r
-               ),\r
-               'flash_width' => Array (                \r
-                       'exclude' => 0,         \r
-                       'label' => 'LLL:EXT:macina_banners/locallang_db.php:tx_macinabanners_banners.flash_width',              \r
-                       'config' => Array (\r
-                               'type' => 'input',      \r
-                               'size' => '5',  \r
-                               'eval' => 'required,int,nospace',\r
-                       )\r
-               ),\r
-               'flash_height' => Array (               \r
-                       'exclude' => 0,         \r
-                       'label' => 'LLL:EXT:macina_banners/locallang_db.php:tx_macinabanners_banners.flash_height',             \r
-                       'config' => Array (\r
-                               'type' => 'input',      \r
-                               'size' => '5',  \r
-                               'eval' => 'required,int,nospace',\r
-                       )\r
-               ),\r
-               //medialights: new type html\r
-               'html' => Array (               \r
-                       'exclude' => 1,         \r
-                       'label' => 'LLL:EXT:macina_banners/locallang_db.php:tx_macinabanners_banners.html',             \r
-                       'config' => Array (\r
-                               'type' => 'text',\r
-                               'cols' => '30', \r
-                               'rows' => '5',\r
-                       )\r
-               ),\r
-               'placement' => Array (          \r
-                       'exclude' => 0,         \r
-                       'label' => 'LLL:EXT:macina_banners/locallang_db.php:tx_macinabanners_banners.placement',                \r
-                       'config' => Array (\r
-                               'type' => 'select',\r
-                               /* medialights: default categories are only added if configured in the EM\r
-                               'items' => Array (\r
-                                       Array('LLL:EXT:macina_banners/locallang_db.php:tx_macinabanners_banners.placement.I.0', 'top', t3lib_extMgm::extRelPath('macina_banners').'selicon_tx_macinabanners_banners_placement_0.gif'),\r
-                                       Array('LLL:EXT:macina_banners/locallang_db.php:tx_macinabanners_banners.placement.I.1', 'right', t3lib_extMgm::extRelPath('macina_banners').'selicon_tx_macinabanners_banners_placement_1.gif'),\r
-                                       Array('LLL:EXT:macina_banners/locallang_db.php:tx_macinabanners_banners.placement.I.2', 'bottom', t3lib_extMgm::extRelPath('macina_banners').'selicon_tx_macinabanners_banners_placement_2.gif'),\r
-                                       Array('LLL:EXT:macina_banners/locallang_db.php:tx_macinabanners_banners.placement.I.3', 'left', t3lib_extMgm::extRelPath('macina_banners').'selicon_tx_macinabanners_banners_placement_3.gif'),\r
-                               ),\r
-                               */\r
-                               'items' => Array (),\r
-                               'itemsProcFunc' => 'tx_macinabanners_tt_content_tx_macinabanners_placement->main',\r
-                               //medialights: size and maxitems increased from 1                               \r
-                               'size' => 5,    \r
-                               'maxitems' => 50,\r
-                               \r
-                               //medialights: activate icons in select boxes\r
-                               'iconsInOptionTags' => 1                                \r
-                       )\r
-               ),\r
-               'border_top' => Array (         \r
-                       'exclude' => 0,         \r
-                       'label' => 'LLL:EXT:macina_banners/locallang_db.php:tx_macinabanners_banners.border_top',               \r
-                       'config' => Array (\r
-                               'type' => 'input',      \r
-                               'size' => '5',  \r
-                               'max' => '4',   \r
-                               'range' => Array ('lower'=>0,'upper'=>1000),    \r
-                               'eval' => 'int,nospace',\r
-                       )\r
-               ),\r
-               'border_right' => Array (               \r
-                       'exclude' => 0,         \r
-                       'label' => 'LLL:EXT:macina_banners/locallang_db.php:tx_macinabanners_banners.border_right',             \r
-                       'config' => Array (\r
-                               'type' => 'input',      \r
-                               'size' => '5',  \r
-                               'max' => '4',   \r
-                               'range' => Array ('lower'=>0,'upper'=>1000),    \r
-                               'eval' => 'int,nospace',\r
-                       )\r
-               ),\r
-               'border_bottom' => Array (              \r
-                       'exclude' => 0,         \r
-                       'label' => 'LLL:EXT:macina_banners/locallang_db.php:tx_macinabanners_banners.border_bottom',            \r
-                       'config' => Array (\r
-                               'type' => 'input',      \r
-                               'size' => '5',  \r
-                               'max' => '4',   \r
-                               'range' => Array ('lower'=>0,'upper'=>1000),    \r
-                               'eval' => 'int,nospace',\r
-                       )\r
-               ),\r
-               'border_left' => Array (                \r
-                       'exclude' => 0,         \r
-                       'label' => 'LLL:EXT:macina_banners/locallang_db.php:tx_macinabanners_banners.border_left',              \r
-                       'config' => Array (\r
-                               'type' => 'input',      \r
-                               'size' => '5',  \r
-                               'max' => '4',   \r
-                               'range' => Array ('lower'=>0,'upper'=>1000),    \r
-                               'eval' => 'int,nospace',\r
-                       )\r
-               ),\r
-               'pages' => Array (              \r
-                       'exclude' => 0,         \r
-                       'label' => 'LLL:EXT:macina_banners/locallang_db.php:tx_macinabanners_banners.pages',            \r
-                       'config' => Array (\r
-                               'type' => 'group',      \r
-                               'internal_type' => 'db',        \r
-                               'allowed' => 'pages',   \r
-                               'size' => 3,    \r
-                               'minitems' => 0,\r
-                               'maxitems' => 100,\r
-                       )\r
-               ),\r
-               'recursiv' => Array (           \r
-                       'exclude' => 1, \r
-                       'label' => 'LLL:EXT:macina_banners/locallang_db.php:tx_macinabanners_banners.recursiv',\r
-                       'config' => Array (\r
-                               'type' => 'check',\r
-                               'default' => '0'\r
-                       )\r
-               ),              \r
-               'excludepages' => Array (               \r
-                       'exclude' => 0,         \r
-                       'label' => 'LLL:EXT:macina_banners/locallang_db.php:tx_macinabanners_banners.excludepages',             \r
-                       'config' => Array (\r
-                               'type' => 'group',      \r
-                               'internal_type' => 'db',        \r
-                               'allowed' => 'pages',   \r
-                               'size' => 3,    \r
-                               'minitems' => 0,\r
-                               'maxitems' => 100,\r
-                       )\r
-               ),\r
-               'impressions' => Array (                \r
-                       'exclude' => 1,         \r
-                       'label' => 'LLL:EXT:macina_banners/locallang_db.php:tx_macinabanners_banners.impressions',              \r
-                       'config' => Array (\r
-                               'type' => 'none',\r
-                       )\r
-               ),\r
-               'clicks' => Array (             \r
-                       'exclude' => 1,         \r
-                       'label' => 'LLL:EXT:macina_banners/locallang_db.php:tx_macinabanners_banners.clicks',           \r
-                       'config' => Array (\r
-                               'type' => 'none',\r
-                       )\r
-               ),\r
-               'parameters' => Array (        \r
-                       'exclude' => 1,        \r
-                       'label' => 'LLL:EXT:macina_banners/locallang_db.php:tx_macinabanners_banners.parameters',        \r
-                       'config' => Array (\r
-                               'type' => 'text',\r
-                               'cols' => '30',    \r
-                               'rows' => '5',\r
-                       )\r
-               ),\r
-       ),\r
-       'types' => Array (\r
-               '0' => Array(\r
-                               'showitem' => '--div--;LLL:EXT:macina_banners/locallang_db.php:tx_macinabanners_banners.general,customer,l18n_parent,bannertype,sys_language_uid,parameters,--div--;LLL:EXT:macina_banners/locallang_db.php:tx_macinabanners_banners.bannerimage,image;;3;;1-1-1, alttext,url,--div--;LLL:EXT:macina_banners/locallang_db.php:tx_macinabanners_banners.view, placement;;;;1-1-1,pages, recursiv, excludepages,--div--;LLL:EXT:macina_banners/locallang_db.php:tx_macinabanners_banners.visibility,hidden;;1;;1-1-1,--div--;LLL:EXT:macina_banners/locallang_db.php:tx_macinabanners_banners.statistics,impressions, clicks'\r
-               ),\r
-               '1' => Array(\r
-                               'showitem' => '--div--;LLL:EXT:macina_banners/locallang_db.php:tx_macinabanners_banners.general,customer,l18n_parent,bannertype,sys_language_uid,parameters,--div--;LLL:EXT:macina_banners/locallang_db.php:tx_macinabanners_banners.flashfilm,swf;;;;1-1-1, url, flash_width, flash_height;;2,--div--;LLL:EXT:macina_banners/locallang_db.php:tx_macinabanners_banners.view, placement;;;;1-1-1,pages, recursiv, excludepages,--div--;LLL:EXT:macina_banners/locallang_db.php:tx_macinabanners_banners.visibility,hidden;;1;;1-1-1,--div--;LLL:EXT:macina_banners/locallang_db.php:tx_macinabanners_banners.statistics,impressions, clicks'\r
-               ),\r
-               '2' => Array(\r
-                               'showitem' => '--div--;LLL:EXT:macina_banners/locallang_db.php:tx_macinabanners_banners.general,customer,l18n_parent,bannertype,sys_language_uid,parameters,--div--;LLL:EXT:macina_banners/locallang_db.php:tx_macinabanners_banners.html,html,--div--;LLL:EXT:macina_banners/locallang_db.php:tx_macinabanners_banners.view, placement;;;;1-1-1,pages, recursiv, excludepages,--div--;LLL:EXT:macina_banners/locallang_db.php:tx_macinabanners_banners.visibility,hidden;;1;;1-1-1,--div--;LLL:EXT:macina_banners/locallang_db.php:tx_macinabanners_banners.statistics,impressions, clicks'\r
-               ),\r
-       ),\r
-       // '1' => Array('showitem' => 'bannertype, sys_language_uid, l18n_parent, swf;;;;1-1-1, flash_width, flash_height;;2, placement;;;;1-1-1, pages, recursiv, excludepages, customer;;;;1-1-1, impressions, hidden;;1;;1-1-1')\r
-       // '0' => Array('showitem' => 'bannertype, sys_language_uid, l18n_parent, image;;3;;1-1-1, alttext, url, placement;;;;1-1-1, pages, recursiv, excludepages, customer;;;;1-1-1,impressions, clicks, hidden;;1;;1-1-1'),;\r
-       'palettes' => Array (\r
-               '1' => Array('showitem' => 'starttime, endtime, fe_group'),\r
-               '2' => Array('showitem' => 'border_left, border_top, border_right, border_bottom'),\r
-               '3' => Array('showitem' => 'maxw, border_left, border_top, border_right, border_bottom'),\r
-               '4' => Array('showitem' => ''),\r
-               '5' => Array('showitem' => 'impressions')\r
-       )\r
-);\r
-//medialights: include itemProcFunc\r
-if (TYPO3_MODE=='BE') {\r
-       include_once(t3lib_extMgm::extPath('macina_banners').'class.tx_macinabanners_tt_content_tx_macinabanners_placement.php');\r
-}\r
-\r
-//medialights: include default categories if demanded\r
-$macinaCfg = unserialize($GLOBALS['TYPO3_CONF_VARS']['EXT']['extConf']['macina_banners']);\r
-if ($macinaCfg['activateDefaultCategories']) {\r
-       $TCA['tx_macinabanners_banners']['columns']['placement']['config']['items'] = array (\r
-               array('LLL:EXT:macina_banners/locallang_db.php:tx_macinabanners_banners.placement.I.0', 'top', t3lib_extMgm::extRelPath('macina_banners').'selicon_tx_macinabanners_banners_placement_0.gif'),\r
-               array('LLL:EXT:macina_banners/locallang_db.php:tx_macinabanners_banners.placement.I.1', 'right', t3lib_extMgm::extRelPath('macina_banners').'selicon_tx_macinabanners_banners_placement_1.gif'),\r
-               array('LLL:EXT:macina_banners/locallang_db.php:tx_macinabanners_banners.placement.I.2', 'bottom', t3lib_extMgm::extRelPath('macina_banners').'selicon_tx_macinabanners_banners_placement_2.gif'),\r
-               array('LLL:EXT:macina_banners/locallang_db.php:tx_macinabanners_banners.placement.I.3', 'left', t3lib_extMgm::extRelPath('macina_banners').'selicon_tx_macinabanners_banners_placement_3.gif'),\r
-       );\r
-}\r
-\r
-//medialights: configure the renderMode placement\r
-if ($macinaCfg['renderMode'] == 'singlebox' || $macinaCfg['renderMode'] == 'checkbox') {\r
-       $TCA['tx_macinabanners_banners']['columns']['placement']['config']['renderMode'] = $macinaCfg['renderMode'];\r
-}\r
-unset ($macinaCfg);\r
-\r
-\r
-\r
-//medialights: add definition for 'tx_macinabanners_categories'\r
-$TCA['tx_macinabanners_categories'] = Array (\r
-       'ctrl' => $TCA['tx_macinabanners_categories']['ctrl'],\r
-       'interface' => Array (\r
-               'showRecordFieldList' => 'description'\r
-       ),\r
-       'feInterface' => $TCA['tx_macinabanners_categories']['feInterface'],\r
-       'columns' => Array (\r
-               'description' => Array (        \r
-                       'exclude' => 1,        \r
-                       'label' => 'LLL:EXT:macina_banners/locallang_db.php:tx_macinabanners_categories.description',        \r
-                       'config' => Array (\r
-                               'type' => 'input',    \r
-                               'size' => '30',    \r
-                               'eval' => 'trim',\r
-                       )\r
-               ),\r
-               'icon' => Array (        \r
-                       'exclude' => 1,        \r
-                       'label' => 'LLL:EXT:macina_banners/locallang_db.php:tx_macinabanners_categories.icon',        \r
-                       'config' => Array (\r
-                               'type' => 'group',\r
-                               'internal_type' => 'file',\r
-                               'allowed' => $GLOBALS['TYPO3_CONF_VARS']['GFX']['imagefile_ext'],    \r
-                               'max_size' => 500,    \r
-                               'uploadfolder' => 'uploads/tx_macinabanners',\r
-                               'show_thumbs' => 1,    \r
-                               'size' => 1,    \r
-                               'minitems' => 0,\r
-                               'maxitems' => 1,\r
-                       )\r
-        ),\r
-       ),\r
-       'types' => Array (\r
-               '0' => Array('showitem' => 'description;;;;1-1-1, icon')\r
-       ),\r
-       'palettes' => Array (\r
-               '1' => Array('showitem' => '')\r
-       )\r
-);\r
-\r
+<?php
+if (!defined ('TYPO3_MODE'))   die ('Access denied.');
+#aenderung 22.11.04 spracherweiterung
+$TCA['tx_macinabanners_banners'] = Array (
+       'ctrl' => $TCA['tx_macinabanners_banners']['ctrl'],
+       'interface' => Array (
+               'showRecordFieldList' => 'hidden,starttime,endtime,fe_group,sys_language_uid,t3ver_label,l18n_parent,customer,bannertype,image,maxw,alttext,url,swf,flash_width,flash_height,html,placement,border_top,border_right,border_bottom,border_left,pages,recursiv,excludepages,impressions,clicks,parameters'
+       ),
+       'feInterface' => $TCA['tx_macinabanners_banners']['feInterface'],
+       'columns' => Array (
+               'hidden' => Array (
+                       'exclude' => 1,
+                       'label' => 'LLL:EXT:lang/locallang_general.php:LGL.hidden',
+                       'config' => Array (
+                               'type' => 'check',
+                               'default' => '0'
+                       )
+               ),
+               'starttime' => Array (
+                       'exclude' => 1,
+                       'label' => 'LLL:EXT:lang/locallang_general.php:LGL.starttime',
+                       'config' => Array (
+                               'type' => 'input',
+                               'size' => '8',
+                               'max' => '20',
+                               'eval' => 'date',
+                               'default' => '0',
+                               'checkbox' => '0'
+                       )
+               ),
+               'endtime' => Array (
+                       'exclude' => 1,
+                       'label' => 'LLL:EXT:lang/locallang_general.php:LGL.endtime',
+                       'config' => Array (
+                               'type' => 'input',
+                               'size' => '8',
+                               'max' => '20',
+                               'eval' => 'date',
+                               'checkbox' => '0',
+                               'default' => '0',
+                               'range' => Array (
+                                       'upper' => mktime(0,0,0,12,31,2020),
+                                       'lower' => mktime(0,0,0,date('m')-1,date('d'),date('Y'))
+                               )
+                       )
+               ),
+               'fe_group' => Array (
+                       'exclude' => 1,
+                       'label' => 'LLL:EXT:lang/locallang_general.php:LGL.fe_group',
+                       'config' => Array (
+                               'type' => 'select',
+                               'items' => Array (
+                                       Array('', 0),
+                                       Array('LLL:EXT:lang/locallang_general.php:LGL.hide_at_login', -1),
+                                       Array('LLL:EXT:lang/locallang_general.php:LGL.any_login', -2),
+                                       Array('LLL:EXT:lang/locallang_general.php:LGL.usergroups', '--div--')
+                               ),
+                               'foreign_table' => 'fe_groups'
+                       )
+               ),
+               'customer' => Array (
+                       'exclude' => 0,
+                       'label' => 'LLL:EXT:macina_banners/locallang_db.php:tx_macinabanners_banners.customer',
+                       'config' => Array (
+                               'type' => 'input',
+                               'size' => '30',
+                               'eval' => 'required',
+                       )
+               ),
+               'bannertype' => Array (
+                       'exclude' => 0,
+                       'label' => 'LLL:EXT:macina_banners/locallang_db.php:tx_macinabanners_banners.bannertype',
+                       'config' => Array (
+                               'type' => 'select',
+                               'items' => Array (
+                                       Array('LLL:EXT:macina_banners/locallang_db.php:tx_macinabanners_banners.bannertype.I.0', '0'),
+                                       Array('LLL:EXT:macina_banners/locallang_db.php:tx_macinabanners_banners.bannertype.I.1', '1'),
+                                       Array('LLL:EXT:macina_banners/locallang_db.php:tx_macinabanners_banners.bannertype.I.2', '2'),
+                               ),
+                               'size' => 1,
+                               'maxitems' => 1,
+                       )
+               ),
+               't3ver_label' => Array (
+                       'exclude' => 0,
+                       'label' => 'LLL:EXT:lang/locallang_general.php:LGL.versionLabel',
+                       'config' => Array (
+                               'type' => 'input',
+                               'size' => 30,
+                               'max' => 30,
+                       )
+               ),
+               'sys_language_uid' => Array (
+                       'exclude' => 0,
+                       'label' => 'LLL:EXT:lang/locallang_general.php:LGL.language',
+                       'config' => Array (
+                               'type' => 'select',
+                               'foreign_table' => 'sys_language',
+                               'foreign_table_where' => 'ORDER BY sys_language.title',
+                               'items' => Array(
+                                       Array('LLL:EXT:lang/locallang_general.php:LGL.allLanguages',-1),
+                                       Array('LLL:EXT:lang/locallang_general.php:LGL.default_value',0)
+                               )
+                       )
+               ),
+               'l18n_parent' => Array (
+                       'displayCond' => 'FIELD:sys_language_uid:>:0',
+                       'exclude' => 0,
+                       'label' => 'LLL:EXT:lang/locallang_general.php:LGL.l18n_parent',
+                       'config' => Array (
+                               'type' => 'select',
+                               'items' => Array (
+                                       Array('', 0),
+                               ),
+                               'foreign_table' => 'tx_macinabanners_banners',
+                               'foreign_table_where' => 'AND tx_macinabanners_banners.pid=###CURRENT_PID### AND  tx_macinabanners_banners.sys_language_uid IN (-1,0)',
+                       )
+               ),
+               'l18n_diffsource' => Array(
+                       'config'=>array('type'=>'passthrough')
+               ),
+               'image' => Array (
+                       'exclude' => 0,
+                       'label' => 'LLL:EXT:macina_banners/locallang_db.php:tx_macinabanners_banners.image',
+                       'config' => Array (
+                               'type' => 'group',
+                               'internal_type' => 'file',
+                               'allowed' => $GLOBALS['TYPO3_CONF_VARS']['GFX']['imagefile_ext'],
+                               'max_size' => 1000,
+                               'uploadfolder' => 'uploads/tx_macinabanners',
+                               'show_thumbs' => 1,
+                               'size' => 1,
+                               'minitems' => 0,
+                               'maxitems' => 1,
+                       )
+               ),
+               'maxw' => Array (
+                       'exclude' => 0,
+                       'label' => 'LLL:EXT:macina_banners/locallang_db.php:tx_macinabanners_banners.maxw',
+                       'config' => Array (
+                               'type' => 'input',
+                               'size' => '5',
+                               'eval' => 'int,nospace',
+                       )
+               ),
+               'alttext' => Array (
+                       'exclude' => 0,
+                       'label' => 'LLL:EXT:macina_banners/locallang_db.php:tx_macinabanners_banners.alttext',
+                       'config' => Array (
+                               'type' => 'input',
+                               'size' => '30',
+                       )
+               ),
+               'url' => Array (
+                       'exclude' => 0,
+                       'label' => 'LLL:EXT:macina_banners/locallang_db.php:tx_macinabanners_banners.url',
+                       'config' => Array (
+                               'type' => 'input',
+                               'size' => '15',
+                               'max' => '255',
+                               'checkbox' => '',
+                               'eval' => 'trim',
+                               'wizards' => Array(
+                                       '_PADDING' => 2,
+                                       'link' => Array(
+                                               'type' => 'popup',
+                                               'title' => 'Link',
+                                               'icon' => 'link_popup.gif',
+                                               'script' => 'browse_links.php?mode=wizard',
+                                               'JSopenParams' => 'height=300,width=500,status=0,menubar=0,scrollbars=1'
+                                       )
+                               )
+                       )
+               ),
+               'swf' => Array (
+                       'exclude' => 0,
+                       'label' => 'LLL:EXT:macina_banners/locallang_db.php:tx_macinabanners_banners.swf',
+                       'config' => Array (
+                               'type' => 'group',
+                               'internal_type' => 'file',
+                               'allowed' => '',
+                               'disallowed' => 'php,php3',
+                               'max_size' => 1000,
+                               'uploadfolder' => 'uploads/tx_macinabanners',
+                               'size' => 1,
+                               'minitems' => 0,
+                               'maxitems' => 1,
+                       )
+               ),
+               'flash_width' => Array (
+                       'exclude' => 0,
+                       'label' => 'LLL:EXT:macina_banners/locallang_db.php:tx_macinabanners_banners.flash_width',
+                       'config' => Array (
+                               'type' => 'input',
+                               'size' => '5',
+                               'eval' => 'required,int,nospace',
+                       )
+               ),
+               'flash_height' => Array (
+                       'exclude' => 0,
+                       'label' => 'LLL:EXT:macina_banners/locallang_db.php:tx_macinabanners_banners.flash_height',
+                       'config' => Array (
+                               'type' => 'input',
+                               'size' => '5',
+                               'eval' => 'required,int,nospace',
+                       )
+               ),
+               //medialights: new type html
+               'html' => Array (
+                       'exclude' => 1,
+                       'label' => 'LLL:EXT:macina_banners/locallang_db.php:tx_macinabanners_banners.html',
+                       'config' => Array (
+                               'type' => 'text',
+                               'cols' => '30',
+                               'rows' => '5',
+                       )
+               ),
+               'placement' => Array (
+                       'exclude' => 0,
+                       'label' => 'LLL:EXT:macina_banners/locallang_db.php:tx_macinabanners_banners.placement',
+                       'config' => Array (
+                               'type' => 'select',
+                               /* medialights: default categories are only added if configured in the EM
+                               'items' => Array (
+                                       Array('LLL:EXT:macina_banners/locallang_db.php:tx_macinabanners_banners.placement.I.0', 'top', t3lib_extMgm::extRelPath('macina_banners').'selicon_tx_macinabanners_banners_placement_0.gif'),
+                                       Array('LLL:EXT:macina_banners/locallang_db.php:tx_macinabanners_banners.placement.I.1', 'right', t3lib_extMgm::extRelPath('macina_banners').'selicon_tx_macinabanners_banners_placement_1.gif'),
+                                       Array('LLL:EXT:macina_banners/locallang_db.php:tx_macinabanners_banners.placement.I.2', 'bottom', t3lib_extMgm::extRelPath('macina_banners').'selicon_tx_macinabanners_banners_placement_2.gif'),
+                                       Array('LLL:EXT:macina_banners/locallang_db.php:tx_macinabanners_banners.placement.I.3', 'left', t3lib_extMgm::extRelPath('macina_banners').'selicon_tx_macinabanners_banners_placement_3.gif'),
+                               ),
+                               */
+                               'items' => Array (),
+                               'itemsProcFunc' => 'tx_macinabanners_tt_content_tx_macinabanners_placement->main',
+                               //medialights: size and maxitems increased from 1
+                               'size' => 5,
+                               'maxitems' => 50,
+
+                               //medialights: activate icons in select boxes
+                               'iconsInOptionTags' => 1
+                       )
+               ),
+               'border_top' => Array (
+                       'exclude' => 0,
+                       'label' => 'LLL:EXT:macina_banners/locallang_db.php:tx_macinabanners_banners.border_top',
+                       'config' => Array (
+                               'type' => 'input',
+                               'size' => '5',
+                               'max' => '4',
+                               'range' => Array ('lower'=>0,'upper'=>1000),
+                               'eval' => 'int,nospace',
+                       )
+               ),
+               'border_right' => Array (
+                       'exclude' => 0,
+                       'label' => 'LLL:EXT:macina_banners/locallang_db.php:tx_macinabanners_banners.border_right',
+                       'config' => Array (
+                               'type' => 'input',
+                               'size' => '5',
+                               'max' => '4',
+                               'range' => Array ('lower'=>0,'upper'=>1000),
+                               'eval' => 'int,nospace',
+                       )
+               ),
+               'border_bottom' => Array (
+                       'exclude' => 0,
+                       'label' => 'LLL:EXT:macina_banners/locallang_db.php:tx_macinabanners_banners.border_bottom',
+                       'config' => Array (
+                               'type' => 'input',
+                               'size' => '5',
+                               'max' => '4',
+                               'range' => Array ('lower'=>0,'upper'=>1000),
+                               'eval' => 'int,nospace',
+                       )
+               ),
+               'border_left' => Array (
+                       'exclude' => 0,
+                       'label' => 'LLL:EXT:macina_banners/locallang_db.php:tx_macinabanners_banners.border_left',
+                       'config' => Array (
+                               'type' => 'input',
+                               'size' => '5',
+                               'max' => '4',
+                               'range' => Array ('lower'=>0,'upper'=>1000),
+                               'eval' => 'int,nospace',
+                       )
+               ),
+               'pages' => Array (
+                       'exclude' => 0,
+                       'label' => 'LLL:EXT:macina_banners/locallang_db.php:tx_macinabanners_banners.pages',
+                       'config' => Array (
+                               'type' => 'group',
+                               'internal_type' => 'db',
+                               'allowed' => 'pages',
+                               'size' => 3,
+                               'minitems' => 0,
+                               'maxitems' => 100,
+                       )
+               ),
+               'recursiv' => Array (
+                       'exclude' => 1,
+                       'label' => 'LLL:EXT:macina_banners/locallang_db.php:tx_macinabanners_banners.recursiv',
+                       'config' => Array (
+                               'type' => 'check',
+                               'default' => '0'
+                       )
+               ),
+               'excludepages' => Array (
+                       'exclude' => 0,
+                       'label' => 'LLL:EXT:macina_banners/locallang_db.php:tx_macinabanners_banners.excludepages',
+                       'config' => Array (
+                               'type' => 'group',
+                               'internal_type' => 'db',
+                               'allowed' => 'pages',
+                               'size' => 3,
+                               'minitems' => 0,
+                               'maxitems' => 100,
+                       )
+               ),
+               'impressions' => Array (
+                       'exclude' => 1,
+                       'label' => 'LLL:EXT:macina_banners/locallang_db.php:tx_macinabanners_banners.impressions',
+                       'config' => Array (
+                               'type' => 'none',
+                       )
+               ),
+               'clicks' => Array (
+                       'exclude' => 1,
+                       'label' => 'LLL:EXT:macina_banners/locallang_db.php:tx_macinabanners_banners.clicks',
+                       'config' => Array (
+                               'type' => 'none',
+                       )
+               ),
+               'parameters' => Array (
+                       'exclude' => 1,
+                       'label' => 'LLL:EXT:macina_banners/locallang_db.php:tx_macinabanners_banners.parameters',
+                       'config' => Array (
+                               'type' => 'text',
+                               'cols' => '30',
+                               'rows' => '5',
+                       )
+               ),
+       ),
+       'types' => Array (
+               '0' => Array(
+                               'showitem' => '--div--;LLL:EXT:macina_banners/locallang_db.php:tx_macinabanners_banners.general,customer,l18n_parent,bannertype,sys_language_uid,parameters,--div--;LLL:EXT:macina_banners/locallang_db.php:tx_macinabanners_banners.bannerimage,image;;3;;1-1-1, alttext,url,--div--;LLL:EXT:macina_banners/locallang_db.php:tx_macinabanners_banners.view, placement;;;;1-1-1,pages, recursiv, excludepages,--div--;LLL:EXT:macina_banners/locallang_db.php:tx_macinabanners_banners.visibility,hidden;;1;;1-1-1,--div--;LLL:EXT:macina_banners/locallang_db.php:tx_macinabanners_banners.statistics,impressions, clicks'
+               ),
+               '1' => Array(
+                               'showitem' => '--div--;LLL:EXT:macina_banners/locallang_db.php:tx_macinabanners_banners.general,customer,l18n_parent,bannertype,sys_language_uid,parameters,--div--;LLL:EXT:macina_banners/locallang_db.php:tx_macinabanners_banners.flashfilm,swf;;;;1-1-1, url, flash_width, flash_height;;2,--div--;LLL:EXT:macina_banners/locallang_db.php:tx_macinabanners_banners.view, placement;;;;1-1-1,pages, recursiv, excludepages,--div--;LLL:EXT:macina_banners/locallang_db.php:tx_macinabanners_banners.visibility,hidden;;1;;1-1-1,--div--;LLL:EXT:macina_banners/locallang_db.php:tx_macinabanners_banners.statistics,impressions, clicks'
+               ),
+               '2' => Array(
+                               'showitem' => '--div--;LLL:EXT:macina_banners/locallang_db.php:tx_macinabanners_banners.general,customer,l18n_parent,bannertype,sys_language_uid,parameters,--div--;LLL:EXT:macina_banners/locallang_db.php:tx_macinabanners_banners.html,html,--div--;LLL:EXT:macina_banners/locallang_db.php:tx_macinabanners_banners.view, placement;;;;1-1-1,pages, recursiv, excludepages,--div--;LLL:EXT:macina_banners/locallang_db.php:tx_macinabanners_banners.visibility,hidden;;1;;1-1-1,--div--;LLL:EXT:macina_banners/locallang_db.php:tx_macinabanners_banners.statistics,impressions, clicks'
+               ),
+       ),
+       // '1' => Array('showitem' => 'bannertype, sys_language_uid, l18n_parent, swf;;;;1-1-1, flash_width, flash_height;;2, placement;;;;1-1-1, pages, recursiv, excludepages, customer;;;;1-1-1, impressions, hidden;;1;;1-1-1')
+       // '0' => Array('showitem' => 'bannertype, sys_language_uid, l18n_parent, image;;3;;1-1-1, alttext, url, placement;;;;1-1-1, pages, recursiv, excludepages, customer;;;;1-1-1,impressions, clicks, hidden;;1;;1-1-1'),;
+       'palettes' => Array (
+               '1' => Array('showitem' => 'starttime, endtime, fe_group'),
+               '2' => Array('showitem' => 'border_left, border_top, border_right, border_bottom'),
+               '3' => Array('showitem' => 'maxw, border_left, border_top, border_right, border_bottom'),
+               '4' => Array('showitem' => ''),
+               '5' => Array('showitem' => 'impressions')
+       )
+);
+//medialights: include itemProcFunc
+if (TYPO3_MODE=='BE') {
+       include_once(t3lib_extMgm::extPath('macina_banners').'class.tx_macinabanners_tt_content_tx_macinabanners_placement.php');
+}
+
+//medialights: include default categories if demanded
+$macinaCfg = unserialize($GLOBALS['TYPO3_CONF_VARS']['EXT']['extConf']['macina_banners']);
+if ($macinaCfg['activateDefaultCategories']) {
+       $TCA['tx_macinabanners_banners']['columns']['placement']['config']['items'] = array (
+               array('LLL:EXT:macina_banners/locallang_db.php:tx_macinabanners_banners.placement.I.0', 'top', t3lib_extMgm::extRelPath('macina_banners').'selicon_tx_macinabanners_banners_placement_0.gif'),
+               array('LLL:EXT:macina_banners/locallang_db.php:tx_macinabanners_banners.placement.I.1', 'right', t3lib_extMgm::extRelPath('macina_banners').'selicon_tx_macinabanners_banners_placement_1.gif'),
+               array('LLL:EXT:macina_banners/locallang_db.php:tx_macinabanners_banners.placement.I.2', 'bottom', t3lib_extMgm::extRelPath('macina_banners').'selicon_tx_macinabanners_banners_placement_2.gif'),
+               array('LLL:EXT:macina_banners/locallang_db.php:tx_macinabanners_banners.placement.I.3', 'left', t3lib_extMgm::extRelPath('macina_banners').'selicon_tx_macinabanners_banners_placement_3.gif'),
+       );
+}
+
+//medialights: configure the renderMode placement
+if ($macinaCfg['renderMode'] == 'singlebox' || $macinaCfg['renderMode'] == 'checkbox') {
+       $TCA['tx_macinabanners_banners']['columns']['placement']['config']['renderMode'] = $macinaCfg['renderMode'];
+}
+unset ($macinaCfg);
+
+
+//medialights: add definition for 'tx_macinabanners_categories'
+$TCA['tx_macinabanners_categories'] = Array (
+       'ctrl' => $TCA['tx_macinabanners_categories']['ctrl'],
+       'interface' => Array (
+               'showRecordFieldList' => 'description'
+       ),
+       'feInterface' => $TCA['tx_macinabanners_categories']['feInterface'],
+       'columns' => Array (
+               'description' => Array (
+                       'exclude' => 1,
+                       'label' => 'LLL:EXT:macina_banners/locallang_db.php:tx_macinabanners_categories.description',
+                       'config' => Array (
+                               'type' => 'input',
+                               'size' => '30',
+                               'eval' => 'trim',
+                       )
+               ),
+               'icon' => Array (
+                       'exclude' => 1,
+                       'label' => 'LLL:EXT:macina_banners/locallang_db.php:tx_macinabanners_categories.icon',
+                       'config' => Array (
+                               'type' => 'group',
+                               'internal_type' => 'file',
+                               'allowed' => $GLOBALS['TYPO3_CONF_VARS']['GFX']['imagefile_ext'],
+                               'max_size' => 500,
+                               'uploadfolder' => 'uploads/tx_macinabanners',
+                               'show_thumbs' => 1,
+                               'size' => 1,
+                               'minitems' => 0,
+                               'maxitems' => 1,
+                       )
+        ),
+       ),
+       'types' => Array (
+               '0' => Array('showitem' => 'description;;;;1-1-1, icon')
+       ),
+       'palettes' => Array (
+               '1' => Array('showitem' => '')
+       )
+);
+
 ?>
\ No newline at end of file