{"id":190,"date":"2002-08-25T23:59:25","date_gmt":"2002-08-25T23:59:25","guid":{"rendered":"http:\/\/sunpig.com\/mt-entry-190.html"},"modified":"2006-09-23T19:30:11","modified_gmt":"2006-09-23T19:30:11","slug":"movable-type-macros-for-everything2","status":"publish","type":"post","link":"https:\/\/sunpig.com\/martin\/2002\/08\/25\/movable-type-macros-for-everything2\/","title":{"rendered":"Movable Type macros for Everything2"},"content":{"rendered":"<p>Back in the (good\/bad&#8230;proabably bad) old days when the sunpig site was running on some scraps of PHP code I&#8217;d cobbled together myself, it had the ability to automatically convert <a href=\"http:\/\/www.everything2.com\/\" title=\"Everything2\">Everything2<\/a> style hard links and pipe links.  This meant that we could copy and paste content between here and E2 without doing any extra editing.<\/p>\n<p>When we moved over to <a href=\"http:\/\/www.movabletype.org\/\" title=\"Movable Type\">Movable Type<\/a>, though, we lost that facility  We gained much, <em>much<\/em> more in the process, though.  But now that Movable Type has support for macros, thanks to the incredibly cool <a href=\"http:\/\/www.bradchoate.com\/\" title=\"Brad Choate\">Brad Choate<\/a>, I can put these E2 links back.<\/p>\n<p>All that is required are two macros:<\/p>\n<p><code><br \/>\n&lt;MTMacroDefine name=\"e2hardlink\" pattern=\"m\/\\&#91;(&#91;^\\|&#93;*?)\\&#93;\/\"&gt;<br \/>\n&lt;a href=\"http:\/\/www.everything2.com\/?node=&lt;MTNull encode_url=\"1\"&gt;&lt;MTMacroMatch position=\"1\"&gt;&lt;\/MTNull&gt;\" title=\"&lt;MTMacroMatch position=\"1\"&gt;\"&gt;&lt;MTMacroMatch position=\"1\"&gt;&lt;\/a&gt;&lt;\/MTMacroDefine&gt;<\/p>\n<p>&lt;MTMacroDefine name=\"e2pipelink\" pattern=\"m\/\\&#91;(.*?)\\|(.*?)\\&#93;\/\"&gt;<br \/>\n&lt;a href=\"http:\/\/www.everything2.com\/?node=&lt;MTNull encode_url=\"1\"&gt;&lt;MTMacroMatch position=\"1\"&gt;&lt;\/MTNull&gt;\" title=\"&lt;MTMacroMatch position=\"2\"&gt;\"&gt;&lt;MTMacroMatch position=\"2\"&gt;&lt;\/a&gt;&lt;\/MTMacroDefine&gt;<br \/>\n<\/code>\n<\/p>\n<p>Nifty!  But probably of more use to <a href=\"http:\/\/www.sunpig.com\/abi\/\" title=\"Abi's blog\">Abi<\/a>, because I don&#8217;t tend to post on E2 these days.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Back in the (good\/bad&#8230;proabably bad) old days when the sunpig site was running on some scraps of PHP code I&#8217;d cobbled together myself, it had the ability to automatically convert Everything2 style hard links and pipe links. This meant that we could copy and paste content between here and E2 without doing any extra editing. &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/sunpig.com\/martin\/2002\/08\/25\/movable-type-macros-for-everything2\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Movable Type macros for Everything2&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[19],"tags":[],"class_list":["post-190","post","type-post","status-publish","format-standard","hentry","category-movable_type"],"_links":{"self":[{"href":"https:\/\/sunpig.com\/martin\/wp-json\/wp\/v2\/posts\/190","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/sunpig.com\/martin\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/sunpig.com\/martin\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/sunpig.com\/martin\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/sunpig.com\/martin\/wp-json\/wp\/v2\/comments?post=190"}],"version-history":[{"count":0,"href":"https:\/\/sunpig.com\/martin\/wp-json\/wp\/v2\/posts\/190\/revisions"}],"wp:attachment":[{"href":"https:\/\/sunpig.com\/martin\/wp-json\/wp\/v2\/media?parent=190"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/sunpig.com\/martin\/wp-json\/wp\/v2\/categories?post=190"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/sunpig.com\/martin\/wp-json\/wp\/v2\/tags?post=190"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}