- PlaggerのPublish::MT改造してカテゴリ反映つダメ人間オンライン
Publish::MTを改変
カテゴリ指定で分けたかったのでデフォルトのPublish::MTを少し改変。sub post_to_mt {
my $self = shift;
my %args = @_;
my $mt = $self->mt;# FIXME: Can I use XML::RPC::Lite without hack?
Encode::_utf8_off($args{title});
Encode::_utf8_off($args{body});my $id = $mt->newPost({
title => $self->conf->{title} || $args{title} || ”,
description => $args{body} || ”,
}) or die $mt->errstr;
+ if ($self->conf->{category}) {
+ $mt->setPostCategories($id, $self->conf->{category});
+ }
$mt->publishPost($id);
$id;
}以前用意していたのをすっかり忘れて未分類投稿になってた。修正。
Grans TSUCHINOKO
4月 7th, 2012
taraco 


Posted in 



![■Myトーナメント:2/12~18週優勝[12月]妻希望サイボク肉焼肉](https://i0.wp.com/log.xiaopu.net/wp-content/uploads/2024/02/IMG_5282-1-scaled-e1708387836425.jpeg?resize=200%2C200&ssl=1)