We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 22574
    • 181 Posts
    My start and end dates don’t work, the only way I can get an event to show is to either not select any date in which case it adds an event on the current date, or if I put in an end date with no start date it fills up the calendar till the end of the month.

    Any ideas?

      • 22574
      • 181 Posts
      I am having some problems with Plesk/Windows server.

      Some parts have not been installed like Ditto do I need any other snippets to run Kalendar enhanced?
      Maybe a folder permission?

      Something has definitely stuffed up the dates of events.

      Hoping someone can help.
        • 40024
        • 72 Posts
        Hello! Here are a few corrections i have made in kalender_enhanced.php :
        1) (this step/solution is not mine, i found it somewhere in the modx forum) If you are having problems with the kalender displaying dates in your own languange, then locate (around line 100) this code
        // internationalization
        $locale = $lang.'_'.strtoupper($lang);
        setlocale (LC_TIME, $locale);
        and just add beneath it:
        setlocale (LC_ALL, 'el_GR.UTF-8', 'el_GR.UTF8', 'el_GR.utf-8', 'el_GR.utf8', 'greek', 'el', 'ell', 'gr', 'el_GR', 'gr_GR', 'el_GRE', 'gr_GRE', 'greece', 'hellas', 'hellenic');
        if your local languange is Greek.If you want German languange for example then you can set:
        setlocale (LC_ALL, 'de_DE');
        or for english
         setlocale (LC_ALL, 'en_US');
        2)I encountered an issue with Kalender enhanced.When i used the mouse to hover over the last event,i noticed that the tooltip repeated itself throughout the rest of the current month's days,pointing the last event(although the last event had ended). I managed to fix this problem somehow, by locating these lines of code around line 328
        for($w=0 ; $w<=6 ; $w++){ 
                                                $event = "";
        					$html = "";
        and added this line line of code:
        $tooltip = "";
        . So the final result was
        for($w=0 ; $w<=6 ; $w++){
                                               $tooltip = "";
        					$event = "";
        					$html = "";

        3)In kalender enhanced i couldn't get the tooltip to show,so all i did was to locate these lines of code:
        (around line 535)
        <td nowrap align="left" class="<? echo $cssClass; ?>">
        							<? echo $dd; ?><? echo $event; ?></td>
        and i added this line of code:
        <? echo $tooltip; ?>
        . So the final code is :
        <td nowrap align="left" class="<? echo $cssClass; ?>"<? echo $tooltip; ?>>
        							<? echo $dd; ?><? echo $event; ?></td>

        Try any change at your own risk.I don't know anything of php,although these changes worked just fine for me.Although i haven't managed to make kalender enhanced mode to show more than one event that occurs the same day(like the standard mode of kalender does).
        UPDATED! I did manage to make kalender enhanced mode to show more than one event that occurs the same day, by simply moving these lines of code:
        $tooltipTable = "<table cellpadding=0 cellspacing=0 width=100%>";
        								$tooltipTable.= "<tr><td align=\'center\' valign=\'middle\' class=\'kalender-tooltip-day\'>";
        								                                    if($dateFormat == "mdy") {
        				                $tooltipTable.= strftime("%A, %b. %d",strtotime($mm."/".$d."/".$yyyy)).", ".$yyyy;
        				                                    } else {
        				                $tooltipTable.= strftime("%A %d %b.",strtotime($mm."/".$d."/".$yyyy))." ".$yyyy;
        outside the foreach loop,and placed them between lines
        $eventHighlightClass = "kalender-event-highlight_".$highlightGroup;
        $thisMonthsEventsArray = $monthEventsArray[$d];
        							/* sort by hour							
        							$thisMonthsEventsArray = array();
        							$e = 0;
        							foreach($monthEventsArray[$d] as $monthEvent){
        								$thisMonthsEventsArray[$monthEvent["StartTime"]."_".$e] = $monthEvent;
        							$html .= "<ul>";
        [ed. note: dinpapa last edited this post 11 years, 8 months ago.]