Closed (fixed)
Project:
Subscriptions
Version:
4.7.x-1.x-dev
Component:
User interface
Priority:
Normal
Category:
Feature request
Assigned:
Reporter:
Created:
12 Mar 2007 at 21:30 UTC
Updated:
9 Dec 2007 at 07:58 UTC
Jump to comment: Most recent file
Comments
Comment #1
mindless commentedThe email content is themable. Create yourtheme_subscriptions_mail_item_body (or _subject or _headers) function in your theme.
Comment #2
drunkenbird commentedok, well what I meant is that it would be nice if the message was configurable through the subscription settings page, especially for the drupal users that don't wish or for that matter, have much of a clue how to write code.
From a coding perspective though, It doesn't seem to me that the configuration of an email message should belong to a particular theme. I could see using that if you wanted to send out html'ized emails, but the actual message, IMHO, should not be dependent on theming code.
Anyway, just my 2 cents, thanks for replying.
Comment #3
mindless commentedBoth good points.. a simple textbox in settings could be sufficient for many people, and the only option for non-coders. Also it's likely only html emails would look like a "themed" email.
The main reason I added the themable content is the customized content for my site has additional logic.. an admin setting to change the text would not do it.
I think both options can work together though.. an admin setting with a note below it saying it's possible for a theme to override that setting.
Comment #4
liquidcms commentedi think this will do it.
Comment #5
liquidcms commentedi think this will do it.
Comment #6
mindless commentedThanks! The patch seems based on older code, but I merged it into the DRUPAL-4-7 and DRUPAL-5 branches. I also added the current text as the default settings values.
Comment #7
liquidcms commentednot sure how well this patch works that i submitted... doesn't take body token into account properly when a comment is posted and would be better to give "real" content type names for cck types rather than content_my_type.
so i have made a new patch that fixes up some of these things; but not sure how generic it is... could post it if anyone is interested.
Comment #8
jarea commentedI am interested in the new patch if you post it.
Thanks for the help - jarea
Comment #9
liquidcms commentedok, hope this works and helps.
Comment #10
jarea commentedThanks but 16 out of 22 hunks failed. Here is the reject file if that helps.
Applied against subscriptions.module,v 1.62.2.38 2007/03/09 21:19:49 mindless Exp $
Comment #11
(not verified) commentedComment #12
weird67890 commentedsorry, such question: can we hope for a 2.0 version soon where this functionality is implemented? when can this happen?
Comment #13
Dimm commented+1
Comment #14
grege commentedHi, I also want to configure the subscription email message, but because it does not have a tidy login management. People are getting the Access Denied message.
If I am auto-logged in it will take me to the post, but will not bring up the login if I'm not.
Not familiar with this coding in the module, how do I get it to ask for login in one link and not for another?
http://www.xxx.yyy/user/login?destination=node/75 ...does prompt for login then take you there, but balks if you ARE logged in already!
I'm very surprised this is not all part of the standard, I'd expect it to ask if needed, not if it doesnt... Or am I missing something?
Tks, Greg E
Comment #15
salvis#14: Indeed, Drupal 5.x does this automatically. It's not part of the functionality of the Subscriptions module.
Comment #16
grege commentedThanks for the reply Salvis, but can you be more specific - I'm not clear where I go from here.
Maybe I need to be more specific too!, so here is the problem in greater detail...
This is a very recent V5.x.1.9 install, so the code is only a few weeks old, should have all the current bits in it.
Subscriptions module is the one from Drupal as well, same version as far as I can tell, (the .info files have 2 versions mentioned, not sure which is the real one, I'm assuming the latter number.)
So:
- when you try this on your forums
1. Open browser go to forum website www.xxx.yyy.zzz and Log out from Drupal (to simulate a user not logged in)
2. Close browser
3. Open an email with a a link to a forum topic like the subs module creates
http://www.xxx.yyy.zzz/node/80
do you get access denied, or a login prompt ? I get access denied. Not handy for not-so-IT-savvy people people I am trying to persuade to use my forum! Also some may be using quite old systems and browsers and I cant assume they have a browser thats the latest revision, could be Win 95 or 98, browser, 5yrs or older.
If the subs module sent
http://www.cmc.net.nz/user/login?destination=node/75
This will prompt for a login, but fails if you have NOT logged out.
What I want is either
-2 links in the subs created email, (and I need to figure how to code that)
Or
-a way for it to work as above where irrespective of your last state of login, it asks for a login if needed, but works if you are logged in.
Help would be greatly appreciated!
Thanks , Greg
Comment #17
salvisI see — you should have opened a new thread. This thread is about the Subscriptions version that goes with Drupal 4.7, and that made me think you were using an old version of Drupal.
Apparently, you're also using some kind of access control module that protects your content from anonymous users. I happen to use Forum Access for protecting forums, and my setup works naturally the way you described, to the point where I thought it was built-in functionality. But, indeed, it requires some configuration steps:
This should do what you want. Please open a new issue in the future, unless you're really adding information specifically to an existing issue.
Comment #18
grege commentedThanks, well I couldn't tell where the login problem was, so was looking to customise the email... And this issue matched perfectly!
It does seem to have come right with just setting the 403 access denied to xxx.yyy.zzz/users/login?
Didn't do any of the other bits, think it is OK now. So I guess it was the Drupal login not happening, not subscriptions.
Ta for your help, Greg
Comment #19
salvisGlad to help.
Comment #20
shawnc commentedIf I understand correctly, a code-free solution for customizing the content/appearance of the outgoing subscription notification email is still in the works and not yet available. In the meantime, could anyone tell me what I would need to change in the code in order to include the username of the commenter in the body of the email message that gets sent?
The code makes reference to a number of variables, such as @name, @type, !url, etc. Is it just as simple as adding a similar variable reference in the body message for @[name_of_commenter]?
Thanks in advance.
Comment #21
gustav commentedShawnc, the ability to edit the email templates is provided in the 5.x-2.0 version of the subscription module. It uses the mail_edit module to provide this functionality. The 5.x-2.0 version is currently in beta 4, see http://drupal.org/node/198544. Please help testing,