Weitere ähnliche Inhalte
Mehr von Yuji Takayama (20)
20070824 MT-DEVCON
- 19. •
• 行 色
•
•
• 自己
•
• 非
•
- 56. • • •
• • •
• • •
• • •
• • •
• •
• •
• •
• •
• •
• •
- 57. package MT::Plugin::SampleTransfomer;
Transformer Callback
~ ~
MT->add_callback( 'MT::App::CMS::template_param.edit_entry',
9, $plugin, &add_field );
ID ’tags’ MT
sub add_field {
my ( $eh, $app, $param, $tmpl ) = @_;
return unless UNIVERSAL::isa( $tmpl, 'MT::Template' );
my $innerHTML;
Element
my $host_node = $tmpl->getElementById('tags');
my $child_node = $tmpl->createElement(
'app:setting',
{
id => 'hello',
label => 'Hello',
}
);
my $word = '<strong>Hello, Transformer</strong>';
Element
$child_node->innerHTML($word);
$tmpl->insertBefore( $child_node, $host_node );
}
Element
1;
- 63. 生
my $child_node = $tmpl->createElement(
'app:setting',
{
id => 'hello',
label => 'Hello',
}
);
- 65. 生
my $word =
'<strong>Hello, Transformer</strong>';
$child_node->innerHTML($word);
- 67. 生 入
$tmpl->insertBefore(
$child_node,
$host_node
);
- 88. •
• 示
• 示
•
•
• 言
•
• 示
- 106. •
•
• 子
•
•
•
•
•
• 生 自 生
- 118. package MT::Asset::Movie; my $player = $site_url.quot;flvplayer.swf?
file=quot;.$url;
use strict; my $text = << quot;HTMLquot;;
use base qw( MT::Asset ); <object type=quot;application/x-shockwave-flashquot;
width=quot;400quot; height=quot;220quot; wmode=quot;transparent
__PACKAGE__->install_properties({ data=quot;$playerquot;>
class_type => 'movie', <param name=quot;moviequot; value=quot;$playerquot; />
}); <param name=quot;wmodequot; value=quot;transparentquot; />
</object>
sub extensions { [ qr/flv/i ] } HTML
sub class_label { return $asset->enclose($text);
MT->translate('Movie'); }
}
1;
sub class_label_plural {
MT->translate('Movie');
}
sub as_html {
my $asset = shift;
my ($param) = @_;
my $url = $asset->url;
my $blog = $asset->blog;
my $site_url = $blog->site_url if $blog;
$site_url = '/' unless $site_url;
- 133. •
• 日 月 日
•
• 日 月 日
• 日
- 134. •
• 日 月 日
•
• 日 月 日
• 日
•
- 135. •
• 日 月 日
•
• 日 月 日
• 日
•
• 方
- 136. •
• 日 月 日
•
• 日 月 日
• 日
•
• 方
•
- 137. •
• 日 月 日
•
• 日 月 日
• 日
•
• 方
•
•
- 138. •
• 日 月 日
•
• 日 月 日
• 日
•
• 方
•
•
• 日