anxhu
Forum Replies Created
-
Hi Tobi,
> find . -name agenda.php ./wp-content/plugins/all-in-one-event-calendar/app/view/agenda.php
Just replace code line 69 (shown by diff prefix:
>
) with the code indicated by the diff prefix<
.You’ll see the effect in the agenda view. All other views will not show a time span of zero time, i.e. “10:30 – 10:30”. I wonder if this tiny patch will be included it into the official code. There have been an update meanwhile already.
My app folder is much different. One modulo function and finally 3 lines of code. You got the food, please chew yourself… ??
There was a time
.com
was used for commerial stuff. Good luck!Strange. I made the changes I suggested as well and it works like a charm: events of the current day remain on the calendar until midnight.
If you need this for your business it might be an option for you to support the developement of an official option patch for this feature? It would be cool if there would be a checkbox for it. Since the solution is allready here professional support from the official developers should not be expensive.Advantage: the next wordpress update will not destroy those changes.
Yani.iliev might help you in this respect:
https://profiles.www.ads-software.com/users/yani.iliev/P.S. I enjoy and stronly support free and open source software but if this software is used for business it should be ok to give something back for professional support.
P.S. Just put the code of the helper function
modulo
outside the class definition, i.e. at the top ofclass-ai1ec-calendar-helper.php
, such that all other functions can use it.Then it’s just a simple code line at the locations mentioned allreday:
app/controller/class-ai1ec-calendar-controller.php: $timestamp-=modulo($timestamp,(24*60*60)); app/helper/class-ai1ec-calendar-helper.php: $now-=modulo($now,(24*60*60)); app/view/class-ai1ec-agenda-widget.php: $timestamp-=modulo($timestamp,(24*60*60));
In
app/view/class-ai1ec-agenda-widget.php
there is afunction widget
, which would need just one additional line:`
[…]
// Get localized time
$timestamp = $ai1ec_events_helper->gmt_to_local( time() );$timestamp-=modulo($timestamp,(24*60*60));
// Set $limit to the specified category/tag
[…]
`You might not need to define modulo again if it’s in the helper script allready.
Hi,
to avoid similar code it might be wise to introduce a
function gmt_to_local_morning( $timestamp )
next to
function gmt_to_local( $timestamp )
which would include subtracting the seconds of the current day.
In the
function widget
you need it before callingget_events_relative_to()
.Hi,
you were right, there is another pice of code which would need to be changed: in
app/controller/class-ai1ec-calendar-controller.php
you need to add similar code infunction get_agenda_view()
just before it callsget_events_relative_to(...)
. It should be relative to early in the morning:function get_agenda_view( $args ) { global $ai1ec_view_helper, $ai1ec_events_helper, $ai1ec_calendar_helper, $ai1ec_settings; extract( $args ); // Get localized time $timestamp = $ai1ec_events_helper->gmt_to_local( time() ); function modulo($n, $m) { $r = $n % $m; return $r < 0 ? $r + abs($m) : $r; } $s_today=modulo($timestamp,(24*60*60)); $timestamp-=$s_today; // Get events, then classify into date array
This time I did test the patch. Works 4 me. Would be nice to have all this as an option, of course…
Of course, with some appropriate modulo function:
function modulo($n, $m) { $r = $n % $m; return $r < 0 ? $r + abs($m) : $r; }
it should read:
$now=$earlymorning;
Hi,
in
app/helper/class-ai1ec-calendar-helper.php
there are some lines of code calculating
$now
for the agenda view:case 'agenda': // Find out how many event instances are between today's first // instance and the desired event's instance $now = $ai1ec_events_helper->local_to_gmt( time() );
You would have to subract the seconds went by the current day from
$now
.$s_today=modulo($now,(24*60*60));
$earlymorning=$now-$s_today;
$now=earlymorning; // just pretend all events of today will be in the futureMaybe that could be turned into an option? I was just hacking this for the widget function in
app/view/class-ai1ec-agenda-widget.php
such that todays agenda will stay the whole day and even show what was missed…I got a similar problem. If you take the patch I supplied in another post, you can specify end time equal to start time and only start time will be displayed:
Drawback is, of course, that the calendar entry does only take a small time chunc (1/2 hour) in the weekly overview. Would be cool if the calender entry bar could kind of fade out (i.g. become smaller from the left side) the more time passes.
How about creating a calender which imports all 13 calenders via
iCalendar/.ics Feed URL?@yani.iliev
Thank you guys for the excellent calender plugin. I scimmed the tickets at trac dot the-seed dot ca but couldn’t find any related to this issue reported. Sure that it’s not drowned in the crowed?
As a workaround we currently add the contact and location information to the ical description tag, although that does break the uniform look of the events.This is great news. I tried to dig into the code but got somehow lost due to the abstraction layers and a lack of PHP debugging experience.
We would, of course, provide the QA feedback. Thanks in advance!