############################################################## # #

プラグインの簡易ヘルプを表示します。

#
# {{pluginhelp}}
# 
#

# とするとインストールされているプラグインの一覧と簡単な # 説明が一覧表示されます。プラグイン名をクリックすると # そのプラグインの詳細な説明が表示されます。 #

#

# また、オプションでプラグイン名を指定すると、 # そのプラグインのヘルプを表示することができます。 #

#
# {{pluginhelp プラグイン名,プラグイン名,...}}
# 
# ############################################################## package plugin::info::PluginHelp; use strict; use plugin::info::PluginHelpHandler; #============================================================= # コンストラクタ #============================================================= sub new { my $class = shift; my $self = {}; return bless $self,$class; } #============================================================= # パラグラフメソッド #============================================================= sub paragraph { my $self = shift; my $wiki = shift; my @plugin = @_; my $buf = ""; # 指定したプラグインのみ表示 if ( scalar(@plugin) > 0 ) { $buf .= "
\n"; for my $p ( @plugin ) { $buf .= "
".Util::escapeHTML($p)."
\n"; if (my $plugin = $wiki->{"plugin"}->{$p}->{CLASS}) { my $comment = &plugin::info::PluginHelpHandler::get_comment($wiki,$plugin); $buf .= "
$comment
\n"; } else { $buf .= "
{{".Util::escapeHTML($p)."}}プラグインは存在しません。
\n" } } $buf .= "
\n"; # 全てのプラグインを表示 } else { my @plugins = sort { $a cmp $b } keys(%{$wiki->{"plugin"}}); foreach my $p (@plugins){ my $name = $p; my $plugin = $wiki->{"plugin"}->{$p}->{CLASS}; my $comment = &plugin::info::PluginHelpHandler::get_comment($wiki,$plugin); my $comment = (split(/\n/,$comment))[0]; $comment = &Util::delete_tag($comment); $buf .= "
". "
config('script_name')."?action=PLUGINHELP". "&name=".&Util::url_encode($name)."&plugin=".&Util::url_encode($plugin)."\">$name
". "
$comment
\n"; } } return $buf; } 1;