For better code use, we should just depend and integrate with token.module. Replacements like '@type search for @site.' done in t() (not a good way to do this kind of replacement either) could be '[search-type] search for [site-name]'. This offers a lot more flexibility for end-users.

Again, to be clear, this would add a dependency on token.module. Maybe if we don't want there to be a dependency we can only expose the text-replacement options if token module is enabled.

Comments

avpaderno’s picture

Considering that token.module is included in Drupal 7, I think that changing the code to use token.module would be something desirable. To have a dependency on token.module should not be something negative, IMO.

dave reid’s picture

Assigned: Unassigned » dave reid
Status: Active » Needs work
Issue tags: +token
StatusFileSize
new979 bytes

Here's what the actual token implementations would look like, but would need to actually use the token functions when the strings are used.

dave reid’s picture

StatusFileSize
new1.78 KB

Quick improvement that adds the current search module and keywords tokens.

avpaderno’s picture

Assigned: dave reid » avpaderno
Status: Needs work » Fixed

The code has been changed, and committed in CVS.

Status: Fixed » Closed (fixed)
Issue tags: -token

Automatically closed -- issue fixed for 2 weeks with no activity.