Use the php filter to understand drupal token
It is useful if we could place each user's image into their own directories, this handling is usually implmented with dynamic path using the drupal token module.
We could use some macro like [user-name] in the directory and it will be replaced at the time of execution by the real name of the login user.
In order to understand the token module, might be the best way is to use it and see for yourself.
Token module is actually a set of API that we could use, to test the token api, first we should configure drupal to be able to execute php, the easiest way to do this is to configure the php filter which could execute php scripts in the content directly.
Configure PHP filter
Although php filter has been placed in the core of drupal 6.x, It is disabled by default, We must enable it before using the php filter.
- Go to 'Site building->Modules' to enable the 'php filter' module(you might have to install it firstly.)
- Go to 'Site configuration->Input formats' , make sure the 'PHP code' in list.

Use php filter to test the Token
- Create one new content and select the input format 'PHP code'

- Now you could test it in your content by entering:

- The output will list some of the predefined token we could use

Drupal token module has been the foudation for many drupal functionality, all of the 'Dynamic path' is based on this module, It is a great module that we should all try to understand for better drupal website design!
