An example of how to extend other Movable Type/Melody applications like the comment system with new capabilities:
In config.yaml:
In config.yaml:
applications:The Perl code:
comments:
methods:
do_stuff: $TestPlugin::TestPlugin::Comments::do_stuff
package TestPlugin::Comments;That will add a new mode to mt-comments.cgi called do_stuff which can be accessed manually with <$mt:CGIPath$><$mt:CommentScript$>?__mode=do_stuff in templates.
use strict;
sub do_stuff
{
my $app = shift;
###Code
}
1;
Leave a comment