[consulting] how to create token and use them in form text area

Travis Carden travis.carden at gmail.com
Thu Jun 17 17:09:16 UTC 2010


You aren't just asking how to display a token in a node body, are you?
Because if that's all you want, you can just use Token
Filter<http://drupal.org/project/token_filter>module.


On Thu, Jun 17, 2010 at 10:31 AM, Bhavin Joshi <bhavinjosi at joshics.in>wrote:

> You can create your own token but you have to write a function or few
> lines of code to replace them with the original values.
> Like, you have to replace the values using t(<string>, array(tokens));
> I use the same technique in some of my contributed modules.
>
> Regards.
>
> 2010/6/17 sidharth relhan <sidhartharelhan at gmail.com>
> >
> > Hello!!
> > I stuck with a problem in creating and using token.
> > I think that it is create using function hook_token_value()
> > and using token_replace() function it replace variable but how to use
> token in the body
> > Example of creating token
> >
> > As in view they are called like [user].
> > How to call them in the normal body if they are defined global.
> > _______________________________________________
> > consulting mailing list
> > consulting at drupal.org
> > http://lists.drupal.org/mailman/listinfo/consulting
> >
>
>
>
> --
> Bhavin H. Joshi
> Mobile: +91 999 886 0979
> Skype: bhavinjoshi19
> google: bhavinjosi at joshics.in
> Web: http://joshics.in
> Get your tiny URL: http://ly2.in
> Portfolio: http://sites.google.com/site/bhavinhjoshi/portfolio
> _______________________________________________
> consulting mailing list
> consulting at drupal.org
> http://lists.drupal.org/mailman/listinfo/consulting
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.drupal.org/pipermail/consulting/attachments/20100617/4f1453bb/attachment.html 


More information about the consulting mailing list