bibb-theme/templates/Citation/bibb-bwp.phtml

32 lines
1018 B
PHTML

<?php
// Helper for preparation of author names
count($this->authors > 1) ? $names = explode(";", $this->authors) : $names[] = $this->authors .".";
$nameout = '';
foreach ($names as $name) {
$lastName = explode(",", $name);
$nameout .= '<span style="font-variant: small-caps;">' .trim($lastName[0]) .'</span>, ' .str_replace(":",".",$lastName[1]) .'; ' ;
}
$pos = strrpos($nameout, "; ");
if ($pos !== false)
$nameout = substr($nameout,0, $pos-1);
// if (strlen($nameout) > 2) $nameout .= ":";
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; ?>