Support » Plugin: Event post » Past dates in calendar

  • Resolved Arnd030

    (@arnd030)


    It would be nice to have an option to style past events differently in the calendar widget.

    I tried this patch: (Line 1684)

    
            for ($semaine = 0; $semaine <= 5; $semaine++) {   // 6 semaines par mois
                $ret.='<tr>';
                for ($journee = 0; $journee <= 6; $journee++) { // 7 jours par semaine
                    if ($NoJour > 0 && $NoJour <= $JourMax) { // si le jour est valide a afficher
                        $td = '<td class="event_post_day">';
                        if ($sqldate . '-' . ($NoJour<10?'0':'').$NoJour == $cejour) {
                            $td = '<td class="event_post_day_now">';
                        }
                        
                        if ($sqldate . '-' . ($NoJour<10?'0':'').$NoJour < $cejour)
                          $td = '<td class="event_post_day_over">'; // Patch ahf
    
                        $ret.=$td;
    
                        $ret.= $this->display_caldate(mktime(0, 0, 0, $mois, $NoJour, $annee), $cat, false, $colored, $thumbnail);
                        $ret.='</td>';
                    } else {
                        $ret.='<td></td>';
                    }
                    $NoJour ++;
                }
                $ret.='</tr>';
            }

    Seems to work.

Viewing 1 replies (of 1 total)
  • Plugin Author Bastien Ho

    (@bastho)

    Hi,

    Thank you for this idea/patch
    I’ll add something like this in the next release.

Viewing 1 replies (of 1 total)
  • You must be logged in to reply to this topic.