Loading...
 
Skip to main content

Features / Usability


Questions about Calendar

Hi

I am new to tiki, just truing to set things up.

I tried to enable Calendar feature and added events.
When I go to the calendar page as admin, when the viewmode is week, it display the events link properly under the dates. Both when I go to viewmode=month, those events are not being display. Is that any permission I need to enable to allow this?

Also, when I move the mouse over an event, the pop up says Click to Edit but if I click, I don't get to the edit screen.

When the viewmode=day, I also don't see any of the events show.

What am I doing wrong here?

my site is http://www.aliko.org/tikiQuestion . I have enable calendar view permission for unregistered user.

Thanks
...
ling

I was able to hacked the tiki-calendar.php and get viewmode=day to work.

This is the diff:

33,36d32
< $hours = range(0, 23);
< $smarty->assign('hours',$hours);
<
<
561,565c557
< if ($_SESSION'CalendarViewMode' == 'day') {
< $dday = $startOfWeek;
< } else {
< $dday = $startOfWeek + $d * $w;
< }


> $dday = $startOfWeek + $d * $w;


When viewmode=month, it seems to be showing the items on the First Sunday of the month only. 😑


Hi ling,
timezone bugs happen since many monthes. One thing sure is that your problem wasn't adressed since 1.8.1😑


hi It's me again.

I found a problem because of Daylight saying time (I am in American Central time zone).

I looked at my calendar with viewmode=week and realize the Sunday of this week is showed as April 3rd. If I set the focus to April 5, the todate value is 1081141200, and the todate value for April 3rd is 1081054800 which is 86400 less, which should be April 4th, not April 3rd.
But if I change the focus to April 4, the today shows up as 1081058400, only 82800 less than April 5th. Looks like that's the 1 hour that is missing because of DST.

Now if I change view to month, then from April 1st till April 4th, things show up alright, but for April 5th, the todate value becomes 1081058400 + 86400 which is 1081144800.
That's why I guess non of the events after April 4th shows up under my Month view.

Is this already fixed in version 1.8.2? I guess we can't rely on using 86400 to add or subtract days or week?

thanks
...
ling

This is my workaround for now. Changed all reference to $d to use mktime. Work for me at least and to solve those problems I mentioned initially.


33,36d32
< $hours = range(0, 23);
< $smarty->assign('hours',$hours);
<
<
453c449
< //$d = 60 * 60 * 24;


> $d = 60 * 60 * 24;
465c461
< $viewstart = mktime(0,0,0,$focus_month, date('d',$viewstart)-$TmpWeekday, $focus_year);


> $viewstart -= $TmpWeekday * $d;
469,470c465,466
< $viewend = mktime(0,0,0,date('m',$viewend), date('d',$viewend)+(6-$TmpWeekday), date('y',$viewend)) - 1;
< // $viewend -= 1;


> $viewend += (6 - $TmpWeekday) * $d;
> $viewend -= 1;
472c468
< $firstweek = date("W", mktime(0,0,0,date('m',$viewstart),date('d',$viewstar
t)+1,date('y',$viewstart)));


> $firstweek = date("W", $viewstart + $d);
487c483,484
< $viewstart = mktime(0,0,0,$focus_month, date('d',$viewstart)-$wd, $focus_year);


> // then back up to the preceding Sunday;
> $viewstart -= $wd * $d;
489c486
< $viewend = mktime(0,0,0,$focus_month, date('d',$viewstart) + 7, date('y',$viewstart));


> $viewend = $viewstart + ((7 * $d) - 1);
495c492
< $viewend = mktime(0,0,0,date('m',$viewstart),date('d',$viewstart)+1,date('y
',$viewstart)) - 1;


> $viewend = $viewstart + ($d - 1);
523,529c520,526
< tra("Sun"),
< tra("Mon"),
< tra("Tue"),
< tra("Wed"),
< tra("Thu"),
< tra("Fri"),
< tra("Sat")


> tra("Sunday"),
> tra("Monday"),
> tra("Tuesday"),
> tra("Wednesday"),
> tra("Thursday"),
> tra("Friday"),
> tra("Saturday")
556c553
< $startOfWeek = mktime(0,0,0,date('m',$viewstart),date('d',$viewstart)+($i

  • 7),date('y',$viewstart));

> $startOfWeek = $viewstart + $i * weekInSeconds;
560,564c557
< if ($_SESSION'CalendarViewMode' == 'day') {
< $dday = $startOfWeek;
< } else {
< $dday = mktime(0,0,0,date('m',$startOfWeek),date('d',$st
artOfWeek)+ $w,date('y',$startOfWeek));
< }


> $dday = $startOfWeek + $d * $w;


This is my workaround for now. Changed all reference to $d to use mktime. Work for me at least and to solve those problems I mentioned initially.


33,36d32
< $hours = range(0, 23);
< $smarty->assign('hours',$hours);
<
<
453c449
< //$d = 60 * 60 * 24;


> $d = 60 * 60 * 24;
465c461
< $viewstart = mktime(0,0,0,$focus_month, date('d',$viewstart)-$TmpWeekday, $focus_year);


> $viewstart -= $TmpWeekday * $d;
469,470c465,466
< $viewend = mktime(0,0,0,date('m',$viewend), date('d',$viewend)+(6-$TmpWeekday), date('y',$viewend)) - 1;
< // $viewend -= 1;


> $viewend += (6 - $TmpWeekday) * $d;
> $viewend -= 1;
472c468
< $firstweek = date("W", mktime(0,0,0,date('m',$viewstart),date('d',$viewstar
t)+1,date('y',$viewstart)));


> $firstweek = date("W", $viewstart + $d);
487c483,484
< $viewstart = mktime(0,0,0,$focus_month, date('d',$viewstart)-$wd, $focus_year);


> // then back up to the preceding Sunday;
> $viewstart -= $wd * $d;
489c486
< $viewend = mktime(0,0,0,$focus_month, date('d',$viewstart) + 7, date('y',$viewstart));


> $viewend = $viewstart + ((7 * $d) - 1);
495c492
< $viewend = mktime(0,0,0,date('m',$viewstart),date('d',$viewstart)+1,date('y
',$viewstart)) - 1;


> $viewend = $viewstart + ($d - 1);
523,529c520,526
< tra("Sun"),
< tra("Mon"),
< tra("Tue"),
< tra("Wed"),
< tra("Thu"),
< tra("Fri"),
< tra("Sat")


> tra("Sunday"),
> tra("Monday"),
> tra("Tuesday"),
> tra("Wednesday"),
> tra("Thursday"),
> tra("Friday"),
> tra("Saturday")
556c553
< $startOfWeek = mktime(0,0,0,date('m',$viewstart),date('d',$viewstart)+($i

  • 7),date('y',$viewstart));

> $startOfWeek = $viewstart + $i * weekInSeconds;
560,564c557
< if ($_SESSION'CalendarViewMode' == 'day') {
< $dday = $startOfWeek;
< } else {
< $dday = mktime(0,0,0,date('m',$startOfWeek),date('d',$st
artOfWeek)+ $w,date('y',$startOfWeek));
< }


> $dday = $startOfWeek + $d * $w;


Aliko,

Rest assured, you're not doing anything wrong - the tiki calendar has a few bugs that still need to be fixed. Here are the changes that I've made to the Tiki calendar that addresses the same issues. (I'm using tiki-1.8) I've attached the fixes as a text file to preserve formatting and meta-characters.

One issue I'm still trying to resolve: When clicking on an event to edit, it appears nothing is happening. In reality, the "Events Panel" does change, but it's not automatically activated. Clicking on the "Events Panel" link does show the edit box. This seems to be a javascript cookie thing, but I have quite figured out how to reset the cookie to activate the panel. If anyone else has fixed this, please let us in on the secret!

-Mitch