Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
As title says. We should be using the token module for the tag replacement in the email bodies. This will reduce the amount of code in comment_notify and increase the features for users.
Comment | File | Size | Author |
---|---|---|---|
#17 | comment_notify-theme_username-support-273112-14.patch | 2.51 KB | anniegreens |
#14 | comment_notify-theme_username-support-273112-14.patch | 2.56 KB | anniegreens |
Comments
Comment #1
gregglesThis is surprisingly more complex than I thought. Some of the things we need don't have tokens. It will also take multiple calls to token_replace to get this done.
I'm tempted to postpone it and make it 6.x only...
Comment #2
gregglesYeah, 6.x only.
Comment #3
gregglesWhat the heck - subject too.
Comment #4
Dries CreditAttribution: Dries commentedI'd like to get this module included into Drupal core. Creating a dependency on token module is likely to complicate that.
Looking at the code of this module, I don't see a strong need to use token module. The code is easy to read and understand as it is.
Comment #5
Freso CreditAttribution: Freso commentedI know that's an old comment of yours, Dries, but IIRC, we came to the conclusion that we were going to work on getting Token into core as well? No? So that shouldn't be a problem anymore, should it? Quite the contrary, I would guess, as it would presumably lead to more code re-use.
Comment #6
gregglesThe 7.x version now uses tokens. I don't think it's worth backporting that.
Comment #8
NancyDruConsidering #595508 and #173979 for starters, I'd say there is interest other than mine for Tokens in 6.x.
We have a highly customized site that uses, amongst other modules, RealName and really need to use the RealName values in the email rather than the standard username (which is numeric, e.g. "967321", and therefore useless to the recipients).
If you did some prior work and still have it, I will be happy to try to finish it.
Comment #9
gregglesI don't have any work on this.
Comment #10
NancyDruOkay.
Comment #11
webwriter CreditAttribution: webwriter commentedSubscribe for 6.x
Comment #12
YK85 CreditAttribution: YK85 commentedsubscribing - I'm kind of having trouble with title token as well.
I'm using node comments module and trying to show the title of the thread which the nodecomment is a comment of.
Thank you
Comment #13
gregglesI'm no longer adding features to the 6.x version and the 7.x version already has this.
Comment #14
anniegreens CreditAttribution: anniegreens commentedFor anyone who wants Realname support, or support for any other module that modifies theme_username, I've created a little patch for the D6 version similar to how support was added to the Print module (http://drupal.org/node/572848).
Comment #15
gregglesThis looks close to me, but the check_plain seems inappropriate. For emails it's not neccessary/appropriate to escape html entities. If you can fix this I'd be happy to commit it.
Comment #16
gregglesGiven that the purpose is different, updating title.
Comment #17
anniegreens CreditAttribution: anniegreens commentedAttached is updated patch without check_plain.
Comment #18
gregglesThanks, anniegreens!
Anyone able to test?