Changeset 58

Show
Ignore:
Timestamp:
04/26/05 21:00:20 (4 years ago)
Author:
ogawa
Message:

Add README.txt and version check (3.16+ or not)
And a little more fix

Location:
update-n-ping/trunk
Files:
1 added
2 modified

Legend:

Unmodified
Added
Removed
  • update-n-ping/trunk/plugins/update-n-ping/config.cgi

    r55 r58  
    4848 
    4949    my $author = $app->{author}; 
    50     return $app->error("You cannot edit the settings for Update_n_Ping") 
     50    return $app->error("You cannot edit the settings for " . $PLUGIN_NAME) 
    5151        unless $author->can_create_blog; 
     52 
     53    $app->set_language($author->preferred_language) 
     54        if $author && $author->preferred_language; 
     55    $app->{breadcrumbs} = [ { bc_name => $app->translate('Main Menu'), 
     56                              bc_uri => $app->mt_uri } ]; 
    5257 
    5358    require MT::Plugin; 
     
    5560 
    5661    defined($param{enabled} = $plugin->get_config_value('enabled')) 
    57       or $param{enabled} = 1; 
     62        or $param{enabled} = 1; 
    5863    defined($param{limit_entries} = $plugin->get_config_value('limit_entries')) 
    59       or $param{limit_entries} = 15; 
     64        or $param{limit_entries} = 15; 
    6065    my $t = $plugin->get_config_value('ping_urls'); 
    6166    $param{ping_urls} = (defined $t && ref($t) eq 'ARRAY' && @$t) ? 
    62       join "\r\n", @$t : ''; 
     67        join "\r\n", @$t : ''; 
    6368 
    64     $app->add_breadcrumb('Update-n-Ping Plugin'); 
     69    $app->add_breadcrumb($PLUGIN_NAME); 
    6570    $app->build_page('update-n-ping.tmpl', \%param); 
    6671} 
     
    6873sub save_form { 
    6974    my $app = shift; 
    70     my $auth = $app->{author}; 
    7175    my $q = $app->{query}; 
    7276    my $author = $app->{author}; 
    73     return $app->error("You cannot edit the settings for Nofollow")  
     77    return $app->error("You cannot edit the settings for " . $PLUGIN_NAME) 
    7478        unless $author->can_create_blog; 
    7579    $app->validate_magic() or return; 
  • update-n-ping/trunk/plugins/update-n-ping/plugin.pl

    r57 r58  
    88# Copyright (c) 2005 Hirotaka Ogawa 
    99 
     10package MT::Plugin::Update_n_Ping; 
    1011use strict; 
    1112use vars qw($PING_URLS $LIMIT_ENTRIES); 
     
    2425    $plugin->description("Send 'update pings' when updating entries"); 
    2526    $plugin->doc_link("http://as-is.net/hacks/2005/02/update_n_ping_plugin.html"); 
    26     $plugin->config_link("config.cgi"); 
     27    $plugin->config_link("config.cgi") if MT->version_number >= 3.16; 
    2728    MT->add_plugin($plugin); 
    2829};