Configure Active Plugins
I find the Configure Active Plugins list on the MT front page very useful, however this list has been getting longer and longer and I install more and more plugins that register on there. Eventually this bugged me (big surprise eh?) and I decided to move that to its own page. Click the thumbnail to the side for a larger image.
First open up lib/MT/App/CMS.pm and find around line 40
'list_blogs' => \&list_blogs,
and add right underneath it
'list_plugins' => \&list_plugins,
Next around line 342 (at the end of sub list_blog) fine
$param{no_breadcrumbs} = 1;
$app->build_page('list_blog.tmpl', \%param);
}
and add after it
sub list_plugins {
my $app = shift;
my $q = $app->{query};
require MT::Blog;
require MT::Permission;
require MT::Entry;
require MT::Comment;
my $author = $app->{author};
my @perms = MT::Permission->load({ author_id => $author->id });
my %perms = map { $_->blog_id => $_ } @perms;
my @blogs = MT::Blog->load;
my $data = [];
my %param;
my $i = 1;
$param{blog_loop} = $data;
$param{can_create_blog} = $author->can_create_blog;
$param{can_view_log} = $author->can_view_log;
$param{saved_deleted} = $q->param('saved_deleted'); if ($author->can_create_blog()) {
$param{blog_count} = MT::Blog->count();
$param{blog_count_plural} = $param{blog_count} != 1;
$param{author_count} = MT::Author->count({type => AUTHOR});
$param{author_count_plural} = $param{author_count} != 1;
$param{can_view_blog_count} = 1;
}
$param{news_html} = $app->get_newsbox_content();
$data = [];
for my $plugin (@MT::Plugins) {
my $plugin_name = remove_html($plugin->name());
$plugin->{description} = remove_html($plugin->{description});
(my $cgi_path = $app->{cfg}->CGIPath) =~ s|/$||;
my $plugin_page = ($cgi_path . '/'
. $plugin->envelope . '/' . $plugin->config_link())
if $plugin->{config_link};
my $row = { plugin_name => $plugin_name,
plugin_page => $plugin_page,
plugin_desc => $plugin->description(),
plugin_doc_link => $plugin->doc_link() };
push @$data, $row;
}
$param{plugin_loop} = $data;
$param{no_breadcrumbs} = 1;
$app->build_page('list_plugins.tmpl', \%param);
}
Next download list_blog.tmpl and list_plugins.tmpl or if you have implemented the skinning MT hacking, download these versions of list_blog.tmpl and list_plugins.tmpl. Finally download plug.gif
Upload all the files to their appropriate places and you should be all set. Now when you login to MT, you'll only get a list of your blogs and the plugins listing will be on a separate page.


Carla said:
on Jan 4, 2005 9:13 PM | Reply
I'm using MT 3.14 as well. However, I just realized while reading your post, that I don't have a Configure Active Plugins link once I login to MT. Is there a particular file that I didn't overwriten when I upgraded? Thanks in advance for your reply.
Arvind Satyanarayan said:
on Jan 4, 2005 9:25 PM | Reply
Hi Carla, that should be present on the front page and only shows up if a plugin is registered in that way. Make sure that the list_blog.tmpl from the 3.14 distribution has been uploaded into the correct folder.
Carla said:
on Jan 4, 2005 9:34 PM | Reply
My apologies....please ignore my question. I completely misunderstood your post. I thought the thumbnail you referenced was the "before" picture of your modifications. Again, my apologies.
Neil T. said:
on Jan 5, 2005 1:01 AM | Reply
Ooooh, nice hack. As more and more plugins start to use that feature the list is going to get unmanagable - hopefully a future release of MT will fix that.
Alex Sancho said:
on Jan 5, 2005 10:51 AM | Reply
Nice hack, i´ve implemented it without problems, but plugins configuration still apearing under blogs list on front page, i´ve got the link to the plugins config page on the right colum too. Thanks for your support
sean said:
on Feb 22, 2005 8:17 PM | Reply
I run a site that has several authors each with their own blogpage. I'm using a plugin that I don't want the other authors to have access to, except for me (the admin). How can I hide it from everyone else but me?
fvcwd fcoivh said:
on Sep 7, 2008 10:50 AM | Reply
hogtuskpm eaklsu ywuxskzla cqhup ipcjt ixthdfb lrhti
"saw palmetto""mujeres" said:
on Sep 8, 2008 5:08 AM | Reply
gjdih
saw palmetto extract said:
on Sep 8, 2008 6:44 AM | Reply
gysun ongf tnrbxmi bpidry