Provide token for flag note
rhache - August 14, 2009 - 12:54
| Project: | Flag Note |
| Version: | 6.x-1.x-dev |
| Component: | Code |
| Category: | feature request |
| Priority: | normal |
| Assigned: | gunzip |
| Status: | closed |
Jump to:
Description
It would be really nice if a token existed for flag note, especially for use with rules.
Sincerely,
Rene

#1
interesting, i will look at this.
#2
gunzip,
Just to give you a bit more info as why I want this, I think would be cool to be able to create a rule that sends an email to to someone whenever a flag note is created.
That way, you could have an "Ask a Question" flag, and specific users could be notified immediately.
I've tried using the tokenSTARTER module, but so far I've had no luck given my pretty rudimentary php coding skills.
Sincerely,
Rene
#3
+1
#4
can you please make an example use case ? thank you.
#5
#6
an example use case is when I want to fire a "send a tokenised email" action, that sends the note to the recipient email once an item is flagged.
#7
do you mean, you want to manually type tokens into the flag note like [node-title] etc ?
#8
I just want to include the flag note into action's email body, something like [flag:note]
#9
Just to expand on rgeorgy explanation, the reason I made the feature request is so that once a flag note was added to a node, that I could inform users of that note via email or some other method.
For example, you could use Flag Notes to track issues on nodes, and immediately notify all users of a particular role a what needs to be fixed.
Thanks,
Rene
#10
committed to -dev. now there's a [flag-note] token in the "sending tokenized email" flag action. can you confirm that this works well ?
#11
Hi gunzip,
I tested with Rules, since that's the scenario I'm interested in.
However, I cannot see [flag-note] as one of the token items I can use.
I should point out that I'm not familiar with how to use actions with core, for which this might work fine.
Sincerely,
Rene
#12
sorry there was a small typo, in line 454 you have to put:
if ($type == 'flag')instead of
if ($type == 'flag-action')(committed to dev).
Can you try then? Thank you.
#13
Seems to work so far, for me. Thanks.
#14
#15
Hi gunzip,
Just tested it and confirming that this does also work for me.
Very very sweet.
Thanks,
Rene
#16
Automatically closed -- issue fixed for 2 weeks with no activity.