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
| var mtCategoryIds = [1,2,3,4,5,7,8,9] | |
| var savedCategoriesOrder = [3,7,2,1,5,4,6] | |
| var dispCategoryIds: [Int] = [] | |
| for categoryId in savedCategoriesOrder { | |
| if let index = mtCategoryIds.indexOf(categoryId) { | |
| dispCategoryIds.append(categoryId) | |
| mtCategoryIds.removeAtIndex(index) | |
| } else { | |
| if let index = savedCategoriesOrder.indexOf(categoryId) { |
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
| <!DOCTYPE html> | |
| <html lang="ja"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <title>年度毎に月別アーカイブへのリンクを出力</title> | |
| </head> | |
| <body> | |
| <mt:ArchiveList type="Monthly"> | |
| <$mt:ArchiveTitle regex_replace="/(\d+)年\d+月/","$1" setvar="tmp__current_year"$> |
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
| id: DispPageFullPath | |
| name: DispPageFullPath | |
| version: 1.0 | |
| list_properties: | |
| page: | |
| fullpath: | |
| label: 'フルパス' | |
| html: > | |
| sub { |
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
| name: EntryBodyFormat | |
| key: EntryBodyFormat | |
| id: EntryBodyFormat | |
| version: 1.00 | |
| tags: | |
| function: | |
| EntryBodyFormat: > | |
| sub { | |
| my ($ctx, $args) = @_; |
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:Entries> | |
| <mt:SetVarBlock name="tmp.entry_ids" function="push"><$mt:EntryID$></mt:SetVarBlock> | |
| </mt:Entries> | |
| <mt:Ignore>MTArrayShuffle...alfasado/mt-plugin-get-hash-varのインストールで利用可能なファンクションタグ</mt:Ignore> | |
| <$mt:ArrayShuffle name="tmp.entry_ids"$> | |
| <mt:Loop name="tmp.entry_ids"> | |
| <mt:If name="__first__"><ul></mt:If> | |
| <mt:Entries id="$__value__"> |
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
| id: SetRandomNumVar | |
| name: Set Random Number Variable Plugin | |
| version: 1.0 | |
| author_name: Hideki Abe | |
| author_link: https://www.anothersky.pw/ | |
| tags: | |
| function: | |
| SetRandomNumVar: | |
| handler: > | |
| sub { |
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
| name: EntriesBasenameFilter | |
| tags: | |
| filters: | |
| Entries: | |
| basename_filter: | |
| handler: > | |
| sub { | |
| my ( $ctx, $args, $cond ) = @_; | |
| $ctx->{ terms }->{ basename } = { like => $args->{ basename_filter } }; | |
| } |
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
| { | |
| "indent": 2, | |
| "indent_char": " ", | |
| "indent_scripts": "normal", | |
| "wrap_line_length": 0, | |
| "brace_style": "expand", | |
| "preserve_newlines": true, | |
| "max_preserve_newlines": 1, | |
| "unformatted": [ | |
| "a", |
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) { | |
| # ------------------ | |
| # 設定変更 | |
| # ------------------ |
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
| # 基礎 | |
| # /Users/Shared/Sites/mt6/htdocs/mt/lib/MT/Template/Tags/Entry.pm | |
| # $typeの中身 | |
| # { | |
| # 'name' => 'field.data_int_number_of_employees', | |
| # 'pkg' => 'MT::Entry', | |
| # 'type' => 'vinteger_idx', | |
| # 'type_id' => '5' | |
| # } | |
| my $col = 'data_aircraft_type'; |