{"id":26,"date":"2003-09-08T08:07:00","date_gmt":"2003-09-08T08:07:00","guid":{"rendered":"http:\/\/jclark.org\/weblog\/WebDev\/Blosxom\/plugins\/storystate\/storystate-0-1i.html"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-30T04:00:00","slug":"storystate-0-1i","status":"publish","type":"post","link":"https:\/\/jclark.org\/weblog\/2003\/09\/08\/storystate-0-1i\/","title":{"rendered":"Storystate 0+1i"},"content":{"rendered":"<p>My very first published plugin for <a href=\"http:\/\/www.blosxom.com\" title=\"The Blosxom Homepage\">Blosxom<\/a>.  You can <a href=\"http:\/\/jclark.org\/download\/plugins\/storystate-0+1i\">download it here<\/a>.<\/p>\n<p>Storystate provides a number of convenience variables for use with the interpolate_fancy plugin by Blosxom author Rael Dornfest.  It was designed to be especially useful with writeback. Storystate also allows presence of a <em>meta-writeback<\/em> tag to control if writebacks are open or closed. It&#8217;s basically useless without interpolate_fancy.<\/p>\n<p><strong><span class=\"caps\">NOTE<\/span>:<\/strong> best if used with interpolate_fancy version 2003-09-07 or later.<\/p>\n<p>Excerpt from the <span class=\"caps\">POD<\/span> docs:<\/p>\n<p>Just drop it in your $plugin_dir. Optionally, you can adjust the values of the configuration variables at the top of the file. There are covered later.<\/p>\n<p>Most of the variables are simple boolean indicators, using undef for false. This allows them to be used with interpolate_fancy&#8217;s $var&gt;?&gt; and !$var&gt;?&gt; constructs. Some variables are story specific, (updated for each story), while others are based on the request url and are valid in the head and foot as well.<\/p>\n<p>The request flag variables are:<\/p>\n<ul>\n<li><strong>$permalink<\/strong> true if request url is a subdir permalink, e.g. \/this\/that\/story.html <\/li>\n<li><strong>$datepermalink<\/strong> true if request url is a date permalink, e.g. \/2003\/09\/07\/story.html <\/li>\n<li><strong>$anypermalink<\/strong> true if request url is either of above <\/li>\n<li><strong>$blogroot<\/strong> true if request is for blog&#8217;s root e.g. \/ or \/index.html <\/li>\n<li><strong>$archive<\/strong> true if request if date style, e.g. \/2003\/09<\/li>\n<li><strong>$category<\/strong> true if request is subdir style, e.g. \/this\/that<\/li>\n<\/ul>\n<p>The story-specific flag variables are:<\/p>\n<ul>\n<li><strong>$writeback_closed<\/strong> true if writebacks are closed for story (see below)<\/li>\n<li><strong>$permalink_wbopen<\/strong> true if !$writeback_closed and $permalink<\/li>\n<li><strong>$permalink_wbclosed<\/strong> true if $writeback_closed and $permalink<\/li>\n<\/ul>\n<p>The idea of closing writebacks is that you are no longer accepting comments for a given story. Just add meta-writeback: on or meta-writeback: off to the header of the story. If no meta-writeback header is found, the value of the config variable $writeback_default is used instead. Values are on (writebacks open) and off (writebacks closed). This is of course dependant upon you implementing checks against these variables in our story template, see the example below.<\/p>\n<p>There is also a story-specific text variable:<\/p>\n<ul>\n<li><strong>$writeback_message<\/strong>  description of writeback state for story<\/li>\n<\/ul>\n<p>This is useful for links to your writeback page. It returns (by default):<\/p>\n<ul>\n<li><strong>&#8216;Add the first comment&#8217;<\/strong> If writebacks are open for story and no comments exist <\/li>\n<li><strong>&#8216;No Comments&#8217;<\/strong> if writebacks are close and no comments exist <\/li>\n<li><strong>&#8216;1 comment&#8217;<\/strong> if only one comment <\/li>\n<li><strong>&#8216;n comments&#8217;<\/strong> if &gt;1 comment, n=$writeback::count<\/li>\n<\/ul>\n<p>These messages are configurable, see the config variables at the top of the file, they are documented inline.<\/p>\n<p>See the <span class=\"caps\">POD<\/span> docs for an example of usage, I just can&#8217;t get sample <span class=\"caps\">HTML<\/span> to play nice with Textile2.  <\/p>","protected":false},"excerpt":{"rendered":"<p>My very first published plugin for Blosxom. You can download it here. Storystate provides a number of convenience variables for use with the interpolate_fancy plugin by Blosxom author Rael Dornfest. It was designed to be especially useful with writeback. Storystate also allows presence of a meta-writeback tag to control if writebacks are open or closed. [&hellip;]<\/p>","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[8],"tags":[],"class_list":["post-26","post","type-post","status-publish","format-standard","hentry","category-storystate"],"_links":{"self":[{"href":"https:\/\/jclark.org\/weblog\/wp-json\/wp\/v2\/posts\/26","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/jclark.org\/weblog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/jclark.org\/weblog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/jclark.org\/weblog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/jclark.org\/weblog\/wp-json\/wp\/v2\/comments?post=26"}],"version-history":[{"count":0,"href":"https:\/\/jclark.org\/weblog\/wp-json\/wp\/v2\/posts\/26\/revisions"}],"wp:attachment":[{"href":"https:\/\/jclark.org\/weblog\/wp-json\/wp\/v2\/media?parent=26"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/jclark.org\/weblog\/wp-json\/wp\/v2\/categories?post=26"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/jclark.org\/weblog\/wp-json\/wp\/v2\/tags?post=26"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}