Created
November 25, 2015 09:38
-
-
Save hideki-a/9b030f14a4a61cbc8ccf to your computer and use it in GitHub Desktop.
全てのブログに設定を適用するコードの例。
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <mt:PerlScript> | |
| use MT::Blog; | |
| # ブログオブジェクトの読み込み | |
| my @blogs = MT::Blog->load; | |
| for my $blog (@blogs) { | |
| # ------------------ | |
| # 設定変更 | |
| # ------------------ | |
| # アイテムアップロード時にアップロード先の変更を許可しない | |
| $blog->allow_to_change_at_upload(0); | |
| # 日本語ファイル名を自動で変換する | |
| $blog->auto_rename_non_ascii(1); | |
| # ------------------ | |
| # 設定保存 | |
| # ------------------ | |
| $blog->save(); | |
| } | |
| </mt:PerlScript> | |
| <mt:Ignore> | |
| MTPerlScriptは以下を参照 | |
| http://www.h-fj.com/blog/archives/2008/12/02-090610.php | |
| </mt:Ignore> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment