| Project: | Comment notify |
| Version: | 6.x-1.4 |
| Component: | User interface |
| Category: | feature request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed (won't fix) |
Issue Summary
Hi again,
It would be great if we could add a variable called !commentteaser that could then be added to the notification emails. This would be (of course) a teaser of the comment itself, with the idea that if the user is presented with a teaser, they are more likely to click-through and go to the page itself. Currently you just get a message that says "You have a new comment" with no indication of what it is, and you might not be inclined to click-through.
It would also be sweet if you could set a limit to the number of characters for the teaser. For example, the admin could set the number of characters to "55" for the comment teaser.
Not sure how much desire there is for this feature, although I might be pleasantly surprised. Thanks again for this awesome module, which is indispensable in my opinion.
Comments
#1
Am I the only one who desires this feature?
#2
I would also appreciate this feature as well. +1
#3
I'm interested but not volunteering to write it so not sure how much good another +1 is. :)
For me, I'd like enough there to get people curious but not so much that they just read the whole thing in their email and don't bother clicking through. So a shortened version would be great.
Michelle
#4
Yeah, that's exactly the reason I'd want it for too... to pique the user's curiosity, for them to ultimately click through to the site....
#5
For 7.x this is now possible by creating a token using the token system. For 6.x I don't plan to work on this and am therefore marking it "by design" but if someone else provided a patch I would consider applying it.
#6
Here is a patch against 6x-1.4 that summarizes the hack I have been using. This creates a new variable called !commteaser which is a 50-character teaser of the new comment, which can then be used in the email templates. It also adds the description below the template form in the admin screen. So far it has been working successfully on my site.
Before anyone rips on the bad coding or standards, please understand that I am NOT a PHP programmer and this is absolutely my first effort ever at trying to create a patch. I followed the instructions at http://drupal.org/patch/create but I am fully aware that my code probably sucks and needs work (with the exception of the truncate function which I didn't write). Please understand that I am trying to give back to the Drupal community that has given me so much already.
That said, if it can be improved, please definitely edit and re-roll as needed. I welcome any help.
Thanks!
#7
6.x is closed to features and this is already possible in Drupal 7 using tokens (or at least it doesn't require this module to provide it...).
#8
By the way, the patch code looked pretty close. Be careful on using spaces instead of tabs and that Drupal variables should contain and underscore instead of being concatenated together.
#9
Roger that, thanks greggles!