Coder Social home page Coder Social logo

helpfulrobot / tractorcow-silverstripe-comments-notifications Goto Github PK

View Code? Open in Web Editor NEW

This project forked from tractorcow/silverstripe-comments-notifications

0.0 2.0 0.0 11 KB

Simple email notifications for comments posted against the Comments module

PHP 84.62% Scheme 15.38%

tractorcow-silverstripe-comments-notifications's Introduction

Page comments email notification module for Silverstripe

This mobule provides simple email notifications for page comments

Credits and Authors

License

  • TODO

Requirements

Installation Instructions

  • Extract all files into the 'comments-notifications' folder under your Silverstripe root.

Configuration

Using the Config set the "recipient" attribute of "CommentsNotifications" class to one of:

  • SiteConfig (configure the email under settings globally)
  • Page (configure the recipient per page)
  • Admin (uses the admin email address)
  • Disabled
  • any email address (use this explicit email address)

E.g. MyProject.yaml

CommentsNotifications:
  recipient: 'Page'

Extending

To hook into the outgoing email (in order to customise the template) you can extend CommentingController with an extending class with a function updateEmail

class EmailSenderExtension extends Extension {
	public function updateEmail(Email &$email) {
		$email->populateTemplate(array(
			'SiteConfig' => SiteConfig::current_site_config()
		));
	}
}

Need more help?

Message or email me at [email protected] or, well, read the code!

tractorcow-silverstripe-comments-notifications's People

Contributors

anselmdk avatar tractorcow avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.