[TYPO3-calendar] Is this an allday event?

Stig Nørgaard Færch snf at dkm.dk
Thu Jan 26 08:04:09 CET 2012


Den 25-01-2012 19:33, Mario Matzulla skrev:
> Hi Stig,
>
> Am 25.01.12 09:56, schrieb Stig Nørgaard Færch:
>> Should an event with both different start and end date and time, be
>> considered as an allday event?
>> For example:
>> 13th of feb 08:00 -
>> 14th of feb 12:30
>>
>> On my setup, this is rendered by
>> ###TEMPLATE_PHPICALENDAR_EVENT_LIST_ODD_ALLDAY###
>> and not ###TEMPLATE_PHPICALENDAR_EVENT_LIST_ODD###.
>>
>> I only expect and event to be rendered by
>> ###TEMPLATE_PHPICALENDAR_EVENT_LIST_ODD_ALLDAY###
>> when the field 'All Day Event' is checked.
>>
>> Is anything wrong here?
>
> I think I added this part:
>
> if(substr($viewType,-6) != 'ALLDAY' && ($this->isAllday() ||
> $this->getStart()->format('%Y%m%d') != $this->getEnd()->format('%Y%m%d'))){
> $subpartSuffix .= 'ALLDAY';
> }
>
> to the event model, in order to get a different rendering for the new
> standard templates. Events longer than one day are rendered like allday
> events.
>
> Would it help, if we would point it out much more in our documentation?
> Or do you see any need to change the code?

I would like a switch to be able change the behaviour back.

if(substr($viewType,-6) != 'ALLDAY' && ($this->isAllday() ||
($this->getStart()->format('%Y%m%d') != 
$this->getEnd()->format('%Y%m%d') && 
$renderAsAlldayIfStartEndDateIsDifferent))){
$subpartSuffix .= 'ALLDAY';
}

I have a situation, where I need ALLDAY to be rendered, only when 'All 
Day Event' is checked. I guess I might not be the only one expecting this?

/Stig


More information about the TYPO3-project-calendar mailing list