Download & Extend

Provide realname support in the existing token system

Project:Comment notify
Version:6.x-1.x-dev
Component:Code
Category:feature request
Priority:normal
Assigned:Unassigned
Status:needs review

Issue Summary

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.

Comments

#1

Version:5.x-1.x-dev» 5.x-2.x-dev

This 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...

#2

Version:5.x-2.x-dev» 7.x-1.x-dev

Yeah, 6.x only.

#3

Title:Use token module for the email body» Use token module for the email body and subject

What the heck - subject too.

#4

I'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.

#5

I 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.

#6

Status:active» fixed

The 7.x version now uses tokens. I don't think it's worth backporting that.

#7

Status:fixed» closed (fixed)

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

#8

Status:closed (fixed)» active

Considering #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.

#9

Version:7.x-1.x-dev» 6.x-1.x-dev

I don't have any work on this.

#10

Okay.

#11

Subscribe for 6.x

#12

subscribing - 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

#13

Status:active» closed (works as designed)

I'm no longer adding features to the 6.x version and the 7.x version already has this.

#14

For 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).

AttachmentSize
comment_notify-theme_username-support-273112-14.patch 2.56 KB

#15

Status:closed (works as designed)» needs work

This 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.

#16

Title:Use token module for the email body and subject» Provide realname support in the existing token system

Given that the purpose is different, updating title.

#17

Attached is updated patch without check_plain.

AttachmentSize
comment_notify-theme_username-support-273112-14.patch 2.51 KB

#18

Status:needs work» needs review

Thanks, anniegreens!

Anyone able to test?