{"id":6272,"date":"2004-09-29T09:52:33","date_gmt":"2004-09-29T16:52:33","guid":{"rendered":"http:\/\/hill-kleerup.org\/blog\/wp\/2004\/09\/29\/dynamic-publishing-in-mt3.html"},"modified":"2004-09-29T09:52:33","modified_gmt":"2004-09-29T16:52:33","slug":"dynamic_publish","status":"publish","type":"post","link":"https:\/\/hill-kleerup.org\/blog\/2004\/09\/29\/dynamic_publish.html","title":{"rendered":"Dynamic publishing in MT3"},"content":{"rendered":"<p>One of my major reasons for taking the MT 3.11 plunge is the prospect of dynamic publishing &#8212; that a blog page gets rendered on the fly when you go to it, rather than being stored as a static file.  Not only is this keen aesthetically, but it has the potential of resolving some rebuild time issues (not to mention space issues).  If I set up my blog pages as dynamic, except for the main indices (like the front page), comments and pings and posts should be lickety-split fast.<\/p>\n<p>In theory.<\/p>\n<p>Of course, I&#8217;m not going to screw around with my main blog for this.  Instead, I&#8217;m going to try it out on one of my smaller blogs, and with the category archives as well.  This is my progress.<\/p>\n<p><!--more--><\/p>\n<ol>\n<li>Download the <a href=\"http:\/\/www.movabletype.org\/docs\/mtmanual_dynamic.html\" target=\"_blank\">official MT docs<\/a> on the subject.  Read them.\n<li>Decide on a blog.  I&#8217;ll use <a href=\"https:\/\/www.hill-kleerup.org\/blog\/idc\/\" target=\"_blank\">IDC<\/a>, as it&#8217;s a relatively recent creation.<\/p>\n<li>Rebuild it under 3.11.  All looks well.<\/p>\n<li>Set up the temporary cache folder as the <em>\/blog\/idc\/templates_c<\/em> directory, chmodded as 777.<\/p>\n<li>Open up the very spiffy 3.11 xface, go to IDC, go to templates, open up the categories archive, and check the box that says &#8220;Enable dynamic building for this template.&#8221;  Note that this text is not the same as what&#8217;s in the MT document (&#8220;Build this template each time it is visited&#8221;).<\/p>\n<li>Set up the <em>.htaccess<\/em> file per the instructions.  Modify the reference to <em>mtview.php<\/em> to be <em>\/blog\/idc\/mtview.php<\/em>.<\/p>\n<li>Rebuild the blog.<\/p>\n<li>Try to go to <a href=\"https:\/\/www.hill-kleerup.org\/blog\/idc\/cat_playing_aids.html\" target=\"_blank\">one of the category pages<\/a>.<\/p>\n<li>Error!  The error log file reads:<\/p>\n<p class=\"block\">[29-Sep-2004 10:03:31] PHP Warning:  context(MTViewer.php): failed to open stream: No such file or directory in \/home\/dave\/public_html\/blog\/mt\/php\/mt.php on line 468<br \/>\n[29-Sep-2004 10:03:31] PHP Fatal error:  context(): Failed opening required &#8216;MTViewer.php&#8217; (include_path=&#8217;\/home\/dave\/public_html\/blog\/mt\/php\/plugins: \/home\/dave\/public_html\/blog\/mt\/php\/lib: \/home\/dave\/public_html\/blog\/mt\/php\/extlib: \/home\/dave\/public_html\/blog\/mt\/php\/extlib\/smarty: .:\/usr\/lib\/php:\/usr\/local\/lib\/php&#8217;) in \/home\/dave\/public_html\/blog\/mt\/php\/mt.php on line 468<\/p>\n<p>Hmmm.  <\/p>\n<li>Look at the actual blog directory.  Note that, just as <a href=\"http:\/\/philringnalda.com\/blog\/2004\/09\/mts_completely_searchfriendly_dynamic_urls.php\" target=\"_blank\">Phil Ringnalda<\/a> explains, all the <em>.html<\/em> category files have been changed to <em>.html.static<\/em> (and can be deleted at my leisure).<\/p>\n<p>Note also that the <em>mtview.php <\/em>file is there, right where it should be.  Wonder if this is one of those &#8220;what&#8217;s really the root of the file&#8221; thing, where sometimes it&#8217;s rooted under <em>\/public_html\/<\/em>, sometimes under <em>\/dave\/<\/em>, etc.  So add <em>\/public_html<\/em> to all the <em>mtview.php <\/em>refs in the <em>.htaccess<\/em> file.<\/p>\n<li>Same error.  Rats.  Odd, though, that it&#8217;s talking about <em>mtview<u>er<\/u>.php<\/em>, not <em>mtview.php<\/em>.  Google.  No joy.  (I later learn that the mtviewer ref is correct, just misleading in this case.)<\/p>\n<p>Mod_rewrite <a href=\"http:\/\/forums.hostmatters.com\/showthread.php?t=11866\" target=\"_blank\">should be available<\/a> on the server.<\/p>\n<li>Look in the <em>php <\/em>directory referenced.  Hey, there&#8217;s a directory <em>(tmpl)<\/em> missing there.  Another bad FTP?  Dagnabbit, this is getting ridiculous.  I&#8217;ve already downloaded a demo of the latest WS_FTP &#8212; let&#8217;s let it give it a go and reload the whole PHP directory.<\/p>\n<li>Well, I&#8217;ll be damned.  It worked.  <em>Amazing <\/em>what happens when you <em>fully install the frelling program <\/em>&#8230; <small>(mutter mutter mutter &#8230;)<\/small><\/p>\n<p>Eyeballing indicates no difference.<\/p>\n<p>So &#8230; now what?<\/p>\n<p>Ah &#8230;<\/p>\n<li>Try the same on the individual archives.  And monthly archives.<\/p>\n<li>Huzzah.<\/ol>\n<p>So changing all but the index files to dynamic ended up saving about 4Mb in files, with no discernable performance hit.  I&#8217;m going to try a few further experiments to see what might break under the dynamic stuff before I try it out on my main page, but, for now, I&#8217;m pretty happy with it.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>One of my major reasons for taking the MT 3.11 plunge is the prospect of dynamic publishing &#8212; that a blog page gets rendered on the fly when you go&#8230;<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_seopress_titles_title":"","_seopress_titles_desc":"","_seopress_robots_index":"","_seopress_robots_follow":"","_seopress_robots_imageindex":"","_seopress_robots_snippet":"","_seopress_robots_primary_cat":"","_seopress_robots_breadcrumbs":"","_seopress_robots_freeze_modified_date":"","_seopress_robots_custom_modified_date":"","_seopress_robots_canonical":"","_seopress_social_fb_title":"","_seopress_social_fb_desc":"","_seopress_social_fb_img":"","_seopress_social_fb_img_attachment_id":0,"_seopress_social_fb_img_width":0,"_seopress_social_fb_img_height":0,"_seopress_social_twitter_title":"","_seopress_social_twitter_desc":"","_seopress_social_twitter_img":"","_seopress_social_twitter_img_attachment_id":0,"_seopress_social_twitter_img_width":0,"_seopress_social_twitter_img_height":0,"_seopress_redirections_value":"","_seopress_redirections_enabled":"","_seopress_redirections_enabled_regex":"","_seopress_redirections_logged_status":"","_seopress_redirections_param":"","_seopress_redirections_type":0,"_seopress_analysis_target_kw":"","_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[3],"tags":[],"class_list":["post-6272","post","type-post","status-publish","format-standard","hentry","category-blogging"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack-related-posts":[{"id":6270,"url":"https:\/\/hill-kleerup.org\/blog\/2004\/09\/29\/mt3_dynamic_pub.html","url_meta":{"origin":6272,"position":0},"title":"MT3, dynamic publishing, and SmartyPants","author":"***Dave","date":"Wed 29-Sep-04 11:59am","format":false,"excerpt":"SmartyPants is a text modifier that can be used to turn straight quotes to \"curly quotes\", dashes to em-dashes -- as they say -- dots to ellipses ... etc. I've...","rel":"","context":"In &quot;Blogging &amp; Internet&quot;","block_context":{"text":"Blogging &amp; Internet","link":"https:\/\/hill-kleerup.org\/blog\/category\/blogging"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":6275,"url":"https:\/\/hill-kleerup.org\/blog\/2004\/09\/28\/mt_311_kindasor.html","url_meta":{"origin":6272,"position":1},"title":"MT 3.11, kindasorta","author":"***Dave","date":"Tue 28-Sep-04 3:36pm","format":false,"excerpt":"More to follow, but the basic MT 3.11 install is complete ... with a few interface oddities behind (hopefully only) the scenes....","rel":"","context":"In &quot;Blogging &amp; Internet&quot;","block_context":{"text":"Blogging &amp; Internet","link":"https:\/\/hill-kleerup.org\/blog\/category\/blogging"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":6274,"url":"https:\/\/hill-kleerup.org\/blog\/2004\/09\/28\/mt_311_installa.html","url_meta":{"origin":6272,"position":2},"title":"MT 3.11 &#8211; Installation summary","author":"***Dave","date":"Tue 28-Sep-04 5:42pm","format":false,"excerpt":"My number one problem with my installation was that my FTP client (SmartFTP) didn't fully FTP things over. As you can imagine, this led to a certain amount of hair-pulling...","rel":"","context":"In &quot;Blogging &amp; Internet&quot;","block_context":{"text":"Blogging &amp; Internet","link":"https:\/\/hill-kleerup.org\/blog\/category\/blogging"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":6227,"url":"https:\/\/hill-kleerup.org\/blog\/2004\/10\/06\/notifier.html","url_meta":{"origin":6272,"position":3},"title":"Notifier","author":"***Dave","date":"Wed 6-Oct-04 9:17am","format":false,"excerpt":"One of the keen things about dynamic publishing is that I don't have to rebuild the whole blog archive when I make a change. To wit, I've installed Chad Everett's...","rel":"","context":"In &quot;Blogging &amp; Internet&quot;","block_context":{"text":"Blogging &amp; Internet","link":"https:\/\/hill-kleerup.org\/blog\/category\/blogging"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":12520,"url":"https:\/\/hill-kleerup.org\/blog\/2008\/04\/03\/movable_type_static_publi.html","url_meta":{"origin":6272,"position":4},"title":"Movable Type: static publishing with dynamic CGI script names","author":"***Dave","date":"Thu 3-Apr-08 3:20pm","format":false,"excerpt":"Well, that little digression turned into a big time sink. A few weeks back I converted my WIST quotations site into a static published site, rather than dynamic. That took...","rel":"","context":"In &quot;Blogging - Technical&quot;","block_context":{"text":"Blogging - Technical","link":"https:\/\/hill-kleerup.org\/blog\/category\/blogging\/blogging-technical"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":6239,"url":"https:\/\/hill-kleerup.org\/blog\/2004\/10\/04\/mt_dynamic_publ.html","url_meta":{"origin":6272,"position":5},"title":"MT dynamic publishing notes (yet again)","author":"***Dave","date":"Mon 4-Oct-04 2:00pm","format":false,"excerpt":"Okay, here's the good news: I figured out what was wrong with the dynamic publishing options I had set for my main blog (this one). In my IDC blog (\/blog\/idc\/),...","rel":"","context":"In &quot;Blogging &amp; Internet&quot;","block_context":{"text":"Blogging &amp; Internet","link":"https:\/\/hill-kleerup.org\/blog\/category\/blogging"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]}],"_links":{"self":[{"href":"https:\/\/hill-kleerup.org\/blog\/wp-json\/wp\/v2\/posts\/6272","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/hill-kleerup.org\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/hill-kleerup.org\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/hill-kleerup.org\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/hill-kleerup.org\/blog\/wp-json\/wp\/v2\/comments?post=6272"}],"version-history":[{"count":0,"href":"https:\/\/hill-kleerup.org\/blog\/wp-json\/wp\/v2\/posts\/6272\/revisions"}],"wp:attachment":[{"href":"https:\/\/hill-kleerup.org\/blog\/wp-json\/wp\/v2\/media?parent=6272"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/hill-kleerup.org\/blog\/wp-json\/wp\/v2\/categories?post=6272"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/hill-kleerup.org\/blog\/wp-json\/wp\/v2\/tags?post=6272"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}