diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..dfe0770 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,2 @@ +# Auto detect text files and perform LF normalization +* text=auto diff --git a/Classes/Controller/BackendController.php b/Classes/Controller/BackendController.php new file mode 100644 index 0000000..af902ad --- /dev/null +++ b/Classes/Controller/BackendController.php @@ -0,0 +1,314 @@ + + * + * 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 3 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! + ***************************************************************/ + +/** + * + * + * @package camaliga + * @license http://www.gnu.org/licenses/gpl.html GNU General Public License, version 3 or later + * + */ +class BackendController extends \TYPO3\CMS\Extbase\Mvc\Controller\ActionController { + + /** + * contentRepository + * + * @var \Quizpalme\Camaliga\Domain\Repository\ContentRepository + * @inject + */ + protected $contentRepository; + + /** + * Zähler + * + * @var \integer + */ + protected $nr = 0; + + + /** + * Ordner-ID + * + * @return integer + */ + protected function getCurrentPageId() { + $pageId = (integer) \TYPO3\CMS\Core\Utility\GeneralUtility::_GP('id'); + if ($pageId > 0) { + return $pageId; + } + // get current site root + $rootPages = $GLOBALS['TYPO3_DB']->exec_SELECTgetRows('uid', 'pages', 'deleted=0 AND hidden=0 AND is_siteroot=1', '', '', '1'); + if (count($rootPages) > 0) { + return (integer) $rootPages[0]['uid']; + } + // fallback + return (integer) self::DEFAULT_BACKEND_STORAGE_PID; + } + + /** + * action index + * + * @return void + */ + public function indexAction() { + $this->view->assign('pid', intval($this->getCurrentPageId())); + } + + /** + * action thumb + * + * @return void + */ + public function thumbAction() { + $pid = intval($this->getCurrentPageId()); + $saved = 0; + $configurationUtility = unserialize($GLOBALS['TYPO3_CONF_VARS']['EXT']['extConf']['camaliga']); + $enableFal = intval($configurationUtility['enableFal']); + + // save new order first + if ($this->request->hasArgument('camelements')) { + $updateA = array(); + $order = $this->request->getArgument('camelements'); + if (is_array($order)) { + foreach ($order as $key => $value) { + if ($key > 0 && $value > 0) { + $updateA['sorting'] = $value; + $GLOBALS['TYPO3_DB']->exec_UPDATEquery('tx_camaliga_domain_model_content', 'uid=' . intval($key), $updateA); + $saved = 1; + } + } + } + } + + // Elemente sortiert holen + $contents = $this->contentRepository->findAll('sorting', 'asc', FALSE, array($pid)); + + $this->view->assign('fal', $enableFal); + $this->view->assign('pid', $pid); + $this->view->assign('saved', $saved); + $this->view->assign('contents', $contents); + } + + + /** + * action Karussell-import + * + * @return void + */ + public function importAction() { + $oldIDs = array(); + $pid = intval($this->getCurrentPageId()); + $res = $GLOBALS['TYPO3_DB']->sql_query("SHOW TABLES LIKE 'tx_karussell_inhalt'"); + if ($GLOBALS['TYPO3_DB']->sql_num_rows($res)>0) { + // get Karussell-entries for current PID + $entries = $GLOBALS['TYPO3_DB']->exec_SELECTgetRows('*', 'tx_karussell_inhalt', 'deleted=0 AND hidden=0 AND pid=' . $pid, 'sys_language_uid, sorting', '', ''); + if (count($entries) > 0) { + if ($this->request->hasArgument('cimport') || $this->request->hasArgument('dimport')) { + // Import + $insert = array(); + $insert['pid'] = $pid; + $insert['tstamp'] = time(); + $insert['crdate'] = time(); + $insert['cruser_id'] = $GLOBALS['BE_USER']->user['uid']; + for ($i=0; $icheckImage($entries[$i]['bild']); + $insert['t3_origuid'] = ($entries[$i]['t3_origuid']) ? intval($oldIDs[$entries[$i]['t3_origuid']]) : 0; + $insert['l10n_parent'] = ($entries[$i]['l10n_parent']) ? intval($oldIDs[$entries[$i]['l10n_parent']]) : 0; + $insert['sys_language_uid'] = $entries[$i]['sys_language_uid']; + $success = $GLOBALS['TYPO3_DB']->exec_INSERTquery('tx_camaliga_domain_model_content', $insert); + if ($success){ + $oldIDs[$entries[$i]['uid']] = $GLOBALS['TYPO3_DB']->sql_insert_id(); + } + copy(PATH_site . 'uploads/tx_karussell/'.$entries[$i]['bild'], PATH_site . 'uploads/tx_camaliga/' . $insert['image']); + if ($this->request->hasArgument('dimport')) + unlink(PATH_site . 'uploads/tx_karussell/'.$entries[$i]['bild']); + } + $this->addFlashMessage( + \TYPO3\CMS\Extbase\Utility\LocalizationUtility::translate('LLL:EXT:camaliga/Resources/Private/Language/locallang_be.xlf:import.ok', 'OK'), + 'OK', + \TYPO3\CMS\Core\Messaging\FlashMessage::OK); + if ($this->request->hasArgument('dimport')) { + $GLOBALS['TYPO3_DB']->exec_DELETEquery('tx_karussell_inhalt', 'deleted=0 AND hidden=0 AND pid=' . $pid); + $this->addFlashMessage( + \TYPO3\CMS\Extbase\Utility\LocalizationUtility::translate('LLL:EXT:camaliga/Resources/Private/Language/locallang_be.xlf:import.del', 'deleted'), + 'OK', + \TYPO3\CMS\Core\Messaging\FlashMessage::OK); + } + } + + $this->view->assign('entries', $entries); + $this->view->assign('error', 0); + } else { + $this->view->assign('error', 1); + } + } else { + $this->view->assign('error', 1); + } + } + + /** + * action tt_news-import + * + * @return void + */ + public function importNewsAction() { + $pid = intval($this->getCurrentPageId()); + $oldIDs = array(); + $res = $GLOBALS['TYPO3_DB']->sql_query("SHOW TABLES LIKE 'tt_news'"); + if ($GLOBALS['TYPO3_DB']->sql_num_rows($res)>0) { + // get News-entries for current PID + $entries = $GLOBALS['TYPO3_DB']->exec_SELECTgetRows('*', 'tt_news', 'deleted=0 AND hidden=0 AND pid=' . $pid, '', 'tstamp DESC', ''); + if (count($entries) > 0) { + if ($this->request->hasArgument('cimport') || $this->request->hasArgument('dimport')) { + // Import + $insert = array(); + $insert['pid'] = $pid; + $insert['cruser_id'] = $GLOBALS['BE_USER']->user['uid']; + for ($i=0; $icheckImage($entries[$i]['image']); + $insert['sys_language_uid'] = $entries[$i]['sys_language_uid']; + $success = $GLOBALS['TYPO3_DB']->exec_INSERTquery('tx_camaliga_domain_model_content', $insert); + if ($success){ + $oldIDs[$entries[$i]['uid']] = $GLOBALS['TYPO3_DB']->sql_insert_id(); + } + if ($entries[$i]['image']) { + copy(PATH_site . 'uploads/pics/' . $entries[$i]['image'], PATH_site . 'uploads/tx_camaliga/' . $insert['image']); + if ($this->request->hasArgument('dimport') && is_file(PATH_site.'uploads/pics/' . $entries[$i]['image'])) + unlink(PATH_site.'uploads/pics/' . $entries[$i]['image']); + } + } + + // Kategorien ebenfalls kopieren + $i = 0; + $catArray = array(); + $mmArray = array(); + foreach ($oldIDs as $key => $value) { + $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery('mm.uid_foreign, mm.uid_local, mm.sorting AS mmsort, cat.uid, cat.crdate, cat.tstamp, cat.title, cat.description, cat.sorting AS catsort', + '`tt_news_cat` AS cat, `tt_news_cat_mm` AS mm', + 'cat.uid=mm.uid_foreign AND mm.uid_local=' . $key); + $rows = $GLOBALS['TYPO3_DB']->sql_num_rows($res); + if ($rows>0) { + while($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res)){ + $uid = $row['uid']; + $catArray[$uid] = array(); + $catArray[$uid]['crdate'] = $row['crdate']; + $catArray[$uid]['tstamp'] = $row['tstamp']; + $catArray[$uid]['title'] = $row['title']; + $catArray[$uid]['description'] = $row['description']; + $catArray[$uid]['sorting'] = $row['catsort']; + $mmArray[$i] = array(); + $mmArray[$i]['uid_local'] = $row['uid_local']; // Die News + $mmArray[$i]['uid_foreign'] = $row['uid_foreign']; // Die Kategorie + $mmArray[$i]['sorting'] = $row['mmsort']; + $i++; + } + } + $GLOBALS['TYPO3_DB']->sql_free_result($res); + } + // Kategorien einfügen + foreach ($catArray as $key => $values) { + $values['pid'] = $pid; + $values['cruser_id'] = $GLOBALS['BE_USER']->user['uid']; + $success = $GLOBALS['TYPO3_DB']->exec_INSERTquery('sys_category', $values); + if ($success){ + $catArray[$key]['uid'] = $GLOBALS['TYPO3_DB']->sql_insert_id(); + } + } + // Kategorie-Relationen einfügen + $mmInsertArray = array('tablenames' => 'tx_camaliga_domain_model_content', 'fieldname' => 'categories'); + foreach ($mmArray as $key => $values) { + $mmInsertArray['uid_local'] = $catArray[$values['uid_foreign']]['uid']; // Die Kategorie + $mmInsertArray['uid_foreign'] = $oldIDs[$values['uid_local']]; // Das Camaliga-Element + $mmInsertArray['sorting'] = $values['sorting']; + $success = $GLOBALS['TYPO3_DB']->exec_INSERTquery('sys_category_record_mm', $mmInsertArray); + } + + // Meldung + $this->addFlashMessage( + \TYPO3\CMS\Extbase\Utility\LocalizationUtility::translate('LLL:EXT:camaliga/Resources/Private/Language/locallang_be.xlf:import.ok', 'OK'), + 'OK', + \TYPO3\CMS\Core\Messaging\FlashMessage::OK); + if ($this->request->hasArgument('dimport')) { + $GLOBALS['TYPO3_DB']->exec_DELETEquery('tt_news', 'deleted=0 AND hidden=0 AND pid=' . $pid); + $this->addFlashMessage( + \TYPO3\CMS\Extbase\Utility\LocalizationUtility::translate('LLL:EXT:camaliga/Resources/Private/Language/locallang_be.xlf:import.del', 'deleted'), + 'OK', + \TYPO3\CMS\Core\Messaging\FlashMessage::OK); + } + } + + $this->view->assign('entries', $entries); + $this->view->assign('error', 0); + } else { + $this->view->assign('error', 1); + } + } else { + $this->view->assign('error', 1); + } + } + + + + /** + * Prüft, ob ein Bild schon vorhanden ist + * + * @return string + */ + function checkImage($bild) { + if (is_file(PATH_site . 'uploads/tx_camaliga/' . $bild)) { + // wenn das Bild schon da ist, den Dateinamen ändern! + for ($j=1;$j<500;$j++) { + if (!is_file(PATH_site . 'uploads/tx_camaliga/' . $j . '_' . $bild)) { + $bild = $j . '_' . $bild; + break; + } + } + } + return $bild; + } +} +?> diff --git a/Classes/Controller/ContentController.php b/Classes/Controller/ContentController.php new file mode 100644 index 0000000..31414e6 --- /dev/null +++ b/Classes/Controller/ContentController.php @@ -0,0 +1,1110 @@ + + * + * 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 3 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! + ***************************************************************/ + +/** + * Content Controller: der Körper der Extension + * + * @package camaliga + * @license http://www.gnu.org/licenses/gpl.html GNU General Public License, version 3 or later + * + */ +class ContentController extends \TYPO3\CMS\Extbase\Mvc\Controller\ActionController { + + /** + * contentRepository + * + * @var \Quizpalme\Camaliga\Domain\Repository\ContentRepository + */ + protected $contentRepository; + + /** + * configurationManager + * + * @var \TYPO3\CMS\Extbase\Configuration\ConfigurationManagerInterface + */ + protected $configurationManager; + + /** + * templatePath + * + * @var \string Pfad zu den Templates + */ + protected $templatePath; + + /** + * Injects the configuration manager, retrieves the plugin settings from it, + * merges / overrides the FlexForm settings with Typoscript settings if FlexForm setting is empty + * + * @param \TYPO3\CMS\Extbase\Configuration\ConfigurationManagerInterface $configurationManager Instance of the Configuration Manager + * @return void + */ + public function injectConfigurationManager(\TYPO3\CMS\Extbase\Configuration\ConfigurationManagerInterface $configurationManager) { + //parent::injectConfigurationManager($configurationManager); + $this->configurationManager = $configurationManager; + + /* $tsSettings = $this->configurationManager->getConfiguration( + \TYPO3\CMS\Extbase\Configuration\ConfigurationManagerInterface::CONFIGURATION_TYPE_FRAMEWORK, + 'Camaliga', + 'Pi1' + ); */ + $tsSettings = $this->configurationManager->getConfiguration( + \TYPO3\CMS\Extbase\Configuration\ConfigurationManagerInterface::CONFIGURATION_TYPE_FULL_TYPOSCRIPT + ); + $this->templatePath = $tsSettings['plugin.']['tx_camaliga.']['view.']['templateRootPaths.'][1]; + if ($this->templatePath == 'EXT:camaliga/Resources/Private/Templates/') // wird so nicht verdaut ;-( + $this->templatePath = 'typo3conf/ext/camaliga/Resources/Private/Templates/'; + $tsSettings = $tsSettings['plugin.']['tx_camaliga.']['settings.']; + $originalSettings = $this->configurationManager->getConfiguration( + \TYPO3\CMS\Extbase\Configuration\ConfigurationManagerInterface::CONFIGURATION_TYPE_SETTINGS + ); + /* \TYPO3\CMS\Extbase\Utility\DebuggerUtility::var_dump($tsSettings); */ + + // start override + if (isset($tsSettings['overrideFlexformSettingsIfEmpty']) && $tsSettings['overrideFlexformSettingsIfEmpty']==1) { + // if flexform setting is empty and value is available in TS + foreach ($tsSettings as $key=>$value) { + if ($key == 'img.' || $key == 'item.' || $key == 'extended.' || $key == 'bootstrap.') continue; + if (!$originalSettings[$key] && isset($value)) + $originalSettings[$key] = $value; + } + if (is_array($tsSettings['img.'])) + foreach ($tsSettings['img.'] as $key=>$value) { + if ((!$originalSettings['img'][$key] && $originalSettings['img'][$key]!=='0') && isset($value)) + $originalSettings['img'][$key] = $value; + } + if (is_array($tsSettings['item.'])) + foreach ($tsSettings['item.'] as $key=>$value) { + if ((!$originalSettings['item'][$key] && $originalSettings['item'][$key]!=='0') && isset($value)) + $originalSettings['item'][$key] = $value; + } + if (is_array($tsSettings['more.'])) + foreach ($tsSettings['more.'] as $key=>$value) { + if ((!$originalSettings['more'][$key] && $originalSettings['more'][$key]!=='0') && isset($value)) + $originalSettings['more'][$key] = $value; + } + if (is_array($tsSettings['extended.'])) + foreach ($tsSettings['extended.'] as $key=>$value) { + if ((!$originalSettings['extended'][$key] && $originalSettings['extended'][$key]!=='0') && isset($value)) + $originalSettings['extended'][$key] = $value; + } + if (is_array($tsSettings['bootstrap.'])) + foreach ($tsSettings['bootstrap.'] as $key=>$value) { + if ((!$originalSettings['bootstrap'][$key] && $originalSettings['bootstrap'][$key]!=='0') && isset($value)) + $originalSettings['bootstrap'][$key] = $value; + } + if (is_array($tsSettings['seo.'])) + foreach ($tsSettings['seo.'] as $key=>$value) { + if ((!$originalSettings['seo'][$key] && $originalSettings['seo'][$key]!=='0') && isset($value)) + $originalSettings['seo'][$key] = $value; + } + } + $this->settings = $originalSettings; + } + + /** + * Injects the content-Repository + * + * @param \Quizpalme\Camaliga\Domain\Repository\ContentRepository $contentRepository + */ + public function injectContentRepository(\Quizpalme\Camaliga\Domain\Repository\ContentRepository $contentRepository) { + $this->contentRepository = $contentRepository; + } + + /** + * action list + * + * @return void + */ + public function listAction() { + if ($this->settings['extended']['enable'] == 1) { + // extended-Version laden + // $this->template = 'ListExtended'; + $this->listExtendedAction(); + } else { + $storagePidsArray = $this->contentRepository->getStoragePids(); + $storagePidsComma = implode(',', $storagePidsArray); + if (!$storagePidsComma) { // nix ausgewählt => aktuelle PID nehmen + $storagePidsComma = intval($GLOBALS["TSFE"]->id); + $storagePidsArray = array($storagePidsComma); + $storagePidsOnly = array($storagePidsComma); + } else { + $storagePidsOnly = array(); + } + $categoryUids = array(); + if ($this->settings['defaultCatIDs']) { + $defaultCats = explode(',', $this->settings['defaultCatIDs']); + foreach ($defaultCats as $defCat) { + $selected = intval(trim($defCat)); + $categoryUids[$selected] = $selected; + } + } + + if (count($categoryUids) > 0) { + $normalCatMode = ($this->settings['normalCategoryMode'] == 'or') ? FALSE : TRUE; + if (TYPO3_DLOG || $this->settings['debug']) + \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('findByCategories("' . implode(",", $categoryUids) . '",,,0,' . $this->settings['sortBy'] . ',' . $this->settings['sortOrder'] . ',' . $this->settings['onlyDistinct'] . ',' . implode(',', $storagePidsOnly) . ',' . $this->settings['normalCategoryMode'] . ',' . $this->settings['limit'] . ')', 'camaliga', 0); + $contents = $this->contentRepository->findByCategories($categoryUids, '', '', 0, $this->settings['sortBy'], $this->settings['sortOrder'], $this->settings['onlyDistinct'], $storagePidsOnly, $normalCatMode, $this->settings['limit']); + } else { + if (TYPO3_DLOG || $this->settings['debug']) + \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('findAll(' . $this->settings['sortBy'] . ',' . $this->settings['sortOrder'] . ',' . $this->settings['onlyDistinct'] . ',' . implode(',', $storagePidsOnly) . ',' . $this->settings['limit'] . ')', 'camaliga', 0); + $contents = $this->contentRepository->findAll($this->settings['sortBy'], $this->settings['sortOrder'], $this->settings['onlyDistinct'], $storagePidsOnly, $this->settings['limit']); + } + if ($this->settings['random']) $contents = $this->sortObjects($contents); + if ($this->settings['getLatLon']) $contents = $this->getLatLon($contents); + + if ($this->settings['more']['setModulo']) { + $i = 0; + $j = 0; + $mod = intval($this->settings['item']['items']); + foreach ($contents as $content) { + if (($i % $mod) == 0) { $j++; $content->setModuloBegin($j); } + $i++; + if ((($i % $mod) == 0) || ($i == $contents->count())) $content->setModuloEnd($j); + } + } + + $cobjData = $this->configurationManager->getContentObject(); + $configurationUtility = unserialize($GLOBALS['TYPO3_CONF_VARS']['EXT']['extConf']['camaliga']); + $enableFal = intval($configurationUtility['enableFal']); + + $this->view->assign('fal', $enableFal); + $this->view->assign('uid', $cobjData->data['uid']); + $this->view->assign('pid', $GLOBALS["TSFE"]->id); + $this->view->assign('contents', $contents); + $this->view->assign('storagePIDsArray', $storagePidsArray); // alle PIDs als Array + $this->view->assign('storagePIDsComma', $storagePidsComma); // alle PIDs kommasepariert + $item_width = intval($this->settings['item']['width']); + $padding_item_width = $item_width + 2 * intval($this->settings['item']['padding']); + $total_item_width = $padding_item_width + 2 * intval($this->settings['item']['margin']); + $total_width = intval($this->settings['item']['items']) * $total_item_width; + $this->view->assign('paddingItemWidth', $padding_item_width); + $this->view->assign('totalItemWidth', $total_item_width); + $this->view->assign('itemWidth', (($this->settings['addPadding']) ? $padding_item_width : $item_width)); + $this->view->assign('totalWidth', $total_width); + $item_height = intval($this->settings['item']['height']); + $padding_item_height = $item_height + 2 * intval($this->settings['item']['padding']); + $total_item_height = $padding_item_height + 2 * intval($this->settings['item']['margin']); + $this->view->assign('paddingItemHeight', $padding_item_height); + $this->view->assign('totalItemHeight', $total_item_height); + $this->view->assign('itemHeight', (($this->settings['addPadding']) ? $padding_item_height : $item_height)); + $this->view->assign('onlySearchForm', 0); + } + } + + /** + * action listExtended + * + * @return void + */ + public function listExtendedAction() { + $this->settings['extended']['enable'] = 1; + $search = false; // search by user selection? + $sortBy = ($this->request->hasArgument('sortBy')) ? $this->request->getArgument('sortBy') : $this->settings['sortBy']; + $sortOrder = ($this->request->hasArgument('sortOrder')) ? $this->request->getArgument('sortOrder') : $this->settings['sortOrder']; + $sword = ($this->request->hasArgument('sword')) ? $this->request->getArgument('sword') : ''; + $place = ($this->request->hasArgument('place')) ? $this->request->getArgument('place') : ''; + $radius = ($this->request->hasArgument('radius')) ? intval($this->request->getArgument('radius')) : 0; + if ($this->request->hasArgument('content')) { + $cUid = intval($this->request->getArgument('content')); + if ($cUid > 0) $search = true; + } + + $distanceArray = array(); + $categoryUids = array(); + $configurationUtility = unserialize($GLOBALS['TYPO3_CONF_VARS']['EXT']['extConf']['camaliga']); + $catMode = intval($configurationUtility["categoryMode"]); + //$catMode = intval($this->settings['categoryMode']); + $lang = intval($GLOBALS['TSFE']->config['config']['sys_language_uid']); + $cat_lang = ($catMode) ? 0 : $lang; + $tableName = 'tx_camaliga_domain_model_content'; + $start = ($this->request->hasArgument('start')) ? intval($this->request->getArgument('start')) : 1; + $storagePidsArray = $this->contentRepository->getStoragePids(); + $storagePidsComma = implode(',', $storagePidsArray); + $storagePidsData = array(); + $storagePidsOnly = array(); + + if (count($storagePidsArray)>1) { // bei mehr als einer PID eine Auswahl anbieten + $res4 = $GLOBALS['TYPO3_DB']->exec_SELECTquery( + 'uid, title', + 'pages', + 'uid IN (' . $storagePidsComma . ')'); + $rows = $GLOBALS['TYPO3_DB']->sql_num_rows($res4); + if ($rows>0) { + $storagePidsData_tmp = array(); + while($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res4)){ + $uid = $row['uid']; + $storagePidsData_tmp[$uid] = array(); + $storagePidsData_tmp[$uid]['uid'] = $uid; + $storagePidsData_tmp[$uid]['title'] = $row['title']; + $storagePidsData_tmp[$uid]['selected'] = 0; + } + $GLOBALS['TYPO3_DB']->sql_free_result($res4); + } + foreach ($storagePidsArray as $key => $value) { + // es kommt eben auf die Reihenfolge der Einspeisung an! + $storagePidsData[$value] = $storagePidsData_tmp[$value]; + } + $defPids = ',' . str_replace(' ', '', $this->settings['defaultStoragePids']) . ','; + foreach ($storagePidsArray as $aPID) { + // Prüfen, ob nur bestimmte Ordner ausgewählt sind + if ($this->request->hasArgument('search')) { + // PID übermittelt? + if ($this->request->hasArgument('pid_' . $aPID)) { + if ($this->request->getArgument('pid_' . $aPID) == $aPID) { + $storagePidsData[$aPID]['selected'] = $aPID; + $storagePidsOnly[] = intval($aPID); + } + } + } else if ($this->settings['defaultStoragePids']) { + // Default-PID vorhanden? + if (strpos($defPids, ',' . $aPID . ',') !== false) { + $storagePidsData[$aPID]['selected'] = $aPID; + $storagePidsOnly[] = intval($aPID); + } + } + } + } else if (!$storagePidsComma) { // nix ausgewählt => aktuelle PID nehmen + $storagePidsComma = intval($GLOBALS["TSFE"]->id); + $storagePidsArray = array($storagePidsComma); + $storagePidsOnly = array($storagePidsComma); + } + if (count($storagePidsOnly)>0) + $storagePidsOnlyComma = implode(',', $storagePidsOnly); + else + $storagePidsOnlyComma = $storagePidsComma; + + // Step 0: Categories + $cats = array(); + // Step 1: get all categories + $categoriesUtility = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('Quizpalme\\Camaliga\\Utility\\AllCategories'); + $all_cats = $categoriesUtility->getCategoriesarrayComplete(); + // Step 2: select categories, used by this extension AND used by this storagePids: needed for the category-restriction at the bottom + $res4 = $GLOBALS['TYPO3_DB']->exec_SELECTquery( + 'DISTINCT mm.uid_local', + 'sys_category AS cat, sys_category_record_mm AS mm, tx_camaliga_domain_model_content car', + "cat.uid = mm.uid_local AND mm.tablenames='" . $tableName . "' AND mm.uid_foreign=car.uid". + " AND car.pid IN (" . $storagePidsOnlyComma . ') AND cat.sys_language_uid=' . $cat_lang, + '', + 'cat.title'); + if ($GLOBALS['TYPO3_DB']->sql_num_rows($res4) > 0) { + while($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res4)){ + $uid = $row['uid_local']; + if (!$all_cats[$uid]['parent']) continue; + $parent = $all_cats[$uid]['parent']; + if (!is_array($cats[$parent])) { + $selected = ($this->request->hasArgument('cat'.$parent)) ? + intval($this->request->getArgument('cat'.$parent)) : 0; + if ($selected > 0) { + $categoryUids[$selected] = $selected; + $search = TRUE; + } + $cats[$parent] = array(); + $cats[$parent]['childs'] = array(); + $cats[$parent]['selected'] = $selected; + $cats[$parent]['title'] = $all_cats[$parent]['title']; + $cats[$parent]['description'] = $all_cats[$parent]['description']; + } + $selected = ($this->request->hasArgument('cat'.$parent.'_'.$uid)) ? + intval($this->request->getArgument('cat'.$parent.'_'.$uid)) : 0; + if ($selected > 0) { + $categoryUids[$parent] = ($categoryUids[$parent]) ? $categoryUids[$parent].",$selected" : $selected; + $search = TRUE; + } + if ($all_cats[$uid]['title']) { + $cats[$parent]['childs'][$uid] = array(); + $cats[$parent]['childs'][$uid]['selected'] = $selected; + $cats[$parent]['childs'][$uid]['title'] = $all_cats[$uid]['title']; + } + } + $GLOBALS['TYPO3_DB']->sql_free_result($res4); + + // wenn nix ausgewählt wurde, aber doch submitted wurde + if ($this->request->hasArgument('search')) $search = TRUE; + } + + // falls keine Kategorien da sind, aber doch submitted wurde + if ($this->request->hasArgument('search')) $search = TRUE; + + $cobjData = $this->configurationManager->getContentObject(); + $content_uid = $cobjData->data['uid']; + + if ($search && $this->settings['extended']['saveSearch'] == 1) { + // Suchparameter in Cookie speichern + $searchCookie = array(); + $searchCookie['sortBy'] = $sortBy; + $searchCookie['sortOrder'] = $sortOrder; + $searchCookie['sword'] = $sword; + $searchCookie['place'] = $place; + $searchCookie['radius'] = $radius; + $searchCookie['storagePidsOnly'] = $storagePidsOnly; + $searchCookie['categoryUids'] = $categoryUids; + //$searchCookie['start'] = $start; + // Cookie speichern + $GLOBALS['TSFE']->fe_user->setKey('ses', 'camaliga' . $content_uid, serialize($searchCookie)); + $GLOBALS['TSFE']->fe_user->storeSessionData(); + } else if (!$search && $this->settings['extended']['saveSearch'] == 1) { + // Suchparameter aus Cookie laden + $cookie = $GLOBALS['TSFE']->fe_user->getKey('ses', 'camaliga' . $content_uid); + if ($cookie) { + $searchCookie = unserialize($cookie); + $sortBy = $searchCookie['sortBy']; + $sortOrder = $searchCookie['sortOrder']; + $sword = $searchCookie['sword']; + $place = $searchCookie['place']; + $radius = $searchCookie['radius']; + $storagePidsOnly = $searchCookie['storagePidsOnly']; + $categoryUids = $searchCookie['categoryUids']; + foreach ($storagePidsArray as $aPID) { // reset + $storagePidsData[$aPID]['selected'] = 0; + } + foreach ($storagePidsOnly as $aPID) { // set new + $storagePidsData[$aPID]['selected'] = $aPID; + } + if (count($storagePidsOnly)>0) + $storagePidsOnlyComma = implode(',', $storagePidsOnly); + else + $storagePidsOnlyComma = $storagePidsComma; + foreach ($categoryUids as $defCat) { + foreach (explode(',', $defCat) as $selected) { + $uid = intval(trim($selected)); + $parent = $all_cats[$uid]['parent']; + if ($cats[$parent]['description'] == 'checkbox') { + $cats[$parent]['childs'][$uid]['selected'] = $selected; + } else { + $cats[$parent]['selected'] = $selected; + } + } + } + } + } else if (!$search && $this->settings['defaultCatIDs']) { + // keine Suche, keine Cookies => default cats auswählen + $defaultCats = explode(',', $this->settings['defaultCatIDs']); + foreach ($defaultCats as $defCat) { + $uid = $selected = intval(trim($defCat)); + $parent = $all_cats[$uid]['parent']; + if ($cats[$parent]['description'] == 'checkbox') { + $cats[$parent]['childs'][$uid]['selected'] = $selected; + $categoryUids[$parent] = ($categoryUids[$parent]) ? $categoryUids[$parent].",$selected" : $selected; + } else { + $cats[$parent]['selected'] = $selected; + $categoryUids[$selected] = $selected; + } + } + } + + // Suche + if (!$search && $this->settings['extended']['onlySearchForm'] == 1) { + $contents = array(); + $this->view->assign('onlySearchForm', 1); + } else { + if ($cUid > 0) { + // nur ein bestimmtes Element anzeigen + if (TYPO3_DLOG || $this->settings['debug']) + \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('findByUids(array(' . $cUid . '))', 'camaliga', 0); + $contents = $this->contentRepository->findByUids(array($cUid)); + } else if (count($categoryUids) > 0) { + // Umfangreiche Suche betreiben + // official solution (not enough): http://wiki.typo3.org/TYPO3_6.0#Category + // Sort categories (doesnt work): http://www.php-kurs.com/arrays-mehrdimensional.htm + // find entries by category + // enable dev logging if set + if (TYPO3_DLOG || $this->settings['debug']) + \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('findByCategories("' . implode(",", $categoryUids) . '",' . $sword . ',' . $place . ',' . $radius . ',' . $sortBy . ',' . $sortOrder . ',' . $this->settings['onlyDistinct'] . ',' . implode(',', $storagePidsOnly) . ', TRUE' . ',' . $this->settings['limit'] . ')', 'camaliga', 0); + $contents = $this->contentRepository->findByCategories($categoryUids, $sword, $place, $radius, $sortBy, $sortOrder, $this->settings['onlyDistinct'], $storagePidsOnly, TRUE, $this->settings['limit']); + } else if ($sword || $place) { + // Komplexe Suche, aber ohne Kategorien + if (TYPO3_DLOG || $this->settings['debug']) + \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('findComplex( ,' . $sword . ',' . $place . ',' . $radius . ',' . $sortBy . ',' . $sortOrder . ',' . $this->settings['onlyDistinct'] . ',' . implode(',', $storagePidsOnly) . ',' . $this->settings['limit'] . ')', 'camaliga', 0); + $contents = $this->contentRepository->findComplex(array(), $sword, $place, $radius, $sortBy, $sortOrder, $this->settings['onlyDistinct'], $storagePidsOnly, $this->settings['limit']); + } else { + // Simple Suche + if (TYPO3_DLOG || $this->settings['debug']) + \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('findAll(' . $sortBy . ',' . $sortOrder . ',' . $this->settings['onlyDistinct'] . ',' . implode(',', $storagePidsOnly) . ',' . $this->settings['limit'] . ')', 'camaliga', 0); + $contents = $this->contentRepository->findAll($sortBy, $sortOrder, $this->settings['onlyDistinct'], $storagePidsOnly, $this->settings['limit']); + } + if ($place) $distanceArray = $this->contentRepository->getDistanceArray(); // Distanz-Array vorhanden? + if ($this->settings['random']) $contents = $this->sortObjects($contents); // zufällig umsortieren? + if ($this->settings['getLatLon']) $contents = $this->getLatLon($contents); // Position suchen? Bringt nach einer Umkreissuche freilich nichts! + $this->view->assign('onlySearchForm', 0); + } + + if ($this->settings['more']['setModulo']) { + $i = 0; + $j = 0; + $mod = intval($this->settings['item']['items']); + foreach ($contents as $content) { + if (($i % $mod) == 0) { $j++; $content->setModuloBegin($j); } + $i++; + if ((($i % $mod) == 0) || ($i == $contents->count())) $content->setModuloEnd($j); + } + } + + $configurationUtility = unserialize($GLOBALS['TYPO3_CONF_VARS']['EXT']['extConf']['camaliga']); + $enableFal = intval($configurationUtility['enableFal']); + + $this->view->assign('fal', $enableFal); + $this->view->assign('lang', $cobjData->data['sys_language_uid']); + $this->view->assign('uid', $content_uid); + $this->view->assign('pid', $GLOBALS["TSFE"]->id); + $this->view->assign('contents', $contents); + $this->view->assign('sortBy_selected', $sortBy); + $this->view->assign('sortOrder_selected', $sortOrder); + $this->view->assign('all_categories', $all_cats); + $this->view->assign('categories', $cats); + $this->view->assign('defaultCatIDs', $this->settings['defaultCatIDs']); + $this->view->assign('storagePIDsArray', $storagePidsArray); // alle PIDs als Array + $this->view->assign('storagePIDsComma', $storagePidsComma); // alle PIDs kommasepariert + $this->view->assign('storagePIDsData', $storagePidsData); // alle Daten zu den PIDS + $this->view->assign('start', $start); + $item_width = intval($this->settings['item']['width']); + $padding_item_width = $item_width + 2 * intval($this->settings['item']['padding']); + $total_item_width = $padding_item_width + 2 * intval($this->settings['item']['margin']); + $total_width = intval($this->settings['item']['items']) * $total_item_width; + $this->view->assign('paddingItemWidth', $padding_item_width); + $this->view->assign('totalItemWidth', $total_item_width); + $this->view->assign('itemWidth', (($this->settings['addPadding']) ? $padding_item_width : $item_width)); + $this->view->assign('totalWidth', $total_width); + $item_height = intval($this->settings['item']['height']); + $padding_item_height = $item_height + 2 * intval($this->settings['item']['padding']); + $total_item_height = $padding_item_height + 2 * intval($this->settings['item']['margin']); + $this->view->assign('paddingItemHeight', $padding_item_height); + $this->view->assign('totalItemHeight', $total_item_height); + $this->view->assign('itemHeight', (($this->settings['addPadding']) ? $padding_item_height : $item_height)); + $this->view->assign('sword', $sword); + $this->view->assign('place', $place); + $this->view->assign('radius', $radius); + if ($this->settings['extended']['radiusValues']) { + $radiusArray = array(); + $radiusTemp = explode(',', $this->settings['extended']['radiusValues']); + foreach ($radiusTemp as $aRadius) { + $radiusArray[$aRadius] = $aRadius . ' km'; + } + $this->view->assign('radiusArray', $radiusArray); + if (count($distanceArray) > 0) { + // Entferungen bei den Elementen setzen + foreach ($contents as $element) { + $element->setDistance($distanceArray[$element->getUid()]); + } + } + $this->view->assign('rsearch', 1); + } else { + $this->view->assign('rsearch', 0); + } + } + + /** + * action search + * + * @return void + */ + public function searchAction() { + $template = ($this->request->hasArgument('template')) ? $this->request->getArgument('template') : ''; + if ($template) + $this->view->setTemplatePathAndFilename($this->templatePath . 'Content/' . $template . '.html'); + $this->listExtendedAction(); + } + + + /** + * set SEO head? + * + * @param \Quizpalme\Camaliga\Domain\Model\Content $content + * @return void + */ + protected function setSeo(\Quizpalme\Camaliga\Domain\Model\Content $content) { + $title = $content->getTitle(); + $desc = preg_replace("/[\n\r]/"," - ", $content->getShortdesc()); + if ($this->settings['seo']['setTitle'] == 1) { + $GLOBALS['TSFE']->page['title'] = $title; + } + if (($this->settings['seo']['setDescription'] == 1) && $desc) { + $GLOBALS['TSFE']->page['description'] = $desc; + } + if ($this->settings['seo']['setIndexedDocTitle'] == 1) { + $GLOBALS['TSFE']->indexedDocTitle = $title; + } + if ($this->settings['seo']['setOgTitle'] == 1) { + $this->response->addAdditionalHeaderData(''); + } + if (($this->settings['seo']['setOgDescription'] == 1) && $desc) { + $this->response->addAdditionalHeaderData(''); + } + if (($this->settings['seo']['setOgImage'] == 1) && $content->getImage()) { + $server = ($_SERVER['HTTPS']) ? 'https://' : 'http://'; + $server .= $_SERVER['SERVER_NAME']; + $this->response->addAdditionalHeaderData(''); + } + } + /** + * action show one element. ignorevalidation added because of validation erros + * + * @param \Quizpalme\Camaliga\Domain\Model\Content $content + * @ignorevalidation $content + * @return void + */ + public function showAction(\Quizpalme\Camaliga\Domain\Model\Content $content) { + if ($this->settings['extended']['enable'] == 1) { + // extended-Version laden + // $this->view->setTemplatePathAndFilename($this->templatePath . 'Content/ShowExtended.html'); + $this->showExtendedAction($content); + } else { + $this->setSeo($content); + $configurationUtility = unserialize($GLOBALS['TYPO3_CONF_VARS']['EXT']['extConf']['camaliga']); + $enableFal = intval($configurationUtility['enableFal']); + + $this->view->assign('fal', $enableFal); + $this->view->assign('content', $content); + $this->view->assign('error', 0); + } + } + + /** + * action show one element, extended. ignorevalidation added because of validation erros + * + * @param \Quizpalme\Camaliga\Domain\Model\Content $content + * @ignorevalidation $content + * @return void + */ + public function showExtendedAction(\Quizpalme\Camaliga\Domain\Model\Content $content) { + $this->setSeo($content); + $configurationUtility = unserialize($GLOBALS['TYPO3_CONF_VARS']['EXT']['extConf']['camaliga']); + $enableFal = intval($configurationUtility['enableFal']); + + $this->view->assign('fal', $enableFal); + $this->view->assign('content', $content); + $this->view->assign('error', 0); + if ($content->getMother() > 0) { + // wir haben hier ein Kind + $this->view->assign('parent', $this->contentRepository->findByUid($content->getMother())); + $this->view->assign('hasParent', 1); + $this->view->assign('childs', $this->contentRepository->findByMother2($content->getMother(), $content->getUid())); + } else { + // wir haben hier die Mutter + $this->view->assign('parent', ''); + $this->view->assign('hasParent', 0); + $this->view->assign('childs', $this->contentRepository->findByMother2($content->getUid(), 0)); + } + } + + /* ************************************* weitere Templates *************************** */ + + /** + * action carousel + * + * @return void + */ + public function carouselAction() { + if ($this->settings['extended']['enable']) { + $this->listExtendedAction(); + } else { + $this->listAction(); + } + } + + /** + * action separated carousel + * + * @return void + */ + public function carouselSeparatedAction() { + if ($this->settings['extended']['enable']) { + $this->listExtendedAction(); + } else { + $this->listAction(); + } + } + + /** + * action scrollable + * + * @return void + */ + public function scrollableAction() { + if ($this->settings['extended']['enable']) { + $this->listExtendedAction(); + } else { + $this->listAction(); + } + } + + /** + * action roundabout + * + * @return void + */ + public function roundaboutAction() { + if ($this->settings['extended']['enable']) { + $this->listExtendedAction(); + } else { + $this->listAction(); + } + } + + /** + * action flipster + * + * @return void + */ + public function flipsterAction() { + if ($this->settings['extended']['enable']) { + $this->listExtendedAction(); + } else { + $this->listAction(); + } + } + + /** + * action bootstrap + * + * @return void + */ + public function bootstrapAction() { + if ($this->settings['extended']['enable']) { + $this->listExtendedAction(); + } else { + $this->listAction(); + } + } + + /** + * action collapse + * + * @return void + */ + public function collapseAction() { + if ($this->settings['extended']['enable']) { + $this->listExtendedAction(); + } else { + $this->listAction(); + } + } + + /** + * action modal + * + * @return void + */ + public function modalAction() { + if ($this->settings['extended']['enable']) { + $this->listExtendedAction(); + } else { + $this->listAction(); + } + } + + /** + * action tab + * + * @return void + */ + public function tabAction() { + if ($this->settings['extended']['enable']) { + $this->listExtendedAction(); + } else { + $this->listAction(); + } + } + + /** + * action S Gallery + * + * @return void + */ + public function sgalleryAction() { + if ($this->settings['extended']['enable']) { + $this->listExtendedAction(); + } else { + $this->listAction(); + } + } + + /** + * action AD Gallery + * + * @return void + */ + public function adGalleryAction() { + if ($this->settings['extended']['enable']) { + // $this->template = 'AdGalleryExtended'; + $this->listExtendedAction(); + } else { + $this->listAction(); + } + } + + /** + * action GalleryView + * + * @return void + */ + public function galleryviewAction() { + if ($this->settings['extended']['enable']) { + $this->listExtendedAction(); + } else { + $this->listAction(); + } + } + + /** + * action FancyBox + * + * @return void + */ + public function fancyBoxAction() { + if ($this->settings['extended']['enable']) { + $this->listExtendedAction(); + } else { + $this->listAction(); + } + } + + /** + * action Ekko Lightslider + * + * @return void + */ + public function ekkoAction() { + if ($this->settings['extended']['enable']) { + $this->listExtendedAction(); + } else { + $this->listAction(); + } + } + + /** + * action Elastislide + * + * @return void + */ + public function elastislideAction() { + if ($this->settings['extended']['enable']) { + $this->listExtendedAction(); + } else { + $this->listAction(); + } + } + + /** + * action Coolcarousel + * + * @return void + */ + public function coolcarouselAction() { + if ($this->settings['extended']['enable']) { + $this->listExtendedAction(); + } else { + $this->listAction(); + } + } + + /** + * action Innerfade + * + * @return void + */ + public function innerfadeAction() { + if ($this->settings['extended']['enable']) { + $this->listExtendedAction(); + } else { + $this->listAction(); + } + } + + /** + * action FlexSlider 2 + * + * @return void + */ + public function flexslider2Action() { + if ($this->settings['extended']['enable']) { + $this->listExtendedAction(); + } else { + $this->listAction(); + } + } + + /** + * action Lightslider + * + * @return void + */ + public function lightsliderAction() { + if ($this->settings['extended']['enable']) { + $this->listExtendedAction(); + } else { + $this->listAction(); + } + } + + /** + * action Fullwidth + * + * @return void + */ + public function fullwidthAction() { + if ($this->settings['extended']['enable']) { + $this->listExtendedAction(); + } else { + $this->listAction(); + } + } + + /** + * action Responsive carousel + * + * @return void + */ + public function responsiveAction() { + if ($this->settings['extended']['enable']) { + $this->listExtendedAction(); + } else { + $this->listAction(); + } + } + + /** + * action Responsive carousel (2) + * + * @return void + */ + public function responsiveCarouselAction() { + if ($this->settings['extended']['enable']) { + $this->listExtendedAction(); + } else { + $this->listAction(); + } + } + + /** + * action OWL carousel 2 + * + * @return void + */ + public function owl2Action() { + if ($this->settings['extended']['enable']) { + $this->listExtendedAction(); + } else { + $this->listAction(); + } + } + + /** + * action Bootstrap+Isotope + * + * @return void + */ + public function isotopeAction() { + if ($this->settings['extended']['enable']) { + $this->listExtendedAction(); + } else { + $this->listAction(); + } + } + + /** + * action Stellar Parallax + * + * @return void + */ + public function parallaxAction() { + if ($this->settings['extended']['enable']) { + $this->listExtendedAction(); + } else { + $this->listAction(); + } + } + + /** + * action Revolution Slider + * + * @return void + */ + public function revolutionAction() { + if ($this->settings['extended']['enable']) { + $this->listExtendedAction(); + } else { + $this->listAction(); + } + } + + /** + * action FractionSlider + * + * @return void + */ + public function fractionSliderAction() { + if ($this->settings['extended']['enable']) { + $this->listExtendedAction(); + } else { + $this->listAction(); + } + } + + /** + * action SDKSlider + * + * @return void + */ + public function skdsliderAction() { + if ($this->settings['extended']['enable']) { + $this->listExtendedAction(); + } else { + $this->listAction(); + } + } + + /** + * action slick + * + * @return void + */ + public function slickAction() { + if ($this->settings['extended']['enable']) { + $this->listExtendedAction(); + } else { + $this->listAction(); + } + } + + /** + * action test + * + * @return void + */ + public function testAction() { + if ($this->settings['extended']['enable']) { + $this->listExtendedAction(); + } else { + $this->listAction(); + } + } + + /** + * action Map + * + * @return void + */ + public function mapAction() { + if ($this->settings['extended']['enable']) { + // $this->template = 'MapExtended'; + $this->listExtendedAction(); + } else { + $this->listAction(); + } + } + + /** + * action one random uncached element + * + * @return void + */ + public function randomAction() { + $contents = $this->contentRepository->findRandom(); + $configurationUtility = unserialize($GLOBALS['TYPO3_CONF_VARS']['EXT']['extConf']['camaliga']); + $enableFal = intval($configurationUtility['enableFal']); + + $this->view->assign('fal', $enableFal); + $this->view->assign('contents', $contents); + } + + /** + * Zufälliges sortieren der Ergebnisse + * + * @return array + */ + private function sortObjects($objects) { + /** + * zuerst holen wir uns alle gewünschten Objekte, welche später in Fuid in zufälliger Reihenfolge ausgegeben werden sollen + * und erstellen ein zusätzelichen Array, in welches mittels array_push() die UIDs der Objekte geschrieben werden + */ + $uidArray = array(); + foreach($objects as $object) { + array_push($uidArray, $object->getUid()); + } + /** + * shuffle verwürfelt den Inhalt das UID Arrays + * außerdem erstellen wir ein neues Array, welches später von der Funktion zurückgegeben wird + */ + shuffle($uidArray); + $objectArray = array(); + /** + * für jeden Eintrag im UID Array gehen wir durch die vorhandenen Objekte + * und wenn die aktuelle uid im Array = der Uid des aktuellen Objektes ist + * wir das Objekt in das $objectArray geschrieben und zurückgegeben + */ + foreach ($uidArray as $uid) { + foreach($objects as $object) { + if($uid == $object->getUid()) { + array_push($objectArray, $object); + } + } + } + return $objectArray; + } + + /** + * Latitude und Longitude zu einer Adresse ermitteln + * Lösung von hier: http://stackoverflow.com/questions/8633574/get-latitude-and-longitude-automatically-using-php-api + */ + private function getLatLon($objects) { + //$persistenceManager = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance("TYPO3\\CMS\\Extbase\\Persistence\\Generic\\PersistenceManager"); + /** + * prüfen, welche Objekte eine Adresse (mind. einen Ort), aber keine Position haben + */ + if (is_object($objects) || is_array($objects)) + foreach($objects as $object) { + if ($object->getLatitude() == 0 && $object->getLongitude() == 0 && $object->getCity()) { + $address = $object->getStreet(); + if ($object->getZip()) $address .= ($address) ? ', ' . $object->getZip() : $object->getZip(); + if ($object->getCity()) $address .= ($address) ? ', ' . $object->getCity() : $object->getCity(); + if ($object->getCountry()) $address .= ($address) ? ', ' . $object->getCountry() : $object->getCountry(); + $address = urlencode($address); + $url = "http://maps.google.com/maps/api/geocode/json?address=$address&sensor=false"; + $ch = curl_init(); + curl_setopt($ch, CURLOPT_URL, $url); + curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); + curl_setopt($ch, CURLOPT_PROXYPORT, 3128); + curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0); + curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0); + $response = curl_exec($ch); + curl_close($ch); + $response_a = json_decode($response); + $lat = $response_a->results[0]->geometry->location->lat; + $long = $response_a->results[0]->geometry->location->lng; + if ($lat || $long) { + $object->setLatitude($lat); + $object->setLongitude($long); + $this->contentRepository->update($object); + //$persistenceManager->persistAll(); + //echo "position berechnet: $lat, $long"; + } + } + } + return $objects; + } +} +?> \ No newline at end of file diff --git a/Classes/Domain/Model/Content.php b/Classes/Domain/Model/Content.php new file mode 100644 index 0000000..89c0bd1 --- /dev/null +++ b/Classes/Domain/Model/Content.php @@ -0,0 +1,1186 @@ + + * + * 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 3 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! + ***************************************************************/ + +/** + * Content Model: die Schublade der Extension + * + * @package camaliga + * @license http://www.gnu.org/licenses/gpl.html GNU General Public License, version 3 or later + * + */ +class Content extends \TYPO3\CMS\Extbase\DomainObject\AbstractValueObject { + + /** + * Title + * + * @var \string + * @validate NotEmpty + */ + protected $title; + + /** + * Short description + * + * @var \string + */ + protected $shortdesc; + + /** + * Long description + * + * @var \string + */ + protected $longdesc; + + /** + * Link to a page + * + * @var \string + */ + protected $link; + + /** + * Image + * + * @var \string + */ + protected $image; + + /** + * Image 2 + * + * @var \string + */ + protected $image2; + + /** + * Caption 2 + * + * @var \string + */ + protected $caption2; + + /** + * Image 3 + * + * @var \string + */ + protected $image3; + + /** + * Caption 3 + * + * @var \string + */ + protected $caption3; + + /** + * Image 4 + * + * @var \string + */ + protected $image4; + + /** + * Caption 4 + * + * @var \string + */ + protected $caption4; + + /** + * Image 5 + * + * @var \string + */ + protected $image5; + + /** + * Caption 5 + * + * @var \string + */ + protected $caption5; + + /** + * Image + * + * @var \TYPO3\CMS\Extbase\Domain\Model\FileReference + * @cascade remove + */ + protected $falimage = null; + + /** + * Image + * + * @var \TYPO3\CMS\Extbase\Domain\Model\FileReference + * @cascade remove + */ + protected $falimage2 = null; + + /** + * Image + * + * @var \TYPO3\CMS\Extbase\Domain\Model\FileReference + * @cascade remove + */ + protected $falimage3 = null; + + /** + * Image + * + * @var \TYPO3\CMS\Extbase\Domain\Model\FileReference + * @cascade remove + */ + protected $falimage4 = null; + + /** + * Image + * + * @var \TYPO3\CMS\Extbase\Domain\Model\FileReference + * @cascade remove + */ + protected $falimage5 = null; + + /** + * Street + * + * @var \string + */ + protected $street; + + /** + * Zip code + * + * @var \string + */ + protected $zip; + + /** + * City + * + * @var \string + */ + protected $city; + + /** + * Country + * + * @var \string + */ + protected $country; + + /** + * Person number + * + * @var \string + */ + protected $person; + + /** + * Phone number + * + * @var \string + */ + protected $phone; + + /** + * Mobile number + * + * @var \string + */ + protected $mobile; + + /** + * E-Mail + * + * @var \string + */ + protected $email; + + /** + * Latitude + * + * @var \float + */ + protected $latitude; + + /** + * Longitude + * + * @var \float + */ + protected $longitude; + + /** + * Distance bei Umkreissuche + * + * @var \float + */ + protected $distance = 0.0; + + /** + * Custom variable 1 + * + * @var \string + */ + protected $custom1; + + /** + * Custom variable 2 + * + * @var \string + */ + protected $custom2; + + /** + * Custom variable 3 + * + * @var \string + */ + protected $custom3; + + /** + * Mutter-Element: Quizpalme\Camaliga\Domain\Model\Content + * + * @var \integer + */ + protected $mother; + + /** + * Categories. Früher: integer + * + * @var \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\TYPO3\CMS\Extbase\Domain\Model\Category> + */ + protected $categories; + + /** + * Modulo begin + * + * @var \integer + */ + protected $moduloBegin = 0; + + /** + * Modulo end + * + * @var \integer + */ + protected $moduloEnd = 0; + + + + /** + * Gets the title nl2br + * + * @return \string $title + */ + public function getTitleNl2br() { + $title = str_replace(array("'"), "\'", $this->title); + return str_replace(array("\r\n", "\r", "\n"), "
", $title); + } + + /** + * Returns the title + * + * @return \string $title + */ + public function getTitle() { + return $this->title; + } + + /** + * Sets the title + * + * @param \string $title + * @return void + */ + public function setTitle($title) { + $this->title = $title; + } + + /** + * Gets the shortdesc nl2br + * + * @return \string $shortdesc + */ + public function getShortdescNl2br() { + $shortdesc = str_replace(array("'"), "\'", $this->shortdesc); + return str_replace(array("\r\n", "\r", "\n"), "
", $shortdesc); + } + + /** + * Returns the shortdesc + * + * @return \string $shortdesc + */ + public function getShortdesc() { + return $this->shortdesc; + } + + /** + * Sets the shortdesc + * + * @param \string $shortdesc + * @return void + */ + public function setShortdesc($shortdesc) { + $this->shortdesc = $shortdesc; + } + + /** + * Gets the longdesc nl2br + * + * @return \string $longdesc + */ + public function getLongdescNl2br() { + $longdesc = str_replace(array("'"), "\'", $this->longdesc); + return str_replace(array("\r\n", "\r", "\n"), "
", $longdesc); + } + + /** + * Returns the longdesc + * + * @return \string $longdesc + */ + public function getLongdesc() { + return $this->longdesc; + } + + /** + * Sets the longdesc + * + * @param \string $longdesc + * @return void + */ + public function setLongdesc($longdesc) { + $this->longdesc = $longdesc; + } + + /** + * Returns the resolved link + * + * @return \string $link + */ + public function getLinkResolved() { + $output = ''; + $link = $this->link; + $linkArray = explode(':', $link); + if ($linkArray[0] == 'file') { + $uid = intval($linkArray[1]); // content element uid + $res4 = $GLOBALS['TYPO3_DB']->exec_SELECTquery( + 'identifier, storage', + 'sys_file', + 'uid=' . $uid); + if ($GLOBALS['TYPO3_DB']->sql_num_rows($res4) > 0) { + while($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res4)) + $output = ($row['storage'] == 1) ? '/fileadmin' . $row['identifier'] : $row['identifier']; + } + $GLOBALS['TYPO3_DB']->sql_free_result($res4); + } + return $output; + } + + /** + * Returns all link + * + * @return \array $links + */ + public function getLinks() { + $links_tmp = explode(' ', $this->link); + $links = array(); + $i = 0; + foreach ($links_tmp as $link) { + $links[$i] = array(); + $links[$i]['link'] = $link; + if ((substr(trim($link), 0, 3) == 'www') || (substr(trim($link), 0, 4) == 'http')) { + $links[$i]['type'] = 2; + } elseif (substr(trim($link), 0, 5) == 'file:') { + $links[$i]['type'] = 3; + } elseif (substr(trim($link), 0, 7) == 'mailto:') { + $links[$i]['type'] = 4; + } else if (is_numeric(trim($link))) { + $links[$i]['type'] = 1; + } else { + $links[$i]['type'] = 0; + } + $i++; + } + return $links; + } + + /** + * Returns the link + * + * @return \string $link + */ + public function getLink() { + // TODO: Link anders speichern! + return $this->link; + } + + /** + * Sets the link + * + * @param \string $link + * @return void + */ + public function setLink($link) { + $this->link = $link; + } + + /** + * Returns the image + * + * @return \string $image + */ + public function getImage() { + return $this->image; + } + + /** + * Sets the image + * + * @param \string $image + * @return void + */ + public function setImage($image) { + $this->image = $image; + } + + /** + * Returns the image2 + * + * @return \string $image2 + */ + public function getImage2() { + return $this->image2; + } + + /** + * Sets the image2 + * + * @param \string $image2 + * @return void + */ + public function setImage2($image2) { + $this->image2 = $image2; + } + + /** + * Returns the caption 2 + * + * @return \string $caption2 + */ + public function getCaption2() { + return $this->caption2; + } + + /** + * Sets the caption 2 + * + * @param \string $caption2 + * @return void + */ + public function setCaption2($caption2) { + $this->caption2 = $caption2; + } + + /** + * Returns the image3 + * + * @return \string $image3 + */ + public function getImage3() { + return $this->image3; + } + + /** + * Sets the image 3 + * + * @param \string $image3 + * @return void + */ + public function setImage3($image3) { + $this->image3 = $image3; + } + + /** + * Returns the caption 3 + * + * @return \string $caption3 + */ + public function getCaption3() { + return $this->caption3; + } + + /** + * Sets the caption 3 + * + * @param \string $caption3 + * @return void + */ + public function setCaption3($caption3) { + $this->caption3 = $caption3; + } + + /** + * Returns the image4 + * + * @return \string $image4 + */ + public function getImage4() { + return $this->image4; + } + + /** + * Sets the image 4 + * + * @param \string $image4 + * @return void + */ + public function setImage4($image4) { + $this->image4 = $image4; + } + + /** + * Returns the caption 4 + * + * @return \string $caption4 + */ + public function getCaption4() { + return $this->caption4; + } + + /** + * Returns the image5 + * + * @return \string $image5 + */ + public function getImage5() { + return $this->image5; + } + + /** + * Sets the caption 4 + * + * @param \string $caption4 + * @return void + */ + public function setCaption4($caption4) { + $this->caption4 = $caption4; + } + + /** + * Sets the image 5 + * + * @param \string $image5 + * @return void + */ + public function setImage5($image5) { + $this->image5 = $image5; + } + + /** + * Returns the caption 5 + * + * @return \string $caption5 + */ + public function getCaption5() { + return $this->caption5; + } + + /** + * Sets the caption 5 + * + * @param \string $caption5 + * @return void + */ + public function setCaption5($caption5) { + $this->caption5 = $caption5; + } + + /** + * Returns the image + * + * @return \TYPO3\CMS\Extbase\Domain\Model\FileReference $falimage + */ + public function getFalimage() + { + return $this->falimage; + } + + /** + * Sets the falimage + * + * @param \TYPO3\CMS\Extbase\Domain\Model\FileReference $falimage + * @return void + */ + public function setFalmage(\TYPO3\CMS\Extbase\Domain\Model\FileReference $falimage) + { + $this->falimage = $falimage; + } + + /** + * Returns the image + * + * @return \TYPO3\CMS\Extbase\Domain\Model\FileReference $falimage2 + */ + public function getFalimage2() + { + return $this->falimage2; + } + + /** + * Sets the falimage2 + * + * @param \TYPO3\CMS\Extbase\Domain\Model\FileReference $falimage2 + * @return void + */ + public function setFalimage2(\TYPO3\CMS\Extbase\Domain\Model\FileReference $falimage2) + { + $this->falimage2 = $falimage2; + } + + /** + * Returns the image + * + * @return \TYPO3\CMS\Extbase\Domain\Model\FileReference $falimage3 + */ + public function getFalimage3() + { + return $this->falimage3; + } + + /** + * Sets the falimage3 + * + * @param \TYPO3\CMS\Extbase\Domain\Model\FileReference $falimage3 + * @return void + */ + public function setFalimage(\TYPO3\CMS\Extbase\Domain\Model\FileReference $falimage3) + { + $this->falimage3 = $falimage3; + } + + /** + * Returns the image + * + * @return \TYPO3\CMS\Extbase\Domain\Model\FileReference $falimage4 + */ + public function getFalimage4() + { + return $this->falimage4; + } + + /** + * Sets the falimage4 + * + * @param \TYPO3\CMS\Extbase\Domain\Model\FileReference $falimage4 + * @return void + */ + public function setFalimage4(\TYPO3\CMS\Extbase\Domain\Model\FileReference $falimage4) + { + $this->falimage4 = $falimage4; + } + + /** + * Returns the image + * + * @return \TYPO3\CMS\Extbase\Domain\Model\FileReference $falimag5 + */ + public function getFalimage5() + { + return $this->falimage5; + } + + /** + * Sets the falimage5 + * + * @param \TYPO3\CMS\Extbase\Domain\Model\FileReference $falimage5 + * @return void + */ + public function setFalimage5(\TYPO3\CMS\Extbase\Domain\Model\FileReference $falimage5) + { + $this->falimage5 = $falimage5; + } + + /** + * Returns the street + * + * @return \string $street + */ + public function getStreet() { + return $this->street; + } + + /** + * Gets the street nl2br + * + * @return \string $street + */ + public function getStreetNl2br() { + $street = str_replace(array("'"), "\'", $this->street); + return str_replace(array("\r\n", "\r", "\n"), "
", $street); + } + + /** + * Sets the street + * + * @param \string $street + * @return void + */ + public function setStreet($street) { + $this->street = $street; + } + + /** + * Returns the zip + * + * @return \string $zip + */ + public function getZip() { + return $this->zip; + } + + /** + * Sets the zip + * + * @param \string $zip + * @return void + */ + public function setZip($zip) { + $this->zip = $zip; + } + + /** + * Returns the city + * + * @return \string $city + */ + public function getCity() { + return $this->city; + } + + /** + * Sets the city + * + * @param \string $city + * @return void + */ + public function setCity($city) { + $this->city = $city; + } + + /** + * Returns the country + * + * @return \string $country + */ + public function getCountry() { + return $this->country; + } + + /** + * Sets the country + * + * @param \string $country + * @return void + */ + public function setCountry($country) { + $this->country = $country; + } + + /** + * Returns the person + * + * @return \string $person + */ + public function getPerson() { + return $this->person; + } + + /** + * Sets the person + * + * @param \string $person + * @return void + */ + public function setPerson($person) { + $this->person = $person; + } + + /** + * Returns the phone + * + * @return \string $phone + */ + public function getPhone() { + return $this->phone; + } + + /** + * Sets the phone + * + * @param \string $phone + * @return void + */ + public function setPhone($phone) { + $this->phone = $phone; + } + + /** + * Returns the mobile + * + * @return \string $mobile + */ + public function getMobile() { + return $this->mobile; + } + + /** + * Sets the mobile + * + * @param \string $mobile + * @return void + */ + public function setMobile($mobile) { + $this->mobile = $mobile; + } + + /** + * Returns the email + * + * @return \string $email + */ + public function getEmail() { + return $this->email; + } + + /** + * Sets the email + * + * @param \string $email + * @return void + */ + public function setEmail($email) { + $this->email = $email; + } + + /** + * Returns the latitude + * + * @return \float $latitude + */ + public function getLatitude() { + return $this->latitude; + } + + /** + * Sets the latitude + * + * @param \float $latitude + * @return void + */ + public function setLatitude($latitude) { + $this->latitude = $latitude; + } + + /** + * Returns the longitude + * + * @return \float $longitude + */ + public function getLongitude() { + return $this->longitude; + } + + /** + * Sets the longitude + * + * @param \float $longitude + * @return void + */ + public function setLongitude($longitude) { + $this->longitude = $longitude; + } + + /** + * Returns the distance + * + * @return \float $distance + */ + public function getDistance() { + return $this->distance; + } + + /** + * Sets the distance + * + * @param \float $distance + * @return void + */ + public function setDistance($distance) { + $this->distance = $distance; + } + + /** + * Returns the custom1 + * + * @return \string $custom1 + */ + public function getCustom1() { + return $this->custom1; + } + + /** + * Sets the custom1 + * + * @param \string $custom1 + * @return void + */ + public function setCustom1($custom1) { + $this->custom1 = $custom1; + } + + /** + * Returns the custom2 + * + * @return \string $custom2 + */ + public function getCustom2() { + return $this->custom2; + } + + /** + * Sets the custom2 + * + * @param \string $custom2 + * @return void + */ + public function setCustom2($custom2) { + $this->custom2 = $custom2; + } + + /** + * Returns the custom3 + * + * @return \string $custom3 + */ + public function getCustom3() { + return $this->custom3; + } + + /** + * Sets the custom3 + * + * @param \string $custom3 + * @return void + */ + public function setCustom3($custom3) { + $this->custom3 = $custom3; + } + + /** + * Returns the mother + * + * @return \Quizpalme\Camaliga\Domain\Model\Content $mother + */ + public function getMother() { + return $this->mother; + } + + /** + * Sets the mother + * + * @param \Quizpalme\Camaliga\Domain\Model\Content $mother + * @return void + */ + public function setMother(\Quizpalme\Camaliga\Domain\Model\Content $mother) { + $this->mother = $mother; + } + + /** + * Adds a Category + * + * @param \TYPO3\CMS\Extbase\Domain\Model\Category $category + * @return void + */ + public function addCategory(\TYPO3\CMS\Extbase\Domain\Model\Category $category) { + $this->categories->attach($category); + } + + /** + * Removes a Category + * + * @param \TYPO3\CMS\Extbase\Domain\Model\Category $categoryToRemove The Category to be removed + * @return void + */ + public function removeCategory(\TYPO3\CMS\Extbase\Domain\Model\Category $categoryToRemove) { + $this->categories->detach($categoryToRemove); + } + + /** + * Sets the categories + * + * @param \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\TYPO3\CMS\Extbase\Domain\Model\Category> $categories + * @return void + */ + public function setCategories(\TYPO3\CMS\Extbase\Persistence\ObjectStorage $categories) { + $this->categories = $categories; + } + + /** + * Returns the categories + * + * @return \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\TYPO3\CMS\Extbase\Domain\Model\Category> $categories + */ + public function getCategories() { + return $this->categories; + } + + /** + * Returns the categories: Kategorien und dessen Vater eines Elements + * + * @return \array categories + */ + public function getCategoriesAndParents() { + $cats = array(); + if ($this->categories) { + $configuration = unserialize($GLOBALS['TYPO3_CONF_VARS']['EXT']['extConf']['camaliga']); + $catMode = intval($configuration["categoryMode"]); + $lang = intval($GLOBALS['TSFE']->config['config']['sys_language_uid']); + // Step 1: select all categories of the current language + $categoriesUtility = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('Quizpalme\\Camaliga\\Utility\\AllCategories'); + $all_cats = $categoriesUtility->getCategoriesarrayComplete(); + // Step 2: aktuelle orig_uid herausfinden + $orig_uid = intval($this->getUid()); // ist immer die original uid (nicht vom übersetzten Element!) + if ($lang > 0 && $catMode == 0) { + $res4 = $GLOBALS['TYPO3_DB']->exec_SELECTquery( + 'uid', + 'tx_camaliga_domain_model_content', + 'deleted=0 AND hidden=0 AND sys_language_uid=' . $lang . ' AND t3_origuid=' . $orig_uid); + if ($GLOBALS['TYPO3_DB']->sql_num_rows($res4) > 0) { + while($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res4)) + if ($row['uid']) { + $orig_uid = intval($row['uid']); // uid of the translated element + } + } + $GLOBALS['TYPO3_DB']->sql_free_result($res4); + } + // Step 3: get the mm-categories of the current element (from the original or translated element) + $res4 = $GLOBALS['TYPO3_DB']->exec_SELECTquery( + 'uid_local', + 'sys_category_record_mm', + "tablenames='tx_camaliga_domain_model_content' AND uid_foreign=" . $orig_uid); + if ($GLOBALS['TYPO3_DB']->sql_num_rows($res4) > 0) { + while($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res4)){ + $uid = $row['uid_local']; + if (!isset($all_cats[$uid]['parent'])) continue; + $parent = (int) $all_cats[$uid]['parent']; + //if (!$all_cats[$parent]['title']) continue; + if (!isset($cats[$parent])) { + $cats[$parent] = array(); + $cats[$parent]['childs'] = array(); + $cats[$parent]['title'] = $all_cats[$parent]['title']; + } + if ($all_cats[$uid]['title']) + $cats[$parent]['childs'][$uid] = $all_cats[$uid]['title']; + } + } + $GLOBALS['TYPO3_DB']->sql_free_result($res4); + } + return $cats; + } + + /** + * Returns the modulo begin + * + * @return \integer $moduloBegin + */ + public function getModuloBegin() { + return $this->moduloBegin; + } + + /** + * Sets the modulo begin + * + * @param \integer $moduloBegin + * @return void + */ + public function setModuloBegin($moduloBegin) { + $this->moduloBegin = $moduloBegin; + } + + /** + * Returns the modulo end + * + * @return \integer $moduloEnd + */ + public function getModuloEnd() { + return $this->moduloEnd; + } + + /** + * Sets the modulo end + * + * @param \integer $moduloEnd + * @return void + */ + public function setModuloEnd($moduloEnd) { + $this->moduloEnd = $moduloEnd; + } + + + /** + * Returns the extended fields: custom extended fields + * + * @return \array fields + */ + public function getExtended() { + $extended = array(); + $configuration = unserialize($GLOBALS['TYPO3_CONF_VARS']['EXT']['extConf']['camaliga']); + $extendedFields = $configuration["extendedFields"]; + if ($extendedFields) { + $orig_uid = intval($this->getUid()); // ist immer die original uid (nicht vom übersetzten Element!) + $fieldsArray = explode(' ', trim($extendedFields)); + $search = implode(',', $fieldsArray); + if ($search) { + $res4 = $GLOBALS['TYPO3_DB']->exec_SELECTquery( + $search, + 'tx_camaliga_domain_model_content', + 'uid=' . $orig_uid); + if ($GLOBALS['TYPO3_DB']->sql_num_rows($res4) > 0) { + $extended = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res4); + } + $GLOBALS['TYPO3_DB']->sql_free_result($res4); + } + } + return $extended; + } +} +?> \ No newline at end of file diff --git a/Classes/Domain/Repository/ContentRepository.php b/Classes/Domain/Repository/ContentRepository.php new file mode 100644 index 0000000..7095bf7 --- /dev/null +++ b/Classes/Domain/Repository/ContentRepository.php @@ -0,0 +1,425 @@ + + * + * 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 3 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! + ***************************************************************/ + +/** + * Content Repository: das Herz der Extension + * + * @package camaliga + * @license http://www.gnu.org/licenses/gpl.html GNU General Public License, version 3 or later + * + */ +class ContentRepository extends \TYPO3\CMS\Extbase\Persistence\Repository { + + /** + * Entferungsarray + * + * @var \array + */ + protected $distanceArray = array(); + + // Entferungsarray zurück geben + function getDistanceArray() { + return $this->distanceArray; + } + + // String Escape for DB + function ms_escape_string($data) { + if ( !isset($data) or empty($data) ) return ''; + if ( is_numeric($data) ) return $data; + + $non_displayables = array( + '/%0[0-8bcef]/', // url encoded 00-08, 11, 12, 14, 15 + '/%1[0-9a-f]/', // url encoded 16-31 + '/[\x00-\x08]/', // 00-08 + '/\x0b/', // 11 + '/\x0c/', // 12 + '/[\x0e-\x1f]/' // 14-31 + ); + foreach ( $non_displayables as $regex ) + $data = preg_replace( $regex, '', $data ); + $entf = array('\\', '"', "'", '%', '´', '`'); + $data = str_replace($entf, '', $data ); + return $data; + } + + /** + * findAll ersetzen, wegen Sortierung + * @param string $sortBy Sort by + * @param string $sortOrder Sort order + * @param boolean $onlyDistinct Only distinct entries? + * @param array $pids Storage PIDs + * @param integer $limit Limit + */ + public function findAll($sortBy = 'sorting', $sortOrder = 'asc', $onlyDistinct = FALSE, $pids = array(), $limit = 0) { + $order = ($sortOrder == 'desc') ? \TYPO3\CMS\Extbase\Persistence\QueryInterface::ORDER_DESCENDING : + \TYPO3\CMS\Extbase\Persistence\QueryInterface::ORDER_ASCENDING; + if ($sortBy=='sorting' || $sortBy=='tstamp' || $sortBy=='crdate' || $sortBy=='title' || $sortBy=='zip' || $sortBy=='city' + || $sortBy=='country' || $sortBy=='custom1' || $sortBy=='custom2' || $sortBy=='custom3') { + //OK + } else $sortBy = 'sorting'; + + $constraints = array(); + $query = $this->createQuery(); + if (count($pids)>0) { + $query->getQuerySettings()->setRespectStoragePage(FALSE); + $constraints[] = $query->in('pid', $pids); + } + // keine gute Idee: Mutter muss 0 sein, aber nur wenn die Mutter vorhanden ist (die könnte auch in einem anderen Ordner liegen) + //if ($onlyDistinct) + // $constraints[] = $query->equals('mother', 0); + if (count($constraints) > 0) + $query->matching($query->logicalAnd($constraints)); + if ($limit > 0) + $query->setLimit(intval($limit)); + // ->setOffset($page * $limit) + $result = $query + ->setOrderings( array($sortBy => $order) ) + ->execute(); + + if ($onlyDistinct) { + // bessere Idee: + $resUids = array(); + $delKeys = array(); + foreach ($result as $element) { + $resUids[$element->getUid()] = 1; + } + foreach ($result as $key => $element) { + if (($element->getMother() > 0) && ($resUids[$element->getMother()] == 1)) { + // Mutter und Kind sind vorhanden => Kind löschen + $delKeys[] = $key; + } + } + if (count($delKeys) > 0) { + foreach ($delKeys as $key) { + // Mutter und Kind sind vorhanden => Kind löschen + unset($result[$key]); + } + } + } + return $result; + } + + /** + * findComplex: umfangreiche Suche + * @param array $uids UIDs + * @param string $sword Suchwort + * @param string $place Ort + * @param integer $radius Radius + * @param string $sortBy Sort by + * @param string $sortOrder Sort order + * @param boolean $onlyDistinct Only distinct entries? + * @param array $pids Storage PIDs + * @param integer $limit Limit + */ + public function findComplex($uids, $sword, $place, $radius, $sortBy = 'sorting', $sortOrder = 'asc', $onlyDistinct = FALSE, $pids = array(), $limit = 0) { + $order = ($sortOrder == 'desc') ? \TYPO3\CMS\Extbase\Persistence\QueryInterface::ORDER_DESCENDING : + \TYPO3\CMS\Extbase\Persistence\QueryInterface::ORDER_ASCENDING; + if ($sortBy=='sorting' || $sortBy=='tstamp' || $sortBy=='title' || $sortBy=='zip' || $sortBy=='city' + || $sortBy=='country' || $sortBy=='custom1' || $sortBy=='custom2' || $sortBy=='custom3') { + //OK + } else $sortBy = 'sorting'; + if ($sword) $sword = '%' . $sword . '%'; + if (count($uids) > 0) { + $catSearch = TRUE; + } else { + $catSearch = FALSE; + $uids = array(); + } + $noMatch = FALSE; + $this->distanceArray = array(); + + // Umkreissuche von hier: http://opengeodb.org/wiki/OpenGeoDB_-_Umkreissuche + if ($place && $radius) { + $ort = $this->ms_escape_string($place); + $radius = intval($radius); + + // Position des Suchortes finden + $where = (is_numeric($ort)) ? "zc_zip = '" . $ort . "'" : "zc_location_name LIKE '" . $ort . "%'"; + $res4 = $GLOBALS['TYPO3_DB']->exec_SELECTquery( + 'zc_id, zc_location_name, zc_lat, zc_lon', + 'geodb_zip_coordinates', + $where, + '', + 'zc_location_name', + '1'); + if ($GLOBALS['TYPO3_DB']->sql_num_rows($res4) > 0) { + while($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res4)){ + $zc_id = $row['zc_id']; + $zc_name = $row['zc_location_name']; + $zc_lat = $row['zc_lat']; + $zc_lon = $row['zc_lon']; + } + } + $GLOBALS['TYPO3_DB']->sql_free_result($res4); + + // Elemente in der Umgebung des Suchortes finden + if ($zc_id) { + $new_uids = array(); + $res4 = $GLOBALS['TYPO3_DB']->sql_query( + 'SELECT dest.uid, dest.zip, dest.city, + ACOS( + SIN(RADIANS(src.zc_lat)) * SIN(RADIANS(dest.latitude)) + + COS(RADIANS(src.zc_lat)) * COS(RADIANS(dest.latitude)) + * COS(RADIANS(src.zc_lon) - RADIANS(dest.longitude)) + ) * 6380 AS distance + FROM tx_camaliga_domain_model_content dest + CROSS JOIN geodb_zip_coordinates src + WHERE src.zc_id = ' . $zc_id .' + HAVING distance < ' . $radius); // . 'ORDER BY distance'); + if ($GLOBALS['TYPO3_DB']->sql_num_rows($res4) > 0) { + while($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res4)){ + $uid = intval($row['uid']); + //echo "\nGefunden: " . $uid . ': ' . $row['zip'] . ' ' . $row['city']; + if ($catSearch) { + // Gibt es auch eine Übereinstimmung bei der Kategoriensuche? + if ($uids[$uid] > 0) { + $new_uids[$uid] = $uid; + $this->distanceArray[$uid] = $row['distance']; + } + } else { + // Keine Kategoriensuche + $uids[$uid] = $uid; + $this->distanceArray[$uid] = $row['distance']; + } + } + } + $GLOBALS['TYPO3_DB']->sql_free_result($res4); + // nur die UIDs übernehmen, wo Kategorie-Suche und PLZ/Ort-Suche das selbe gefunden hat! + if ($catSearch) + $uids = $new_uids; + } else { + // nix gefunden + $uids = array(); + } + if (count($uids) == 0) $noMatch = TRUE; // keine Treffer bei der Umkreissuche! + } else if ($place) { + // Suche nach Ort, aber keine Umkreissuche + $place = $place . '%'; + } + + if (!$noMatch) { + $constraints = array(); + $query = $this->createQuery(); + if (count($pids)>0) { + $query->getQuerySettings()->setRespectStoragePage(FALSE); + $constraints[] = $query->in('pid', $pids); + } + if ($onlyDistinct) + $constraints[] = $query->equals('mother', 0); + if (count($uids) > 0) + $constraints[] = $query->in('uid', $uids); + if ($place && !$radius) { + $constraints[] = $query->logicalOr( + $query->like('city', $place), + $query->like('zip', $place) + ); + } elseif ($sword) { + $constraints[] = $query->logicalOr( + $query->logicalOr( + $query->logicalOr( + $query->like('title', $sword), + $query->like('shortdesc', $sword) + ), + $query->logicalOr( + $query->like('person', $sword), + $query->like('longdesc', $sword) + ) + ), + $query->logicalOr( + $query->logicalOr( + $query->like('custom1', $sword), + $query->like('custom2', $sword) + ), + $query->logicalOr( + $query->like('city', $sword), + $query->like('zip', $sword) + ) + ) + ); + } + if (count($constraints) > 0) + $query->matching($query->logicalAnd($constraints)); + if ($limit > 0) + $query->setLimit(intval($limit)); + return $query + ->setOrderings(array($sortBy => $order)) + ->execute(); + } + } + + /** + * findByUids ersetzen, wegen Sortierung + * @param array $uids UIDs + * @param string $sortBy Sort by + * @param string $sortOrder Sort order + */ + public function findByUids($uids, $sortBy = 'sorting', $sortOrder = 'asc') { + $order = ($sortOrder == 'desc') ? \TYPO3\CMS\Extbase\Persistence\QueryInterface::ORDER_DESCENDING : + \TYPO3\CMS\Extbase\Persistence\QueryInterface::ORDER_ASCENDING; + if ($sortBy=='sorting' || $sortBy=='tstamp' || $sortBy=='title' || $sortBy=='zip' || $sortBy=='city' + || $sortBy=='country' || $sortBy=='custom1' || $sortBy=='custom2' || $sortBy=='custom3') { + //OK + } else $sortBy = 'sorting'; + $query = $this->createQuery(); + // nicht nötig: + // if ($onlyDistinct) $query->matching($query->logicalAnd($query->equals('mother', 0), $query->in('uid', $uids))); else + $query->matching($query->in('uid', $uids)); + return $query + ->setOrderings( array($sortBy => $order) ) + ->execute(); + } + + /** + * findByCategories ersetzen, wegen Sortierung + * @param array $cat_uids UIDs von Kategorien + * @param string $sword Suchwort + * @param string $place Ort + * @param integer $radius Radius + * @param string $sortBy Sort by + * @param string $sortOrder Sort order + * @param boolean $onlyDistinct Only distinct entries? + * @param array $pids Storage PIDs + * @param boolean $checkMax true: OR/AND mode; false: only OR mode + * @param integer $limit Limit + */ + public function findByCategories($cat_uids, $sword, $place, $radius, $sortBy = 'sorting', $sortOrder = 'asc', $onlyDistinct = FALSE, $pids = array(), $checkMax = TRUE, $limit = 0) { + if (count($cat_uids) > 0) { + $max = 0; + $parents = array(); // Übergeordnete Elemente + $childs = array(); // Kind-Elemente, die angezeigt werden sollen + $twice = array(); // Kind-Elemente, die entfernt werden sollen + $elements = array(); // Elemente, die gefunden wurden, mit Anzahl der Treffer bei der Suche zu diesem Element + $results = array(); // Elemente, die zum Schluss übrig bleiben + if (count($pids)>0) $where = ' AND con.pid IN (' . implode(',', $pids) . ')'; else $where = ''; + foreach ($cat_uids as $uidsChilds) { + // Search all elements of specified category/ies + $res4 = $GLOBALS['TYPO3_DB']->exec_SELECTquery( + 'DISTINCT mm.uid_foreign, con.mother', + 'sys_category_record_mm AS mm, tx_camaliga_domain_model_content AS con', + "mm.tablenames='tx_camaliga_domain_model_content' AND + mm.uid_foreign=con.uid AND mm.uid_local IN (" . $uidsChilds . ')' . $where); + if ($GLOBALS['TYPO3_DB']->sql_num_rows($res4) > 0) { + while($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res4)){ + $cam_uid = $row['uid_foreign']; + $elements[$cam_uid]++; + $parents[$cam_uid] = $row['mother']; + $childs[$cam_uid] = 0; + } + } + $GLOBALS['TYPO3_DB']->sql_free_result($res4); + $max++; + } + //var_dump($uids); echo "max: $max -- "; var_dump($elements); + + // take only elements where all matches were true + foreach ($elements as $uid => $count) { + if (($count == $max) || !$checkMax) $results[$uid] = $uid; // statt $results[] = + } + + // wenn nur einmalige Elemente angezeigt werden sollen, dann weiter ausdünnen + if ($onlyDistinct) { + foreach ($results as $key => $uid) { + $mother = $parents[$uid]; + if ($mother > 0) { + // Es gibt ein Mutter-Element + if (in_array($mother, $results)) { + // Mutter-Element vorhanden, also dieses Kind entfernen + $twice[$key] = $uid; + } else { + if ($childs[$mother]) { + // Ähnliches Element vorhanden, also dieses Kind entfernen + $twice[$key] = $uid; + } else { + // Dieses Kind statt der Mutter anzeigen + $childs[$mother] = $uid; + } + } + } + } + if (count($twice) > 0) { + // Dieses nicht eindeutigen Elemente entfernen + foreach ($twice as $key => $uid) { + unset($results[$key]); + } + } + } + + if (sizeof($results) > 0) { + // search all content elements of specified uids + if ($sword || $place) + return $this->findComplex($results, $sword, $place, $radius, $sortBy, $sortOrder, $onlyDistinct, $pids, $limit = 0); + else + return $this->findByUids($results, $sortBy, $sortOrder); + } + } else { + // sollte eigentlich nie eintreten + return $this->findAll($sortBy, $sortOrder, $onlyDistinct, $pids, $limit = 0); + } + } + + /** + * Get a random object + */ + public function findRandom() { + $rows = $this->createQuery()->execute()->count(); + $row_number = mt_rand(0, max(0, ($rows - 1))); + return $this->createQuery()->setOffset($row_number)->setLimit(1)->execute(); + } + + /** + * findByMother2 ersetzen, wegen Schwestern + * @param integer $mother Mutter-UID + * @param integer $child Aktuelle Kind-UID + */ + public function findByMother2($mother, $child) { + $mother = intval($mother); + $child = intval($child); + $query = $this->createQuery(); + if ($child > 0) { + $query->matching( + $query->logicalAnd( + $query->equals('mother', $mother), + $query->logicalNot($query->equals('uid', $child)) + ) + ); + } else { + $query->matching($query->equals('mother', $mother)); + } + return $query->execute(); + } + + /** + * Get the PIDs + * + * @return array + */ + public function getStoragePids() { + $query = $this->createQuery(); + return $query->getQuerySettings()->getStoragePageIds(); + } +} +?> \ No newline at end of file diff --git a/Classes/Hooks/ItemsProcFunc.php b/Classes/Hooks/ItemsProcFunc.php new file mode 100644 index 0000000..2644916 --- /dev/null +++ b/Classes/Hooks/ItemsProcFunc.php @@ -0,0 +1,70 @@ + +* 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! +***************************************************************/ +/* + * modified 2014 by Kurt Gusbeth +*/ +namespace Quizpalme\Camaliga\Hooks; +use TYPO3\CMS\Backend\Utility\BackendUtility as BackendUtilityCore; + +/** + * Userfunc: Individuelles... + * + * @package camaliga + * @license http://www.gnu.org/licenses/gpl.html GNU General Public License, version 3 or later + * + */ +class ItemsProcFunc { + + /** + * Itemsproc for templateLayouts + * + * @param array &$config configuration array + * @return void + */ + public function user_templateLayout(array &$config) { + $row = $this->getContentElementRow($config['row']['uid']); + // $pid = $config['row']['pid']; geht nicht mehr + $pid = $row['pid']; + $templateLayoutsUtility = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('Quizpalme\\Camaliga\\Utility\\TemplateLayout'); + $templateLayouts = $templateLayoutsUtility->getAvailableTemplateLayouts($pid); + foreach ($templateLayouts as $layout) { + $additionalLayout = array( + $GLOBALS['LANG']->sL($layout[0], TRUE), + $layout[1] + ); + array_push($config['items'], $additionalLayout); + } + } + + /** + * Get tt_content record + * + * @param int $uid + * @return array + */ + protected function getContentElementRow($uid) + { + return BackendUtilityCore::getRecord('tt_content', $uid); + } +} \ No newline at end of file diff --git a/Classes/Hooks/PageLayoutView.php b/Classes/Hooks/PageLayoutView.php new file mode 100644 index 0000000..b5aab0a --- /dev/null +++ b/Classes/Hooks/PageLayoutView.php @@ -0,0 +1,328 @@ +Page module + * + */ +class PageLayoutView +{ + + /** + * Extension key + * + * @var string + */ + const KEY = 'camaliga'; + + /** + * Path to the locallang file + * + * @var string + */ + const LLPATH = 'LLL:EXT:camaliga/Resources/Private/Language/locallang_be.xlf:'; + + /** + * Max shown settings + */ + const SETTINGS_IN_PREVIEW = 10; + + /** + * Table information + * + * @var array + */ + public $tableData = []; + + /** + * Flexform information + * + * @var array + */ + public $flexformData = []; + + /** + * @var IconFactory + */ + protected $iconFactory; + + public function __construct() + { + $this->iconFactory = GeneralUtility::makeInstance(IconFactory::class); + } + + /** + * Returns information about this extension's pi1 plugin + * + * @param array $params Parameters to the hook + * @param object $pObj A reference to calling object + * @return string Information about pi1 plugin + */ + public function getExtensionSummary($params, &$pObj) { + $actionTranslationKey = $result = ''; + + $header = '' . $this->getLanguageService()->sL(self::LLPATH . 'pagelayoutview') . ''; + + if ($params['row']['list_type'] == self::KEY . '_pi1') { + $this->flexformData = GeneralUtility::xml2array($params['row']['pi_flexform']); + + // if flexform data is found + $actions = $this->getFieldFromFlexform('switchableControllerActions'); + if (!empty($actions)) { + $actionList = GeneralUtility::trimExplode(';', $actions); + $actionList2 = GeneralUtility::trimExplode('>', $actionList[0]); + + // translate the first action into its translation + //$actionTranslationKey = strtolower(str_replace('->', '_', $actionList[0])); + $actionTranslationKey = strtolower($actionList2[1]); + $actionTranslation = $this->getLanguageService()->sL(self::LLPATH . 'template.' . $actionTranslationKey); + $actionTranslation = ($actionTranslation) ? htmlspecialchars($actionTranslation) : $actionTranslationKey; + + $th = $this->getLanguageService()->sL(self::LLPATH . 'template'); + $td = $actionTranslation; + } else { + $th = $this->generateCallout($this->getLanguageService()->sL(self::LLPATH . 'template.not_configured')); + $td = ''; + } + $this->tableData[] = [ + $th, + $td + ]; + + $this->getStartingPoint($params['row']['pages']); + + if (is_array($this->flexformData)) { + $listPid = (int)$this->getFieldFromFlexform('settings.listId'); + if ($listPid > 0) { + $content = $this->getRecordData($listPid); + $this->tableData[] = [ + $this->getLanguageService()->sL(self::LLPATH . 'layout.listId'), + $content + ]; + } + $detailPid = (int)$this->getFieldFromFlexform('settings.showId'); + if ($detailPid > 0) { + $content = $this->getRecordData($detailPid); + $this->tableData[] = [ + $this->getLanguageService()->sL(self::LLPATH . 'layout.showId'), + $content + ]; + } + if (is_array($GLOBALS['TYPO3_CONF_VARS']['EXT']['camaliga']['Quizpalme\\Camaliga\\Hooks\\PageLayoutView']['extensionSummary'])) { + $params = [ + 'action' => $actionTranslationKey + ]; + foreach ($GLOBALS['TYPO3_CONF_VARS']['EXT']['camaliga']['Quizpalme\\Camaliga\\Hooks\\PageLayoutView']['extensionSummary'] as $reference) { + GeneralUtility::callUserFunction($reference, $params, $this); + } + } + $result = $this->renderSettingsAsTable($header, $params['row']['uid']); + } + } + + return $result; + } + + /** + * Get the rendered page title including onclick menu + * + * @param int $detailPid + * @return string + * @deprecated use getRecordData() instead + */ + public function getPageRecordData($detailPid) + { + return $this->getRecordData($detailPid, 'pages'); + } + + /** + * @param int $id + * @param string $table + * @return string + */ + public function getRecordData($id, $table = 'pages') + { + $record = BackendUtilityCore::getRecord($table, $id); + + if (is_array($record)) { + $data = '' + . $this->iconFactory->getIconForRecord($table, $record, Icon::SIZE_SMALL)->render() + . ' '; + $content = BackendUtilityCore::wrapClickMenuOnIcon($data, $table, $record['uid'], true, '', + '+info,edit,history'); + + $linkTitle = htmlspecialchars(BackendUtilityCore::getRecordTitle($table, $record)); + + if ($table === 'pages') { + $id = $record['uid']; + $currentPageId = (int)GeneralUtility::_GET('id'); + $link = htmlspecialchars($this->getEditLink($record, $currentPageId)); + $switchLabel = $this->getLanguageService()->sL(self::LLPATH . 'pagemodule.switchToPage'); + $content .= ' ' . $linkTitle . ''; + } else { + $content .= $linkTitle; + } + } else { + $text = sprintf($this->getLanguageService()->sL(self::LLPATH . 'pagemodule.pageNotAvailable'), + $id); + $content = $this->generateCallout($text); + } + + return $content; + } + + /** + * Get the startingpoint + * + * @param string $pids + * @return void + */ + public function getStartingPoint($pids) + { + //$value = $this->getFieldFromFlexform('settings.startingpoint'); + if (!empty($pids)) { + $pageIds = GeneralUtility::intExplode(',', $pids, true); + $pagesOut = []; + + foreach ($pageIds as $id) { + $pagesOut[] = $this->getRecordData($id, 'pages'); + } + + $recursiveLevel = (int)$this->getFieldFromFlexform('settings.recursive'); + $recursiveLevelText = ''; + if ($recursiveLevel === 250) { + $recursiveLevelText = $this->getLanguageService()->sL('LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:recursive.I.5'); + } elseif ($recursiveLevel > 0) { + $recursiveLevelText = $this->getLanguageService()->sL('LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:recursive.I.' . $recursiveLevel); + } + + if (!empty($recursiveLevelText)) { + $recursiveLevelText = '
' . + htmlspecialchars($this->getLanguageService()->sL('LLL:EXT:lang/locallang_general.xlf:LGL.recursive')) . ' ' . + $recursiveLevelText; + } + + $this->tableData[] = [ + $this->getLanguageService()->sL('LLL:EXT:lang/locallang_general.php:LGL.startingpoint'), + implode(', ', $pagesOut) . $recursiveLevelText + ]; + } + } + + /** + * Render an alert box + * + * @param string $text + * @return string + */ + protected function generateCallout($text) + { + return '
' . htmlspecialchars($text) . '
'; + } + + /** + * Render the settings as table for Web>Page module + * System settings are displayed in mono font + * + * @param string $header + * @param int $recordUid + * @return string + */ + protected function renderSettingsAsTable($header = '', $recordUid = 0) + { + $pageRenderer = GeneralUtility::makeInstance(PageRenderer::class); + $pageRenderer->loadRequireJsModule('TYPO3/CMS/Camaliga/PageLayout'); + $pageRenderer->addCssFile(ExtensionManagementUtility::extRelPath('camaliga') . 'Resources/Public/css/PageLayoutView.css'); + + $view = GeneralUtility::makeInstance(StandaloneView::class); + $view->setTemplatePathAndFilename(GeneralUtility::getFileAbsFileName('EXT:camaliga/Resources/Private/Templates/Backend/PageLayoutView.html')); + $view->assignMultiple([ + 'header' => $header, + 'rows' => [ + 'above' => array_slice($this->tableData, 0, self::SETTINGS_IN_PREVIEW), + 'below' => array_slice($this->tableData, self::SETTINGS_IN_PREVIEW) + ], + 'id' => $recordUid + ]); + + return $view->render(); + } + + /** + * Get field value from flexform configuration, + * including checks if flexform configuration is available + * + * @param string $key name of the key + * @param string $sheet name of the sheet + * @return string|NULL if nothing found, value if found + */ + public function getFieldFromFlexform($key, $sheet = 'sDEF') + { + $flexform = $this->flexformData; + if (isset($flexform['data'])) { + $flexform = $flexform['data']; + if (is_array($flexform) && is_array($flexform[$sheet]) && is_array($flexform[$sheet]['lDEF']) + && is_array($flexform[$sheet]['lDEF'][$key]) && isset($flexform[$sheet]['lDEF'][$key]['vDEF']) + ) { + return $flexform[$sheet]['lDEF'][$key]['vDEF']; + } + } + + return null; + } + + /** + * Build a backend edit link based on given record. + * + * @param array $row Current record row from database. + * @param int $currentPageUid current page uid + * @return string Link to open an edit window for record. + * @see \TYPO3\CMS\Backend\Utility\BackendUtilityCore::readPageAccess() + */ + protected function getEditLink($row, $currentPageUid) + { + $editLink = ''; + $localCalcPerms = $GLOBALS['BE_USER']->calcPerms(BackendUtilityCore::getRecord('pages', $row['uid'])); + $permsEdit = $localCalcPerms & Permission::PAGE_EDIT; + if ($permsEdit) { + $returnUrl = BackendUtilityCore::getModuleUrl('web_layout', ['id' => $currentPageUid]); + $editLink = BackendUtilityCore::getModuleUrl('web_layout', [ + 'id' => $row['uid'], + 'returnUrl' => $returnUrl + ]); + } + return $editLink; + } + + /** + * Return language service instance + * + * @return \TYPO3\CMS\Lang\LanguageService + */ + public function getLanguageService() + { + return $GLOBALS['LANG']; + } +} diff --git a/Classes/Hooks/class.user_kesearchhooks.php b/Classes/Hooks/class.user_kesearchhooks.php new file mode 100644 index 0000000..aa05067 --- /dev/null +++ b/Classes/Hooks/class.user_kesearchhooks.php @@ -0,0 +1,98 @@ + + * @since Fri Jan 07 2011 16:01:51 GMT+0100 + */ + public function customIndexer(&$indexerConfig, &$indexerObject) { + if($indexerConfig['type'] == 'camaliga') { + $content = ''; + + // get all the entries to index + // don't index hidden or deleted elements, BUT + // get the elements with frontend user group access restrictions + // or time (start / stop) restrictions. + // Copy those restrictions to the index. + $fields = '*'; + $table = 'tx_camaliga_domain_model_content'; + $where = 'pid IN (' . $indexerConfig['sysfolder'] . ') AND hidden = 0 AND deleted = 0'; + $groupBy = ''; + $orderBy = ''; + $limit = ''; + $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery($fields,$table,$where,$groupBy,$orderBy,$limit); + $resCount = $GLOBALS['TYPO3_DB']->sql_num_rows($res); + + // Loop through the records and write them to the index. + if($resCount) { + while ( ($record = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res)) ) { + + // compile the information which should go into the index + // the field names depend on the table you want to index! + $title = strip_tags($record['title']); + $abstract = strip_tags($record['shortdesc']); + $content = strip_tags($record['longdesc']); + $place = strip_tags($record['city']); + $place .= ($record['city'] && $record['country']) ? ', ' . strip_tags($record['country']) + : ' ' . strip_tags($record['country']); + $fullContent = $title . "\n" . $abstract . "\n" . $content . "\n" .$place; + $params = '&tx_camaliga_pi1[content]=' . $record['uid']; + $tags = ''; // oder '#camaliga#'; + $additionalFields = array( + 'sortdate' => $record['crdate'], + 'orig_uid' => $record['uid'], + 'orig_pid' => $record['pid'], + ); + + // ... and store the information in the index + $indexerObject->storeInIndex( + $indexerConfig['storagepid'], // storage PID + $title, // record title + 'camaliga', // content type + $indexerConfig['targetpid'], // target PID: where is the single view? + $fullContent, // indexed content, includes the title (linebreak after title) + $tags, // tags for faceted search + $params, // typolink params for singleview + $abstract, // abstract; shown in result list if not empty + $record['sys_language_uid'], // language uid + $record['starttime'], // starttime + $record['endtime'], // endtime + 0, // fe_group + false, // debug only? + $additionalFields // additionalFields + ); + } + $content = '

Indexer "' . $indexerConfig['title'] . '":
' . $resCount . ' camaliga-elements have been indexed.

'; + } + return $content; + } + } +} +?> diff --git a/Classes/Task/CsvExportAdditionalFieldProvider.php b/Classes/Task/CsvExportAdditionalFieldProvider.php new file mode 100644 index 0000000..47eb587 --- /dev/null +++ b/Classes/Task/CsvExportAdditionalFieldProvider.php @@ -0,0 +1,224 @@ +getAdditionalFields($taskInfo, $task, $schedulerModule) + */ + public function getAdditionalFields(array &$taskInfo, $task, \TYPO3\CMS\Scheduler\Controller\SchedulerModuleController $schedulerModule) { + $additionalFields = array(); + if (empty($taskInfo['csvfile'])) { + if ($schedulerModule->CMD == 'add') { + $taskInfo['csvfile'] = 'fileadmin/'; + } else { + $taskInfo['csvfile'] = $task->getCsvfile(); + } + } + if (empty($taskInfo['page'])) { + if ($schedulerModule->CMD == 'add') { + $taskInfo['page'] = ''; + } else { + $taskInfo['page'] = $task->getPage(); + } + } + if (empty($taskInfo['cats'])) { + if ($schedulerModule->CMD == 'add') { + $taskInfo['cats'] = ''; + } else { + $taskInfo['cats'] = $task->getCats(); + } + } + if (empty($taskInfo['header'])) { + if ($schedulerModule->CMD == 'add') { + $taskInfo['header'] = ''; + } else { + $taskInfo['header'] = $task->getHeader(); + } + } + if (empty($taskInfo['fields'])) { + if ($schedulerModule->CMD == 'add') { + $taskInfo['fields'] = ''; + } else { + $taskInfo['fields'] = $task->getFields(); + } + } + if (empty($taskInfo['separator'])) { + if ($schedulerModule->CMD == 'add') { + $taskInfo['separator'] = '"'; + } else { + $taskInfo['separator'] = $task->getSeparator(); + } + } + if (empty($taskInfo['delimiter'])) { + if ($schedulerModule->CMD == 'add') { + $taskInfo['delimiter'] = ';'; + } else { + $taskInfo['delimiter'] = $task->getDelimiter(); + } + } + if (empty($taskInfo['catdelimiter'])) { + if ($schedulerModule->CMD == 'add') { + $taskInfo['catdelimiter'] = ', '; + } else { + $taskInfo['catdelimiter'] = $task->getCatdelimiter(); + } + } + if (empty($taskInfo['convert'])) { + if ($schedulerModule->CMD == 'add') { + $taskInfo['convert'] = 0; + } else { + $taskInfo['convert'] = $task->getConvert(); + } + } + + // Ordner + $fieldId = 'task_page'; + $fieldCode = ''; + $label = $GLOBALS['LANG']->sL('LLL:EXT:camaliga/Resources/Private/Language/locallang_be.xlf:tasks.validate.page'); + $label = BackendUtility::wrapInHelp('camaliga', $fieldId, $label); + $additionalFields[$fieldId] = array( + 'code' => $fieldCode, + 'label' => $label + ); + // Kategorien + $fieldId = 'task_cats'; + $fieldCode = ''; + $label = $GLOBALS['LANG']->sL('LLL:EXT:camaliga/Resources/Private/Language/locallang_be.xlf:tasks.validate.cats'); + $label = BackendUtility::wrapInHelp('camaliga', $fieldId, $label); + $additionalFields[$fieldId] = array( + 'code' => $fieldCode, + 'label' => $label + ); + // path to csv file + $fieldId = 'task_csvfile'; + $fieldCode = ''; + $label = $GLOBALS['LANG']->sL('LLL:EXT:camaliga/Resources/Private/Language/locallang_be.xlf:tasks.validate.csvfile'); + $label = BackendUtility::wrapInHelp('camaliga', $fieldId, $label); + $additionalFields[$fieldId] = array( + 'code' => $fieldCode, + 'label' => $label + ); + // header of the csv file + $fieldId = 'task_header'; + $fieldCode = ''; + $label = $GLOBALS['LANG']->sL('LLL:EXT:camaliga/Resources/Private/Language/locallang_be.xlf:tasks.validate.header'); + $label = BackendUtility::wrapInHelp('camaliga', $fieldId, $label); + $additionalFields[$fieldId] = array( + 'code' => $fieldCode, + 'label' => $label + ); + // fields to export into the csv file + $fieldId = 'task_fields'; + $fieldCode = ''; + $label = $GLOBALS['LANG']->sL('LLL:EXT:camaliga/Resources/Private/Language/locallang_be.xlf:tasks.validate.fields'); + $label = BackendUtility::wrapInHelp('camaliga', $fieldId, $label); + $additionalFields[$fieldId] = array( + 'code' => $fieldCode, + 'label' => $label + ); + // separator + $fieldId = 'task_separator'; + $fieldCode = ''; + $label = $GLOBALS['LANG']->sL('LLL:EXT:camaliga/Resources/Private/Language/locallang_be.xlf:tasks.validate.separator'); + $label = BackendUtility::wrapInHelp('camaliga', $fieldId, $label); + $additionalFields[$fieldId] = array( + 'code' => $fieldCode, + 'label' => $label + ); + // delimiter + $fieldId = 'task_delimiter'; + $fieldCode = ''; + $label = $GLOBALS['LANG']->sL('LLL:EXT:camaliga/Resources/Private/Language/locallang_be.xlf:tasks.validate.delimiter'); + $label = BackendUtility::wrapInHelp('camaliga', $fieldId, $label); + $additionalFields[$fieldId] = array( + 'code' => $fieldCode, + 'label' => $label + ); + // catdelimiter + $fieldId = 'task_catdelimiter'; + $fieldCode = ''; + $label = $GLOBALS['LANG']->sL('LLL:EXT:camaliga/Resources/Private/Language/locallang_be.xlf:tasks.validate.catdelimiter'); + $label = BackendUtility::wrapInHelp('camaliga', $fieldId, $label); + $additionalFields[$fieldId] = array( + 'code' => $fieldCode, + 'label' => $label + ); + // convert + $fieldId = 'task_convert'; + $checked = ($taskInfo['convert']) ? ' checked="checked"' : ''; + $fieldCode = ''; + $label = $GLOBALS['LANG']->sL('LLL:EXT:camaliga/Resources/Private/Language/locallang_be.xlf:tasks.validate.convert'); + $label = BackendUtility::wrapInHelp('camaliga', $fieldId, $label); + $additionalFields[$fieldId] = array( + 'code' => $fieldCode, + 'label' => $label + ); + return $additionalFields; + } + + /** + * This method checks any additional data that is relevant to the specific task. + * If the task class is not relevant, the method is expected to return TRUE. + * + * @param array $submittedData Reference to the array containing the data submitted by the user + * @param \TYPO3\CMS\Scheduler\Controller\SchedulerModuleController $schedulerModule Reference to the BE module of the Scheduler + * @return boolean TRUE if validation was ok (or selected class is not relevant), FALSE otherwise + */ + public function validateAdditionalFields(array &$submittedData, \TYPO3\CMS\Scheduler\Controller\SchedulerModuleController $schedulerModule) { + $isValid = TRUE; + if ($res = $GLOBALS['TYPO3_DB']->exec_SELECTquery('*', 'pages', 'uid = ' . (int)$submittedData['camaliga']['page'])) { + if ($GLOBALS['TYPO3_DB']->sql_num_rows($res) == 0 && $submittedData['camaliga']['page'] > 0) { + $isValid = FALSE; + $schedulerModule->addMessage( + $GLOBALS['LANG']->sL('LLL:EXT:camaliga/Resources/Private/Language/locallang_be.xlf:tasks.validate.invalidPage'), + \TYPO3\CMS\Core\Messaging\FlashMessage::ERROR + ); + } + $GLOBALS['TYPO3_DB']->sql_free_result($res); + } else { + $isValid = FALSE; + $schedulerModule->addMessage( + $GLOBALS['LANG']->sL('LLL:EXT:camaliga/Resources/Private/Language/locallang_be.xlf:tasks.validate.invalidPage'), + \TYPO3\CMS\Core\Messaging\FlashMessage::ERROR + ); + } + if (substr($submittedData['camaliga']['csvfile'],0,10) != 'fileadmin/') { + $isValid = FALSE; + $schedulerModule->addMessage( + $GLOBALS['LANG']->sL('LLL:EXT:camaliga/Resources/Private/Language/locallang_be.xlf:tasks.validate.invalidCsvfile'), + \TYPO3\CMS\Core\Messaging\FlashMessage::ERROR + ); + } + return $isValid; + } + + /** + * This method is used to save any additional input into the current task object + * if the task class matches. + * + * @param array $submittedData Array containing the data submitted by the user + * @param \TYPO3\CMS\Scheduler\Task\AbstractTask $task Reference to the current task object + * @return void + */ + public function saveAdditionalFields(array $submittedData, \TYPO3\CMS\Scheduler\Task\AbstractTask $task) { + /** @var $task ValidatorTask */ + $task->setCsvfile($submittedData['camaliga']['csvfile']); + $task->setPage($submittedData['camaliga']['page']); + $task->setCats($submittedData['camaliga']['cats']); + $task->setHeader($submittedData['camaliga']['header']); + $task->setFields($submittedData['camaliga']['fields']); + $task->setSeparator($submittedData['camaliga']['separator']); + $task->setDelimiter($submittedData['camaliga']['delimiter']); + $task->setCatdelimiter($submittedData['camaliga']['catdelimiter']); + $task->setConvert($submittedData['camaliga']['convert']); + } +} \ No newline at end of file diff --git a/Classes/Task/CsvExportTask.php b/Classes/Task/CsvExportTask.php new file mode 100644 index 0000000..5b9257b --- /dev/null +++ b/Classes/Task/CsvExportTask.php @@ -0,0 +1,345 @@ +csvfile; + } + + /** + * Set the value of the private property csvfile. + * + * @param string $csvfile Path to the csv file + * @return void + */ + public function setCsvfile($csvfile) { + $this->csvfile = $csvfile; + } + + /** + * Get the value of the protected property page + * + * @return integer UID of the start page for this task + */ + public function getPage() { + return $this->page; + } + + /** + * Set the value of the private property page + * + * @param integer $page UID of the start page for this task. + * @return void + */ + public function setPage($page) { + $this->page = $page; + } + + /** + * Get the category uids + * + * @return string + */ + public function getCats() { + return $this->cats; + } + + /** + * Set the value of cats. + * + * @param string $cats category uids + * @return void + */ + public function setCats($cats) { + $this->cats = $cats; + } + + /** + * Get the header of the csv file + * + * @return string + */ + public function getHeader() { + return $this->header; + } + + /** + * Set the value of the private property header. + * + * @param string $header Header of the csv file + * @return void + */ + public function setHeader($header) { + $this->header = $header; + } + + /** + * Get the value of fields + * + * @return string + */ + public function getFields() { + return $this->fields; + } + + /** + * Set the value of the private property fields. + * + * @param string $fields Fields to export + * @return void + */ + public function setFields($fields) { + $this->fields = $fields; + } + + /** + * Get the separator + * + * @return string + */ + public function getSeparator() { + return $this->separator; + } + + /** + * Set the value of the separator + * + * @param string $separator + * @return void + */ + public function setSeparator($separator) { + $this->separator = $separator; + } + + /** + * Get the delimiter + * + * @return string + */ + public function getDelimiter() { + return $this->delimiter; + } + + /** + * Set the value of the delimiter + * + * @param string $delimiter + * @return void + */ + public function setDelimiter($delimiter) { + $this->delimiter = $delimiter; + } + + /** + * Get the catdelimiter + * + * @return string + */ + public function getCatdelimiter() { + return $this->catdelimiter; + } + + /** + * Set the value of the catdelimiter + * + * @param string $catdelimiter + * @return void + */ + public function setCatdelimiter($catdelimiter) { + $this->catdelimiter = $catdelimiter; + } + + /** + * Get the value of the protected property convert + * + * @return integer + */ + public function getConvert() { + return $this->convert; + } + + /** + * Set the value of the private property convert + * + * @param integer $convert + * @return void + */ + public function setConvert($convert) { + $this->convert = ($convert) ? 1 : 0; + } + + + public function execute() { + $successfullyExecuted = TRUE; + $ln = "\r\n"; // line break + $uid = (int) $this->getPage(); // folder with camaliga elements + $cats = trim($this->getCats()); // select only camaliga elements with this parent category uids + $catsArray = explode(',', $cats); + $lang_uid = 0; // language uid: bisher fest. TODO: auch einstellbar! + $fields = $this->getFields(); // fields to export + $fieldArry = explode(',', $fields); // field-array + $separator = $this->getSeparator(); // Texttrenner + $delimiter = $this->getDelimiter(); // Feldtrenner + $cat_del = $this->getCatdelimiter(); // Feldtrenner bei Kategorien + $convert = ($this->getConvert()) ? TRUE : FALSE; // convert from UTF-8 to ASCII? + $text = $this->getHeader(); + if ($convert) + $text = iconv('utf-8', 'iso-8859-1', $text); + $content = $text . $ln; // header of the csv file + $cat_keys = array(); // uids of category names + $cat_parents = array(); // parent of the categories + $cat_rel = array(); // camaliga-category-relations + $cat_counts = array(); // count $cats categories + $i = 0; // Counter + + // Step 1: select all categories of the current language + $categoriesUtility = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('Quizpalme\\Camaliga\\Utility\\AllCategories'); + $all_cats = $categoriesUtility->getCategoriesarrayComplete($lang_uid); + + // Step 2: store more category datas in arrays + foreach ($all_cats as $key => $one_cat) { + $cat_keys[$one_cat['title']] = $key; + $cat_parents[$key] = $one_cat['parent']; + } + + // Step 3: select camaliga-category-relations + $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery('uid_foreign, uid_local', + 'tx_camaliga_domain_model_content AS camaliga, sys_category_record_mm AS mm', + 'mm.uid_foreign=camaliga.uid AND camaliga.hidden=0 AND camaliga.deleted=0 AND camaliga.sys_language_uid=' . $lang_uid . ' AND camaliga.pid=' . $uid, + '', + 'camaliga.uid'); + $rows = $GLOBALS['TYPO3_DB']->sql_num_rows($res); + if ($rows>0) { + while($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res)){ + $uid_cam = $row['uid_foreign']; + $uid_cat = $row['uid_local']; + if (!is_array($cat_rel[$uid_cam])) + $cat_rel[$uid_cam] = array(); + if ($cat_rel[$uid_cam][$cat_parents[$uid_cat]]) + $cat_rel[$uid_cam][$cat_parents[$uid_cat]] .= $cat_del; + $cat_rel[$uid_cam][$cat_parents[$uid_cat]] .= $all_cats[$uid_cat]['title']; + foreach ($catsArray as $aCat) { + if ($aCat == $uid_cat) // gesuchte Kategorie vorhanden? + $cat_counts[$uid_cam]++; + } + } + } + + // Step 4: select camaliga entries + $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery('*', + 'tx_camaliga_domain_model_content', + 'hidden=0 AND deleted=0 AND sys_language_uid=' . $lang_uid . ' AND pid=' . $uid, + '', + 'sorting ASC'); + $rows = $GLOBALS['TYPO3_DB']->sql_num_rows($res); + if ($rows>0) { + while($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res)){ + $uid = $row['uid']; + if (!$cats || ($cat_counts[$uid]>0)) { + if ($i > 0) + $content .= $ln; + $j = 0; + foreach ($fieldArry as $field) { + if ($j>0) + $content .= $delimiter; + if (substr(trim($field), 0, 10) != '"category:') { + $text = preg_replace( "/\r|\n/", " ", $row[trim($field)]); + if ($convert) $text = iconv('utf-8', 'iso-8859-1', $text); + $content .= $separator . $text . $separator; + } else { + $cat = trim(substr(trim($field), 10, -1)); // Name der parent kategorie + $text = ($convert) ? iconv('utf-8', 'iso-8859-1', $cat_rel[$uid][$cat_keys[$cat]]) : $cat_rel[$uid][$cat_keys[$cat]]; + $content .= $separator . $text . $separator; // Kinder einer gesuchten Kategorie + } + $j++; + } + $i++; + } + } + } else { + $successfullyExecuted = FALSE; + } + $GLOBALS['TYPO3_DB']->sql_free_result($res); + + $fp = fopen(PATH_site . $this->getCsvfile(), 'w'); + $ergebnis = fwrite($fp, $content); + fclose($fp); + if (!$ergebnis) + $successfullyExecuted = FALSE; + + //echo "Anzahl exportiert: " . $i; + return $successfullyExecuted; + } +} diff --git a/Classes/Task/CsvImportAdditionalFieldProvider.php b/Classes/Task/CsvImportAdditionalFieldProvider.php new file mode 100644 index 0000000..5a73171 --- /dev/null +++ b/Classes/Task/CsvImportAdditionalFieldProvider.php @@ -0,0 +1,289 @@ +getAdditionalFields($taskInfo, $task, $schedulerModule) + */ + public function getAdditionalFields(array &$taskInfo, $task, \TYPO3\CMS\Scheduler\Controller\SchedulerModuleController $schedulerModule) { + $additionalFields = array(); + if (empty($taskInfo['page'])) { + if ($schedulerModule->CMD == 'add') { + $taskInfo['page'] = ''; + } else { + $taskInfo['page'] = $task->getPage(); + } + } + if (empty($taskInfo['catpage'])) { + if ($schedulerModule->CMD == 'add') { + $taskInfo['catpage'] = 0; + } else { + $taskInfo['catpage'] = $task->getCatPage(); + } + } + if (empty($taskInfo['language'])) { + if ($schedulerModule->CMD == 'add') { + $taskInfo['language'] = '0'; + } else { + $taskInfo['language'] = $task->getLanguage(); + } + } + if (empty($taskInfo['csvfile'])) { + if ($schedulerModule->CMD == 'add') { + $taskInfo['csvfile'] = 'fileadmin/'; + } else { + $taskInfo['csvfile'] = $task->getCsvfile(); + } + } + /*if (empty($taskInfo['header'])) { + if ($schedulerModule->CMD == 'add') { + $taskInfo['header'] = ''; + } else { + $taskInfo['header'] = $task->getHeader(); + } + }*/ + if (empty($taskInfo['fields'])) { + if ($schedulerModule->CMD == 'add') { + $taskInfo['fields'] = ''; + } else { + $taskInfo['fields'] = $task->getFields(); + } + } + if (empty($taskInfo['separator'])) { + if ($schedulerModule->CMD == 'add') { + $taskInfo['separator'] = '"'; + } else { + $taskInfo['separator'] = $task->getSeparator(); + } + } + if (empty($taskInfo['delimiter'])) { + if ($schedulerModule->CMD == 'add') { + $taskInfo['delimiter'] = ';'; + } else { + $taskInfo['delimiter'] = $task->getDelimiter(); + } + } + if (empty($taskInfo['catdelimiter'])) { + if ($schedulerModule->CMD == 'add') { + $taskInfo['catdelimiter'] = ','; + } else { + $taskInfo['catdelimiter'] = $task->getCatdelimiter(); + } + } + if (empty($taskInfo['convert'])) { + if ($schedulerModule->CMD == 'add') { + $taskInfo['convert'] = 0; + } else { + $taskInfo['convert'] = $task->getConvert(); + } + } + if (empty($taskInfo['delete'])) { + if ($schedulerModule->CMD == 'add') { + $taskInfo['delete'] = 0; + } else { + $taskInfo['delete'] = $task->getDelete(); + } + } + if (empty($taskInfo['simulate'])) { + if ($schedulerModule->CMD == 'add') { + $taskInfo['simulate'] = 0; + } else { + $taskInfo['simulate'] = $task->getSimulate(); + } + } + + // Ordner + $fieldId = 'task_page'; + $fieldCode = ''; + $label = $GLOBALS['LANG']->sL('LLL:EXT:camaliga/Resources/Private/Language/locallang_be.xlf:tasks.validate.page'); + $label = BackendUtility::wrapInHelp('camaliga', $fieldId, $label); + $additionalFields[$fieldId] = array( + 'code' => $fieldCode, + 'label' => $label + ); + // cat-folder + $fieldId = 'task_catpage'; + $checked = ($taskInfo['catpage']) ? ' checked="checked"' : ''; + $fieldCode = ''; + $label = $GLOBALS['LANG']->sL('LLL:EXT:camaliga/Resources/Private/Language/locallang_be.xlf:itasks.validate.catpage'); + $label = BackendUtility::wrapInHelp('camaliga', $fieldId, $label); + $additionalFields[$fieldId] = array( + 'code' => $fieldCode, + 'label' => $label + ); + // Sprache + $fieldId = 'task_language'; + $fieldCode = ''; + $label = $GLOBALS['LANG']->sL('LLL:EXT:camaliga/Resources/Private/Language/locallang_be.xlf:tasks.validate.language'); + $label = BackendUtility::wrapInHelp('camaliga', $fieldId, $label); + $additionalFields[$fieldId] = array( + 'code' => $fieldCode, + 'label' => $label + ); + // path to csv file + $fieldId = 'task_csvfile'; + $fieldCode = ''; + $label = $GLOBALS['LANG']->sL('LLL:EXT:camaliga/Resources/Private/Language/locallang_be.xlf:itasks.validate.csvfile'); + $label = BackendUtility::wrapInHelp('camaliga', $fieldId, $label); + $additionalFields[$fieldId] = array( + 'code' => $fieldCode, + 'label' => $label + ); + // header of the csv file + /* $fieldId = 'task_header'; + $fieldCode = ''; + $label = $GLOBALS['LANG']->sL('LLL:EXT:camaliga/Resources/Private/Language/locallang_be.xlf:tasks.validate.header'); + $label = BackendUtility::wrapInHelp('camaliga', $fieldId, $label); + $additionalFields[$fieldId] = array( + 'code' => $fieldCode, + 'label' => $label + );*/ + // fields in the DB + $fieldId = 'task_fields'; + $fieldCode = ''; + $label = $GLOBALS['LANG']->sL('LLL:EXT:camaliga/Resources/Private/Language/locallang_be.xlf:itasks.validate.fields'); + $label = BackendUtility::wrapInHelp('camaliga', $fieldId, $label); + $additionalFields[$fieldId] = array( + 'code' => $fieldCode, + 'label' => $label + ); + // separator + $fieldId = 'task_separator'; + $fieldCode = ''; + $label = $GLOBALS['LANG']->sL('LLL:EXT:camaliga/Resources/Private/Language/locallang_be.xlf:tasks.validate.separator'); + $label = BackendUtility::wrapInHelp('camaliga', $fieldId, $label); + $additionalFields[$fieldId] = array( + 'code' => $fieldCode, + 'label' => $label + ); + // delimiter + $fieldId = 'task_delimiter'; + $fieldCode = ''; + $label = $GLOBALS['LANG']->sL('LLL:EXT:camaliga/Resources/Private/Language/locallang_be.xlf:tasks.validate.delimiter'); + $label = BackendUtility::wrapInHelp('camaliga', $fieldId, $label); + $additionalFields[$fieldId] = array( + 'code' => $fieldCode, + 'label' => $label + ); + // catdelimiter + $fieldId = 'task_catdelimiter'; + $fieldCode = ''; + $label = $GLOBALS['LANG']->sL('LLL:EXT:camaliga/Resources/Private/Language/locallang_be.xlf:tasks.validate.catdelimiter'); + $label = BackendUtility::wrapInHelp('camaliga', $fieldId, $label); + $additionalFields[$fieldId] = array( + 'code' => $fieldCode, + 'label' => $label + ); + // convert + $fieldId = 'task_convert'; + $checked = ($taskInfo['convert']) ? ' checked="checked"' : ''; + $fieldCode = ''; + $label = $GLOBALS['LANG']->sL('LLL:EXT:camaliga/Resources/Private/Language/locallang_be.xlf:itasks.validate.convert'); + $label = BackendUtility::wrapInHelp('camaliga', $fieldId, $label); + $additionalFields[$fieldId] = array( + 'code' => $fieldCode, + 'label' => $label + ); + // delete + $fieldId = 'task_delete'; + $checked = ($taskInfo['delete']) ? ' checked="checked"' : ''; + $fieldCode = ''; + $label = $GLOBALS['LANG']->sL('LLL:EXT:camaliga/Resources/Private/Language/locallang_be.xlf:itasks.validate.delete'); + $label = BackendUtility::wrapInHelp('camaliga', $fieldId, $label); + $additionalFields[$fieldId] = array( + 'code' => $fieldCode, + 'label' => $label + ); + // simulate + $fieldId = 'task_simulate'; + $checked = ($taskInfo['simulate']) ? ' checked="checked"' : ''; + $fieldCode = ''; + $label = $GLOBALS['LANG']->sL('LLL:EXT:camaliga/Resources/Private/Language/locallang_be.xlf:itasks.validate.simulate'); + $label = BackendUtility::wrapInHelp('camaliga', $fieldId, $label); + $additionalFields[$fieldId] = array( + 'code' => $fieldCode, + 'label' => $label + ); + return $additionalFields; + } + + /** + * This method checks any additional data that is relevant to the specific task. + * If the task class is not relevant, the method is expected to return TRUE. + * + * @param array $submittedData Reference to the array containing the data submitted by the user + * @param \TYPO3\CMS\Scheduler\Controller\SchedulerModuleController $schedulerModule Reference to the BE module of the Scheduler + * @return boolean TRUE if validation was ok (or selected class is not relevant), FALSE otherwise + */ + public function validateAdditionalFields(array &$submittedData, \TYPO3\CMS\Scheduler\Controller\SchedulerModuleController $schedulerModule) { + $isValid = TRUE; + if ($res = $GLOBALS['TYPO3_DB']->exec_SELECTquery('*', 'pages', 'uid = ' . (int)$submittedData['camaliga']['page'])) { + if ($GLOBALS['TYPO3_DB']->sql_num_rows($res) == 0 && $submittedData['camaliga']['page'] > 0) { + $isValid = FALSE; + $schedulerModule->addMessage( + $GLOBALS['LANG']->sL('LLL:EXT:camaliga/Resources/Private/Language/locallang_be.xlf:tasks.validate.invalidPage'), + \TYPO3\CMS\Core\Messaging\FlashMessage::ERROR + ); + } + $GLOBALS['TYPO3_DB']->sql_free_result($res); + } else { + $isValid = FALSE; + $schedulerModule->addMessage( + $GLOBALS['LANG']->sL('LLL:EXT:camaliga/Resources/Private/Language/locallang_be.xlf:tasks.validate.invalidPage'), + \TYPO3\CMS\Core\Messaging\FlashMessage::ERROR + ); + } + $lang = (int)$submittedData['camaliga']['language']; + if (($lang > 0) && ($res = $GLOBALS['TYPO3_DB']->exec_SELECTquery('*', 'sys_language', 'uid = ' . $lang))) { + if ($GLOBALS['TYPO3_DB']->sql_num_rows($res) == 0) { + $isValid = FALSE; + $schedulerModule->addMessage( + $GLOBALS['LANG']->sL('LLL:EXT:camaliga/Resources/Private/Language/locallang_be.xlf:tasks.validate.invalidLanguage'), + \TYPO3\CMS\Core\Messaging\FlashMessage::ERROR + ); + } + $GLOBALS['TYPO3_DB']->sql_free_result($res); + } + if (substr($submittedData['camaliga']['csvfile'],0,10) != 'fileadmin/') { + $isValid = FALSE; + $schedulerModule->addMessage( + $GLOBALS['LANG']->sL('LLL:EXT:camaliga/Resources/Private/Language/locallang_be.xlf:tasks.validate.invalidCsvfile'), + \TYPO3\CMS\Core\Messaging\FlashMessage::ERROR + ); + } + return $isValid; + } + + /** + * This method is used to save any additional input into the current task object + * if the task class matches. + * + * @param array $submittedData Array containing the data submitted by the user + * @param \TYPO3\CMS\Scheduler\Task\AbstractTask $task Reference to the current task object + * @return void + */ + public function saveAdditionalFields(array $submittedData, \TYPO3\CMS\Scheduler\Task\AbstractTask $task) { + /** @var $task ValidatorTask */ + $task->setCsvfile($submittedData['camaliga']['csvfile']); + //$task->setHeader($submittedData['camaliga']['header']); + $task->setFields($submittedData['camaliga']['fields']); + $task->setPage($submittedData['camaliga']['page']); + $task->setCatPage($submittedData['camaliga']['catpage']); + $task->setLanguage($submittedData['camaliga']['language']); + $task->setSeparator($submittedData['camaliga']['separator']); + $task->setDelimiter($submittedData['camaliga']['delimiter']); + $task->setCatdelimiter($submittedData['camaliga']['catdelimiter']); + $task->setConvert($submittedData['camaliga']['convert']); + $task->setDelete($submittedData['camaliga']['delete']); + $task->setSimulate($submittedData['camaliga']['simulate']); + } +} \ No newline at end of file diff --git a/Classes/Task/CsvImportTask.php b/Classes/Task/CsvImportTask.php new file mode 100644 index 0000000..627e1bf --- /dev/null +++ b/Classes/Task/CsvImportTask.php @@ -0,0 +1,595 @@ +csvfile; + } + + /** + * Set the value of the private property csvfile. + * + * @param string $csvfile Path to the csv file + * @return void + */ + public function setCsvfile($csvfile) { + $this->csvfile = $csvfile; + } + + /** + * Get the header of the csv file + * + * @return string + */ + public function getHeader() { + return $this->header; + } + + /** + * Set the value of the private property header. + * + * @param string $header Header of the csv file + * @return void + */ + public function setHeader($header) { + $this->header = $header; + } + + /** + * Get the value of fields + * + * @return string + */ + public function getFields() { + return $this->fields; + } + + /** + * Set the value of the private property fields. + * + * @param string $fields Fields to export + * @return void + */ + public function setFields($fields) { + $this->fields = $fields; + } + + /** + * Get the value of the protected property page + * + * @return integer UID of the start page for this task + */ + public function getPage() { + return $this->page; + } + + /** + * Set the value of the private property page + * + * @param integer $page UID of the start page for this task. + * @return void + */ + public function setPage($page) { + $this->page = $page; + } + + /** + * Get the value of the protected property page + * + * @return integer UID of the start page for this task + */ + public function getCatPage() { + return $this->catpage; + } + + /** + * Set the value of the private property page + * + * @param integer $page UID of the start page for this task. + * @return void + */ + public function setCatPage($catpage) { + $this->catpage = ($catpage) ? 1 : 0; + } + + /** + * Get the value of the protected property language + * + * @return integer UID of the language for this task + */ + public function getLanguage() { + return $this->language; + } + + /** + * Set the value of the private property language + * + * @param integer $page UID of the language for this task. + * @return void + */ + public function setLanguage($language) { + $this->language = $language; + } + + /** + * Get the separator + * + * @return string + */ + public function getSeparator() { + return $this->separator; + } + + /** + * Set the value of the separator + * + * @param string $separator + * @return void + */ + public function setSeparator($separator) { + $this->separator = $separator; + } + + /** + * Get the delimiter + * + * @return string + */ + public function getDelimiter() { + return $this->delimiter; + } + + /** + * Set the value of the delimiter + * + * @param string $delimiter + * @return void + */ + public function setDelimiter($delimiter) { + $this->delimiter = $delimiter; + } + + /** + * Get the catdelimiter + * + * @return string + */ + public function getCatdelimiter() { + return $this->catdelimiter; + } + + /** + * Set the value of the catdelimiter + * + * @param string $catdelimiter + * @return void + */ + public function setCatdelimiter($catdelimiter) { + $this->catdelimiter = $catdelimiter; + } + + /** + * Get the value of the protected property convert + * + * @return integer + */ + public function getConvert() { + return $this->convert; + } + + /** + * Set the value of the private property convert + * + * @param integer $convert + * @return void + */ + public function setConvert($convert) { + $this->convert = ($convert) ? 1 : 0; + } + + /** + * Get the value of the protected property delete + * + * @return integer + */ + public function getDelete() { + return $this->delete; + } + + /** + * Set the value of the private property delete + * + * @param integer $delete + * @return void + */ + public function setDelete($delete) { + $this->delete = ($delete) ? 1 : 0; + } + + /** + * Get the value of the protected property simulate + * + * @return integer + */ + public function getSimulate() { + return $this->simulate; + } + + /** + * Set the value of the private property simulate + * + * @param integer $simulate + * @return void + */ + public function setSimulate($simulate) { + $this->simulate = ($simulate) ? 1 : 0; + } + + + public function execute() { + $successfullyExecuted = TRUE; + $insert = array(); + $ln = "\r\n"; // line break + $pid = (int) $this->getPage(); // folder with camaliga elements + $syslanguid = (int) $this->getLanguage(); // sys_language_uid ID + $separator = $this->getSeparator(); // Texttrenner + $delimiter = $this->getDelimiter(); // Feldtrenner + $catpage = ($this->getCatPage()) ? TRUE : FALSE; // search cats only in the pid-folder? + $convert = ($this->getConvert()) ? TRUE : FALSE; // convert from ASCII to UTF-8? + $delete = ($this->getDelete()) ? TRUE : FALSE; // delete entries first? + $simulate = ($this->getSimulate()) ? TRUE : FALSE; // simulate import? + $fields = $this->getFields(); // fields for import + $fields_names = explode(',', $fields); // field-array + + // files sortiert nach Name, dann umkehren + $path = PATH_site . $this->getCsvfile(); + $files = array_filter(glob($path), 'is_file'); + $total = count($files); + if ($total > 1) $files = array_reverse($files); + $newestFile = ''; + foreach ($files as $file) { + $newestFile = $file; // take only the first found file + break; + } + if (!$newestFile) { + return FALSE; // keine Datei gefunden + } + + if ($delete && !$simulate) { + // erst löschen + $res = $GLOBALS['TYPO3_DB']->exec_DELETEquery( 'sys_category_record_mm', 'uid_foreign IN + (SELECT uid FROM tx_camaliga_domain_model_content WHERE pid=' . $pid . ' AND sys_language_uid=' . $syslanguid . ')' ); + $res = $GLOBALS['TYPO3_DB']->exec_DELETEquery( 'tx_camaliga_domain_model_content', 'pid=' . $pid . ' AND sys_language_uid=' . $syslanguid ); + } + + // search all categories + $catArray = array(); + $catParentArray = array(); + $where = ($catpage) ? ' AND pid=' . $pid : ''; + $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery('uid, parent, title', + 'sys_category', + 'hidden=0 AND deleted=0' . $where, // TODO: language berücksichtigen + '', + 'uid ASC'); + $rows = $GLOBALS['TYPO3_DB']->sql_num_rows($res); + if ($rows>0) { + while($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res)){ + $catArray[$row['title']] = $row['uid']; + if (!is_array($catParentArray[$row['parent']])) + $catParentArray[$row['parent']] = array(); + $catParentArray[$row['parent']][$row['title']] = $row['uid']; + } + } + $GLOBALS['TYPO3_DB']->sql_free_result($res); + + // max sorting till now + $sorting=0; + if (!$delete) { + $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery('MAX(sorting) AS maxi', + 'tx_camaliga_domain_model_content', + 'hidden=0 AND deleted=0 AND pid=' . $pid); + $rows = $GLOBALS['TYPO3_DB']->sql_num_rows($res); + if ($rows>0) { + while($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res)){ + $sorting = $row['maxi']; + } + } + $GLOBALS['TYPO3_DB']->sql_free_result($res); + } + + // Import + $lines = array(); + if ($newestFile) + $lines = file($newestFile); + if ( count($lines) > 1 ) { + $nr=0; + $fields_values = array(); + $fields_values['pid'] = $pid; + $fields_values['tstamp'] = time(); + $fields_values['crdate'] = time(); + $fields_values['sys_language_uid'] = $syslanguid; + $fields_values['cruser_id'] = $GLOBALS['BE_USER']->user["uid"]; + $handle = fopen ($newestFile, "r"); // Datei zum Lesen oeffnen + + if ($separator) { + while ( ($fields_read = fgetcsv ($handle, 2000, $delimiter, $separator)) !== FALSE ) { + if ($nr==0) { + //$fields_names = $Felder; + } else if ($fields_read[0]) { + $sorting++; + $fields_values['sorting'] = $sorting; + $result = $this->insertLine($fields_names, $fields_values, $fields_read, $simulate, $convert, $catArray, $catParentArray); + if ($simulate) { + $insert[] = $result; + } else if (!$result) { + $successfullyExecuted = FALSE; + } + } + $nr++; + } + } else { + while ( ($fields_read = fgetcsv ($handle, 2000, $delimiter)) !== FALSE ) { + if ($nr==0) { + //$fields_names = $Felder; + } else if ($fields_read[0]) { + $sorting++; + $fields_values['sorting'] = $sorting; + $result = $this->insertLine($fields_names, $fields_values, $fields_read, $simulate, $convert, $catArray, $catParentArray); + if ($simulate) { + $insert[] = $result; + } else if (!$result) { + $successfullyExecuted = FALSE; + } + } + $nr++; + } + } + + fclose ($handle); + if ($simulate) { + $output = $this->build_table($insert); + $message = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\Messaging\\FlashMessage', + $output, + 'Simulation:', // the header is optional + \TYPO3\CMS\Core\Messaging\FlashMessage::INFO, + FALSE + ); + $flashMessageService = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\Messaging\\FlashMessageService'); + $messageQueue = $flashMessageService->getMessageQueueByIdentifier(); + $messageQueue->addMessage($message); + } + } else { + $successfullyExecuted = FALSE; + } + return $successfullyExecuted; + } + + /** + * Inserts a line to the database + * + * @return mixed + */ + function insertLine($names, $values, $fields, $simulate, $convert, $catArray, $catParentArray) { + $success_global = TRUE; + for ($i=0; $iexec_INSERTquery('tx_camaliga_domain_model_content', $values); + if ($success_camaliga) { + $values['uid'] = $GLOBALS['TYPO3_DB']->sql_insert_id(); + } else { + $values['uid'] = 0; + $success_global = FALSE; + } + } else { + $values['uid'] = 0; + } + + if (($values['uid'] > 0) || $simulate) { + // Kategorie-Relationen einfügen? Kategorien müssen vorhanden sein! + $cats = 0; + $updateA = array(); + $catIDs = array(); + for ($i=0; $i 0) { + foreach ($catIDs as $catID) { + if ($catID > 0) { + if ($simulate) { + if ($values['categories']) { + $values['categories'] .= ', ' . $catID; + } else { + $values['categories'] = $catID; + } + } else { + // Kategorie-Relationen einfügen + $mmInsertArray = array('tablenames' => 'tx_camaliga_domain_model_content', 'fieldname' => 'categories'); + $mmInsertArray['uid_local'] = $catID; // Die Kategorie + $mmInsertArray['uid_foreign'] = $values['uid']; // Das Camaliga-Element + $mmInsertArray['sorting'] = ($cats+1)*10; + $mmInsertArray['sorting_foreign'] = ($cats+1)*10; + $success_cats = $GLOBALS['TYPO3_DB']->exec_INSERTquery('sys_category_record_mm', $mmInsertArray); + if ($success_cats) { + $cats++; + } else { + $success_global = FALSE; + } + } + } + } + } + + if (!$simulate && ($cats > 0)) { + $updateA['categories'] = $cats; + $GLOBALS['TYPO3_DB']->exec_UPDATEquery('tx_camaliga_domain_model_content', 'uid=' . $values['uid'], $updateA); + } + } + + if ($simulate) { + return $values; + } else { + return $success_global; + } + } + + /** + * Aray nach Tabelle + * + * @return string + */ + function build_table($array){ + // start table + $html = ''; + // header row + $html .= ''; + foreach($array[0] as $key=>$value){ + $html .= ''; + } + $html .= ''; + + // data rows + foreach( $array as $key=>$value){ + $html .= ''; + foreach($value as $key2=>$value2){ + $html .= ''; + } + $html .= ''; + } + + // finish table and return it + $html .= '
' . $key . '
' . strip_tags($value2) . '
'; + return $html; + } +} \ No newline at end of file diff --git a/Classes/Task/MoveUploadsToFalFieldProvider.php b/Classes/Task/MoveUploadsToFalFieldProvider.php new file mode 100644 index 0000000..e0b577a --- /dev/null +++ b/Classes/Task/MoveUploadsToFalFieldProvider.php @@ -0,0 +1,106 @@ +getAdditionalFields($taskInfo, $task, $schedulerModule) + */ + public function getAdditionalFields(array &$taskInfo, $task, \TYPO3\CMS\Scheduler\Controller\SchedulerModuleController $schedulerModule) { + $additionalFields = array(); + if (empty($taskInfo['page'])) { + if ($schedulerModule->CMD == 'add') { + $taskInfo['page'] = ''; + } else { + $taskInfo['page'] = $task->getPage(); + } + } + if (empty($taskInfo['imgpath'])) { + if ($schedulerModule->CMD == 'add') { + $taskInfo['imgpath'] = ''; + } else { + $taskInfo['imgpath'] = $task->getImgpath(); + } + } + + // Ordner mit Camaliga-Elementen + $fieldId = 'task_page'; + $fieldCode = ''; + $label = $GLOBALS['LANG']->sL('LLL:EXT:camaliga/Resources/Private/Language/locallang_be.xlf:tasks.validate.page'); + $label = BackendUtility::wrapInHelp('camaliga', $fieldId, $label); + $additionalFields[$fieldId] = array( + 'code' => $fieldCode, + 'label' => $label + ); + // path to the new image files + $fieldId = 'task_imgpath'; + $fieldCode = ''; + $label = $GLOBALS['LANG']->sL('LLL:EXT:camaliga/Resources/Private/Language/locallang_be.xlf:tasks.validate.imgpath'); + $label = BackendUtility::wrapInHelp('camaliga', $fieldId, $label); + $additionalFields[$fieldId] = array( + 'code' => $fieldCode, + 'label' => $label + ); + return $additionalFields; + } + + /** + * This method checks any additional data that is relevant to the specific task. + * If the task class is not relevant, the method is expected to return TRUE. + * + * @param array $submittedData Reference to the array containing the data submitted by the user + * @param \TYPO3\CMS\Scheduler\Controller\SchedulerModuleController $schedulerModule Reference to the BE module of the Scheduler + * @return boolean TRUE if validation was ok (or selected class is not relevant), FALSE otherwise + */ + public function validateAdditionalFields(array &$submittedData, \TYPO3\CMS\Scheduler\Controller\SchedulerModuleController $schedulerModule) { + $isValid = TRUE; + if ($res = $GLOBALS['TYPO3_DB']->exec_SELECTquery('*', 'pages', 'uid = ' . (int)$submittedData['camaliga']['page'])) { + if ($GLOBALS['TYPO3_DB']->sql_num_rows($res) == 0 && $submittedData['camaliga']['page'] > 0) { + $isValid = FALSE; + $schedulerModule->addMessage( + $GLOBALS['LANG']->sL('LLL:EXT:camaliga/Resources/Private/Language/locallang_be.xlf:tasks.validate.invalidPage'), + \TYPO3\CMS\Core\Messaging\FlashMessage::ERROR + ); + } + $GLOBALS['TYPO3_DB']->sql_free_result($res); + } else { + $isValid = FALSE; + $schedulerModule->addMessage( + $GLOBALS['LANG']->sL('LLL:EXT:camaliga/Resources/Private/Language/locallang_be.xlf:tasks.validate.invalidPage'), + \TYPO3\CMS\Core\Messaging\FlashMessage::ERROR + ); + } + $resourceFactory = \TYPO3\CMS\Core\Resource\ResourceFactory::getInstance(); + $storage = $resourceFactory->getDefaultStorage(); + if (!$storage->hasFolder($submittedData['camaliga']['imgpath'])) { + $isValid = FALSE; + $schedulerModule->addMessage( + $GLOBALS['LANG']->sL('LLL:EXT:camaliga/Resources/Private/Language/locallang_be.xlf:tasks.validate.invalidImgpath'), + \TYPO3\CMS\Core\Messaging\FlashMessage::ERROR + ); + } + return $isValid; + } + + /** + * This method is used to save any additional input into the current task object + * if the task class matches. + * + * @param array $submittedData Array containing the data submitted by the user + * @param \TYPO3\CMS\Scheduler\Task\AbstractTask $task Reference to the current task object + * @return void + */ + public function saveAdditionalFields(array $submittedData, \TYPO3\CMS\Scheduler\Task\AbstractTask $task) { + /** @var $task ValidatorTask */ + $task->setPage($submittedData['camaliga']['page']); + $task->setImgpath($submittedData['camaliga']['imgpath']); + } +} \ No newline at end of file diff --git a/Classes/Task/MoveUploadsToFalTask.php b/Classes/Task/MoveUploadsToFalTask.php new file mode 100644 index 0000000..d626ee4 --- /dev/null +++ b/Classes/Task/MoveUploadsToFalTask.php @@ -0,0 +1,223 @@ +page; + } + + /** + * Set the value of the private property page + * + * @param integer $page UID of the start page for this task. + * @return void + */ + public function setPage($page) { + $this->page = $page; + } + + /** + * Get the img path + * + * @return string + */ + public function getImgpath() { + return $this->imgpath; + } + + /** + * Set the value of imgpath. + * + * @param string $imgpath imgage path + * @return void + */ + public function setImgpath($imgpath) { + $this->imgpath = $imgpath; + } + + // ein Bild verschieben + protected function moveOneImage($pid, $uid, $sys_language_uid, $image, $title, $source, $newId, $sorting) { + //https://stackoverflow.com/questions/38241948/fal-insertion-into-sys-file-typo3 + //https://www.typo3.net/forum/thematik/zeige/thema/126046/ + //https://docs.typo3.org/typo3cms/CoreApiReference/ApiOverview/Fal/UsingFal/ExamplesFileFolder.html + //copy(PATH_site . 'uploads/tx_camaliga/' . $image, PATH_site . $this->getImgpath() . $image); + $resourceFactory = \TYPO3\CMS\Core\Resource\ResourceFactory::getInstance(); + $storage = $resourceFactory->getDefaultStorage(); + if ($storage->hasFolder($this->getImgpath())) { + $targetFolder = $storage->getFolder($this->getImgpath()); + } else { + return FALSE; + } + + if (!is_file(PATH_site . 'uploads/tx_camaliga/' . $image)) { + // wenn kein Bild vorhanden ist, ignorieren wir diesen Fall mal... + //return TRUE; + } + + $fileObject = $storage->addFile( + PATH_site . 'uploads/tx_camaliga/' . $image, + $targetFolder, + $image + ); + + // Link in der Caption? + $link = ''; + if ((substr($title,0,4) == 'http') || (is_numeric($title))) { + $link = $title; + unset($title); + } elseif (!$title) { + unset($title); + } + + //$resourceFactory = ResourceFactory::getInstance(); + //$fileObject = $resourceFactory->getFileObject((int)$file); + //$contentElement = BackendUtility::getRecord( + // 'tx_camaliga_domain_model_content', + // (int)$uid + //); + // Assemble DataHandler data + $data = array(); + $data['sys_file_reference'][$newId] = array( + 'table_local' => 'sys_file', + 'uid_local' => $fileObject->getUid(), + 'tablenames' => 'tx_camaliga_domain_model_content', + 'uid_foreign' => $uid, + 'fieldname' => 'falimage' . $source, + 'pid' => $pid, + 'title' => $title, + 'alternative' => $title, + 'link' => $link, + 'tstamp' => time(), + 'crdate' => time(), + 'cruser_id' => $GLOBALS['BE_USER']->user["uid"], + 'sorting' => $sorting, + 'sys_language_uid' => $sys_language_uid, + 'sorting_foreign' => 1 + ); + /* $data['tx_camaliga_domain_model_content'][$uid] = array( + 'image' => $newId + ); */ + // Get an instance of the DataHandler and process the data + // Geht aber nur im Backend-Modul!!!!! + /** var DataHandler $dataHandler + $dataHandler = GeneralUtility::makeInstance(DataHandler::class); + $dataHandler->start($data, array()); + $dataHandler->process_datamap(); + // Error or success reporting + if (count($dataHandler->errorLog) === 0) { + return TRUE; + } else { + return FALSE; + } + */ + + // insert into sys_file_reference + $success_reference = $GLOBALS['TYPO3_DB']->exec_INSERTquery('sys_file_reference', $data['sys_file_reference'][$newId]); + if ($success_reference) { + $data['sys_file_reference'][$newId]['uid'] = $GLOBALS['TYPO3_DB']->sql_insert_id(); + } else { + return FALSE; + } + + // update camaliga-element + $updateA = []; + $updateA['image' . $source] = ''; + $updateA['falimage' . $source] = 1; + if ($source) { + $updateA['caption' . $source] = ''; + } + $GLOBALS['TYPO3_DB']->exec_UPDATEquery('tx_camaliga_domain_model_content', 'uid=' . $uid, $updateA); + + // delete image in the uploads-folder: ist aber nicht nötig, da das Bild verschoben wurde! + //unlink(); + + return TRUE; + } + + public function execute() { + $successfullyExecuted = TRUE; + $pid = (int) $this->getPage(); // folder with camaliga elements + $maxi = 0; // Counter + $camArray = array(); + /* + $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery( + 'MAX(uid) AS maxi', + 'sys_file_reference', + '1=1'); + $rows = $GLOBALS['TYPO3_DB']->sql_num_rows($res); + if ($rows>0) { + while($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res)){ + $maxi = $row['maxi']; + } + } + $GLOBALS['TYPO3_DB']->sql_free_result($res); + */ + // select all visible camaliga elements of one folder + $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery( + 'uid, t3_origuid, sys_language_uid, l10n_parent, image, image2, image3, image4, image5, caption2, caption3, caption4, caption5, falimage, falimage2, falimage3, falimage4, falimage5', + 'tx_camaliga_domain_model_content', + 'hidden=0 AND deleted=0 AND pid=' . $pid, + '', + 'uid ASC'); + $rows = $GLOBALS['TYPO3_DB']->sql_num_rows($res); + if ($rows>0) { + while($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res)){ + $camArray[$row['uid']] = $row; + } + } + $GLOBALS['TYPO3_DB']->sql_free_result($res); + + foreach ($camArray as $row) { + if ($row['image'] && !$row['falimage']) { + $maxi++; + $ergebnis = $this->moveOneImage($pid, $row['uid'], $row['sys_language_uid'], $row['image'], $row['title'], '', $maxi, 4); + if (!$ergebnis) $successfullyExecuted = FALSE; + } + if ($row['image2'] && !$row['falimage2']) { + $maxi++; + $ergebnis = $this->moveOneImage($pid, $row['uid'], $row['sys_language_uid'], $row['image2'], $row['caption2'], '2', $maxi, 8); + if (!$ergebnis) $successfullyExecuted = FALSE; + } + if ($row['image3'] && !$row['falimage3']) { + $maxi++; + $ergebnis = $this->moveOneImage($pid, $row['uid'], $row['sys_language_uid'], $row['image3'], $row['caption3'], '3', $maxi, 16); + if (!$ergebnis) $successfullyExecuted = FALSE; + } + if ($row['image4'] && !$row['falimage4']) { + $maxi++; + $ergebnis = $this->moveOneImage($pid, $row['uid'], $row['sys_language_uid'], $row['image4'], $row['caption4'], '4', $maxi, 32); + if (!$ergebnis) $successfullyExecuted = FALSE; + } + if ($row['image5'] && !$row['falimage5']) { + $maxi++; + $ergebnis = $this->moveOneImage($pid, $row['uid'], $row['sys_language_uid'], $row['image5'], $row['caption5'], '5', $maxi, 64); + if (!$ergebnis) $successfullyExecuted = FALSE; + } + } + + return $successfullyExecuted; + } +} diff --git a/Classes/Utility/AllCategories.php b/Classes/Utility/AllCategories.php new file mode 100644 index 0000000..a509a8e --- /dev/null +++ b/Classes/Utility/AllCategories.php @@ -0,0 +1,63 @@ +config['config']['sys_language_uid']); + $cat_lang = ($catMode) ? 0 : $lang; + // Step 1: ggf. orig-cat-uid holen + if ($lang > 0) { + $res4 = $GLOBALS['TYPO3_DB']->exec_SELECTquery( + 'uid, t3_origuid, title', + 'sys_category', + 'deleted=0 AND hidden=0 AND sys_language_uid=' . $lang); + if ($GLOBALS['TYPO3_DB']->sql_num_rows($res4) > 0) { + while($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res4)){ + $orig_uids[$row['t3_origuid']] = $row['uid']; + $orig_titles[$row['t3_origuid']] = $row['title']; + } + } + $GLOBALS['TYPO3_DB']->sql_free_result($res4); + } + // Step 2: select all categories, because parent-title is needed too! + $res4 = $GLOBALS['TYPO3_DB']->exec_SELECTquery( + 'uid, parent, title, description, t3_origuid', + 'sys_category', + 'deleted=0 AND hidden=0 AND sys_language_uid=' . $cat_lang, + '', + 'uid ASC'); + if ($GLOBALS['TYPO3_DB']->sql_num_rows($res4) > 0) { + while($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res4)){ + $uid = $row['uid']; + $all_cats[$uid] = array(); + $all_cats[$uid]['uid'] = $uid; + $all_cats[$uid]['parent'] = ($lang > 0 && $catMode == 0) ? $orig_uids[$row['parent']] : $row['parent']; // Fall 1: parent des engl. Elements; 2: partent des deut. Elements + $all_cats[$uid]['title'] = ($lang > 0 && $catMode == 1) ? $orig_titles[$uid] : $row['title']; // Fall 1: Titel der engl. Kat.; 2: aktueller Titel (engl.) + $all_cats[$uid]['description'] = $row['description']; + } + } + $GLOBALS['TYPO3_DB']->sql_free_result($res4); + return $all_cats; + } +} +?> \ No newline at end of file diff --git a/Classes/Utility/PageTitle.php b/Classes/Utility/PageTitle.php new file mode 100644 index 0000000..11cdc45 --- /dev/null +++ b/Classes/Utility/PageTitle.php @@ -0,0 +1,28 @@ +tmpl->setup['config.']['titleTagFunction.']['noTrimWrap']; + $params = $_POST['tx_camaliga_pi1']; + if (count($params) == 0) + $params = $_GET['tx_camaliga_pi1']; + if (count($params) > 0) + $id = $params['content']; + if ($id > 0) { + $res4 = $GLOBALS['TYPO3_DB']->exec_SELECTquery( + 'title', + 'tx_camaliga_domain_model_content', + 'uid = ' . intval($id)); + $rows = $GLOBALS['TYPO3_DB']->sql_num_rows($res4); + if ($rows > 0) { + $row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res4); + $pageTitle = $row['title']; + } + $GLOBALS['TYPO3_DB']->sql_free_result($res4); + } + return trim($pageTitle); + } +} diff --git a/Classes/Utility/TemplateLayout.php b/Classes/Utility/TemplateLayout.php new file mode 100644 index 0000000..700e0e5 --- /dev/null +++ b/Classes/Utility/TemplateLayout.php @@ -0,0 +1,66 @@ + +* 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! +***************************************************************/ +/* + * modified 2014 by Kurt Gusbeth +*/ +namespace Quizpalme\Camaliga\Utility; + +/** + * TemplateLayout: Template-Layout per TSconfig + * + * @package camaliga + * @license http://www.gnu.org/licenses/gpl.html GNU General Public License, version 3 or later + * + */ +class TemplateLayout implements \TYPO3\CMS\Core\SingletonInterface { + + /** + * Get available template layouts for a page + * + * @param int $pageUid + * @return array + */ + public function getAvailableTemplateLayouts($pageUid) { + $templateLayouts = array(); + foreach($this->getTemplateLayoutsFromTsConfig($pageUid) as $templateKey => $title) { + $templateLayouts[] = array($title, $templateKey); + } + return $templateLayouts; + } + + /** + * Get template layouts defined in TSconfig + * + * @param $pageUid + * @return array + */ + protected function getTemplateLayoutsFromTsConfig($pageUid) { + $templateLayouts = array(); + $pagesTsConfig = \TYPO3\CMS\Backend\Utility\BackendUtility::getPagesTSconfig($pageUid); + if (isset($pagesTsConfig['tx_camaliga.']['templateLayouts.']) && is_array($pagesTsConfig['tx_camaliga.']['templateLayouts.'])) { + $templateLayouts = $pagesTsConfig['tx_camaliga.']['templateLayouts.']; + } + return $templateLayouts; + } +} \ No newline at end of file diff --git a/Classes/ViewHelpers/AddPublicResourcesViewHelper.php b/Classes/ViewHelpers/AddPublicResourcesViewHelper.php new file mode 100644 index 0000000..397da10 --- /dev/null +++ b/Classes/ViewHelpers/AddPublicResourcesViewHelper.php @@ -0,0 +1,83 @@ + + * A ViewHelper to include JS- and CSS-files + * + * @package camaliga + */ +class AddPublicResourcesViewHelper extends \TYPO3\CMS\Fluid\Core\ViewHelper\AbstractViewHelper { + /** + * AddPublicResourcesViewHelper-ViewHelper + * + * @param string $path Path to the CSS/JS file which should be included + * @param boolean $compress Define if file should be compressed + * @param boolean $footer Only JS files: Whether the file should be included in the footer + * @param boolean $library Whether the file should be included as a library + * @param boolean $addSlash Add a slash at the beginning? + * @return void + */ + public function render($path, $compress = FALSE, $footer = FALSE, $library = '', $addSlash = FALSE) { + if(TYPO3_MODE === 'FE') { + $path = \TYPO3\CMS\Core\Utility\GeneralUtility::getFileAbsFileName($path); + } + if ($path === '' || !file_exists($path)) { + return; + } + $path = substr($path,strlen(PATH_site)); + $ext = strtolower(pathinfo($path, PATHINFO_EXTENSION)); + if ($ext !== 'css' && $ext !== 'js') { + return; + } + if (TYPO3_MODE === 'FE') { + $pageRenderer = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\TYPO3\CMS\Core\Page\PageRenderer::class); + // alt: $GLOBALS['TSFE']->getPageRenderer(); + } else { + // wird noch nicht gebraucht + // $doc = $this->getDocInstance(); + // $pageRenderer = $doc->getPageRenderer(); + return; + } + // KGB: am Anfang wird manchmal noch ein / benötigt! + if ($addSlash && substr($path,0,1) != '/') + $path = '/' . $path; + // JS + if ($ext === 'js') { + if ($footer) { + if ($library != '') { + $pageRenderer->addJsFooterLibrary($library, $path, NULL, $compress); + } else { + $pageRenderer->addJsFooterFile($path, NULL, $compress); + } + } else { + if ($library) { + $pageRenderer->addJsLibrary($library, $path, NULL, $compress); + } else { + $pageRenderer->addJsFile($path, NULL, $compress); + } + } + + // CSS + } elseif ($ext === 'css') { + if ($libray) { + $pageRenderer->addCssLibrary($path, 'stylesheet', 'all', '', $compress); + } else { + $pageRenderer->addCssFile($path, 'stylesheet', 'all', '', $compress); + } + } + } +} +?> diff --git a/Classes/ViewHelpers/ContentViewHelper.php b/Classes/ViewHelpers/ContentViewHelper.php new file mode 100644 index 0000000..c12c193 --- /dev/null +++ b/Classes/ViewHelpers/ContentViewHelper.php @@ -0,0 +1,49 @@ + + * A ViewHelper for the camaliga-content + * + * @package camaliga + */ +class ContentViewHelper extends \TYPO3\CMS\Fluid\Core\ViewHelper\AbstractViewHelper { + /** + * Content-ViewHelper + * + * @param string $param + * @return string $result + */ + public function render($param) { + if ($_GET['tx_camaliga_pi1']) + $camaligaArray = $_GET['tx_camaliga_pi1']; + else if ($_POST['tx_camaliga_pi1']) + $camaligaArray = $_POST['tx_camaliga_pi1']; + else + $camaligaArray = array(); + $uid = intval($camaligaArray['content']); + $lang = intval($_GET['L']); + $row = array(); + if ($uid > 0) { + $res4 = $GLOBALS['TYPO3_DB']->exec_SELECTquery( + 'title as camaliga_title, shortdesc AS camaliga_shortdesc, link AS camaliga_link, image AS camaliga_image, +street AS camaliga_street, zip AS camaliga_zip, city AS camaliga_city, country AS camaliga_country, person AS camaliga_person, phone AS camaliga_phone, mobile AS camaliga_mobile, email AS camaliga_email, +latitude AS camaliga_latitude, longitude AS camaliga_longitude, custom1 AS camaliga_custom1, custom2 AS camaliga_custom_2, custom3 AS camaliga_custom3', + 'tx_camaliga_domain_model_content', + 'deleted=0 AND hidden=0 AND sys_language_uid IN (-1, ' . $lang . ') AND uid=' . $uid); + if ($GLOBALS['TYPO3_DB']->sql_num_rows($res4) > 0) { + $row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res4); + } + $GLOBALS['TYPO3_DB']->sql_free_result($res4); + } + $result = str_replace( + array_keys($row), + array_values($row), + $param + ); + return $result; + //return $this->renderChildren(); + } +} +?> \ No newline at end of file diff --git a/Configuration/FlexForms/flexform_pi1.xml b/Configuration/FlexForms/flexform_pi1.xml new file mode 100644 index 0000000..6f7261e --- /dev/null +++ b/Configuration/FlexForms/flexform_pi1.xml @@ -0,0 +1,1476 @@ + + + + + + + LLL:EXT:camaliga/Resources/Private/Language/locallang_be.xlf:title + + array + + + + + + select + + + LLL:EXT:camaliga/Resources/Private/Language/locallang_be.xlf:template.carousel + Content->carousel + + + LLL:EXT:camaliga/Resources/Private/Language/locallang_be.xlf:template.separated + Content->carouselSeparated + + + LLL:EXT:camaliga/Resources/Private/Language/locallang_be.xlf:template.list + Content->list;Content->search;Content->show + + + LLL:EXT:camaliga/Resources/Private/Language/locallang_be.xlf:template.listextended + Content->listExtended;Content->search;Content->showExtended + + + LLL:EXT:camaliga/Resources/Private/Language/locallang_be.xlf:template.show + Content->show + + + LLL:EXT:camaliga/Resources/Private/Language/locallang_be.xlf:template.showextended + Content->showExtended + + + LLL:EXT:camaliga/Resources/Private/Language/locallang_be.xlf:template.map + Content->map;Content->search;Content->show + + + LLL:EXT:camaliga/Resources/Private/Language/locallang_be.xlf:template.search + Content->search;Content->showExtended + + + LLL:EXT:camaliga/Resources/Private/Language/locallang_be.xlf:template.random + Content->random + + + LLL:EXT:camaliga/Resources/Private/Language/locallang_be.xlf:template.responsive + Content->responsive + + + Test + Content->test;Content->show + + + ---------------------- + Content->nix1 + + + Bootstrap Carousel + Content->bootstrap;Content->search;Content->show + + + Bootstrap Collapse/Accordion + Content->collapse;Content->search;Content->show + + + Bootstrap Modal + Content->modal;Content->search;Content->show + + + Bootstrap Tab + Content->tab;Content->search;Content->show + + + ---------------------- + Content->nix2 + + + AD Gallery + Content->adGallery;Content->search;Content->show + + + Coolcarousel + Content->coolcarousel;Content->search;Content->show + + + Ekko Lightbox + Content->ekko;Content->search;Content->show + + + Elastislide + Content->elastislide;Content->search;Content->show + + + FancyBox + Content->fancyBox;Content->search;Content->show + + + Flexslider 2 + Content->flexslider2;Content->search;Content->show + + + jQuery.Flipster + Content->flipster;Content->search;Content->show + + + FractionSlider + Content->fractionSlider;Content->search;Content->show + + + jQuery Full Width Image Slider + Content->fullwidth;Content->search;Content->show + + + GalleryView + Content->galleryview;Content->search;Content->show + + + Innerfade + Content->innerfade;Content->search;Content->show + + + Isotope + Content->isotope;Content->search;Content->show + + + Lightslider + Content->lightslider;Content->search;Content->show + + + OWL Carousel 2 + Content->owl2;Content->search;Content->show + + + Parallax (Simple Parallax Scrolling) + Content->parallax;Content->search;Content->show + + + responsiveCarousel by Basilio Cáceres + Content->responsiveCarousel;Content->search;Content->show + + + Revolution Slider + Content->revolution;Content->search;Content->show + + + Roundabout + Content->roundabout;Content->search;Content->show + + + S Gallery + Content->sgallery;Content->search;Content->show + + + SKDSlider + Content->skdslider;Content->search;Content->show + + + slick carousel + Content->slick;Content->search;Content->show + + + jQuery TOOLS Scrollable + Content->scrollable;Content->search;Content->show + + + + + + + + + + select + Quizpalme\Camaliga\Hooks\ItemsProcFunc->user_templateLayout + + + + + + + + + + + + + + select + + + TypoScript + 0 + + + Sorting + sorting + + + LLL:EXT:camaliga/Resources/Private/Language/locallang_be.xlf:sortBy.crdate + crdate + + + LLL:EXT:camaliga/Resources/Private/Language/locallang_be.xlf:sortBy.tstamp + tstamp + + + LLL:EXT:camaliga/Resources/Private/Language/locallang_be.xlf:sortBy.title + title + + + LLL:EXT:camaliga/Resources/Private/Language/locallang_be.xlf:sortBy.zip + zip + + + LLL:EXT:camaliga/Resources/Private/Language/locallang_be.xlf:sortBy.city + city + + + LLL:EXT:camaliga/Resources/Private/Language/locallang_be.xlf:sortBy.country + country + + + Custom 1 + custom1 + + + Custom 2 + custom2 + + + Custom 3 + custom3 + + + + + + + + + + select + + + TypoScript + 0 + + + LLL:EXT:camaliga/Resources/Private/Language/locallang_be.xlf:sortOrder.asc + asc + + + LLL:EXT:camaliga/Resources/Private/Language/locallang_be.xlf:sortOrder.desc + desc + + + + + + + + + + input + 5 + 5 + trim + + + + + + + + check + + + LLL:EXT:camaliga/Resources/Private/Language/locallang_be.xlf:yes + 1 + + + checkbox + + + + + + + + check + + + LLL:EXT:camaliga/Resources/Private/Language/locallang_be.xlf:yes + 1 + + + checkbox + + + + + + + + check + + + LLL:EXT:camaliga/Resources/Private/Language/locallang_be.xlf:yes + 1 + + + checkbox + + + + + + + + check + + + LLL:EXT:camaliga/Resources/Private/Language/locallang_be.xlf:yes + 1 + + + checkbox + + + + + + + + group + db + pages + 1 + 1 + 0 + 0 + + + + + + + + group + db + pages + 1 + 1 + 0 + 0 + + + + + + + + + + LLL:EXT:camaliga/Resources/Private/Language/locallang_be.xlf:images + + array + + + + + + input + 5 + 5 + trim + + + + + + + + input + 5 + 5 + trim + + + + + + + + input + 5 + 5 + trim + + + + + + + + input + 5 + 5 + trim + + + + + + + + + + LLL:EXT:camaliga/Resources/Private/Language/locallang_be.xlf:item + + array + + + + + + input + 5 + 5 + trim + + + + + + + + input + 5 + 5 + trim + + + + + + + + input + 5 + 5 + trim + + + + + + + + input + 5 + 5 + trim + + + + + + + + input + 5 + 5 + trim + + + + + + + + + + Bootstrap Carousel + bootstrap;Content->search;Content->show]]> + + array + + + + + + check + + + LLL:EXT:camaliga/Resources/Private/Language/locallang_be.xlf:yes + 1 + + + checkbox + + + + + + + + check + + + LLL:EXT:camaliga/Resources/Private/Language/locallang_be.xlf:yes + 1 + + + checkbox + + + + + + + + input + 7 + 6 + trim + + + + + + + + select + + + TypoScript + + + + LLL:EXT:camaliga/Resources/Private/Language/locallang_be.xlf:yes + "hover" + + + LLL:EXT:camaliga/Resources/Private/Language/locallang_be.xlf:no + "none" + + + + + + + + + + select + + + TypoScript + + + + LLL:EXT:camaliga/Resources/Private/Language/locallang_be.xlf:yes + true + + + LLL:EXT:camaliga/Resources/Private/Language/locallang_be.xlf:no + false + + + + + + + + + + select + + + TypoScript + + + + LLL:EXT:camaliga/Resources/Private/Language/locallang_be.xlf:yes + true + + + LLL:EXT:camaliga/Resources/Private/Language/locallang_be.xlf:no + false + + + + + + + + + + + + Bootstrap Collapse + collapse;Content->search;Content->show]]> + + array + + + + + + select + + + TypoScript + + + + LLL:EXT:camaliga/Resources/Private/Language/locallang_be.xlf:yes + true + + + LLL:EXT:camaliga/Resources/Private/Language/locallang_be.xlf:expandall + all + + + LLL:EXT:camaliga/Resources/Private/Language/locallang_be.xlf:no + false + + + + + + + + + + select + + + TypoScript + + + + LLL:EXT:camaliga/Resources/Private/Language/locallang_be.xlf:yes + true + + + LLL:EXT:camaliga/Resources/Private/Language/locallang_be.xlf:no + false + + + + + + + + + + select + + + TypoScript + + + + LLL:EXT:camaliga/Resources/Private/Language/locallang_be.xlf:yes + collapse + + + LLL:EXT:camaliga/Resources/Private/Language/locallang_be.xlf:no + false + + + + + + + + + + + + Bootstrap Modal + modal;Content->search;Content->show]]> + + array + + + + + + select + + + TypoScript + + + + LLL:EXT:camaliga/Resources/Private/Language/locallang_be.xlf:small + modal-sm + + + LLL:EXT:camaliga/Resources/Private/Language/locallang_be.xlf:large + modal-lg + + + + + + + + + + select + + + TypoScript + + + + LLL:EXT:camaliga/Resources/Private/Language/locallang_be.xlf:fade + fade + + + + + + + + + + select + + + TypoScript + + + + LLL:EXT:camaliga/Resources/Private/Language/locallang_be.xlf:yes + true + + + LLL:EXT:camaliga/Resources/Private/Language/locallang_be.xlf:no + false + + + + + + + + + + + + SEO + + + show]]> + showExtended]]> + + + + array + + + + + + check + + + LLL:EXT:camaliga/Resources/Private/Language/locallang_be.xlf:yes + 1 + + + checkbox + + + + + + + + check + + + LLL:EXT:camaliga/Resources/Private/Language/locallang_be.xlf:yes + 1 + + + checkbox + + + + + + + + check + + + LLL:EXT:camaliga/Resources/Private/Language/locallang_be.xlf:yes + 1 + + + checkbox + + + + + + + + check + + + LLL:EXT:camaliga/Resources/Private/Language/locallang_be.xlf:yes + 1 + + + checkbox + + + + + + + + check + + + LLL:EXT:camaliga/Resources/Private/Language/locallang_be.xlf:yes + 1 + + + checkbox + + + + + + + + check + + + LLL:EXT:camaliga/Resources/Private/Language/locallang_be.xlf:yes + 1 + + + checkbox + + + + + + + + + + LLL:EXT:camaliga/Resources/Private/Language/locallang_be.xlf:more + + array + + + + + + select + + + TypoScript + + + + LLL:EXT:camaliga/Resources/Private/Language/locallang_be.xlf:no + 0 + + + LLL:EXT:camaliga/Resources/Private/Language/locallang_be.xlf:yes + 1 + + + + + + + + + + input + 7 + 6 + trim + + + + + + + + select + + + TypoScript + + + + LLL:EXT:camaliga/Resources/Private/Language/locallang_be.xlf:no + false + + + LLL:EXT:camaliga/Resources/Private/Language/locallang_be.xlf:yes + true + + + + + + + + + + input + 7 + 6 + trim + + + + + + + + select + + + TypoScript + + + + LLL:EXT:camaliga/Resources/Private/Language/locallang_be.xlf:no + false + + + LLL:EXT:camaliga/Resources/Private/Language/locallang_be.xlf:yes + true + + + + + + + + + + select + + + TypoScript + + + + LLL:EXT:camaliga/Resources/Private/Language/locallang_be.xlf:no + false + + + LLL:EXT:camaliga/Resources/Private/Language/locallang_be.xlf:yes + true + + + + + + + + + + select + + + TypoScript + + + + LLL:EXT:camaliga/Resources/Private/Language/locallang_be.xlf:no + false + + + LLL:EXT:camaliga/Resources/Private/Language/locallang_be.xlf:yes + true + + + + + + + + + + select + + + TypoScript + + + + LLL:EXT:camaliga/Resources/Private/Language/locallang_be.xlf:no + false + + + LLL:EXT:camaliga/Resources/Private/Language/locallang_be.xlf:yes + true + + + + + + + + + + select + + + TypoScript + + + + LLL:EXT:camaliga/Resources/Private/Language/locallang_be.xlf:no + false + + + LLL:EXT:camaliga/Resources/Private/Language/locallang_be.xlf:yes + true + + + + + + + + + + select + + + TypoScript + + + + LLL:EXT:camaliga/Resources/Private/Language/locallang_be.xlf:no + false + + + LLL:EXT:camaliga/Resources/Private/Language/locallang_be.xlf:yes + true + + + + + + + + + + select + + + TypoScript + + + + LLL:EXT:camaliga/Resources/Private/Language/locallang_be.xlf:no + false + + + LLL:EXT:camaliga/Resources/Private/Language/locallang_be.xlf:yes + true + + + + + + + + + + select + + + TypoScript + + + + LLL:EXT:camaliga/Resources/Private/Language/locallang_be.xlf:no + false + + + LLL:EXT:camaliga/Resources/Private/Language/locallang_be.xlf:yes + true + + + + + + + + + + select + + + TypoScript + + + + LLL:EXT:camaliga/Resources/Private/Language/locallang_be.xlf:no + false + + + LLL:EXT:camaliga/Resources/Private/Language/locallang_be.xlf:yes + true + + + + + + + + + + select + + + TypoScript + + + + LLL:EXT:camaliga/Resources/Private/Language/locallang_be.xlf:no + false + + + LLL:EXT:camaliga/Resources/Private/Language/locallang_be.xlf:yes + true + + + + + + + + + + select + + + TypoScript + + + + LLL:EXT:camaliga/Resources/Private/Language/locallang_be.xlf:no + false + + + LLL:EXT:camaliga/Resources/Private/Language/locallang_be.xlf:yes + true + + + + + + + + + + select + + + TypoScript + + + + LLL:EXT:camaliga/Resources/Private/Language/locallang_be.xlf:no + false + + + LLL:EXT:camaliga/Resources/Private/Language/locallang_be.xlf:yes + true + + + + + + + + + + select + + + TypoScript + + + + LLL:EXT:camaliga/Resources/Private/Language/locallang_be.xlf:no + false + + + LLL:EXT:camaliga/Resources/Private/Language/locallang_be.xlf:yes + true + + + + + + + + + + select + + + TypoScript + + + + LLL:EXT:camaliga/Resources/Private/Language/locallang_be.xlf:no + false + + + LLL:EXT:camaliga/Resources/Private/Language/locallang_be.xlf:yes + true + + + + + + + + + + input + 7 + 6 + trim + + + + + + + + input + 7 + 6 + trim + + + + + + + + input + 7 + 6 + trim + + + + + + + + select + + + TypoScript + + + + LLL:EXT:camaliga/Resources/Private/Language/locallang_be.xlf:no + false + + + LLL:EXT:camaliga/Resources/Private/Language/locallang_be.xlf:yes + true + + + + + + + + + + input + 7 + 6 + trim + + + + + + + + select + + + TypoScript + + + + LLL:EXT:camaliga/Resources/Private/Language/locallang_be.xlf:no + 0 + + + LLL:EXT:camaliga/Resources/Private/Language/locallang_be.xlf:yes + 1 + + + + + + + + + + + + LLL:EXT:camaliga/Resources/Private/Language/locallang_be.xlf:extendedOptions + + array + + + + + + check + + + LLL:EXT:camaliga/Resources/Private/Language/locallang_be.xlf:yes + 1 + + + checkbox + + + + + + + + check + + + LLL:EXT:camaliga/Resources/Private/Language/locallang_be.xlf:yes + 1 + + + checkbox + + + + + + + + check + + + LLL:EXT:camaliga/Resources/Private/Language/locallang_be.xlf:yes + 1 + + + checkbox + + + + + + + + input + 15 + 25 + trim + + + + + + + + check + + + LLL:EXT:camaliga/Resources/Private/Language/locallang_be.xlf:yes + 1 + + + checkbox + + + + + + + + + + LLL:EXT:camaliga/Resources/Private/Language/locallang_be.xlf:categories + + array + + + + + + select + tree + + parent + + 99 + TRUE + TRUE + + + sys_category + AND (sys_category.sys_language_uid = 0 OR sys_category.l10n_parent = 0) ORDER BY sys_category.sorting ASC + 10 + 20 + 0 + 99 + + + + + + + + select + + + TypoScript + + + + LLL:EXT:camaliga/Resources/Private/Language/locallang_be.xlf:normalCategoryMode.and + and + + + LLL:EXT:camaliga/Resources/Private/Language/locallang_be.xlf:normalCategoryMode.or + or + + + + + + + + + + \ No newline at end of file diff --git a/Configuration/TCA/Overrides/pages.php b/Configuration/TCA/Overrides/pages.php new file mode 100644 index 0000000..3ebf69d --- /dev/null +++ b/Configuration/TCA/Overrides/pages.php @@ -0,0 +1,11 @@ + 'Camaliga', + 1 => 'camaliga', + 2 => 'ext-camaliga-folder-icon' +]; + +$GLOBALS['TCA']['pages']['ctrl']['typeicon_classes']['contains-camaliga'] = 'ext-camaliga-folder-icon'; \ No newline at end of file diff --git a/Configuration/TCA/Overrides/tt_content.php b/Configuration/TCA/Overrides/tt_content.php new file mode 100644 index 0000000..ea286d3 --- /dev/null +++ b/Configuration/TCA/Overrides/tt_content.php @@ -0,0 +1,6 @@ + \ No newline at end of file diff --git a/Configuration/TCA/tx_camaliga_domain_model_content.php b/Configuration/TCA/tx_camaliga_domain_model_content.php new file mode 100644 index 0000000..23fdf96 --- /dev/null +++ b/Configuration/TCA/tx_camaliga_domain_model_content.php @@ -0,0 +1,659 @@ + [ + 'createNewRelationLinkTitle' => 'LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:images.addFileReference' + ], + 'foreign_types' => [ + '0' => [ + 'showitem' => ' + --palette--;LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.imageoverlayPalette;imageoverlayPalette, + --palette--;;filePalette' + ], + \TYPO3\CMS\Core\Resource\File::FILETYPE_TEXT => [ + 'showitem' => ' + --palette--;LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.imageoverlayPalette;imageoverlayPalette, + --palette--;;filePalette' + ], + \TYPO3\CMS\Core\Resource\File::FILETYPE_IMAGE => [ + 'showitem' => ' + --palette--;LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.imageoverlayPalette;imageoverlayPalette, + --palette--;;filePalette' + ], + \TYPO3\CMS\Core\Resource\File::FILETYPE_AUDIO => [ + 'showitem' => ' + --palette--;LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.imageoverlayPalette;imageoverlayPalette, + --palette--;;filePalette' + ], + \TYPO3\CMS\Core\Resource\File::FILETYPE_VIDEO => [ + 'showitem' => ' + --palette--;LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.imageoverlayPalette;imageoverlayPalette, + --palette--;;filePalette' + ], + \TYPO3\CMS\Core\Resource\File::FILETYPE_APPLICATION => [ + 'showitem' => ' + --palette--;LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.imageoverlayPalette;imageoverlayPalette, + --palette--;;filePalette' + ] + ], + 'maxitems' => 1 + ], + $GLOBALS['TYPO3_CONF_VARS']['GFX']['imagefile_ext'] + ); + $imgConfig2 = \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::getFileFieldTCAConfig( + 'falimage2', + [ + 'appearance' => [ + 'createNewRelationLinkTitle' => 'LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:images.addFileReference' + ], + 'foreign_types' => [ + '0' => [ + 'showitem' => ' + --palette--;LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.imageoverlayPalette;imageoverlayPalette, + --palette--;;filePalette' + ], + \TYPO3\CMS\Core\Resource\File::FILETYPE_TEXT => [ + 'showitem' => ' + --palette--;LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.imageoverlayPalette;imageoverlayPalette, + --palette--;;filePalette' + ], + \TYPO3\CMS\Core\Resource\File::FILETYPE_IMAGE => [ + 'showitem' => ' + --palette--;LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.imageoverlayPalette;imageoverlayPalette, + --palette--;;filePalette' + ], + \TYPO3\CMS\Core\Resource\File::FILETYPE_AUDIO => [ + 'showitem' => ' + --palette--;LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.imageoverlayPalette;imageoverlayPalette, + --palette--;;filePalette' + ], + \TYPO3\CMS\Core\Resource\File::FILETYPE_VIDEO => [ + 'showitem' => ' + --palette--;LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.imageoverlayPalette;imageoverlayPalette, + --palette--;;filePalette' + ], + \TYPO3\CMS\Core\Resource\File::FILETYPE_APPLICATION => [ + 'showitem' => ' + --palette--;LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.imageoverlayPalette;imageoverlayPalette, + --palette--;;filePalette' + ] + ], + 'maxitems' => 1 + ], + $GLOBALS['TYPO3_CONF_VARS']['GFX']['imagefile_ext'] + ); + $imgConfig3 = \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::getFileFieldTCAConfig( + 'falimage3', + [ + 'appearance' => [ + 'createNewRelationLinkTitle' => 'LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:images.addFileReference' + ], + 'foreign_types' => [ + '0' => [ + 'showitem' => ' + --palette--;LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.imageoverlayPalette;imageoverlayPalette, + --palette--;;filePalette' + ], + \TYPO3\CMS\Core\Resource\File::FILETYPE_TEXT => [ + 'showitem' => ' + --palette--;LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.imageoverlayPalette;imageoverlayPalette, + --palette--;;filePalette' + ], + \TYPO3\CMS\Core\Resource\File::FILETYPE_IMAGE => [ + 'showitem' => ' + --palette--;LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.imageoverlayPalette;imageoverlayPalette, + --palette--;;filePalette' + ], + \TYPO3\CMS\Core\Resource\File::FILETYPE_AUDIO => [ + 'showitem' => ' + --palette--;LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.imageoverlayPalette;imageoverlayPalette, + --palette--;;filePalette' + ], + \TYPO3\CMS\Core\Resource\File::FILETYPE_VIDEO => [ + 'showitem' => ' + --palette--;LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.imageoverlayPalette;imageoverlayPalette, + --palette--;;filePalette' + ], + \TYPO3\CMS\Core\Resource\File::FILETYPE_APPLICATION => [ + 'showitem' => ' + --palette--;LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.imageoverlayPalette;imageoverlayPalette, + --palette--;;filePalette' + ] + ], + 'maxitems' => 1 + ], + $GLOBALS['TYPO3_CONF_VARS']['GFX']['imagefile_ext'] + ); + $imgConfig4 = \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::getFileFieldTCAConfig( + 'falimage4', + [ + 'appearance' => [ + 'createNewRelationLinkTitle' => 'LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:images.addFileReference' + ], + 'foreign_types' => [ + '0' => [ + 'showitem' => ' + --palette--;LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.imageoverlayPalette;imageoverlayPalette, + --palette--;;filePalette' + ], + \TYPO3\CMS\Core\Resource\File::FILETYPE_TEXT => [ + 'showitem' => ' + --palette--;LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.imageoverlayPalette;imageoverlayPalette, + --palette--;;filePalette' + ], + \TYPO3\CMS\Core\Resource\File::FILETYPE_IMAGE => [ + 'showitem' => ' + --palette--;LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.imageoverlayPalette;imageoverlayPalette, + --palette--;;filePalette' + ], + \TYPO3\CMS\Core\Resource\File::FILETYPE_AUDIO => [ + 'showitem' => ' + --palette--;LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.imageoverlayPalette;imageoverlayPalette, + --palette--;;filePalette' + ], + \TYPO3\CMS\Core\Resource\File::FILETYPE_VIDEO => [ + 'showitem' => ' + --palette--;LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.imageoverlayPalette;imageoverlayPalette, + --palette--;;filePalette' + ], + \TYPO3\CMS\Core\Resource\File::FILETYPE_APPLICATION => [ + 'showitem' => ' + --palette--;LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.imageoverlayPalette;imageoverlayPalette, + --palette--;;filePalette' + ] + ], + 'maxitems' => 1 + ], + $GLOBALS['TYPO3_CONF_VARS']['GFX']['imagefile_ext'] + ); + $imgConfig5 = \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::getFileFieldTCAConfig( + 'falimage5', + [ + 'appearance' => [ + 'createNewRelationLinkTitle' => 'LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:images.addFileReference' + ], + 'foreign_types' => [ + '0' => [ + 'showitem' => ' + --palette--;LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.imageoverlayPalette;imageoverlayPalette, + --palette--;;filePalette' + ], + \TYPO3\CMS\Core\Resource\File::FILETYPE_TEXT => [ + 'showitem' => ' + --palette--;LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.imageoverlayPalette;imageoverlayPalette, + --palette--;;filePalette' + ], + \TYPO3\CMS\Core\Resource\File::FILETYPE_IMAGE => [ + 'showitem' => ' + --palette--;LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.imageoverlayPalette;imageoverlayPalette, + --palette--;;filePalette' + ], + \TYPO3\CMS\Core\Resource\File::FILETYPE_AUDIO => [ + 'showitem' => ' + --palette--;LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.imageoverlayPalette;imageoverlayPalette, + --palette--;;filePalette' + ], + \TYPO3\CMS\Core\Resource\File::FILETYPE_VIDEO => [ + 'showitem' => ' + --palette--;LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.imageoverlayPalette;imageoverlayPalette, + --palette--;;filePalette' + ], + \TYPO3\CMS\Core\Resource\File::FILETYPE_APPLICATION => [ + 'showitem' => ' + --palette--;LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.imageoverlayPalette;imageoverlayPalette, + --palette--;;filePalette' + ] + ], + 'maxitems' => 1 + ], + $GLOBALS['TYPO3_CONF_VARS']['GFX']['imagefile_ext'] + ); +} else { + $imgConfig1 = array( + 'type' => 'group', + 'internal_type' => 'file', + 'uploadfolder' => 'uploads/tx_camaliga', + 'show_thumbs' => 1, + 'size' => 1, + 'allowed' => $GLOBALS['TYPO3_CONF_VARS']['GFX']['imagefile_ext'], + 'disallowed' => '', + 'minitems' => 0, + 'maxitems' => 1, + ); + $imgConfig2 = $imgConfig1; + $imgConfig3 = $imgConfig1; + $imgConfig4 = $imgConfig1; + $imgConfig5 = $imgConfig1; +} + +$tcaArray = array( + 'ctrl' => array( + 'title' => 'LLL:EXT:camaliga/Resources/Private/Language/locallang_db.xlf:tx_camaliga_domain_model_content', + 'label' => 'title', + 'tstamp' => 'tstamp', + 'crdate' => 'crdate', + 'cruser_id' => 'cruser_id', + 'dividers2tabs' => TRUE, + 'sortby' => 'sorting', + 'versioningWS' => 2, + 'versioning_followPages' => TRUE, + 'origUid' => 't3_origuid', + 'languageField' => 'sys_language_uid', + 'transOrigPointerField' => 'l10n_parent', + 'transOrigDiffSourceField' => 'l10n_diffsource', + 'delete' => 'deleted', + 'enablecolumns' => array( + 'disabled' => 'hidden', + 'starttime' => 'starttime', + 'endtime' => 'endtime', + ), + 'searchFields' => 'title,shortdesc,longdesc,street,zip,city,country,person,custom1', + 'iconfile' => \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extRelPath('camaliga') . 'Resources/Public/Icons/tx_camaliga_domain_model_content.gif' + ), + 'interface' => array( + 'showRecordFieldList' => 'sys_language_uid, l10n_parent, l10n_diffsource, hidden, title, shortdesc, longdesc, link, '.$pre.'image', + ), + 'types' => array( + '1' => array('showitem' => 'sys_language_uid;;;;1-1-1, l10n_parent, l10n_diffsource, hidden;;1, title, shortdesc, longdesc;;;richtext:rte_transform[mode=ts_links], link, '.$pre.'image;;2'), + ), + 'palettes' => array( + '1' => array('showitem' => ''), + '2' => array('showitem' => ''), + ), + 'columns' => array( + 'sys_language_uid' => array( + 'exclude' => 1, + 'label' => 'LLL:EXT:lang/locallang_general.xlf:LGL.language', + 'config' => array( + 'type' => 'select', + 'renderType' => 'selectSingle', + 'special' => 'languages', + 'items' => array( + array( + 'LLL:EXT:lang/locallang_general.xlf:LGL.allLanguages', + -1, + 'flags-multiple' + ), + ), + 'default' => 0, + ) + ), + 'l10n_parent' => array( + 'displayCond' => 'FIELD:sys_language_uid:>:0', + 'exclude' => 1, + 'label' => 'LLL:EXT:lang/locallang_general.xlf:LGL.l18n_parent', + 'config' => array( + 'type' => 'select', + 'renderType' => 'selectSingle', + 'items' => array( + array('', 0), + ), + 'foreign_table' => 'tx_camaliga_domain_model_content', + 'foreign_table_where' => 'AND tx_camaliga_domain_model_content.pid=###CURRENT_PID### AND tx_camaliga_domain_model_content.sys_language_uid IN (-1,0)', + 'showIconTable' => false + ), + ), + 'l10n_diffsource' => array( + 'config' => array( + 'type' => 'passthrough', + 'default' => '' + ), + ), + 't3ver_label' => array( + 'label' => 'LLL:EXT:lang/locallang_general.xlf:LGL.versionLabel', + 'config' => array( + 'type' => 'input', + 'size' => 30, + 'max' => 255, + ) + ), + 'hidden' => array( + 'exclude' => 1, + 'label' => 'LLL:EXT:lang/locallang_general.xlf:LGL.hidden', + 'config' => array( + 'type' => 'check', + ), + ), + 'starttime' => array( + 'exclude' => 1, + 'l10n_mode' => 'mergeIfNotBlank', + 'label' => 'LLL:EXT:lang/locallang_general.xlf:LGL.starttime', + 'config' => array( + 'type' => 'input', + 'size' => 13, + 'max' => 20, + 'eval' => 'datetime', + 'checkbox' => 0, + 'default' => 0, + 'range' => array( + 'lower' => mktime(0, 0, 0, date('m'), date('d'), date('Y')) + ), + ), + ), + 'endtime' => array( + 'exclude' => 1, + 'l10n_mode' => 'mergeIfNotBlank', + 'label' => 'LLL:EXT:lang/locallang_general.xlf:LGL.endtime', + 'config' => array( + 'type' => 'input', + 'size' => 13, + 'max' => 20, + 'eval' => 'datetime', + 'checkbox' => 0, + 'default' => 0, + 'range' => array( + 'lower' => mktime(0, 0, 0, date('m'), date('d'), date('Y')) + ), + ), + ), + 'title' => array( + 'exclude' => 0, + 'label' => 'LLL:EXT:camaliga/Resources/Private/Language/locallang_db.xlf:tx_camaliga_domain_model_content.title', + 'config' => array( + 'type' => 'input', + 'size' => 30, + 'eval' => 'trim,required' + ), + ), + 'shortdesc' => array( + 'exclude' => 0, + 'label' => 'LLL:EXT:camaliga/Resources/Private/Language/locallang_db.xlf:tx_camaliga_domain_model_content.shortdesc', + 'config' => array( + 'type' => 'text', + 'cols' => 40, + 'rows' => 3, + 'eval' => 'trim' + ), + ), + 'longdesc' => array( + 'exclude' => 0, + 'label' => 'LLL:EXT:camaliga/Resources/Private/Language/locallang_db.xlf:tx_camaliga_domain_model_content.longdesc', + 'config' => array( + 'type' => 'text', + 'cols' => 40, + 'rows' => 14, + 'eval' => 'trim', + ), + 'defaultExtras' => 'richtext:rte_transform[mode=ts_css]' + ), + 'link' => array( + 'exclude' => 0, + 'label' => 'LLL:EXT:camaliga/Resources/Private/Language/locallang_db.xlf:tx_camaliga_domain_model_content.link', + 'config' => array ( + 'type' => 'input', + 'size' => '25', + 'max' => '255', + 'checkbox' => '', + 'eval' => 'trim', + 'wizards' => array( + 'link' => array( + 'type' => 'popup', + 'title' => 'LLL:EXT:cms/locallang_ttc.xlf:header_link_formlabel', + 'icon' => 'actions-wizard-link', + 'module' => array( + 'name' => 'wizard_element_browser', + 'urlParameters' => array( + 'mode' => 'wizard' + ) + ), + 'JSopenParams' => 'height=300,width=500,status=0,menubar=0,scrollbars=1' + ) + ), + 'softref' => 'typolink' + ) + ), + $pre.'image' => array( + 'exclude' => 0, + 'label' => 'LLL:EXT:camaliga/Resources/Private/Language/locallang_db.xlf:tx_camaliga_domain_model_content.image', + 'config' => $imgConfig1, + ), + ), +); + +if (!$disableFurtherImages) { + $tcaArray['columns'][$pre.'image2'] = array( + 'exclude' => 0, + 'label' => 'LLL:EXT:camaliga/Resources/Private/Language/locallang_db.xlf:tx_camaliga_domain_model_content.image2', + 'config' => $imgConfig2 + ); + if (!$enableFal) + $tcaArray['columns']['caption2'] = array( + 'exclude' => 0, + 'label' => 'LLL:EXT:camaliga/Resources/Private/Language/locallang_db.xlf:tx_camaliga_domain_model_content.caption2', + 'config' => array( + 'type' => 'input', + 'size' => 30, + 'eval' => 'trim' + ), + ); + $tcaArray['columns'][$pre.'image3'] = array( + 'exclude' => 0, + 'label' => 'LLL:EXT:camaliga/Resources/Private/Language/locallang_db.xlf:tx_camaliga_domain_model_content.image3', + 'config' => $imgConfig3 + ); + if (!$enableFal) + $tcaArray['columns']['caption3'] = array( + 'exclude' => 0, + 'label' => 'LLL:EXT:camaliga/Resources/Private/Language/locallang_db.xlf:tx_camaliga_domain_model_content.caption3', + 'config' => array( + 'type' => 'input', + 'size' => 30, + 'eval' => 'trim' + ), + ); + $tcaArray['columns'][$pre.'image4'] = array( + 'exclude' => 0, + 'label' => 'LLL:EXT:camaliga/Resources/Private/Language/locallang_db.xlf:tx_camaliga_domain_model_content.image4', + 'config' => $imgConfig4 + ); + if (!$enableFal) + $tcaArray['columns']['caption4'] = array( + 'exclude' => 0, + 'label' => 'LLL:EXT:camaliga/Resources/Private/Language/locallang_db.xlf:tx_camaliga_domain_model_content.caption4', + 'config' => array( + 'type' => 'input', + 'size' => 30, + 'eval' => 'trim' + ), + ); + $tcaArray['columns'][$pre.'image5'] = array( + 'exclude' => 0, + 'label' => 'LLL:EXT:camaliga/Resources/Private/Language/locallang_db.xlf:tx_camaliga_domain_model_content.image5', + 'config' => $imgConfig5 + ); + if (!$enableFal) + $tcaArray['columns']['caption5'] = array( + 'exclude' => 0, + 'label' => 'LLL:EXT:camaliga/Resources/Private/Language/locallang_db.xlf:tx_camaliga_domain_model_content.caption5', + 'config' => array( + 'type' => 'input', + 'size' => 30, + 'eval' => 'trim' + ), + ); + if ($enableFal) { + $tcaArray['interface']['showRecordFieldList'] .= ', falimage2, falimage3, falimage4, falimage5'; + $tcaArray['palettes']['2']['showitem'] = 'falimage2,--linebreak--, falimage3,--linebreak--, falimage4,--linebreak--, falimage5'; + } else { + $tcaArray['interface']['showRecordFieldList'] .= ', image2, caption2, image3, caption3, image4, caption4, image5, caption5'; + $tcaArray['palettes']['2']['showitem'] = 'image2, caption2,--linebreak--, image3, caption3,--linebreak--, image4, caption4,--linebreak--, image5, caption5'; + } +} + +if (!$disableAddress) { + $tcaArray['columns']['street'] = array( + 'exclude' => 0, + 'label' => 'LLL:EXT:camaliga/Resources/Private/Language/locallang_db.xlf:tx_camaliga_domain_model_content.street', + 'config' => array( + 'type' => 'input', + 'size' => 30, + 'eval' => 'trim' + ), + ); + $tcaArray['columns']['zip'] = array( + 'exclude' => 0, + 'label' => 'LLL:EXT:camaliga/Resources/Private/Language/locallang_db.xlf:tx_camaliga_domain_model_content.zip', + 'config' => array( + 'type' => 'input', + 'size' => 10, + 'eval' => 'trim' + ), + ); + $tcaArray['columns']['city'] = array( + 'exclude' => 0, + 'label' => 'LLL:EXT:camaliga/Resources/Private/Language/locallang_db.xlf:tx_camaliga_domain_model_content.city', + 'config' => array( + 'type' => 'input', + 'size' => 30, + 'eval' => 'trim' + ), + ); + $tcaArray['columns']['country'] = array( + 'exclude' => 0, + 'label' => 'LLL:EXT:camaliga/Resources/Private/Language/locallang_db.xlf:tx_camaliga_domain_model_content.country', + 'config' => array( + 'type' => 'input', + 'size' => 30, + 'eval' => 'trim' + ), + ); + $tcaArray['columns']['latitude'] = array( + 'exclude' => 0, + 'label' => 'LLL:EXT:camaliga/Resources/Private/Language/locallang_db.xlf:tx_camaliga_domain_model_content.latitude', + 'config' => array( + 'type' => 'input', + 'size' => 20, + 'eval' => 'trim', + 'max' => 30, + 'default' => '0.00000000000000' + ), + ); + $tcaArray['columns']['longitude'] = array( + 'exclude' => 0, + 'label' => 'LLL:EXT:camaliga/Resources/Private/Language/locallang_db.xlf:tx_camaliga_domain_model_content.longitude', + 'config' => array( + 'type' => 'input', + 'size' => 20, + 'eval' => 'trim', + 'max' => 30, + 'default' => '0.00000000000000' + ), + ); + $tcaArray['interface']['showRecordFieldList'] .= ', street, zip, city, country, latitude, longitude'; + $tcaArray['types']['1']['showitem'] .= ',street;;3'; + $tcaArray['palettes']['3'] = array('showitem' => 'zip, city,--linebreak--, country,--linebreak--, latitude, longitude'); +} + +if (!$disableContact) { + $tcaArray['columns']['person'] = array( + 'exclude' => 0, + 'label' => 'LLL:EXT:camaliga/Resources/Private/Language/locallang_db.xlf:tx_camaliga_domain_model_content.person', + 'config' => array( + 'type' => 'input', + 'size' => 25, + 'eval' => 'trim' + ), + ); + $tcaArray['columns']['phone'] = array( + 'exclude' => 0, + 'label' => 'LLL:EXT:camaliga/Resources/Private/Language/locallang_db.xlf:tx_camaliga_domain_model_content.phone', + 'config' => array( + 'type' => 'input', + 'size' => 25, + 'eval' => 'trim' + ), + ); + $tcaArray['columns']['mobile'] = array( + 'exclude' => 0, + 'label' => 'LLL:EXT:camaliga/Resources/Private/Language/locallang_db.xlf:tx_camaliga_domain_model_content.mobile', + 'config' => array( + 'type' => 'input', + 'size' => 25, + 'eval' => 'trim' + ), + ); + $tcaArray['columns']['email'] = array( + 'exclude' => 0, + 'label' => 'LLL:EXT:camaliga/Resources/Private/Language/locallang_db.xlf:tx_camaliga_domain_model_content.email', + 'config' => array( + 'type' => 'input', + 'size' => 30, + 'eval' => 'trim' + ), + ); + $tcaArray['interface']['showRecordFieldList'] .= ', person, phone, mobile, email'; + $tcaArray['types']['1']['showitem'] .= ', person;;4'; + $tcaArray['palettes']['4'] = array('showitem' => 'phone, mobile,--linebreak--, email'); +} + +if (!$disableCustom) { + $tcaArray['columns']['custom1'] = array( + 'exclude' => 0, + 'label' => 'LLL:EXT:camaliga/Resources/Private/Language/locallang_db.xlf:tx_camaliga_domain_model_content.custom1', + 'config' => array( + 'type' => 'input', + 'size' => 25, + 'eval' => 'trim' + ), + ); + $tcaArray['columns']['custom2'] = array( + 'exclude' => 0, + 'label' => 'LLL:EXT:camaliga/Resources/Private/Language/locallang_db.xlf:tx_camaliga_domain_model_content.custom2', + 'config' => array( + 'type' => 'input', + 'size' => 25, + 'eval' => 'trim' + ), + ); + $tcaArray['columns']['custom3'] = array( + 'exclude' => 0, + 'label' => 'LLL:EXT:camaliga/Resources/Private/Language/locallang_db.xlf:tx_camaliga_domain_model_content.custom3', + 'config' => array( + 'type' => 'input', + 'size' => 30, + 'eval' => 'trim' + ), + ); + $tcaArray['interface']['showRecordFieldList'] .= ', custom1, custom2, custom3'; + $tcaArray['types']['1']['showitem'] .= ',custom1;;5'; + $tcaArray['palettes']['5'] = array('showitem' => 'custom2, custom3'); +} + +if (!$disableMother) { + $tcaArray['columns']['mother'] = array( + 'exclude' => 0, + 'label' => 'LLL:EXT:camaliga/Resources/Private/Language/locallang_db.xlf:tx_camaliga_domain_model_content.mother', + 'config' => array( + 'type' => 'group', + 'internal_type' => 'db', + 'allowed' => 'tx_camaliga_domain_model_content', + 'size' => '1', + 'maxitems' => '1', + 'minitems' => '0', + 'show_thumbs' => '0', + 'wizards' => array( + 'suggest' => array( + 'type' => 'suggest', + ), + ), + ), + ); + $tcaArray['interface']['showRecordFieldList'] .= ',mother'; + $tcaArray['types']['1']['showitem'] .= ',mother'; +} + +$tcaArray['types']['1']['showitem'] .= ',--div--;LLL:EXT:cms/locallang_ttc.xlf:tabs.access,starttime, endtime'; + +return $tcaArray; +?> \ No newline at end of file diff --git a/Configuration/TSconfig/ContentElementWizard.txt b/Configuration/TSconfig/ContentElementWizard.txt new file mode 100644 index 0000000..73f73e8 --- /dev/null +++ b/Configuration/TSconfig/ContentElementWizard.txt @@ -0,0 +1,13 @@ +mod.wizards.newContentElement.wizardItems.plugins { + elements { + camaliga { + iconIdentifier = ext-camaliga-wizard-icon + title = Camaliga + description = Camaliga: carousel/map/list/gallery that uses TYPO3 categories. + tt_content_defValues { + CType = list + list_type = camaliga_pi1 + } + } + } +} \ No newline at end of file diff --git a/Configuration/TSconfig/Page/mod.linkvalidator.txt b/Configuration/TSconfig/Page/mod.linkvalidator.txt new file mode 100644 index 0000000..822e719 --- /dev/null +++ b/Configuration/TSconfig/Page/mod.linkvalidator.txt @@ -0,0 +1,3 @@ +mod.linkvalidator.searchFields { + tx_camaliga_domain_model_content = link +} \ No newline at end of file diff --git a/Configuration/TypoScript/constants.txt b/Configuration/TypoScript/constants.txt new file mode 100644 index 0000000..55f9644 --- /dev/null +++ b/Configuration/TypoScript/constants.txt @@ -0,0 +1,15 @@ +plugin.tx_camaliga { + view { + # cat=plugin.tx_camaliga/file; type=string; label=Path to template root (FE) + templateRootPath = EXT:camaliga/Resources/Private/Templates/ + # cat=plugin.tx_camaliga/file; type=string; label=Path to template partials (FE) + partialRootPath = EXT:camaliga/Resources/Private/Partials/ + # cat=plugin.tx_camaliga/file; type=string; label=Path to template layouts (FE) + layoutRootPath = EXT:camaliga/Resources/Private/Layouts/ + } + persistence { + # cat=plugin.tx_camaliga//a; type=string; label=Default storage PID + storagePid = + } +} +module.tx_camaliga < plugin.tx_camaliga \ No newline at end of file diff --git a/Configuration/TypoScript/setup.txt b/Configuration/TypoScript/setup.txt new file mode 100644 index 0000000..9b44214 --- /dev/null +++ b/Configuration/TypoScript/setup.txt @@ -0,0 +1,124 @@ +plugin.tx_camaliga { + view { + templateRootPaths { + 0 = EXT:camaliga/Resources/Private/Templates/ + 1 = {$plugin.tx_camaliga.view.templateRootPath} + } + partialRootPaths { + 0 = EXT:camaliga/Resources/Private/Partials/ + 1 = {$plugin.tx_camaliga.view.partialRootPath} + } + layoutRootPaths { + 0 = EXT:camaliga/Resources/Private/Layouts/ + 1 = {$plugin.tx_camaliga.view.layoutRootPath} + } + } + persistence { + storagePid = {$plugin.tx_camaliga.persistence.storagePid} + # storagePid.ifEmpty.data = {page:uid} + } + features { + rewrittenPropertyMapper = 1 + } + settings { + listId = + showId = + sortBy = + sortOrder = + limit = 0 + random = 0 + getLatLon = 0 + onlyDistinct = 0 + addPadding = 0 + img { + width = 700 + height = 500 + thumbWidth = 195 + thumbHeight = 139 + } + item { + width = 195 + height = 290 + padding = 0 + margin = 10 + items = 3 + } + maps { + key = + language = de + dontIncludeAPI = 0 + includeRoute = 0 + zoom = 5 + startLatitude = 50.0 + startLongitude = 10.0 + } + seo { + setTitle = 0 + setIndexedDocTitle = 0 + setDescription = 0 + setOgTitle = 0 + setOgDescription = 0 + setOgImage = 0 + } + more { + setModulo = 0 + speed = 0.5 + autoplay = false + autoplaySpeed = 6 + infinite = true + vertical = false + reverse = false + crop = false + showPanel = true + showArrows = true + showDots = true + showThumbnails = true + showAllThumbs = false + showArrowsThumbs = true + showDotsThumbs = true + showCaptions = false + pausePlay = true + pauseOnHover = false + opacity = 0.75 + slidesToShow = 6 + slidesToScroll = 1 + fade = true + easing = linear + addLightbox = 0 + } + extended { + enable = 0 + onlySearchForm = 0 + restrictSearch = 0 + radiusValues = + saveSearch = 0 + } + bootstrap { + showIndicators = 0 + showControls = 0 + interval = 5000 + pause = "hover" + wrap = true + keyboard = true + expanded = false + parent = true + toggle = collapse + dialog = + animation = fade + escape = true + } + overrideFlexformSettingsIfEmpty = 1 + defaultStoragePids = + defaultCatIDs = + normalCategoryMode = + # categoryMode = see extension-configuration + debug = 0 + } +} + +# plugin.tx_camaliga._CSS_DEFAULT_STYLE ( ) + +# Icon für die Suche. +plugin.tx_kesearch_pi2.additionalPathForTypeIcons = typo3conf/ext/camaliga/ + +module.tx_camaliga < plugin.tx_camaliga \ No newline at end of file diff --git a/Documentation/Administration/Categories/Images.txt b/Documentation/Administration/Categories/Images.txt new file mode 100644 index 0000000..a71db0c --- /dev/null +++ b/Documentation/Administration/Categories/Images.txt @@ -0,0 +1,5 @@ +.. |img-17| image:: ../../Images/cat_diagram4.png +.. :align: left +.. :border: 0 +.. :name: Categories +.. :width: 100% diff --git a/Documentation/Administration/Categories/Index.rst b/Documentation/Administration/Categories/Index.rst new file mode 100644 index 0000000..4e5162a --- /dev/null +++ b/Documentation/Administration/Categories/Index.rst @@ -0,0 +1,35 @@ +.. include:: Images.txt + +.. ================================================== +.. FOR YOUR INFORMATION +.. -------------------------------------------------- +.. -*- coding: utf-8 -*- with BOM. + +.. ================================================== +.. DEFINE SOME TEXTROLES +.. -------------------------------------------------- +.. role:: underline +.. role:: typoscript(code) +.. role:: ts(typoscript) + :class: typoscript +.. role:: php(code) + + +Categories +^^^^^^^^^^ + +- This extension uses the normal TYPO3 categories. There are different ways to use this categories. + With {content.categories} you can display only the used categories. + With {content.categoriesAndParents} you can display only the used categories with their parents. + +- Furthermode you can configure this extension. This is only important, if you use more than one language. You have 2 options: + use the category-relations of the translated elements or of the original elements. + Its recommended to ignore the category-relations of the translated camaliga-elements because of a TYPO3-bug. + TYPO3 looses the relations to the translated categories when saving a translated camaliga-element. + When this bug is fixed, you can configure the extension to use the relations of the translated elements. + +|img-17| + +*Image 15: Relations of the categories* + +- You find more about categories in the chapter "User manual". \ No newline at end of file diff --git a/Documentation/Administration/Extend/Index.rst b/Documentation/Administration/Extend/Index.rst new file mode 100644 index 0000000..b57e485 --- /dev/null +++ b/Documentation/Administration/Extend/Index.rst @@ -0,0 +1,80 @@ + + +.. ================================================== +.. FOR YOUR INFORMATION +.. -------------------------------------------------- +.. -*- coding: utf-8 -*- with BOM. + +.. ================================================== +.. DEFINE SOME TEXTROLES +.. -------------------------------------------------- +.. role:: underline +.. role:: typoscript(code) +.. role:: ts(typoscript) + :class: typoscript +.. role:: php(code) + + +Extend the Camaliga tables +^^^^^^^^^^^^^^^^^^^^^^^^^^ + +- I need more fields! What can I do? + +Thats not really hard. You can use the extension extension_builder for doing that. +Please read the chapter "Extending models or map to existing tables": + +http://docs.typo3.org/typo3cms/extensions/extension_builder/Developer/ExtendingModels.html + +Write this in the field "Extend existing model class":: + + \quizpalme\Camaliga\Domain\Model\Content + +Under "Properties" you can define all your fields you will need for Camaliga. + + +Save and install the extension. You will see, that you will not see your new fields. +I do not know what the extension_builder has done, but I know how you can fix this problem. +You will need to edit /Configuration/TCA/Overrides/tx_camaliga_domain_model_content.php (former ext_tables.php) of your new extension. +Remove everything in that file and add something like this:: + + $tmp_camaliga_addon_columns = array( + 'custom4' => array( + 'exclude' => 1, + 'label' => 'LLL:EXT:camaliga_addon/Resources/Private/Language/locallang_db.xlf:tx_camaligaaddon_domain_model_content.custom4', + 'config' => array( + 'type' => 'input', + 'size' => 30, + 'eval' => 'trim' + ), + ), + ); + \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTCAcolumns('tx_camaliga_domain_model_content',$tmp_camaliga_addon_columns, 1); + \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addToAllTCAtypes('tx_camaliga_domain_model_content', '--div--;Meine Felder, custom4'); + +Replace "camaliga_addon" with the name of your extension and replace "custom4" with your new field. + +The best way: download my camaliga_addon (link at the bottom) extension and take a look into its code. +There you can see, how it works. + +Now you need to configure Camaliga. Go to the extension manager and click at Camaliga to configure the extension. You had to add your new fields in the field 'Select this extended fields too (without comma, e.g. "custom4 custom5 custom6")'. Use the space character to seperate your fields. Camaliga will make an array of that field and that fields will be selected then extra. You could select protected fields too with this method (e.g. tstamp)... + +Finally you can use your new fields in every Camaliga template file. You can use them like this:: + + {content.extended.custom4} + +Replace "custom4" with your new field name. Thats all. + + +- I want to change a field type! How can I do it? + +You need an extension with the file "Configuration/TCA/Overrides/tx_camaliga_domain_model_content.php". There you can override the TCA. +Here an example:: + + $GLOBALS['TCA']['tx_camaliga_domain_model_content']['columns']['shortdesc']['config']['rows'] = 6; + +You find another example im my extension camaliga_addon. The extension changes the field shortdesc into an RTE field. + + +- Where can I find the extension camaliga_addon? + +It's on my homepage: http://www.quizpalme.de/autor/download/myquizpoll-addons.html diff --git a/Documentation/Administration/Extended-Templates/Index.rst b/Documentation/Administration/Extended-Templates/Index.rst new file mode 100644 index 0000000..89c0bcd --- /dev/null +++ b/Documentation/Administration/Extended-Templates/Index.rst @@ -0,0 +1,77 @@ + + +.. ================================================== +.. FOR YOUR INFORMATION +.. -------------------------------------------------- +.. -*- coding: utf-8 -*- with BOM. + +.. ================================================== +.. DEFINE SOME TEXTROLES +.. -------------------------------------------------- +.. role:: underline +.. role:: typoscript(code) +.. role:: ts(typoscript) + :class: typoscript +.. role:: php(code) + + +Extended Templates +^^^^^^^^^^^^^^^^^^ + +Extended/advanced templates are templates that spend more information than the normal template. +They also offer a search option (by category and a full text search). More can be found in other chapters. +Since camaliga 5.0.0 there are now three ways to use these extended templates / functions: + +- For the list view you can select an extended template. Since the advanced list action is cached, + the search form will be sent to itself with the parameter no_cache = 1. + Admittedly, this is not an elegant solution, but a practical solution. Up to version 4.0.0, there were even more templates, + which functioned according to this principle, but which are no longer available for selection and will be completely + removed in version 6.0.0. Therefore, you should now read further. + +- The (new) extended Google Maps template will never be cached at all, which is why it does not need the parameter no_cache = 1 . + The template does not mean as before MapExtended.html but search.html. The search form is integrated there via a partial. + Anyone who does not need a caching or everyone who is not like other solutions should use the Search template. + One can certainly use it for anything. + +- The third way is: you send the search form to the search-action. + Since the search-action is not cached, you do not need to no_cache parameter at all. + But but the search.html template is needed in any case. + If you dont want to maintain two templates, you can specify a template-parameter in the search form: + +:: + + + +The hidden-parameter template is used to specify which template is to be used after the search. +This should then have the same name as the template that you use. +The advantage: you can use this way almost in any template. +Due to a TYPO3-bugs you need the Search.html template, although it is not used. +For this to work at all, you have need to enable the search. Either on the flexforms +in the tab "Extended options" or via TypoScript: + +:: + + plugin.tx_camaliga.settings.extended.enable = 1 + +A time test has incidentally revealed that it doesnt matter which option you choose. All variants are the same slow. +And so looks a finished example of the variant 3, which can be installed in almost any template: + +:: + + + +
+

{f:translate(key: 'options', default: 'Options')}

+ + + +
+
+
+ +After you have installed that in your template, you still need the Partial "Options". That one of the typo3conf folder +can be used or you can also copy it in the fileadmin folder. The path to the Partial can be set like this: + +:: + + plugin.tx_camaliga.view.partialRootPath = fileadmin/templates/Partials/ \ No newline at end of file diff --git a/Documentation/Administration/Extension-Manager/Index.rst b/Documentation/Administration/Extension-Manager/Index.rst new file mode 100644 index 0000000..4d4c3df --- /dev/null +++ b/Documentation/Administration/Extension-Manager/Index.rst @@ -0,0 +1,33 @@ + + +.. ================================================== +.. FOR YOUR INFORMATION +.. -------------------------------------------------- +.. -*- coding: utf-8 -*- with BOM. + +.. ================================================== +.. DEFINE SOME TEXTROLES +.. -------------------------------------------------- +.. role:: underline +.. role:: typoscript(code) +.. role:: ts(typoscript) + :class: typoscript +.. role:: php(code) + + +Configuration via Extension-Manager +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +At the configuration in the extension-manager you can set 4 things: + +- The category-mode. See chapter "Categories". + +- You can define new fields, which you have created. + +- You can disable all fields you don't need. + +- You can decide, if you want to use FAL-images or the /uploads/tx_camaliga folder. + Note: you need to uninstall and install the extension again, after changing this point, + because TYPO3 changes the image configuration only then. Furthermore: you can move images from /uploads to FAL + with a scheduler task. Read the chapter Administration → Scheduler-Tasks before you change a value! + The default value is to use the /uploads/tx_camaliga folder! \ No newline at end of file diff --git a/Documentation/Administration/Faq/Index.rst b/Documentation/Administration/Faq/Index.rst new file mode 100644 index 0000000..44413c6 --- /dev/null +++ b/Documentation/Administration/Faq/Index.rst @@ -0,0 +1,34 @@ + + +.. ================================================== +.. FOR YOUR INFORMATION +.. -------------------------------------------------- +.. -*- coding: utf-8 -*- with BOM. + +.. ================================================== +.. DEFINE SOME TEXTROLES +.. -------------------------------------------------- +.. role:: underline +.. role:: typoscript(code) +.. role:: ts(typoscript) + :class: typoscript +.. role:: php(code) + + +FAQ +^^^ + +- How can I change the translations text? Here an TypoScript example: + + :: + + plugin.tx_camaliga._LOCAL_LANG.de.more = Zur Website + +- How can I rename or hide some fields in the Backend? + + See chapter “Configuration / Page TSConfig”. + You can disable a lot of additional fields via the Configuration in the Extension-Manager too. + +- How can I change a field? + + See chapter “Administration / Extend the camaliga tables”. \ No newline at end of file diff --git a/Documentation/Administration/Html-templates/Index.rst b/Documentation/Administration/Html-templates/Index.rst new file mode 100644 index 0000000..4531ae6 --- /dev/null +++ b/Documentation/Administration/Html-templates/Index.rst @@ -0,0 +1,201 @@ + + +.. ================================================== +.. FOR YOUR INFORMATION +.. -------------------------------------------------- +.. -*- coding: utf-8 -*- with BOM. + +.. ================================================== +.. DEFINE SOME TEXTROLES +.. -------------------------------------------------- +.. role:: underline +.. role:: typoscript(code) +.. role:: ts(typoscript) + :class: typoscript +.. role:: php(code) + + +HTML-Templates +^^^^^^^^^^^^^^ + +- This extension comes with a lot of example HTML-templates, but in most + cases you need do download and use an external jQuery plugin for that template. You can include the JS- and CSS-files + with the cam:addPublicResources-ViewHelper (see chapter ViewHelpers). + +- The FlexForm template-list is separated in 3 sections: templates for which you do not need anything else, + templates for which you need Twitter Bootstrap and templates for which you need an external plugin. + +- Here you find a list of the templates and where you find + more informations about the used jQuery plugin. You find installation hints in every HTML file + (typo3conf/ext/camaliga/Resources/Private/Templates/Content/). + +========================= ================================================================================================================== +Template Information +========================= ================================================================================================================== +AdGallery.html Template that uses the AD Gallery plugin. + Note: you must install AD Gallery separately. + + Infos: http://adgallery.codeplex.com/documentation + + Demo: http://www.quizpalme.de/fotos/kunst/adgallery.html +Bootstrap.html Template for the Twitter Bootstrap Carousel. + + Infos: http://getbootstrap.com/javascript/#carousel + + Demo: http://www.quizpalme.de/fotos/kunst/bootstrap-kunst.html +Carousel.html A carousel that uses the Camaliga-plugin. Default template. + Note: all item-settings affect only here. + + Demo: http://www.quizpalme.de/fotos/externe-fotos.html +CarouselSeparated.html A template with 2 separated carousels that uses the Camaliga-plugin. +Collapse.html Template for Twitter Bootstrap Collapse/Accordion. + + Infos: http://getbootstrap.com/javascript/#collapse + + Demo: http://www.quizpalme.de/reiseberichte/reiseempfehlungen/berge.html +Coolcarousel.html Template that uses the Coolcarousel plugin. + Note: you must install Coolcarousel separately. + + Infos: http://coolcarousels.frebsite.nl/c/66/ + + Demo: http://www.quizpalme.de/fotos/kunst/coolcarousel-ansicht.html +Ekko.html Template that uses the Bootstrap-Ekko-Lightbox. Not: you must install Ekko separately. + Runs only, if you set settings.more.setModulo=1 + + Infos: http://www.jqueryscript.net/lightbox/Simple-Gallery-Lightbox-Plugin-with-jQuery-Bootstrap-Ekko-Lightbox.html +Elastislide.html Template that uses the Elastislide plugin. + Note: you must install Elastislide separately. + + Infos: http://tympanus.net/codrops/2011/09/12/elastislide-responsive-carousel/ + + Demo: http://www.quizpalme.de/fotos/kunst/elastislide-kunst.html +FancyBox.html Template that uses only the FancyBox plugin. + Note: you must install FancyBox separately. + + Infos: http://fancyapps.com/fancybox/ + + Demo: http://www.quizpalme.de/reiseberichte/malta-2014/gozo.html +Flexslider2.html Template that uses the FlexSlider 2 plugin. + Note: you must install Flexslider 2 separately. + + Infos: http://flexslider.woothemes.com/thumbnail-slider.html + + Demo: http://www.quizpalme.de/fotos/kunst/flexslider-kunst.html +Flipster.html Template that uses the jQuery.Flipster plugin. + Note: you must install Flexslider 2 separately. + + Infos: https://github.com/drien/jquery-flipster + + Demo: http://www.quizpalme.de/fotos/externe-fotos/flipster.html +FractionSlider.html Deprecated: use the extension fp_fractionslider instead. + Template that uses the FractionSlider-Plugin. + Note: you must install FractionSlider separat separately. + + Infos: http://jacksbox.de/fractionslider-demos/background-animation/ +Fullwidth.html Template that uses the "jQuery Full Width Image Slider" plugin. + Note: you must install "jQuery Full Width Image Slider" separately. + + Infos: https://github.com/JoeBonham/jQuery-Full-Width-Image-Slider +GalleryView.html Template that uses the GalleryView plugin. + Note: you must install GalleryView separately. + + Infos: https://github.com/jackwanders/GalleryView + + Demo: http://www.quizpalme.de/fotos/jugendstil.html +Innerfade.html Template that uses the Innerfade plugin. + Note: you must install Innerfade separately. + + Infos: http://medienfreunde.com/lab/innerfade/ + + Demo: http://www.quizpalme.de/fotos/externe-fotos/innerfade.html +Isotope.html Template that uses the Isotope plugin. + Note: you must install Isotope separately. + + Infos: http://isotope.metafizzy.co/ + + Demo: http://www.quizpalme.de/autor.html +Lightslider.html Template that uses the lightSlider plugin. + Note: you must install jQuery lightSlider separately. + + Infos: http://sachinchoolur.github.io/lightslider/index.html + + Demo: http://www.quizpalme.de/fotos/externe-fotos/lightslider.html +List.html List view. +ListExtended.html List view with more fields. + + Demo: http://www.quizpalme.de/astronomische-uhren/liste-astronomischer-uhren.html +Map.html A google map. + + Demo: http://www.quizpalme.de/astronomische-uhren/astro-karte.html +Modal.html Template for Twitter Bootstrap Modal. Use the field custom1 for the modal-button. + + Infos: http://getbootstrap.com/javascript/#modals + + Demo: http://www.quizpalme.de/reiseberichte/reiseempfehlungen/alle-empfehlungen.html +Owl2.html Template that uses the responsive Owl2 plugin. + Note: you must install OWL2 separately. + + Infos: https://owlcarousel2.github.io/OwlCarousel2/ + + Demo: http://www.quizpalme.de/fotos/externe-fotos/owl2.html +Parallax.html Template that uses "Simple Parallax Scrolling". + Note 1: you must install Simple Parallax Scrolling separately. + Note 2: you need to set settings.img.with,.height,.thumbHeight and settings.more.speed. + + Infos: http://pixelcog.github.io/parallax.js/ + + Demo: http://www.quizpalme.de/ +Random.html Shows a random element. Not cached. +Responsive.html A simple responsive template. + + Demo: http://www.quizpalme.de/fotos/externe-fotos/responsive.html +ResponsiveCarousel.html Template that uses the responsiveCarousel plugin. + Note: you must install responsiveCarousel separately. + + Infos: http://basilio.github.io/responsiveCarousel/ +Revolution.html Deprecated: use the extension fp_fractionslider instead. + Template that uses the famous Revolution Slider. + Note: you must install the Revolution Slider separately. + + Infos: https://codecanyon.net/item/slider-revolution-responsive-jquery-plugin/2580848 +Roundabout.html Template that uses the Roundabout plugin. + Note: you must install Roundabout separately. + + Infos: http://fredhq.com/projects/roundabout/ + + Demo: http://www.quizpalme.de/fotos/externe-fotos/roundabout.html +Scrollable.html Template that uses the jQuery TOOLS Scrollable plugin. + Note: you must install jQuery TOOLS Scrollable separately. + + Infos: http://jquerytools.org/demos/scrollable/index.html + + Demo: http://www.quizpalme.de/astronomische-uhren/sonnenuhren.html +Search.html An advanced/extended template with all features! It contains a proximity search. + You need the opengeodb-tables for this template. Not cached. + The action of this template will be used for every search. You will need it, + if you enable the search/extended version! +Sgallery.html Template that uses the S Gallery plugin. + Note: you must install S Gallery separately. + + Infos: http://sarasoueidan.com/blog/s-gallery/ + + Demo: http://www.quizpalme.de/fotos/kunst/sgallery.html +Show.html Single view. +ShowExtended.html Single view with more fields. + + Demo: http://www.quizpalme.de/astronomische-uhren/astronomische-uhr/camaliga/showExtended/Content/45.html +Skdslider.html Template that uses the SKDslider plugin. + Note: you must install SKDslider separately. + + Infos: http://dandywebsolution.com/skdslider/ +Slick.html Template that uses the slick carousel plugin. + Note: you must install slick separately. + + Infos: http://kenwheeler.github.io/slick/ + + Demo: http://www.quizpalme.de/reiseberichte/wanderungen/rheinsteig/tour1.html +Tab.html Template that uses the Bootstrap 3 Tabs. + + Demo: http://www.quizpalme.de/autor/reiseziele.html +Test.html Only for tests... +========================= ================================================================================================================== \ No newline at end of file diff --git a/Documentation/Administration/Index.rst b/Documentation/Administration/Index.rst new file mode 100644 index 0000000..344c831 --- /dev/null +++ b/Documentation/Administration/Index.rst @@ -0,0 +1,68 @@ + + +.. ================================================== +.. FOR YOUR INFORMATION +.. -------------------------------------------------- +.. -*- coding: utf-8 -*- with BOM. + +.. ================================================== +.. DEFINE SOME TEXTROLES +.. -------------------------------------------------- +.. role:: underline +.. role:: typoscript(code) +.. role:: ts(typoscript) + :class: typoscript +.. role:: php(code) + + +Administration +-------------- + +- After you decided which layout template you want to use, you should customize that HTML-template and the CSS-file. + +- Copy this 2 folders into a folder in your fileadmin-folder: + +:: + + typo3conf/ext/camaliga/Resources/Private/Templates/Content + typo3conf/ext/camaliga/Resources/Public/css + +- If you select e.g. the folder fileadmin/ext/camaliga, then set the + path to that folder with TypoScript-Constants: + +:: + + plugin.tx_camaliga.view.templateRootPath = fileadmin/ext/camaliga/ + +- Or with TypoScript-Setup: + +:: + + plugin.tx_camaliga.view.templateRootPaths.1 = fileadmin/ext/camaliga/ + +- Note: the folder “Content” must be in that specified folder. + +- Now you can edit the HTML-template-file. Which one? Its not hard to + find the right one. If the template includes JS- or CSS-files, copy + them to your fileadmin-folder and import them via TypoScript. They are + included in the template only for the demonstration purpose. Remove + them then from the template.Note: you find more information about each + template at the beginning of a template and in the chapter tutorial. + + +.. toctree:: + :maxdepth: 5 + :titlesonly: + :glob: + + Extension-Manager/Index + Html-templates/Index + Extended-Templates/Index + Umkreissuche/Index + TemplateVariables/Index + ViewHelper/Index + Categories/Index + TheBackendModule/Index + Scheduler/Index + Extend/Index + Faq/Index diff --git a/Documentation/Administration/Scheduler/Index.rst b/Documentation/Administration/Scheduler/Index.rst new file mode 100644 index 0000000..f3da203 --- /dev/null +++ b/Documentation/Administration/Scheduler/Index.rst @@ -0,0 +1,39 @@ + + +.. ================================================== +.. FOR YOUR INFORMATION +.. -------------------------------------------------- +.. -*- coding: utf-8 -*- with BOM. + +.. ================================================== +.. DEFINE SOME TEXTROLES +.. -------------------------------------------------- +.. role:: underline +.. role:: typoscript(code) +.. role:: ts(typoscript) + :class: typoscript +.. role:: php(code) + + +Scheduler-Tasks +^^^^^^^^^^^^^^^ + +- There are 3 Scheduler Tasks: import and export CSV files. You can configure many things in both tasks. + The third task can move images from the /uploads/tx_camaliga-folder to FAL. + Please make a backup of the camaliga-table and your uploads-images before you switch to FAL! + After you have switched all yout images to FAL, you need to tell Camaliga that it should use the FAL images. + Go to the extension manager and configure camaliga there. Click at the checkbox "Use images from FAL instead of images from uploads/". + Now you must uninstall and install camaliga again. + +- Finally you must change your customised templates! Merge it with the templates from the typo3conf-folder. + Old example:: + + + + + +- New example:: + + + + \ No newline at end of file diff --git a/Documentation/Administration/TemplateVariables/Index.rst b/Documentation/Administration/TemplateVariables/Index.rst new file mode 100644 index 0000000..b6fbc5b --- /dev/null +++ b/Documentation/Administration/TemplateVariables/Index.rst @@ -0,0 +1,112 @@ + + +.. ================================================== +.. FOR YOUR INFORMATION +.. -------------------------------------------------- +.. -*- coding: utf-8 -*- with BOM. + +.. ================================================== +.. DEFINE SOME TEXTROLES +.. -------------------------------------------------- +.. role:: underline +.. role:: typoscript(code) +.. role:: ts(typoscript) + :class: typoscript +.. role:: php(code) + + +Template variables +^^^^^^^^^^^^^^^^^^ + +- You can use some variables in the Fluid template. You find an + explanation here. First you find the variables available in the normal + templates, then those you can use additional in the extended templates. + +========================= ============================================================================================ +Variable Description (examples in List.html and Show.html) +========================= ============================================================================================ +fal Use images from FAL (1) or from the folder uploads/camaliga (0)? +lang UID of the language. +uid UID of the plugin (content element ID). +pid PID des Plugin (Seiten-ID). +storagePIDsArray Array with this storage PIDs. +storagePIDsComma Comma separated list of the storage PIDs. +contents Array with the camaliga-elements. The array containes this variables: + + title, shortdesc, longdesc, link, image, image2, caption2, image3, caption3, + image4, caption4, image5, caption5, street, zip, city, country, + latitude, longitude, person, phone, mobile, email, custom1, custom2, custom3, categories. + + Further very important for JavaScript: titleNl2br, shortdescNl2br, longdescNl2br and + streetNl2br. + + The links are stored in the TypoLink format. Therefore there are some more variables available. + linkResolved now contains the path to a file, rather than file: 123 (as link). + Of course, this should be normal for other link types, but it is not at the moment. + But there is the variable links, which is an array. It helps you if you want to save more + than one link or if you want to know the type of the link. + The avaiable array-keys: link and type. type is 0: no link; 1: internal link; + 2: external link; 3: file; 4: email-address. + You will find an example after this tables. You can use it, if you don´t want to use + f:link.typolink. For f:link.typolink you must specify everything when you set the link. + + And if you extend the Camaliga table: extended. + This is an array with the extended fields. +settings See TypoScript settings. +onlySearchForm Indicates if only the search form should be shown. +paddingItemWidth Item width + 2\*padding. +totalItemWidth Item width + 2\*padding + 2\*margin. +itemWidth Depends on "addPadding": item with OR paddingItemWidth. +totalWidth n \* totalItemWidth. +paddingItemHeight Item hight + 2\*padding. +totalItemHeight Item hight + 2\*padding + 2\*margin. +itemHeight Depends on "addPadding": item hight OR paddingItemHight. +========================= ============================================================================================ + + +- Use an extended template only if you need this additional variables: + +============================= =========================================================== +Variable Description (examples in ListExtended.html) +============================= =========================================================== +sortBy\_selected Argument sortBy. +sortOrder\_selected Argument sortOrder. +start Argument start. +defaultCatIDs Settings.defaulCatIDs. +storagePIDsData Array with the storage PIDs and the information about which are selected. +all_categories Array of all categories. +categories Array of all used categories and their parent category. +contents.categoriesAndParents Array of all used categories and their parent category. +sword Fulltext search word. +place Place search word. +radius Selected radius. +radiusArray Avaiable radius values. +rsearch Indicates if the proximity search is active. +============================= =========================================================== + + +- When you set settings.more.setModulo = 1, there are set this variables too (depends on settings.item.items): + +=============================== ========================================================================================== +Variable Description (example in Ekko.html) +=============================== ========================================================================================== +contents.moduloBegin >0 after every settings.item.items element. 0 otherwise. Begins at the 1. element. +contents.moduloEnd >0 after every settings.item.items element. 0 otherwise. Begins at the \[items\] element. +=============================== ========================================================================================== + + +Here an example, if you don´t want to use f:link.typolink: + +:: + + + + {f:translate(key: 'more')} + + + {f:translate(key: 'more')} + {f:translate(key: 'more')} + + + + \ No newline at end of file diff --git a/Documentation/Administration/TheBackendModule/Images.txt b/Documentation/Administration/TheBackendModule/Images.txt new file mode 100644 index 0000000..2ccd38c --- /dev/null +++ b/Documentation/Administration/TheBackendModule/Images.txt @@ -0,0 +1,5 @@ +.. |img-18| image:: ../../Images/backend_sortierung.jpg +.. :align: left +.. :border: 0 +.. :name: Backend +.. :width: 100% diff --git a/Documentation/Administration/TheBackendModule/Index.rst b/Documentation/Administration/TheBackendModule/Index.rst new file mode 100644 index 0000000..4553eda --- /dev/null +++ b/Documentation/Administration/TheBackendModule/Index.rst @@ -0,0 +1,27 @@ +.. include:: Images.txt + +.. ================================================== +.. FOR YOUR INFORMATION +.. -------------------------------------------------- +.. -*- coding: utf-8 -*- with BOM. + +.. ================================================== +.. DEFINE SOME TEXTROLES +.. -------------------------------------------------- +.. role:: underline +.. role:: typoscript(code) +.. role:: ts(typoscript) + :class: typoscript +.. role:: php(code) + + +The backend module +^^^^^^^^^^^^^^^^^^ + +- The Camaliga backend module has 3 features: list of the Camaliga elements, sortable thumbnail overview and import. + You can import entries from other tables. + Currently you can import entries from this extensions: karussell and tt\_news. + +|img-18| + +*Image 16a: one of the backend forms* diff --git a/Documentation/Administration/Umkreissuche/Index.rst b/Documentation/Administration/Umkreissuche/Index.rst new file mode 100644 index 0000000..e2618ab --- /dev/null +++ b/Documentation/Administration/Umkreissuche/Index.rst @@ -0,0 +1,77 @@ + + +.. ================================================== +.. FOR YOUR INFORMATION +.. -------------------------------------------------- +.. -*- coding: utf-8 -*- with BOM. + +.. ================================================== +.. DEFINE SOME TEXTROLES +.. -------------------------------------------------- +.. role:: underline +.. role:: typoscript(code) +.. role:: ts(typoscript) + :class: typoscript +.. role:: php(code) + + +Proximity search +^^^^^^^^^^^^^^^^ + +The most extensive example template represents a radius search. +For the proximity search you, however, still needs more tables. +Provided is only a table, but we need to generate it from several other tables. +This are the OpenGeoDB tables. The documentation for OpenGeoDB can be found here: + +http://opengeodb.org/wiki/OpenGeoDB_Dokumentation + +The required tables can be found here: + +http://www.fa-technik.adfc.de/code/opengeodb/ + +These 4 tables are required: opengeodb-begin.sql, opengeodb-end.sql, opengeodb_hier.sql +and one of the country tables, for example, DE.sql. Warning 2/4 tables are huge in size. One can probably only +import them error-free on the mysql console. With these 4 tables you must produce another table. +You will find all instructions here `here +`_. + +Anyway, you have to run after import the following SQL statements (replace "de" by your country code):: + + CREATE TABLE `geodb_zip_coordinates` ( + zc_id INT NOT NULL auto_increment PRIMARY KEY, + zc_loc_id INT NOT NULL , + zc_zip VARCHAR( 10 ) NOT NULL , + zc_location_name VARCHAR( 255 ) NOT NULL , + zc_lat DOUBLE NOT NULL , + zc_lon DOUBLE NOT NULL + ) + +and:: + + INSERT INTO geodb_zip_coordinates (zc_loc_id, zc_zip, zc_location_name, zc_lat, zc_lon) + SELECT gl.loc_id, plz.text_val, name.text_val, coord.lat, coord.lon + FROM geodb_textdata plz + LEFT JOIN geodb_textdata name ON plz.loc_id = name.loc_id + LEFT JOIN geodb_locations gl ON plz.loc_id = gl.loc_id + LEFT JOIN geodb_hierarchies tier ON plz.loc_id = tier.loc_id + LEFT JOIN geodb_coordinates coord ON plz.loc_id = coord.loc_id + WHERE plz.text_type = 500300000 + AND name.text_type = 500100000 + AND tier.id_lvl1 = 104 + AND tier.id_lvl2 = 105 + AND name.text_locale = "de" + AND gl.loc_type IN ( 100600000, 100700000 ); + +That's it. Note: the table must be renamed to geodb_zip_coordinates and not only zip_coordinates! +The new table is just 1MB in size and can be easily exported and imported. +In a pinch, you can create thus tables on a local server and then export them. +The other GeoDB tables are no longer needed and can be deleted! + +Once you have created the table, you can use it as follows: + +- First you need tu turn on the extended version. More can be found in the previous chapter. + +- Then you have to specify what radius values are available for selection. + +Who wants to know what it looks like, will find the link to an example in the chapter "Administration / HTML templates" +the template Map.html. \ No newline at end of file diff --git a/Documentation/Administration/ViewHelper/Index.rst b/Documentation/Administration/ViewHelper/Index.rst new file mode 100644 index 0000000..55ae0ae --- /dev/null +++ b/Documentation/Administration/ViewHelper/Index.rst @@ -0,0 +1,49 @@ + + +.. ================================================== +.. FOR YOUR INFORMATION +.. -------------------------------------------------- +.. -*- coding: utf-8 -*- with BOM. + +.. ================================================== +.. DEFINE SOME TEXTROLES +.. -------------------------------------------------- +.. role:: underline +.. role:: typoscript(code) +.. role:: ts(typoscript) + :class: typoscript +.. role:: php(code) + + +ViewHelpers +^^^^^^^^^^^ + +- Camaliga comes with two ViewHelpers: one for the camaliga content and one to include JS- or CSS-files. + +- The ViewHelper for the camaliga content can be used at single pages. Why? + If you want to display camaliga-content on different places on your page, you can use this ViewHelper in your + page-template to display some informations. You can use it like this in your page-template:: + + {namespace cam=Quizpalme\Camaliga\ViewHelpers} + + And later on:: + + + + You can use this variables in the param-parameter: + camaliga_title, camaliga_shortdesc, camaliga_link, camaliga_image, camaliga_street, camaliga_zip, camaliga_city, camaliga_country, + camaliga_phone, camaliga_mobile, camaliga_email, camaliga_latitude, camaliga_longitude, camaliga_custom1, camaliga_custom_2, camaliga_custom3. + +- The second ViewHelper can be used similar. First set the namespace at the top of the template. + Then use the ViewHelper to include JS- oder CSS-files like this:: + + + + + This is an example of the template Carousel.html. Use see, which parameters can be set. + The ViewHelper indicates the files on the file-ending .css or .js. Second example with all parameters:: + + + + + addSlah-parameter: add a slash at the beginn of the path? \ No newline at end of file diff --git a/Documentation/Changelog/Index.rst b/Documentation/Changelog/Index.rst new file mode 100644 index 0000000..aa1f5f0 --- /dev/null +++ b/Documentation/Changelog/Index.rst @@ -0,0 +1,172 @@ +.. ================================================== +.. FOR YOUR INFORMATION +.. -------------------------------------------------- +.. -*- coding: utf-8 -*- with BOM. + +.. ================================================== +.. DEFINE SOME TEXTROLES +.. -------------------------------------------------- +.. role:: underline +.. role:: typoscript(code) +.. role:: ts(typoscript) + :class: typoscript +.. role:: php(code) + + +ChangeLog +--------- + +- Here you find all the changes through the versions. + +========== ============================================================================================================================ +Version Changes +========== ============================================================================================================================ +0.1.0 Initial upload to TER. +0.1.2 Google PicasaWeb-Import and FancyBox-Template added. Documentation updated. +1.0.0 More TypoScript- and FlexForms-Settings. Carousel-Example updated. +1.1.0 More examples added. Karussell-Import improoved. +1.2.0 Major bug fixed: wrong path to the templates. More examples added. +1.2.1 Test of the new ReST documentation. +1.2.3 Documentation updated. sxw-documentation removed. Category list sorted. +1.3.0 S Gallery and jQuery.Flipster template added. + Template Carousel.html improved. + More size variables added. + Bug fixed: you can use the 0 in the FlexForms too. +1.4.0 Update-script added. Execute it, if you have used the categories in Typo3 6.0 or + 6.1, after updating to Typo3 6.2. + Categories to FlexForms added. +2.0.0 Category localisation. categoryMode to the configuration added. + {content.categories} renamed to {content.categoriesAndParents}. The first one shows you another list now! + See chapter Administration/Categories. + + Template-Layouts added: you can use now more layouts in one template (see chapter Page TSconfig). + + 3 new fields: phone, mobile and email. + + 3 new HTML-Templates (SKDslider, OWL carousel 2, Responsive Carousel). + + Hooks for the extensions linkvalidator and ke_search added. +3.0.0 The category selection works now with all examples and not only with the extended ones. + + 8 new fields for the single view: images and their caption. + + Folder-image added. + + Mostly all examples modified (only improvements, e.g. for Bootstrap 3). + + Successfully tested with Typo3 7.0 and the extension compatibility6. Requirements set to Typo3 6.2.2 +3.1.0 Template Tab.html (for Bootstrap) and Lightslider.html added. + + Option added: automatic search for Latitude and Longitude. + + Posibility to extend the Camaliga-table-fields. + + Typo3 7 compatibility increased (does still not work with Typo3 7.1). +3.2.0 Bug fixed: tt_news import. + Typo3 7 compatibility increased. + + New backend form: sortable thumbnail overview. + + New templates: Isotope, jQuery Full Width Image Slider, Coolcarousel. +4.0.0 Template-list in the FlexForms rearrenged. Demo-link to the templates added in this documentation. + + New FlexForms for Bootstrap components. + + New templates: slick carousel, Bootstrap Collapse/Accordion, Bootstrap Modal. + + ke_search-Indexer renamed. + + Several improvements (e.g. category-search in the normal templates). +5.0.0 Extended templates can be enabled now by an option. See chapter "Updating to camaliga 5.0.0". + + 3 templates are now deprecated. See chapter "Updating to camaliga 5.0.0". + + Brand new: full-text search and proximity search. + + New backend modules: CSV-Import and mv_cooking-Import. + + New options: sort after crdate, settings.limit, settings.extended.* + + New templates: search (see chapter "Administration / Extended templates"). + + ke_search-indexer renamed! + + Bug fixed: sorting of categories at normal templates. +6.0.0 Camaliga is now TYPO3 7 LTS compatible: + + - Vendor name changed. You need to flush the general cache. + - old methods replaced. + - path to the templates changed: please read the chapter Configuration/TypoScript reference and Updating to camaliga 6.0.0. + + Sheduler-task for CSV export added. + + Deprecated actions and templates removed: galleryviewExtended, adGalleryExtended and mapExtended. +6.0.3 TCA-problem with TYPO3 7 fixed (maybe you need to flush the general cache). + + double7-validator fixed. + + TS settings.googleMapsKey added. +6.0.6 TYPO3 7 bugfix. + + TS added: settings.maps.key, zoom, startLatitude and startLongitude. googleMapsKey removed. +6.1.0 Template Parallax added. + + Update-Script for camaliga-version 6.0.0 added. + + TYPO3 7 related bugfix again. New icon. +6.2.0 TypoScript and FlexForm settings added: settings.more.* Added variables: {contents.moduloBegin}, {contents.moduloEnd}. + + Added templates: Ekko. + + Modified templates: AdGallery, Flexslider2, Galleryview, Parallax, Slick. + Some of this templates can now be controller by TypoScript or FlexForms too. + + 3 templates are now deprecated: AdGalleryFancyBox, GalleryviewFancyBox, OwlSimpleModal. See chapter "Administration/HTML-Templates". + + Bugfix: validation error? +6.3.0 2 ViewHelpers added: content- and addPublicResources-ViewHelper. See chapter Administration/ViewHelper. + + The additional extension camaliga_addon is now available. See chapter Administration/Extend the Camaliga tables. + + Bugfix: minor things. +6.3.1 Bugfix: minor things. +6.4.0 Template Revolution-Slider and FractionSlider added. + + Additional fields can now be disabled in the Extension-Manager. + + Fulltextsearch searches now in custom1 too. + + Some small improvments. +7.0.0 TYPO3 6.2 compatibility removed. + + Templates AdGalleryFancyBox, GalleryviewFancyBox and OwlSimpleModal removed. + + TS seo.*, maps.language, maps.dontIncludeAPI and maps.includeRoute added. + + Partial for route planner added. + + The CSV-import moved to the Scheduler. + + The PicasaWeb-Import removed. + + New db-field: contact-person. More disable-options in the extension-configuration-manager. + + New variable in the templates avaiable: {content.links} +7.1.0 Setting extended.saveSearch added. + TYPO3 8.7 compatibility added. Note: there is still no way to parse links from TYPO3 8. +7.1.6 Some minor bugs fixed. Some changes in the documentation. +8.0.0 Support for FAL images added. FAL images can be enabled at the configuration in the extension manager. + + All templates updated. E.g. links switched to f:link.typolink. + + The Owl template removed. Use the Owl2 template instead! + + mv_cooking import removed. +8.0.1 Bugs fixed: getImgConfig and tx_camaliga_double7 removed. +8.0.2 Update-script for wrong FAL relations. Please run the update-script in the extension manager if you use FAL. +8.1.0 Scheduler task added: you can now convert uploads-images to FAL-images! Read the chapter Administration → Scheduler-Tasks. + + Layout Backend7.html replaced with Backend.html. + + tx_camaliga_double7 completely removed, because TYPO3 has sometimes a cache-problem with it. +========== ============================================================================================================================ diff --git a/Documentation/Configuration/Carousel-configuration/Index.rst b/Documentation/Configuration/Carousel-configuration/Index.rst new file mode 100644 index 0000000..40175e5 --- /dev/null +++ b/Documentation/Configuration/Carousel-configuration/Index.rst @@ -0,0 +1,82 @@ + + +.. ================================================== +.. FOR YOUR INFORMATION +.. -------------------------------------------------- +.. -*- coding: utf-8 -*- with BOM. + +.. ================================================== +.. DEFINE SOME TEXTROLES +.. -------------------------------------------------- +.. role:: underline +.. role:: typoscript(code) +.. role:: ts(typoscript) + :class: typoscript +.. role:: php(code) + + +Carousel-Configuration +^^^^^^^^^^^^^^^^^^^^^^ + +- This extension comes with its own jQuery carousel plugin. All other + jQuery-Plugins must be downloaded and copied into the fileadmin- + folder. The onboard plugin is a basic carousel with some options. I + will describe them here. You can use the jQuery-plugin twice if you + wand to animate the image and text separated. The + CarouselSeparated.html templates does that. “.camaliga” must be + specified for each ul-element with the li-elements of Camaliga. + +===================== =========== ========================================================== =========== +Property Data type Description Default +===================== =========== ========================================================== =========== +auto\_slide boolean 0: no. 0 + + 1: yes, automatic sliding. +hover\_pause boolean 0: no. 0 + + 1: yes, pause the automatic sliding on mouse hover. +auto\_slide\_seconds int Automatic sliding after … milliseconds. 7500 +infinitive boolean 0: no. 0 + + 1: yes, but you need in this case at least n+2 elements + (n: number of visible elements)! +item\_width int Width of an element: width + padding + margin. 0 + You must specify this only if the padding or margin of + the li-element is >0. Otherwise the plugin calculates + the width automatic. +li\_name string Normally the plugin gets all li-elements of the specified li + ul-element. If you have other ul-elements in your + li-element, you must use a class for the li-elements with + the camaliga-elements and you must tell the plugin the + name of that class. +left\_scroll string Class or ID of the DIV element with the left scroll arrow. + This is needed if infinitive is 0 and if you want to + display an inactive arrow on the beginning of the + carousel. The plugin adds the class “camaliga\_first” to + this div if the first element is shown left. +right\_scroll string Class or ID of the DIV element with the right scroll + arrow. This is needed if infinitive is 0 and if you want + to display an inactive arrow on the end of the carousel. + The plugin adds the class “camaliga\_last” to this div if + the last element is shown right. +===================== =========== ========================================================== =========== + + +Example +~~~~~~~ + +Here an example with some settings: + +:: + + $('#carousel_ul').camaliga({ + auto_slide: 0, + hover_pause: 0, + auto_slide_seconds: 5000, + infinite: 0, + item_width: 215, + li_name: 'li.carousel_li', + left_scroll: '#left_scroll', + right_scroll: '#right_scroll' + }); + diff --git a/Documentation/Configuration/Faq/Index.rst b/Documentation/Configuration/Faq/Index.rst new file mode 100644 index 0000000..9884a42 --- /dev/null +++ b/Documentation/Configuration/Faq/Index.rst @@ -0,0 +1,36 @@ + + +.. ================================================== +.. FOR YOUR INFORMATION +.. -------------------------------------------------- +.. -*- coding: utf-8 -*- with BOM. + +.. ================================================== +.. DEFINE SOME TEXTROLES +.. -------------------------------------------------- +.. role:: underline +.. role:: typoscript(code) +.. role:: ts(typoscript) + :class: typoscript +.. role:: php(code) + + +FAQ +^^^ + +- I need more options/settings! What can I do? + + You can define your own settings via TypoScript and you can use them in your templates! Here an example: + +TypoScript: + +:: + + plugin.tx_camaliga.settings.myvar = 'showall' + +HTML-Template / JavaScript: + +:: + + var myvar = {settings.myvar}; + diff --git a/Documentation/Configuration/Index.rst b/Documentation/Configuration/Index.rst new file mode 100644 index 0000000..9d51c28 --- /dev/null +++ b/Documentation/Configuration/Index.rst @@ -0,0 +1,35 @@ + + +.. ================================================== +.. FOR YOUR INFORMATION +.. -------------------------------------------------- +.. -*- coding: utf-8 -*- with BOM. + +.. ================================================== +.. DEFINE SOME TEXTROLES +.. -------------------------------------------------- +.. role:: underline +.. role:: typoscript(code) +.. role:: ts(typoscript) + :class: typoscript +.. role:: php(code) + + +Configuration +------------- + +- Here you find the TypoScript reference and the configuration for the carousel. + + +.. toctree:: + :maxdepth: 5 + :titlesonly: + :glob: + + Typoscript-reference/Index + Carousel-configuration/Index + PageTSconfig/Index + Verlinkung/Index + realurl/Index + Faq/Index + diff --git a/Documentation/Configuration/PageTSconfig/Images.txt b/Documentation/Configuration/PageTSconfig/Images.txt new file mode 100644 index 0000000..1bd46fe --- /dev/null +++ b/Documentation/Configuration/PageTSconfig/Images.txt @@ -0,0 +1,6 @@ +.. |img-19| image:: ../../Images/camaliga_tsconfig.png +.. :align: left +.. :border: 0 +.. :name: Grafik16 +.. :width: 100% + diff --git a/Documentation/Configuration/PageTSconfig/Index.rst b/Documentation/Configuration/PageTSconfig/Index.rst new file mode 100644 index 0000000..3389d4d --- /dev/null +++ b/Documentation/Configuration/PageTSconfig/Index.rst @@ -0,0 +1,68 @@ +.. include:: Images.txt + +.. ================================================== +.. FOR YOUR INFORMATION +.. -------------------------------------------------- +.. -*- coding: utf-8 -*- with BOM. + +.. ================================================== +.. DEFINE SOME TEXTROLES +.. -------------------------------------------------- +.. role:: underline +.. role:: typoscript(code) +.. role:: ts(typoscript) + :class: typoscript +.. role:: php(code) + + +Page TSconfig +^^^^^^^^^^^^^ + +- You can use the Page TSconfig to define some template layouts. + +Example +~~~~~~~ + +Here an example with 3 layouts for your templates: + +:: + + tx_camaliga.templateLayouts { + 0 = Standard-Layout + 1 = Layout for the left column + 2 = Layout for the right column + } + + +- You can use every number and description for the layouts. +- Now you can select a layout in the FlexForm of every page. +- Finally you can use now different layouts in your templates. + +Example +~~~~~~~ + +Here an example for a template (extract) with 2 layouts: + +:: + + + + + + +

Phone: {content.phone}
+ Mobile: {content.mobile}
+ Email: {content.email}

+
+
+ +- Furthermore you can use TSconfig to rename or hide camaliga-fields. Here two important examples: + +:: + + TCEFORM.tx_camaliga_domain_model_content.custom2.disabled = 1 + TCEFORM.tx_camaliga_domain_model_content.custom1.label = Date: + +|img-19| + +*Image 17: You find this on the Ressources tab of a page* \ No newline at end of file diff --git a/Documentation/Configuration/Typoscript-reference/Index.rst b/Documentation/Configuration/Typoscript-reference/Index.rst new file mode 100644 index 0000000..8e990b9 --- /dev/null +++ b/Documentation/Configuration/Typoscript-reference/Index.rst @@ -0,0 +1,187 @@ + + +.. ================================================== +.. FOR YOUR INFORMATION +.. -------------------------------------------------- +.. -*- coding: utf-8 -*- with BOM. + +.. ================================================== +.. DEFINE SOME TEXTROLES +.. -------------------------------------------------- +.. role:: underline +.. role:: typoscript(code) +.. role:: ts(typoscript) + :class: typoscript +.. role:: php(code) + + +TypoScript-Reference +^^^^^^^^^^^^^^^^^^^^ + +- Here you can make some settings. + +======================================== ============= ================================================================================= =========== +Property Data type Description Default +======================================== ============= ================================================================================= =========== +view.templateRootPaths.0 & .1 string Path to the main template. EXT:... + + **Example:** + + :: + + plugin.tx_camaliga.view.templateRootPaths.1 = fileadmin/template/files/ +view.partialRootPaths.0 & .1 string Path to the partials of the template. EXT:... +view.layoutRootPaths.0 & .1 string Path to the layout template. EXT:... +persistence.storagePid int Storage PID of the Camaliga elements. Can be defined by the plugin too. +features.rewrittenPropertyMapper boolean Use the rewritten property mapper? 1 +settings.defaultStoragePids String / int Comma seperated list of storage pids. This must be a subset of the + storagePids. Makes only sense if you use an extended template. + + **Syntax:** + + :: + + [pid1],[pid2],[pid3] + + **Example:** + + :: + + plugin.tx_camaliga.settings.defaultStoragePids = 354,349 +settings.defaultCatIDs String / int Default categories. Only elements with this category will be shown. + Can be changed in extended templates by the user. + + **Syntax:** + + :: + + [cat1],[cat2],[cat3] + + **Example:** + + :: + + plugin.tx_camaliga.settings.defaultCatIDs = 2,3 +settings.listId int ID of the list page. +settings.showId int ID of the single page. +settings.sortBy string Sort by? sorting + + **Syntax:** + + :: + + sorting|crdate|tstamp|title|zip|city|country|custom1|custom2|custom3 +settings.sortOrder string Order by? asc + + **Syntax:** + + :: + + asc|desc +settings.limit integer Number of elements to show (in list view). An SQL-parameter. 0=all. 0 +settings.random boolean Shuffle elements (random order, cached)? 0 + + 0: no. + + 1: yes, shuffle the elements every time the cache is cleared. +settings.getLatLon boolean Try to get the latitude and longitude from a google server 0 + for every entry with an address but no latitude? + + 0: no. + + 1: yes, search the position in the carousel, list or map template. +settings.onlyDistinct boolean Show only distinct entries? 0 + + 0: no. + + 1: yes, show only the parent element when there are childs available or show a + child when there is no parent available. +settings.normalCategoryMode string At normal templates: how to use the categories for a search? and + + and: and-mode. + + or: or-mode. +overrideFlexformSettingsIfEmpty boolean Override FlexForm settings with TypoScript settings if the FlexForm 1 + settings are empty? + + 0: no. + + 1: yes (works good, except for checkboxes). +settings.img.width int Width of the images. Can be used in the template. 700 +settings.img.height int Height of the images. Can be used in the template. 500 +settings.img.thumbWidth int Thumbnail width of the images. Can be used in the template. 195 +settings.img.thumbHeight int Thumbnail height of the images. Can be used in the template. 139 +settings.item.width int Width of an (carousel-)item. 195 +settings.item.height int Height of an (carousel-)item. 290 +settings.item.padding int Padding of an (carousel-)item. 0 +settings.item.margin int Marging of an (carousel-)item. 10 +settings.item.items int Number of visible items (JavaScript-parameter). 3 +settings.maps.key string Google maps API key +settings.maps.language int Google maps API language de +settings.maps.dontIncludeAPI boolean Dont include the JS with the Google maps API key? 0 +settings.maps.includeRoute boolean Include a partial for a route planner? 0 +settings.maps.zoom int Zoom level for the next 2 values 5 +settings.maps.startLatitude float Latitude for an empty map 50.0 +settings.maps.startLongitude float Longitude for an empty map 10.0 +settings.seo.setTitle boolean Change the site-title on a single site? 0 + + 0: no. 1: yes, set the title of an element on a single page. +settings.seo.setIndexedDocTitle boolean Change the title in an sitemap of an single element? 0 + + 0: no. 1: yes, change the title in an sitemap. +settings.seo.setDescription boolean Change the meta-description on a single site? 0 + Does not work if the metaseo-extension is installed. + + 0: no. 1: yes, set the shortdesc of an element as meta-description. +settings.seo.setOgTitle boolean Add the og:title tag to the header on a single site? 0 + + 0: no; 1: yes. +settings.seo.setOgDescription boolean Add the og:description tag to the header on a single site? 0 + + 0: no; 1: yes. +settings.seo.setOgImage boolean Add the og:image tag to the header on a single site if there is an image? 0 + + 0: no. 1: yes, add the og:image meta-tag on a single page +settings.extended.enable boolean Enable the extended template? See chapter "Extended templates" 0 + + The following 3 settings only affect, if this option is turned on. +settings.extended.onlySearchForm boolean Initially only show an empty search form? 0 +settings.extended.restrictSearch boolean Show fewer search options? 0 +settings.extended.radiusValues string Comma separated values for the select box at the radius search. + + **Syntax:** + + :: + + [km1],[km2],[km3] + + **Example:** + + :: + + plugin.tx_camaliga.settings.extended.radiusValues = 10,25,50,100 + +settings.extended.saveSearch boolean Save the search parameters in a cookie and load them later? 0 +settings.more.setModulo boolean Add some modulo infos to each camaliga element? 0 + {content.moduloBegin} and {content.moduloEnd} will be set. This values depends + on settings.item.items. See template Ekko.html for usage. +settings.more.addLightbox boolean Add a lightbox to the Galleryview-template? Can be used in other templates to 0 + like in Galleryview.html +settings.more.* mixed Many options for silders like Flexslider2, Slick carousel, Galleryview. +settings.bootstrap.* mixed See at the FlexForms and/or the Bootstrap homepage. +======================================== ============= ================================================================================= =========== + +Example +~~~~~~~ + +Here an example with some settings: + +:: + + plugin.tx_camaliga { + view.templateRootPaths.1 = fileadmin/template/camaliga/ + settings.defaultCatIDs = 4,5 + settings.showId = 410 + settings.listId = 402 + } + diff --git a/Documentation/Configuration/Verlinkung/Index.rst b/Documentation/Configuration/Verlinkung/Index.rst new file mode 100644 index 0000000..3377f7c --- /dev/null +++ b/Documentation/Configuration/Verlinkung/Index.rst @@ -0,0 +1,61 @@ + + +.. ================================================== +.. FOR YOUR INFORMATION +.. -------------------------------------------------- +.. -*- coding: utf-8 -*- with BOM. + +.. ================================================== +.. DEFINE SOME TEXTROLES +.. -------------------------------------------------- +.. role:: underline +.. role:: typoscript(code) +.. role:: ts(typoscript) + :class: typoscript +.. role:: php(code) + + +Linkhandler +^^^^^^^^^^^ + +With the TypoScript configuration and the Page TSconfig you can set it up, +that you can also link to the single view of a Camaliga element directly in the RTE. + +For this you need an additional extension. It is called "linkhandler". Unfortunately, the extension in TER is completely outdated. +For TYPO3 7.6 you find a good version of linkhandler here: + +https://github.com/cobwebch/linkhandler + +There is a new method for using the linkhandler. Here is an example: + +- In the page TSConfig add this (replace the 64!): + +:: + + TCEMAIN.linkHandler.camaliga { + handler = Cobweb\Linkhandler\RecordLinkHandler + label = Camaliga + configuration { + table = tx_camaliga_domain_model_content + storagePid = 64 + } + displayAfter = page + scanAfter = page + } + + +- Then you need some TypoScript setup (replace 112!): + +:: + + plugin.tx_linkhandler.camaliga { + // Do not force link generation when the news records are hidden or deleted. + forceLink = 0 + + typolink { + parameter = 112 + additionalParams = &tx_camaliga_pi1[content]={field:uid}&tx_camaliga_pi1[controller]=Content&tx_camaliga_pi1[action]=show + additionalParams.insertData = 1 + useCacheHash = 1 + } + } \ No newline at end of file diff --git a/Documentation/Configuration/realurl/Index.rst b/Documentation/Configuration/realurl/Index.rst new file mode 100644 index 0000000..83ac144 --- /dev/null +++ b/Documentation/Configuration/realurl/Index.rst @@ -0,0 +1,48 @@ + + +.. ================================================== +.. FOR YOUR INFORMATION +.. -------------------------------------------------- +.. -*- coding: utf-8 -*- with BOM. + +.. ================================================== +.. DEFINE SOME TEXTROLES +.. -------------------------------------------------- +.. role:: underline +.. role:: typoscript(code) +.. role:: ts(typoscript) + :class: typoscript +.. role:: php(code) + + +realUrl +^^^^^^^ + +- You can use this extension with realUrl. + +Example +~~~~~~~ + +Here an example for your realurl config file: + +:: + + 'postVarSets' => array( + '_DEFAULT' => array( + ... + + 'camaliga' => array( // this key must be unique + array( + 'GETvar' => 'tx_camaliga_pi1[action]', + ), + array( + 'GETvar' => 'tx_camaliga_pi1[controller]', + ), + array( + 'GETvar' => 'tx_camaliga_pi1[content]', + ), + ), + + ... + ), + ), \ No newline at end of file diff --git a/Documentation/Images/backend_sortierung.jpg b/Documentation/Images/backend_sortierung.jpg new file mode 100644 index 0000000..772ab69 Binary files /dev/null and b/Documentation/Images/backend_sortierung.jpg differ diff --git a/Documentation/Images/camaliga-backend-fields.jpg b/Documentation/Images/camaliga-backend-fields.jpg new file mode 100644 index 0000000..47961b4 Binary files /dev/null and b/Documentation/Images/camaliga-backend-fields.jpg differ diff --git a/Documentation/Images/camaliga-suchfelder.jpg b/Documentation/Images/camaliga-suchfelder.jpg new file mode 100644 index 0000000..6003869 Binary files /dev/null and b/Documentation/Images/camaliga-suchfelder.jpg differ diff --git a/Documentation/Images/camaliga_cat.png b/Documentation/Images/camaliga_cat.png new file mode 100644 index 0000000..0fd74ba Binary files /dev/null and b/Documentation/Images/camaliga_cat.png differ diff --git a/Documentation/Images/camaliga_cat2.png b/Documentation/Images/camaliga_cat2.png new file mode 100644 index 0000000..104e794 Binary files /dev/null and b/Documentation/Images/camaliga_cat2.png differ diff --git a/Documentation/Images/camaliga_cat3.png b/Documentation/Images/camaliga_cat3.png new file mode 100644 index 0000000..81b4f91 Binary files /dev/null and b/Documentation/Images/camaliga_cat3.png differ diff --git a/Documentation/Images/camaliga_category.png b/Documentation/Images/camaliga_category.png new file mode 100644 index 0000000..f4a5d75 Binary files /dev/null and b/Documentation/Images/camaliga_category.png differ diff --git a/Documentation/Images/camaliga_element.png b/Documentation/Images/camaliga_element.png new file mode 100644 index 0000000..0903798 Binary files /dev/null and b/Documentation/Images/camaliga_element.png differ diff --git a/Documentation/Images/camaliga_mode.png b/Documentation/Images/camaliga_mode.png new file mode 100644 index 0000000..bbc730d Binary files /dev/null and b/Documentation/Images/camaliga_mode.png differ diff --git a/Documentation/Images/camaliga_mother.png b/Documentation/Images/camaliga_mother.png new file mode 100644 index 0000000..81bdc5c Binary files /dev/null and b/Documentation/Images/camaliga_mother.png differ diff --git a/Documentation/Images/camaliga_plugin.png b/Documentation/Images/camaliga_plugin.png new file mode 100644 index 0000000..d9189f9 Binary files /dev/null and b/Documentation/Images/camaliga_plugin.png differ diff --git a/Documentation/Images/camaliga_screenshot1.jpg b/Documentation/Images/camaliga_screenshot1.jpg new file mode 100644 index 0000000..acd5c15 Binary files /dev/null and b/Documentation/Images/camaliga_screenshot1.jpg differ diff --git a/Documentation/Images/camaliga_screenshot2.jpg b/Documentation/Images/camaliga_screenshot2.jpg new file mode 100644 index 0000000..cb87689 Binary files /dev/null and b/Documentation/Images/camaliga_screenshot2.jpg differ diff --git a/Documentation/Images/camaliga_screenshot3.jpg b/Documentation/Images/camaliga_screenshot3.jpg new file mode 100644 index 0000000..7d362fa Binary files /dev/null and b/Documentation/Images/camaliga_screenshot3.jpg differ diff --git a/Documentation/Images/camaliga_screenshot4.jpg b/Documentation/Images/camaliga_screenshot4.jpg new file mode 100644 index 0000000..0616d0f Binary files /dev/null and b/Documentation/Images/camaliga_screenshot4.jpg differ diff --git a/Documentation/Images/camaliga_template.png b/Documentation/Images/camaliga_template.png new file mode 100644 index 0000000..18de143 Binary files /dev/null and b/Documentation/Images/camaliga_template.png differ diff --git a/Documentation/Images/camaliga_tsconfig.png b/Documentation/Images/camaliga_tsconfig.png new file mode 100644 index 0000000..ff5ec89 Binary files /dev/null and b/Documentation/Images/camaliga_tsconfig.png differ diff --git a/Documentation/Images/camaliga_tut1.png b/Documentation/Images/camaliga_tut1.png new file mode 100644 index 0000000..df163ae Binary files /dev/null and b/Documentation/Images/camaliga_tut1.png differ diff --git a/Documentation/Images/camaliga_tut2.png b/Documentation/Images/camaliga_tut2.png new file mode 100644 index 0000000..50e69e1 Binary files /dev/null and b/Documentation/Images/camaliga_tut2.png differ diff --git a/Documentation/Images/camaliga_tut3.png b/Documentation/Images/camaliga_tut3.png new file mode 100644 index 0000000..a97a20e Binary files /dev/null and b/Documentation/Images/camaliga_tut3.png differ diff --git a/Documentation/Images/camaliga_tut4.png b/Documentation/Images/camaliga_tut4.png new file mode 100644 index 0000000..d0edf9c Binary files /dev/null and b/Documentation/Images/camaliga_tut4.png differ diff --git a/Documentation/Images/camaliga_tut5.png b/Documentation/Images/camaliga_tut5.png new file mode 100644 index 0000000..7b156c5 Binary files /dev/null and b/Documentation/Images/camaliga_tut5.png differ diff --git a/Documentation/Images/camaliga_tut6.png b/Documentation/Images/camaliga_tut6.png new file mode 100644 index 0000000..a5f72f1 Binary files /dev/null and b/Documentation/Images/camaliga_tut6.png differ diff --git a/Documentation/Images/camaliga_typoscript.png b/Documentation/Images/camaliga_typoscript.png new file mode 100644 index 0000000..0bb8f1b Binary files /dev/null and b/Documentation/Images/camaliga_typoscript.png differ diff --git a/Documentation/Images/cat_diagram4.png b/Documentation/Images/cat_diagram4.png new file mode 100644 index 0000000..067ac3b Binary files /dev/null and b/Documentation/Images/cat_diagram4.png differ diff --git a/Documentation/Images/manual_html_22ebf792.gif b/Documentation/Images/manual_html_22ebf792.gif new file mode 100644 index 0000000..38bc95d Binary files /dev/null and b/Documentation/Images/manual_html_22ebf792.gif differ diff --git a/Documentation/Images/manual_html_3c9c2593.png b/Documentation/Images/manual_html_3c9c2593.png new file mode 100644 index 0000000..95a4f16 Binary files /dev/null and b/Documentation/Images/manual_html_3c9c2593.png differ diff --git a/Documentation/Index.rst b/Documentation/Index.rst new file mode 100644 index 0000000..78af0df --- /dev/null +++ b/Documentation/Index.rst @@ -0,0 +1,59 @@ + + +.. ================================================== +.. FOR YOUR INFORMATION +.. -------------------------------------------------- +.. -*- coding: utf-8 -*- with BOM. + +.. ================================================== +.. DEFINE SOME TEXTROLES +.. -------------------------------------------------- +.. role:: underline +.. role:: typoscript(code) +.. role:: ts(typoscript) + :class: typoscript +.. role:: php(code) + +========================================= +EXT: Camaliga - carousel/map/list/gallery +========================================= + +:Classification: + camaliga + +:Description: + Camaliga carousel/map/list/gallery is a flexible extension to display elements in different ways. It can use categories for sorting and restriction in the FE. It offers a fulltext search and a proximity search. You can use different jQuery-plugins. + +:Keywords: + extbase, fluid, carousel, slider, gallery, google, maps, geo + +:Author: + Kurt Gusbeth + +:Email: + info@quizpalme.de + +:Website: + `www.quizpalme.de `_ + +:Spachen: + `english Version `_, `deutsche Version `_ + + +.. toctree:: + :maxdepth: 5 + :titlesonly: + :glob: + + Introduction/Index + UsersManual/Index + Administration/Index + Configuration/Index + Tutorial/Index + Updating/Index + Updating5/Index + Updating6/Index + Updating7/Index + KnownProblems/Index + To-doList/Index + Changelog/Index diff --git a/Documentation/Introduction/Contact/Index.rst b/Documentation/Introduction/Contact/Index.rst new file mode 100644 index 0000000..4c54ff0 --- /dev/null +++ b/Documentation/Introduction/Contact/Index.rst @@ -0,0 +1,24 @@ + + +.. ================================================== +.. FOR YOUR INFORMATION +.. -------------------------------------------------- +.. -*- coding: utf-8 -*- with BOM. + +.. ================================================== +.. DEFINE SOME TEXTROLES +.. -------------------------------------------------- +.. role:: underline +.. role:: typoscript(code) +.. role:: ts(typoscript) + :class: typoscript +.. role:: php(code) + + +Contact +^^^^^^^ + +- You can write me a message on my homepage: + +`www.quizpalme.de/kontakt.html `_ + diff --git a/Documentation/Introduction/Index.rst b/Documentation/Introduction/Index.rst new file mode 100644 index 0000000..f525b72 --- /dev/null +++ b/Documentation/Introduction/Index.rst @@ -0,0 +1,31 @@ + + +.. ================================================== +.. FOR YOUR INFORMATION +.. -------------------------------------------------- +.. -*- coding: utf-8 -*- with BOM. + +.. ================================================== +.. DEFINE SOME TEXTROLES +.. -------------------------------------------------- +.. role:: underline +.. role:: typoscript(code) +.. role:: ts(typoscript) + :class: typoscript +.. role:: php(code) + + +Introduction +------------ + + +.. toctree:: + :maxdepth: 5 + :titlesonly: + :glob: + + WhatDoesItDo/Index + Screenshots/Index + Contact/Index + ThanksTo/Index + diff --git a/Documentation/Introduction/Screenshots/Images.txt b/Documentation/Introduction/Screenshots/Images.txt new file mode 100644 index 0000000..97441ad --- /dev/null +++ b/Documentation/Introduction/Screenshots/Images.txt @@ -0,0 +1,35 @@ +.. |img-3| image:: ../../Images/camaliga_screenshot1.jpg +.. :align: left +.. :border: 0 +.. :name: Image 1 +.. :width: 100% + +.. |img-4| image:: ../../Images/camaliga_screenshot2.jpg +.. :align: left +.. :border: 0 +.. :name: Image 2 +.. :width: 100% + +.. |img-5| image:: ../../Images/camaliga_screenshot3.jpg +.. :align: left +.. :border: 0 +.. :name: Image 3 +.. :width: 100% + +.. |img-6| image:: ../../Images/camaliga_screenshot4.jpg +.. :align: left +.. :border: 0 +.. :name: Image 4 +.. :width: 100% + +.. |img-38| image:: ../../Images/camaliga-suchfelder.jpg +.. :align: left +.. :border: 0 +.. :name: Image 5 +.. :width: 100% + +.. |img-39| image:: ../../Images/camaliga-backend-fields.jpg +.. :align: left +.. :border: 0 +.. :name: Image 6 +.. :width: 100% diff --git a/Documentation/Introduction/Screenshots/Index.rst b/Documentation/Introduction/Screenshots/Index.rst new file mode 100644 index 0000000..0b00e4e --- /dev/null +++ b/Documentation/Introduction/Screenshots/Index.rst @@ -0,0 +1,56 @@ +.. include:: Images.txt + +.. ================================================== +.. FOR YOUR INFORMATION +.. -------------------------------------------------- +.. -*- coding: utf-8 -*- with BOM. + +.. ================================================== +.. DEFINE SOME TEXTROLES +.. -------------------------------------------------- +.. role:: underline +.. role:: typoscript(code) +.. role:: ts(typoscript) + :class: typoscript +.. role:: php(code) + + +Screenshots +^^^^^^^^^^^ + +- Some visual impressions. Only a small choice. You find more screenshots in the chapter Tutorial and + links to demo-sites in the chapter Administration/HTML templates. Screenshots form the backend are in the "User Guide". + +.. ### BEGIN~OF~TABLE ### + +.. container:: table-row + + Image 1: A carousel with 3 elements + |img-3| + + Image 2: A gallery + |img-4| + + +.. container:: table-row + + Image 3: A list view + |img-5| + + Image 4: A Google-maps example + |img-6| + + +.. container:: table-row + + a + |img-38| + + *Image 5: Example of searchfields in the frontend* + + b + |img-39| + + *Image 6: some of the fields in the backend* + +.. ###### END~OF~TABLE ###### diff --git a/Documentation/Introduction/ThanksTo/Index.rst b/Documentation/Introduction/ThanksTo/Index.rst new file mode 100644 index 0000000..104092c --- /dev/null +++ b/Documentation/Introduction/ThanksTo/Index.rst @@ -0,0 +1,28 @@ + + +.. ================================================== +.. FOR YOUR INFORMATION +.. -------------------------------------------------- +.. -*- coding: utf-8 -*- with BOM. + +.. ================================================== +.. DEFINE SOME TEXTROLES +.. -------------------------------------------------- +.. role:: underline +.. role:: typoscript(code) +.. role:: ts(typoscript) + :class: typoscript +.. role:: php(code) + + +Thanks to ... +^^^^^^^^^^^^^ + +I have spent many hours for this extension. I hope you like it. It is partly sponsored by +`www.fixpunkt.com `_ + +Thanks to the +`fixpunkt werbeagentur gmbh, Bonn `_ +for giving me the possibility to realize +`this extension `_ +and share it with the TYPO3 community. \ No newline at end of file diff --git a/Documentation/Introduction/WhatDoesItDo/Index.rst b/Documentation/Introduction/WhatDoesItDo/Index.rst new file mode 100644 index 0000000..612f67e --- /dev/null +++ b/Documentation/Introduction/WhatDoesItDo/Index.rst @@ -0,0 +1,39 @@ + + +.. ================================================== +.. FOR YOUR INFORMATION +.. -------------------------------------------------- +.. -*- coding: utf-8 -*- with BOM. + +.. ================================================== +.. DEFINE SOME TEXTROLES +.. -------------------------------------------------- +.. role:: underline +.. role:: typoscript(code) +.. role:: ts(typoscript) + :class: typoscript +.. role:: php(code) + + +What does it do? +^^^^^^^^^^^^^^^^ + +This flexible extension can display elements as e.g. carousel, gallery, list or on a google map and requires TYPO3 6.2.2 - 7.6.99. Features: + +- Many templates for the output. + +- You can use the categories of TYPO3 for classification and restrictions in the front-end. + +- Fulltextsearch. + +- Proximity search if you use a OpenGeoDB table. + +- you can use different jQuery-plugins – even your own one – for displaying the elements. + +- It supports some Bootstrap components: Carousel, Tab, Collapse and Modal. + +- Supports ke_search. + +- Many import scripts and a sheduler task for CSV export. + +The extension is not allways easy to use, but it is very flexible and admins will like that. \ No newline at end of file diff --git a/Documentation/KnownProblems/Index.rst b/Documentation/KnownProblems/Index.rst new file mode 100644 index 0000000..5fbf9d9 --- /dev/null +++ b/Documentation/KnownProblems/Index.rst @@ -0,0 +1,36 @@ + + +.. ================================================== +.. FOR YOUR INFORMATION +.. -------------------------------------------------- +.. -*- coding: utf-8 -*- with BOM. + +.. ================================================== +.. DEFINE SOME TEXTROLES +.. -------------------------------------------------- +.. role:: underline +.. role:: typoscript(code) +.. role:: ts(typoscript) + :class: typoscript +.. role:: php(code) + + +Known problems +-------------- + +- Sorting order of the categories doesn´t work on elements. + +- The category-relations of translated elements are bugy: + `https://forge.typo3.org/issues/61923 + `_ + +- No more selected categories in TYPO3 6.2 after updating from 6.0 or 6.1. + Please execute the update-script! + +- Links saved in TYPO3 8.7 are not parsed correctly. This is a bug of TYPO3 8.7. + +- If you find a bug, please report it. TYPO3 Forge link: + `http://forge.typo3.org/projects/show/extension-camaliga + `_ + + diff --git a/Documentation/Localization.de_DE/Administration/DasBackend-modul/Images.txt b/Documentation/Localization.de_DE/Administration/DasBackend-modul/Images.txt new file mode 100644 index 0000000..92d9964 --- /dev/null +++ b/Documentation/Localization.de_DE/Administration/DasBackend-modul/Images.txt @@ -0,0 +1,5 @@ +.. |img-16| image:: ../../../Images/backend_sortierung.jpg +.. :align: left +.. :border: 0 +.. :name: Backend +.. :width: 100% diff --git a/Documentation/Localization.de_DE/Administration/DasBackend-modul/Index.rst b/Documentation/Localization.de_DE/Administration/DasBackend-modul/Index.rst new file mode 100644 index 0000000..ca79bbe --- /dev/null +++ b/Documentation/Localization.de_DE/Administration/DasBackend-modul/Index.rst @@ -0,0 +1,29 @@ +.. include:: Images.txt + + +.. ================================================== +.. FOR YOUR INFORMATION +.. -------------------------------------------------- +.. -*- coding: utf-8 -*- with BOM. + +.. ================================================== +.. DEFINE SOME TEXTROLES +.. -------------------------------------------------- +.. role:: underline +.. role:: typoscript(code) +.. role:: ts(typoscript) + :class: typoscript +.. role:: php(code) + + +Das Backend-Modul +^^^^^^^^^^^^^^^^^ + +- Das Camaliga-Backend-Modul hat 3 Features: Alphabetische Auflistung der Camaliga- + Elemente eines Ordners/Dokuments, Bilder-Liste eines Ordner mit Sortierfunktion und Import. + Ein Import ist möglich aus anderen Tabellen. + Zurzeit kann man Einträge folgender Extension importieren: karussell- und tt\_news. + +|img-16| + +*Abbildung 16a: eins der Backend-Formulare* diff --git a/Documentation/Localization.de_DE/Administration/Erweiterte-Templates/Index.rst b/Documentation/Localization.de_DE/Administration/Erweiterte-Templates/Index.rst new file mode 100644 index 0000000..38ac938 --- /dev/null +++ b/Documentation/Localization.de_DE/Administration/Erweiterte-Templates/Index.rst @@ -0,0 +1,78 @@ + + +.. ================================================== +.. FOR YOUR INFORMATION +.. -------------------------------------------------- +.. -*- coding: utf-8 -*- with BOM. + +.. ================================================== +.. DEFINE SOME TEXTROLES +.. -------------------------------------------------- +.. role:: underline +.. role:: typoscript(code) +.. role:: ts(typoscript) + :class: typoscript +.. role:: php(code) + + +Erweiterte Templates +^^^^^^^^^^^^^^^^^^^^ + +Erweiterte Templates sind Templates, die mehr Informationen ausgeben als die normalen Templates. +Außerdem bieten sie eine Suchmöglichkeit (nach Kategorien und eine Volltextsuche). Mehr dazu findet man in anderen Kapiteln. +Seit camaliga 5.0.0 gibt es nun drei Möglichkeiten, diese erweiterten Templates/Funktionen zu benutzen: + +- Für die Listen-Ansicht kann man gleich ein erweitertes Template auswählen. + Da die erweiterte List-Action gecached wird, wird dann das Suchformular mit dem Parameter no_cache=1 an sich selbst abgesendet. + Das ist freilich keine elegante Lösung, aber dennoch eine praktische Lösung. + Bis zur Version 4.0.0 gab es noch mehr Templates, die nach diesem Prinzip funktionierten, aber die werden nicht mehr + zur Auswahl angeboten und werden in der Version 6.0.0 komplett entfernt. Deshalb sollte man jetzt noch weiter lesen. + +- Das (neue) erweiterte Google-Karten/Maps-Template wird überhaupt nie gecached, weshalb man dort den no_cache=1 Parameter nicht braucht. + Das Template heisst nicht wie früher MapExtended.html, sondern Search.html. Das Suchformular wird dort über ein Partial eingebunden. + Jeder, der kein Caching braucht oder jeder, dem die anderen Lösungen nicht gefallen, sollte das Search-Template benutzen. + Man kann es freilich für alles benutzen. + +- Der 3. Weg sieht so aus: man sendet das Suchformular an die search-action. + Da die search-action nicht gecached wird, braucht man den no_cache-Parameter nicht. + Dafür wird aber das Search.html-Template auf jeden Fall gebraucht. + Wer jetzt nicht immer zwei Templates pflegen will, kann beim Suchformular noch einen Parameter mit angeben: + +:: + + + +Mit Hilfe des hidden-Parameters template gibt man an, welches Template nach der Suche benutzt werden soll. +Das sollte dann den gleichen Namen haben, wie das Template, welches man benutzt. +Der Vorteil: man kann das ganze in fast jedem Template so machen. +Aufgrund eines TYPO3-Bugs braucht man das Search.html-Template aber dennoch, obwohl es nicht benutzt wird. +Damit das ganze überhaupt funktioniert, muss man nun die Suche noch einschalten. Entweder über die FlexForms +im Reiter "Erweiterte Optionen" oder per TypoScript: + +:: + + plugin.tx_camaliga.settings.extended.enable = 1 + +Ein Zeit-Test hat übrigens ergeben, dass es Jacke wie Hose ist, welche Variante man wählt. Alle Varianten sind gleich langsam. +Ob man am Anfang ein leeres Suchformular ausgeben will oder gleich eine gefüllte Seite, kann man auch einstellen. +Und so sieht ein fertiges Beispiel der Variante 3 aus, welches man in fast jedes Template einbauen kann: + +:: + + + +
+

{f:translate(key: 'options', default: 'Options')}

+ + + +
+
+
+ +Nachdem man das in sein Template eingebaut hat, braucht man noch das Partial "Options", dass man aus dem typo3conf-Ordner +benutzen kann oder auch in den fileadmin-Ordner kopieren kann. Den Pfad zum Partial gibt man so an: + +:: + + plugin.tx_camaliga.view.partialRootPath = fileadmin/templates/Partials/ \ No newline at end of file diff --git a/Documentation/Localization.de_DE/Administration/Extend/Index.rst b/Documentation/Localization.de_DE/Administration/Extend/Index.rst new file mode 100644 index 0000000..2f01100 --- /dev/null +++ b/Documentation/Localization.de_DE/Administration/Extend/Index.rst @@ -0,0 +1,78 @@ + + +.. ================================================== +.. FOR YOUR INFORMATION +.. -------------------------------------------------- +.. -*- coding: utf-8 -*- with BOM. + +.. ================================================== +.. DEFINE SOME TEXTROLES +.. -------------------------------------------------- +.. role:: underline +.. role:: typoscript(code) +.. role:: ts(typoscript) + :class: typoscript +.. role:: php(code) + + +Camaliga-Tabellen erweitern +^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +- Ich brauche mehr Felder! Was kann ich tun? + +Das ist nicht sehr schwer. Am besten macht man das mit der Extension extension_builder. +Im Kapitel "Extending models or map to existing tables" wird beschrieben, wie das geht: + +http://docs.typo3.org/typo3cms/extensions/extension_builder/Developer/ExtendingModels.html + +Bei "Extend existing model class" muss man das hier eingeben:: + + \quizpalme\Camaliga\Domain\Model\Content + +Unter "Properties" fügt man dann die neuen Felder hinzu, die man mit Camaliga verwenden will. + + +Leider ist das Ergebnis der Extension nicht ganz brauchbar. Ich weiß nicht, was dabei raus kommt, aber es läuft nicht, wie es sollte. +Deshalb sollte man zum Schluss noch die /Configuration/TCA/Overrides/tx_camaliga_domain_model_content.php (ehemals ext_tables.php) bearbeiten. +Lösche dort alles und füge so was ein:: + + $tmp_camaliga_addon_columns = array( + 'custom4' => array( + 'exclude' => 1, + 'label' => 'LLL:EXT:camaliga_addon/Resources/Private/Language/locallang_db.xlf:tx_camaligaaddon_domain_model_content.custom4', + 'config' => array( + 'type' => 'input', + 'size' => 30, + 'eval' => 'trim' + ), + ), + ); + \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTCAcolumns('tx_camaliga_domain_model_content',$tmp_camaliga_addon_columns, 1); + \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addToAllTCAtypes('tx_camaliga_domain_model_content', '--div--;Meine Felder, custom4'); + +Dabei muss man "camaliga_addon" durch den Extension-Name austauschen und "custom4" durch dein neues Feld. +Tipp: dies ist ein Beispiel aus der Extension camaliga_addon. Unten findet man einen Link dazu. +Am besten downloaden und dort nachsehen, wie es geht. + +Als nächstes muss noch Camaliga konfiguriert werden. Man muss nun Camaliga angeben, welche Felder es zusätzlich holen soll. Dazu geht man in den Erweiterungsmanager und klickt dort auf Camaliga um es zu konfigurieren. Füge deine neuen Felder nun unter 'Select this extended fields too (without comma, e.g. "custom4 custom5 custom6")' hinzu. Benutze das Space-Zeichen zum trennen der Felder. Theoretisch kann man so auch Felder holen, auf die man sonst keinen direkten Zugriff hat (z.B. tstamp)... + +So, jetzt kannst du deine neuen Felder benutzen! Deine neuen Felder kannst du nun in jedem Template benutzen. So kannst du darauf zugreifen:: + + {content.extended.custom4} + +Dabei musst du noch "custom4" durch den Namen deines Feldes ersetzen. Das ist alles. + + +- Ich möchte nur einen bestehenden Feld-Typ ändern! Wie geht das? + +Du brauchst eine Extension mit der Datei "Configuration/TCA/Overrides/tx_camaliga_domain_model_content.php". Dort kann man die TCA überschreiben. +Hier ein Beispiel:: + + $GLOBALS['TCA']['tx_camaliga_domain_model_content']['columns']['shortdesc']['config']['rows'] = 6; + +Man findet ein weiteres Beispiel in der Extension camaliga_addon. Dort wird aus einer Textarea ein RTE-Feld beim Feld Kurzbeschreibung. + + +- Wo finde ich die Extension camaliga_addon? + +Auf meiner Homepage unter: http://www.quizpalme.de/autor/download/myquizpoll-addons.html diff --git a/Documentation/Localization.de_DE/Administration/Extension-Manager/Index.rst b/Documentation/Localization.de_DE/Administration/Extension-Manager/Index.rst new file mode 100644 index 0000000..77d7a2d --- /dev/null +++ b/Documentation/Localization.de_DE/Administration/Extension-Manager/Index.rst @@ -0,0 +1,34 @@ + + +.. ================================================== +.. FOR YOUR INFORMATION +.. -------------------------------------------------- +.. -*- coding: utf-8 -*- with BOM. + +.. ================================================== +.. DEFINE SOME TEXTROLES +.. -------------------------------------------------- +.. role:: underline +.. role:: typoscript(code) +.. role:: ts(typoscript) + :class: typoscript +.. role:: php(code) + + +Konfiguration via Extension-Manager +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +Bei der Konfiguration im Extension-Manager kann man 4 Sachen einstellen: + +- Den Kategorie-Modus. Siehe Kapitel Kategorien. + +- Man kann neu erzeugte Felder dort angeben. + +- Man kann vorhandene Felder deaktivieren, wenn man sie nicht braucht. + +- Man kann entscheiden, ob man FAL-Bilder oder den Ordner /uploads/tx_camaliga benutzen will. + Dieser Punkt ist sehr entscheidend und kann später nur noch schwer geändert werden. + Außerdem muss man die Extension deinstallieren und neu installieren, nachdem man hier eine Änderung vorgenommen hat. + Das ist sehr wichtig, damit TYPO3 die Bild-Konfiguration umstellt. + Lies das Kapitel Administration → Scheduler-Tasks, bevor du was umstellst! + Beachte weiterhin: die Standardeinstellung ist, den Ordner /uploads/tx_camaliga zu benutzen. \ No newline at end of file diff --git a/Documentation/Localization.de_DE/Administration/Faq/Index.rst b/Documentation/Localization.de_DE/Administration/Faq/Index.rst new file mode 100644 index 0000000..a51c0ac --- /dev/null +++ b/Documentation/Localization.de_DE/Administration/Faq/Index.rst @@ -0,0 +1,34 @@ + + +.. ================================================== +.. FOR YOUR INFORMATION +.. -------------------------------------------------- +.. -*- coding: utf-8 -*- with BOM. + +.. ================================================== +.. DEFINE SOME TEXTROLES +.. -------------------------------------------------- +.. role:: underline +.. role:: typoscript(code) +.. role:: ts(typoscript) + :class: typoscript +.. role:: php(code) + + +FAQ +^^^ + +- Wie kann ich Übersetzungstexte ändern? Hier ein TypoScript-Beispiel: + + :: + + plugin.tx_camaliga._LOCAL_LANG.de.more = Zur Website + +- Wie kann ich Felder im Backend umbenennen oder verbergen? + + Siehe Kapitel “Konfiguration / Seiten-TSConfig”. + Man kann viele optionale Felder auch über die Konfiguration im Extension-Manager ausschalten. + +- Wie kann ich den Feld-Typ ändern? + + Siehe Kapitel "Administration / Camaliga-Tabellen erweitern" \ No newline at end of file diff --git a/Documentation/Localization.de_DE/Administration/Html-templates/Index.rst b/Documentation/Localization.de_DE/Administration/Html-templates/Index.rst new file mode 100644 index 0000000..394eea1 --- /dev/null +++ b/Documentation/Localization.de_DE/Administration/Html-templates/Index.rst @@ -0,0 +1,201 @@ + + +.. ================================================== +.. FOR YOUR INFORMATION +.. -------------------------------------------------- +.. -*- coding: utf-8 -*- with BOM. + +.. ================================================== +.. DEFINE SOME TEXTROLES +.. -------------------------------------------------- +.. role:: underline +.. role:: typoscript(code) +.. role:: ts(typoscript) + :class: typoscript +.. role:: php(code) + + +HTML-Templates +^^^^^^^^^^^^^^ + +- Diese Extension kommt mit zahlenreichen HTML-Beispiel-Templates, aber + in vielen Fällen muss man dafür erst noch ein externes jQuery-Plugin downloaden und einbinden. Letzteres macht man am besten + mit dem cam:addPublicResources-ViewHelper (siehe Kapitel ViewHelpers). + +- Bei den FlexForms ist die Template-Auswahl-Liste in 3 Teile gegliedert: Templates für die man kein Plugin braucht, + Templates für die man Bootstrap braucht und Templates für die man ein externes Plugin braucht. + +- Hier nun eine Liste der HTML-Templates und wo man weitere Informationen zum benutzen jQuery-Plugin findet. + Installationsanleitungen findet man im jeweiligen Template + (typo3conf/ext/camaliga/Resources/Private/Templates/Content/). + +========================= ==================================================================================================== +Template Information +========================= ==================================================================================================== +AdGallery.html Template, welches das AD Gallery-Plugin benutzt. + Achtung: man muss AD Gallery separat installieren. + + Infos: http://adgallery.codeplex.com/documentation + + Demo: http://www.quizpalme.de/fotos/kunst/adgallery.html +Bootstrap.html Template für das Twitter Bootstrap Carousel. + + Infos: http://getbootstrap.com/javascript/#carousel + + Demo: http://www.quizpalme.de/fotos/kunst/bootstrap-kunst.html +Carousel.html Karussell, welches das Camaliga-Plugin benutzt. Standard-Template. + Achtung: alle Elemente-Einstellungen wirken sich nur hier aus. + + Demo: http://www.quizpalme.de/fotos/externe-fotos.html +CarouselSeparated.html Ein Template, das 2 separate Karussells mit dem Camaliga-Plugin benutzt. +Collapse.html Template für Twitter Bootstrap Collapse/Accordion. + + Infos: http://getbootstrap.com/javascript/#collapse + + Demo: http://www.quizpalme.de/reiseberichte/reiseempfehlungen/berge.html +Coolcarousel.html Template, welches das Coolcarousel-Plugin benutzt. + Achtung: man muss Coolcarousel separat installieren. + + Infos: http://coolcarousels.frebsite.nl/c/66/ + + Demo: http://www.quizpalme.de/fotos/kunst/coolcarousel-ansicht.html +Ekko.html Template, welches die Bootstrap-Ekko-Lightbox benutzt. Achtung: man muss Ekko separat installieren. + Funktioniert nur, wenn man settings.more.setModulo=1 setzt. + + Infos: http://www.jqueryscript.net/lightbox/Simple-Gallery-Lightbox-Plugin-with-jQuery-Bootstrap-Ekko-Lightbox.html +Elastislide.html Template, welches das Elastislide-Plugin benutzt. + Achtung: man muss Elastislide separat installieren. + + Infos: http://tympanus.net/codrops/2011/09/12/elastislide-responsive-carousel/ + + Demo: http://www.quizpalme.de/fotos/kunst/elastislide-kunst.html +FancyBox.html Template, welches nur das FancyBox-Plugin benutzt. + Achtung: man muss FancyBox separat installieren. + + Infos: http://fancyapps.com/fancybox/ + + Demo: http://www.quizpalme.de/reiseberichte/malta-2014/gozo.html +Flexslider2.html Template, welches das FlexSlider 2-Plugin benutzt. + Achtung: man muss Flexslider 2 separat installieren. + + Infos: http://flexslider.woothemes.com/thumbnail-slider.html + + Demo: http://www.quizpalme.de/fotos/kunst/flexslider-kunst.html +Flipster.html Template, welches das jQuery.Flipster-Plugin benutzt. + Achtung: man muss jQuery.Flipster separat installieren. + + Infos: https://github.com/drien/jquery-flipster + + Demo: http://www.quizpalme.de/fotos/externe-fotos/flipster.html +FractionSlider.html Deprecated: benutze stattdessen die Extension fp_fractionslider. + Template, welches das FractionSlider-Plugin benutzt. + Achtung: man muss den FractionSlider separat installieren. + + Infos: http://jacksbox.de/fractionslider-demos/background-animation/ +Fullwidth.html Template, welches das "jQuery Full Width Image Slider"-Plugin benutzt. + Achtung: man muss "jQuery Full Width Image Slider" separat installieren. + + Infos: https://github.com/JoeBonham/jQuery-Full-Width-Image-Slider +GalleryView.html Template, welches das GalleryView-Plugin benutzt. + Achtung: man muss GalleryView separat installieren. + + Infos: https://github.com/jackwanders/GalleryView + + Demo: http://www.quizpalme.de/fotos/jugendstil.html +Innerfade.html Template, welches das Innerfade-Plugin benutzt. + Achtung: man muss Innerfade separat installieren. + + Infos: http://medienfreunde.com/lab/innerfade/ + + Demo: http://www.quizpalme.de/fotos/externe-fotos/innerfade.html +Isotope.html Template, welches das Isotope-Plugin benutzt. + Achtung: man muss Isotope separat installieren. + + Infos: http://isotope.metafizzy.co/ + + Demo: http://www.quizpalme.de/autor.html +Lightslider.html Template, welches das lightSlider-Plugin benutzt. + Achtung: man muss jQuery lighSlider separat installieren. + + Infos: http://sachinchoolur.github.io/lightslider/index.html + + Demo: http://www.quizpalme.de/fotos/externe-fotos/lightslider.html +List.html Listen-Ansicht. +ListExtended.html Listen-Ansicht mit mehr Feldern. + + Demo: http://www.quizpalme.de/astronomische-uhren/liste-astronomischer-uhren.html +Map.html Eine "google map". + + Demo: http://www.quizpalme.de/astronomische-uhren/astro-karte.html +Modal.html Template für Twitter Bootstrap Modal. Benutze das Feld custom1 für den Modal-Button. + + Infos: http://getbootstrap.com/javascript/#modals + + Demo: http://www.quizpalme.de/reiseberichte/reiseempfehlungen/alle-empfehlungen.html +Owl2.html Template, welches das responsive Owl2-Plugin benutzt. + Achtung: man muss OWL2 separat installieren. + + Infos: https://owlcarousel2.github.io/OwlCarousel2/ + + Demo: http://www.quizpalme.de/fotos/externe-fotos/owl2.html +Parallax.html Template, welches "Simple Parallax Scrolling" benutzt. + Achtung 1: man muss Simple Parallax Scrolling separat installieren. + Achtung 2: man muss settings.img.with,.height,.thumbHeight und settings.more.speed setzen. + + Infos: http://pixelcog.github.io/parallax.js/ + + Demo: http://www.quizpalme.de/ +Random.html Zeigt ein zufälliges Element an. Wird nicht gecached. +Responsive.html Ein simples responsives Template. + + Demo: http://www.quizpalme.de/fotos/externe-fotos/responsive.html +ResponsiveCarousel.html Template, welches das responsiveCarousel-Plugin benutzt. + Achtung: man muss responsiveCarousel separat installieren. + + Infos: http://basilio.github.io/responsiveCarousel/ +Revolution.html Deprecated: benutze stattdessen die Extension fp_fractionslider. + Template, welches den berühmten Revolution Slider benutzt. + Achtung: man muss den Revolution Slider separat installieren. + + Infos: https://codecanyon.net/item/slider-revolution-responsive-jquery-plugin/2580848 +Roundabout.html Template, welches das Roundabout-Plugin benutzt. + Achtung: man muss Roundabout separat installieren. + + Infos: http://fredhq.com/projects/roundabout/ + + Demo: http://www.quizpalme.de/fotos/externe-fotos/roundabout.html +Scrollable.html Template, welches das jQuery TOOLS Scrollable-Plugin benutzt. + Achtung: man muss jQuery TOOLS Scrollable separat installieren. + + Infos: http://jquerytools.org/demos/scrollable/index.html + + Demo: http://www.quizpalme.de/astronomische-uhren/sonnenuhren.html +Search.html Ein erweitertes Template mit allen möglichen Features! Dazu gehört u.a + eine Umkreissuche, für die man opengeodb-Tabellen benötigt. Wird nicht gecached. + Man braucht dieses Template, wenn man die Suche einschaltet, denn es wird über diese + "action" gesucht. +Sgallery.html Template, welches das S Gallery-Plugin benutzt. + Achtung: man muss S Gallery separat installieren. + + Infos: http://sarasoueidan.com/blog/s-gallery/ + + Demo: http://www.quizpalme.de/fotos/kunst/sgallery.html +Show.html Einzelansicht. +ShowExtended.html Einzelansicht mit mehr Feldern. + + Demo: http://www.quizpalme.de/astronomische-uhren/astronomische-uhr/camaliga/showExtended/Content/45.html +Skdslider.html Template, welches das SKDslider-Plugin benutzt. + Achtung: man muss SKDslider separat installieren. + + Infos: http://dandywebsolution.com/skdslider/ +Slick.html Template, welches das slick-Plugin benutzt. + Achtung: man muss slick separat installieren. + + Infos: http://kenwheeler.github.io/slick/ + + Demo: http://www.quizpalme.de/reiseberichte/wanderungen/rheinsteig/tour1.html +Tab.html Template, welches Bootstrap 3 Tabs benutzt. + + Demo: http://www.quizpalme.de/autor/reiseziele.html +Test.html Nur für Tests... +========================= ==================================================================================================== \ No newline at end of file diff --git a/Documentation/Localization.de_DE/Administration/Index.rst b/Documentation/Localization.de_DE/Administration/Index.rst new file mode 100644 index 0000000..811153f --- /dev/null +++ b/Documentation/Localization.de_DE/Administration/Index.rst @@ -0,0 +1,71 @@ + + +.. ================================================== +.. FOR YOUR INFORMATION +.. -------------------------------------------------- +.. -*- coding: utf-8 -*- with BOM. + +.. ================================================== +.. DEFINE SOME TEXTROLES +.. -------------------------------------------------- +.. role:: underline +.. role:: typoscript(code) +.. role:: ts(typoscript) + :class: typoscript +.. role:: php(code) + + +Administration +-------------- + +- Nachdem man sich für ein Layout entschieden hat, sollte man das HTML- + Template und die CSS-Datei anpassen. + +- Kopiere dazu diese 2 Ordner in einen Ordner im fileadmin-Verzeichnis: + +:: + + typo3conf\ext\camaliga\Resources\Private\Templates\Content + typo3conf\ext\camaliga\Resources\Public\css + +- Wenn du z.B. den Ordner fileadmin/ext/camaliga genannt hast, dann gibt + den Pfad dazu mit TypoScript-Konstanten so an: + +:: + + plugin.tx_camaliga.view.templateRootPath = fileadmin/ext/camaliga/ + +- Oder mit TypoScript-Setup so: + +:: + + plugin.tx_camaliga.view.templateRootPaths.1 = fileadmin/ext/camaliga/ + +- Achtung: in diesem Ordner muss dann der Ordner “Content” drin liegen. + +- Nun kann man das HTMl-Template bearbeiten. Welches? Das ist nicht + schwer, da die Namen treffend gewählt sind. Falls das Template JS- + oder CSS-Dateien enthält, kopiere die auch in den fileadmin-Ordner und + binde sie via TypoScript ein. Sie werden nur zu Demo-Zwecken im + Template eingebunden. Entferne sie dann aus dem Template.Bemerkung: + man findet mehr Informationen zu jedem Template am Anfang eines + Template. Weitere Infos findet man auch im Kapitel Tutorial. + + +.. toctree:: + :maxdepth: 5 + :titlesonly: + :glob: + + Extension-Manager/Index + Html-templates/Index + Erweiterte-Templates/Index + Umkreissuche/Index + Template-variablen/Index + ViewHelper/Index + Kategorien/Index + DasBackend-modul/Index + Scheduler/Index + Extend/Index + Faq/Index + diff --git a/Documentation/Localization.de_DE/Administration/Kategorien/Images.txt b/Documentation/Localization.de_DE/Administration/Kategorien/Images.txt new file mode 100644 index 0000000..437fbe1 --- /dev/null +++ b/Documentation/Localization.de_DE/Administration/Kategorien/Images.txt @@ -0,0 +1,5 @@ +.. |img-15| image:: ../../../Images/cat_diagram4.png +.. :align: left +.. :border: 0 +.. :name: Categories +.. :width: 100% diff --git a/Documentation/Localization.de_DE/Administration/Kategorien/Index.rst b/Documentation/Localization.de_DE/Administration/Kategorien/Index.rst new file mode 100644 index 0000000..f364999 --- /dev/null +++ b/Documentation/Localization.de_DE/Administration/Kategorien/Index.rst @@ -0,0 +1,36 @@ +.. include:: Images.txt + +.. ================================================== +.. FOR YOUR INFORMATION +.. -------------------------------------------------- +.. -*- coding: utf-8 -*- with BOM. + +.. ================================================== +.. DEFINE SOME TEXTROLES +.. -------------------------------------------------- +.. role:: underline +.. role:: typoscript(code) +.. role:: ts(typoscript) + :class: typoscript +.. role:: php(code) + + +Kategorien +^^^^^^^^^^ + +- Diese Extension benutzt die normalen TYPO3-Kategorien. Es gibt verschiedene Arten diese zu benutzen. + Mit {content.categories} kann man die markierten Kategorien anzeigen. + Mit {content.categoriesAndParents} kann man die markierten Kategorien und deren Mutter-Kategorie anzeigen. + +- Weiterhin kann man diese Extension im Extension-Manager konfigurieren. + Das ist nur von Bedeutung, wenn man mehrere Sprachen benutzt. Es gibt 2 Optionen: + Benutze die Kategorie-Relationen der übersetzten Camaliga-Elemente oder der Original-Elemente. + Es wird empfohlen, die Kategorie-Relationen der übersetzten Elemente zu ignorieren, weil es einen TYPO3-Bug gibt. + TYPO3 verliert die Relationen zu den übersetzten Kategorien, wenn man ein übersetztes Camaliga-Element speichert. + Wenn dieser Bug gefixt ist, kann die Extension wieder umkonfigurieren... + +|img-15| + +*Bild 15: Relationen der Kategorien* + +- Mehr zum Thema Kategorien findet man im Kapitel "Benutzerhandbuch". \ No newline at end of file diff --git a/Documentation/Localization.de_DE/Administration/Scheduler/Index.rst b/Documentation/Localization.de_DE/Administration/Scheduler/Index.rst new file mode 100644 index 0000000..7bc5131 --- /dev/null +++ b/Documentation/Localization.de_DE/Administration/Scheduler/Index.rst @@ -0,0 +1,39 @@ + + +.. ================================================== +.. FOR YOUR INFORMATION +.. -------------------------------------------------- +.. -*- coding: utf-8 -*- with BOM. + +.. ================================================== +.. DEFINE SOME TEXTROLES +.. -------------------------------------------------- +.. role:: underline +.. role:: typoscript(code) +.. role:: ts(typoscript) + :class: typoscript +.. role:: php(code) + + +Scheduler-Tasks +^^^^^^^^^^^^^^^ + +- Es gibt 3 Planer-Tasks: Import und Export von CSV-Dateien. In den Tasks kann man jede Menge Einstellungen vornehmen! + Der 3. Planer kann Bilder aus dem /uploads/tx_camaliga-Ordner nach FAL verschieben/umändern. + Bitte ein Backup der Camaliga-Tabellen und der uploads-Bilder machen, bevor du diesen Task benutzt! + Nachdem man diesen Task ausgeführt hat, muss man noch Camaliga sagen, dass es FAL benutzen soll. + Gehe zum Erweiterungsmanager und klicke auf Camaliga. Klicke dann auf "Use images from FAL instead of images from uploads/". + Dann muss man Camaliga kurz deinstallieren und wieder neu installieren. + +- Zu guter letzt musst du noch deine geänderten Templates anpassen! Merge sie mit den Templates aus dem typo3conf-Ordner. + Altes Beispiel:: + + + + + +- Neues Beispiel:: + + + + \ No newline at end of file diff --git a/Documentation/Localization.de_DE/Administration/Template-variablen/Index.rst b/Documentation/Localization.de_DE/Administration/Template-variablen/Index.rst new file mode 100644 index 0000000..1de141a --- /dev/null +++ b/Documentation/Localization.de_DE/Administration/Template-variablen/Index.rst @@ -0,0 +1,114 @@ + + +.. ================================================== +.. FOR YOUR INFORMATION +.. -------------------------------------------------- +.. -*- coding: utf-8 -*- with BOM. + +.. ================================================== +.. DEFINE SOME TEXTROLES +.. -------------------------------------------------- +.. role:: underline +.. role:: typoscript(code) +.. role:: ts(typoscript) + :class: typoscript +.. role:: php(code) + + +Template-Variablen +^^^^^^^^^^^^^^^^^^ + +- Man kann einige Variablen in den Fluid-Templates benutzten. Die werden + nun hier erklärt. Zuerst findet man die Variablen, die man in normalen + Templates benutzen kann, dann diejenigen, die man zusätzlich in den + erweiterten Templates benutzen kann. + +========================= =============================================================================================== +Variable Beschreibung (Beispiele findet man in List.html und Show.html) +========================= =============================================================================================== +fal Bilder aus dem FAL (1) oder aus dem Ordner uploads/camaliga (0) benutzen? +lang UID der Sprache. +uid UID des Plugin (Content-Element ID). +pid PID des Plugin (Seiten-ID). +storagePIDsArray Array mit den PIDs der Datensatzsammlung. +storagePIDsComma Komma-separierte Liste der PIDs der Datensatzsammlung. +contents Array mit den Camaliga-Elementen. Das Array enthält diese Variablen mit Tabellen-Inhalten: + + title, shortdesc, longdesc, link, image, image2, caption2, image3, caption3, + image4, caption4, image5, caption5, street, zip, city, country, + latitude, longitude, person, phone, mobile, email, custom1, custom2, custom3, categories. + + Weiterhin ganz wichtig für JavaScript: titleNl2br, shortdescNl2br, longdescNl2br und + streetNl2br. + + Die Links werden im TypoLink-Format abgespeichert, weshalb noch weitere Variablen zur + Verfügung stehen. + linkResolved enthält nun den Pfad zu einer Datei, anstatt file:123 (wie link). + Natürlich sollte das auch für andere Link-Arten normal sein, ist es im Moment aber nicht. + Dafür gibt es noch die Variable links, die ein Array zurückgibt. Das ist hilfreich, wenn + man mehrere Links speichern will oder wenn man den Typ des Links wissen will. + Die Array-Keys lauten: link und type. type gleich 0: kein Link; 1: interner Link; + 2: externer Link; 3: Datei; 4: Email-Adresse. + Ein Beispiel sieht man weiter unten. In den Templates wird nun f:link.typolink benutzt, + sodass man besser alles gleich bei der Linksetzung angibt. + + Und wenn man die Camaliga-Tabelle erweitert: extended. + Das ist ein Array mit den erweiterten Feldern. +settings Siehe TypoScript-Einstellungen. +onlySearchForm Wert, ob nur ein Suchformular angezeigt werden soll. +paddingItemWidth Element-Breite + 2\*padding. +totalItemWidth Element-Breite + 2\*padding + 2\*margin. +itemWidth Hängt von "addPadding" ab: Element-Breite ODER paddingItemWidth. +totalWidth n \* totalItemWidth. +paddingItemHeight Element-Höhe + 2\*padding. +totalItemHeight Element-Höhe + 2\*padding + 2\*margin. +itemHeight Hängt von "addPadding" ab: Element-Höhe ODER paddingItemHight. +========================= =============================================================================================== + + +- Benutze ein erweitertes Template nur dann, wenn du diese zusätzlichen Variablen brauchst: + +=============================== ============================================================================== +Variable Beschreibung (Beispiele findet man in ListExtended.html) +=============================== ============================================================================== +sortBy\_selected Übergabevariable sortBy. +sortOrder\_selected Übergabevariable sortOrder. +start Übergabevariable start. +defaultCatIDs Settings.defaulCatIDs. +storagePIDsData Array mit den Datensatzsammlungs-PIDs und der Info, welche davon ausgewählt sind. +all_categories Array mit allen Kategorien. +categories Array mit allen benutzten Kategorien und den übergeordneten Kategorien. +contents.categoriesAndParents Array mit allen benutzten Kategorien und den übergeordneten Kategorien. +sword Volltext-Such-Wort. +place Ort, der gesucht wird. +radius Ausgewählter Radius in km. +radiusArray Auswählbare Radius-Werte. +rsearch Wert, der sagt, ob die Umkreissuche aktiv ist. +=============================== ============================================================================== + + +- Wenn settings.more.setModulo = 1 gesetzt wird, gibt es noch diese Variablen (abhängig von settings.item.items): + +=============================== ===================================================================================== +Variable Beschreibung (Beispiel findet man in Ekko.html) +=============================== ===================================================================================== +contents.moduloBegin >0 nach jedem settings.item.items Element. 0 sonst. Beginnt beim 1. Element. +contents.moduloEnd >0 nach jedem settings.item.items Element. 0 sonst. Beginnt beim \[items\]-Element. +=============================== ===================================================================================== + + +Hier noch ein Beispiel, wenn man nicht f:link.typolink benutzen will: + +:: + + + + {f:translate(key: 'more')} + + + {f:translate(key: 'more')} + {f:translate(key: 'more')} + + + + \ No newline at end of file diff --git a/Documentation/Localization.de_DE/Administration/Umkreissuche/Index.rst b/Documentation/Localization.de_DE/Administration/Umkreissuche/Index.rst new file mode 100644 index 0000000..2e4e96f --- /dev/null +++ b/Documentation/Localization.de_DE/Administration/Umkreissuche/Index.rst @@ -0,0 +1,77 @@ + + +.. ================================================== +.. FOR YOUR INFORMATION +.. -------------------------------------------------- +.. -*- coding: utf-8 -*- with BOM. + +.. ================================================== +.. DEFINE SOME TEXTROLES +.. -------------------------------------------------- +.. role:: underline +.. role:: typoscript(code) +.. role:: ts(typoscript) + :class: typoscript +.. role:: php(code) + + +Umkreissuche +^^^^^^^^^^^^ + +Das umfangreichste Beispiel-Template stellt eine Umkreissuche dar. +Für die Umkreissuche benötigt man allerdings noch weitere Tabellen. +Vorausgesetzt wird allerdings nur eine Tabelle, die man aber aus mehreren anderen Tabellen generieren muss. +Es handelt sich hierbei um die OpenGeoDB-Tabellen. Die Dokumentation zu OpenGeoDB findet man hier: + +http://opengeodb.org/wiki/OpenGeoDB_Dokumentation + +Die benötigten Tabellen findet man hier: + +http://www.fa-technik.adfc.de/code/opengeodb/ + +Davon werden 4 Tabellen benötigt: opengeodb-begin.sql, opengeodb-end.sql, opengeodb_hier.sql und +eine der Ländertabellen, z.B. DE.sql. Achtung 2/4 Tabellen sind riesig groß. Man kann die wahrscheinlich nur +über die mysql-Konsole fehlerfrei importieren. Aus diesen 4 Tabellen muss man eine eine weitere Tabelle erzeugen. +Die ganze Anleitung dazu findet man `hier +`_. + +Jedenfalls muss man nach dem Import noch folgende SQL-Statements ausführen (ersetze "de" durch dein Länderkürzel):: + + CREATE TABLE `geodb_zip_coordinates` ( + zc_id INT NOT NULL auto_increment PRIMARY KEY, + zc_loc_id INT NOT NULL , + zc_zip VARCHAR( 10 ) NOT NULL , + zc_location_name VARCHAR( 255 ) NOT NULL , + zc_lat DOUBLE NOT NULL , + zc_lon DOUBLE NOT NULL + ) + +und:: + + INSERT INTO geodb_zip_coordinates (zc_loc_id, zc_zip, zc_location_name, zc_lat, zc_lon) + SELECT gl.loc_id, plz.text_val, name.text_val, coord.lat, coord.lon + FROM geodb_textdata plz + LEFT JOIN geodb_textdata name ON plz.loc_id = name.loc_id + LEFT JOIN geodb_locations gl ON plz.loc_id = gl.loc_id + LEFT JOIN geodb_hierarchies tier ON plz.loc_id = tier.loc_id + LEFT JOIN geodb_coordinates coord ON plz.loc_id = coord.loc_id + WHERE plz.text_type = 500300000 + AND name.text_type = 500100000 + AND tier.id_lvl1 = 104 + AND tier.id_lvl2 = 105 + AND name.text_locale = "de" + AND gl.loc_type IN ( 100600000, 100700000 ); + +Das wars. Achtung: die Tabelle muss geodb_zip_coordinates und nicht nur zip_coordinates heissen! +Die neue Tabelle ist nur 1 MB groß und kann problemlos exportiert oder importiert werden. +Zur Not kann man die Tabelle also auf einem lokalen Server erzeugen und dann exportieren. +Die anderen geodb-Tabellen werden nicht mehr benötigt und können wieder gelöscht werden! + +Nachdem man die Tabelle erzeugt hat, kann man sie wie folgt benutzen: + +- Zuerst schaltete man die erweiterte Version ein. Mehr dazu findet man im vorherigen Kapitel. + +- Dann muss man noch angeben, welche Radius-Werte zur Auswahl stehen sollen. + +Wer wissen will, wie das aussieht, findet den Link zu einem Beispiel im Kapitel "Administration / HTML-Templates" +beim Template Map.html. diff --git a/Documentation/Localization.de_DE/Administration/ViewHelper/Index.rst b/Documentation/Localization.de_DE/Administration/ViewHelper/Index.rst new file mode 100644 index 0000000..552c81f --- /dev/null +++ b/Documentation/Localization.de_DE/Administration/ViewHelper/Index.rst @@ -0,0 +1,51 @@ + + +.. ================================================== +.. FOR YOUR INFORMATION +.. -------------------------------------------------- +.. -*- coding: utf-8 -*- with BOM. + +.. ================================================== +.. DEFINE SOME TEXTROLES +.. -------------------------------------------------- +.. role:: underline +.. role:: typoscript(code) +.. role:: ts(typoscript) + :class: typoscript +.. role:: php(code) + + +ViewHelpers +^^^^^^^^^^^ + +- Camaliga besitzt einen ViewHelper für Camaliga-Elemente und einen ViewHelper um JS- oder CSS-Dateien zu laden. + +- Den ViewHelper für Camaliga-Elemente kann man bei Seiten-Templates benutzen. Wozu? + Nun, wenn man Infos eines Elements an verschiedenen Stellen darstellen will, muss man nicht mehrere Plugins benutzen. + Stattdessen kann man auch das Seiten-Template anpassen und dort diesen ViewHelper benutzen. + Das ganze funktioniert freilich nur auf Camaliga-Single-Seiten und ist nützlich, wenn man z.B. den Titel + in einem Jumbotron darstellen will. Man kann den ViewHelper wie folgt im Seiten-Template benutzen. Am Anfang:: + + {namespace cam=Quizpalme\Camaliga\ViewHelpers} + + Und weiter unten:: + + + + Man kann diese param-Parameter benutzen: + camaliga_title, camaliga_shortdesc, camaliga_link, camaliga_image, camaliga_street, camaliga_zip, camaliga_city, camaliga_country, + camaliga_phone, camaliga_mobile, camaliga_email, camaliga_latitude, camaliga_longitude, camaliga_custom1, camaliga_custom_2, camaliga_custom3. + +- Den anderen ViewHelper kann man auf ähnliche Weise benutzen. Zuerst setzt man den Namespace und weiter unten nutzt man ihn dann so + zum einbinden von JS- oder CSS-Dateien:: + + + + + Das Beispiel stammt aus dem Carousel.html Template. Da kann man also schon mal sehen, welche Parameter man angeben kann. + Die CSS- und JS-Dateien werden Anhand der Endung erkannt. Zweites Beispiel mit allen Parametern:: + + + + + addSlah-parameter: füge einen Slash (/) am Anfang des Pfades hinzu? \ No newline at end of file diff --git a/Documentation/Localization.de_DE/BekannteProbleme/Index.rst b/Documentation/Localization.de_DE/BekannteProbleme/Index.rst new file mode 100644 index 0000000..7485918 --- /dev/null +++ b/Documentation/Localization.de_DE/BekannteProbleme/Index.rst @@ -0,0 +1,35 @@ + + +.. ================================================== +.. FOR YOUR INFORMATION +.. -------------------------------------------------- +.. -*- coding: utf-8 -*- with BOM. + +.. ================================================== +.. DEFINE SOME TEXTROLES +.. -------------------------------------------------- +.. role:: underline +.. role:: typoscript(code) +.. role:: ts(typoscript) + :class: typoscript +.. role:: php(code) + + +Bekannte Probleme +----------------- + +- Die Kategorien eines Elements werden nicht sortiert ausgegeben. + +- Die Kategorie-Relationen der übersetzten Elemente sind bugy: + `https://forge.typo3.org/issues/61923 + `_ + +- Es werden keine zugeordneten Kategorien nach einem Update auf TYPO3 6.2 mehr angezeigt. + Lösung: man muss das Update-Skript ausführen, um diesen TYPO3-Bug zu beheben. + +- TypoScript-Links von TYPO3 8.7 verdaut der Link-Viewhelper von TYPO3 noch nicht. + Das ist ein Bug in TYPO3 8.7. + +- Wenn du einen Bug findest, melde ihn unter TYPO3 Forge: + `http://forge.typo3.org/projects/show/extension-camaliga + `_ diff --git a/Documentation/Localization.de_DE/Benutzerhandbuch/Faq/Index.rst b/Documentation/Localization.de_DE/Benutzerhandbuch/Faq/Index.rst new file mode 100644 index 0000000..ff565ed --- /dev/null +++ b/Documentation/Localization.de_DE/Benutzerhandbuch/Faq/Index.rst @@ -0,0 +1,58 @@ + + +.. ================================================== +.. FOR YOUR INFORMATION +.. -------------------------------------------------- +.. -*- coding: utf-8 -*- with BOM. + +.. ================================================== +.. DEFINE SOME TEXTROLES +.. -------------------------------------------------- +.. role:: underline +.. role:: typoscript(code) +.. role:: ts(typoscript) + :class: typoscript +.. role:: php(code) + + +FAQ +^^^ + +- Wie kann ich das Layout anpassen? + + Siehe Kapitel Administration. + +- Was ist der Unterschied zwischen normalen und erweiterten Templates? + + Die erweiterten List- und Maps-Templates sind automatisch erweiterte Templates welche ein Suchformular beinhalten: + Sortierung und Einschränkungen (benutzt auch die Kategorien). Das + erweiterte Single-Template zeigt noch die Google-Karte und ggf. das Eltern- bzw. die Kinder-Elemente. + Man braucht die erweiterten Templates nicht mehr, da man mittlerweile fast jedes Template erweitern kann. + Mehr dazu siehe im Kapitel Administration → Erweiterte Templates + +- Kann ich auch responsive Bilder wie picture und srcset benutzen? + + Ja, das geht. Ein srcset-Beispiel findest du im Template Bootstrap.html. + +- Die Suche läuft nicht. Was ist los? + + Die Suche benutzt nur das Template, welches via "plugin.tx_camaliga.view.templateRootPaths.1" gesetzt wurde. + Alle anderen Templates werden ignoriert. Weiterhin muss das Template Search.html vorhanden sein, auch wenn es nicht ausgegeben wird. + +- Es läuft nicht! Wo kann der Fehler liegen? + + Es kann mehrere Ursachen geben. Als erstes sollte man sich die JavaScript-Konsole ansehen. + Wie man dahin kommt, ist bei jedem Browser anders. Die JavaScript-Konsole wird in der Regel etwas sagen. + Daraus kann man z.B. schliessen, dass jQuery noch nicht geladen wurde oder das das benötigte jQuery-Plugin fehlt. + Falls der Aufruf des jQuery-Plugins fehl schlägt, vergewissere dich davon, dass es schon geladen wurde. + Beachte dabei, dass du manche jQuery-Plugins erst downloaden musst! Falls du jQuery + erst im Footer lädst, musst du sämtliche JavaScripts aus den HTML-Templates auch in den Footer-Bereich verschieben. + Falls die JavaScript-Konsole nichts ausspuckt, sollte man einen Blick in den HTML-Quelltext werfen. + Falls dort keine Elemente zu sehen sind, wurde wahrscheinlich vergessen, den Ordner mit den Elementen auszuwählen. + Achtung: TYPO3 7 entfernt manchmal JavaScript, wenn es nicht mit CDATA gewrappt ist. TYPO3 8 hingegen entfernt alles + was mit CDATA gewrappt ist. Entferne also alle CDATA, wenn du TYPO3 8 benutzt. + +- Es läuft, aber es sieht elendig aus! Was ist los? + + Falls du ein externes jQuery-Plugin benutzt, musst du dich mit deren Dokumentation auseinander setzen. + Ansonsten kannst du mich um Rat fragen... diff --git a/Documentation/Localization.de_DE/Benutzerhandbuch/Images.txt b/Documentation/Localization.de_DE/Benutzerhandbuch/Images.txt new file mode 100644 index 0000000..348e415 --- /dev/null +++ b/Documentation/Localization.de_DE/Benutzerhandbuch/Images.txt @@ -0,0 +1,59 @@ +.. |img-5| image:: ../../Images/camaliga_element.png +.. :align: left +.. :border: 0 +.. :name: Bild 1 +.. :width: 295px + +.. |img-6| image:: ../../Images/camaliga_plugin.png +.. :align: left +.. :border: 0 +.. :name: Bild 2 +.. :width: 610px + +.. |img-7| image:: ../../Images/camaliga_template.png +.. :align: left +.. :border: 0 +.. :name: Grafik3 +.. :width: 507px + +.. |img-8| image:: ../../Images/camaliga_mode.png +.. :align: left +.. :border: 0 +.. :name: Grafik4 +.. :width: 100% + +.. |img-9| image:: ../../Images/camaliga_typoscript.png +.. :align: left +.. :border: 0 +.. :name: Grafik5 +.. :width: 100% + +.. |img-10| image:: ../../Images/camaliga_cat.png +.. :align: left +.. :border: 0 +.. :name: Grafik9 +.. :width: 100% + +.. |img-11| image:: ../../Images/camaliga_cat2.png +.. :align: left +.. :border: 0 +.. :name: Grafik7 +.. :width: 100% + +.. |img-12| image:: ../../Images/camaliga_cat3.png +.. :align: left +.. :border: 0 +.. :name: Grafik10 +.. :width: 100% + +.. |img-13| image:: ../../Images/camaliga_category.png +.. :align: left +.. :border: 0 +.. :name: Categories +.. :width: 100% + +.. |img-14| image:: ../../Images/camaliga_mother.png +.. :align: left +.. :border: 0 +.. :name: Grafik11 +.. :width: 100% diff --git a/Documentation/Localization.de_DE/Benutzerhandbuch/Index.rst b/Documentation/Localization.de_DE/Benutzerhandbuch/Index.rst new file mode 100644 index 0000000..504af8d --- /dev/null +++ b/Documentation/Localization.de_DE/Benutzerhandbuch/Index.rst @@ -0,0 +1,117 @@ +.. include:: Images.txt + +.. ================================================== +.. FOR YOUR INFORMATION +.. -------------------------------------------------- +.. -*- coding: utf-8 -*- with BOM. + +.. ================================================== +.. DEFINE SOME TEXTROLES +.. -------------------------------------------------- +.. role:: underline +.. role:: typoscript(code) +.. role:: ts(typoscript) + :class: typoscript +.. role:: php(code) + + +Benutzerhandbuch +---------------- + +- Als erstes sollte man das statische TypoScript hinzufügen: Template → + Info/Bearbeiten → Enthält → Statische Templates einschließen (aus Erweiterungen) → Camaliga. + +- Dann sollte man sich überlegen, welche Felder man braucht und wie die Bilder verwaltet werden sollen. + Lies das Kapitel Administration → Konfiguration via Extension-Manager. Das ist sehr wichtig für Admins, + da spätere Änderungen ggf. schwierig werden können. Lies auch das Kapitel Administration → Scheduler-Tasks + falls du ein Admin bist. + +- Erzeuge nun einen Ordner für die neuen Elemente und wechsele zu diesem + Ordner und in die Listen-Ansicht. Man kann Camaliga-Elemente aber auch auf normanel Seiten anlegen. + Lege ein paar neue Elemente an: + +|img-5| + +*Abbildung 5: Lege neue Elemente an* + +- Es gibt verschiedene Felder. Nur der Titel ist ein Pflichtfeld. Wenn + fertig, lege ein neues Plugin auf einer Seite an und wähle dabei das + Camaliga-Plug-In aus. Man wird jede Menge FlexForm-Einstellungen zu sehen bekommen: + +|img-6| + +*Abbildung 6: FlexForm-Einstellungen* + +- Wähle ein Layout und mach noch ein paar weitere Einstellungen: + +|img-7| + +*Abbildung 7: Wähle ein Layout aus* + +- Wähle den Ordner mit den Elementen. Wenn nichts gewählt wird, wird die + TypoScript-Einstellung genommen. Falls auch dort keine storagePid + gesetzt ist, wird das aktuelle Dokument als Speicherort verwendet. + +|img-8| + +*Abbildung 8: Wähle den Ordner* + +- Fertig. Man kann auch mit TypoScript noch ein paar weitere Einstellungen vornehmen, etwa die Bild-Größe: + +|img-9| + +*Abbildung 9: Einige TypoScript-Einstellungen* + +- Die TypoScript-Einstellungen werden im Kapitel Konfiguration beschrieben. + +- Wenn du auch die erweiterten Features dieser Extension nutzen willst, + musst du die TYPO3-Kategorien benutzen. Man kann die Kategorien aber auch in den anderen Fällen benutzen. + Man kann sie bei jedem Element ausgeben oder die Suche damit einschränken. + Beachte: die übergeordnete Kategorie wird in der erweiterten Ansicht als Beschreibung der Kategorie benutzt. Beispiel: + du hast eine Kategorie namens “Astrolabium”, dann sollte die + übergeordnete Kategorie z.B. “Typ” heissen, da sie die Kategorie + beschreibt. Siehe Bild: + +|img-10| + +*Abbildung 10: Erzeuge eine Kategorie* + +|img-11| + +*Abbildung 11: Wie man Kategorien benutzt* + +- Beachte: normallerweise werden die Kategorien als radio-Buttons in der Suche angeboten. Wenn man sie als checkbox benutzen will, + muss man bei der übergeordneten Kategorie “checkbox” bei Bemerkungen eintragen. + Die übergeordneten Kategorien werden nur bei den erweiterten Templates geprüft. + Bei den normalen Templates kann man angeben, wie alle ausgewählten Kategorien berücksichtigt werden sollen (AND oder OR). + Bei den erweiterten Templates kann man anhand der übergeordneten Kategorie bestimmen, ob ein AND oder OR benutzt werden soll. + Nun kann man die Kategorien in den Camaliga-Elementen benutzen: + +|img-12| + +*Abbildung 12: Benutze die Kategorien bei den Elementen* + +- Zu guter letzt kann man beim Plugin auswählen, welche Elemente anhand der vergebenen Kategorien bei der Ausgabe + berücksichtigt werden sollen: + +|img-13| + +*Abbildung 13: Die Kategorien wählt man bei den Plugin-Einstellungen aus* + +- Ein anderes Feature ist die Mutter-Kind-Beziehung. Das ist wichtig, + wenn man auf manchen Seiten nur eindeutige Elemente anzeigen will und + auf der Einzelansicht dann beide Elemente. Stattdessen könnte man + natürlich auch 2 verschiedene Ordner benutzten, aber die Mutter-Kind- + Beziehung ermöglicht auch noch weitere Schmanckerl. + +|img-14| + +*Abbildung 14: Mutter-Kind-Beziehung bei einem Element* + + +.. toctree:: + :maxdepth: 5 + :titlesonly: + :glob: + + Faq/Index diff --git a/Documentation/Localization.de_DE/Einleitung/DankeAn/Index.rst b/Documentation/Localization.de_DE/Einleitung/DankeAn/Index.rst new file mode 100644 index 0000000..5a36f6a --- /dev/null +++ b/Documentation/Localization.de_DE/Einleitung/DankeAn/Index.rst @@ -0,0 +1,27 @@ + + +.. ================================================== +.. FOR YOUR INFORMATION +.. -------------------------------------------------- +.. -*- coding: utf-8 -*- with BOM. + +.. ================================================== +.. DEFINE SOME TEXTROLES +.. -------------------------------------------------- +.. role:: underline +.. role:: typoscript(code) +.. role:: ts(typoscript) + :class: typoscript +.. role:: php(code) + + +Danke an ... +^^^^^^^^^^^^ + +Ich habe sehr viel Zeit in diese Extension investiert. Ich hoffe sie gefällt dir. Sie wurde teilweise gesponsort von: +`www.fixpunkt.com `_ + +Danke an die +`fixpunkt werbeagentur gmbh, Bonn `_, die geholfen hat, +`diese Extension `_ +weiter zu entwickeln, um sie mit der TYPO3-Community zu teilen. \ No newline at end of file diff --git a/Documentation/Localization.de_DE/Einleitung/Index.rst b/Documentation/Localization.de_DE/Einleitung/Index.rst new file mode 100644 index 0000000..1ef4250 --- /dev/null +++ b/Documentation/Localization.de_DE/Einleitung/Index.rst @@ -0,0 +1,30 @@ + + +.. ================================================== +.. FOR YOUR INFORMATION +.. -------------------------------------------------- +.. -*- coding: utf-8 -*- with BOM. + +.. ================================================== +.. DEFINE SOME TEXTROLES +.. -------------------------------------------------- +.. role:: underline +.. role:: typoscript(code) +.. role:: ts(typoscript) + :class: typoscript +.. role:: php(code) + + +Einleitung +---------- + + +.. toctree:: + :maxdepth: 5 + :titlesonly: + :glob: + + WasMachtDieExtension/Index + Screenshots/Index + Kontakt/Index + DankeAn/Index diff --git a/Documentation/Localization.de_DE/Einleitung/Kontakt/Index.rst b/Documentation/Localization.de_DE/Einleitung/Kontakt/Index.rst new file mode 100644 index 0000000..702239f --- /dev/null +++ b/Documentation/Localization.de_DE/Einleitung/Kontakt/Index.rst @@ -0,0 +1,25 @@ + + +.. ================================================== +.. FOR YOUR INFORMATION +.. -------------------------------------------------- +.. -*- coding: utf-8 -*- with BOM. + +.. ================================================== +.. DEFINE SOME TEXTROLES +.. -------------------------------------------------- +.. role:: underline +.. role:: typoscript(code) +.. role:: ts(typoscript) + :class: typoscript +.. role:: php(code) + + +Kontakt +^^^^^^^ + +- Man kann mir eine Nachricht über meine Homepage schreiben: + + `www.quizpalme.de/kontakt.html + `_ + diff --git a/Documentation/Localization.de_DE/Einleitung/Screenshots/Images.txt b/Documentation/Localization.de_DE/Einleitung/Screenshots/Images.txt new file mode 100644 index 0000000..b5040dc --- /dev/null +++ b/Documentation/Localization.de_DE/Einleitung/Screenshots/Images.txt @@ -0,0 +1,35 @@ +.. |img-1| image:: ../../../Images/camaliga_screenshot1.jpg +.. :align: left +.. :border: 0 +.. :name: Beispiel1 +.. :width: 100% + +.. |img-2| image:: ../../../Images/camaliga_screenshot2.jpg +.. :align: left +.. :border: 0 +.. :name: Beispiel2 +.. :width: 100% + +.. |img-3| image:: ../../../Images/camaliga_screenshot3.jpg +.. :align: left +.. :border: 0 +.. :name: Beispiel3 +.. :width: 100% + +.. |img-4| image:: ../../../Images/camaliga_screenshot4.jpg +.. :align: left +.. :border: 0 +.. :name: Beispiel4 +.. :width: 100% + +.. |img-38| image:: ../../../Images/camaliga-suchfelder.jpg +.. :align: left +.. :border: 0 +.. :name: Beispiel5 +.. :width: 100% + +.. |img-39| image:: ../../../Images/camaliga-backend-fields.jpg +.. :align: left +.. :border: 0 +.. :name: Beispiel6 +.. :width: 100% diff --git a/Documentation/Localization.de_DE/Einleitung/Screenshots/Index.rst b/Documentation/Localization.de_DE/Einleitung/Screenshots/Index.rst new file mode 100644 index 0000000..360f7e3 --- /dev/null +++ b/Documentation/Localization.de_DE/Einleitung/Screenshots/Index.rst @@ -0,0 +1,66 @@ +.. include:: Images.txt + +.. ================================================== +.. FOR YOUR INFORMATION +.. -------------------------------------------------- +.. -*- coding: utf-8 -*- with BOM. + +.. ================================================== +.. DEFINE SOME TEXTROLES +.. -------------------------------------------------- +.. role:: underline +.. role:: typoscript(code) +.. role:: ts(typoscript) + :class: typoscript +.. role:: php(code) + + +Screenshots +^^^^^^^^^^^ + +- Ein paar Eindrücke. Nur eine Auswahl der Möglichkeiten. Im Kapitel Tutorial findet man mehr Screenshots. + Im Kapitel Administration/HTML-Templates findet man Links zu den Demo-Seiten. + Screenshots aus dem Backend findet man auch im Benutzerhandbuch. + +.. ### BEGIN~OF~TABLE ### + +.. container:: table-row + + a + |img-1| + + *Abbildung 1: Ein Karussell mit 3 Elementen* + + b + |img-2| + + *Abbildung 2: Eine der vielen Galerien* + + +.. container:: table-row + + a + |img-3| + + *Abbildung 3: Eine Listen-Ansicht* + + b + |img-4| + + *Abbildung 4: Eine GoogleMaps-Karte* + + +.. container:: table-row + + a + |img-38| + + *Abbildung 5: Beispiel für Suchfelder im Frontend* + + b + |img-39| + + *Abbildung 6: Einige der Felder im Backend (nicht benötige Felder kann man deaktivieren)* + +.. ###### END~OF~TABLE ###### + diff --git a/Documentation/Localization.de_DE/Einleitung/WasMachtDieExtension/Index.rst b/Documentation/Localization.de_DE/Einleitung/WasMachtDieExtension/Index.rst new file mode 100644 index 0000000..3740431 --- /dev/null +++ b/Documentation/Localization.de_DE/Einleitung/WasMachtDieExtension/Index.rst @@ -0,0 +1,41 @@ + + +.. ================================================== +.. FOR YOUR INFORMATION +.. -------------------------------------------------- +.. -*- coding: utf-8 -*- with BOM. + +.. ================================================== +.. DEFINE SOME TEXTROLES +.. -------------------------------------------------- +.. role:: underline +.. role:: typoscript(code) +.. role:: ts(typoscript) + :class: typoscript +.. role:: php(code) + + +Was macht die Extension? +^^^^^^^^^^^^^^^^^^^^^^^^ + +Diese flexible Extension kann Elemente z.B. als Karussell, Galerie, Liste oder auf einer Google Karte anzeigen und +benötigt TYPO3 6.2.2-7.6.99. Features: + +- Viele Templates für die Ausgabe vorhanden. + +- Man kann die Kategorien von TYPO3 benutzen, um die Elemente zu klassifizieren und die Ergebnisse im + Front-End einzuschränken (Suche nach Kategorien). + +- Auch eine Volltextsuche ist vorhanden. + +- Eine Umkreissuche funktioniert auch, wenn man eine OpenGeoDB-Tabellen anlegt. + +- Man kann natürlich auch verschiedene andere jQuery-Plugins benutzen – selbst eigene. + +- Auch Bootstrap wird unterstützt. Es gibt dazu 4 Templates: Karussell, Tab, Akkordeon und Modal. + +- ke_search wird unterstüzt. + +- Viele Import-Skripte sind vorhanden. Auch ein Planer-Task für den CSV-Export ist vorhanden. + +Die Extension ist nicht immer einfach zu benutzen, aber sie ist sehr flexibel und Admin werden das mögen. \ No newline at end of file diff --git a/Documentation/Localization.de_DE/Index.rst b/Documentation/Localization.de_DE/Index.rst new file mode 100644 index 0000000..af12b7c --- /dev/null +++ b/Documentation/Localization.de_DE/Index.rst @@ -0,0 +1,60 @@ + + +.. ================================================== +.. FOR YOUR INFORMATION +.. -------------------------------------------------- +.. -*- coding: utf-8 -*- with BOM. + +.. ================================================== +.. DEFINE SOME TEXTROLES +.. -------------------------------------------------- +.. role:: underline +.. role:: typoscript(code) +.. role:: ts(typoscript) + :class: typoscript +.. role:: php(code) + + +========================================= +EXT: Camaliga - carousel/map/list/gallery +========================================= + +:Extension: + camaliga + +:Beschreibung: + Camaliga carousel/map/list/gallery ist eine flexible Extension um Elemente auf verschiedene Art anzuzeigen. Es können Kategorien für Sortierung und Restriktionen genutzt werden. Zudem gibt es eine Volltextsuche und eine Umkreissuche. Außerdem kann man verschiedene jQuery-Plugins benutzen. + +:Keywords: + extbase, fluid, carousel, gallery, slider, google, maps, geo + +:Autor: + Kurt Gusbeth + +:Email: + info@quizpalme.de + +:Website: + `www.quizpalme.de `_ + +:Spachen: + `english Version `_, `deutsche Version `_ + + +.. toctree:: + :maxdepth: 5 + :titlesonly: + :glob: + + Einleitung/Index + Benutzerhandbuch/Index + Administration/Index + Konfiguration/Index + Tutorial/Index + Updaten/Index + Updaten5/Index + Updaten6/Index + Updaten7/Index + BekannteProbleme/Index + Todo-liste/Index + Nderungen/Index diff --git a/Documentation/Localization.de_DE/Konfiguration/Faq/Index.rst b/Documentation/Localization.de_DE/Konfiguration/Faq/Index.rst new file mode 100644 index 0000000..10138d8 --- /dev/null +++ b/Documentation/Localization.de_DE/Konfiguration/Faq/Index.rst @@ -0,0 +1,37 @@ + + +.. ================================================== +.. FOR YOUR INFORMATION +.. -------------------------------------------------- +.. -*- coding: utf-8 -*- with BOM. + +.. ================================================== +.. DEFINE SOME TEXTROLES +.. -------------------------------------------------- +.. role:: underline +.. role:: typoscript(code) +.. role:: ts(typoscript) + :class: typoscript +.. role:: php(code) + + +FAQ +^^^ + +- Ich brauche mehr Konfigurationsmöglichkeiten! Was kann ich tun? + + Du kannst deine eigenen “settings” per TypoScript definieren und in den + Templates benutzen! Hier ein Beispiel: + +TypoScript: + +:: + + plugin.tx_camaliga.settings.myvar = 'showall' + +HTML-Template / JavaScript: + +:: + + var myvar = {settings.myvar}; + diff --git a/Documentation/Localization.de_DE/Konfiguration/Index.rst b/Documentation/Localization.de_DE/Konfiguration/Index.rst new file mode 100644 index 0000000..efa658b --- /dev/null +++ b/Documentation/Localization.de_DE/Konfiguration/Index.rst @@ -0,0 +1,36 @@ + + +.. ================================================== +.. FOR YOUR INFORMATION +.. -------------------------------------------------- +.. -*- coding: utf-8 -*- with BOM. + +.. ================================================== +.. DEFINE SOME TEXTROLES +.. -------------------------------------------------- +.. role:: underline +.. role:: typoscript(code) +.. role:: ts(typoscript) + :class: typoscript +.. role:: php(code) + + +Konfiguration +------------- + +- Hier findest du eine TypoScript-Referenz und die Einstellungen fürs + Karussell. + + +.. toctree:: + :maxdepth: 5 + :titlesonly: + :glob: + + Typoscript-referenz/Index + Karussell-konfiguration/Index + PageTSconfig/Index + Verlinkung/Index + realurl/Index + Faq/Index + diff --git a/Documentation/Localization.de_DE/Konfiguration/Karussell-konfiguration/Index.rst b/Documentation/Localization.de_DE/Konfiguration/Karussell-konfiguration/Index.rst new file mode 100644 index 0000000..f8f9e31 --- /dev/null +++ b/Documentation/Localization.de_DE/Konfiguration/Karussell-konfiguration/Index.rst @@ -0,0 +1,89 @@ + + +.. ================================================== +.. FOR YOUR INFORMATION +.. -------------------------------------------------- +.. -*- coding: utf-8 -*- with BOM. + +.. ================================================== +.. DEFINE SOME TEXTROLES +.. -------------------------------------------------- +.. role:: underline +.. role:: typoscript(code) +.. role:: ts(typoscript) + :class: typoscript +.. role:: php(code) + + +Karussell-Konfiguration +^^^^^^^^^^^^^^^^^^^^^^^ + +- Diese Extension besitzt ein eigenes jQuery Karussel-Plugin. Alle + anderen jQuery-Plugins muss man erst downloaden und ins fileadmin- + Verzeichnis kopieren. Beim onboard plugin handelt es sich um ein + einfaches Karusell mit einigen Einstellungen. Die werde ich hier + beschreiben. Man kann das jQuery-Plugin auch zwei mal gleichzeitig + benutzen, wenn man das Bild getrennt vom Text animieren will. Im + CarouselSeparated.html Template wird das gemacht. “.camaliga” muss + dabei für jedes ul-Element mit li-Elementen von Camaliga benutzt + werden. + +===================== =========== ========================================================== =========== +Property Data type Description Default +===================== =========== ========================================================== =========== +auto\_slide boolean 0: nein. 0 + + 1: ja, automatisch weiter sliden. +hover\_pause boolean 0: nein. 0 + + 1: ja, stoppe das automatische weiter sliden bei on + mouse hover. +auto\_slide\_seconds int Automatisch weiter sliden nach … Millisekunden. 7500 +infinitive boolean 0: nein. 0 + + 1: ja, das Karussell ist unendlich und startet am Ende + von vorne. Man beachte, dass man in diesem Fall + mindestens n+2 Elemente braucht (n: Anzahl der + sichtbaren Elemente). +item\_width int Breite eines Elements: width + padding + margin. 0 + Man muss diese Angabe nur machen, wenn man beim + li-Element padding oder margin>0 gesetzt hat. + Andernfalls wird die Breite automatisch berechnet. +li\_name string Normallerweise holt sich das Plugin alle li-Elemente li + des angegeben ul-Elements. Wenn man nun aber auch im + li-Element ul-li-Elemente hat, muss man dem li-Elememt + mit den Camaliga-Element eine class zuweisen + und diesen Namen dem Plugin mitteilen. +left\_scroll string Class oder ID des DIV-Elements des nach links zeigenden + Pfeils. Dies wird nur dann benötigt, wenn infinitive + gleich 0 ist und wenn man dann am Anfang des Karussells + inaktive Pfeile darstellen will. Das Plugin fügt dann + die Class “camaliga\_first” zu diesem DIV-Element hinzu, + wenn das erste Element links angezeigt wird. +right\_scroll string Class oder ID des DIV-Elements des nach rechts zeigenden + Pfeils. Dies wird nur dann benötigt, wenn infinitive + gleich 0 ist und wenn man dann am Ende des Karussells + inaktive Pfeile darstellen will. Das Plugin fügt dann die + Class “camaliga\_last” zu diesem DIV-Element hinzu, wenn + das letzte Element rechts angezeigt wird. +===================== =========== ========================================================== =========== + + +Beispiel +~~~~~~~~ + +Hier ein Beispiel mit einigen Einstellungen: + +:: + + $('#carousel_ul').camaliga({ + auto_slide: 0, + hover_pause: 0, + auto_slide_seconds: 5000, + infinite: 0, + item_width: 215, + li_name: 'li.carousel_li', + left_scroll: '#left_scroll', + right_scroll: '#right_scroll' + }); + diff --git a/Documentation/Localization.de_DE/Konfiguration/PageTSconfig/Images.txt b/Documentation/Localization.de_DE/Konfiguration/PageTSconfig/Images.txt new file mode 100644 index 0000000..aa2e369 --- /dev/null +++ b/Documentation/Localization.de_DE/Konfiguration/PageTSconfig/Images.txt @@ -0,0 +1,6 @@ +.. |img-17| image:: ../../../Images/camaliga_tsconfig.png +.. :align: left +.. :border: 0 +.. :name: Grafik16 +.. :width: 100% + diff --git a/Documentation/Localization.de_DE/Konfiguration/PageTSconfig/Index.rst b/Documentation/Localization.de_DE/Konfiguration/PageTSconfig/Index.rst new file mode 100644 index 0000000..0050f45 --- /dev/null +++ b/Documentation/Localization.de_DE/Konfiguration/PageTSconfig/Index.rst @@ -0,0 +1,69 @@ +.. include:: Images.txt + +.. ================================================== +.. FOR YOUR INFORMATION +.. -------------------------------------------------- +.. -*- coding: utf-8 -*- with BOM. + +.. ================================================== +.. DEFINE SOME TEXTROLES +.. -------------------------------------------------- +.. role:: underline +.. role:: typoscript(code) +.. role:: ts(typoscript) + :class: typoscript +.. role:: php(code) + + +Seiten-TSconfig +^^^^^^^^^^^^^^^ + +- Mittels der TypoScript-Konfiguration über Seiten-TSconfig kann man mehrere Layout für ein Template definieren. + +Beispiel +~~~~~~~~ + +Hier werden 3 Layouts für ein Template definiert: + +:: + + tx_camaliga.templateLayouts { + 0 = Standard-Layout + 1 = Layout für die linke Spalte + 2 = Layout für die rechte Spalte + } + + +- Man kann jede Nummer oder Beschreibung benutzen. +- Danach kann man über die FlexForms eins der Layouts auswählen. +- Zu guter letzt müssen die Layouts in einem beliebigen Template abgefragt werden. + Die if-Abfrage gehört ins innere des Templates. + +Beispiel +~~~~~~~~ + +Hier ein Beispiel mit 2 Layouts: + +:: + + + + + + +

Telefon-Nr.: {content.phone}
+ Handy-Nr.: {content.mobile}
+ E-Mail: {content.email}

+
+
+ +- Weiterhin kann man die TSconfig benutzen, um Camaliga-Felder umzubennen oder zu verstecken. Hier 2 wichtige Beispiele: + +:: + + TCEFORM.tx_camaliga_domain_model_content.custom1.label = Datum: + TCEFORM.tx_camaliga_domain_model_content.custom2.disabled = 1 + +|img-17| + +*Abbildung 17: Dies findet man im Ressources-Tab einer Seite* diff --git a/Documentation/Localization.de_DE/Konfiguration/Typoscript-referenz/Index.rst b/Documentation/Localization.de_DE/Konfiguration/Typoscript-referenz/Index.rst new file mode 100644 index 0000000..e4749d4 --- /dev/null +++ b/Documentation/Localization.de_DE/Konfiguration/Typoscript-referenz/Index.rst @@ -0,0 +1,194 @@ + + +.. ================================================== +.. FOR YOUR INFORMATION +.. -------------------------------------------------- +.. -*- coding: utf-8 -*- with BOM. + +.. ================================================== +.. DEFINE SOME TEXTROLES +.. -------------------------------------------------- +.. role:: underline +.. role:: typoscript(code) +.. role:: ts(typoscript) + :class: typoscript +.. role:: php(code) + + +TypoScript-Referenz +^^^^^^^^^^^^^^^^^^^ + +- Hiermit kann man zahlreiche Einstellungen vornehmen. + +======================================== ============= ================================================================================= =========== +Variable Datentyp Beschreibung Standard +======================================== ============= ================================================================================= =========== +view.templateRootPaths.0 & .1 string Pfad zu den Templates. EXT:... + + **Beispiel:** + + :: + + plugin.tx_camaliga.view.templateRootPaths.1 = fileadmin/template/files/ +view.partialRootPaths.0 & .1 string Pfad zu den partials des Template. EXT:... +view.layoutRootPaths.0 & .1 string Pfad zu dem layout des Template. EXT:... +persistence.storagePid int Speicherort der Camaliga-Elemente. Kann auch beim Plugin angegeben werden. +features.rewrittenPropertyMapper boolean Benutze den neuen Property Mapper? 1 +settings.defaultStoragePids String / int Komma-separierte Liste von storage PIDs. Dies muss eine Untermenge von + storagePid sein. Macht nur bei einem erweiterten Template Sinn. + + **Syntax:** + + :: + + [pid1],[pid2],[pid3] + + **Beispiel:** + + :: + + plugin.tx_camaliga.settings.defaultStoragePids = 354,349 +settings.defaultCatIDs String / int Standard-Kategorien. Nur Elemente mit dieser Kategorie werden + angezeigt. Kann vom Benutzer in einem erweiterten Template geändert + werden. + + **Syntax:** + + :: + + [cat1],[cat2],[cat3] + + **Beispiel:** + + :: + + plugin.tx_camaliga.settings.defaultCatIDs = 2,3 +settings.listId int ID der Seite für die Listenansicht. +settings.showId int ID der Seite für die Einzelansicht. +settings.sortBy string Sortieren nach? sorting + + **Syntax:** + + :: + + sorting|tstamp|crdate|title|zip|city|country|custom1|custom2|custom3 +settings.sortOrder string Sortierreihenfolge? asc + + **Syntax:** + + :: + + asc|desc +settings.limit integer Anzahl der Elemente, die aus der Datenbank geholt werden sollen. 0 + Das ist also die Anzahl der sichtbaren Elemente bei einer Liste. 0=alle. +settings.random boolean Die Elemente zufällig sortieren? 0 + + 0: nein. + + 1: ja, jedes mal wenn der Cache geleert wird. +settings.getLatLon boolean Versuche die Latitude und Longitude automatisch zu finden? 0 + Die Position einer vorhanden Adresse ohne Latitude wird über einen + Google-Server erfragt. + + 0: nein. + + 1: ja, suche die Position in einem Karussell-, List- oder Map- Template. +settings.onlyDistinct boolean Zeige nur eindeutige Elemente an? 0 + + 0: nein. + + 1: ja, zeige nur das übergeordnete Element an, wenn Kinder vorhanden sind + oder zeige ein Kind-Element, wenn das übergeordnete Element nicht + vorhanden ist. +settings.normalCategoryMode string Wie sollen bei normalen Templates die Kategorien bei der Suche berücksichtigt and + werden? + + and: und-Suche + + or: oder-Suche +settings.overrideFlexformSettingsIfEmpty boolean Überschreibe die FlexForm-Einstellungen mit den TypoScript- 1 + Einstellungen, falls die FlexForm-Einstellung leer ist? + + 0: nein. + + 1: ja (funktioniert gut, außer bei den Checkbox-Einstellungen). +settings.img.width int Breite eines Bildes. Kann im Template benutzt werden... 700 +settings.img.height int Höhe eines Bildes. 500 +settings.img.thumbWidth int Thumbnail-Breite eines Bildes. 195 +settings.img.thumbHeight int Thumbnail-Höhe eines Bildes. 139 +settings.item.width int Breite eines (carousel-)Elementes. 195 +settings.item.height int Höhe eines (carousel-)Elementes. 290 +settings.item.padding int Padding eines (carousel-)Elementes. 0 +settings.item.margin int Marging eines (carousel-)Elementes. 10 +settings.item.items int Anzahl der sichtbaren Elemente (JavaScript-Parameter). 3 +settings.maps.key string Google maps API key +settings.maps.language int Google maps API language de +settings.maps.dontIncludeAPI boolean Das JS mit dem Google maps API key nicht einbinden? 0 +settings.maps.includeRoute boolean Das Partial für die Routenplannung einbinden? 0 +settings.maps.zoom int Zoom-Level für die nächsten 2 Werte 5 +settings.maps.startLatitude float Latitude für eine leere Karte 50.0 +settings.maps.startLongitude float Longitude für eine leere Karte 10.0 +settings.seo.setTitle boolean Ersetze auf den Single-Seiten den Seiten-Titel durch den Titel des 0 + angezeigten Elements? + + 0: nein. 1: ja, ersetzte den Titel. +settings.seo.setIndexedDocTitle boolean Ersetze in einer Sitemap den Titel eines Single-Elements? 0 + + 0: nein. 1: ja. +settings.seo.setDescription boolean Ersetze auf den Single-Seiten die Seiten-Beschreibung durch das Feld 0 + Kurzbeschreibung? Funktioniert nicht mit der metaseo-Extension. + + 0: nein. 1: ja, ersetzte die meta-description. +settings.seo.setOgTitle boolean Füge den og:title-Tag im Header einer Einzelansicht hinzu? 0 + + 0: nein; 1: ja. +settings.seo.setOgDescription boolean Füge den og:description-Tag im Header einer Einzelansicht hinzu? 0 + + 0: nein; 1: ja. +settings.seo.setOgImage boolean Füge das og:image Meta-Tag zum Header hinzu auf Single-Seiten falls ein Bild 0 + vorhanden ist? + + 0: nein. 1: ja, füge og:image mit Bild 1 hinzu. +settings.extended.enable boolean Das erweiterte Template einschalten? Siehe Kapitel "Erweiterte Templates" 0 + + Die nachfolgenden 3 Einstellungen wirken sich nur aus, wenn diese Option + eingeschaltet ist. +settings.extended.onlySearchForm boolean Am Anfang nur ein leeres Suchformular anzeigen? 0 +settings.extended.restrictSearch boolean Weniger Suchoptionen anzeigen? 0 +settings.extended.radiusValues string Kommaseparierte Werte für die Selectbox bei der Umkreissuche. + + **Syntax:** + + :: + + [km1],[km2],[km3] + + **Beispiel:** + + :: + + plugin.tx_camaliga.settings.extended.radiusValues = 10,25,50,100 +settings.extended.saveSearch boolean Suchoptionen in einem Cookie speichern und das später benutzen? 0 +settings.more.setModulo boolean Füge Modulo-Werte zu jedem Camaliga-Element hinzu? 0 + {content.moduloBegin} und {content.moduloEnd} werden gesetzt. Diese hängen ab + von settings.item.items. Siehe Template Ekko.html für ein Beispiel. +settings.more.addLightbox boolean Füge eine Lightbox beim Galleryview-Template hinzu? Kann so auch bei anderen 0 + Templates wie in Galleryview.html benutzt werden. +settings.more.* mixed Viele Optionen für Silders wie Flexslider2, Slick carousel, Galleryview. +settings.bootstrap.* mixed Siehe bei den FlexForms und/oder der Bootstrap-Homepage. +======================================== ============= ================================================================================= =========== + +Beispiel +~~~~~~~~ + +Hier ein Beispiel mit einigen Einstellungen: + +:: + + plugin.tx_camaliga { + view.templateRootPaths.1 = fileadmin/template/camaliga/ + settings.defaultCatIDs = 4,5 + settings.showId = 410 + settings.listId = 402 + } + diff --git a/Documentation/Localization.de_DE/Konfiguration/Verlinkung/Index.rst b/Documentation/Localization.de_DE/Konfiguration/Verlinkung/Index.rst new file mode 100644 index 0000000..430fa98 --- /dev/null +++ b/Documentation/Localization.de_DE/Konfiguration/Verlinkung/Index.rst @@ -0,0 +1,61 @@ + + +.. ================================================== +.. FOR YOUR INFORMATION +.. -------------------------------------------------- +.. -*- coding: utf-8 -*- with BOM. + +.. ================================================== +.. DEFINE SOME TEXTROLES +.. -------------------------------------------------- +.. role:: underline +.. role:: typoscript(code) +.. role:: ts(typoscript) + :class: typoscript +.. role:: php(code) + + +Verlinkung +^^^^^^^^^^ + +- Mittels der TypoScript-Konfiguration und über Seiten-TSconfig kann man es einrichten, + dass man auch auf die Einzelansicht eines Camaliga-Elements direkt im RTE verlinken kann. + + Dazu braucht man allerdings noch eine Zusatz-Extension. Sie heißt "linkhandler". Leider ist die Extension im TER völlig veraltert. + Für TYPO3 7.6 findet man eine gute Version von linkhandler hier: + + https://github.com/cobwebch/linkhandler + + Man muss nun Linkhandler auf eine andere Art verwenden als früher. Hier ein Beispiel: + +- Im Seiten-TS-Config fügt man das hier hinzu (die 64 ersetzen!): + +:: + + TCEMAIN.linkHandler.camaliga { + handler = Cobweb\Linkhandler\RecordLinkHandler + label = Camaliga + configuration { + table = tx_camaliga_domain_model_content + storagePid = 64 + } + displayAfter = page + scanAfter = page + } + + +- Dann braucht man noch etwas TypoScript-Setup (die 112 ersetzen!): + +:: + + plugin.tx_linkhandler.camaliga { + // Do not force link generation when the news records are hidden or deleted. + forceLink = 0 + + typolink { + parameter = 112 + additionalParams = &tx_camaliga_pi1[content]={field:uid}&tx_camaliga_pi1[controller]=Content&tx_camaliga_pi1[action]=show + additionalParams.insertData = 1 + useCacheHash = 1 + } + } \ No newline at end of file diff --git a/Documentation/Localization.de_DE/Konfiguration/realurl/Index.rst b/Documentation/Localization.de_DE/Konfiguration/realurl/Index.rst new file mode 100644 index 0000000..c51742f --- /dev/null +++ b/Documentation/Localization.de_DE/Konfiguration/realurl/Index.rst @@ -0,0 +1,48 @@ + + +.. ================================================== +.. FOR YOUR INFORMATION +.. -------------------------------------------------- +.. -*- coding: utf-8 -*- with BOM. + +.. ================================================== +.. DEFINE SOME TEXTROLES +.. -------------------------------------------------- +.. role:: underline +.. role:: typoscript(code) +.. role:: ts(typoscript) + :class: typoscript +.. role:: php(code) + + +realUrl +^^^^^^^ + +- Man kann diese Extension auch mit realUrl verwenden. + +Beispiel +~~~~~~~~ + +Hier ein Beispiel für deine realurl-config-Datei: + +:: + + 'postVarSets' => array( + '_DEFAULT' => array( + ... + + 'camaliga' => array( // darf nicht wie die seite heißen + array( + 'GETvar' => 'tx_camaliga_pi1[action]', + ), + array( + 'GETvar' => 'tx_camaliga_pi1[controller]', + ), + array( + 'GETvar' => 'tx_camaliga_pi1[content]', + ), + ), + + ... + ), + ), \ No newline at end of file diff --git a/Documentation/Localization.de_DE/Nderungen/Index.rst b/Documentation/Localization.de_DE/Nderungen/Index.rst new file mode 100644 index 0000000..271f899 --- /dev/null +++ b/Documentation/Localization.de_DE/Nderungen/Index.rst @@ -0,0 +1,177 @@ + + +.. ================================================== +.. FOR YOUR INFORMATION +.. -------------------------------------------------- +.. -*- coding: utf-8 -*- with BOM. + +.. ================================================== +.. DEFINE SOME TEXTROLES +.. -------------------------------------------------- +.. role:: underline +.. role:: typoscript(code) +.. role:: ts(typoscript) + :class: typoscript +.. role:: php(code) + + +Änderungen +---------- + +- Hier findet man die Änderungen... + +========== ===================================================================================================================== +Version Änderungen +========== ===================================================================================================================== +0.1.0 Erster Upload ins TER. +0.1.2 Google PicasaWeb-Import und FancyBox-Template hinzugefügt. Tutorial hinzugefügt. +1.0.0 Mehr TypoScript- und FlexForm-Einstellungen. Karussell-Beispiel upgedatet. +1.1.0 Einige Beispiele hinzugefügt. Karussell-Import verbessert. +1.2.0 Schwerer Bug gefixt: falscher Pfad zu den Templates. Einige Beispiele hinzugefügt. +1.2.1 Test der neuen ReST Dokumentation. +1.2.3 Dokumentation angepasst. sxw-Dokument gelöscht. Liste der Kategorien sortiert. +1.3.0 S Gallery und jQuery.Flipster Template hinzugefügt. + Template Carousel.html verbessert. + Weitere Größen-Variablen hinzugefügt. + Bug gefixt: man kann die 0 auch in den FlexForms benutzen. +1.4.0 Update-Skript hinzugefügt. Bitte nach einen Update auf Typo3 6.2 ausführen, + falls man in der Version 6.0 oder 6.1 Kategorien benutzt hat! + Kategorien zu den FlexForms hinzugefügt. +2.0.0 Die Kategorie-Ausgabe ist nun sprachabhängig. categoryMode-Einstellung hinzugefügt. + {content.categories} wurde in {content.categoriesAndParents} umbenannt. Ersteres liefert nun eine andere Liste! + Siehe Kapitel Administration/Kategorien. + + Template-Layouts hinzugefügt: damit man mehrere Layouts in einem Template verwenden kann + (siehe Kapitel Seiten-TSconfig). + + 3 neue Felder hinzugefügt: Telefon, Handy und E-Mail. + + 3 neue HTML-Templates hinzugefügt (SKDslider, OWL carousel 2, Responsive Carousel). + + Hooks für die Extensions linkvalidator und ke_search hinzugefügt. +3.0.0 Die Kategorien-Suche läuft nun mit allen Templates, nicht nur mit den erweiterten Templates. + + Neue Felder: 4 weitere Bilder mit Beschreibung für die Detail-Ansicht. + + Ordner-Bild hinzugefügt. + + Fast alle Templates wurden verbessert (z.B. optimiert für Bootstrap 3). + + Erfolgreich getestet mit Typo3 7.0 und der Extension compatibility6. Min. Vorraussetzung auf Typo3 6.2.2 + geändert. +3.1.0 Template Tab.html (für Bootstrap) und Lightslider.html hinzugefügt. + + Option hinzugefügt: automatische Suche nach Latitude und Longitude. + + Möglichkeit eingebaut, die Camaliga-Tabelle zu erweitern. + + Typo3 7 Kompatibilität erhöht (läuft noch nicht ganz mit Typo3 7.1). +3.2.0 Bug gefixt: Fehler beim tt_news-Import. + Typo3 7 Kompatibilität erhöht. + + Neues Backend-Formular: sortierbare Bilderübersicht. + + Neue Templates: Isotope, jQuery Full Width Image Slider, Coolcarousel. +4.0.0 Template-Liste in den FlexForms anders sortiert/gegliedert. Demo-Link zu den Templates in diese Doku eingebaut. + + Neue Templates: slick carousel, Bootstrap Collapse/Accordion, Bootstrap Modal. + + Neue FlexForms für die Konfiguration der 4 Bootstrap-Templates. + + Zahlreiche Verbesserungen (z.B. bei der Suche nach Kategorien bei normalen Templates). +5.0.0 Erweiterte Templates können nun durch eine Option eingeschaltet werden. Siehe Kapitel "Updaten auf camaliga 5.0.0". + + 3 Templates sind nun veraltet und sollten nicht mehr benutzt werden. Siehe Kapitel "Updaten auf camaliga 5.0.0". + + Neue Backend-Module: CSV-Import und mv_cooking-Import. + + Brandneu: Volltextsuche und Umkreissuche. + + Neue Optionen: Sortierung nach crdate, settings.limit, settings.extended.* + + Neue Templates: search (siehe Kapitel "Administration / Erweiterte Templates"). + + ke_search-Indexer umbenannt. + + Bug gefixt: Sortierung bei normalen Templates mit Kategorien. +6.0.0 Camaliga ist nun TYPO3 7 LTS kompatibel: + + - Vendor-Name geändert -> man muss nach dem Updaten den allgemeinen Chache löschen! + - alte Methoden ersetzt. + - Pfad zu den Templates geändert -> siehe Kapitel Konfiguration/TypoScript-Referenz und Updaten auf camaliga 6.0.0. + + Planer-Task für CSV-Export hinzugefügt. + + Veraltete actions und Templates entfernt: galleryviewExtended, adGalleryExtended und mapExtended. +6.0.3 TCA-Problem mit TYPO3 7 gefixt (evt. den allg. Cache löschen). + + double7-Validator gefixt. + + TS settings.googleMapsKey hinzugefügt. +6.0.6 TYPO3 7 Bugfix. + + TS hinzugefügt: settings.maps.key, zoom, startLatitude und startLongitude. googleMapsKey wieder entfernt. +6.1.0 Template Parallax hinzugefügt. + + Update-Skript für camaliga 6.0.0 hinzugefügt. + + TYPO3 7 Bugfix und neues Icon. +6.2.0 TypoScript und FlexForm hinzugefügt: settings.more.* Variablen hinzugefügt: {contents.moduloBegin}, {contents.moduloEnd}. + + Template hinzugefügt: Ekko. + + Geänderte Templates: AdGallery, Flexslider2, Galleryview, Parallax, Slick. + Die meisten dieser Templates können nun per TypoScript oder FlexForms gesteuert werden. + + 3 Templates sind nun veraltet: AdGalleryFancyBox, GalleryviewFancyBox, OwlSimpleModal. + Siehe Kapitel "Administration/HTML-Templates". + + Bugfix: Validation-Fehlermeldung? +6.3.0 2 ViewHelper hinzugefügt: content- und addPublicResources-ViewHelper. Siehe Kapitel "Administration/ViewHelpers". + + Die zusätzliche Extension camaliga_addon ist nun verfügbar. Siehe Kapitel "Administration/Camaliga-Tabellen erweitern". + + Bugfix: Kleinigkeiten. +6.3.1 Bugfix: Kleinigkeiten. +6.4.0 Template Revolution-Slider und FracionSlider hinzugefügt. + + Optionale Felder können nun auch im Extension-Maganger ausgeblendet werden. + + Die Volltextsuche sucht jetzt auch in custom1. + + Kleinere Optimierungen. +7.0.0 TYPO3 6.2 Kompatibilität entfernt. + + Die Templates AdGalleryFancyBox, GalleryviewFancyBox und OwlSimpleModal entfernt. + + TS seo.*, maps.language, maps.dontIncludeAPI und maps.includeRoute hinzugefügt. + + Partial für eine Routenplannung hinzugefügt. + + Den CSV-Import verschoben. Neuer Ort: Scheduler. + + Den PicasaWeb-Import entfernt, da es PicasaWeb nicht mehr gibt. + + Neues DB-Feld: Kontaktperson. Mehr Ausschalt-Optionen bei der Konfiguration im Extension-Manager. + + Neue Variable in den Templates verfügbar: {content.links} +7.1.0 Setting extended.saveSearch hinzugefügt. + TYPO3 8.7 Kompatibilität hinzugefügt. Achtung: von TYPO3 8.7 erzeugte Links können noch nicht ausgewertet werden. +7.1.6 Kleinere Bugs gefixt. Kleinere Änderungen in dieser Doku. +8.0.0 Man kann nun auch FAL-Bilder benutzen. Diese können in der Kofiguration im Extension Manager eingeschaltet werden. + + Alle Templates aktualisiert. Z.B. alle Links zu f:link.typolink geändert. + + Das Owl-Template gelöscht. Nutze stattdessen das Owl2-Template. + + mv_cooking import removed. +8.0.1 Bugs gefixt: getImgConfig und tx_camaliga_double7 entfernt. +8.0.2 Update-Skript für falsche FAL-Relationen. + Bitte das Aktualisierungs-Skript im Extension-Manager benutzen, falls schon FAL benutzt wird. +8.1.0 Planer-Task hinzugefügt: man kann jetzt uploads-Bilder zu FAL-Bildern konvertieren. + Lies auch das Kapitel Administration → Scheduler-Tasks dazu. + + Layout Backend7.html durch Backend.html ersetzt. + + tx_camaliga_double7 endgültig entfernt, da TYPO3 sich manchmal daran störte (Cache-Problem). +========== ===================================================================================================================== \ No newline at end of file diff --git a/Documentation/Localization.de_DE/Todo-liste/Index.rst b/Documentation/Localization.de_DE/Todo-liste/Index.rst new file mode 100644 index 0000000..ae65f77 --- /dev/null +++ b/Documentation/Localization.de_DE/Todo-liste/Index.rst @@ -0,0 +1,23 @@ + + +.. ================================================== +.. FOR YOUR INFORMATION +.. -------------------------------------------------- +.. -*- coding: utf-8 -*- with BOM. + +.. ================================================== +.. DEFINE SOME TEXTROLES +.. -------------------------------------------------- +.. role:: underline +.. role:: typoscript(code) +.. role:: ts(typoscript) + :class: typoscript +.. role:: php(code) + + +ToDo-Liste +---------- + +- Bekannte Probleme lösen. + +- Das Camaliga-jQuery-Plugin erweitern. diff --git a/Documentation/Localization.de_DE/Tutorial/Images.txt b/Documentation/Localization.de_DE/Tutorial/Images.txt new file mode 100644 index 0000000..b005126 --- /dev/null +++ b/Documentation/Localization.de_DE/Tutorial/Images.txt @@ -0,0 +1,35 @@ +.. |img-18| image:: ../../Images/camaliga_tut1.png +.. :align: left +.. :border: 0 +.. :name: Grafik1 +.. :width: 100% + +.. |img-19| image:: ../../Images/camaliga_tut2.png +.. :align: left +.. :border: 0 +.. :name: Grafik18 +.. :width: 100% + +.. |img-20| image:: ../../Images/camaliga_tut3.png +.. :align: left +.. :border: 0 +.. :name: Grafik17 +.. :width: 100% + +.. |img-21| image:: ../../Images/camaliga_tut4.png +.. :align: left +.. :border: 0 +.. :name: Grafik19 +.. :width: 100% + +.. |img-22| image:: ../../Images/camaliga_tut5.png +.. :align: left +.. :border: 0 +.. :name: Grafik20 +.. :width: 100% + +.. |img-23| image:: ../../Images/camaliga_tut6.png +.. :align: left +.. :border: 0 +.. :name: Grafik21 +.. :width: 100% diff --git a/Documentation/Localization.de_DE/Tutorial/Index.rst b/Documentation/Localization.de_DE/Tutorial/Index.rst new file mode 100644 index 0000000..73d520f --- /dev/null +++ b/Documentation/Localization.de_DE/Tutorial/Index.rst @@ -0,0 +1,293 @@ +.. include:: Images.txt + +.. ================================================== +.. FOR YOUR INFORMATION +.. -------------------------------------------------- +.. -*- coding: utf-8 -*- with BOM. + +.. ================================================== +.. DEFINE SOME TEXTROLES +.. -------------------------------------------------- +.. role:: underline +.. role:: typoscript(code) +.. role:: ts(typoscript) + :class: typoscript +.. role:: php(code) + + +Tutorial +-------- + +- Nehmen wir mal an, du seist ein Immobilienhai und möchtest ein paar + Wohnungen bzw. Häuser verkaufen oder vermieten. Mit dieser Extension + kannst du deine Häuser auf verschiedene Art und Weise präsentieren. + Auf der Homepage kannst du z.B. ein Karussell oder eine Gallerie mit + den Highlights anzeigen. Auf einer Folgeseite kannst du eine + Kartenansicht anbieten. Dazu dann noch eine Listenansicht mit einer + Detailansicht. Wie das geht, verrät dieses Tutorial. + +- Als erstes denke darüber nach, welche Felder du brauchst. In diesem + Fall: Name, Beschreibung, Adresse, GEO-Daten, Preis, Grundfläche, + Baujahr, Typ, Anzahl Zimmer, vorhandene Einrichtung. Jetzt sollte man + sich überlegen, welche Felder sich immer ändern und welche man als + Kategorie verwenden kann. Die Felder bis einschließlich Baujahr machen + wir als Textfeld. Die danach als Kategorie. Wir nutzen nun custom1 als + Preis, custom2 als Grundfläche und custom3 als Baujahr. Die Label + werden so bei der “Seiten-TSConfig” angepasst: + +:: + + TCEFORM.tx_camaliga_domain_model_content.custom1.label = Preis: + TCEFORM.tx_camaliga_domain_model_content.custom2.label = Grundfläche: + TCEFORM.tx_camaliga_domain_model_content.custom3.label = Baujahr: + +- Als nächstes legen wir die TYPO3-Kategorien an. Lege die Kategorien + wie folgt in der Listenansicht an. Beachte dabei, dass bei der + Kategorie “Vorhandene Einrichtung” unter Bemerkung “checkbox” + eingetragen ist, damit bei der Suche bei dieser Kategorie eine + checkbox statt ein Radio-Button benutzt wird. + +|img-18| + +*Abbildung 18: Kategorien für unsere Beispiel-Seiten* + +- Nun kann man die camaliga-Elemente anlegen. Als erstes wird für jede + Wohung/Haus ein Eintrag gemacht. Man kann bis zu 6 Bilder pro Eintrag verwenden. Wenn man fertig ist, kann man dann + noch zusätzliche Einträge anlegen, wo man z.B. nur den Titel und ein Bild + angibt. Außerdem wählt man ganz unten das übergeordnete Element aus. + Die zusätzlichen Elemente werden dann nur auf der Detail-Seite + angezeigt. Grund: auf der Detail-Seite sollen mehr als sechs Bilder + angezeigt werden oder du möchstest verwandte Elemente anzeigen. + + .. ### BEGIN~OF~TABLE ### + + .. container:: table-row + + a + |img-19| + + *Abbildung 19: Wähle ein übergeordnetes Element nur bei zusätzlichen + Elementen aus* + + b + |img-20| + + *Abbildung 20: Kategorien eines Hauses* + + + .. ###### END~OF~TABLE ###### + +- Nun können wir die camaliga-Einträge präsentieren. Füge das statische + TypoScript dieser Extension ein und füge das Plugin auf der Startseite + ein. Für die Startseite wählen wir ein Karussell oder eine Gallerie. + Dabei muss man ankreuzen: zeige nur eindeutige Elemente an, damit die + zusätzlichen Elemente nicht mit angezeigt werden. Wenn nun nur + Highlights auf der Startseite angezeigt werden sollen, kann man + entweder 2 Ordner benutzen (einen für die Highlights und einen für die + restlichen Elemente) oder man benutzt eine weitere Kategorie. Man kann mit diesem TypoScript + nur Elemente anzeigen, die eine bestimmte Kategorie besitzen (30 ist die ID von “ja”): + +:: + + plugin.tx_camaliga.settings.defaultCatIDs = 30 + +|img-21| + +*Abbildung 21: Kategorie für die Sucheinschränkung* + +- Nun werden nur noch Highlights auf der Startseite angezeigt. Im + nächsten Schritt soll das Layout des Karussell oder der Gallerie + angepasst werden. Kopiere dafür den Ordner + typo3conf/ext/camaliga/Resources/Private/Templates/Content und + typo3conf/ext/camaliga/Resources/Private/Templates/Partials in dein + fileadmin-Verzeichnis und teile den neuen Pfad mittels TypoScript mit + (Content muss in diesem Ordner drin sein): + +:: + + plugin.tx_camaliga.view.templateRootPaths.1 = fileadmin/templates/Camaliga/ + plugin.tx_camaliga.view.partialRootPaths.1 = fileadmin/templates/Camaliga/ + +- Nun kann man die HTML-Dateien bearbeiten. Falls sie externe Dateien + inkludiert, downloade die und kopiere sie ebenfalls ins fileadmin- + Verzeichnis. Kopiere auch die inkludieren CSS-Dateien ins fileadmin- + Verzeichnis und passe sie an. + +- Im nächsten Schritt füge eine Google Karte, eine Listenansicht und + eine Detail-Ansicht deiner Website hinzu. Für dieses Beispiel sollte + man allerdings immer die extended/erweiterte Version wählen, da die + dem Benutzer die Möglichkeit gibt, die Ergebnisse anders zu sortieren + und nur Elemente mit bestimmten Kategorien anzuzeigen. Auch eine Volltextsuche steht dann zur Verfügung. + Es wird dann noch das Template "Search.html" benötigt. Bei ListExtended.html kann man dies umgehen, + indem man wieder an sich selbst sendet und noch no_cache=1 überträgt. Zudem müsste man dann diese Zeile entfernen: + +:: + + + +- Das Formular sähe dann so aus: + +:: + + + ... + + + + +- Mehr dazu findet man im Kapitel "Administration / Erweiterte Templates". + +- Die folgenden Bilder zeigen eine erweiterte Listen- und Detail-Ansicht. Mit Hilfe der showId + kann man eine andere Seite für die Einzelansicht wählen: + +:: + + plugin.tx_camaliga.settings.showId = 20 + + + +.. ### BEGIN~OF~TABLE ### + +.. container:: table-row + + a + |img-22| + + *Abbildung 22: Erweiterte Listenansicht mit Suchmöglichkeit* + + b + |img-23| + + *Abbildung 23: Detailansicht mit einem zusätzlichem Kind-Element* + + +.. ###### END~OF~TABLE ###### + + +=========================================== +Beispiel 2: etwas wie Rezepte präsentieren. +=========================================== + +- Zuerst sollte die Bezeichnung der Felder im Backend umbenannt werden. Gehe dazu zu den Resourcen des Rezepte-Ordners + und füge dort diese TypoScript-Konfiguration ein: + +:: + + TCEFORM.tx_camaliga_domain_model_content.zip.disabled = 1 + TCEFORM.tx_camaliga_domain_model_content.city.disabled = 1 + TCEFORM.tx_camaliga_domain_model_content.country.disabled = 1 + TCEFORM.tx_camaliga_domain_model_content.latitude.disabled = 1 + TCEFORM.tx_camaliga_domain_model_content.longitude.disabled = 1 + TCEFORM.tx_camaliga_domain_model_content.mobile.disabled = 1 + TCEFORM.tx_camaliga_domain_model_content.email.disabled = 1 + TCEFORM.tx_camaliga_domain_model_content.mother.disabled = 1 + TCEFORM.tx_camaliga_domain_model_content.image4.disabled = 1 + TCEFORM.tx_camaliga_domain_model_content.image5.disabled = 1 + TCEFORM.tx_camaliga_domain_model_content.caption4.disabled = 1 + TCEFORM.tx_camaliga_domain_model_content.caption5.disabled = 1 + TCEFORM.tx_camaliga_domain_model_content.shortdesc.label = Zutaten + TCEFORM.tx_camaliga_domain_model_content.longdesc.label = Zubereitung + TCEFORM.tx_camaliga_domain_model_content.street.label = Bemerkungen + TCEFORM.tx_camaliga_domain_model_content.phone.label = Rezeptvariante + TCEFORM.tx_camaliga_domain_model_content.custom1.label = Anzahl Personen + TCEFORM.tx_camaliga_domain_model_content.custom2.label = Zubereitungszeit + TCEFORM.tx_camaliga_domain_model_content.custom3.label = Informationen zur Zubereitung + +- Nun kann man Rezepte anlegen und bearbeiten. Man + könnte man auch überlegen, Rezepte aus einer CSV-Datei zu importieren. In der CSV-Datei kann man auch Kategorien wie + Saison oder Schwierigkeitsgrad mit angeben. Die Kategorien müssen in diesem Fall aber schon in TYPO3 vorhanden sein. + Man beachte beim Anlegen der Kategorien die Hinweise aus Beispiel 1! + Das CSV-Import-Skript findet man im Scheduler. + Da beim Feld Zutaten leider kein RTE vorhanden ist, könnte man dort entweder direkt HTML reinscheiben + oder man nutzt im Template das Format nl2br. Noch besser: man wandelt das Zutaten-Feld auch in ein RTE-Feld um. + Das macht meine Extension camaliga_addon. Siehe Kapitel "Administration / Camaliga-Tabellen erweitern". + +- Man könnte nun die neuesten 5 Rezepte mit einem Bootstrap-Carousel anzeigen. + All die Einstellungen dafür kann man bei den Erweiterungsoptionen "Layout" des Plugins Camaliga vornehmen. + +- Natürlich möchte man dann noch eine Listenansicht mit einer Detailansicht haben. Da wird auch eine Volltextsuche + und eine Suche über die Kategorien anbieten wollen, aktivieren wir bei den Erweiterungsoptionen "Erweiterte Optionen" + den Punkt "Erweitertes Template mit Kategoriensuche aktivieren". + Leider wird nicht nur List.html benötigt, sondern auch ein Dummy-Template Search.html, da die Suche über action "search" läuft. + Man kopiert sich deshalb List.html, Search.html und Show.html in den fileadmin-Ordner + und passt den Link zu den Templates wie im 1. Beispiel an. + Eventuell kann man auch noch das Partial "Options.html" nach fileadmin kopieren und den Link dazu anpassen. + Das fertige Show-Template könnte dann so aussehen: + +:: + + + + + + + + +

+
+ + + +
+
+ +- Das ganze `sieht dann so aus`_. + +.. _sieht dann so aus: http://www.quizpalme.de/autor/rezepte/rezept/camaliga/show/Content/2113.html diff --git a/Documentation/Localization.de_DE/Updaten/Index.rst b/Documentation/Localization.de_DE/Updaten/Index.rst new file mode 100644 index 0000000..90a022d --- /dev/null +++ b/Documentation/Localization.de_DE/Updaten/Index.rst @@ -0,0 +1,32 @@ + + +.. ================================================== +.. FOR YOUR INFORMATION +.. -------------------------------------------------- +.. -*- coding: utf-8 -*- with BOM. + +.. ================================================== +.. DEFINE SOME TEXTROLES +.. -------------------------------------------------- +.. role:: underline +.. role:: typoscript(code) +.. role:: ts(typoscript) + :class: typoscript +.. role:: php(code) + + +Updaten auf TYPO3 6.2 +--------------------- + +Wenn du Kategorien unter TYPO3 6.0 oder 6.1 benutzt hast, musst du ein +Update-Skript durchführen, wenn du auf TYPO3 6.2 updatest. + +- Gehe zum Erweiterungsmanager und suche die Extension Camaliga. + +- Klicke auf das grüne Ausführen-Icon im rechten Bereich. + +- Das Skript wird folgendes SQL-Statement durchführen: + + UPDATE sys_category_record_mm + SET fieldname = 'categories' + WHERE tablenames='tx_camaliga_domain_model_content' AND fieldname='' \ No newline at end of file diff --git a/Documentation/Localization.de_DE/Updaten5/Index.rst b/Documentation/Localization.de_DE/Updaten5/Index.rst new file mode 100644 index 0000000..70fc8c9 --- /dev/null +++ b/Documentation/Localization.de_DE/Updaten5/Index.rst @@ -0,0 +1,52 @@ + + +.. ================================================== +.. FOR YOUR INFORMATION +.. -------------------------------------------------- +.. -*- coding: utf-8 -*- with BOM. + +.. ================================================== +.. DEFINE SOME TEXTROLES +.. -------------------------------------------------- +.. role:: underline +.. role:: typoscript(code) +.. role:: ts(typoscript) + :class: typoscript +.. role:: php(code) + + +Updaten auf Camaliga 5.0.0 +-------------------------- + +In der Version 5.0.0 von Camaliga hat sich einiges verändert. +Dies betrifft hauptsächlich die erweiterten Templates als auch die FlexForms. +Wegen den Änderungen an den FlexForms sollte man das Update-Skript im Extension-Manager ausführen! +Das Upadte-Skript aktualisiert die FlexForms einer jeden Seite, wo Camaliga benutzt wird. + +Zudem sind nun folgende Templates nicht mehr auswählbar: MapExtended, AdGalleryExtended und GalleryviewExtended. +Man kann nun fast jedes Templates als ein erweitertes Template verwenden. Dazu muss man lediglich diese Zeilen hinzufügen: + +:: + + + +
+

{f:translate(key: 'options', default: 'Options')}

+ + + +
+
+
+ +Die Templates mit der Endung Extended.html werden deshalb nicht mehr benötigt! +Die oben genannten 3 Templates werden deshalb in der Version 6.0.0 entfernt, +da man nun die normalen Templates zu erweiterten Templates machen kann. +Mehr dazu findet man im Kapitel "Administration / Erweiterte Templates". +Falls du eines der drei Templates benutzt, benutzte demnächst ein normales Template +und füge dort die oben genannten Zeilen hinzu und ändere dabei beim Parameter template den Template-Namen. +Aktiviere es mit TypoScript oder den FlexForms: + +:: + + plugin.tx_camaliga.settings.extended.enable = 1 diff --git a/Documentation/Localization.de_DE/Updaten6/Index.rst b/Documentation/Localization.de_DE/Updaten6/Index.rst new file mode 100644 index 0000000..b8fd9c1 --- /dev/null +++ b/Documentation/Localization.de_DE/Updaten6/Index.rst @@ -0,0 +1,60 @@ + + +.. ================================================== +.. FOR YOUR INFORMATION +.. -------------------------------------------------- +.. -*- coding: utf-8 -*- with BOM. + +.. ================================================== +.. DEFINE SOME TEXTROLES +.. -------------------------------------------------- +.. role:: underline +.. role:: typoscript(code) +.. role:: ts(typoscript) + :class: typoscript +.. role:: php(code) + + +Updaten auf Camaliga 6.0.0 +-------------------------- + +Auch in Camaliga 6.0.0 gibt es wieder wichtige Änderungen, damit Camaliga kompatibel mit TYPO3 7 LTS ist. + +Zusätzlich wurden folgende Templates und actions gelöscht: MapExtended, AdGalleryExtended und GalleryviewExtended +(siehe Updaten auf Camaliga 5.0.0). + +Die wichtigste Änderung betrifft die Änderung zu den Template-Pfaden. Wenn du den Pfad zu den Templates mittels TypoScript Constants +bisher geändert hast, musst du nichts tun, aber wenn du ihn mittels TypoScript Setup geändert hast, musst du diese Änderung anpassen. +Alte Methode: + +:: + + plugin.tx_camaliga { + view { + templateRootPath = fileadmin/Resources/Camaliga/Template/ + partialRootPath = fileadmin/Resources/Camaliga/Partial/ + layoutRootPath = fileadmin/Resources/Camaliga/Layout/ + } + } + +Neue Methode: + +:: + + plugin.tx_camaliga { + view { + templateRootPaths.1 = fileadmin/Resources/Camaliga/Template/ + partialRootPaths.1 = fileadmin/Resources/Camaliga/Partial/ + layoutRootPaths.1 = fileadmin/Resources/Camaliga/Layout/ + } + } + +Du musst also nur "s.1" bei den views hinzufügen! + +Du kannst das Update-Skript von Camaliga ausführen, um diese Änderung durchzuführen. +Das Update-Skript funktioniert aber nur dann, wenn du den Pfad zu den Templates direkt so änderst: +"plugin.tx_camaliga.view.partialRootPath =" +In allen anderen Fällen musst du den Pfad per Hand ändern. + +Hinweis: du kannst meine Extension backendtools benutzen, um herauszufinden, wo du überall Camaliga verwendest. +Dies ist aber auch mit der Extension additional_reports machbar. \ No newline at end of file diff --git a/Documentation/Localization.de_DE/Updaten7/Index.rst b/Documentation/Localization.de_DE/Updaten7/Index.rst new file mode 100644 index 0000000..3aa7c66 --- /dev/null +++ b/Documentation/Localization.de_DE/Updaten7/Index.rst @@ -0,0 +1,25 @@ + + +.. ================================================== +.. FOR YOUR INFORMATION +.. -------------------------------------------------- +.. -*- coding: utf-8 -*- with BOM. + +.. ================================================== +.. DEFINE SOME TEXTROLES +.. -------------------------------------------------- +.. role:: underline +.. role:: typoscript(code) +.. role:: ts(typoscript) + :class: typoscript +.. role:: php(code) + + +Updaten auf Camaliga 7.0.0 +-------------------------- + +Auch in Camaliga 7.0.0 gibt es wieder einige Änderungen. 3 weitere Templates wurden entfernt: +AdGalleryFancyBox, GalleryviewFancyBox und OwlSimpleModal. +Benutze stattdessen die normalen Templates mit dieser Einstellung:: + + plugin.tx_camaliga.settings.more.addLightbox = 1 diff --git a/Documentation/Settings.yml b/Documentation/Settings.yml new file mode 100644 index 0000000..b84a300 --- /dev/null +++ b/Documentation/Settings.yml @@ -0,0 +1,11 @@ +# This is the project specific Settings.yml file. +# Place Sphinx specific build information here. +# Settings given here will replace the settings of 'conf.py'. + +--- +conf.py: + copyright: 2016 + project: TYPO3 Extension "camaliga" + version: 6.0.2 + release: 6.0.2 +... diff --git a/Documentation/To-doList/Index.rst b/Documentation/To-doList/Index.rst new file mode 100644 index 0000000..0b050d2 --- /dev/null +++ b/Documentation/To-doList/Index.rst @@ -0,0 +1,23 @@ + + +.. ================================================== +.. FOR YOUR INFORMATION +.. -------------------------------------------------- +.. -*- coding: utf-8 -*- with BOM. + +.. ================================================== +.. DEFINE SOME TEXTROLES +.. -------------------------------------------------- +.. role:: underline +.. role:: typoscript(code) +.. role:: ts(typoscript) + :class: typoscript +.. role:: php(code) + + +To-Do list +---------- + +- Fix the known problems. + +- Extend the camaliga-jQuery-plugin. diff --git a/Documentation/Tutorial/Images.txt b/Documentation/Tutorial/Images.txt new file mode 100644 index 0000000..143fcd7 --- /dev/null +++ b/Documentation/Tutorial/Images.txt @@ -0,0 +1,35 @@ +.. |img-20| image:: ../Images/camaliga_tut1.png +.. :align: left +.. :border: 0 +.. :name: Grafik1 +.. :width: 100% + +.. |img-21| image:: ../Images/camaliga_tut2.png +.. :align: left +.. :border: 0 +.. :name: Grafik18 +.. :width: 100% + +.. |img-22| image:: ../Images/camaliga_tut3.png +.. :align: left +.. :border: 0 +.. :name: Grafik17 +.. :width: 100% + +.. |img-23| image:: ../Images/camaliga_tut4.png +.. :align: left +.. :border: 0 +.. :name: Grafik19 +.. :width: 100% + +.. |img-24| image:: ../Images/camaliga_tut5.png +.. :align: left +.. :border: 0 +.. :name: Grafik20 +.. :width: 100% + +.. |img-25| image:: ../Images/camaliga_tut6.png +.. :align: left +.. :border: 0 +.. :name: Grafik21 +.. :width: 100% diff --git a/Documentation/Tutorial/Index.rst b/Documentation/Tutorial/Index.rst new file mode 100644 index 0000000..a39fef7 --- /dev/null +++ b/Documentation/Tutorial/Index.rst @@ -0,0 +1,266 @@ +.. include:: Images.txt + +.. ================================================== +.. FOR YOUR INFORMATION +.. -------------------------------------------------- +.. -*- coding: utf-8 -*- with BOM. + +.. ================================================== +.. DEFINE SOME TEXTROLES +.. -------------------------------------------------- +.. role:: underline +.. role:: typoscript(code) +.. role:: ts(typoscript) + :class: typoscript +.. role:: php(code) + + +Tutorial +-------- + +- You are a property shark and you want to sell or rent flats or houses. + You want to show a carousel or a gallery with your highlights on your + start page. On other pages you want to show a map and a list view with + single views. This tutorial show you how you can do that. + +- First, think about the fields you need. In this example: Name, + description, address, GEO-data, price, floor space, build year, type, + number of rooms, facility. For the last 3 fields we use categories for + the other fields we use textfields. Now we rename the custom fields in + the “Page TSConfig”: + +:: + + TCEFORM.tx_camaliga_domain_model_content.custom1.label = Preis: + TCEFORM.tx_camaliga_domain_model_content.custom2.label = Grundfläche: + TCEFORM.tx_camaliga_domain_model_content.custom3.label = Baujahr: + +- Now we create TYPO3 categories. Go to the list view and create some + categories. Note: if you want to use checkboxes in the search, you + need to write “checkbox” in the parent category. See image below. + +|img-20| + +*Image 18: Categories for our example page* + +- Now you can create some camaliga-entries. First create a entry for + every house/flat. You can use up to 6 images. When you are done you can create additional entries + for the existing entries. In that case fill out only the title and the + image. Finally choose the parent-entry of this additional entry. The + additional entries will be shown only at the single-page-view. Reason: + you want to show related houses or more than six images on the detail-page. + + .. ### BEGIN~OF~TABLE ### + + .. container:: table-row + + a + |img-21| + + *Image 19: Select a parent element only for additional elements* + + b + |img-22| + + *Image 20: Categories of a house* + + .. ###### END~OF~TABLE ###### + +- Now we can present our camaliga-entries. Include the static TypoScript + of this extension and add this plugin to your start page. For the + start page select a carousel or a gallery. Therefore you need to check + the checkbox: show only distinct entries, because we don´t want to + show the additional entries there. If you want to display only some + highlights on your start page, you can use two folders (one for the + highlights and one for the rest) or you can use a category. If + yes, you can show only elements with a specific category with this + TypoScript (30 is the ID of “ja”): + +:: + + plugin.tx_camaliga.settings.defaultCatIDs = 30 + +|img-23| + +*Image 21: Category for the search restriction* + +- Now you see only some highlights on your start page. In the next step + you want to customize the layout of the carousel or gallery. Therefore + copy the folder + typo3conf/ext/camaliga/Resources/Private/Templates/Content and + typo3conf/ext/camaliga/Resources/Private/Templates/Partials to your + fileadmin-folder. Change the path to the template with this TypoScript + (Content must be in that folder): + +:: + + plugin.tx_camaliga.view.templateRootPaths.1 = fileadmin/templates/Camaliga/ + plugin.tx_camaliga.view.partialRootPaths.1 = fileadmin/templates/Camaliga/ + +- Now you can edit the files. If the template includes external files + please download them and copy them to the fileadmin-folder too. Copy + the included CSS-files to the fileadmin-folder too and include that + edited files. + +- In the next step you can add a google map, a list view and a single + view to your page. For this example site enable the + extended-version of that template via TypoScript or FlexForms. The extended template gives the + user the possibility to change the sorting fields/order and allows him + to search elements (e.g. with specific categories). The images below shows + you an extended list view and an extended single view. You + can specify the link to the single page via TypoScript and you + need to add pageUid to the link in the List-template: + +:: + + plugin.tx_camaliga.settings.showId = 20 + + + +.. ### BEGIN~OF~TABLE ### + +.. container:: table-row + + a + |img-24| + + *Image 22: Extended list view with search options* + + b + |img-25| + + *Image 23: Detail view with an addiotional child-element* + + +.. ###### END~OF~TABLE ###### + + +- Read the chapter "Administration / Extended templates" for more infos about the extended version of a template. + + +========================================= +Example 2: present something like recipes +========================================= + +- First, the name of the fields should be renamed in the backend. Go to the resources of the recipes folder + and add there this TSconfig lines: + +:: + + TCEFORM.tx_camaliga_domain_model_content.zip.disabled = 1 + TCEFORM.tx_camaliga_domain_model_content.city.disabled = 1 + TCEFORM.tx_camaliga_domain_model_content.country.disabled = 1 + TCEFORM.tx_camaliga_domain_model_content.latitude.disabled = 1 + TCEFORM.tx_camaliga_domain_model_content.longitude.disabled = 1 + TCEFORM.tx_camaliga_domain_model_content.mobile.disabled = 1 + TCEFORM.tx_camaliga_domain_model_content.email.disabled = 1 + TCEFORM.tx_camaliga_domain_model_content.mother.disabled = 1 + TCEFORM.tx_camaliga_domain_model_content.image4.disabled = 1 + TCEFORM.tx_camaliga_domain_model_content.image5.disabled = 1 + TCEFORM.tx_camaliga_domain_model_content.caption4.disabled = 1 + TCEFORM.tx_camaliga_domain_model_content.caption5.disabled = 1 + TCEFORM.tx_camaliga_domain_model_content.shortdesc.label = Ingredients + TCEFORM.tx_camaliga_domain_model_content.longdesc.label = Preparation + TCEFORM.tx_camaliga_domain_model_content.street.label = Remark + TCEFORM.tx_camaliga_domain_model_content.phone.label = Recipe variant + TCEFORM.tx_camaliga_domain_model_content.custom1.label = Number of people + TCEFORM.tx_camaliga_domain_model_content.custom2.label = Preparation time + TCEFORM.tx_camaliga_domain_model_content.custom3.label = Information for preparation + +- Now you can create and edit recipes. You might consider to import recipes from a CSV file. In the CSV file, you can also have categories such as + "Specify the season" or "difficulty". The categories must be present already in TYPO3 in this case. + Note: when you create the categories, read the instructions of example 1! + The csv-import script can be found in the sheduler. + Since no RTE is present in the ingredients field, you could either enter directly pure HTML there + or you can use the template format nl2br. Even better: make the ingredients field an RTE field too. + This makes the my additional extension camaliga_addon. See chapter "Administration / Extend the Camaliga tables". + +- One could want to view the latest 5 recipes with a bootstrap Carousel. + All the settings for this can be undertaken at the tab "Layout" of the plugin Camaliga. + +- Of course, you then would like to have a list view with a detail view. Also you want a full-text search + and a search with the categories. Therefore we activate in the extension tab "Extended Options" the option + "Activate extended template with category search". + Unfortunately, not only List.html is needed, but also a dummy template Search.html because the searching runs through the action "search". + Copy therefore List.html, Search.html and Show.html to the fileadmin folder + and adjusts the link to the templates as in example 1. + Possibly you can also copy the Partial "Options.html" to fileadmin and adapt the link to it. + The final show template might look like this: + +:: + + + + + + + + +

+
+ + + +
+
+ +- The whole `looks like this`_. + +.. _looks like this: http://www.quizpalme.de/autor/rezepte/rezept/camaliga/show/Content/2113.html diff --git a/Documentation/Updating/Index.rst b/Documentation/Updating/Index.rst new file mode 100644 index 0000000..45fc631 --- /dev/null +++ b/Documentation/Updating/Index.rst @@ -0,0 +1,32 @@ + + +.. ================================================== +.. FOR YOUR INFORMATION +.. -------------------------------------------------- +.. -*- coding: utf-8 -*- with BOM. + +.. ================================================== +.. DEFINE SOME TEXTROLES +.. -------------------------------------------------- +.. role:: underline +.. role:: typoscript(code) +.. role:: ts(typoscript) + :class: typoscript +.. role:: php(code) + + +Updating to TYPO3 6.2 +--------------------- + +If you are using categories that you have used in TYPO3 6.0 or 6.1 +you need to execute an update script when you are updating to TYPO3 6.2. + +- Go to the Extensionmanager and search the Camaliga plugin. + +- Click on the green execute icon in the right area. + +- The script will perform this SQL statement: + + UPDATE sys_category_record_mm + SET fieldname = 'categories' + WHERE tablenames='tx_camaliga_domain_model_content' AND fieldname='' \ No newline at end of file diff --git a/Documentation/Updating5/Index.rst b/Documentation/Updating5/Index.rst new file mode 100644 index 0000000..03c6902 --- /dev/null +++ b/Documentation/Updating5/Index.rst @@ -0,0 +1,51 @@ + + +.. ================================================== +.. FOR YOUR INFORMATION +.. -------------------------------------------------- +.. -*- coding: utf-8 -*- with BOM. + +.. ================================================== +.. DEFINE SOME TEXTROLES +.. -------------------------------------------------- +.. role:: underline +.. role:: typoscript(code) +.. role:: ts(typoscript) + :class: typoscript +.. role:: php(code) + + +Updating to camaliga 5.0.0 +-------------------------- + +In version 5.0.0 of Camaliga a lot has changed. This concerns mainly the extended/advanced templates as well as the flexforms. +Because of the changes to the flexforms, you should run the update script in the Extension Manager! +The Upadte script updates the flexforms of each page where Camaliga is used. + +In addition, the following templates are no longer selectable: MapExtended, AdGalleryExtended and GalleryviewExtended. +You can now use almost any template as an extended/advanced template. For this you have to add these lines: + +:: + + + +
+

{f:translate(key: 'options', default: 'Options')}

+ + + +
+
+
+ +The templates with the ending Extended.html are therefore no longer needed! +The above 3 templates are therefore removed in version 6.0.0, +because you can make the normal templates to advanced templates now. +More can be found in the chapter "Administration / Extended templates". +If you use one of the three templates, use soon a normal template +and add there the above lines and change the parameter template. +Activate it with TypoScript or FlexForms: + +:: + + plugin.tx_camaliga.settings.extended.enable = 1 diff --git a/Documentation/Updating6/Index.rst b/Documentation/Updating6/Index.rst new file mode 100644 index 0000000..88eb17b --- /dev/null +++ b/Documentation/Updating6/Index.rst @@ -0,0 +1,60 @@ + + +.. ================================================== +.. FOR YOUR INFORMATION +.. -------------------------------------------------- +.. -*- coding: utf-8 -*- with BOM. + +.. ================================================== +.. DEFINE SOME TEXTROLES +.. -------------------------------------------------- +.. role:: underline +.. role:: typoscript(code) +.. role:: ts(typoscript) + :class: typoscript +.. role:: php(code) + + +Updating to camaliga 6.0.0 +-------------------------- + +There are important changes in version 6.0.0 of Camaliga so it is now compatible with TYPO3 7 LTS. + +In addition, the following templates and actions were removed: MapExtended, AdGalleryExtended and GalleryviewExtended +(see Updating to camaliga 5.0.0). + +The most important change is how to change the path to your templates. If you change the path with TypoScript Constants +you have nothing to do, but if you change the path with TypoScript Setup, you need to change your settings! +Old method: + +:: + + plugin.tx_camaliga { + view { + templateRootPath = fileadmin/Resources/Camaliga/Template/ + partialRootPath = fileadmin/Resources/Camaliga/Partial/ + layoutRootPath = fileadmin/Resources/Camaliga/Layout/ + } + } + +New method: + +:: + + plugin.tx_camaliga { + view { + templateRootPaths.1 = fileadmin/Resources/Camaliga/Template/ + partialRootPaths.1 = fileadmin/Resources/Camaliga/Partial/ + layoutRootPaths.1 = fileadmin/Resources/Camaliga/Layout/ + } + } + +You need to add "s.1" to the views! + +You can use the update-script of camaliga to do this job. +But the update-script worksonly, if you change the path to the templates directly like this: +"plugin.tx_camaliga.view.partialRootPath =" +In all other cases you need to change the path to the templates manualy. + +Hint: you can use my extension backendtools to find all pages that uses the camaliga extension. +You can use the extension additional_reports too. \ No newline at end of file diff --git a/Documentation/Updating7/Index.rst b/Documentation/Updating7/Index.rst new file mode 100644 index 0000000..32d9cfa --- /dev/null +++ b/Documentation/Updating7/Index.rst @@ -0,0 +1,24 @@ + + +.. ================================================== +.. FOR YOUR INFORMATION +.. -------------------------------------------------- +.. -*- coding: utf-8 -*- with BOM. + +.. ================================================== +.. DEFINE SOME TEXTROLES +.. -------------------------------------------------- +.. role:: underline +.. role:: typoscript(code) +.. role:: ts(typoscript) + :class: typoscript +.. role:: php(code) + + +Updating to camaliga 7.0.0 +-------------------------- + +3 templates are gone: AdGalleryFancyBox, GalleryviewFancyBox and OwlSimpleModal. +Use the regular templates with this setting instead:: + + plugin.tx_camaliga.settings.more.addLightbox = 1 \ No newline at end of file diff --git a/Documentation/UsersManual/Faq/Index.rst b/Documentation/UsersManual/Faq/Index.rst new file mode 100644 index 0000000..599f6db --- /dev/null +++ b/Documentation/UsersManual/Faq/Index.rst @@ -0,0 +1,57 @@ + + +.. ================================================== +.. FOR YOUR INFORMATION +.. -------------------------------------------------- +.. -*- coding: utf-8 -*- with BOM. + +.. ================================================== +.. DEFINE SOME TEXTROLES +.. -------------------------------------------------- +.. role:: underline +.. role:: typoscript(code) +.. role:: ts(typoscript) + :class: typoscript +.. role:: php(code) + + +FAQ +^^^ + +- How can I customize the layout? + + See chapter administration. + +- What is the difference between a normal and an extended template? + + The extended list- and maps-templates are automatic extended templates which contains a search form: + sorting and restriction (uses the categories too). + The extended single-template displays a google map and the parent or child elements too. + Note 1: the extended version is not so fast as the normal version. Use it only if you need it. + Note 2: you dont need the extended templates, because you can extend nearly every template. + See chapter Administration → Extended templates for more information. + +- Can I use responsive images like picture or srcset? + + Yes, you can. You find an srcset-example in the template Bootstrap.html. + +- The search doesn´t work. Whats wrong? + + The search uses only the template set via "plugin.tx_camaliga.view.templateRootPaths.1". + All other templates will be ignored. Furthermore you need the template Search.html even it isn´t used. + +- Its not running! Whats wrong? + + There could be more reasons. First you should take a look at the JavaScript console. What does it say? + If the call to the jQuery plugin fails: is it allready loaded? Note that you must download external jQuery plugins + first. If you are loading jQuery only in the footer of your page, you must move all the JavaScript from the HTML + templates to the footer too! + If the console says nothing, then take a look at the HTML source code. + If there are no elements you may have forgot to select the folder with the elements in the plugin. + Note: TYPO3 7 sometimes removes JS which is not wraped with CDATA. TYPO3 8 removes everything that is wraped with CDATA. + So, remove the CDATA in the templates, when you are using TYPO3 8. + +- It runs, but it looks ugly! Whats wrong? + + If you are using an external jQuery plugin, you must read that documentation carefully. + Otherwise you can ask me... diff --git a/Documentation/UsersManual/Images.txt b/Documentation/UsersManual/Images.txt new file mode 100644 index 0000000..8dce900 --- /dev/null +++ b/Documentation/UsersManual/Images.txt @@ -0,0 +1,59 @@ +.. |img-7| image:: ../Images/camaliga_element.png +.. :align: left +.. :border: 0 +.. :name: Image1 +.. :width: 100% + +.. |img-8| image:: ../Images/camaliga_plugin.png +.. :align: left +.. :border: 0 +.. :name: Options +.. :width: 100% + +.. |img-9| image:: ../Images/camaliga_template.png +.. :align: left +.. :border: 0 +.. :name: Grafik3 +.. :width: 100% + +.. |img-10| image:: ../Images/camaliga_mode.png +.. :align: left +.. :border: 0 +.. :name: Grafik4 +.. :width: 100% + +.. |img-11| image:: ../Images/camaliga_typoscript.png +.. :align: left +.. :border: 0 +.. :name: Grafik5 +.. :width: 100% + +.. |img-12| image:: ../Images/camaliga_cat.png +.. :align: left +.. :border: 0 +.. :name: Grafik9 +.. :width: 100% + +.. |img-13| image:: ../Images/camaliga_cat2.png +.. :align: left +.. :border: 0 +.. :name: Grafik7 +.. :width: 100% + +.. |img-14| image:: ../Images/camaliga_cat3.png +.. :align: left +.. :border: 0 +.. :name: Grafik10 +.. :width: 100% + +.. |img-15| image:: ../Images/camaliga_category.png +.. :align: left +.. :border: 0 +.. :name: Categories +.. :width: 100% + +.. |img-16| image:: ../Images/camaliga_mother.png +.. :align: left +.. :border: 0 +.. :name: Mother-relation +.. :width: 100% diff --git a/Documentation/UsersManual/Index.rst b/Documentation/UsersManual/Index.rst new file mode 100644 index 0000000..4f7e7d5 --- /dev/null +++ b/Documentation/UsersManual/Index.rst @@ -0,0 +1,110 @@ +.. include:: Images.txt + +.. ================================================== +.. FOR YOUR INFORMATION +.. -------------------------------------------------- +.. -*- coding: utf-8 -*- with BOM. + +.. ================================================== +.. DEFINE SOME TEXTROLES +.. -------------------------------------------------- +.. role:: underline +.. role:: typoscript(code) +.. role:: ts(typoscript) + :class: typoscript +.. role:: php(code) + + +User Guide +---------- + +- First you need to include the static typoscript template.: Template → + Info/Modify → Includes → Static include (From extensions) → Camaliga. + +- Second: you should decide, which fields you want to use. Read the chapter Administration → + Configuration via Extension-Manager. Thats very important for admins. Furthermore read the chapter + Administration → Scheduler-Tasks if you are an admin. + +- Now create a folder for the new elements. Change to that folder and into the list view. Create some elements: + +|img-7| + +*Image 5: Create new elements* + +- There are several fields. You must fill out only the title. When done, + add a new plugin to your page and select Camaliga. You will see a lot of FlexForm-options: + +|img-8| + +*Image 6: FlexForm-options* + +- Select a template layout and make other settings: + +|img-9| + +*Image 7: Select a layout* + +- Select the folder with the elements. If you don´t select something, + the TypoScript setting is used. If there is no storagePid defined too, + the current document will be used as storage pid. + +|img-10| + +*Image 8: Select the folder* + +- Done. You can make some more settings via TypoScript, e.g. the image width: + +|img-11| + +*Image 9: Some TypoScript settings* + +- See chapter Configuration for the TypoScript settings. + +- If you want to use the enhanced features, then you must create some + TYPO3 categories. There are many ways to use the categories. You can use them for a default selection or even in the frontend + for the elements or for a user search. + Note: the parent category is used as the description + of the category in the exented view. Example: you have a category “Astrolabium” that + describes your element, then you must use a parent category too that + describes that category. In this case: “Type”. See image: + +|img-12| + +*Image 10: Create a category* + +|img-13| + +*Image 11: How to use categories* + +- Note: normally the categories are used as radio-button in the search. + If you want to use checkboxes in the search, you need to write + “checkbox” in the description of the parent category. + Note: the parent categories are ignored in normal templates. + Now you can use the categories in the camaliga-elements: + +|img-14| + +*Image 12: Use the categories* + +- Finally you can select the categories that should be used in the plugin: + +|img-15| + +*Image 13: Select the categories in the plugin-mode* + +- Another features is the parent-child-relation. This is important if + you want to show on some pages only distinct elements (parents) and on + a single page both elements. Otherwise you can use 2 different + folders, but the relation has some other pros too. + +|img-16| + +*Image 14: Mother-Child-Relation* + + +.. toctree:: + :maxdepth: 5 + :titlesonly: + :glob: + + Faq/Index diff --git a/README.md b/README.md new file mode 100644 index 0000000..2e69f2e --- /dev/null +++ b/README.md @@ -0,0 +1 @@ +# camaliga diff --git a/Resources/Private/Language/de.locallang.xlf b/Resources/Private/Language/de.locallang.xlf new file mode 100644 index 0000000..030737c --- /dev/null +++ b/Resources/Private/Language/de.locallang.xlf @@ -0,0 +1,136 @@ + + + +
+ + + + Camaliga-Element + + + Titel + + + Kurze Beschreibung + + + Lange Beschreibung + + + Link zu einer Seite + + + Bild + + + Straße + + + PLZ + + + Ort + + + Land + + + Ansprechpartner + + + Telefon-Nr. + + + Handy-Nr. + + + E-Mail + + + Latitude + + + Longitude + + + Eigenes Feld 1 + + + Eigenes Feld 2 + + + Eigenes Feld 3 + + + Übergeordnetes Element von diesem Element + + + Kategorie + + + + Suchen + + + Leider wurden 0 Elemente gefunden. Bitte modifiziere die Suche. + + + Weiterführende Infos + + + Adresse + + + Übergeordnetes Element: + + + Zugehörige Elemente: + + + Elemente gefunden. + + + Optionen + + + Volltextsuche + + + Suchbegriff + + + Ort + + + Umkreis + + + Entfernung + + + Sortieren nach + + + Sortierreihenfolge + + + Ordner + + + egal + + + zurück + + + weiter + + + Zurück + + + Schließen + + + + \ No newline at end of file diff --git a/Resources/Private/Language/de.locallang_be.xlf b/Resources/Private/Language/de.locallang_be.xlf new file mode 100644 index 0000000..e6b6be1 --- /dev/null +++ b/Resources/Private/Language/de.locallang_be.xlf @@ -0,0 +1,477 @@ + + + +
+ + + Layout + + + Bilder + + + Elemente + + + Kategorien + + + HTML-Template: + + + kein Template-Layout ausgewählt! + + + Karussell: Elemente nebeneinander + + + Karussell: Text und Bild getrennt voneinander + + + Listenansicht: alle Elemente sind untereinander + + + Listenansicht 2: automatisch erweitere Version + + + Einzelansicht eines Elements + + + Einzelansicht 2: automatisch erweitere Version + + + Kartenansicht (Google maps) + + + Nur ein zufälliges Element anzeigen (ungecacht) + + + Einfaches responsives Karussell + + + Google map 2: automatisch erweitere Version (ungecachtes search-Template) + + + Template-Layout (siehe Doku): + + + Standard-Sortierung nach: + + + Anlege-Datum + + + Änderungs-Datum + + + Titel + + + PLZ + + + Ort + + + Land + + + Standard-Sortier-Reihenfolge: + + + Aufsteigend + + + Absteigend + + + Ergebnisse zufällig sortieren (gecacht)? + + + Versuche die Position zu einer Adresse automatisch zu finden? + + + Zeige nur einmalige Elemente an (Mutter oder ein Kind)? + + + Ersetze den Seiten-Titel durch das Titel-Feld? + + + Ersetze das Metatag "description" durch das Kurzbeschreibung-Feld? + + + Ersetze den Seiten-Titel in der Sitemap durch das Titel-Feld? + + + Setze das Titel-Feld als og:title Metatag? + + + Setze das Kurzbeschreibung-Feld als og:description Metatag? + + + Setze das 1. Bild als og:image Metatag? + + + Padding zu Breite und Höhe hinzuaddieren? + + + Wo ist die Listen-Seite (man muss die Variable {settings.listId} noch im Template hinzufügen)? + + + Wo ist die Einzelansicht-Seite (man muss die Variable {settings.showId} noch im Template hinzufügen)? + + + Listen-Seite: + + + Einzelansicht-Seite: + + + Breite der Bilder in px ({settings.img.width}): + + + Höhe der Bilder in px ({settings.img.height}): + + + Breite der kleinen Bilder in px ({settings.img.thumbWidth}): + + + Höhe der kleinen Bilder in px ({settings.img.thumbHeight}): + + + Breite in px ({settings.item.width}): + + + Höhe in px ({settings.item.height}): + + + Padding in px ({settings.item.padding}): + + + Margin in px ({settings.item.margin}): + + + Anzahl sichtbarer Elemente [pro Spalte] (z.B. JavaScript-Parameter für Karussells) ({settings.item.items}): + + + Anzahl sichtbarer Elemente (SQL-Select-Parameter): + + + Ausgewählte Kategorien (bei erweiterten Templates: UND für radio-Buttons und ODER für Checkboxen): + + + Kategorie-Modus: + + + Benutze die Kategorie-Relationen der Original-Elemente + + + Benutze die Kategorie-Relationen der übersetzen Elemente (bugy) + + + Kategorie-Modus (bei normalen Templates): + + + UND-Verknüpfung der ausgewählten Kategorien + + + ODER-Verknüpfung der ausgewählten Kategorien + + + Zeige die Punkt-Navigation an: + + + Zeige die Pfeil-Navigation an: + + + Wie lange soll ein Element angezeigt werden? Zeit in ms oder false: + + + Soll das Kaurssell bei mouseenter stehen bleiben? + + + Soll das Karussell am Ende von vorne beginnen? + + + Soll das Karussell auf Tastatureingaben reagieren? + + + Größe des Dialog-Fensters (normal, klein oder groß): + + + klein + + + groß + + + Animation (kann nur per TypoScript entfernt werden): + + + von oben nach unten einfahren + + + Modal schließen, wenn ESC gedrückt wurde? + + + Erstes Element aufklappen? + + + klappe alle Elemente auf + + + Nur höchstens ein Element aufklappen? + + + Sollen die Elemente aufklappbar sein? + + + Erweiterte Optionen + + + Erweitertes Template mit Kategoriensuche aktivieren (siehe Doku; {settings.extended.enable})? + + + Zeige nur das Suchformular ohne Ergebnisse an ({settings.extended.onlySearchForm})? + + + Such-Optionen einschränken ({settings.extended.restrictSearch})? + + + Radius-Werte bei Umkreissuche in km. Z.B. 10,20,50 ({settings.extended.radiusValues}): + + + Such-Parameter in einem Cookie speichern und das Cookie bei einer nicht-Suche laden? + + + Weiteres + + + Modulo-Berechnung einschalten (wird z.B. beim Ekko-Template gebraucht; {settings.more.setModulo}): + + + Übergangs-Geschwindigkeit in sek. (für Flexslider2, Galleryview, Parallax, Slick; {settings.more.speed}): + + + Autoplay einschalten? (für Flexslider2, Galleryview, Slick; {settings.more.autoplay}): + + + Verzögerungs-Geschwindigkeit in sek. (für Flexslider2, Galleryview, Parallax, Slick; {settings.more.autoplaySpeed}): + + + Endlosschleife einschalten? (für Flexslider2, Slick; {settings.more.infinite}): + + + Vertikale Ansicht? (für Flexslider2, Slick; {settings.more.vertical}): + + + Rechts-nach-links? (für Flexslider2, Slick; {settings.more.reverse}): + + + Bilder notfalls beschneiden? (für Galleryview; {settings.more.crop}): + + + Großes Bild (Panel) anzeigen? (für Flexslider2, Slick; {settings.more.showPanel}): + + + Pfeil-Navigation anzeigen? (für Flexslider2, Galleryview, Slick; {settings.more.showArrows}): + + + Punkte-Navigation anzeigen? (für Flexslider2, Slick; {settings.more.showDots}): + + + Thumbnail-Navigation einschalten? (für Flexslider2, Galleryview; {settings.more.showThumbnails}): + + + Alle Thumbnails anzeigen? (für Galleryview; {settings.more.showAllThumbs}): + + + Pfeil-Navigation bei den Thumbnails anzeigen? (für Flexslider2, Galleryview, Slick; {settings.more.showArrowsThumbs}): + + + Punkte-Navigation bei den Thumbnails anzeigen? (für Flexslider2, Slick; {settings.more.showDotsThumbs}): + + + Bildunterschrift anzeigen? (für Galleryview; {settings.more.showCaptions}): + + + Play/Pause anzeigen? (für Flexslider2, Galleryview; {settings.more.pausePlay}): + + + Pausieren bei mouseover? (für Flexslider2, Slick; {settings.more.pauseOnHover}): + + + Deckkraft (für Galleryview; {settings.more.opacity}): + + + Anzahl sichtbarer Thumbnails (für Slick; {settings.more.slidesToShow}): + + + Anzahl zu scrollende Thumbnails (für Slick; {settings.more.slidesToScroll}): + + + Fade-Effekt (sonst slide; für Flexslider2, Slick; {settings.more.fade}): + + + Übergangs-Effekt (z.B. linear oder swing; für Flexslider2, Galleryview, Slick; {settings.more.easing}): + + + Zeige eine zusätzliche Lightbox an? (für Galleryview; {settings.more.addLightbox}): + + + ja + + + nein + + + + Camaliga + + + Übersicht und Import "carousel/map/list/gallery" + + + Camaliga-Übersicht und Import + + + + Alphabetische Übersicht + + + Camaliga-Elemente in diesem Ordner/Dokument: + + + Karussell-Import + + + Importiere diese Einträge und lösche die alten Einträge + + + Importiere diese Einträge + + + OK, die Elemente wurden importiert! + + + OK, die alten Elemente wurden gelöscht! + + + Einträge gefunden + + + Fehler: keine Einträge gefunden! + + + tt_news-Import + + + mv_cooking-Import + + + Sortierte Bilder-Übersicht + + + Bei dieser sortierten Ansicht aller sichtbaren Elemente kann man die Reihenfolge ändern: + + + Neue Reihenfolge abspeichern + + + Die Reihenfolge der sichtbaren Elemente wurde geändert / gespeichert! + + + + CaMaLiGa-PlugIn-Einstellungen: + + + gehe zur Seite + + + keine Seite verfügbar! + + + + CSV-Export + + + CSV-Import + + + Wechsele die Bilder zu FAL + + + Exportiert eine CSV-Datei aus der DB ins fileadmin-Verzeichnis. + + + Importiert eine CSV-Datei vom fileadmin-Verzeichnis in die DB. + + + Verschiebe die Bilder aus /uploads nach FAL und ändere die Bilder-Relationen in den Camaliga-Elementen. + + + Seite mit Camaliga-Elementen (pages UID): + + + Suche Kategorien nur im angegebenen Ordner? + + + Sprache (sys_language UID): + + + Nur Elemente mit einer dieser Kategorie-UIDs (z.B. 5,7) (keine Leerzeichen!): + + + Pfad und Name der CSV-Datei (muss mit "fileadmin/" beginnen): + + + Pfad und Name der CSV-Datei (muss mit "fileadmin/" beginnen) [man kann * im Namen verwenden, um immer die letzte Datei auszuwählen (sortiert nach Name)]: + + + Überschriften-Zeile in der CSV-Datei (z.B. "UID";"Name";"Beschreibung";"Bundesland"): + + + Datenbankfelder, die exportiert werden sollen (z.B. uid, title, shortdesc, "category:Bundesland") [bei category den Name einer Parent-Kategorie angeben]: + + + Datenbankfelder, in die importiert werden soll (z.B. uid, title, shortdesc, category, category:Brandenburg, category-parent:Bundesland) [es gibt 3 Möglichkeiten, Kategorien zu importieren: Kategorie-Name in jeder Zeile angeben; Kategorie einmal in Header und dann 0 oder 1 in jeder Zeile; Parent-Kategorie im Header und Kind-Kategorien in jeder Zeile]: + + + Texttrenner: + + + Feldtrenner: + + + Feldtrenner bei Kategorien: + + + Von UTF-8 nach ISO konvertieren? + + + Von ISO nach UTF-8 konvertieren? + + + Alte Daten aus dem Ordner erst löschen? + + + Import nur simulieren (Ausgabe statt Import)? + + + Neuer Ort für die Bilder; Ordner, der im default-Storage (normalerweise ist das fileadmin/) liegt: + + + Ungültige Seiten-UID. Bitte eine richtige Seiten-UID eingeben! + + + Ungültige Sprach-UID. Bitte eine richtige Sprach-UID eingeben! + + + Ungültiger Pfad zur CSV-Datei. Bitte einen Pfad angeben, der mit fileadmin/ anfängt! + + + Ungültiger Pfad für die Bilder. Bitte einen existierenden Pfad angeben, der im default-Storage-Folder liegt (normalerweise fileadmin/)! Beispiel: images/slider/ + + + + diff --git a/Resources/Private/Language/de.locallang_csh_tx_camaliga_domain_model_content.xlf b/Resources/Private/Language/de.locallang_csh_tx_camaliga_domain_model_content.xlf new file mode 100644 index 0000000..8642350 --- /dev/null +++ b/Resources/Private/Language/de.locallang_csh_tx_camaliga_domain_model_content.xlf @@ -0,0 +1,90 @@ + + + +
+ + + + Titel + + + Kurze Beschreibung + + + Lange Beschreibung + + + Link zu einer Seite + + + Bild + + + Bild 2 + + + Beschreibung zu Bild 2 + + + Bild 3 + + + Beschreibung zu Bild 3 + + + Bild 4 + + + Beschreibung zu Bild 4 + + + Bild 5 + + + Beschreibung zu Bild 5 + + + Straße + + + PLZ + + + Ort + + + Land + + + Ansprechpartner + + + Telefon-Nr. + + + Handy-Nr. + + + E-Mail + + + Latitude + + + Longitude + + + Eigenes Feld 1 + + + Eigenes Feld 2 + + + Eigenes Feld 3 + + + Übergeordnetes Element von diesem Element + + + + \ No newline at end of file diff --git a/Resources/Private/Language/de.locallang_db.xlf b/Resources/Private/Language/de.locallang_db.xlf new file mode 100644 index 0000000..083d18b --- /dev/null +++ b/Resources/Private/Language/de.locallang_db.xlf @@ -0,0 +1,94 @@ + + + +
+ + + + Camaliga-Element + + + Titel + + + Kurze Beschreibung + + + Lange Beschreibung + + + Link + + + Bilder: Bild 1 + + + Thumbnail oder Bild 2 + + + Beschreibung zu Bild 2 + + + Bild 3 + + + Beschreibung zu Bild 3 + + + Bild 4 + + + Beschreibung zu Bild 4 + + + Bild 5 + + + Beschreibung zu Bild 5 + + + Adresse: Straße + + + PLZ + + + Ort + + + Land + + + Kontakt-Daten: Ansprechpartner + + + Telefon-Nr. + + + Handy-Nr. + + + E-Mail + + + Latitude + + + Longitude + + + Sonstiges: eigenes Feld 1 + + + Eigenes Feld 2 + + + Eigenes Feld 3 + + + Übergeordnetes Element von diesem Element + + + + + \ No newline at end of file diff --git a/Resources/Private/Language/locallang.xlf b/Resources/Private/Language/locallang.xlf new file mode 100644 index 0000000..7828428 --- /dev/null +++ b/Resources/Private/Language/locallang.xlf @@ -0,0 +1,136 @@ + + + +
+ + + + Carousel/gallery/map element + + + Title + + + Short description + + + Long description + + + Link to a page + + + Image + + + Street + + + Zip + + + City + + + Country + + + Contact person + + + Phone + + + Mobile phone + + + E-Mail + + + Latitude + + + Longitude + + + Custom variable 1 + + + Custom variable 2 + + + Custom variable 3 + + + Parent element of this element + + + Category + + + + search + + + 0 entries found. + + + Furthermore informations + + + Address + + + Parent: + + + Other childs: + + + entries found. + + + Options + + + Fulltext search + + + searchword + + + Place + + + Circumference + + + Distance + + + Sort by + + + Order by + + + Folder + + + every + + + preview + + + next + + + Go back + + + Close + + + + \ No newline at end of file diff --git a/Resources/Private/Language/locallang_be.xlf b/Resources/Private/Language/locallang_be.xlf new file mode 100644 index 0000000..75d25ca --- /dev/null +++ b/Resources/Private/Language/locallang_be.xlf @@ -0,0 +1,483 @@ + + + +
+ + + Layout + + + Images + + + Items + + + Categories + + + Layout + + + HTML-Template: + + + no template layout selected! + + + Carousel: elements are side by side + + + Carousel: text and images separated + + + List view: elements are among themselves + + + List view 2: automatic extended version + + + Single view: one element + + + Single view 2: automatic extended version + + + map view (google maps) + + + Only one random element (uncached) + + + A simple responsive carousel + + + Google maps 2: (uncached search template) + + + Template layout (see manual): + + + Default sort by: + + + Modified date + + + Creation date + + + Title + + + Zip + + + City + + + Country + + + Default sort order: + + + ascending + + + descending + + + Shuffle elements (random order, cached)? + + + Try to get the position of an address automatically? + + + Show only distinct entries (parent or one child)? + + + Replace the site-title with the title-field? + + + Set the metatag "description" with the shortdesc-field? + + + Replace the site-title in the sitemap with the title-field? + + + Set the metatag og:title with the title-field? + + + Set the metatag og:description with the shortdesc-field? + + + Set the metatag og:image with the 1. image? + + + Add padding to width and height specification? + + + Where is the list-page (you must add the setting {settings.listId} to the template)? + + + Where is the single-page (you must add the setting {settings.showId} to the template)? + + + List-page: + + + Single-page: + + + Width of images in px ({settings.img.width}): + + + Height of images in px ({settings.img.height}): + + + Width of thumbnail images in px ({settings.img.thumbWidth}): + + + Height of thumbnail images in px ({settings.img.thumbHeight}): + + + Width in px ({settings.item.width}): + + + Height in px ({settings.item.height}): + + + Padding in px ({settings.item.padding}): + + + Margin in px ({settings.item.margin}): + + + Number of visible items [per row] (e.g. JavaScript-parameter for carousels) ({settings.item.items}): + + + Number of visible elements (SQL-select-parameter): + + + Selected default categories (for extended templates: AND for radio-buttons and OR for checkboxes): + + + Category mode: + + + Use the category relations of translated elements (bugy) + + + Use the category relations of the original element + + + Category mode (for normal templates): + + + AND combination of the selected categories + + + OR combination of the selected categories + + + Category mode (for normal templates): + + + Show indicators: + + + Show controls: + + + The amount of time to delay between automatically cycling an item (ms): + + + Pauses the cycling of the carousel on mouseenter? + + + The carousel should cycle continuously? + + + The carousel should react to keyboard events? + + + Size og the dialog window (normal, small or large): + + + small + + + large + + + Animation type (can be removed only via TypoScript): + + + fading + + + Close the modal when escape key is pressed? + + + First collapsible element is opened by default? + + + open all collapsible elements + + + Open allways max. one collapsible element? + + + Toggles the collapsible element on invocation? + + + Extended options + + + Activate extended template with category search (see manual; {settings.extended.enable})? + + + Show only the search form without results ({settings.extended.onlySearchForm})? + + + Restrict the search options ({settings.extended.restrictSearch})? + + + Proximity values in km. E.g. 10,20,50 ({settings.extended.radiusValues}): + + + Save the search parameters in a cookie and load them later? + + + More + + + Enable modulo-calculation (needed for e.g. the Ekko-template; {settings.more.setModulo}): + + + Speed in sec. (for Flexslider2, Galleryview, Parallax, Slick {settings.more.speed}): + + + Enable autoplay? (for Flexslider2, Galleryview, Slick {settings.more.autoplay}): + + + Autoplay speed in sec. (for Flexslider2, Galleryview, Parallax, Slick; {settings.more.autoplaySpeed}): + + + Infinite loop? (for Flexslider2, Slick; {settings.more.infinite}): + + + Vertical direction? (for Flexslider2, Slick; {settings.more.vertical}): + + + Right to left? (for Flexslider2, Slick; {settings.more.reverse}): + + + Crop images if they do not fit? (for Galleryview; {settings.more.crop}): + + + Show the panel? (for Flexslider2, Slick; {settings.more.showPanel}): + + + Show arrow navigation? (for Flexslider2, Galleryview, Slick; {settings.more.showArrows}): + + + Show dots navigation? (for Flexslider2, Slick; {settings.more.showDots}): + + + Show thumbnails/image navigation? (for Flexslider2, Galleryview; {settings.more.showThumbnails}): + + + Show all thumbnails? (für Galleryview; {settings.more.showAllThumbs}): + + + Arrow navigation for the thumbnails? (for Flexslider2, Galleryview, Slick; {settings.more.showArrowsThumbs}): + + + Dot navigation for the thumbnails? (for Flexslider2, Slick; {settings.more.showDotsThumbs}): + + + Show captions? (for Galleryview; {settings.more.showCaptions}): + + + Show Play/Pause? (for Flexslider2, Galleryview; {settings.more.pausePlay}): + + + Pause on mouseover? (for Flexslider2, Slick; {settings.more.pauseOnHover}): + + + Opacity (for Galleryview; {settings.more.opacity}): + + + Slides to show (for Slick; {settings.more.slidesToShow}): + + + Slides to scroll (for Slick; {settings.more.slidesToScroll}): + + + Fade effect (otherwise slide; for Flexslider2, Slick; {settings.more.fade}): + + + Easing effect (e.g. linear or swing; for Flexslider2, Galleryview, Slick; {settings.more.easing}): + + + Show an additional Lightbox? (for Galleryview; {settings.more.addLightbox}): + + + yes + + + no + + + + Camaliga + + + Overview and import for "carousel/map/list/gallery" + + + Camaliga overview and import + + + + Alphabetical overview + + + Camaliga-elements in this folder/document: + + + Karussell-Import + + + Import this entries + + + entries found. + + + Import this entries and delete the old entries + + + OK. Elements imported! + + + OK. Old elements deleted! + + + Error: no entries found! + + + tt_news-Import + + + mv_cooking-Import + + + Sorted thumbnail overview + + + In this sorted view of all visible elements you can change the order of the elements: + + + Save the new order + + + The order of the visible elements has been changed / saved! + + + + CaMaLiGa plugin settings: + + + switch to page + + + page not available! + + + + CSV export + + + CSV import + + + Switch to FAL + + + Writes a CSV-file from the DB to the fileadmin folder. + + + Reads a CSV-file from the fileadmin folder to the DB. + + + Move /uploads-images to FAL and change the image-relation in the camaliga-elements. + + + Page with camaliga-elements (pages UID): + + + Search categories only in the given folder? + + + Language (sys_language UID): + + + Only elements with one of this category-uids (e.g. 5,7) (no space!): + + + Path and name of the csv file (must begin with "fileadmin/"): + + + Path and name of the csv file (must begin with "fileadmin/") [you can use * in the name to select always the last file (ordered by name)]: + + + Header line of the csv file (e.g. "UID";"Name";"Description";"Category 1"): + + + Database fields to export (e.g. uid, title, shortdesc, "category:State") [at category: the name of the parent category]: + + + Database fields for the import (e.g. uid, title, shortdesc, category, category:Brandenburg, category-parent:State) [there are 3 possibilities to import categories: category-name in every row; category in the header an then 0 or 1 in every row; parent-category in the header and child-categories in every row]: + + + Separator: + + + Delimiter: + + + Category delimiter: + + + Convert text from UTF-8 to ISO? + + + Convert text from ISO to UTF-8? + + + Delete old entries of this folder first? + + + Simulation only (echo, no import)? + + + New place for the images (folder in your default-storage): + + + Invalid pages uid, please enter a valid pages uid! + + + Invalid sys_language uid, please enter a valid sys_language uid! + + + Invalid csv file, please enter a valid path to the csv file in the fileadmin folder! + + + Invalid image-folder-path, please enter a valid and existend path for the images in your default-storage-folder (usually fileadmin/)! Example: images/slider/ + + + + diff --git a/Resources/Private/Language/locallang_csh_tx_camaliga_domain_model_content.xlf b/Resources/Private/Language/locallang_csh_tx_camaliga_domain_model_content.xlf new file mode 100644 index 0000000..8619098 --- /dev/null +++ b/Resources/Private/Language/locallang_csh_tx_camaliga_domain_model_content.xlf @@ -0,0 +1,89 @@ + + + +
+ + + Title + + + Short description + + + Long description + + + Link to a page + + + Image + + + Image 2 + + + Caption to image 2 + + + Image 3 + + + Caption to image 3 + + + Image 4 + + + Caption to image 4 + + + Image 5 + + + Caption to image 5 + + + Street + + + Zip + + + City + + + Country + + + Contact person + + + Phone + + + Mobile + + + E-Mail + + + Latitude + + + Longitude + + + Custom variable 1 + + + Custom variable 2 + + + Custom variable 3 + + + Parent element of this element + + + + \ No newline at end of file diff --git a/Resources/Private/Language/locallang_db.xlf b/Resources/Private/Language/locallang_db.xlf new file mode 100644 index 0000000..b487316 --- /dev/null +++ b/Resources/Private/Language/locallang_db.xlf @@ -0,0 +1,94 @@ + + + +
+ + + + Carousel/gallery/map element + + + Title + + + Short description + + + Long description + + + Link + + + Images: image 1 + + + Thumbnail or image 2 + + + Caption for image 2 + + + Image 3 + + + Caption for image 3 + + + Image 4 + + + Caption for image 4 + + + Image 5 + + + Caption for image 5 + + + Address: street + + + Zip + + + City + + + Country + + + Contact: person + + + Phone + + + Mobile phone + + + E-Mail + + + Latitude + + + Longitude + + + Additional: custom 1 + + + Custom 2 + + + Custom 3 + + + Parent element of this element + + + + + \ No newline at end of file diff --git a/Resources/Private/Layouts/Backend.html b/Resources/Private/Layouts/Backend.html new file mode 100644 index 0000000..d54ca34 --- /dev/null +++ b/Resources/Private/Layouts/Backend.html @@ -0,0 +1,21 @@ + +
+
+ + + + + + +
+
-
+ +
+
\ No newline at end of file diff --git a/Resources/Private/Layouts/Default.html b/Resources/Private/Layouts/Default.html new file mode 100644 index 0000000..6979913 --- /dev/null +++ b/Resources/Private/Layouts/Default.html @@ -0,0 +1,3 @@ +
+ +
\ No newline at end of file diff --git a/Resources/Private/Partials/Fancybox.html b/Resources/Private/Partials/Fancybox.html new file mode 100644 index 0000000..6cb4e4a --- /dev/null +++ b/Resources/Private/Partials/Fancybox.html @@ -0,0 +1,29 @@ + +

Die Fotos in groß über eine LightBox ansehen:
+ + + + + + + +

\ No newline at end of file diff --git a/Resources/Private/Partials/Options.html b/Resources/Private/Partials/Options.html new file mode 100644 index 0000000..e2519a2 --- /dev/null +++ b/Resources/Private/Partials/Options.html @@ -0,0 +1,92 @@ + + +
+
{f:translate(key: 'fulltext')}:
+
+ +
+
{f:translate(key: 'place')}:
+
+ +
+
+
+
+ +
+
{f:translate(key: 'fulltext')}:
+
+ +
+
+
+
{f:translate(key: 'place')}:
+
+ +
+
{f:translate(key: 'radius')}:
+
+ +
+
+
+
+
+ + +
+
{f:translate(key: 'sortby')}:
+
+ +
+
{f:translate(key: 'orderby')}:
+
+ +
+
+
+
+ + +
+
{catitemVal.title}:
+
+ + + + + + + + + + + {catitemValChild.title} + +
+
+
+
+ + + +
+
{f:translate(key: 'folder')}:
+
+ + + +
+
+
+
+
\ No newline at end of file diff --git a/Resources/Private/Partials/Route.html b/Resources/Private/Partials/Route.html new file mode 100644 index 0000000..6c1634a --- /dev/null +++ b/Resources/Private/Partials/Route.html @@ -0,0 +1,41 @@ + + +
+ +
+ + +
+ + +
+
+
\ No newline at end of file diff --git a/Resources/Private/Templates/Backend/Import.html b/Resources/Private/Templates/Backend/Import.html new file mode 100644 index 0000000..fc8fb1f --- /dev/null +++ b/Resources/Private/Templates/Backend/Import.html @@ -0,0 +1,27 @@ + + + +

+ + + + +

+
+ + + + + + + +
UIDtitelmeldunglinkbild
{entry.uid}{entry.titel}{entry.meldung}{entry.link}{entry.bild}
+
+ +   + +
+
+
+ +
diff --git a/Resources/Private/Templates/Backend/ImportNews.html b/Resources/Private/Templates/Backend/ImportNews.html new file mode 100644 index 0000000..9463e2e --- /dev/null +++ b/Resources/Private/Templates/Backend/ImportNews.html @@ -0,0 +1,28 @@ + + + +

+ + + + +

+
+ +

{entries -> f:count()} {f:translate(key: 'LLL:EXT:camaliga/Resources/Private/Language/locallang_be.xlf:import.found')}.

+ + + + + + +
UIDtitleshortlinksimage
{entry.uid}{entry.title}{entry.short}{entry.links}{entry.image}
+
+ +   + +
+
+
+ +
diff --git a/Resources/Private/Templates/Backend/Index.html b/Resources/Private/Templates/Backend/Index.html new file mode 100644 index 0000000..3f3f214 --- /dev/null +++ b/Resources/Private/Templates/Backend/Index.html @@ -0,0 +1,8 @@ + + +

+

{f:translate(key: 'LLL:EXT:camaliga/Resources/Private/Language/locallang_be.xlf:index.elements')}

+ +
diff --git a/Resources/Private/Templates/Backend/PageLayoutView.html b/Resources/Private/Templates/Backend/PageLayoutView.html new file mode 100644 index 0000000..63995e0 --- /dev/null +++ b/Resources/Private/Templates/Backend/PageLayoutView.html @@ -0,0 +1,47 @@ +{namespace core = TYPO3\CMS\Core\ViewHelpers} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
{header -> f:format.raw()}
+ + {core:icon(identifier:'actions-move-down')} + {core:icon(identifier:'actions-move-up')} + Toggle settings + +
{item.0 -> f:format.raw()}{item.1 -> f:format.raw()}
+
+ + {header -> f:format.raw()} + +
diff --git a/Resources/Private/Templates/Backend/Thumb.html b/Resources/Private/Templates/Backend/Thumb.html new file mode 100644 index 0000000..38a0f83 --- /dev/null +++ b/Resources/Private/Templates/Backend/Thumb.html @@ -0,0 +1,65 @@ + + + + Siehe: https://docs.typo3.org/typo3cms/ExtbaseGuide/Fluid/ViewHelper/Be/Container.html + includeCssFiles="{0: '{f:uri.external(uri: \'code.jquery.com/ui/1.11.4/themes/smoothness/jquery-ui.css\')}'}" + 0: 'TYPO3/CMS/Backend/Modal', + + + + + + +
+

+
+
+ +
+
+ +


+ +

+
+ +
    + +
  • + +
    + + + + + +

    {content.title}

    {content.shortdesc}
    + +
  • +
    +
+
+ +
+ +
+
+
\ No newline at end of file diff --git a/Resources/Private/Templates/Content/AdGallery.html b/Resources/Private/Templates/Content/AdGallery.html new file mode 100644 index 0000000..893b71f --- /dev/null +++ b/Resources/Private/Templates/Content/AdGallery.html @@ -0,0 +1,131 @@ + + +This template is a gallery that requires jQuery + jQuery UI Easing and AD Gallery from here: +http://adgallery.codeplex.com/documentation +Download AD Gallery and include it like this with TypoScript: + page { + includeCSS.adgalcss = fileadmin/ADGallery/lib/jquery.ad-gallery.css + includeJSFooter.adgallery = fileadmin/ADGallery/lib/jquery.ad-gallery.min.js + jsFooterInline { + 77 = TEXT + 77.value ( + var galleries = $('.ad-gallery').adGallery(); + ) + } + } +Remove jsFooterInline, if you use the extended version of this template! +Or add this to jsFooterInline, if you want to display a FancyBox too: +$(".ad-gallery").on("click", ".ad-image", function() { + $.fancybox({ + href : $(this).find("img").attr("src"), + closeBtn: true, + closeClick : true, + openEffect : 'elastic', + openSpeed : 150, + closeEffect : 'elastic', + closeSpeed : 150, + helpers : { + overlay : null + } + }); +}); +The FancyBox-solution is from here: +http://forum.jquery.com/topic/fancybox-in-ad-gallery +You need jQuery FancyBox and jQuery FancyBox Buttons. Download them and include them additional like this with TypoScript: + page { + includeJS.fancybox = fileadmin/template/fancyBox/source/jquery.fancybox.pack.js + includeCSS.fancybox = fileadmin/template/fancyBox/source/jquery.fancybox.css + } +Copy this HTML-file from typo3conf/ext/camaliga/Resources/Private/Templates/Content to your fileadmin-folder. +Specifty the fileadmin-folder like this: + plugin.tx_camaliga.view.templateRootPaths.1 = fileadmin/Resources/Private/Extensions/Camaliga/ +Copy this file in the subfolder "Content" of this folder. + + + + + + + +
+
+
+ +

+
+
+ + + + +
+

{f:translate(key: 'options', default: 'Options')}

+ + + +
+
+ + + + + + +
+
diff --git a/Resources/Private/Templates/Content/Bootstrap.html b/Resources/Private/Templates/Content/Bootstrap.html new file mode 100644 index 0000000..4baad13 --- /dev/null +++ b/Resources/Private/Templates/Content/Bootstrap.html @@ -0,0 +1,80 @@ + + +This example shows a Bootstrap carousel. +Note 1: you need Bootstrap with Bootstrap Carousel for this example. Download it from here: +http://getbootstrap.com/javascript/#carousel +Copy the JS- and CSS-file into your fileadmin-folder! +Or better: install a Bootstrap extension and you are done! +Note 2: if you want to copy this HTML-file to your fileadmin-folder, you can specifty the folder like this: + plugin.tx_camaliga.view.templateRootPaths.1 = fileadmin/template/files/ +Copy this file in a subfolder named "Content" of this folder. + + + + + + + + + + +FAL image without srcset: f:image src="{content.falimage.uid}" alt="{content.title}" title="{content.title}" treatIdAsReference="1" + \ No newline at end of file diff --git a/Resources/Private/Templates/Content/Carousel.html b/Resources/Private/Templates/Content/Carousel.html new file mode 100644 index 0000000..10de20b --- /dev/null +++ b/Resources/Private/Templates/Content/Carousel.html @@ -0,0 +1,86 @@ +{namespace cam=Quizpalme\Camaliga\ViewHelpers} + + +This default template is a simple carousel that requires only jQuery. +It is an example from enavu: +http://web.enavu.com/tutorials/making-a-jquery-infinite-carousel-with-nice-features/ +Note 1: you need at least n+2 elements for this carousel! n: visible elements at one time. + If you doesn´t have n+2 elements, set infinite to 0. +Note 2: you can copy and customise the camaliga/Resources/Public/css/Carousel.css + and the camaliga/Resources/Public/JavaScript/jquery.camaliga.js to your fileadmin-folder. + Remove that 2 things from this template if you do that... +Note 3: if you want to copy this HTML-file to your fileadmin-folder, you can specifty the folder like this with TypoScript: + plugin.tx_camaliga.view.templateRootPaths.1 = fileadmin/template/files/ + Copy this file in a subfolder named "Content" of this folder. +Note 4: if your width contains the padding too, you must activate "addPadding" via TypoScript or FlexForms too. + This are all avaiable variables for the size: paddingItemWidth, totalItemWidth, itemWidth, totalWidth, + paddingItemHeight, totalItemHeight, itemHeight and the img- and item-settings. +Note 5: if you include jQuery only in the footer, you will need to move $('#carousel_ul').camaliga(...) to the footer too! + + + + + + + + + + +
+ +
+ +

+
+
+
diff --git a/Resources/Private/Templates/Content/CarouselSeparated.html b/Resources/Private/Templates/Content/CarouselSeparated.html new file mode 100644 index 0000000..80f41f0 --- /dev/null +++ b/Resources/Private/Templates/Content/CarouselSeparated.html @@ -0,0 +1,95 @@ +{namespace cam=Quizpalme\Camaliga\ViewHelpers} + + +This template is a double carousel that requires only jQuery. It shows the images and text beside each other. +This example works only with a few elements. +It is based on the example from enavu: +http://web.enavu.com/tutorials/making-a-jquery-infinite-carousel-with-nice-features/ +Note 1: you need at least n+2 elements for this carousel! n: visible elements at one time. +Note 2: you can copy and customise the camaliga/Resources/Public/css/List.css to your fileadmin-folder. + Remove that thing from this template if you do that... +Note 3: if you want to copy this HTML-file to your fileadmin-folder, you can specifty the folder like this with TypoScript: + plugin.tx_camaliga.view.templateRootPaths.1 = fileadmin/template/files/ + Copy this file in a subfolder named "Content" of this folder. +Note 4: if you want to change the width of the elements, you need to change it in the CSS-file and here: + f:image width="xxx" height="yyy" +Note 5: if you include jQuery only in the footer, you will need to move $('#carousel_ul1').camaliga(...) to the footer too! + + + + + + + + + +
+ +
+ +

+
+
+
diff --git a/Resources/Private/Templates/Content/Collapse.html b/Resources/Private/Templates/Content/Collapse.html new file mode 100644 index 0000000..8f9c088 --- /dev/null +++ b/Resources/Private/Templates/Content/Collapse.html @@ -0,0 +1,62 @@ + + +This example shows a Bootstrap Collapse/Accordion. +Note 1: you need Bootstrap & Bootstrap Collapse for this example. Download it from here: +http://getbootstrap.com/javascript/#collapse +Copy the JS- and CSS-file into your fileadmin-folder! +Or better: install a Bootstrap extension and you are done! +Note 2: if you want to copy this HTML-file to your fileadmin-folder, you can specifty the folder like this: + plugin.tx_camaliga.view.templateRootPaths.1 = fileadmin/template/files/ +Copy this file in a subfolder named "Content" of this folder. + + + + +
+ +
+ + +
+ +
+ +
+ + + + + + + +

{content.shortdesc}

+ {content.longdesc} + + {f:translate(key: 'more')} + +
+
+
+ +
+ \ No newline at end of file diff --git a/Resources/Private/Templates/Content/Coolcarousel.html b/Resources/Private/Templates/Content/Coolcarousel.html new file mode 100644 index 0000000..1e23834 --- /dev/null +++ b/Resources/Private/Templates/Content/Coolcarousel.html @@ -0,0 +1,161 @@ + + +Coolslider-Template, based on: +http://coolcarousels.frebsite.nl/c/66/ + +Note 1: Download Coolslider and copy it to your fileadmin-folder. Include it like this: + page { + includeJS.coolslider = fileadmin/coolcarousel/jquery.carouFredSel-6.2.0-packed.js + } +Note 2: if you want to copy this HTML-file to your fileadmin-folder, you can specifty the folder like this: + plugin.tx_camaliga.view.templateRootPaths.1 = fileadmin/template/files/ +Copy this file in a subfolder named "Content" of this folder. + + + + + + + + + + +
+ +
+
+
+ +
+ +
+ +

+
+
+
\ No newline at end of file diff --git a/Resources/Private/Templates/Content/Ekko.html b/Resources/Private/Templates/Content/Ekko.html new file mode 100644 index 0000000..5a1a723 --- /dev/null +++ b/Resources/Private/Templates/Content/Ekko.html @@ -0,0 +1,56 @@ + + +Ekko Lightbox for Bootstrap - Template, based on: +http://www.jqueryscript.net/lightbox/Simple-Gallery-Lightbox-Plugin-with-jQuery-Bootstrap-Ekko-Lightbox.html + +Note 1: Download the Ekko Lightbox and copy it to your fileadmin-folder. Include it like this: + page { + includeJS.ekko = fileadmin/template/ekko-lightbox.js + includeCSS.ekko = fileadmin/template/ekko-lightbox.css + jsFooterInline { + 77 = TEXT + 77.value ( + jQuery(document).delegate('*[data-toggle="lightbox"]', 'click', function(event) { event.preventDefault(); $(this).ekkoLightbox(); }); + ) + } + } +Note 2: if you want to copy this HTML-file to your fileadmin-folder, you can specifty the folder like this: + plugin.tx_camaliga.view.templateRootPaths.1 = fileadmin/template/files/ +Copy this file in a subfolder named "Content" of this folder. +Note 3: number of images per row can not be set to 5 due to a Bootstrap weakness. +Note 4: you must enable setModulo for this template! + plugin.tx_camaliga.settings.item.setModulo = 1 + + + + + + + +
+
col-lg-2 col-md-3 col-sm-4col-lg-3 col-md-4 col-sm-4 col-xs-6col-lg-4 col-md-4 col-sm-6col-lg-6 col-md-6 col-sm-6 col-xs-12"> +
+ + + + + +
+
+
+
+ +
+ +

+
+
+
\ No newline at end of file diff --git a/Resources/Private/Templates/Content/Elastislide.html b/Resources/Private/Templates/Content/Elastislide.html new file mode 100644 index 0000000..a608aa6 --- /dev/null +++ b/Resources/Private/Templates/Content/Elastislide.html @@ -0,0 +1,71 @@ + + +jQuery Elastislide example. You need the Elastislide plugin from here for this example: +http://tympanus.net/codrops/2011/09/12/elastislide-responsive-carousel/ +Extract the zip file and copy it to your fileadmin-folder! +Include the CSS- and JS-file with TypoScript (or here) from your fileadmin-folder. +Note: if you want to copy this HTML-file to your fileadmin-folder, you can specifty the folder like this: + plugin.tx_camaliga.view.templateRootPaths.1 = fileadmin/template/files/ +Copy this file in a subfolder named "Content" of this folder. + + + + + + + + + + + + + + + + + +

+
+
+
\ No newline at end of file diff --git a/Resources/Private/Templates/Content/FancyBox.html b/Resources/Private/Templates/Content/FancyBox.html new file mode 100644 index 0000000..81cdaed --- /dev/null +++ b/Resources/Private/Templates/Content/FancyBox.html @@ -0,0 +1,50 @@ + + +This template is a gallery that requires jQuery FancyBox and jQuery FancyBox Buttons from here: +http://fancyapps.com/fancybox/ +Download them and include them like this with TypoScript: + page { + includeJS.fancybox = fileadmin/template/fancyBox/source/jquery.fancybox.pack.js + includeJS.fancybuttons = fileadmin/template/fancyBox/source/helpers/jquery.fancybox-buttons.js + includeCSS.fancybox = fileadmin/template/fancyBox/source/jquery.fancybox.css + includeCSS.fancybuttons = fileadmin/template/fancyBox/source/helpers/jquery.fancybox-buttons.css + } +Note: if you want to copy this HTML-file to your fileadmin-folder, you can specifty the folder like this: + plugin.tx_camaliga.view.templateRootPaths.1 = fileadmin/template/files/ +Copy this file in a subfolder named "Content" of this folder. + + + + + + + +

+ + + + + + + +

+
+ +

+
+
+
\ No newline at end of file diff --git a/Resources/Private/Templates/Content/Flexslider2.html b/Resources/Private/Templates/Content/Flexslider2.html new file mode 100644 index 0000000..3709fbe --- /dev/null +++ b/Resources/Private/Templates/Content/Flexslider2.html @@ -0,0 +1,133 @@ + + +jQuery FlexSlider 2 example. You need the FlexSlider 2 plugin from here for this example: +https://www.woothemes.com/flexslider/ +Download it from GitHub: +https://github.com/woothemes/FlexSlider +Extract the zip file and copy it to your fileadmin-folder! +Include the CSS- and JS-file with TypoScript from your fileadmin-folder like this: + +page.includeCSS.flexslider = /fileadmin/Resources/Public/Scripts/FlexSlider/flexslider.css +page.includeJSFooter.flexslider = /fileadmin/Resources/Public/Scripts/FlexSlider/jquery.flexslider-min.js + +Note: if you want to copy this HTML-file to your fileadmin-folder, you can specifty the folder like this: + plugin.tx_camaliga.view.templateRootPaths.1 = fileadmin/template/files/ +Copy this file in a subfolder named "Content" of this folder. + + + + + +
+
    + +
  • + + + + + +

    {content.title}

    +
  • +
    +
+
+
+ +
+
    + +
  • + + + + + +
  • +
    +
+
+
+
\ No newline at end of file diff --git a/Resources/Private/Templates/Content/Flipster.html b/Resources/Private/Templates/Content/Flipster.html new file mode 100644 index 0000000..3606cb9 --- /dev/null +++ b/Resources/Private/Templates/Content/Flipster.html @@ -0,0 +1,50 @@ + + +This template is a carousel that requires jQuery and jQuery.Flipster from here: +https://github.com/drien/jquery-flipster +Download it and include it like this with TypoScript: + page { + includeCSS.flipstercss = fileadmin/jquery-flipster-master/src/css/jquery.flipster.min.css + includeJSFooter.flipster = fileadmin/jquery-flipster-master/src/js/jquery.flipster.min.js + jsFooterInline { + 77 = TEXT + 77.value ( + $(function(){ $(".flipster").flipster({ style: 'carousel', start: 'center' }); }); + ) + } + } +Note: if you want to copy this HTML-file to your fileadmin-folder, you can specifty the folder like this: + plugin.tx_camaliga.view.templateRootPaths.1 = fileadmin/template/files/ +Copy this file in a subfolder named "Content" of this folder. + + + + + + +
+
    + +
  • +

    {content.title}

    + + + + + +
    +

    {content.shortdesc}

    + +

    {f:translate(key: 'more')}

    +
    +
  • +
    +
+
+ +
+ +

+
+
+
diff --git a/Resources/Private/Templates/Content/FractionSlider.html b/Resources/Private/Templates/Content/FractionSlider.html new file mode 100644 index 0000000..72d0d5b --- /dev/null +++ b/Resources/Private/Templates/Content/FractionSlider.html @@ -0,0 +1,61 @@ +{namespace cam=Quizpalme\Camaliga\ViewHelpers} + + +Note: this template is deprecated. Use the extension fp_fractionslider instead! +This template is a slider that requires jQuery and FractionSlider from here: +http://jacksbox.de/fractionslider-demos/background-animation/ +Download the FractionSlider and include it with the cam:addPublicResources here in the file (change the path!). + +Start it with (replace the last values in dimensions with the width and height of your background image; thats very important): + +page.jsFooterInline.819 = TEXT +page.jsFooterInline.819.value = jQuery(window).load(function(){ $('.fractionSlider').fractionSlider({'backgroundEase' : 'easeOutCubic', 'increase' : true, 'fullWidth': true, 'controls': true, 'pager': false, 'responsive': true, 'dimensions': '800,600'}); }); + +Hint: use the caption and custom fields to set individual animation effects! Replace then + data-in="right" data-position="330,200" data-delay="800" data-time="1750" +with + {content.custom1} +and so on. +Note: if you want to copy this HTML-file to your fileadmin-folder, you can specifty the folder like this: + plugin.tx_camaliga.view.templateRootPaths.1 = fileadmin/template/files/ +Copy this file in a subfolder named "Content" of this folder. + + + + + + + + +
+ +
+ + + + Slider-Bild + +

{content.title}

+

{content.shortdesc}

+
{content.longdesc}
+

+ {f:translate(key: 'more')} +

+ + + + + Bild 2 + Bild 3 + +
+
+
+
+
+
+ +

+
+
+
\ No newline at end of file diff --git a/Resources/Private/Templates/Content/Fullwidth.html b/Resources/Private/Templates/Content/Fullwidth.html new file mode 100644 index 0000000..8b937eb --- /dev/null +++ b/Resources/Private/Templates/Content/Fullwidth.html @@ -0,0 +1,83 @@ + + +jQuery Full Width Image Slider-Template, based on: +https://github.com/JoeBonham/jQuery-Full-Width-Image-Slider + +Note 1: Download the Full Width Image Slider and copy it to your fileadmin-folder. Include it like this: + page { + includeJS.fullwidth = fileadmin/jQuery-Full-Width-Image-Slider-master/slider.js + includeCSS.fullwidth = fileadmin/jQuery-Full-Width-Image-Slider-master/slider.less + } +Note 2: if you want to copy this HTML-file to your fileadmin-folder, you can specifty the folder like this: + plugin.tx_camaliga.view.templateRootPaths.1 = fileadmin/template/files/ +Copy this file in a subfolder named "Content" of this folder. + + + + + + + +
+
+ +
+
+
+ {content.title}
+ + {f:translate(key: 'more')} + +
+
+ + + + + +
+
+
+
+ < + > +
+
+
+ + + +
+ +

+
+
+
\ No newline at end of file diff --git a/Resources/Private/Templates/Content/Galleryview.html b/Resources/Private/Templates/Content/Galleryview.html new file mode 100644 index 0000000..a37aee0 --- /dev/null +++ b/Resources/Private/Templates/Content/Galleryview.html @@ -0,0 +1,97 @@ + + +This template is a gallery that requires jQuery + jQuery Timers + jQuery UI Effects Easing and GalleryView from here: +https://github.com/jackwanders/GalleryView +https://galleryview.co/Galleryview/ +Note 1: copy the GalleryView-files into your fileadmin-folder and include them via TypoScript like this: + page { + includeCSS.galleryview = fileadmin/template/galleryview/css/jquery.galleryview-3.0-dev.css + includeJSFooter.galleryview = fileadmin/template/galleryview/js/jquery.galleryview-3.0-dev.js + } +Or you can use the ViewHelper cam:addPublicResources. See manual! +Note 2: if you want to copy this HTML-file to your fileadmin-folder, you can specifty the folder like this: + plugin.tx_camaliga.view.templateRootPaths.1 = fileadmin/template/files/ +Copy this file in a subfolder named "Content" of this folder. + + + + + + + + +
    + +
  • + + + + + +
  • +
    +
+ + + + +
+ +

+
+
+ + + +
+

{f:translate(key: 'options', default: 'Options')}

+ + + +
+
+
+
\ No newline at end of file diff --git a/Resources/Private/Templates/Content/Innerfade.html b/Resources/Private/Templates/Content/Innerfade.html new file mode 100644 index 0000000..6720e01 --- /dev/null +++ b/Resources/Private/Templates/Content/Innerfade.html @@ -0,0 +1,61 @@ + + +Innerfade-Template, based on Innerfade from +http://medienfreunde.com/lab/innerfade/ + +Note 1: Download Innerfade and copy it to your fileadmin-folder. Include it like this: + page { + includeJS.innerfade = fileadmin/template/jquery.innerfade/js/jquery.innerfade.js + } +Note 2: if you want to copy this HTML-file to your fileadmin-folder, you can specifty the folder like this: + plugin.tx_camaliga.view.templateRootPaths.1 = fileadmin/template/files/ +Copy this file in a subfolder named "Content" of this folder. + + + + + + + + +
    + +
  • + +
    + +
    + +
    +

    {content.title}

    +

    {content.shortdesc} + + {f:translate(key: 'more')} + +

    +
    +
    +
  • +
    +
+
+ +
+ +

+
+
+
\ No newline at end of file diff --git a/Resources/Private/Templates/Content/Isotope.html b/Resources/Private/Templates/Content/Isotope.html new file mode 100644 index 0000000..a115ca4 --- /dev/null +++ b/Resources/Private/Templates/Content/Isotope.html @@ -0,0 +1,84 @@ + + + +This template is a Isotope example that requires jQuery and Isotope from here: +http://isotope.metafizzy.co/ +Include it like this with TypoScript: + +page { + includeJSFooter.isotope = fileadmin/templates/scripts/mpezzi-bootstrap_isotope/js/isotope.pkgd.min.js + includeJSFooter.isotopeinit = fileadmin/templates/scripts/mpezzi-bootstrap_isotope/js/isotope.init.js +} + +isotope.init.js should contain something like this: + +var lastiso = ''; +$('.grid').isotope({ + // options + itemSelector: '.grid-item', + // layoutMode: 'fitRows', + percentPosition: true, + masonry: { + // use outer width of grid-sizer for columnWidth + columnWidth: 50 + } +}); +$('.isoheader').click(function(event){ + event.preventDefault(); + $(this).closest('div').addClass('isoopen'); + $(this).closest('div').addClass('grid-item--width2'); + $(this).closest('div').addClass('grid-item--height2'); + if (lastiso != '') { + lastiso.removeClass('isoopen'); + lastiso.removeClass('grid-item--width2'); + lastiso.removeClass('grid-item--height2'); + } + lastiso = $(this).closest('div'); + $('.grid').isotope('layout'); +}); + +Note: if you want to copy this HTML-file to your fileadmin-folder, you can specifty the folder like this: + plugin.tx_camaliga.view.templateRootPaths.1 = fileadmin/template/files/ +Copy this file in a subfolder named "Content" of this folder. + + + + + + + + +
+ +
+

+ {content.title} +

+
+ + + + + +

{content.shortdesc} + + {f:translate(key: 'more')} + +

+
+
+
+
+
+ +

+
+
+
\ No newline at end of file diff --git a/Resources/Private/Templates/Content/Lightslider.html b/Resources/Private/Templates/Content/Lightslider.html new file mode 100644 index 0000000..364ddad --- /dev/null +++ b/Resources/Private/Templates/Content/Lightslider.html @@ -0,0 +1,66 @@ + + +This is a Lightslider that uses the jQuery-plugin from here: +http://sachinchoolur.github.io/lightslider/settings.html +Note: if you want to copy this HTML-file to your fileadmin-folder, you can specifty the folder like this with TypoScript: + plugin.tx_camaliga.view.templateRootPath = fileadmin/template/files/ + Copy this file in a subfolder named "Content" of this folder. +Download the jQuery-plugin and include it like this: + page.includeCSS.lighslider = fileadmin/lightslider-master/lightSlider/css/lightSlider.css + page.includeJSFooter.lighslider = fileadmin/lightslider-master/lightSlider/js/jquery.lightSlider.min.js + page.includeJSFooter.lighsliderStart= fileadmin/Resources/Public/Scripts/Lightslider.js +Put this JS-code in the last file: + $(document).ready(function() { + $('#lightSlider').lightSlider({ + item:4, + slideMove:1, + slideMargin:20, + //prevHtml: 'weiter', + easing: 'cubic-bezier(0.25, 0, 0.25, 1)', + speed:600, + responsive : [ + { + breakpoint:800, + settings: { + item:3, + slideMargin:15 + } + }, + { + breakpoint:480, + settings: { + item:2, + slideMargin:10 + } + } + ] + }); + }); + + + + + + +
    + +
  • + + + + + +

    {content.title}

    +

    {content.shortdesc}

    + +

    {f:translate(key: 'more')}

    +
    +
  • +
    +
+
+ +

+
+
+
diff --git a/Resources/Private/Templates/Content/List.html b/Resources/Private/Templates/Content/List.html new file mode 100644 index 0000000..3d14474 --- /dev/null +++ b/Resources/Private/Templates/Content/List.html @@ -0,0 +1,88 @@ + + +Note 1: copy the CSS-file into your fileadmin-folder and include it via TypoScript! + Remove that line from this template after doing that... +Note 2: if you want to copy this HTML-file to your fileadmin-folder, you can specifty the folder like this: + plugin.tx_camaliga.view.templateRootPaths.1 = fileadmin/template/files/ + Copy this file in a subfolder named "Content" of this folder. +Note 3: you can use pageUid="{settings.showId}" in link.action if you have a separeted single page. + + + + + + + + + + + + + + + +

{contents -> f:count()} {f:translate(key: 'entries_found')}

+
+ +

+
+
+ + + +
+

{f:translate(key: 'options', default: 'Options')}

+ + + +
+
+
+
diff --git a/Resources/Private/Templates/Content/ListExtended.html b/Resources/Private/Templates/Content/ListExtended.html new file mode 100644 index 0000000..646d092 --- /dev/null +++ b/Resources/Private/Templates/Content/ListExtended.html @@ -0,0 +1,76 @@ + + +Note 1: copy the CSS-file into your fileadmin-folder and include it via TypoScript! + Remove that line from this template after doing that... +Note 2: if you want to copy this HTML-file to your fileadmin-folder, you can specifty the folder like this: + plugin.tx_camaliga.view.templateRootPaths.1 = fileadmin/template/files/ + Copy this file in a subfolder named "Content" of this folder. +Note 3: you can use pageUid="{settings.showId}" in link.action if you have a separeted single page. + + + + + + + + + + + + + + + +

{contents -> f:count()} {f:translate(key: 'entries_found')}

+
+ +

+
+
+ + +
+

{f:translate(key: 'options', default: 'Options')}

+ + + +
+
+
diff --git a/Resources/Private/Templates/Content/Map.html b/Resources/Private/Templates/Content/Map.html new file mode 100644 index 0000000..a78ecd7 --- /dev/null +++ b/Resources/Private/Templates/Content/Map.html @@ -0,0 +1,82 @@ + + +Note: if you want to copy this HTML-file to your fileadmin-folder, you can specifty the folder like this: + plugin.tx_camaliga.view.templateRootPaths.1 = fileadmin/template/files/ +Copy this file in a subfolder named "Content" of this folder. + + + + + + + + + + + + +
+ +
 
+

{contents -> f:count()} {f:translate(key: 'entries_found')}

+
+ + + +
+

{f:translate(key: 'options', default: 'Options')}

+ + + +
+
+
+
\ No newline at end of file diff --git a/Resources/Private/Templates/Content/Modal.html b/Resources/Private/Templates/Content/Modal.html new file mode 100644 index 0000000..a767867 --- /dev/null +++ b/Resources/Private/Templates/Content/Modal.html @@ -0,0 +1,56 @@ + + +This example shows a Bootstrap Modal. +Note 1: you need Bootstrap & Bootstrap Modal for this example. Download it from here: +http://getbootstrap.com/javascript/#modals +Copy the JS- and CSS-file into your fileadmin-folder! +Or better: install a Bootstrap extension and you are done! +Note 2: if you want to copy this HTML-file to your fileadmin-folder, you can specifty the folder like this: + plugin.tx_camaliga.view.templateRootPaths.1 = fileadmin/template/files/ +Copy this file in a subfolder named "Content" of this folder. +Note 3: use the field "custom1" for the modal-button/link or change the template. + + + + + + + + + + + + + \ No newline at end of file diff --git a/Resources/Private/Templates/Content/Owl2.html b/Resources/Private/Templates/Content/Owl2.html new file mode 100644 index 0000000..5068f83 --- /dev/null +++ b/Resources/Private/Templates/Content/Owl2.html @@ -0,0 +1,64 @@ + + +This template is a carousel that requires jQuery and OWL Caousel 2 from here: +http://owlcarousel.owlgraphic.com/index.html +Download OWL carousel 2 from GitHub: +https://github.com/OwlFonk/OwlCarousel2 +and include it like this with TypoScript: + +page { + includeJSFooter.owl2 = fileadmin/template/OwlCarousel2-develop/src/js/owl.carousel.js + includeJSFooter.owlautoplay = fileadmin/template/OwlCarousel2-develop/src/js/owl.autoplay.js + includeCSS.owl2css = fileadmin/template/OwlCarousel2-develop/src/css/owl.carousel.css + includeCSS.owl2csstheme = fileadmin/template/OwlCarousel2-develop/src/css/owl.theme.default.css +} + +Start it with: + +page.jsFooterInline.810 = TEXT +page.jsFooterInline.810.value = var owl = $('.owl-carousel'); owl.owlCarousel({ center: false, responsive: { 0: { items: 1 }, 480: { items: 2 }, 800: { items: 3 } } }); +page.jsFooterInline.811 = TEXT +page.jsFooterInline.811.value = $('.customNextBtn').click(function(event) { event.preventDefault(); owl.trigger('next.owl.carousel'); }); +page.jsFooterInline.812 = TEXT +page.jsFooterInline.812.value = $('.customPrevBtn').click(function(event) { event.preventDefault(); owl.trigger('prev.owl.carousel'); }); + +Note: if you want to copy this HTML-file to your fileadmin-folder, you can specifty the folder like this: + plugin.tx_camaliga.view.templateRootPaths.1 = fileadmin/template/files/ +Copy this file in a subfolder named "Content" of this folder. + + + + + + +

  +

+ + +
+ +

+
+
+
diff --git a/Resources/Private/Templates/Content/Parallax.html b/Resources/Private/Templates/Content/Parallax.html new file mode 100644 index 0000000..620008d --- /dev/null +++ b/Resources/Private/Templates/Content/Parallax.html @@ -0,0 +1,58 @@ + + +This template is a parallax gallery from here: +http://pixelcog.github.io/parallax.js/ +Download parallax.min.js and include it like this with TypoScript: + +page { + includeJSFooter.parallax = fileadmin/Resources/Public/Scripts/parallax/parallax.min.js +} + +Customise the CSS-styles. + +Note 1: the images should be larger than the min-height (best: 2x min-height). +You must specify the real width and height of the images via: settings.img.width and settings.img.height. +Note 2: if you want to copy this HTML-file to your fileadmin-folder, you can specifty the folder like this: + plugin.tx_camaliga.view.templateRootPaths.1 = fileadmin/template/files/ +Copy this file in a subfolder named "Content" of this folder. +Note 3: An alternative parallax gallery: http://codepen.io/pederan/full/Hheuy + + + + + + + + + +
+
+
+
+
+
+

{content.title}: {content.shortdesc}

+
+ {content.longdesc} +

+ {f:translate(key: 'more')} +

+
+
+
+
+ +

+
+
+
\ No newline at end of file diff --git a/Resources/Private/Templates/Content/Random.html b/Resources/Private/Templates/Content/Random.html new file mode 100644 index 0000000..0348fb3 --- /dev/null +++ b/Resources/Private/Templates/Content/Random.html @@ -0,0 +1,29 @@ + + +This template shows a random element. +Note: if you want to copy this HTML-file to your fileadmin-folder, you can specifty the folder like this: + plugin.tx_camaliga.view.templateRootPaths.1 = fileadmin/template/files/ +Copy this file in a subfolder named "Content" of this folder. + + + + + + + diff --git a/Resources/Private/Templates/Content/Responsive.html b/Resources/Private/Templates/Content/Responsive.html new file mode 100644 index 0000000..4f131f0 --- /dev/null +++ b/Resources/Private/Templates/Content/Responsive.html @@ -0,0 +1,72 @@ + + +This simple responsive carousel requires only jQuery. +Note 1: you can copy and customise the camaliga/Resources/Public/css/Responsive.css to your fileadmin-folder. +Remove that line from this template if you do that... +Note 2: if you want to copy this HTML-file to your fileadmin-folder, you can specifty the folder like this with TypoScript: + plugin.tx_camaliga.view.templateRootPaths.1 = fileadmin/template/files/ +Copy this file in a subfolder named "Content" of this folder. + + + + + + + + + +
+
    + + + +
+
+
+ +

+
+
+
\ No newline at end of file diff --git a/Resources/Private/Templates/Content/ResponsiveCarousel.html b/Resources/Private/Templates/Content/ResponsiveCarousel.html new file mode 100644 index 0000000..bfbab27 --- /dev/null +++ b/Resources/Private/Templates/Content/ResponsiveCarousel.html @@ -0,0 +1,85 @@ + + +This responsive carousel by Basilio Cáceres requires jQuery and his carousel from: +http://basilio.github.io/responsiveCarousel/ +Download it and include it like this with TypoScript: + + page { + includeJSFooter.respCar = fileadmin/template/responsiveCarousel-master/responsiveCarousel.min.js + } + +Start it with: + + page.jsFooterInline.794 = TEXT + page.jsFooterInline.794.value = $('.crsl-items').carousel({ overflow: true, visible: imax, itemMinWidth: iwidth, itemMargin: imargin }); + +Now define the item-settings via Flexform or TypoScript. +Note: if you want to copy this HTML-file to your fileadmin-folder, you can specifty the folder like this with TypoScript: + plugin.tx_camaliga.view.templateRootPaths.1 = fileadmin/template/files/ +Copy this file in a subfolder named "Content" of this folder. + + + + + + + + + + +
+
+ +
+ + + + + +
{content.title}
+
+
+
+
+
+ +

+
+
+
diff --git a/Resources/Private/Templates/Content/Revolution.html b/Resources/Private/Templates/Content/Revolution.html new file mode 100644 index 0000000..77682f4 --- /dev/null +++ b/Resources/Private/Templates/Content/Revolution.html @@ -0,0 +1,54 @@ + + +Note: this templat is deprecated. Use the extension fp_fractionslider instead!!! +This template is a Revolution Slider example that requires jQuery and the revolution slider from here: +https://codecanyon.net/item/slider-revolution-responsive-jquery-plugin/2580848 +Include the Revolution Slider JS- and CSS-files by yourself. + +Note: if you want to copy this HTML-file to your fileadmin-folder, you can specifty the folder like this: + plugin.tx_camaliga.view.templateRootPaths.1 = fileadmin/template/files/ +Copy this file in a subfolder named "Content" of this folder. + + + + + + +
+
+
+
    + +
  • {f:uri.image(src:content.falimage.uid,treatIdAsReference:1)}/uploads/tx_camaliga/{content.image}" data-saveperformance="off" data-title=" "> + {f:uri.image(src:content.falimage.uid,treatIdAsReference:1)}/uploads/tx_camaliga/{content.image}" alt="" data-bgposition="center top" data-bgfit="cover" data-bgrepeat="no-repeat"> +
    +
    +
    {content.title}
    +

    {content.shortdesc}

    + {f:translate(key: 'more')} +
    +
    +
  • +
    +
+
+
+
+
+
+ +

+
+
+
\ No newline at end of file diff --git a/Resources/Private/Templates/Content/Roundabout.html b/Resources/Private/Templates/Content/Roundabout.html new file mode 100644 index 0000000..59b166e --- /dev/null +++ b/Resources/Private/Templates/Content/Roundabout.html @@ -0,0 +1,98 @@ + + +Roundabout-Example. First download Roundabout for jQuery from here: +http://fredhq.com/projects/roundabout/ +Copy the file to your fileadmin-folder. Check the path to the file. +Test it with this TS: + + page { + includeJS.RoundjsFile = fileadmin/template/scripts/jquery.roundabout.min.js + } + +Note: if you want to copy this HTML-file to your fileadmin-folder, you can specifty the folder like this: + plugin.tx_camaliga.view.templateRootPaths.1 = fileadmin/template/files/ +Copy this file in a subfolder named "Content" of this folder. + + + + + + + +
+
    + + +
  • + + + + + +
    +

    {content.title}

    +
    {content.shortdesc}
    +
    + {f:translate(key: 'more')} +
    +
    +
  • +
    + +
+   +   +
+ +
+
+
+ + +
+ +

+
+
+
\ No newline at end of file diff --git a/Resources/Private/Templates/Content/Scrollable.html b/Resources/Private/Templates/Content/Scrollable.html new file mode 100644 index 0000000..341a73e --- /dev/null +++ b/Resources/Private/Templates/Content/Scrollable.html @@ -0,0 +1,114 @@ + + +This template is a carousel that requires jQuery + jQuery TOOLS Scrollable. Infos: +http://jquerytools.org/demos/scrollable/index.html +Note: this example requires n*x elements. x is in this example 5. You can change this value at line 30 and 32. +Note 2: if you want to copy this HTML-file to your fileadmin-folder, you can specifty the folder like this: + plugin.tx_camaliga.view.templateRootPaths.1 = fileadmin/template/files/ +Copy this file in a subfolder named "Content" of this folder. + + + + + + + +

 

+
 
+ + +
+ + +
+ +
+ + + + +
+ +
+ +
+ + + + + +
+
+
+
+ + + +
+ + +
+ +

+
+
+
diff --git a/Resources/Private/Templates/Content/Search.html b/Resources/Private/Templates/Content/Search.html new file mode 100644 index 0000000..c2bf403 --- /dev/null +++ b/Resources/Private/Templates/Content/Search.html @@ -0,0 +1,79 @@ + + +Note: if you want to copy this HTML-file to your fileadmin-folder, you can specifty the folder like this: + plugin.tx_camaliga.view.templateRootPaths.1 = fileadmin/template/files/ +Copy this file in a subfolder named "Content" of this folder. + + + + + + + + + + + + +
+ +
 
+

{contents -> f:count()} {f:translate(key: 'entries_found')}

+
+ + +
+

{f:translate(key: 'options', default: 'Options')}

+ + +
+
+
diff --git a/Resources/Private/Templates/Content/Sgallery.html b/Resources/Private/Templates/Content/Sgallery.html new file mode 100644 index 0000000..cb206e4 --- /dev/null +++ b/Resources/Private/Templates/Content/Sgallery.html @@ -0,0 +1,61 @@ + + +This template is a responsive gallery that requires jQuery and S Gallery from here: +http://sarasoueidan.com/blog/s-gallery/ +More infos in german about the plugin: +http://t3n.de/news/s-gallery-responsive-509154/ +Download S Gallery and include it like this with TypoScript: + page { + includeJS.sgallery1 = fileadmin/s-gallery-master/js/plugins.js + includeJS.sgallery2 = fileadmin/s-gallery-master/js/scripts.js + includeCSS.sgallerycss = fileadmin/s-gallery-master/css/styles.css + } +Note: if you want to copy this HTML-file to your fileadmin-folder, you can specifty the folder like this: + plugin.tx_camaliga.view.templateRootPaths.1 = fileadmin/template/files/ +Copy this file in a subfolder named "Content" of this folder. + + + + + + + + + + + +

+
+
+
diff --git a/Resources/Private/Templates/Content/Show.html b/Resources/Private/Templates/Content/Show.html new file mode 100644 index 0000000..1cda155 --- /dev/null +++ b/Resources/Private/Templates/Content/Show.html @@ -0,0 +1,218 @@ + + +This example shows one selected element. + + + + + + + +

+
+ + + +
+
diff --git a/Resources/Private/Templates/Content/ShowExtended.html b/Resources/Private/Templates/Content/ShowExtended.html new file mode 100644 index 0000000..cfd6b7e --- /dev/null +++ b/Resources/Private/Templates/Content/ShowExtended.html @@ -0,0 +1,204 @@ + + +This example shows one selected element, their neighboring elements and a google map. +https://developers.google.com/maps/documentation/directions/intro?hl=de#DirectionsRequests + + + + + + + + + + + + + + + +

+
+ + + +
+
diff --git a/Resources/Private/Templates/Content/Skdslider.html b/Resources/Private/Templates/Content/Skdslider.html new file mode 100644 index 0000000..ce6871a --- /dev/null +++ b/Resources/Private/Templates/Content/Skdslider.html @@ -0,0 +1,52 @@ + + +This template is a jquery responsive Image Slider that requires jQuery and SKDslider from here: +http://dandywebsolution.com/skdslider/ +Download SKDslider and include it like this with TypoScript: + + page { + includeJSFooter.skdslider = fileadmin/template/skdslider/src/skdslider.min.js + includeCSS.skdslider = fileadmin/template/skdslider/src/skdslider.css + } + +Start it with: + + page.jsFooterInline.795 = TEXT + page.jsFooterInline.795.value = $('#demo1').skdslider({'delay':5000, 'animationSpeed': 2000}); + +Note: if you want to copy this HTML-file to your fileadmin-folder, you can specifty the folder like this: + plugin.tx_camaliga.view.templateRootPaths.1 = fileadmin/template/files/ +Copy this file in a subfolder named "Content" of this folder. + + + + + + + +
    + +
  • + + + + + +
    +
    +

    {content.title}

    +

    {content.shortdesc}

    +

    + {f:translate(key: 'more')} +

    +
    +
  • +
    +
+ +
+ +

+
+
+
diff --git a/Resources/Private/Templates/Content/Slick.html b/Resources/Private/Templates/Content/Slick.html new file mode 100644 index 0000000..61380fe --- /dev/null +++ b/Resources/Private/Templates/Content/Slick.html @@ -0,0 +1,95 @@ + + +slick example. You need the slick plugin from here for this example: +http://kenwheeler.github.io/slick/ +Extract the zip file and copy it to your fileadmin-folder or use it from CDN! + + +Or include the CSS- and JS-file with TypoScript from your fileadmin-folder like this: + +page.includeCSS.slick = /fileadmin/template/slick/slick/slick.css +page.includeCSS.slicktheme = /fileadmin/template/slick/slick/slick-theme.css +page.includeJS.slick = /fileadmin/template/slick/slick/slick.min.js + +Note: if you want to copy this HTML-file to your fileadmin-folder, you can specifty the folder like this: + plugin.tx_camaliga.view.templateRootPaths.1 = fileadmin/template/files/ +Copy this file in a subfolder named "Content" of this folder. + + + + + + + +
+ +
{content.title}
+
+
+
+
+ +
+
+
+
\ No newline at end of file diff --git a/Resources/Private/Templates/Content/Tab.html b/Resources/Private/Templates/Content/Tab.html new file mode 100644 index 0000000..ac9d7c1 --- /dev/null +++ b/Resources/Private/Templates/Content/Tab.html @@ -0,0 +1,69 @@ + + +This example shows a Bootstrap Tab. +Note 1: you need Bootstrap & Bootstrap Tab for this example. Download it from here: +http://getbootstrap.com/javascript/#tabs +Copy the JS- and CSS-file into your fileadmin-folder! +Or better: install a Bootstrap extension and you are done! +Note 2: if you want to copy this HTML-file to your fileadmin-folder, you can specifty the folder like this: + plugin.tx_camaliga.view.templateRootPaths.1 = fileadmin/template/files/ +Copy this file in a subfolder named "Content" of this folder. + + + + + + + + + +
+ + + + + +
+ +
+ + + + + + + + + +

{content.shortdesc}

+ {content.longdesc} +
+
+
+ +
+ + + +
+ +

+
+
+
\ No newline at end of file diff --git a/Resources/Private/Templates/Content/Test.html b/Resources/Private/Templates/Content/Test.html new file mode 100644 index 0000000..c5bf9d9 --- /dev/null +++ b/Resources/Private/Templates/Content/Test.html @@ -0,0 +1,48 @@ + + +Generated Template. + + + + + + + + + + + +{catitem.parentTitle} : {catitem.title}. +{content} \ No newline at end of file diff --git a/Resources/Public/Icons/ce_wiz.gif b/Resources/Public/Icons/ce_wiz.gif new file mode 100644 index 0000000..6d3cfce Binary files /dev/null and b/Resources/Public/Icons/ce_wiz.gif differ diff --git a/Resources/Public/Icons/ext_icon_camaliga_folder.gif b/Resources/Public/Icons/ext_icon_camaliga_folder.gif new file mode 100644 index 0000000..e4f5275 Binary files /dev/null and b/Resources/Public/Icons/ext_icon_camaliga_folder.gif differ diff --git a/Resources/Public/Icons/halbgrau.png b/Resources/Public/Icons/halbgrau.png new file mode 100644 index 0000000..b7d1994 Binary files /dev/null and b/Resources/Public/Icons/halbgrau.png differ diff --git a/Resources/Public/Icons/hori_large.png b/Resources/Public/Icons/hori_large.png new file mode 100644 index 0000000..4983a99 Binary files /dev/null and b/Resources/Public/Icons/hori_large.png differ diff --git a/Resources/Public/Icons/relation.gif b/Resources/Public/Icons/relation.gif new file mode 100644 index 0000000..db61d7e Binary files /dev/null and b/Resources/Public/Icons/relation.gif differ diff --git a/Resources/Public/Icons/tx_camaliga_domain_model_content.gif b/Resources/Public/Icons/tx_camaliga_domain_model_content.gif new file mode 100644 index 0000000..4040d37 Binary files /dev/null and b/Resources/Public/Icons/tx_camaliga_domain_model_content.gif differ diff --git a/Resources/Public/Icons/vert_large.png b/Resources/Public/Icons/vert_large.png new file mode 100644 index 0000000..a4a3370 Binary files /dev/null and b/Resources/Public/Icons/vert_large.png differ diff --git a/Resources/Public/JavaScript/PageLayout.js b/Resources/Public/JavaScript/PageLayout.js new file mode 100644 index 0000000..1a0aca8 --- /dev/null +++ b/Resources/Public/JavaScript/PageLayout.js @@ -0,0 +1,9 @@ +define(['jquery'], function ($) { + + $('.camaliga-table tfoot a').click(function (e, element) { + $(this).toggleClass('open'); + $('#' + $(this).data('identifier')).toggleClass('hidden'); + e.preventDefault(); + }); + +}); \ No newline at end of file diff --git a/Resources/Public/JavaScript/jquery.camaliga.js b/Resources/Public/JavaScript/jquery.camaliga.js new file mode 100644 index 0000000..7269cbd --- /dev/null +++ b/Resources/Public/JavaScript/jquery.camaliga.js @@ -0,0 +1,204 @@ +/* + * jQuery Camaliga v1.1.0 + * Copyright 2015 Kurt Gusbeth and enavu + * Note: this JavaScript plugin is based on the carousel from enavu: + * http://web.enavu.com/tutorials/making-a-jquery-infinite-carousel-with-nice-features/ + */ +(function($) { + + $.camaliga = function(element, options) { + this.options = {}; + + element.data('camaliga', this); + + this.init = function(element, options) { + this.options = $.extend({}, $.camaliga.defaultOptions, options); + + if (element.is('[id]')) + this.options.ul_name = '#'+element.attr('id'); + else + this.options.ul_name = '.'+element.attr('class'); + this.options.li_name = ' '+this.options.li_name; + this.options.count = $(this.options.ul_name+this.options.li_name).length; + this.options.current = 1; + var item_width = parseInt(this.options.item_width); + if (item_width==0 || isNaN(item_width)) + item_width = $(this.options.ul_name+this.options.li_name).outerWidth(); + this.options.item_width = item_width; + + /*move the last list item before the first item. The purpose of this is + if the user clicks to slide left he will be able to see the last item.*/ + if (this.options.infinite == 1) { + $(this.options.ul_name+this.options.li_name+':first').before($(this.options.ul_name+this.options.li_name+':last')); + $(this.options.ul_name).css({'left' : '-'+item_width+'px'}); + } else { + if (this.options.left_scroll.length>0) + $(this.options.left_scroll).addClass('camaliga_first'); + this.options.auto_slide = 0; + this.options.hover_pause = 0; + this.options.key_slide = 0; + } + + //check if auto sliding is enabled + if (this.options.auto_slide == 1){ + var ul_name = this.options.ul_name; + var auto_slide_seconds = this.options.auto_slide_seconds; + + /*set the interval (loop) to call function slide with option 'right' + and set the interval time to the variable we declared previously */ + var timer = setInterval(function(){$(ul_name).data('camaliga').slideTo('right')}, auto_slide_seconds); + } + + //check if hover pause is enabled + if (this.options.hover_pause == 1){ + var ul_name = this.options.ul_name; + var auto_slide_seconds = this.options.auto_slide_seconds; + + //when hovered over the list + $(ul_name).hover(function(){ + //stop the interval + clearInterval(timer) + },function(){ + //and when mouseout start it again + timer = setInterval(function(){$(ul_name).data('camaliga').slideTo('right')}, auto_slide_seconds); + }); + } + + //check if key sliding is enabled: funktioniert noch nicht! + if(this.options.key_slide == 1){ + var ul_name = this.options.ul_name; + + //binding keypress function + $(document).bind('keypress', function(e) { + //keyCode for left arrow is 37 and for right it's 39 ' + if(e.keyCode==37){ + //initialize the slide to left function + $(ul_name).data('camaliga').slideTo('left'); + }else if(e.keyCode==39){ + //initialize the slide to right function + $(ul_name).data('camaliga').slideTo('right'); + } + }); + } + }; + + //Public function + this.slideTo = function(where) { + var ul_name = this.options.ul_name; + var li_name = this.options.li_name; + var infinite = this.options.infinite; + var item_width = parseInt(this.options.item_width); + var gehenr = false; + var gehezu = 0; + var anzahl = 1; + + if (where != 'left' && where != 'right') { + gehenr = true; + gehezu = parseInt(where); + //window.alert('gehezu '+gehezu+' curcam2 '+curcam2); + if (curcam2 != gehezu) { + if (curcam2 > where) { + where = 'left'; + anzahl = curcam2 - gehezu; + } else { + where = 'right'; + anzahl = gehezu - curcam2; + } + } + } + if (this.options.car_num == 1) + $("#bildc"+curcam2).attr("src",this.options.dot_nor); + + /* using a if statement and the where variable check + we will check where the user wants to slide (left or right)*/ + if(where == 'left'){ + if (this.options.car_num == 1 && !gehenr){ + curcam2--; + if (curcam2 < 1) curcam2 = this.options.count; + } + if (infinite==0 && this.options.current==1) return; + else if (infinite==0) { + this.options.current--; + if (this.options.current==1 && this.options.left_scroll.length>0) + $(this.options.left_scroll).addClass('camaliga_first'); + if (this.options.current==this.options.count-1 && this.options.right_scroll.length>0) + $(this.options.right_scroll).removeClass('camaliga_last'); + } + //...calculating the new left indent of the unordered list (ul) for left sliding + var left_indent = parseInt($(ul_name).css('left')) + item_width*anzahl; + }else if(where == 'right'){ + if (this.options.car_num == 1 && !gehenr){ + curcam2++; + if (curcam2 > this.options.count) curcam2 = 1; + } + if (infinite==0 && this.options.current==this.options.count) return; + else if (infinite==0) { + this.options.current++; + if (this.options.current==2 && this.options.left_scroll.length>0) + $(this.options.left_scroll).removeClass('camaliga_first'); + if (this.options.current==this.options.count && this.options.right_scroll.length>0) + $(this.options.right_scroll).addClass('camaliga_last'); + } + //...calculating the new left indent of the unordered list (ul) for right sliding + var left_indent = parseInt($(ul_name).css('left')) - item_width*anzahl; + } + + if (where == 'left' || where == 'right') { + for (var i=2; i<=anzahl; i++) { + if(where == 'left'){ + //...and if it slided to left we put the last item before the first item + $(ul_name+li_name+':first').before($(ul_name+li_name+':last')); + }else{ + //...and if it slided to right we put the first item after the last item + $(ul_name+li_name+':last').after($(ul_name+li_name+':first')); + } + } + //make the sliding effect using jQuery's animate function... ' + $(ul_name+':not(:animated)').animate({'left' : left_indent},500,function(){ + if (infinite==1) { + /* when the animation finishes use the if statement again, and make an ilussion + of infinity by changing place of last or first item*/ + if(where == 'left'){ + //...and if it slided to left we put the last item before the first item + $(ul_name+li_name+':first').before($(ul_name+li_name+':last')); + }else{ + //...and if it slided to right we put the first item after the last item + $(ul_name+li_name+':last').after($(ul_name+li_name+':first')); + } + + //...and then just get back the default left indent + $(ul_name).css({'left' : '-'+(item_width)+'px'}); + } + }); + } + if (gehenr && this.options.car_num == 2) + curcam2 = gehezu; + if (this.options.car_num == 2) + $("#bildc"+curcam2).attr("src",this.options.dot_act); + //window.alert(curcam2+' ghh '+anzahl); + }; + + this.init(element, options); + }; + + $.fn.camaliga = function(options) { //Using only one method off of $.fn + return this.each(function() { + (new $.camaliga($(this), options)); + }); + }; + + $.camaliga.defaultOptions = { + li_name: 'li', + left_scroll: '', + right_scroll: '', + auto_slide: 0, + hover_pause: 0, + key_slide: 0, + infinite: 1, + item_width: 0, + car_num: 0, + dot_nor: '', + dot_act: '', + auto_slide_seconds: 7500 // milliseconds + } +})(jQuery); \ No newline at end of file diff --git a/Resources/Public/css/Carousel.css b/Resources/Public/css/Carousel.css new file mode 100644 index 0000000..a130644 --- /dev/null +++ b/Resources/Public/css/Carousel.css @@ -0,0 +1,84 @@ +#carousel_inner { +float:left; /* important for inline positioning */ +/* width:645px; * important (this width = width of list item(including margin) * items shown */ +overflow: hidden; /* important (hide the items outside the div) */ +/* non-important styling bellow */ +background: #fff; +padding:0; +margin:0; +} + +#carousel_ul { +position:relative; +left:0; +list-style-type: none; /* removing the default styling for unordered list items */ +margin: 0px; +padding: 0px; +width:9999px; /* important */ +/* non-important styling bellow */ +padding-bottom:10px; +} + +#carousel_ul li{ +float: left; /* important for inline positioning of the list items */ +/* width:195px; * fixed width, important */ +/* just styling bellow*/ +list-style-type: none !important; +list-style-image:none !important; +/* padding:0px; +margin:10px; +height:290px; */ +background: #eee; +color:#000; +} + +#carousel_ul li img { +.margin-bottom:-4px; /* IE is making a 4px gap bellow an image inside of an anchor () so this is to fix that */ +/* styling */ +cursor:pointer; +cursor: hand; +border:0px; +} +#left_scroll, #right_scroll{ +float:left; +height:30px; +width:35px; +margin-top:10px; +} +#left_scroll a, #right_scroll a{ +display:block; +border:0; +text-decoration:none; +cursor: pointer; +height:30px; +width:30px; +background: transparent url(../Icons/hori_large.png) no-repeat 0 0; +} +#right_scroll a{ + background-position: 0 -30px; + margin-left:5px; +} +#left_scroll a:hover { + background-position: -30px 0; +} +#right_scroll a:hover { + background-position: -30px -30px; +} +#left_scroll a:active { + background-position: -60px 0; +} +#right_scroll a:active { + background-position: -60px -30px; +} +.camaliga_first a { +/* here you could display an inactive arrow */ +} +.camaliga_last a { +/* here you could display an inactive arrow */ +} + +#carousel_ul li h4, +#carousel_ul li p { + padding-left:10px; + padding-right:10px; +} diff --git a/Resources/Public/css/CarouselSeparated.css b/Resources/Public/css/CarouselSeparated.css new file mode 100644 index 0000000..6e2f703 --- /dev/null +++ b/Resources/Public/css/CarouselSeparated.css @@ -0,0 +1,97 @@ +#carousel_container12 { +width:100%; +height:197px; +} +#carousel_inner1 { +float:left; /* important for inline positioning */ +width:646px; /* important (this width = width of list item(including margin) * items shown */ +overflow: hidden;/* important (hide the items outside the div) */ +} +#carousel_ul1 { +position:relative; +left:0; +list-style-type: none; /* removing the default styling for unordered list items */ +margin: 0px; +padding: 0px; +width:9999px; /* important */ +} +#carousel_ul1 li{ +float: left; /* important for inline positioning of the list items */ +width:646px;/* fixed width, important */ +height:197px; +padding:0; +margin:0; +z-index:13; +} +#left_scroll12, #right_scroll12{ +float:left; +height:30px; +width:35px; +margin-top:10px; +} +#left_scroll12 a, #right_scroll12 a{ +display:block; +border:0; +text-decoration:none; +cursor: pointer; +height:30px; +width:30px; +background: transparent url(../Icons/hori_large.png) no-repeat 0 0; +} +#right_scroll12 a{ + background-position: 0 -30px; + margin-left:5px; +} +#left_scroll12 a:hover { + background-position: -30px 0; +} +#right_scroll12 a:hover { + background-position: -30px -30px; +} +#left_scroll12 a:active { + background-position: -60px 0; +} +#right_scroll12 a:active { + background-position: -60px -30px; +} +.camaliga_first a { +/* here you could display an inactive arrow */ +} +.camaliga_last a { +/* here you could display an inactive arrow */ +} +#carousel_inner2 { +float:left; /* important for inline positioning */ +width:300px; /* important (this width = width of list item(including margin) * items shown */ +overflow: hidden;/* important (hide the items outside the div) */ +} +#carousel_ul2 { +position:relative; +left:0; +list-style-type: none; /* removing the default styling for unordered list items */ +margin: 0px; +padding: 0px; +width:4999px; /* important */ +} +#carousel_ul2 li{ +float: left; /* important for inline positioning of the list items */ +width:300px;/* fixed width, important */ +height:197px; +padding:0; +margin:0; +} +#jcarousel_txt2 { +width:300px; +height:197px; +border-left:6px solid #fff; +float:left; +position:relative; +background-color:#e3000f; +} +.carousel_title2 { +padding:17px; +color:#fff; +font-size:145%; +font-weight:bold; +z-index:12; +} \ No newline at end of file diff --git a/Resources/Public/css/Extended.css b/Resources/Public/css/Extended.css new file mode 100644 index 0000000..b0f6fef --- /dev/null +++ b/Resources/Public/css/Extended.css @@ -0,0 +1,56 @@ +.ad-my-desc { + margin-bottom:10px; + padding:1px 10px; + background-color:#ddd; + width:700px; +} +.carousel_options { + margin-top:10px; + padding:15px 10px; + background-color:#ddd; + width:700px; +} +.ad-cat_item { + clear:both; + border-top:2px solid #fff; +} +/* .carousel_options input { + display:inline; +}*/ +.ad-cat_title, +.ad-cat_elements { + display:block; + float:left; +} +.ad-cat_title { + /* padding-right:10px; */ + width:90px; + background:#000; + color:#fff; + margin:5px 0; + padding:0 5px; +} +.ad-cat_elements { + width:570px; + padding:1px 0 3px 10px; +} +/* .carousel_options label { + padding-left:3px; + padding-right:13px; +} */ +.ad-submit_wrapper { + clear:both; + padding-top:12px; + height:auto; + border-top:2px solid #fff; +} +/*.ad-even, +.ad-odd { + padding:2px 5px; +}*/ +.ad-odd { + background:#fff; +} +.ad-even { + background:#ddd; +} \ No newline at end of file diff --git a/Resources/Public/css/Innerfade.css b/Resources/Public/css/Innerfade.css new file mode 100644 index 0000000..611ebf6 --- /dev/null +++ b/Resources/Public/css/Innerfade.css @@ -0,0 +1,9 @@ +ul#innerfade{width:540px;height:370px;list-style-image:none;list-style-type:none;margin:20px 0 0 100px;padding:0} +ul#innerfade li{display:block;margin:0;padding:0} + +.innerhinter{width:540px;height:370px;position:relative} +.innervorder{position:absolute;bottom:0px;left:100px;width:340px;height:120px;margin:0;padding:0;background:#006B04;text-align:left;filter:alpha(opacity=90);-moz-opacity:0.90;opacity:0.90} + +.innervorder h2{color:#fff;font-size:150%;padding:10px 5px 5px 20px;margin:0} +.innervorder p{color:#fff;font-size:100%;padding:0 5px 0 20px} +.innervorder p a{color:#bbf} \ No newline at end of file diff --git a/Resources/Public/css/List.css b/Resources/Public/css/List.css new file mode 100644 index 0000000..fef8fea --- /dev/null +++ b/Resources/Public/css/List.css @@ -0,0 +1,32 @@ +textarea.f3-form-error { + background-color:#FF9F9F; + border: 1px #FF0000 solid; +} + +input.f3-form-error { + background-color:#FF9F9F; + border: 1px #FF0000 solid; +} + +.tx-camaliga table { + border-collapse:separate; + border-spacing:2px; +} +.tx-camaliga table tr { + margin:0; + padding:0; +} +.tx-camaliga table th { + font-weight:bold; +} + +.tx-camaliga table td { + vertical-align:top; + margin:0 10px 10px 0; + padding:5px; +} +.carousel-list-img { + padding-right:15px; +} +.carousel-list-text { +} \ No newline at end of file diff --git a/Resources/Public/css/PageLayoutView.css b/Resources/Public/css/PageLayoutView.css new file mode 100644 index 0000000..ffb04fd --- /dev/null +++ b/Resources/Public/css/PageLayoutView.css @@ -0,0 +1,11 @@ +table.camaliga-table { + background-color: transparent; + border: 0; + margin: 0 +} +table.camaliga-table thead tr th { + white-space: normal; +} +table.camaliga-table tbody tr td { + padding:3px 6px; +} \ No newline at end of file diff --git a/Resources/Public/css/Responsive.css b/Resources/Public/css/Responsive.css new file mode 100644 index 0000000..18b6f64 --- /dev/null +++ b/Resources/Public/css/Responsive.css @@ -0,0 +1,39 @@ +.karussell { + padding:0; + margin:0; + color:#fff; + position:relative; + max-height:525px; + overflow:hidden; +} + +.karussell ul { + margin:0; +} +.karussell ul li{ + float:none; + display:block; +} +.karussell .grau-ka-middle, +.karussell .grau-ka-last, +.karussell .ka-middle, +.karussell .ka-last { + display:none; +} +.karussell img { + display:block; +} +.karussell .grau { + position:absolute; + z-index:7; + max-width:664px; + padding:18px; + bottom:0; + background: url(../Icons/halbgrau.png); +} +.karussell h3 { + white-space:nowrap; +} +.karussell p { + margin-top: 15px; +} diff --git a/Resources/Public/css/Roundabout.css b/Resources/Public/css/Roundabout.css new file mode 100644 index 0000000..a5c9e0c --- /dev/null +++ b/Resources/Public/css/Roundabout.css @@ -0,0 +1,45 @@ +.roundabout-wrap { + width:580px; height:200px; margin:0 auto; position:relative; +} + +.roundabout-holder { + width:580px; height:200px; position: absolute; z-index:110; +} + +.roundabout-moveable-item { + width:272px; height:187px; cursor: pointer; + list-style-type: none !important; + list-style-image: none !important; +} + +.roundabout-moveable-item img { + border:1px solid #999; padding:1px; width:100%; height:100%; +} + +.roundabout-in-focus { + cursor: auto; +} + +#prevExp, +#nextExp { + position:absolute; + top:195px; + display:block; + border:0; + text-decoration:none; + cursor: pointer; + height:30px; + width:30px; + background: transparent url(../Icons/hori_large.png) no-repeat 0 0; +} +#prevExp { right:0; background-position: 0 -30px; } +#nextExp { left:0; } + +#filler { + clear:both; + padding:25px 0 2px 0; + text-align:center; +} + +.roundabout-holder a img { border:none; } +.roundabout-hidden { display:none; } \ No newline at end of file diff --git a/Resources/Public/css/Scrollable.css b/Resources/Public/css/Scrollable.css new file mode 100644 index 0000000..7b21a24 --- /dev/null +++ b/Resources/Public/css/Scrollable.css @@ -0,0 +1,125 @@ +/* + root element for the scrollable. + when scrolling occurs this element stays still. + */ +.scrollable { + /* required settings */ + position:relative; + overflow:hidden; + width: 634px; + height:96px; + + /* custom decorations */ + border:1px solid #ccc; +} + +/* + root element for scrollable items. Must be absolutely positioned + and it should have a extremely large width to accomodate scrollable + items. it's enough that you set the width and height for the root + element and not for this element. +*/ +.scrollable .items { + /* this cannot be too large */ + width:20000em; + position:absolute; + clear:both; +} + +.items div { + float:left; + width:634px; +} + +/* single scrollable item */ +.scrollable img { + float:left; + margin:11px 0 11px 21px; + background-color:#fff; + padding:2px; + border:1px solid #ccc; + /* width:100px; + height:75px;*/ + -moz-border-radius:4px; + -webkit-border-radius:4px; +} + +/* active item */ +.scrollable .active { + border:2px solid #000; + position:relative; + cursor:default; +} + +/* this makes it possible to add next button beside scrollable */ +.scrollable { + float:left; +} + +/* prev, next, prevPage and nextPage buttons */ +a.browse { + background:url(../Icons/hori_large.png) no-repeat; + display:block; + width:30px; + height:30px; + float:left; + margin:37px 7px; + cursor:pointer; + font-size:1px; +} + +/* right */ +a.right { background-position: 0 -30px; clear:right; margin-right: 0px;} +a.right:hover { background-position:-30px -30px; } +a.right:active { background-position:-60px -30px; } + + +/* left */ +a.left { margin-left: 0px; } +a.left:hover { background-position:-30px 0; } +a.left:active { background-position:-60px 0; } + +/* up and down */ +a.up, a.down { + background:url(../Icons/vert_large.png) no-repeat; + float: none; + margin: 10px 50px; +} + +/* up */ +a.up:hover { background-position:-30px 0; } +a.up:active { background-position:-60px 0; } + +/* down */ +a.down { background-position: 0 -30px; } +a.down:hover { background-position:-30px -30px; } +a.down:active { background-position:-60px -30px; } + + +/* disabled navigational button */ +a.disabled { + visibility:hidden !important; +} + +/* styling for the image wrapper */ +#jimage_wrap { + /* dimensions */ + width:708px; + height:508px; + padding:2px; + margin-bottom:11px; + + /* centered */ + text-align:center; + + /* some "skinning" */ + background-color:#efefef; + border:2px solid #fff; + outline:1px solid #ddd; + -moz-ouline-radius:4px; +} + +/* other */ +#jscrollable_wrap { width: 708px; height:96px; } +#jtitle_wrap { text-align:center; padding-bottom:5px;margin-bottom:0; } +#jdescription_wrap { text-align:center; padding-bottom:10px; } \ No newline at end of file diff --git a/Resources/Public/css/Single.css b/Resources/Public/css/Single.css new file mode 100644 index 0000000..ecd627a --- /dev/null +++ b/Resources/Public/css/Single.css @@ -0,0 +1,27 @@ +.carousel-single { + margin:0; + padding:0; +} +.carousel-single-img { + padding: 0 0 15px 0; +} +.carousel-single-text { + padding: 0 0 15px 0; +} +.carousel-single-more figure { + padding: 0 0 10px 0; + font-style: italic; +} +.carousel-single-map { + width:700px; + height:500px; + margin:10px 0; +} +.carousel-single-map-item { + width:333px; + height:auto; +} +.carousel-single-back { + clear: both; + padding: 7px 0 0 0; +} \ No newline at end of file diff --git a/Tests/Unit/Domain/Model/ContentTest.php b/Tests/Unit/Domain/Model/ContentTest.php new file mode 100644 index 0000000..6652580 --- /dev/null +++ b/Tests/Unit/Domain/Model/ContentTest.php @@ -0,0 +1,235 @@ + + * + * 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! + ***************************************************************/ + +/** + * Test case for class \quizpalme\Camaliga\Domain\Model\Content. + * + * @version $Id$ + * @copyright Copyright belongs to the respective authors + * @license http://www.gnu.org/licenses/gpl.html GNU General Public License, version 3 or later + * + * @package TYPO3 + * @subpackage Camaliga + * + * @author Kurt Gusbeth + */ +class ContentTest extends \TYPO3\CMS\Core\Tests\UnitTestCase { + /** + * @var \quizpalme\Camaliga\Domain\Model\Content + */ + protected $fixture; + + public function setUp() { + $this->fixture = new \quizpalme\Camaliga\Domain\Model\Content(); + } + + public function tearDown() { + unset($this->fixture); + } + + /** + * @test + */ + public function getTitleReturnsInitialValueForString() { } + + /** + * @test + */ + public function setTitleForStringSetsTitle() { + $this->fixture->setTitle('Conceived at T3CON10'); + + $this->assertSame( + 'Conceived at T3CON10', + $this->fixture->getTitle() + ); + } + + /** + * @test + */ + public function getShortdescReturnsInitialValueForString() { } + + /** + * @test + */ + public function setShortdescForStringSetsShortdesc() { + $this->fixture->setShortdesc('Conceived at T3CON10'); + + $this->assertSame( + 'Conceived at T3CON10', + $this->fixture->getShortdesc() + ); + } + + /** + * @test + */ + public function getLongdescReturnsInitialValueForString() { } + + /** + * @test + */ + public function setLongdescForStringSetsLongdesc() { + $this->fixture->setLongdesc('Conceived at T3CON10'); + + $this->assertSame( + 'Conceived at T3CON10', + $this->fixture->getLongdesc() + ); + } + + /** + * @test + */ + public function getLinkReturnsInitialValueForString() { } + + /** + * @test + */ + public function setLinkForStringSetsLink() { + $this->fixture->setLink('Conceived at T3CON10'); + + $this->assertSame( + 'Conceived at T3CON10', + $this->fixture->getLink() + ); + } + + /** + * @test + */ + public function getImageReturnsInitialValueForString() { } + + /** + * @test + */ + public function setImageForStringSetsImage() { + $this->fixture->setImage('Conceived at T3CON10'); + + $this->assertSame( + 'Conceived at T3CON10', + $this->fixture->getImage() + ); + } + + /** + * test schlägt fehl, da kein default-value vorhanden ist + * + public function getLatitudeReturnsInitialValueForFloat() { + $this->assertSame( + 0.0, + $this->fixture->getLatitude() + ); + } */ + + /** + * @test + */ + public function setLatitudeForFloatSetsLatitude() { + $this->fixture->setLatitude(3.14159265); + + $this->assertSame( + 3.14159265, + $this->fixture->getLatitude() + ); + } + + /** + * test schlägt fehl, da kein default-value vorhanden ist + * + public function getLongitudeReturnsInitialValueForFloat() { + $this->assertSame( + 0.0, + $this->fixture->getLongitude() + ); + } */ + + /** + * @test + */ + public function setLongitudeForFloatSetsLongitude() { + $this->fixture->setLongitude(3.14159265); + + $this->assertSame( + 3.14159265, + $this->fixture->getLongitude() + ); + } + + /** + * @test + */ + public function getCustom1ReturnsInitialValueForString() { } + + /** + * @test + */ + public function setCustom1ForStringSetsCustom1() { + $this->fixture->setCustom1('Conceived at T3CON10'); + + $this->assertSame( + 'Conceived at T3CON10', + $this->fixture->getCustom1() + ); + } + + /** + * @test + */ + public function getCustom2ReturnsInitialValueForString() { } + + /** + * @test + */ + public function setCustom2ForStringSetsCustom2() { + $this->fixture->setCustom2('Conceived at T3CON10'); + + $this->assertSame( + 'Conceived at T3CON10', + $this->fixture->getCustom2() + ); + } + + /** + * @test + */ + public function getCustom3ReturnsInitialValueForString() { } + + /** + * @test + */ + public function setCustom3ForStringSetsCustom3() { + $this->fixture->setCustom3('Conceived at T3CON10'); + + $this->assertSame( + 'Conceived at T3CON10', + $this->fixture->getCustom3() + ); + } + +} +?> \ No newline at end of file diff --git a/camaliga.gif b/camaliga.gif new file mode 100644 index 0000000..6d3cfce Binary files /dev/null and b/camaliga.gif differ diff --git a/class.ext_update.php b/class.ext_update.php new file mode 100644 index 0000000..c5f7f34 --- /dev/null +++ b/class.ext_update.php @@ -0,0 +1,200 @@ +databaseConnection = $GLOBALS['TYPO3_DB']; + } + + /** + * Main update function called by the extension manager. + * + * @return string + */ + public function main() { + $this->processUpdates(); + return $this->generateOutput(); + } + + /** + * Called by the extension manager to determine if the update menu entry should by showed. + * + * @return bool + */ + public function access() { + return TRUE; + } + + /** + * The actual update function. Add your update task in here. + * + * @return void + */ + protected function processUpdates() { + // The category relation needs to be updated when updating to Typo3 6.2 + $title = 'Update tx_camaliga_domain_model_content category-relation (changes in TYPO3 6.2.0)'; + + // Update new record + $update = array('fieldname' => 'categories'); + $this->databaseConnection->exec_UPDATEquery( + 'sys_category_record_mm', + "tablenames='tx_camaliga_domain_model_content' AND fieldname=''", + $update + ); + + $this->messageArray[] = array(FlashMessage::OK, $title, 'sys_category_record_mm has been updated!'); + + + // The switchableControllerActions changes in version 5.0.0 + $title = 'Update FlexForms (changes in camaliga 5.0.0)'; + + $GLOBALS['TYPO3_DB']->sql_query( + "UPDATE tt_content SET pi_flexform = replace(pi_flexform, '>Content->list;Content->show<', '>Content->list;Content->search;Content->show<') WHERE list_type='camaliga_pi1'"); + $GLOBALS['TYPO3_DB']->sql_query( + "UPDATE tt_content SET pi_flexform = replace(pi_flexform, '>Content->listExtended;Content->showExtended<', '>Content->listExtended;Content->search;Content->showExtended<') WHERE list_type='camaliga_pi1'"); + $GLOBALS['TYPO3_DB']->sql_query( + "UPDATE tt_content SET pi_flexform = replace(pi_flexform, '>Content->map<', '>Content->map;Content->search;Content->show<') WHERE list_type='camaliga_pi1'"); + $GLOBALS['TYPO3_DB']->sql_query( + "UPDATE tt_content SET pi_flexform = replace(pi_flexform, '>Content->bootstrap<', '>Content->bootstrap;Content->search;Content->show<') WHERE list_type='camaliga_pi1'"); + $GLOBALS['TYPO3_DB']->sql_query( + "UPDATE tt_content SET pi_flexform = replace(pi_flexform, '>Content->collapse<', '>Content->collapse;Content->search;Content->show<') WHERE list_type='camaliga_pi1'"); + $GLOBALS['TYPO3_DB']->sql_query( + "UPDATE tt_content SET pi_flexform = replace(pi_flexform, '>Content->modal<', '>Content->modal;Content->search;Content->show<') WHERE list_type='camaliga_pi1'"); + $GLOBALS['TYPO3_DB']->sql_query( + "UPDATE tt_content SET pi_flexform = replace(pi_flexform, '>Content->tab<', '>Content->tab;Content->search;Content->show<') WHERE list_type='camaliga_pi1'"); + $GLOBALS['TYPO3_DB']->sql_query( + "UPDATE tt_content SET pi_flexform = replace(pi_flexform, '>Content->adGallery<', '>Content->adGallery;Content->search;Content->show<') WHERE list_type='camaliga_pi1'"); + $GLOBALS['TYPO3_DB']->sql_query( + "UPDATE tt_content SET pi_flexform = replace(pi_flexform, '>Content->coolcarousel<', '>Content->coolcarousel;Content->search;Content->show<') WHERE list_type='camaliga_pi1'"); + $GLOBALS['TYPO3_DB']->sql_query( + "UPDATE tt_content SET pi_flexform = replace(pi_flexform, '>Content->elastislide<', '>Content->elastislide;Content->search;Content->show<') WHERE list_type='camaliga_pi1'"); + $GLOBALS['TYPO3_DB']->sql_query( + "UPDATE tt_content SET pi_flexform = replace(pi_flexform, '>Content->fancyBox<', '>Content->fancyBox;Content->search;Content->show<') WHERE list_type='camaliga_pi1'"); + $GLOBALS['TYPO3_DB']->sql_query( + "UPDATE tt_content SET pi_flexform = replace(pi_flexform, '>Content->flexslider2<', '>Content->flexslider2;Content->search;Content->show<') WHERE list_type='camaliga_pi1'"); + $GLOBALS['TYPO3_DB']->sql_query( + "UPDATE tt_content SET pi_flexform = replace(pi_flexform, '>Content->flipster<', '>Content->flipster;Content->search;Content->show<') WHERE list_type='camaliga_pi1'"); + $GLOBALS['TYPO3_DB']->sql_query( + "UPDATE tt_content SET pi_flexform = replace(pi_flexform, '>Content->fullwidth<', '>Content->fullwidth;Content->search;Content->show<') WHERE list_type='camaliga_pi1'"); + $GLOBALS['TYPO3_DB']->sql_query( + "UPDATE tt_content SET pi_flexform = replace(pi_flexform, '>Content->galleryview<', '>Content->galleryview;Content->search;Content->show<') WHERE list_type='camaliga_pi1'"); + $GLOBALS['TYPO3_DB']->sql_query( + "UPDATE tt_content SET pi_flexform = replace(pi_flexform, '>Content->innerfade<', '>Content->innerfade;Content->search;Content->show<') WHERE list_type='camaliga_pi1'"); + $GLOBALS['TYPO3_DB']->sql_query( + "UPDATE tt_content SET pi_flexform = replace(pi_flexform, '>Content->isotope<', '>Content->isotope;Content->search;Content->show<') WHERE list_type='camaliga_pi1'"); + $GLOBALS['TYPO3_DB']->sql_query( + "UPDATE tt_content SET pi_flexform = replace(pi_flexform, '>Content->lightslider<', '>Content->lightslider;Content->search;Content->show<') WHERE list_type='camaliga_pi1'"); + $GLOBALS['TYPO3_DB']->sql_query( + "UPDATE tt_content SET pi_flexform = replace(pi_flexform, '>Content->owl<', '>Content->owl;Content->search;Content->show<') WHERE list_type='camaliga_pi1'"); + $GLOBALS['TYPO3_DB']->sql_query( + "UPDATE tt_content SET pi_flexform = replace(pi_flexform, '>Content->owl2<', '>Content->owl2;Content->search;Content->show<') WHERE list_type='camaliga_pi1'"); + $GLOBALS['TYPO3_DB']->sql_query( + "UPDATE tt_content SET pi_flexform = replace(pi_flexform, '>Content->responsiveCarousel<', '>Content->responsiveCarousel;Content->search;Content->show<') WHERE list_type='camaliga_pi1'"); + $GLOBALS['TYPO3_DB']->sql_query( + "UPDATE tt_content SET pi_flexform = replace(pi_flexform, '>Content->roundabout<', '>Content->roundabout;Content->search;Content->show<') WHERE list_type='camaliga_pi1'"); + $GLOBALS['TYPO3_DB']->sql_query( + "UPDATE tt_content SET pi_flexform = replace(pi_flexform, '>Content->sgallery<', '>Content->sgallery;Content->search;Content->show<') WHERE list_type='camaliga_pi1'"); + $GLOBALS['TYPO3_DB']->sql_query( + "UPDATE tt_content SET pi_flexform = replace(pi_flexform, '>Content->skdslider<', '>Content->skdslider;Content->search;Content->show<') WHERE list_type='camaliga_pi1'"); + $GLOBALS['TYPO3_DB']->sql_query( + "UPDATE tt_content SET pi_flexform = replace(pi_flexform, '>Content->slick<', '>Content->slick;Content->search;Content->show<') WHERE list_type='camaliga_pi1'"); + $GLOBALS['TYPO3_DB']->sql_query( + "UPDATE tt_content SET pi_flexform = replace(pi_flexform, '>Content->scrollable<', '>Content->scrollable;Content->search;Content->show<') WHERE list_type='camaliga_pi1'"); + + $this->messageArray[] = array(FlashMessage::OK, $title, 'tt_content has been updated!'); + + + // The path to the templates changed in version 6.0.0 + $title = 'Update TypoScript (changes in camaliga 6.0.0)'; + + $GLOBALS['TYPO3_DB']->sql_query( + "UPDATE sys_template SET config = replace(config, 'plugin.tx_camaliga.view.partialRootPath =', 'plugin.tx_camaliga.view.partialRootPaths.1 =') WHERE 1=1"); + $GLOBALS['TYPO3_DB']->sql_query( + "UPDATE sys_template SET config = replace(config, 'plugin.tx_camaliga.view.templateRootPath =', 'plugin.tx_camaliga.view.templateRootPaths.1 =') WHERE 1=1"); + $GLOBALS['TYPO3_DB']->sql_query( + "UPDATE sys_template SET config = replace(config, 'plugin.tx_camaliga.view.layoutRootPath =', 'plugin.tx_camaliga.view.layoutRootPaths.1 =') WHERE 1=1"); + + $this->messageArray[] = array(FlashMessage::OK, $title, 'sys_template has been updated!'); + + + // The fieldname for fal images was wrong in version 8.0.0 + $title = 'Update image-FAL-relations (changes in camaliga 8.0.0)'; + + $update = array('fieldname' => 'falimage'); + $this->databaseConnection->exec_UPDATEquery( + 'sys_file_reference', + "fieldname='image' AND tablenames='tx_camaliga_domain_model_content'", + $update + ); + $update = array('fieldname' => 'falimage2'); + $this->databaseConnection->exec_UPDATEquery( + 'sys_file_reference', + "fieldname='image2' AND tablenames='tx_camaliga_domain_model_content'", + $update + ); + $update = array('fieldname' => 'falimage3'); + $this->databaseConnection->exec_UPDATEquery( + 'sys_file_reference', + "fieldname='image3' AND tablenames='tx_camaliga_domain_model_content'", + $update + ); + $update = array('fieldname' => 'falimage4'); + $this->databaseConnection->exec_UPDATEquery( + 'sys_file_reference', + "fieldname='image4' AND tablenames='tx_camaliga_domain_model_content'", + $update + ); + $update = array('fieldname' => 'falimage5'); + $this->databaseConnection->exec_UPDATEquery( + 'sys_file_reference', + "fieldname='image5' AND tablenames='tx_camaliga_domain_model_content'", + $update + ); + + $this->messageArray[] = array(FlashMessage::OK, $title, 'sys_file_reference has been updated!'); + } + + /** + * Generates output by using flash messages + * + * @return string + */ + protected function generateOutput() { + $output = ''; + foreach ($this->messageArray as $messageItem) { + /** @var \TYPO3\CMS\Core\Messaging\FlashMessage $flashMessage */ + $flashMessage = GeneralUtility::makeInstance( + 'TYPO3\\CMS\\Core\\Messaging\\FlashMessage', + $messageItem[2], + $messageItem[1], + $messageItem[0]); + $output .= $flashMessage->render(); + } + return $output; + } +} +?> \ No newline at end of file diff --git a/ext_conf_template.txt b/ext_conf_template.txt new file mode 100644 index 0000000..d88b7b8 --- /dev/null +++ b/ext_conf_template.txt @@ -0,0 +1,23 @@ +# cat=basic/enable; type=boolean; label=Ignore the category relations of translated elements: +categoryMode = 1 + +# cat=basic//10; type=string; label=Select this extended fields too (without comma, e.g. "custom4 custom5 custom6"): +extendedFields = + +# cat=basic/enable; type=boolean; label=Use images from FAL instead of images from uploads/: +enableFal = 0 + +# cat=disable_fields/enable; type=boolean; label=Disable all further images (use only one image): +disableFurtherImages = 0 + +# cat=disable_fields/enable; type=boolean; label=Disable all address fields: +disableAddress = 0 + +# cat=disable_fields/enable; type=boolean; label=Disable all contact fields: +disableContact = 0 + +# cat=disable_fields/enable; type=boolean; label=Disable all custom fields: +disableCustom = 0 + +# cat=disable_fields/enable; type=boolean; label=Disable the mother field: +disableMother = 0 \ No newline at end of file diff --git a/ext_emconf.php b/ext_emconf.php new file mode 100644 index 0000000..962f875 --- /dev/null +++ b/ext_emconf.php @@ -0,0 +1,39 @@ + 'Camaliga: CArousel/MAp/LIst/GAllery', + 'description' => 'A carousel/gallery/map/list extension that can use the TYPO3 categories and different jQuery-plugins like Slick or Isotope. Bootstrap support. Indexer for ke_search. Many features! Big manual (even in german).', + 'category' => 'plugin', + 'version' => '8.0.8', + 'state' => 'stable', + 'uploadfolder' => true, + 'createDirs' => '', + 'clearcacheonload' => false, + 'author' => 'Kurt Gusbeth', + 'author_email' => 'info@quizpalme.de', + 'author_company' => '', + 'constraints' => + array ( + 'depends' => + array ( + 'typo3' => '7.0.0-8.7.99', + ), + 'conflicts' => + array ( + ), + 'suggests' => + array ( + ), + ), +); + diff --git a/ext_icon.gif b/ext_icon.gif new file mode 100644 index 0000000..6d3cfce Binary files /dev/null and b/ext_icon.gif differ diff --git a/ext_localconf.php b/ext_localconf.php new file mode 100644 index 0000000..3640c6c --- /dev/null +++ b/ext_localconf.php @@ -0,0 +1,82 @@ + 'list, listExtended, show, showExtended, random, search, carousel, carouselSeparated, responsiveCarousel, coolcarousel, ekko, lightslider, sgallery, skdslider, scrollable, roundabout, flipster, flexslider2, fullwidth, galleryview, fancyBox, elastislide, innerfade, bootstrap, collapse, modal, tab, adGallery, owl2, isotope, slick, parallax, revolution, fractionSlider, responsive, map', + ), + array( + 'Content' => 'random, search', + ) +); + +// Hooks for ke_search +if (\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::isLoaded('ke_search')) { + // register custom indexer hook + $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['ke_search']['registerIndexerConfiguration'][] + = 'EXT:camaliga/Classes/Hooks/class.user_kesearchhooks.php:user_kesearchhooks'; + + $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['ke_search']['customIndexer'][] + = 'EXT:camaliga/Classes/Hooks/class.user_kesearchhooks.php:user_kesearchhooks'; +} + +\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPageTSConfig(''); + +// Add page TSConfig für den Linkvalidator (geht aber immer noch nicht) +if (\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::isLoaded('linkvalidator')) { + \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPageTSConfig(''); +} + +// Page module hook +$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['cms/layout/class.tx_cms_layout.php']['list_type_Info']['camaliga_pi1']['camaliga'] = +\Quizpalme\Camaliga\Hooks\PageLayoutView::class . '->getExtensionSummary'; + +if (TYPO3_MODE === 'BE') { + // Page module hook - show flexform settings in page module: geht so aber nicht! + //$extensionName = \TYPO3\CMS\Core\Utility\GeneralUtility::underscoredToUpperCamelCase($_EXTKEY); + //$pluginSignature = strtolower($extensionName) . '_pi'; + //$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['cms/layout/class.tx_cms_layout.php']['list_type_Info'][$pluginSignature][$_EXTKEY] = + // \Quizpalme\Camaliga\Hooks\PageLayoutView::class . '->getExtensionSummary'; + + // Add CSV-export task (sheduler) + $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['scheduler']['tasks']['Quizpalme\\Camaliga\\Task\\CsvExportTask'] = array( + 'extension' => $_EXTKEY, + 'title' => 'LLL:EXT:' . $_EXTKEY . '/Resources/Private/Language/locallang_be.xlf:tasks.title', + 'description' => 'LLL:EXT:' . $_EXTKEY . '/Resources/Private/Language/locallang_be.xlf:tasks.description', + 'additionalFields' => 'Quizpalme\\Camaliga\\Task\\CsvExportAdditionalFieldProvider' + ); + + // Add CSV-import task (sheduler) + $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['scheduler']['tasks']['Quizpalme\\Camaliga\\Task\\CsvImportTask'] = array( + 'extension' => $_EXTKEY, + 'title' => 'LLL:EXT:' . $_EXTKEY . '/Resources/Private/Language/locallang_be.xlf:itasks.title', + 'description' => 'LLL:EXT:' . $_EXTKEY . '/Resources/Private/Language/locallang_be.xlf:itasks.description', + 'additionalFields' => 'Quizpalme\\Camaliga\\Task\\CsvImportAdditionalFieldProvider' + ); + + // Add uploads/ to FAL task (sheduler) + $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['scheduler']['tasks']['Quizpalme\\Camaliga\\Task\\MoveUploadsToFalTask'] = array( + 'extension' => $_EXTKEY, + 'title' => 'LLL:EXT:' . $_EXTKEY . '/Resources/Private/Language/locallang_be.xlf:faltasks.title', + 'description' => 'LLL:EXT:' . $_EXTKEY . '/Resources/Private/Language/locallang_be.xlf:faltasks.description', + 'additionalFields' => 'Quizpalme\\Camaliga\\Task\\MoveUploadsToFalFieldProvider' + ); + + /** @var \TYPO3\CMS\Core\Imaging\IconRegistry $iconRegistry */ + $iconRegistry = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\TYPO3\CMS\Core\Imaging\IconRegistry::class); + $iconRegistry->registerIcon( + 'ext-camaliga-wizard-icon', + \TYPO3\CMS\Core\Imaging\IconProvider\BitmapIconProvider::class, + ['source' => 'EXT:camaliga/Resources/Public/Icons/ce_wiz.gif'] + ); + $iconRegistry->registerIcon( + 'ext-camaliga-folder-icon', + \TYPO3\CMS\Core\Imaging\IconProvider\BitmapIconProvider::class, + ['source' => 'EXT:camaliga/Resources/Public/Icons/ext_icon_camaliga_folder.gif'] + ); +} +?> \ No newline at end of file diff --git a/ext_tables.php b/ext_tables.php new file mode 100644 index 0000000..639bb03 --- /dev/null +++ b/ext_tables.php @@ -0,0 +1,48 @@ + 'index, thumb, thumb7, import, importNews', + ), + array( + 'access' => 'user,group', + 'icon' => 'EXT:' . $_EXTKEY . '/ext_icon.gif', + 'labels' => 'LLL:EXT:' . $_EXTKEY . '/Resources/Private/Language/locallang_be.xlf', + ) + ); +} + +// Add static file... +\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addStaticFile($_EXTKEY, 'Configuration/TypoScript', 'Camaliga (carousel/map/list/gallery)'); +\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addLLrefForTCAdescr('tx_camaliga_domain_model_content', 'EXT:camaliga/Resources/Private/Language/locallang_csh_tx_camaliga_domain_model_content.xlf'); +\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::allowTableOnStandardPages('tx_camaliga_domain_model_content'); + +// Kategorien. Mehr Infos dazu hier: http://wiki.typo3.org/TYPO3_6.0#Category und https://docs.typo3.org/typo3cms/CoreApiReference/ApiOverview/Categories/Index.html +\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::makeCategorizable( + $_EXTKEY, + 'tx_camaliga_domain_model_content', + 'categories' +); + +// Folder icon +// $TCA['pages']['ctrl']['typeicon_classes']['contains-camaliga'] = 'ext-camaliga-folder-icon'; +// \TYPO3\CMS\Backend\Sprite\SpriteManager::addTcaTypeIcon('pages', 'contains-camaliga', \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extRelPath($_EXTKEY).'ext_icon_camaliga_folder.gif'); +?> \ No newline at end of file diff --git a/ext_tables.sql b/ext_tables.sql new file mode 100644 index 0000000..6d03b07 --- /dev/null +++ b/ext_tables.sql @@ -0,0 +1,70 @@ +# +# Table structure for table 'tx_camaliga_domain_model_content' +# +CREATE TABLE tx_camaliga_domain_model_content ( + + uid int(11) NOT NULL auto_increment, + pid int(11) DEFAULT '0' NOT NULL, + + title varchar(255) DEFAULT '' NOT NULL, + shortdesc text NOT NULL, + longdesc text NOT NULL, + link tinytext NOT NULL, + image tinytext NOT NULL, + image2 tinytext NOT NULL, + caption2 varchar(255) DEFAULT '' NOT NULL, + image3 tinytext NOT NULL, + caption3 varchar(255) DEFAULT '' NOT NULL, + image4 tinytext NOT NULL, + caption4 varchar(255) DEFAULT '' NOT NULL, + image5 tinytext NOT NULL, + caption5 varchar(255) DEFAULT '' NOT NULL, + falimage int(11) unsigned NOT NULL default '0', + falimage2 int(11) unsigned NOT NULL default '0', + falimage3 int(11) unsigned NOT NULL default '0', + falimage4 int(11) unsigned NOT NULL default '0', + falimage5 int(11) unsigned NOT NULL default '0', + street varchar(255) DEFAULT '' NOT NULL, + zip varchar(255) DEFAULT '' NOT NULL, + city varchar(255) DEFAULT '' NOT NULL, + country varchar(255) DEFAULT '' NOT NULL, + person varchar(255) DEFAULT '' NOT NULL, + phone varchar(255) DEFAULT '' NOT NULL, + mobile varchar(255) DEFAULT '' NOT NULL, + email varchar(255) DEFAULT '' NOT NULL, + latitude decimal(24,14) DEFAULT '0.00000000000000', + longitude decimal(24,14) DEFAULT '0.00000000000000', + custom1 varchar(255) DEFAULT '' NOT NULL, + custom2 varchar(255) DEFAULT '' NOT NULL, + custom3 varchar(255) DEFAULT '' NOT NULL, + mother int(11) unsigned 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, + deleted tinyint(4) unsigned DEFAULT '0' 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, + + t3ver_oid int(11) DEFAULT '0' NOT NULL, + t3ver_id int(11) DEFAULT '0' NOT NULL, + t3ver_wsid int(11) DEFAULT '0' NOT NULL, + t3ver_label varchar(255) DEFAULT '' NOT NULL, + t3ver_state tinyint(4) DEFAULT '0' NOT NULL, + t3ver_stage int(11) DEFAULT '0' NOT NULL, + t3ver_count int(11) DEFAULT '0' NOT NULL, + t3ver_tstamp int(11) DEFAULT '0' NOT NULL, + t3ver_move_id int(11) DEFAULT '0' NOT NULL, + sorting int(11) DEFAULT '0' NOT NULL, + t3_origuid int(11) DEFAULT '0' NOT NULL, + sys_language_uid int(11) DEFAULT '0' NOT NULL, + l10n_parent int(11) DEFAULT '0' NOT NULL, + l10n_diffsource mediumblob, + + PRIMARY KEY (uid), + KEY parent (pid), + KEY t3ver_oid (t3ver_oid,t3ver_wsid), + KEY language (l10n_parent,sys_language_uid) + +);