We need a D7 token example. Probably a matching D6 would be good, most likely taken from TOKENSTARTER, which ships with the current contrib token.

@davereid, assigning to you, since you expressed an interest.

Comments

dave reid’s picture

dave reid’s picture

Status: Active » Needs review
StatusFileSize
new6.71 KB

Initial token example. Still need to add token_example.tokens.inc.

dave reid’s picture

Ooh, I had a terrific idea on how to really demonstrate example 'tokens' by having this add a token type of 'text format' since it can also then demonstrate token chaining! Will post final version tonight!

dave reid’s picture

StatusFileSize
new13.43 KB

Ok happy to announce this is ready for final review. I'll also upload this to www.davereid.net/d7/examples/token so it can be previewed live.

dave reid’s picture

Version: » 6.x-1.x-dev
Status: Needs review » Patch (to be ported)

Committed to CVS! Working on a D6 example now.
http://drupal.org/cvs?commit=342326

rfay’s picture

Title: Create Token Example for D7 » Create Token Example for D6 (from Token STARTER?)
janar’s picture

Status: Patch (to be ported) » Needs review

#2: 724886-token-example-D7.patch queued for re-testing.

rfay’s picture

Status: Needs review » Patch (to be ported)

There is not yet a patch for D6.

slashrsm’s picture

StatusFileSize
new7.82 KB

I did some work on porting Token example to D6. Basic functionality is completed with D7 token example as a reference. There are no tests yet. Will wirte them, but I would like to get some feedback about current work first.

slashrsm’s picture

Status: Patch (to be ported) » Needs review
ilo’s picture

Status: Needs review » Needs work

Thanks so much for the submission, slashrsm.

Examples are supposed to have good descriptions for every function/aspect/topic; indications about what is required, and what is optional, why/what could be, can be, must be, and should be, and some kind of script about what is the code doing (I already did that bad the first times I submitted examples). The backport to D6 needs comments, and the code needs explanation. Some cleanup is also required, i.e. the .info file has files[] directives that are only used in D7.

Marking as NW. slashrsm, currently the issue is assigned to Dave, if you are going to make that port, please, let us know to don't do the same work twice.

Thanks again!

slashrsm’s picture

I understand. Since I am currently at the beggining with my code contributions to Drupal, I asked for feedback. Thanks for it.

I submited this patch since I saw that there was no activity for some time at this issue. I'd love to finish this if it is fine with Dave and the others, or I can also leave it to somebody else.

ilo’s picture

So, slashrsm, keep alive the issue, as long as Dave has raise a hand yet. Rfay is a little bit busy this week, and probably will be able to catch the issue in a few days, in the meantime you can do the cleanup, (pass coder module) and start digging about how to write a testcase for it.

Thanks for your help and contribution!

dave reid’s picture

Gah, I keep forgetting to make a patch for the module I have in D6, which is already completed and passes tests.

dave reid’s picture

Status: Needs work » Needs review
StatusFileSize
new11.34 KB
slashrsm’s picture

Looks fine to me.

ilo’s picture

Status: Needs review » Reviewed & tested by the community

slashrsm, try to find the differences between your patch and the one submitted by Dave, and then grab another issue :) any help is appreciated, and newcomers are very very welcome. (If you are going to work on something it is a good idea to mention first in the issue queue).

Thanks again, and sorry for this confusion :) lets go with Dave's patch this time.

rfay’s picture

Status: Reviewed & tested by the community » Fixed

Committed to DRUPAL-6-1: http://drupal.org/cvs?commit=436172

Thanks, all.

Thanks so much for your patience with this, slashrsm. We welcome your participation.

slashrsm’s picture

No problem. Will do that. I learned a lot through work on this patch, so it was defenetley not a waste of time. I will let you know before I start to code next time.

Status: Fixed » Closed (fixed)

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