Download & Extend

Add support for date parts YYYY, MM, and DD

Project:Token
Version:5.x-1.x-dev
Component:Code
Category:feature request
Priority:normal
Assigned:Unassigned
Status:closed (fixed)

Issue Summary

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.

AttachmentSizeStatusTest resultOperations
token-date.patch1.52 KBIgnored: Check issue status.NoneNone

Comments

#1

Title:Add support for YYYY, MM, and DD» Another patch

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.

AttachmentSizeStatusTest resultOperations
token-date-2.patch2.92 KBIgnored: Check issue status.NoneNone

#2

Title:Another patch» Add support for date parts YYYY, MM, and DD

Sorry for changing the title, perhaps better now?

#3

Status:active» needs review

@emok, nice update... code looks good... maybe we can get a maintainer to check it out...

#4

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.

AttachmentSizeStatusTest resultOperations
token-date-d5.patch2.92 KBIgnored: Check issue status.NoneNone

#5

Status:needs review» reviewed & tested by the community

*poke*

#6

Works great (D6), thanks for the patch. Any idea if it is possible to use the submit date of a node as a token?

#7

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!

#8

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.

#9

Seems quite reasonable to me.

#10

I applied the patch i #4 manually and it works great. (Note to self: learn to patch.)

#11

Status:reviewed & tested by the community» fixed

Committed to the D6 branch -- I'll be applying it to the D5 branch later today. Thanks!

temp

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

#12

Status:fixed» closed (fixed)

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

#13

Status:closed (fixed)» active

Did this ever get applied to the D5 branch? I don't see it there but maybe I'm overlooking something.

#14

Same question here. I'm using Drupal 5.x and I can't use node tokens (with imagefield). Has that feature been backported?

#15

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?

#16

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?

#17

Status:active» reviewed & tested by the community

*bump*
patch not committed for D5 & D6.

#18

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?

#19

Status:reviewed & tested by the community» fixed

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.

#20

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).

#21

Status:fixed» closed (fixed)

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