[TYPO3-calendar] don`t show Events in the Future

Bernd Pier macbepepi at me.com
Fri May 12 10:26:27 CEST 2017


Hi Mario,

i tried a few Configurationsets but at the End i extend the Extension 
with a new TS Option
dontShowFutureEvents = 3

I set this for the Month- and Dayview. And i use
dontShowOldEvents = 2
do hide the old Events.

And in the EventServices.php at Line 60 i get my TS Option
$dontShowFutureEvents = (integer) $this->conf ['view.'] [$this->conf 
['view'] . '.'] ['dontShowFutureEvents'];

and later on Line 7u0 or so inside the
if ($start_date->getTime () <= $now->getTime ()) {

i insert
if ($dontShowFutureEvents > 0) {
	$day = $now->getDay() + 2 + $dontShowOldEvents;
	(string)$day;
	$start_date->setDay($day);
}

Don`t know why i had to add 2 to the now-getDay(), but i had to.

Maybe my Code is not optimal and i knew i had to take care when i make 
an Update, but thats ok for me.

Maybe it is an intressting Feature cause when you use cal for booking 
Events in conclusion with Powermail, so i did, it makes Sense that 
Events starting from Today till x Days in the Future are hidden.

Wish you all a sunny day.

Bernd P.

Am 10.05.17 um 16:52 schrieb Mario Matzulla:
> Hi Bernd,
>
> Am 10.05.17 um 11:22 schrieb Bernd Pier:
>> Hi Mario,
>>
>> thanx for your Answer. I try to get clearer.
>>
>> On a page i have two times cal, left side the month view right side the day view. The day view only displays the events for this day.
>>
>> So when i open the page in the month view 9.5.2017 is active and in the day view i see all events for this day.
>>
>> But i don`t want this events, even for the next 2 days (10.5 + 11.5) i don`t want to see the events.
>
> What you want is a list for THAT (selected) day :)
> You have to select the day view for this, not the list view. Than manipulate the day.tmpl: remove the day part and insert a list (have alook
> at the month.tmpl).
>
> That should do the trick ;)
>
> Regards,
> Mario
>
>>
>> I want to see the events starting at 12.5.2017 till infinity or something like this.
>>
>> I try
>> view.list.starttime = +3 days
>>
>> Ah the events have a Regular Frequency Rule "daily".
>>
>> greetings
>>
>>
>> Bernd P.
>>
>> Am 09.05.17 um 21:23 schrieb Mario Matzulla:
>>> Hi Bernd,
>>>
>>> if I get you right, you need:
>>>
>>> view.list.starttime = today
>>> view.list.endtime = +2 days
>>>
>>> for a list view for the next 3 days.
>>>
>>> But I did not get the rest of your explanation :(
>>>
>>> Sorry, regards
>>> Mario
>>>
>>> Am 08.05.17 um 17:08 schrieb Bernd Pier:
>>>> Hi Everybody,
>>>>
>>>> i have recurrent Events e.g. every Day from 11:00 - 12:00. In my Event List View i want to see the Events 3 Days in the Future.
>>>>
>>>> Let`s say it is Monday 8.5.2017 actually i see all the Events for this Day and Thursday (when i click on this Day) etc. ....
>>>>
>>>> But i want to see the Events starting from Thursday.
>>>>
>>>> With the Configuration
>>>> dontShowOldEvents = 2
>>>> i hide all Events in the Past and for the current Day. But unfortunaly i can not set this into the Future.
>>>>
>>>> Is this possible?
>>>>
>>>> Is my Explanation clear?
>>>>
>>>> My System
>>>> Typo3 7.6.18
>>>> Cal 1.10.3
>>>>
>>>> thanx for your Help
>>>>
>>>>
>>>> Bernd P.
>>>
>>
>



More information about the TYPO3-project-calendar mailing list