bibb-theme/templates/Citation/bibb.phtml

28 lines
919 B
PHTML

<?php
// Helper for preparation of author names
$names = explode(";", $this->authors);
$nameout = '';
foreach ($names as $name) {
$lastName = explode(",", $name);
$nameout .= '<span style="font-variant: small-caps;">' .trim($lastName[0]) .'</span>, ' .trim($lastName[1]);
$nameout .= "; ";
}
if (strlen($nameout) > 2) $nameout = str_replace("::",":",substr($nameout, 0 , strlen($nameout) - 2));
if (strcmp($this->role, "edt") == 0) {
$nameout .= " (Hrsg.):";
} else{
$nameout .= "";
}
?>
<?php if (!empty($this->authors)): ?><?=$nameout?> <?php endif; ?>
<?php if (!empty($this->title)) : ?><?=$this->escapeHtml($this->title)?><?php if ($this->periodAfterTitle): ?>. <?php endif; ?><?php endif; ?>
<?php if (!empty($this->pubPlace)): ?><?=$this->escapeHtml($this->pubPlace)?> <?php endif; ?>
<?php if (!empty($this->year)): ?><?=$this->escapeHtml($this->year)?><?php endif; ?>