{"id":2410,"date":"2009-12-19T11:10:26","date_gmt":"2009-12-19T16:10:26","guid":{"rendered":"http:\/\/www.allyngibson.net\/?p=2410"},"modified":"2009-12-19T11:10:26","modified_gmt":"2009-12-19T16:10:26","slug":"on-snowy-day-coding","status":"publish","type":"post","link":"http:\/\/www.allyngibson.com\/?p=2410","title":{"rendered":"On Snowy Day Coding"},"content":{"rendered":"<p>There&#8217;s a new version of WordPress out today, and I&#8217;ll probably download it and upgrade this weekend.  After the experience of moving to WordPress 2.8 &mdash; which wasn&#8217;t pleasant &mdash; I&#8217;m a little cautious.<\/p>\n<p>The main issue with that upgrade &mdash; the WordPress memory bloat &mdash; was resolved in one of the bugfix releases.  It&#8217;s still a <i>massive<\/i> piece of software, but that probably can&#8217;t be helped.<\/p>\n<p>And, while I haven&#8217;t upgraded my WordPress install, I <i>have<\/i> spent my morning working with PHP code, and I cobbled together a WordPress plugin.<\/p>\n<p>What I wanted was a different way of displaying archives.  I wanted a calendar view for archives, much like LiveJournal does, where you can get a yearly calendar, with links on each day to posts for that day.<\/p>\n<p>WordPress can do that, but only on a month-by-month basis.<\/p>\n<p>I took one plugin, the <a href=\"http:\/\/blog.deadbeaf.org\/wp_calendar_cloud_plugin\/\">Calendar Cloud Plugin<\/a>, and I was able to merge that with a routine that called WordPress&#8217; calendar code.  I had to experiment, to figure out how to pass the get_calendar function the month and year; it&#8217;s not written in such a way that you can, but I discovered there was <a href=\"http:\/\/wordpress.org\/support\/topic\/145939\">a way to <i>trick<\/i> it<\/a>.  Then, trial and error to figure out the right way to make the string for the &#8220;trick.&#8221;<\/p>\n<p>And that worked.  I had a table of monthly calendars.  But that didn&#8217;t really work the way I wanted &mdash; it gave me &#8220;next&#8221; and &#8220;previous&#8221; links at the bottom of each month&#8217;s calendar.  So I took the code for the get_calendar function, copied it into my plugin, renamed the function, and stripped out the code for the next and previous links.<\/p>\n<p>That worked.<\/p>\n<p>Then it was just a question of getting the calendars styled.<\/p>\n<p>I like <a href=\"http:\/\/www.allyngibson.com\/?page_id=1615\">the final result<\/a>.  It does what I want, and it looks good.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>There&#8217;s a new version of WordPress out today, and I&#8217;ll probably download it and upgrade this weekend. After the experience of moving to WordPress 2.8 &mdash; which wasn&#8217;t pleasant &mdash; I&#8217;m a little cautious. The main issue with that upgrade &mdash; the WordPress memory bloat &mdash; was resolved in one of the bugfix releases. It&#8217;s<a class=\"more-link\" href=\"http:\/\/www.allyngibson.com\/?p=2410\">Continue reading <span class=\"screen-reader-text\">&#8220;On Snowy Day Coding&#8221;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[75],"tags":[58,4096],"class_list":["post-2410","post","type-post","status-publish","format-standard","hentry","category-writing","tag-php","tag-wordpress","entry"],"_links":{"self":[{"href":"http:\/\/www.allyngibson.com\/index.php?rest_route=\/wp\/v2\/posts\/2410","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.allyngibson.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.allyngibson.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.allyngibson.com\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"http:\/\/www.allyngibson.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2410"}],"version-history":[{"count":0,"href":"http:\/\/www.allyngibson.com\/index.php?rest_route=\/wp\/v2\/posts\/2410\/revisions"}],"wp:attachment":[{"href":"http:\/\/www.allyngibson.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2410"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.allyngibson.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2410"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.allyngibson.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2410"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}