Hi,
I use the FILEFIELD MODULE that create a TOKEN with the url of the file atached to a node. (new node is send by email with RULE MODULE)
When there is no file attached to a new node, the token is visible. For example, [FIELD_FILE_EXAMPLE_CCK].
Is it possible to hide the token when it is empty ?
In a first time I have published this bug in the issues of the token module; but the developers tell me that it's the filefield path module that must be modified :
"The 6.x-1.x code has supported calling code using the $options['clear'] = TRUE parameter to remove un-replaced tokens."
Can you help me ?
Thanks.
Comment | File | Size | Author |
---|---|---|---|
#1 | filefield_paths_process_file-1091688-1-D6.patch | 1.14 KB | pillarsdotnet |
Comments
Comment #1
pillarsdotnet CreditAttribution: pillarsdotnet commentedThe 6.x-1.x branch of the Filefield Paths module does not call the token_replace() function.
The 6.x-2.x branch does call token_replace, however.
patch attached.
Comment #2
vstmusic CreditAttribution: vstmusic commentedMust I first download and install the 6.x-2.x branch before to apply your patch ? Or can I apply the patch on the 6.1.4 version of the module ?
If so, I don't see the 6.x.-2.x version of the module on the module page.
thanks for your help.
Comment #3
pillarsdotnet CreditAttribution: pillarsdotnet commentedThe 6.x-1.x version does not call token_replace() so cannot fix your problem.
It is possible that the 6.x-2.x version will not fix your problem, either. But if you want to try it, here is a download link:
http://drupalcode.org/project/filefield_paths.git/snapshot/refs/heads/6....
Comment #4
ajacksontcba CreditAttribution: ajacksontcba commentedYou can try using the token_custom module and define a token that returns an empty string if no file is attached.
Comment #5
hass CreditAttribution: hass commentedCodewise correct.
Comment #6
Deciphered CreditAttribution: Deciphered at Realityloop commentedWhile I did want to review and consider committing this, I have made the decision that there will be no further D6 development, at least by myself. Sorry.