Zum Inhalt springen

sk_calendar Filter Formular macht Probleme

Erstellt am 6. Oktober 2008 · 1 Antwort · letzte Antwort am 7. Oktober 2008

Tags: Kalender & Termine, Frage

donenik ·

Hallo,
ich habe die Extension sk_calendar istalliert und stehe nun vor dem Problem, das die Filter Formulare im FE unter Umständen im Firefox nicht angezeigt werden, weil der html Code wie folgt ausgegeben wird:

input type=hidden name=no_cache value=1 usw...

Da fehlen doch eindeutig die Anführungszeichen oder nicht?
Hat jemand eventuell eine Idee wie ich die dahin kriegen kann?

Vielen Dank schon mal, Dominik

ps.: selbst dieser Editor hier berichtigt das wenn ich den kompletten html-tag schreibe :-)

donenik ·

Die Datei pi1/class.tx_skcalendar_htmlview.php ist schuld. Die sollte wenn ich nichts vergessen habe so aussehen:

<?php
/***************************************************************
*  Copyright notice
*
*  (c) 2004 Volker Biberger / sitekick.de <info@sitekick.de>
*  All rights reserved
*
*  This script is part of the Typo3 project. The Typo3 project is
*  free software; you can redistribute it and/or modify
*  it under the terms of the GNU General Public License as published by
*  the Free Software Foundation; either version 2 of the License, or
*  (at your option) any later version.
*
*  The GNU General Public License can be found at
*  http://www.gnu.org/copyleft/gpl.html.
*
*  This script is distributed in the hope that it will be useful,
*  but WITHOUT ANY WARRANTY; without even the implied warranty of
*  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
*  GNU General Public License for more details.
* 
*  This copyright notice MUST APPEAR in all copies of the script!
***************************************************************/

// FE-Engine
class tx_skcalendar_htmlview extends tx_skcalendar_feengine {
	var $results;
	var $calendarArray;
	var $template;
	
	function tx_skcalendar_htmlview($container,$conf) {
		//call mothership
		$this->tx_skcalendar_feengine($container,$conf);
		$overrideTF = t3lib_div::getFileAbsFileName($this->conf['general']['overrideTF']);
		if (file_exists($overrideTF)) {
			include_once($overrideTF);
			}
		if (class_exists(tx_skcalendar_overrideTF)) $this->template = new tx_skcalendar_overrideTF;	
		else $this->template = new tx_skcalendar_defaultTF;
		$this->template->setTemplate($container,$conf);
		$this->template->setCode($this->myCobj->fileResource($this->conf['general']['htmltemplate']));
		}

	/**
	* @return void
	* @desc create the differnt holidays
	*/
	function detailLink($id,$text,$color,$date) {
		//Filterkriterien werden im Detaillink nicht gebraucht johpie
		//$link = $this->prepareTypolink();
		
		$link['tx_skcalendar_pi1[offset]'] = $date;
		$link['tx_skcalendar_pi1[view]'] = 'detail';
		$link['tx_skcalendar_pi1[uid]'] = $id;
		$return = '<a class="internal-link next-link" href="' . $GLOBALS["TSFE"]->cObj->getTypoLink_URL($this->conf['general']['detail_pid'],$link) . '"><font color="' . $data['color'] . '">'. $text.'</font></a>';
		return $return;
		}

	function prepareTypolink() {
		//Änderung zum kürzen der Links johpie
		if ($this->offset)
			$link['tx_skcalendar_pi1[offset]'] = $this->offset;
		if ($this->conf['filters']['datefrom'])
			$link['tx_skcalendar_pi1[datefrom]'] = $this->conf['filters']['datefrom'];
		if ($this->conf['filters']['dateto'])
			$link['tx_skcalendar_pi1[dateto]'] = $this->conf['filters']['dateto'];
		if ($this->conf['filters']['targetgroup'][0])
			$link['tx_skcalendar_pi1[targetgroup]'] = $this->conf['filters']['targetgroup'][0];
		if ($this->conf['filters']['category'][0])
			$link['tx_skcalendar_pi1[category]'] = $this->conf['filters']['category'][0];
		if ($this->conf['filters']['location'][0])
			$link['tx_skcalendar_pi1[location]'] = $this->conf['filters']['location'][0];
		if ($this->conf['filters']['organizer'][0])
			$link['tx_skcalendar_pi1[organizer]'] = $this->conf['filters']['organizer'][0];
		if ($this->conf['filters']['sword'])
			$link['tx_skcalendar_pi1[sword]'] = $this->conf['filters']['sword'];
		if ($this->conf['filters']['monthfilter'])
			$link['tx_skcalendar_pi1[monthfilter]'] = $this->conf['filters']['monthfilter'];
		if ($this->view)
			$link['tx_skcalendar_pi1[view]'] = $this->view;

		// Änderung, nicht nötig da Inhalt sowieso nicht gecached wird johpie
		//$link['no_cache'] = 1;
		return $link;
	}

	function makeLinks() {
		$link_arr = array ('week' => $this->pi_getLL('week_view'), 'month' =>  $this->pi_getLL('month_view'), 'list' =>  $this->pi_getLL('list_view'), 'year' => $this->pi_getLL('year_view'));

		$this->content .= '<table cellspacing=0 cellpadding=0 width=100%><tr><td colspan=4><b>' . $this->pi_getLL('other_views') . '</b></td></tr><tr valign=top>';
		$link= $this->prepareTypolink();
		while (list($key,$value) = each($link_arr)) {

			$link['tx_skcalendar_pi1[view]'] = $key;
			$this->content .= '<td><a href="' . $GLOBALS["TSFE"]->cObj->getTypoLink_URL($GLOBALS["TSFE"]->id,$link) . '">'. $value .'</a></td>';
		}
		$this->content .= '</tr></table>';

	}

	function parseTime($wholeday, $date, $start, $end) {
		if (!$wholeday && $start) {
			$out = $this->pi_getLL('begin') . ': ' . gmstrftime('%H:%M',$start) . ' ' . $this->pi_getLL('clock');
			if ($end) {
				$out .= ' '. $this->pi_getLL('until') .' ' . gmstrftime('%H:%M',$end) . ' ' . $this->pi_getLL('clock');
			}
		}
		else $out = $this->pi_getLL('date') . ': ' . gmstrftime('%A, %d.%m.%Y',$date);
		return $out;
	}

		function makeFilters() {
		$this->content .= '<br><form action="' . $GLOBALS["TSFE"]->cObj->getTypoLink_URL($GLOBALS["TSFE"]->id) . '" method="post"><input type="hidden" name="tx_skcalendar_pi1[view]" value="' . $this->view . '"><input type="hidden" name="no_cache" value="1"><input type="hidden" name="tx_skcalendar_pi1[offset]" value="' . $this->offset . '"><h2>' . $this->pi_getLL('filter_view') . '</h2></br>';
		if ($this->conf['filters']['showsearch']) $this->content .= '<label for="searchword">' . $this->pi_getLL('searchword') . '</label><input type="text" id="searchword" name="tx_skcalendar_pi1[sword]" value="' . $this->conf['filters']['sword'] . '"><br />';
		if ($this->conf['filters']['showdate']) $this->content .= '<label for="dateselect">' . $this->pi_getLL('dateselect') . '</label><input type="text" id="dateselect" name="tx_skcalendar_pi1[datefrom]" "value="' . $this->conf['filters']['datefrom'] . '" size=10> - <input type="text" id="dateselect" name="tx_skcalendar_pi1[dateto"] value="' . $this->conf['filters']['dateto'] . '" size=10><br />';
		
			// dropdowns
			reset ($this->categories);
				if (count($this->categories)>1 && $this->conf['filters']['showcat']) {
					$cat_sel[$this->conf['filters']['category'][0]] = ' selected';
					$this->content .= '<label for="categories">' . $this->pi_getLL('choose_cat') . '</label><select name="tx_skcalendar_pi1[category]" id="categories"><option value="">' . $this->pi_getLL('all_cat') . '</option>';
					while (list(,$data) = each ($this->categories)) $this->content .= '<option value="' . $data['uid'] . '"'. $cat_sel [$data['uid']] . '>' . $data['title'] . '</option>';
					$this->content .= '</select><br />';
					}

				reset ($this->locations);
				if (count($this->locations)>1 && $this->conf['filters']['showloc']) {
					$loc_sel[$this->conf['filters']['location'][0]] = ' selected';
					$this->content .= '<label for="locations">' . $this->pi_getLL('choose_loc') . '</label><select name="tx_skcalendar_pi1[location]" id="locations"><option value="">' . $this->pi_getLL('all_location') . '</option>';
					while (list(,$data) = each ($this->locations)) $this->content .= '<option value="' . $data['uid'] . '"'. $loc_sel[$data['uid']] . '>' . $data['title'] . '</option>';
					$this->content .= '</select><br />';
				}
				reset ($this->organizers);
				if (count($this->organizers)>1 && $this->conf['filters']['showorg']) {
					$org_sel[$this->conf['filters']['organizer'][0]] = ' selected';
					$this->content .= '<label for="organizers">' . $this->pi_getLL('choose_org') . '</label><select name="tx_skcalendar_pi1[organizer]" id="organizers"><option value="">' . $this->pi_getLL('all_organizer') . '</option>';
					while (list(,$data) = each ($this->organizers)) $this->content .= '<option value="' . $data['uid'] . '"'. $org_sel[$data['uid']] . '>' . $data['name'] . '</option>';
					$this->content .= '</select><br />';
				}
				reset ($this->targetgroups);
				if (count($this->targetgroups)>1 && $this->conf['filters']['showtar']) {
					$tar_sel[$this->conf['filters']['targetgroup'][0]] = ' selected';
					$this->content .= '<label for="targetgroups">' . $this->pi_getLL('choose_tar') . '</label><select name="tx_skcalendar_pi1[targetgroup]" id="targetgroups"><option value="">' . $this->pi_getLL('all_targetgroup') . '</option>';
					while (list(,$data) = each ($this->targetgroups)) $this->content .= '<option value="' . $data['uid'] . '"'. $tar_sel[$data['uid']] . '>' . $data['title'] . '</option>';
					$this->content .= '</select><br />';
				}
			if ($this->conf['list']['filter_month']) {
						
					$month_sel[$this->conf['filters']['monthfilter']] = ' selected';
					$this->content .= '<label for="monthlist">' . $this->pi_getLL('choose_month') . '</label><select id="monthlist" name="tx_skcalendar_pi1[monthfilter]"><option value="">' . $this->pi_getLL('all_month') . '</option>';
					$act_date = date('m-Y');
					$act_date = explode('-',$act_date);
					
					if ($this->conf['list']['filter_month'] == 'reverse') {
						$act_date = mktime(0,0,0,$act_date[0]-24,1,$act_date[1]);
						$act_date = date('m-Y',$act_date);
						$act_date = explode('-',$act_date);
					}
					
					
					
					while ($m < 24) {
						$newoffset = mktime(0,0,0,$act_date[0]+$m,1,$act_date[1]);
						$this->content .= '<option value="' . $newoffset . '"'. $month_sel[$newoffset] . '">' . strftime('%Y %B',$newoffset) . '</option>';
						$m++;
					}
					$this->content .= '</select>';
				}

			$this->content .= '<br><label>&nbsp;</label><input type="submit" value="' . $this->pi_getLL('do_filter') . '"></form>';


		}
		function makeNavigation() {
		}


	}
	
include_once(t3lib_extMgm::extPath('sk_calendar').'pi1/class.tx_skcalendar_weekview.php');
include_once(t3lib_extMgm::extPath('sk_calendar').'pi1/class.tx_skcalendar_boxview.php');
include_once(t3lib_extMgm::extPath('sk_calendar').'pi1/class.tx_skcalendar_detailview.php');
include_once(t3lib_extMgm::extPath('sk_calendar').'pi1/class.tx_skcalendar_dayview.php');
include_once(t3lib_extMgm::extPath('sk_calendar').'pi1/class.tx_skcalendar_yearview.php');
include_once(t3lib_extMgm::extPath('sk_calendar').'pi1/class.tx_skcalendar_monthview.php');
include_once(t3lib_extMgm::extPath('sk_calendar').'pi1/class.tx_skcalendar_listmonthview.php');
include_once(t3lib_extMgm::extPath('sk_calendar').'pi1/class.tx_skcalendar_thumbmonthview.php');
include_once(t3lib_extMgm::extPath('sk_calendar').'pi1/class.tx_skcalendar_listview.php');
include_once(t3lib_extMgm::extPath('sk_calendar').'pi1/class.tx_skcalendar_archiveview.php');
include_once(t3lib_extMgm::extPath('sk_calendar').'pi1/class.tx_skcalendar_upcomingview.php');
include_once(t3lib_extMgm::extPath('sk_calendar').'pi1/class.tx_skcalendar_te.php');
include_once(t3lib_extMgm::extPath('sk_calendar').'pi1/class.tx_skcalendar_defaultTF.php');


	if (defined("TYPO3_MODE") && $TYPO3_CONF_VARS[TYPO3_MODE]["XCLASS"]["ext/sk_calendar/pi1/class.tx_skcalendar_htmlview.php"])	{
		include_once($TYPO3_CONF_VARS[TYPO3_MODE]["XCLASS"]["ext/sk_calendar/pi1/class.tx_skcalendar_htmlview.php"]);
	}

?>