Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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)
Comment | File | Size | Author |
---|---|---|---|
#6 | content_profile_tokens.patch | 6.47 KB | fago |
#3 | content_profile_tokens.tar_.gz | 1.06 KB | alippai |
#1 | content_profile_tokens.zip | 1.22 KB | alippai |
cp_tokens.tar_.gz | 1.49 KB | alippai |
Comments
Comment #1
alippai CreditAttribution: alippai commentedFixed the "namespace", added the dependencies and package to the .info file.
Comment #2
fagohm, 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.. ?)
Comment #3
alippai CreditAttribution: alippai commentedSo it has support for text and number, single value fields. Added support for flag friends module - content profile tokens for requested and requestee.
Comment #4
alippai CreditAttribution: alippai commentedComment #5
fagoWhat about my comments from #2?
Comment #6
fagoGot 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?
Comment #7
fagooh and I fixed the module to depend on 'content' too.
Comment #8
Arto CreditAttribution: Arto commentedThe 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.
Comment #9
fagoalippai told me on IRC that it's fine that way -> committed, thanks!
Comment #11
Heihachi88 CreditAttribution: Heihachi88 commentedSorry for hijacking this thread again. But what to do if i want content profile title field as token?