token support part 1

ray007 - May 29, 2007 - 15:47
Project:Node Auto Term [NAT]
Version:HEAD
Component:Code
Category:task
Priority:normal
Assigned:Unassigned
Status:needs work
Description

The attached little patch provides token support to generate the string for the term.
This happens on node-insert and -update.

It does not (yet) generate the terms from the pattern on sync.
It still generates a single term, and not a path hierarchy.

Comments?

AttachmentSize
nat-token-support-1.patch3.23 KB

#1

Zen - May 30, 2007 - 20:36
Status:needs review» needs work

At the risk of repeating myself, please provide a use case :) It looks very flexible, but what are you going to use it for?

I can't test the patch as the path is incorrect : "a/nat".

Thanks Ray.
-K

#2

Zen - May 30, 2007 - 20:41

I just saw your other issue. Marking that one a dupe of this.

- have checkboxes instead of select-list to be able to activate/deactivate a custom term-generation per contenttype/vocabulary
- instead of just creating a term by title have a text field for entering a category-path interpreted by the token-module

I don't understand what you mean about checkboxes being better. How?

Category path: This sounds like a good idea. I will test this patch once you re-roll it. I'd also appreciate it if you can provide an example use case and perhaps steps to test it out.

Cheers.
-K

#3

ray007 - May 30, 2007 - 22:08

The checkboxes instead of select-list are necessary if we'd like to have a pattern per node-term association. But in that case the userinterface probably needs an overhaul.

What am I going to use it for: the plan is to use node_autotitle to generate the title from several fields (you could say: combination of an ID and a subtitle), and I'd like to use the id-field to generate the term-entry.

I don't yet need the category-path right now and the patch to do that would be a bit more involved, so am postponing that for now.

I've also skipped the sync operation for now since I have no idea what you do with the node_revisions there.

And for testing the patch: please use 'patch -p1 ...' ;-)

#4

ray007 - June 21, 2007 - 12:42

Still no path-support, but should work for sync operations now too.
New patch against current head.

Ok this way?

AttachmentSize
nat-token-support-2.patch 3.9 KB

#5

ray007 - July 20, 2007 - 06:21

*Bump*

Anything wrong with the patch?

#6

Summit - November 24, 2008 - 11:34

Subscribing,
is this committed please?
Thanks a lot in advance for considering this!

greetings,
Martijn

 
 

Drupal is a registered trademark of Dries Buytaert.