Skip to content

Instantly share code, notes, and snippets.

@padawan
Forked from rayners/Plugin.pm
Created July 24, 2010 06:35
Show Gist options
  • Save padawan/488472 to your computer and use it in GitHub Desktop.
Save padawan/488472 to your computer and use it in GitHub Desktop.
name: Plugin Name
init: sub { my $p = shift; require PluginName::Plugin; bless $p, 'PluginName::Plugin', $p; }
package PluginName::Plugin;
use strict;
use warnings;
use base qw( MT::Plugin );
sub load_config {
my $plugin = shift;
$plugin->SUPER::load_config(@_);
my ( $param, $scope ) = @_;
if ( $scope =~ /^blog:(\d+)$/ ) {
my $blog_id = $1;
# tweak $param as needed for values
# to pass to the config template
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment