[TYPO3-calendar] cal_ts_service with seminars
Tobias Schaefer
tobias.schaefer at ptb.de
Wed Aug 10 16:45:14 CEST 2011
Hi,
I just had the same problem with the endtime of seminars not be showing correctly
in cal.
All seminars had a length of 3 hours. As Mario already mentioned on 25.11.2009
this is caused by "defaultLength".
Looking into the code of cal_ts_service/model/class.tx_cal_ts_model.php in
the createEvent-Function I found the reason for this strange behaviour:
if($this->thisConf['defaultLength'] && !$this->isAllday()){
$end = new tx_cal_date();
end->copy($start);
$end->addSeconds($this->thisConf['defaultLength']*60);
}else{
$end = new tx_cal_date(gmdate('Ymd',$row[$this->thisConf['endTimeField']]));
$end->setTZbyId('UTC');
$end->setMinute(gmdate('i',$row[$this->thisConf['endTimeField']]));
$end->setHour(gmdate('H',$row[$this->thisConf['endTimeField']]));
}
I think the code should be something like:
if($this->thisConf['defaultLength'] && !$this->isAllday() && !$row[$this->thisConf['endTimeField']]){
Instead of changing the code it's also possible to remove the defaultLength:
plugin.tx_cal_controller.display.seminars.defaultLength=
plugin.tx_cal_controller.display.seminars2.defaultLength=
Cheers, Tobias
> Hi Mario,
>
> Forgive me for resurrecting this old issue, but I think there is a
> problem here, which is that the default configuration of the
> 'seminars2' doesn't seem to pick up the end_date data at all (cal
> 1.3.3, cal_ts_service 1.1, seminars 0.9.1) - thought i'd mention it
> here before reporting it (i.e. behaviour is as if 'endTimeField' TS
> setting doesn't have any effect).
>
> If you give a seminar an end time, the defaultLength property
> shouldn't be needed since there is data in the end_date field; and the
> ENDTIME marker should be filled from the Seminar record, but this
> doesn't happen. Also, the ENDDATE marker also isn't filled. This
> happens on a 'clean' install.
>
> Best wishes
>
> Paul
>
> "Mario Matzulla" <mario at matzullas.de> wrote in message
> news:mailman.1.1259262172.32505.typo3-project-calendar at lists.typo3.org
> ...
>
>> Hi Robert,
>>
>> Am 25.11.09 18:43, schrieb Robert Grede:
>>
>>> hello,
>>>
>>> I'm using cal 1.2.0, cal_ts_service 1.0.0 r2617 with seminars 0.8.3.
>>> in principle it looks fine, but I get always a wrong end-time. The
>>> duration is always 3 hours.
>>>
>>> seminar-sample:
>>> 30.11.2009 8:00 - 18:00
>>> ouput in cal-views:
>>> 30.11.2009 8:00 - 11:00
>>> seminar-sample:
>>> 30.11.2009 9:00 - 15:00
>>> ouput in cal-views:
>>> 30.11.2009 9:00 - 12:00
>>> Any hints?
>>>
>> plugin.tx_cal_controller.display.seminars {
>> # @description If there is no end time, you can define a default
>> length
>> (in minutes)
>> defaultLength = 180
>> }
>> Regards,
>> Mario
>>> Regards
>>>
>>> Robert
>>>
More information about the TYPO3-project-calendar
mailing list