Hallo Jan,
gerne stelle ich Dir meine Templateänderungen vor. Toll, dass Du so spontan auf die Wünsche eingehst.
ce_downloads.tpl:
HTML-Code:
<!-- indexer::stop -->
<div class="<?php echo $this->class; ?> block"<?php echo $this->cssID; ?><?php if ($this->style): ?> style="<?php echo $this->style; ?>"<?php endif; ?>>
<?php if ($this->headline): ?>
<<?php echo $this->hl; ?>><?php echo $this->headline; ?></<?php echo $this->hl; ?>>
<?php endif; ?>
<?php foreach ($this->files as $file): ?>
<?php $dlfile = substr( $file['href'], strpos( $file['href'], 'file=')+5 ); ?>
<p><img src="<?php echo $file['icon']; ?>" width="18" height="18" alt="" class="mime_icon" /> <a href="<?php echo $file['href']; ?>" title="<?php echo $file['title']; ?>" onclick="javascript:pageTracker._trackPageview('/<?php echo $dlfile; ?>');"><?php echo $file['link']; ?> <span class="size">(<?php echo $file['filesize']; ?>)</span></a></p>
<?php endforeach; ?>
</div>
<!-- indexer::continue -->
ce_download.tpl:
HTML-Code:
<?php $dlfile = substr( $this->href, strpos( $this->href, 'file=')+5 ); ?>
<!-- indexer::stop -->
<div class="<?php echo $this->class; ?> block"<?php echo $this->cssID; ?><?php if ($this->style): ?> style="<?php echo $this->style; ?>"<?php endif; ?>>
<?php if ($this->headline): ?>
<<?php echo $this->hl; ?>><?php echo $this->headline; ?></<?php echo $this->hl; ?>>
<?php endif; ?>
<img src="tl_files/skin/pdf.png" width="46" height="47" alt="<?php echo $this->title; ?>" class="mime_icon" /><a href="<?php echo $this->href; ?>" title="<?php echo $this->title; ?>" class="text" onclick="pageTracker._trackPageview('/<?php echo $dlfile; ?>');"><?php echo $this->title; ?></a><a href="<?php echo $this->href; ?>" title="<?php echo $this->title; ?>" onclick="javascript:pageTracker._trackPageview('/<?php echo $dlfile; ?>');"><img src="tl_files/skin/download.png" width="168" height="33" alt="<?php echo $this->title; ?>" /></a>
</div>
<?php endif; ?>
Der Dateiname und -pfad wird aus $this->href bzw. $file['href'] extrahiert:
Code:
<?php $dlfile = substr( $this->href, strpos( $this->href, 'file=')+5 ); ?>
und dann in den Links als OnClick-JavaScript-Event eingetragen:
Code:
onclick="pageTracker._trackPageview('/<?php echo $dlfile; ?>');"