Smarty Forum Index Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon.

Probleme mit {mailto}

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> Language: German
View previous topic :: View next topic  
Author Message
Eistee
Smarty Rookie


Joined: 18 Jun 2004
Posts: 10

PostPosted: Wed Jun 23, 2004 6:33 pm    Post subject: Probleme mit {mailto} Reply with quote

Hi,
ich habe ein Problem mit der {mailto}-Funktion von smarty.
Mein Code sieht wie folgt aus:
Code:

{mailto address="$row.mail" text="<img src=templates/images/mail.gif border=0 hspace=1>"}

Nun läuft bei der Ausgabe aber irgendwas falsch.
Anstelle der korrekten Adresse steht folgendes im Sourcecode:
Quote:

<a href="mailto:Array.mail" ><img src=templates/images/mail.gif border=0 hspace=1></a>


Wenn ich nun aber einfach nur {$row.mail} in das Template schreibe, so wird die richtige mail-Adresse ausgegeben.

Wo liegt der Fehler?
Back to top
View user's profile Send private message
Duncan
Smarty Pro


Joined: 16 Dec 2003
Posts: 166

PostPosted: Wed Jun 23, 2004 6:54 pm    Post subject: Re: Probleme mit {mailto} Reply with quote

Eistee wrote:
Wo liegt der Fehler?

In address="$row.mail" welches als Wert.mail ausgegeben wird wenn es in "" gesetzt wird.
Du musst entweder address=$row.mail benutzen, oder den Wert einer neuen Variable mittels assign hinzufuegen e.g.: {assign var=foo value=$row.mail} , so dass Du dann address="$foo" benutzen kannst.
Back to top
View user's profile Send private message
Eistee
Smarty Rookie


Joined: 18 Jun 2004
Posts: 10

PostPosted: Wed Jun 23, 2004 9:39 pm    Post subject: Reply with quote

Danke für deine Antwort Smile
Hab das Problem jetzt über {... address=$row.mail ...} gelöst.
Eine Frage hab ich allerdings noch.
Wenn ich jetzt noch encode="hex" in die mailto-Funktion schreibe, wird zwar die email-Adresse in hex umgewandelt, allerdings auch der HTML-Code für den Button.
Lässt sich das vielleicht irgendwie umgehen?
Back to top
View user's profile Send private message
Eistee
Smarty Rookie


Joined: 18 Jun 2004
Posts: 10

PostPosted: Thu Jun 24, 2004 8:45 am    Post subject: Reply with quote

Hab's grda nochmal mit encode="javascript" probiert - das funktioniert.
Handelt es sich hierbei evtl. um einen Bug in der mailto-Funktion... Question Exclamation
Back to top
View user's profile Send private message
messju
Administrator


Joined: 16 Apr 2003
Posts: 3336
Location: Oldenburg, Germany

PostPosted: Thu Jun 24, 2004 11:08 am    Post subject: Reply with quote

zu deiner ersten frage: lass die " weg:

Code:
{mailto address=$row.mail text="<img src=templates/images/mail.gif border=0 hspace=1>"}


wird funktionieren. ansonsten siehe:
http://smarty.php.net/manual/de/language.syntax.quotes.php

Eistee wrote:
Handelt es sich hierbei evtl. um einen Bug in der mailto-Funktion... Question Exclamation


nö. du benutzt mailto mit encode=hex einfach für etwas für das es nicht gedacht ist.
das text-attribute darf halt nur text sein und kein html.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> Language: German All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group
Protected by Anti-Spam ACP