[development] General token parser (API), does it exist?

Gabor Hojtsy gabor at hojtsy.hu
Wed Dec 6 21:35:14 UTC 2006


On Wed, 6 Dec 2006, Steven Wittens wrote:
> I think we perhaps do need to look at a way of using e.g. PHP code in these 
> welcome mail-like strings. That way, you can use arbitrary code to retrieve 
> any value you need. You could even make it backwards compatible:
>
> $text = strtr(drupal_eval($text), array('%token' => ...));
>
> if no <?php ?> tags are used, it reverts to simple strtr() replacement.

IMHO it is a very bad idea to expose PHP here (even if it is not 
required).

Gabor


More information about the development mailing list