| 36 | | |
| 37 | | my $plugin = __PACKAGE__->new({ |
| 38 | | name => 'TagSupplementals', |
| 39 | | description => 'A plugin for providing supplemental "tag" features for MT 3.3+', |
| 40 | | doc_link => 'http://code.as-is.net/public/wiki/TagSupplementals_Plugin', |
| 41 | | author_name => 'Hirotaka Ogawa', |
| 42 | | author_link => 'http://profile.typekey.com/ogawa/', |
| 43 | | version => $VERSION, |
| 44 | | registry => { |
| 45 | | tags => { |
| 46 | | block => { |
| 47 | | RelatedEntries => \&related_entries, |
| 48 | | RelatedTags => \&related_tags, |
| 49 | | ArchiveTags => \&archive_tags, |
| 50 | | SearchTags => \&search_tags, |
| 51 | | $HAVE_MT_XSEARCH ? (XSearchTags => \&xsearch_tags) : (), |
| 52 | | }, |
| 53 | | function => { |
| 54 | | EntryTagsCount => \&entry_tags_count, |
| 55 | | TagLastUpdated => \&tag_last_updated, |
| 56 | | $HAVE_MT_XSEARCH ? (TagXSearchLink => \&tag_xsearch_link) : (), |
| 57 | | }, |
| 58 | | modifier => { |
| 59 | | encode_urlplus => \&encode_urlplus, |
| 60 | | }, |
| | 28 | } |
| | 29 | |
| | 30 | my $plugin = __PACKAGE__->new({ |
| | 31 | name => 'TagSupplementals', |
| | 32 | description => 'A plugin for providing supplemental "tag" features for MT4', |
| | 33 | doc_link => 'http://code.as-is.net/public/wiki/TagSupplementals_Plugin', |
| | 34 | author_name => 'Hirotaka Ogawa', |
| | 35 | author_link => 'http://profile.typekey.com/ogawa/', |
| | 36 | version => $VERSION, |
| | 37 | registry => { |
| | 38 | tags => { |
| | 39 | block => { |
| | 40 | RelatedEntries => \&related_entries, |
| | 41 | RelatedTags => \&related_tags, |
| | 42 | ArchiveTags => \&archive_tags, |
| | 43 | SearchTags => \&search_tags, |
| | 44 | $HAVE_MT_XSEARCH ? (XSearchTags => \&xsearch_tags) : (), |
| | 45 | }, |
| | 46 | function => { |
| | 47 | EntryTagsCount => \&entry_tags_count, |
| | 48 | TagLastUpdated => \&tag_last_updated, |
| | 49 | $HAVE_MT_XSEARCH ? (TagXSearchLink => \&tag_xsearch_link) : (), |
| | 50 | }, |
| | 51 | modifier => { |
| | 52 | encode_urlplus => \&encode_urlplus, |
| 63 | | template_tags => { |
| 64 | | EntryTagsCount => \&entry_tags_count, |
| 65 | | TagLastUpdated => \&tag_last_updated, |
| 66 | | $HAVE_MT_XSEARCH ? (TagXSearchLink => \&tag_xsearch_link) : (), |
| 67 | | }, |
| 68 | | container_tags => { |
| 69 | | RelatedEntries => \&related_entries, |
| 70 | | RelatedTags => \&related_tags, |
| 71 | | ArchiveTags => \&archive_tags, |
| 72 | | SearchTags => \&search_tags, |
| 73 | | $HAVE_MT_XSEARCH ? (XSearchTags => \&xsearch_tags) : (), |
| 74 | | }, |
| 75 | | global_filters => { |
| 76 | | encode_urlplus => \&encode_urlplus, |
| 77 | | }, |
| 78 | | }); |
| 79 | | MT->add_plugin($plugin); |
| 80 | | } |
| | 55 | } |
| | 56 | }); |
| | 57 | MT->add_plugin($plugin); |
| | 58 | |
| | 59 | use MT::Template::Context; |
| | 60 | use MT::Entry; |
| | 61 | use MT::Tag; |
| | 62 | use MT::ObjectTag; |
| | 63 | use MT::Promise qw(force); |