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

Moshe Weitzman weitzman at tejasa.com
Wed Dec 6 13:29:02 UTC 2006

Bèr Kessels wrote:
> Hi,
> new-user-emails, welcome-mails, pathauto, newsletters, themes, auto_nodetitles 
> and so on.
>  Just a few random examples of token-replacement. Drupal has nothing in this 
> regards, every module on its own, resulting in a lot of code-overhead, 
> inconsistency and all the other downsides of not having a central/modular 
> design.
> Are there any projects on this? Any APIs, libraries, or exsisting modules that 
> do what I need: centralise token replacement? Or even an existing patch or 
> issue that I missed?
> What  need, more specific, is:
> * Present the user/admin with a list of available tokens (%username, %site 
> etc) in a help message.
> * Parse these by replacing tokens with the value of a variable.

if you look at those implementations, there are very few lines of code. i'm 
not even sure it is worth centralizing. strtr() does all the work ... feel 
free though to organize a working group and write a DEP specifying an API 
with forward and backward compatibility requirements to be implemented in 

More information about the development mailing list