(Better) Token integration

alippai - August 7, 2009 - 12:04
Project:Content Profile
Version:6.x-1.x-dev
Component:Miscellaneous
Category:feature request
Priority:normal
Assigned:alippai
Status:closed
Issue tags:token
Description

This small module makes content profile fields available as user tokens. E.g.: you can use 'real name' or 'address' as tokens in other modules. (in my case activity module)

AttachmentSize
cp_tokens.tar_.gz1.49 KB

#1

alippai - August 10, 2009 - 14:22
Status:active» needs review

Fixed the "namespace", added the dependencies and package to the .info file.

AttachmentSize
content_profile_tokens.zip 1.22 KB

#2

fago - August 14, 2009 - 08:49
Status:needs review» needs work

hm, for sure we can't ship with that in the base module, as it has a significant impact on performance, but it would make sense to add it as extension module. However for that it would need more polishing - as of now I think it would have problems with some cck fields like user references. Perhaps it could reuse the information about the available cck or node tokens somehow. Also it should do something about preventing token loops (user -> node -> user.. ?)

#3

alippai - August 25, 2009 - 12:21
Status:needs work» needs review

So it has support for text and number, single value fields. Added support for flag friends module - content profile tokens for requested and requestee.

AttachmentSize
content_profile_tokens.tar_.gz 1.06 KB

#4

alippai - August 26, 2009 - 13:32
Assigned to:Anonymous» alippai

#5

fago - September 15, 2009 - 14:59
Status:needs review» needs work

What about my comments from #2?

#6

fago - September 16, 2009 - 11:53
Status:needs work» needs review

Got your irc message, I see it'S restricted to numbers and textfields now. So it should be fine.

-> I added in to the module and mentioned it in the README. I fixed some coding style issues and also noted that it didn't use 'user' as typen when doing the replacements. I've no time to test this right now, so I'm attaching the proposed changes. -> Testers needed!

@alippai: I removed your @author comment as with the time also others contribute to the module, but I mentioned you in the README as original author. Is it ok that way?

AttachmentSize
content_profile_tokens.patch 6.47 KB

#7

fago - September 16, 2009 - 11:53

oh and I fixed the module to depend on 'content' too.

#8

Arto - October 1, 2009 - 03:38
Status:needs review» reviewed & tested by the community

The patch in #6 works fine, at least for our purposes: it is exactly what we needed to get Content Profile fields output as part of RSS feeds using the RDF module. Many thanks, Adam and Wolfgang.

#9

fago - November 3, 2009 - 14:21
Status:reviewed & tested by the community» fixed

alippai told me on IRC that it's fine that way -> committed, thanks!

#10

System Message - November 17, 2009 - 14:30
Status:fixed» closed

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

 
 

Drupal is a registered trademark of Dries Buytaert.