New events calendar template

More
11 years 2 months ago #33255 by Rehne
Replied by Rehne on topic New events calendar template

fgossart wrote: I think I have found a first bug in settings Display Events in future (custom value).
Actually the value has no effect, all the futures events are displayed.
In category_items.php i change the < with > on the second check . I think it's copied from before and not correct.
if ($displayEventsInFuture == 2) {
if (($dateToCheck[1] > ($today[1] + $displayEventsMonthInFutureCustom)) && ($dateToCheck2[1] > ($today[1] + $displayEventsMonthInFutureCustom)))
continue; // skip it < event doesnt lie in the current month's time range ($today[1] = month e.g. 4)}


it feels better now, I still have to found now how I could navigate through past and future months if possible.


Hi,

I have now changed this (show events in past / future)
as i have do some tests and still found several other problems
the new one (code) works
what to do:

delete lines 544-558 (between $yearDiff = $dateToCheck[0] - $today[0]; AND $monthAdjust = 0;
Code:
// if event year < current year OR (event year is current year and event month < current month) // show no events in past if ($displayEventsInPast == 0) { // 0 = No, 1 = all, 2 = custom ($displayEventsMonthInPastCustom) if ( $yearDiff < 0 || ($yearDiff == 0 && $dateToCheck[1] < ($today[1])) ) continue; // skip it < event doesnt lie in the current month's time range ($today[1] = month e.g. 4) } if ($displayEventsInPast == 2) { if (($dateToCheck[1] < ($today[1] - $displayEventsMonthInPastCustom)) && ($dateToCheck2[1] < ($today[1] - $displayEventsMonthInPastCustom))) continue; } // show no events in future // Kontrollieren if ($displayEventsInFuture == 0) { // 0 = No, 1 = all, 2 = custom ($displayEventsMonthInFutureCustom) if ( $yearDiff > 0 || ($yearDiff == 0 && $dateToCheck[1] > ($today[1])) ) continue; // skip it < event doesnt lie in the current month's time range ($today[1] = month e.g. 4) } if ($displayEventsInFuture == 2) { if (($dateToCheck[1] > ($today[1] + $displayEventsMonthInFutureCustom)) || ($dateToCheck2[1] > ($today[1] + $displayEventsMonthInFutureCustom))) continue; } delete lines 606-614 (between $multiYearAdjust = ($eventDate[1][0] - $eventDate[0][0]) * 12; AND $i = $eventDate[0][2]; if ($eventDate[0][0] == $today[0] && $eventDate[0][1] < $today[1]) { // $today[0] = year int e.g. 2011, $today[1] = month e.g. 4 // if it's the same year and before the current month and choose DISPLAY events in past = no, set $eventDate to 1st of today's month if ( ($displayEventsInPast == 0) || ( ($displayEventsInPast == 2) && ($displayEventsMonthInPastCustom < 1)) ) { // 0 = No, 1 = all, 2 = custom $eventDate[0][1] = $today[1]; // $today[1] = month e.g. 4 $eventDate[0][2] = 1; } }

delete line 623
Code:
if ( ($displayEventsInFuture == 1) || (($displayEventsInFuture == 2) && ($displayEventsMonthInFutureCustom > 0)) ) { $event_endDay += $eventDate[1][2]; // = month e.g. 7 // Kontrollieren }

ad following new lines after $eventMonthKey = $m + $monthAdjust;
Code:
// show no event in past if ( ($displayEventsInPast == 0) || ( ($displayEventsInPast == 2) && ($displayEventsMonthInPastCustom < 1)) ) { if ( ($y < $today[0]) || ($y == $today[0] && $m < $today[1] ) ) continue; } // show custom event in past if ($displayEventsInPast == 2) { if ( (($y < $today[0]) && ($m < ($today[1] - $displayEventsMonthInPastCustom + 12))) || (($y == $today[0]) && $m < ($today[1] - $displayEventsMonthInPastCustom)) ) continue; } // show no event in future if ( ($displayEventsInFuture == 0) || (($displayEventsInFuture == 2) && ($displayEventsMonthInFutureCustom < 1)) ) { if ( ($y > $today[0]) || ($y == $today[0] && $m > $today[1] ) ) continue; } // show custom event in future if ($displayEventsInFuture == 2) { if ( (($y > $today[0]) && $m > ($today[1] + $displayEventsMonthInFutureCustom)) || (($y == $today[0]) && $m > ($today[1] + $displayEventsMonthInFutureCustom)) ) continue; } // show the event only one time (in all month) in the list layout $event_MonthKey[$i] = $eventMonthKey; if (isset($event_MonthKey[$i - 1])) { if ( ($event_catViewLayout == 1) && ($event_MonthKey[$i] == $event_MonthKey[$i - 1]) ) continue; }


thats it

Regards

Please Log in or Create an account to join the conversation.

More
11 years 2 months ago #33259 by fgossart
I will put your changes soon. Thanks

Please Log in or Create an account to join the conversation.

More
11 years 2 days ago #36374 by fgossart
When I put an event with 2 dates, start/end the event is displayed in start month, but not in end month.

Sometimes event are during more than one month or begin end month and start beginning of month+1 and are not displayed.

An idea to suggest ?

Please Log in or Create an account to join the conversation.

More
11 years 2 days ago #36375 by Rehne
Replied by Rehne on topic New events calendar template

fgossart wrote: When I put an event with 2 dates, start/end the event is displayed in start month, but not in end month.

Sometimes event are during more than one month or begin end month and start beginning of month+1 and are not displayed.

An idea to suggest ?


Hi,

i need more infos (examble with screenshots)
which layout (calendar, List ?)

which flexiversion? (with the new FC version i have not tested the template this time and maybe it needs some adjustments...)

Regards

Please Log in or Create an account to join the conversation.

More
11 years 2 days ago #36376 by fgossart
you can see in this web site
www.wormhout-tourisme.fr/index.p ... da#mai2013

sorry it's french... but you can see what I'm using
I use FC 2 latest

I could try to find and modify your code, but first just tell me if it's a bug or you didn't duplicate the event in other months views.

Please Log in or Create an account to join the conversation.

More
10 years 11 months ago #36534 by Rehne
Replied by Rehne on topic New events calendar template

fgossart wrote: you can see in this web site
www.wormhout-tourisme.fr/index.p ... da#mai2013

sorry it's french... but you can see what I'm using
I use FC 2 latest

I could try to find and modify your code, but first just tell me if it's a bug or you didn't duplicate the event in other months views.


ok i see ... mmm
unfortunately i'm just not so
preoccupied in the template (code for accordion style) ... do you understand what i mean ... my English is not so good, sorry
i would have to deal with it again ... but I just do not have time, sorry aggain

Regards

Please Log in or Create an account to join the conversation.

Moderators: vistamediajoomlacornerggppdk
Time to create page: 0.300 seconds
Save
Cookies user preferences
We use cookies to ensure you to get the best experience on our website. If you decline the use of cookies, this website may not function as expected.
Accept all
Decline all
Essential
These cookies are needed to make the website work correctly. You can not disable them.
Display
Accept
Analytics
Tools used to analyze the data to measure the effectiveness of a website and to understand how it works.
Google Analytics
Accept
Decline