Both the questions are about implementing tokens, but the first question is about Drupal 7, and the second one is about Drupal 6. The answers for the questions are completely different, as the hooks implemented by the Token module are different from the hooks used by Drupal 7 for token generation; porting a Drupal 6 module implementing tokens to Drupal 7 requires to write new code.
What should be done, in this case?
- The second question is edited to remove the Drupal version tag, and an answer is added to explain how to implement tokens in Drupal 7.
- Both the questions are kept.
Does the answer change, if the differences between Drupal versions that are relevant for the question are minimal?