
Is there a way to display it like:
Date Titele (and/or link)
(Number of Days left)
and to highlight the dates?
like:
07.08. New Release of SX
(5 Days left)
09.08. Whatever
(7 Days left)
...
?
______________________
MARC

Code: Select all
(' . $days . ' ' . DAYS . ')'Code: Select all
(' . $days . ' ' . DAYS . ')'Code: Select all
<br>(' . $days . ' ' . DAYS . ')'Code: Select all
<SPAN CLASS="mc_date">25.05</SPAN> - <A HREF="">asdf</A> <SPAN CLASS="mc_interval">(53 days)</SPAN>Code: Select all
container_serendipity_plugin_mycalendar .mc_date { font-weight: bold; }
container_serendipity_plugin_mycalendar .mc_interval { white-space: nowrap; }Code: Select all
diff -ruN cvspatch2/serendipity_plugin_mycalendar.php cvspatch3/serendipity_plugin_mycalendar.php
--- cvspatch2/serendipity_plugin_mycalendar.php 2005-08-04 10:49:18.000000000 +0200
+++ cvspatch3/serendipity_plugin_mycalendar.php 2005-08-04 11:00:56.000000000 +0200
@@ -112,10 +112,18 @@
$days = ceil(($item['eventdate'] - $ts) / 86400);
if ($days > -$showtime) {
- echo serendipity_strftime($this->get_config('datefm'), $item['eventdate'], false) .
- ' - ' . $cont .
- ($days > 0 ? ' (' . $days . ' ' . DAYS . ')' : '') .
- '<br />';
+ $cont = '<span class="mc_date">' . serendipity_strftime($this->get_config('datefm'), $item['eventdate'], false) . '</span>' .
+ ' - ' . $cont;
+
+ if ($days > 0) {
+ $cont = '<span class="mc_future">' . $cont . ' <span class="mc_interval">(' . $days . ' ' . DAYS . ')</span>';
+ } elseif ($days == 0) {
+ $cont = '<span class="mc_current">' . $cont;
+ } else {
+ $cont = '<span class="mc_past">' . $cont;
+ }
+
+ echo $cont . '</span><br />';
} elseif ($autoprune) {
serendipity_db_query("DELETE FROM {$serendipity['dbPrefix']}mycalendar WHERE eventdate < ". ($ts - $showtime*24*60*60));
$autoprune = false;Code: Select all
.container_serendipity_plugin_mycalendar .mc_past { color: #888; }
.container_serendipity_plugin_mycalendar .mc_current { text-decoration: blink; color: #F00; font-weight: bold; }
.container_serendipity_plugin_mycalendar .mc_future { font-style:italic; }
.container_serendipity_plugin_mycalendar .mc_date { font-weight: bold; }
.container_serendipity_plugin_mycalendar .mc_interval { white-space: nowrap; }