WBCE CMS – Way Better Content Editing.
Du bist nicht angemeldet.
Hallo,
wie kann ich beim procalendar die vergangenen Monate und Jahre für die Besucher "unzugänglich" machen, bzw. ausblenden? - Eventuell (Luxusversion) nur 1 oder 2 Monate rückläufig zugänglich machen? Komme da jetzt nicht weiter...
VG und herzlichen Dank im Voraus!
Offline
Um zurückliegende Monate unerreichbar zu machen, ändere die /modules/procalendar/view.php wie folgt:
Füge ganz unten vor
ShowCalendar($month,$year,$actions,$section_id,false);ein:
if ($month < date("n") && $year <= date("Y")) {
$month = date("n");
$year = date("Y");
}Ändere in der functions.php, Zeile 254ff
$output = '<div class="show_calendar">';
$output .= '<table border="0" cellpadding="0" cellspacing="0" class="calendarmod" >';
$output .= ' <tr class="calendarmod-header">';
$output .= ' <td><span class="arrows"><a href="?page_id=' . $page_id . '&month=' . $month . '&year=' . ($year-1) . '" title="' . ($year-1). '">«</a></span>';
$output .= ' <span><a href="?page_id=' . $page_id . '&month=' . $prevmonth . '&year=' . $prevyear . '" title="' . $monthnames[$prevmonth] . '">‹</a></span></td>';
$output .= ' <td colspan="5" width="150">' . $monthnames[$month] . ' ' . $year . '</td>';
$output .= ' <td><span class="arrows"><a href="?page_id=' . $page_id . '&month=' . $nextmonth . '&year=' . $nextyear . '" title="' . $monthnames[$nextmonth] . '">›</a></span>';
$output .= ' <span><a href="?page_id=' . $page_id . '&month=' . $month . '&year=' . ($year+1) . '" title="' . ($year+1). '">»</a></span></td>';
$output .= ' </tr>';zu
$output = '<div class="show_calendar">';
$output .= '<table border="0" cellpadding="0" cellspacing="0" class="calendarmod" >';
$output .= ' <tr class="calendarmod-header">';
if ($month > date("n") || $year > date("Y")) {
$output .= ' <td>';
$output .= ' <span><a href="?page_id=' . $page_id . '&month=' . $prevmonth . '&year=' . $prevyear . '" title="' . $monthnames[$prevmonth] . '">‹</a></span></td>';
} else {
$output .= ' <td> </td>';
}
$output .= ' <td colspan="5" width="150">' . $monthnames[$month] . ' ' . $year . '</td>';
$output .= ' <td><span class="arrows"><a href="?page_id=' . $page_id . '&month=' . $nextmonth . '&year=' . $nextyear . '" title="' . $monthnames[$nextmonth] . '">›</a></span>';
$output .= ' <span><a href="?page_id=' . $page_id . '&month=' . $month . '&year=' . ($year+1) . '" title="' . ($year+1). '">»</a></span></td>';
$output .= ' </tr>';Das Ergebnis ist dann, dass der Jahr-Zurück-Button generell nicht angezeigt wird und der MonatZurück-Button nur in den Folgemonaten.
Deer direkte Aufruf vergangener Monate über die URL-Paramater &month=8&year=2025 o.ä. führt dann auch immer nur auf die Anzeige des aktuellen Monats.
Wir Benötigen: Cents, Euros... jetzt spenden!
Offline
Seiten: 1