Customizing email notifications when someone added a comment to a file - plone

I'd like to customize the text sent from the default Comment action of Plone, especially the link sent when someone comments on a file. Current behavior is that the link launches the file itself. The behavior I'd like to see is to take the reader to be able to see the comment entered.
I've been trying to find the template script for the message via both ZMI and the Zope file system but couldn't locate the message template.
.... Example of Default Message ....
Someone added a comment on your File:
Test.
If you are the author of this item, we recommend that you read the comment,
and update the documentation accordingly if required - then remove the comment.
If further clarification is needed, reply to the comment, and the person who
made the comment will get a notification like this, and will likely give you
more details.
To view the new comment, visit:
http://bestkey.middlewaygroup.com/products/Test.ppt
--
Site Administrator

You might want to have a look at plone.app.discussion which is the new commenting system for Plone 4.1 and also available as an add-on product for Plone 3.3.
With p.a.discussion you can register a custom event subscriber that is fired when a new comment is added:
<subscriber
for="plone.app.discussion.interfaces.IComment
zope.app.container.interfaces.IObjectAddedEvent"
handler=".mycustomsubscriber.notify_user"
/>
You have to put a "notify_user" function inside a "mycustomsubscriber.py" file which can contain arbitrary Python code that sends a custom email.
See http://svn.plone.org/svn/plone/plone.app.discussion/trunk/plone/app/discussion/notifications.zcml and http://svn.plone.org/svn/plone/plone.app.discussion/trunk/plone/app/discussion/comment.py for examples.
If the old Plone commenting system comments provide an interface like IComment it should work similarly. Though, I think it does not provide such an interface, but I'm not 100% sure.

The module you are looking for is:
Products.PloneHelpCenter.skins.plone_help_center.discussion_notify_template.pt
which you can override with z3c.jbot. Or in the ZMI, customize:
portal_skins/plone_help_center/discussion_notify_template.pt
(And, you must have at least one add-on installed, Products.PloneHelpCenter because this message is from that add-on).

Related

Change Forgot Password text Firebase [duplicate]

I am working on a Application with firebase. I want to validat a users email, but since Firebase doesn't allow to change the verification message (To help prevent spam, the message can't be edited on this email template), i can't use this. I don't want to serve English text to my users.
Is there a way to get/generate a custom ActionCode? I used this tut https://firebase.google.com/docs/auth/custom-email-handler it might solve the problem is i can get the temp actioncode somewhere.
I found applyActionCode and checkActionCode (seems the same) but not something like createActionCode
Ask for it...
Nowadays the best procedure (with just 1 step) was for us to develop an HTML file with the exact content for each of your templates (Email-Verification and Email-Change, including even the snippets %...% in the right place) and send them as attachment in the Troubleshoot form as mentioned by Alfonso in the comments of this question.
If you send the exact email HTML template file, you leave Google's people with no questions for spamming purposes other than quickly validating your HTML content and approve.
you can change the language for all the templates, at the bottom...
also you can edit manually the body and the subject for the forgot password template
You can customize the email validation template text as you wish? Right?

Send email when you publish a new article

I was able to find the function that sends an email every time a new item is created. Unfortunately I lost my notes and I can not find this feature more. Remember, that you entered the menu zope them and outlined a function to the occurrence of an event ..... can you help? Sorry for the bad English,
thanks.
You simply need to use a Plone native feature: content rules.
Go the the "content rule" section of your Plone control panel (http://yoursite/##rules-controlpanel) then configure a rule with a "mailer" action. The trigger action could be a workflow transition change.

Plone: Email contents in content rule action

I have a Plone site configured with PloneFormGen. I'm using a save-data-to-content adapter to create a page for each submission, with a unique number for title/id. I have content rules set up so that various roles will be notified when a submitted form transitions along the workflow.
Is there any way to include the content of the submitted in these emails? I know PloneFormGen can send the content of the form in an initial email at submit time, but I need to send this same information later. I'm pretty good at figuring things out, but I'm no Plone expert so any help would be appreciated.
Additional info:
I'm using the uwosh.pfg.d2c adapter to perform the PFG -> Contenttype conversion, which works well. The content type is set to 'page' in the settings for the uwosh.pfg.d2c plugin. Content rules then will send emails to various groups or roles based on a state transition of the resulting content, which works in the normal way - when a transition occurs, the rule executes.
Effectively, what we have is pages that are being generated by the form when the user clicks submit. This is done through a plugin in PloneFormGen. This may provide some extra info: http://pythonhosted.org/uwosh.pfg.d2c/ - I'm not, admittedly, much of a developer.
Ideally, reviewers would get body-text of the created page when the form is submitted: this is done through a content rule that when a page is added to a folder, it sends the email. The page is added to the folder when the plugin in PloneFormGen creates the page.
When we have these pages, other users can come in and review and change the state of them - just as you can with any other page in Plone. PloneFormGen should have no further use once it's been converted to a page. Hope that helps.
The bad news is that this will require programming; the good news is that it won't take much. There are two reasonable approaches to solving the problem:
Have your content rule action run a script that handles the mailing itself. You can use the site's mailhost to send scripted mail; or,
In a Python package (no way to do this in a through-the-web script), provide a named adapter implementing plone.stringinterp.interfaces.IStringSubstitution for your context's text attribute. That will give you a $ substitution for the body. This would probably require less than 10 lines of total code.
You might want to have a look a collective.contentrules.mailtogroup, the newest version is capable to send the body-text as mail (use the '${text}'-variable), triggered on one of the convenient content-rules-events, in your case 'Object added'.
You can assign your roles to a group and use it for your case.

Drupal 7 Comment Not Posting

I'm having a heck of time trying to get comments to post to my nodes. I've done all the obvious:
Enable comment module,
set appropriate permissions,
etc.
But every time I try to enter a comment it simply redirects to a "Add new comment" page and nothing gets posted. There is no comment in the Content -> Comments section and my database comment table is empty.
The only thing I can find relating to the issue is an error report in my log messages which displays a warning "page not found." I'm using the Drupal Busy theme.
Type: Page not found
Location: http://mysite/public://color/busy-0970ccd8/style.css?m
Message: public://color/busy-0970ccd8/style.css
Severity: Warning
I've ran the schema module and nothing is funky in with my database. Any thoughts on this? Much appreciated.
It's looking for a stylesheet from the Color module. It would normally be at sites/default/files/color/busy-0970ccd8/style.css
Do you have a sites/default/files directory? Check that you have one at that the directory is writable. Also check to be sure that the color module is enabled. Save your theme settings and clear your cache in configuration -- performance.
I'm not sure if a problem retrieving a style sheet from the color module could be causing this. Seems very unlikely.
You might consider not using the busy theme. It's current status is "minimally maintained" and the theme authors have left a note on the project page that there will be no further development at this time.
I recommend looking for a theme that is actively maintained and has good support. It looks like Busy is a pretty standard 960 grid, you might like Omega.

Wordpress/MovableType: How does Lifehacker implement their comment system?

I really like how Lifehacker.com (and Gawker.com) implements their comment system.
I believe, but am not certain, they use Movable Type as the platform for their blog.
What I like about their comment system is that it's a simple open text field and once you click "Share" it then asks you to register.
Question: Anyone know how to accomplish this same functionality with either Wordpress or Movable Type?
The Gawker blogging network (of which lifehacker and gizmodo are part) use their own custom blogging platform (Pingdom blog post at beginning of last year)
If you want users to register before they leave comments, go to Admin > Options > General and check "users must register to leave comments" (or at least I think that's the right path, I'm doing it from memory)

Resources