The best time to register for DrupalCon Dublin is now. Earlybird discounts end July 29.
It would be great for a lot of different reasons to have YYYY, MM, and DD available as tokens... File's for one could benefit.
I agree. But I had previously implemented this using the same kind of date tokens as in token_node.inc, which I think is better than having two different sets of date tokens (you used uppercase letters).
Attached pach applies to version 6.x-1.10, but with adjusted line numbers the same patch works for the 5.x-version.
The help texts about the new tokens (e.g. [site-date-yyyy]) do not appear in pathauto where I use them, but they work if you try to use them.
Sorry for changing the title, perhaps better now?
@emok, nice update... code looks good... maybe we can get a maintainer to check it out...
I applied the patch to the 5.x-version of token.module (5.x patch attached). I tried the new date tokens with the filefield.module, to create a /files/yyyy/mm/ directory structure. Works great.
Works great (D6), thanks for the patch. Any idea if it is possible to use the submit date of a node as a token?
Tested (with token 5.x-1.11) and support the patch.
It's lovely when you think your going to have to write something and you find someone has done it already - cheers!
marking this for commit later -- I'll run it by greggles too, but these make sense and they're good ones to use for directory building,etc.
Seems quite reasonable to me.
I applied the patch i #4 manually and it works great. (Note to self: learn to patch.)
Committed to the D6 branch -- I'll be applying it to the D5 branch later today. Thanks!
Automatically closed -- issue fixed for two weeks with no activity.
Did this ever get applied to the D5 branch? I don't see it there but maybe I'm overlooking something.
Same question here. I'm using Drupal 5.x and I can't use node tokens (with imagefield). Has that feature been backported?
Ok, answering my own question: I reviewed the 5.x-1.11 version's code and also the 5.x-1.x-dev version's code and found that the patch from #4 hasn't been committed. I also tested the patch against 5.x-1.11 and it seems to work without any problems.
Is there anything that keeps the patch from being committed?
Since more than half a year there is a patch for the 5.x version that works but hasn't been committed. Is there any reason for that?
patch not committed for D5 & D6.
Bumping this again after three weeks without an answer. Could somebody at least say why the patch still hasn't been comitted for 5.x-1.x?
Thanks @emok and @brunodbo. Now committed to 5.x as well http://drupal.org/cvs?commit=195330
@ckng - the patch is committed to 6.x (see here). It is not in HEAD because eaton prefers not to use HEAD.
@yan - lack of round tuits. You could help increase the number of round tuits by cleaning up the duplicates and support requests in issue queue.
Thanks greggles! I'll see what I can do to help out the next time. My problem was that I didn't even know why the patch hadn't been comitted (and I don't know much about developement processes).
Automatically closed -- issue fixed for 2 weeks with no activity.
Drupal is a registered trademark of Dries Buytaert.