Habe noch einige Funktionen hinzugefügt. So wird nun über $this->recurrences+1 die Anzahl der gesamten Termine mit ausgegeben.
PHP-Code:
<p class="info">
<?php
// Verhindert doppelte Datumsausgabe bei $this->recurring
if (!$this->recurring): ?>
<?php
// Für ungenaue Termine (Juni 2011)
if (strpos($this->class, 'future' )): ?>
<?php $this->span = ucfirst($this->parseDate("F Y", $this->startDate)); ?>
<?php $this->date = $this->span; ?>
<?php endif; ?>
<?php
// Vollständige Datums- und Zeitausgabe
echo $this->date; ?>
<?php endif; ?>
<?php if ($this->recurring): ?>
<?php echo $this->parseDate('d.m.Y', $this->startDate).' - '; ?>
<?php echo $this->parseDate('d.m.Y', $this->endDate).' '; ?>
<?php echo '('; ?>
<?php echo $this->recurrences+1; ?>
<?php echo 'x '; ?>
<?php echo $this->parseDate('l\s', $this->startDate); ?>
<?php echo $this->addTime == 1 ? $this->parseDate('\, H:i \-', $this->startTime) : ''; ?>
<?php echo $this->addTime == 1 ? $this->parseDate(' H:i \U\h\r\)', $this->endTime) : ')'; ?>
<?php endif; ?>
</p>
Kann mir jemand vielleicht sagen, wie ich die Zeilen
PHP-Code:
<?php echo '('; ?>
<?php echo $this->recurrences+1; ?>
<?php echo 'x '; ?>
<?php echo $this->parseDate('l\s', $this->startDate); ?>
ein bisschen kompakter gestalten kann? Im Grunde soll da am Ende stehen "(5x Mittwochs, 09:00 - 12:00 Uhr).
Lesezeichen