[TYPO3-german] sk_calendar sortierung in der listenansicht: bug?

Roland Müller roland.mueller at flad.de
Fri Nov 9 09:18:01 CET 2007


so konnte das gestern fixen hier die änderungen:

class tx_skcalendar_listview:
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//patch vom forum: 
http://www.typo3.net/forum/list/list_post//47274/?page=1&sword=sk_calendar#pid177490
// diesen habe ich selbst noch mal bearbeitet!!!!!!
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// Prepare Array
$clean_arr = array();

if (!$this->events) 	
	$this->events = array();

//echo t3lib_div::view_array($this->events);
		
while ($i <= $result_count) {
	list(,$data) = each($this->events);
	
	if ($data) {	 			
		switch ($sorting) { // get basis for sorting
			case '': // sortierung nach titel
				$catid = $data['category']['uid']; // es muss die categorie uid 
ermittelt werden
					$prefix = $this->getCategory($catid, 'title');
				break;			

			case 'category': // sortierung nach land				
				$catid = $data['category']['uid']; // es muss die categorie uid 
ermittelt werden
				$prefix = $this->getCategory($catid, 'title');
				break;			
			
			case 'location': // sortierung nach ort
				$locid = $data['location']['uid'];
				$prefix = $this->getLocation($locid, 'title');
				break;
				
			case 'title': // sortierung nach titel
				$prefix = strtolower($data['title']);
				break; 				
	    }
					
		$clean_arr[$prefix . '_' . $i] = $data;
		$i++;
	}else {
		$i = $result_count + 1;
	}
}

if(next($this->events))
	$next = 1;

		
// sorting the array
if ($sort_order == 'up') {
  	krsort($clean_arr, SORT_STRING);
}elseif ($sort_order == 'down') {
	ksort($clean_arr, SORT_STRING);
}
		
reset($clean_arr);
$limit = $this->conf['list']['limit'];
$clean_arr = array_slice($clean_arr, $this->conf['notch'], $limit);
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// 



Roland Müller schrieb:
> hi ng,
> 
> wie ist das mit der sortierung bei der extension sk_calendar in der 
> listenansicht? es scheint dort ein problem zu geben.
> 
> lediglich die sortierung nach datum funktioniert. sorierung nach 
> kategorie usw. funktioniert nicht.
> ich verwende die version 0.3.3 der extension.
> 
> danke im voraus, roland


More information about the TYPO3-german mailing list