Hi,
änder deine Kopfzeile in folgendes ab:
PHP-Code:
<thead>
<tr>
<?php $i = 0;
$posMail = 0;
foreach ($this->thead as $col):
if ($col['link'] == 'Mail') $posMail = $i; ?>
(...)
<?php $i++;
endforeach; ?>
(...)
</tr>
</thead>
Hier wird die Spalte der Mail ermittelt um eventuelle andere Links vor einer Formatierung zu schützen.
Als nächstes musst du im tbody ebenfalls eine Laufvariable erzeugen und abfragen ob die posMail erreicht wurde. Wenn Ja, formatiere deine Ausgabe nach wunsch.
PHP-Code:
<tbody>
<?php foreach ($this->tbody as $class=>$row): ?>
(...)
<?php $i = 0; //Laufvariable
foreach ($row as $col): ?>
<td class="body <?php echo $col['class']; ?>">
(...)
<?php else:
echo ($i == $posMail && strpos($col['content'],'<a') !== false) ? substr($col['content'],0,strpos($col['content'],'>')+1).'<img src="../mail.gif"></a>' : $col['content'];
endif;?>
</td>
<?php $i++;
endforeach; ?>
(...)
<?php endforeach; ?>
</tbody>
Musst die Position natürlich nicht abfragen, läufst aber dann gefahr, dass alle Links geändert werden solange du das nicht in der .php vom EFG selber ändern willst.
Sag bescheid wenn du noch Hilfe brauchst oder weitere Fragen zu meinem Vorschlag hast
Liebe Grüße,
Patrick
PS: bin mir mit der +1 grad nicht sicher nach strpos, müsste aber stimmen ^^
Lesezeichen