Closed quenenni closed 11 years ago
Hey, looks good, just some issues
1) Test it without any settings in settings.json, it wont behave correctly.
2) Any author can unsubscribe anyone from a pad if they know their email, this is extremely bad practice. The subscriber should be emailed a unique ID style value that they can one click unsubscribe with :)
Thanks.
1) Indeed. I fixed it
2) You are right. I can manage to create a unique ID, to put it in the user record in the Db and send an email, but how do I get back the confirmation? Something like: http:xxxx/p/padName?unsubscribe=uniqueID
Then, in the js, get back the param and do a call to the server?
Or maybe is there a easier / better way to do that?
Unsubscribe would probably be on a new endpoint URL, the user might not want to visit the pad, it's hard to say. Parameter would work tho :)
"new endpoint url"?
You mean create another plugin for that?
no by new endpoint I mean something like http://Server.TLD/emailUnsubscribe?kjhsdkjfhsjkdhk2j3h4kj1h2kj3hscv
emailUnsubscribe sits on root.
The problem is that any service that does reverse proxying would need a specific rule for this so it might be a bad idea.
so yeah, maybe just use padURL but extend that :)
Look at how I do that in ep_rss :)
@quenenni btw for blocks of code prefix with 3 backticks and end with 3 backticks :)
Also to ensure I get an email notification from Github use @johnmclear
This branch errors on startup :\ I'm confused about these pull requests, do I need to merge in the other pull request for it to work or? Perhaps we need to spend time later on figuring this out over IRC
@JohnMcLear Thanks for the trick of the backticks.. I couldn't figure how to do it.
For the branch error on startup.. As I'm no expert with PRs, I don't really understand why there are 2 different one. But, I think that yeah, they should be merged.
@JohnMcLear Can you test with my last commits Remove the settings for the plugin and see the msg when you put an email address and try to (un)subscribe
All tabs are removed.
Your popup form is back (modified to include unsubscribe button and the 2 options)
An option were added in settings.json to choose where to show the form (info put in README).
Malformed email addresses are managed.
All css is put in the css file.