5537 Posts in 1737 Topics by 1223 members
|Go to End|
19 January 2010 at 7:30pm
We need to extend the approve function inside PageComment_Controller (cms/code/sitefeatures/PageComment.php). Does anyone know how to extend this class so we can send emails once a comment is approved?
Thank you in advance,
1 February 2010 at 10:16am Last edited: 1 February 2010 10:17am
Maybe you can try like that:
1. Create MyPageComment_Controller as class extending the PageComment_Controller and redefining the approve function.
2. Redefine the original rule leading to PageComment controller, but with higher priority:
'PageComment//$Action/$ID' => 'MyPageComment_Controller',
That should hopefully direct the requests to the proper place. Don't forget to dev/build so the sapphire picks up the new class. Let us know how did you get on with that.
|Go to Top|