Zum Inhalt Zur Navigation Zur Suche
Suche:Search:

Fix für <txp:link_text /> · 28 Dez 2005 von Dæn

In Textpattern 4.0.2/4.0.3 liefert das Tag <txp:link_text /> leider kein Resultat. Zusätzlich fehlte mir ein Tag <txp:link_name />, um einen Picture Link erzeugen zu können, wie in folgendem Beispiel:

<a href="<txp:link_text />">
<img src="<txp:link_description />" alt="<txp:link_name />" />
</a>
Der Link zum Bild würde dann in der Description stehen.

Lösung: Folgende Zeilen einfügen an Zeile 217 in textpattern/textpattern/publish/taghandlers.php

$out = str_replace("<txp:link_text />", doSpecial($url), $out);
$out = str_replace("<txp:link_name />", $linkname, $out);

In Textpattern 4.0.2/4.0.3 the tag <txp:link_text /> unfortunately returns no result value. In addition, I needed a tag <txp:link_name />, in order to do a picture link, like this:

<a href="<txp:link_text />">
<img src="<txp:link_description />" alt="<txp:link_name />" />
</a>
You would put the link for the picture into the description field.

Solution: Add the following lines below line 217 in textpattern/textpattern/publish/taghandlers.php

$out = str_replace("<txp:link_text />", doSpecial($url), $out);
$out = str_replace("<txp:link_name />", $linkname, $out);
  Textile-Hilfe

Vorheriger Artikel: Glaubwürdigkeit

Nächster Artikel: Slot Car Track Designs

Too cool for Internet Explorer