<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	xmlns:series="http://unfoldingneurons.com/"
	>

<channel>
	<title>scompt.com &#187; writing</title>
	<atom:link href="http://scompt.com/blog/archives/tag/writing/feed/" rel="self" type="application/rss+xml" />
	<link>http://scompt.com</link>
	<description>The website of Edward Dale</description>
	<lastBuildDate>Sun, 04 Sep 2011 15:54:07 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
<xhtml:meta xmlns:xhtml="http://www.w3.org/1999/xhtml" name="robots" content="noindex" />
		<item>
		<title>Consider the lobster</title>
		<link>http://scompt.com/blog/archives/2008/09/13/consider-the-lobster</link>
		<comments>http://scompt.com/blog/archives/2008/09/13/consider-the-lobster#comments</comments>
		<pubDate>Sun, 14 Sep 2008 04:43:21 +0000</pubDate>
		<dc:creator>Edward Dale</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[writing]]></category>

		<guid isPermaLink="false">http://scompt.com/?p=231</guid>
		<description><![CDATA[As my time in Würzburg teaching English was winding to an end, I was seeking a longer text that could challenge my advanced class of juniors. We had spent almost a year (two for some of them) reading political articles and random current events, but I wanted to find something literary, something that had some [...]]]></description>
			<content:encoded><![CDATA[<p>As my time in Würzburg teaching English was winding to an end, I was seeking a longer text that could challenge my advanced class of juniors.  We had spent almost a year (two for some of them) reading political articles and random current events, but I wanted to find something literary, something that had some level of merit.  I also wanted something that would be interesting and hopefully draw them in.</p>
<p><span id="more-231"></span><br />
My first thought went to <a href="http://www.nytimes.com/2007/04/12/books/12vonnegut.html">Kurt Vonnegut</a>.  Not only was his writing amazing and funny and poignant, but having died recently, the media was full of articles singing his praises, which I thought I could use to pique my students&#8217; interest.  Unfortunately, in the end, I wasn&#8217;t able to find a piece of suitable length with a suitable vocabulary.</p>
<p>After further consideration, my mind went to David Foster Wallace.  Of course, his <a href="http://en.wikipedia.org/wiki/Infinite_Jest">>1000 page tome</a> wouldn&#8217;t do, but his much shorter essay on the ethics of eating/cooking/celebrating <a href="http://www.lobsterlib.com/feat/davidwallace/page/lobsterarticle.pdf">lobster</a> fit the bill for length and humor well.</p>
<p>We started reading it and soon enough we were immersed in a world of lobster fests, melted butter, &#8230; and footnotes.  DFW is famous for his footnotes and although I tried to stress the importance of the footnotes and the suggestion that they should be read with the text, I never quite convinced the students to give them the respect they deserved.</p>
<p>On my last day of class at <a href="http://siebold-gymnasium.de/">Siebold Gymnasium</a>, we only had another page or two to read.  It was definitely a length that we could have tackled in the hour that we had.  However, the students had other plans and we ended up celebrating my departure with two cakes, one in the shape of&#8230; a lobster.  Little did I know, but in the weeks that we had read the essay, the students had started to wonder if I had some kind of lobster fetish.</p>
<p>This is why it&#8217;s especially sad to read today that <a href="http://www.nytimes.com/aponline/books/AP-Obit-Wallace.html">DFW</a> hanged himself last night.</p>
]]></content:encoded>
			<wfw:commentRss>http://scompt.com/blog/archives/2008/09/13/consider-the-lobster/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Updating the Manage Posts Filtering for WordPress 2.5</title>
		<link>http://scompt.com/blog/archives/2008/05/03/updating-the-manage-posts-filtering-for-wordpress-25</link>
		<comments>http://scompt.com/blog/archives/2008/05/03/updating-the-manage-posts-filtering-for-wordpress-25#comments</comments>
		<pubDate>Sat, 03 May 2008 12:25:53 +0000</pubDate>
		<dc:creator>Edward Dale</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[wordpress]]></category>
		<category><![CDATA[writing]]></category>

		<guid isPermaLink="false">http://scompt.com/?p=198</guid>
		<description><![CDATA[Since the last post on Custom Filtering in the Manage Posts Screen, WordPress 2.5 has been released to the world. While the techniques discussed in that article are still valid, due to the big admin interface rewrite, the results don&#8217;t look as pretty as they could. In this post, I&#8217;ll discuss updating the code from [...]]]></description>
			<content:encoded><![CDATA[<p>Since the last post on <a href="http://scompt.com/archives/2008/02/25/custom-filtering-in-the-wordpress-manage-posts-screen">Custom Filtering in the Manage Posts Screen</a>, <a href="http://codex.wordpress.org/Version_2.5">WordPress 2.5</a> has been released to the world.  While the techniques discussed in that article are still valid, due to the big admin interface rewrite, the results don&#8217;t look as pretty as they could.  In this post, I&#8217;ll discuss updating the code from the previous post so that it works <strong>and looks good</strong> through all modern WordPress versions.</p>
<p><span id="more-198"></span></p>
<h4>One quick note</h4>
<p>It appears that something changed in Version 2.5 that breaks the way that the <code>posts_where</code> hook was being attached.  Initially, the <code>admin_head</code> hook was being used to attach it.  This isn&#8217;t that great because it means the hook is loaded on all admin pages, which isn&#8217;t really necessary.  Also, as I said, it just doesn&#8217;t work in the new version of WordPress.  A better way, which replaces lines 21&mdash;24 in the code below is:<br />
<code>
<pre name="code" class="php">add_action('load-edit.php', 'scompt_load_edit_page');
function scompt_load_edit_page() {
    add_filter('posts_where', 'scompt_posts_where');
}</pre>
<p></code></p>
<h4>What we&#8217;re starting with</h4>
<div class="imageright">
<a href='/wordpress/wp-content/uploads/2008/05/version_compare.jpg' title='Comparison of WordPress 2.3 &amp; 2.5'><img src='/wordpress/wp-content/uploads/2008/05/version_compare-150x150.jpg' alt='Comparison of WordPress 2.3 &amp; 2.5' /></a></p>
<p>Comparison of WordPress 2.3 &amp; 2.5</p>
</div>
<p>Below is the code that we ended up with in the last post.  To the right, you&#8217;ll see a screenshot of how it looks in the WordPress 2.3 and 2.5.  WordPress 2.2 should look the same as 2.3, but it&#8217;s old enough that we&#8217;re not concerned with it.  There are a couple things worth noting in the image.</p>
<p>In WordPress 2.3, the dropdown fits with the other dropdowns.  That&#8217;s good.  Notice that there&#8217;s two &#8216;Filter&#8217; buttons.  That&#8217;s bad, but was necessary because the <code>restrict_manage_posts</code> hook is called outside of the form element.  In WordPress 2.5, there&#8217;s a stylish light-blue bar where the filters should go, and there&#8217;s our filter sitting out in the middle of nowhere.  Also, there&#8217;s no longer a border with label surrounding the dropdown.  The last thing to notice is that the text inside of the dropdown is different: &#8220;Any&#8221; compared to &#8220;Show all Dates&#8221; in the case of the date filter.  This leaves us with a nice TODO list of things to accomplish in this post:</p>
<ol>
<li>Get rid of the extra &#8216;Filter&#8217; button</li>
<li>Put the dropdown in the filter bar</li>
<li>Get rid of the border and label surrounding the dropdown</li>
<li>Make the text shown in the dropdown fit better with the other filters</li>
<li>Make sure it still works and looks good in WordPress 2.3</li>
</ol>
<p><code>
<pre name="code" class="php">add_action(&#x27;restrict_manage_posts&#x27;, &#x27;scompt_restrict_manage_posts&#x27;);
function scompt_restrict_manage_posts() {
    global $wpdb;
    $has_count = $wpdb-&gt;get_var(&quot;SELECT COUNT(*) FROM wp_posts WHERE post_type=&#x27;post&#x27; &quot;.
        &quot;AND ID IN (SELECT post_parent FROM wp_posts WHERE post_type=&#x27;attachment&#x27;)&quot;);
    $hasnt_count = $wpdb-&gt;get_var(&quot;SELECT COUNT(*) FROM wp_posts WHERE post_type=&#x27;post&#x27; &quot;.
        &quot;AND ID NOT IN (SELECT post_parent FROM wp_posts WHERE post_type=&#x27;attachment&#x27;)&quot;);
    ?&gt;
		&lt;form name=&quot;scompt_attachmentform&quot; id=&quot;scompt_attachmentform&quot; action=&quot;&quot; method=&quot;get&quot;&gt;
			&lt;fieldset style=&quot;margin: 0pt 1em 1em 1.5em; padding: 0pt; float: left;&quot;&gt;
    			&lt;legend&gt;&lt;?php _e(&#x27;Attachments&#x27;); ?&gt;&amp;hellip;&lt;/legend&gt;
    			&lt;select name=&#x27;scompt_attachments&#x27; id=&#x27;scompt_attachments&#x27; class=&#x27;postform&#x27;&gt;
        			&lt;option value=&quot;&quot;&gt;&lt;?php _e(&#x27;All&#x27;); ?&gt;&lt;/option&gt;
        			&lt;option value=&quot;has&quot; &lt;?php if( isset($_GET[&#x27;scompt_attachments&#x27;]) &amp;&amp; $_GET[&#x27;scompt_attachments&#x27;]==&#x27;has&#x27;) echo &#x27;selected=&quot;selected&quot;&#x27; ?&gt;&gt;&lt;?php _e(&#x27;Has attachments&#x27;); ?&gt;  (&lt;?php echo $has_count ?&gt;)&lt;/option&gt;
        			&lt;option value=&quot;hasnt&quot; &lt;?php if( isset($_GET[&#x27;scompt_attachments&#x27;]) &amp;&amp; $_GET[&#x27;scompt_attachments&#x27;]==&#x27;hasnt&#x27;) echo &#x27;selected=&quot;selected&quot;&#x27; ?&gt;&gt;&lt;?php _e(&#x27;Has no attachments&#x27;); ?&gt;  (&lt;?php echo $hasnt_count ?&gt;)&lt;/option&gt;
        		&lt;/select&gt;
			&lt;/fieldset&gt;
			&lt;input type=&quot;submit&quot; name=&quot;submit&quot; value=&quot;&lt;?php _e(&#x27;Filter &amp;#187;&#x27;); ?&gt;&quot; class=&quot;button&quot; style=&quot;float:left;margin:14px 0pt 1em;position:relative;top:0.35em;&quot;/&gt;
		&lt;/form&gt;
	&lt;?php
}

add_action(&#x27;admin_head&#x27;, &#x27;scompt_admin_head&#x27;);
function scompt_admin_head() {
    add_filter(&#x27;posts_where&#x27;, &#x27;scompt_posts_where&#x27;);
}
function scompt_posts_where($where) {
    global $wpdb;
    if( $_GET[&#x27;scompt_attachments&#x27;] == &#x27;has&#x27; ) {
        $where .= &quot; AND ID IN (SELECT post_parent FROM {$wpdb-&gt;posts} WHERE post_type=&#x27;attachment&#x27; )&quot;;
    } else if( $_GET[&#x27;scompt_attachments&#x27;] == &#x27;hasnt&#x27; ) {
        $where .= &quot; AND ID NOT IN (SELECT post_parent FROM {$wpdb-&gt;posts} WHERE post_type=&#x27;attachment&#x27; )&quot;;
    }
    return $where;
}</pre>
<p></code></p>
<h4>Getting down to work</h4>
<p>I would suggest that we just head straight down our TODO list.  The first point is to get rid of the &#8216;Filter&#8217; button.  Luckily, the <code>restrict_manage_posts</code> hook is called <strong>inside</strong> the form in version 2.5, eliminating the need for it.  This also means that we can leave out the <code>form</code> tag that was previously necessary.  In summary, cut out lines 9, 18, and 19.</p>
<p>The second point and third points can be solved together.  The reason the dropdown is getting shoved outside the filter bar is actually <em>because</em> of the border and label that we wanted to get rid of anyway.  This means not printing the <code>fieldset</code> and <code>label</code> tags, so we can get rid of lines 10, 11, and 17.  You&#8217;ll notice that out code is getting whittled away pretty quickly.  That&#8217;s what I call progress.</p>
<p>The fourth point is a logical consequence of the previous one.  There&#8217;s no longer a label describing what the dropdown does, so now the text inside the dropdown has to do so.  Previously, our label was &#8220;Attachments&#8221; and the dropdown text was &#8220;All&#8221;.  Now, we need to come up with a phrase that captures the essence of the two former phrases.  The best I could come up with is &#8220;View with/without attachments&#8221;, which needs to be changed in line 13.  Leave a comment if you have a better idea.  This label will go inside the default first option in the dropdown.</p>
<div class="imageright">
<a href='/wordpress/wp-content/uploads/2008/05/filtering_posts_25.jpg' title='Posts filtering on 2.5'><img src='/wordpress/wp-content/uploads/2008/05/filtering_posts_25-150x99.jpg' alt='Posts filtering on 2.5' /></a></p>
<p>Posts filtering on 2.5</p>
</div>
<p>At this point, having addressed the first four points, we have a working chunk of code for WordPress 2.5.  Below is the updated copy of the <code>scompt_restrict_manage_posts</code> function and to the right a screenshot of the results.  We&#8217;ll hit the last point in the next section.</p>
<p><code>
<pre name="code" class="php">function scompt_restrict_manage_posts() {
    global $wpdb, $wp_version;
    $has_count = $wpdb-&gt;get_var(&quot;SELECT COUNT(*) FROM wp_posts WHERE post_type=&#x27;post&#x27; &quot;.
        &quot;AND ID IN (SELECT post_parent FROM wp_posts WHERE post_type=&#x27;attachment&#x27;)&quot;);
    $hasnt_count = $wpdb-&gt;get_var(&quot;SELECT COUNT(*) FROM wp_posts WHERE post_type=&#x27;post&#x27; &quot;.
        &quot;AND ID NOT IN (SELECT post_parent FROM wp_posts WHERE post_type=&#x27;attachment&#x27;)&quot;);

    ?&gt;
	&lt;select name=&#x27;scompt_attachments&#x27; id=&#x27;scompt_attachments&#x27; class=&#x27;postform&#x27;&gt;
		&lt;option value=&quot;0&quot;&gt;&lt;?php _e(&#x27;View with/without attachments&#x27;) ?&gt;&lt;/option&gt;
		&lt;option value=&quot;has&quot; &lt;?php if( isset($_GET[&#x27;scompt_attachments&#x27;]) &amp;&amp; $_GET[&#x27;scompt_attachments&#x27;]==&#x27;has&#x27;) echo &#x27;selected=&quot;selected&quot;&#x27; ?&gt;&gt;&lt;?php _e(&#x27;Has attachments&#x27;); ?&gt;  (&lt;?php echo $has_count ?&gt;)&lt;/option&gt;
		&lt;option value=&quot;hasnt&quot; &lt;?php if( isset($_GET[&#x27;scompt_attachments&#x27;]) &amp;&amp; $_GET[&#x27;scompt_attachments&#x27;]==&#x27;hasnt&#x27;) echo &#x27;selected=&quot;selected&quot;&#x27; ?&gt;&gt;&lt;?php _e(&#x27;Has no attachments&#x27;); ?&gt;  (&lt;?php echo $hasnt_count ?&gt;)&lt;/option&gt;
	&lt;/select&gt;
	&lt;?php
}</pre>
<p></code></p>
<h4>Backwards Compatibility</h4>
<p>Now that we&#8217;ve shrunk our code down to it&#8217;s 2.5 essentials, it&#8217;s time to balloon it back up again to make it backward-compatible with 2.3.  If you&#8217;re running 2.5 and don&#8217;t plan on looking back anytime soon, you can skip this section and still live a happy life.</p>
<p>The first step is being able to differentiate between version 2.3 and 2.5.  To do this, we&#8217;ll take advantage of the PHP function <code>version_compare</code> and the WordPress global <code>$wp_version</code> which comes from <code>wp-includes/version.php</code>.  Putting those together, we get the following useful bit:</p>
<p><code>
<pre name="code" class="php">if( version_compare( $wp_version, '2.5', '<' ) ) {
    // Versions before 2.5
} else {
    // Version 2.5 and later
}</pre>
<p></code></p>
<p>Because our 2.5 code is essentially the 2.3 code wrapped in a couple tags (<code>form</code> and <code>fieldset</code>) with a couple extras thrown in at the beginning and end (<code>legend</code> and <code>input</code>), I would suggest making variables to hold these extra <code>$before</code> and <code>$after</code> bits.  For version 2.5, these variables will be empty.  The only other difference is the verbage in the dropdown.  Here's the final code that will work well and look good for WordPress versions 2.2 &mdash; 2.5.</p>
<p><code>
<pre name="code" class="php">function scompt_restrict_manage_posts() {
    global $wpdb, $wp_version;
    $has_count = $wpdb-&gt;get_var(&quot;SELECT COUNT(*) FROM wp_posts WHERE post_type=&#x27;post&#x27; &quot;.
        &quot;AND ID IN (SELECT post_parent FROM wp_posts WHERE post_type=&#x27;attachment&#x27;)&quot;);
    $hasnt_count = $wpdb-&gt;get_var(&quot;SELECT COUNT(*) FROM wp_posts WHERE post_type=&#x27;post&#x27; &quot;.
        &quot;AND ID NOT IN (SELECT post_parent FROM wp_posts WHERE post_type=&#x27;attachment&#x27;)&quot;);

    if( version_compare( $wp_version, &#x27;2.5&#x27;, &#x27;&lt;&#x27; ) ) {
        $before  = &#x27;&lt;form name=&quot;scompt_attachmentform&quot; id=&quot;scompt_attachmentform&quot; action=&quot;&quot; method=&quot;get&quot;&gt;&#x27;;
        $before .= &#x27;&lt;fieldset style=&quot;margin: 0pt 1em 1em 1.5em; padding: 0pt; float: left;&quot;&gt;&#x27;;
        $before .= &#x27;&lt;legend&gt;&#x27;. __(&#x27;Attachments&#x27;) .&#x27;&amp;hellip;&lt;/legend&gt;&#x27;;
        $all = __(&#x27;All&#x27;);
        $after  = &#x27;&lt;/fieldset&gt;&#x27;;
        $after .= &#x27;&lt;input type=&quot;submit&quot; name=&quot;submit&quot; value=&quot;&#x27;. __(&#x27;Filter &amp;#187;&#x27;) .&#x27;&quot; class=&quot;button&quot; style=&quot;float:left;margin:14px 0pt 1em;position:relative;top:0.35em;&quot;/&gt;&#x27;;
        $after .= &#x27;&lt;/form&gt;&#x27;;
    } else {
        $before = &quot;&quot;;
        $all = __(&#x27;View with/without attachments&#x27;);
        $after = &quot;&quot;;
    }
    echo $before;
    ?&gt;
	&lt;select name=&#x27;scompt_attachments&#x27; id=&#x27;scompt_attachments&#x27; class=&#x27;postform&#x27;&gt;
		&lt;option value=&quot;0&quot;&gt;&lt;?php echo $all; ?&gt;&lt;/option&gt;
		&lt;option value=&quot;has&quot; &lt;?php if( isset($_GET[&#x27;scompt_attachments&#x27;]) &amp;&amp; $_GET[&#x27;scompt_attachments&#x27;]==&#x27;has&#x27;) echo &#x27;selected=&quot;selected&quot;&#x27; ?&gt;&gt;&lt;?php _e(&#x27;Has attachments&#x27;); ?&gt;  (&lt;?php echo $has_count ?&gt;)&lt;/option&gt;
		&lt;option value=&quot;hasnt&quot; &lt;?php if( isset($_GET[&#x27;scompt_attachments&#x27;]) &amp;&amp; $_GET[&#x27;scompt_attachments&#x27;]==&#x27;hasnt&#x27;) echo &#x27;selected=&quot;selected&quot;&#x27; ?&gt;&gt;&lt;?php _e(&#x27;Has no attachments&#x27;); ?&gt;  (&lt;?php echo $hasnt_count ?&gt;)&lt;/option&gt;
	&lt;/select&gt;
	&lt;?php
	echo $after;
}

add_action(&#x27;load-edit.php&#x27;, &#x27;scompt_init_attachments&#x27;);
function scompt_init_attachments() {
    add_filter(&#x27;posts_where&#x27;, &#x27;scompt_posts_where&#x27;);
    add_action(&#x27;restrict_manage_posts&#x27;, &#x27;scompt_restrict_manage_posts&#x27;);
}
function scompt_posts_where($where) {
    global $wpdb;
    if( $_GET[&#x27;scompt_attachments&#x27;] == &#x27;has&#x27; ) {
        $where .= &quot; AND ID IN (SELECT post_parent FROM {$wpdb-&gt;posts} WHERE post_type=&#x27;attachment&#x27; )&quot;;
    } else if( $_GET[&#x27;scompt_attachments&#x27;] == &#x27;hasnt&#x27; ) {
        $where .= &quot; AND ID NOT IN (SELECT post_parent FROM {$wpdb-&gt;posts} WHERE post_type=&#x27;attachment&#x27; )&quot;;
    }
    return $where;
}</pre>
<p></code></p>
<h4>Conclusion</h4>
<p>We've now successfully updated the Manage Posts filtering code for WordPress 2.5.  In the process, we even made it backward compatible.  This has been another post in my series on <a href="http://scompt.com/archives/series/pimp-my-manage-panel">Pimping your Manage Panel</a>.  Keep an eye peeled here for when I present my ever-promised technique of filtering in the Manage Pages panel.</p>
<h4>Update!</h4>
<p>One thing I forgot to mention.  In WordPress 2.5, the <code>restrict_manage_posts</code> hook is also used on the upload screen.  To make sure your dropdown code doesn't appear on the upload screen, make sure you add the <code>restrict_manage_posts</code> action inside the <code>scompt_init_attachments</code> hook.  This will make sure it only gets loaded when <code>edit.php</code> is called.  I've made the change on the above code snip</p>
]]></content:encoded>
			<wfw:commentRss>http://scompt.com/blog/archives/2008/05/03/updating-the-manage-posts-filtering-for-wordpress-25/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<series:name><![CDATA[Pimp my Manage panel]]></series:name>
	</item>
		<item>
		<title>Add a new WordPress backup schedule with WP-Crontrol</title>
		<link>http://scompt.com/blog/archives/2008/04/29/add-a-new-wordpress-backup-schedule-with-wp-crontrol</link>
		<comments>http://scompt.com/blog/archives/2008/04/29/add-a-new-wordpress-backup-schedule-with-wp-crontrol#comments</comments>
		<pubDate>Tue, 29 Apr 2008 15:08:22 +0000</pubDate>
		<dc:creator>scompt</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[wordpress]]></category>
		<category><![CDATA[writing]]></category>

		<guid isPermaLink="false">http://scompt.com/?p=187</guid>
		<description><![CDATA[Welcome to the first post in a series of posts on how to take control of the WP-Cron system using WP-Crontrol. WP-Cron is a tangle of black magic that allows a plugin developer or a user to schedule commands to be executed. WP-Crontrol is a plugin that lets a blog owner see through that magic [...]]]></description>
			<content:encoded><![CDATA[<p>Welcome to the first post in a series of posts on <a href="http://scompt.com/archives/series/taking-control-of-wp-cron-using-wp-crontrol">how to take control of the WP-Cron system</a> using <a href="http://scompt.com/projects/wp-crontrol">WP-Crontrol</a>.  WP-Cron is a tangle of black magic that allows a plugin developer or a user to schedule commands to be executed.  WP-Crontrol is a plugin that lets a blog owner see through that magic and figure out what&#8217;s actually going on.  In this post, I&#8217;ll discuss using WP-Crontrol to add a new cron schedule that can be used by <a href="http://www.ilfilosofo.com/blog/wp-db-backup/">WP Database Backup</a>.  This means backups when <strong>you</strong> want them.</p>
<p><span id="more-187"></span></p>
<h4>Introduction</h4>
<p>Deep in the heart of WordPress, there&#8217;s a variable that stores the possible recurrence intervals (schedules) that a WP-Cron job can have.  A stock installation comes with two: hourly and daily.  Plugins can also add additional ones; this is what WP-Crontrol allows you to do in the Manage-&gt;Crontrol admin panel.  Plugins use these intervals when scheduling cron jobs.  If you only have an hourly and daily schedule, then you can&#8217;t run a cron task every other day, for example.  And that&#8217;s the task that we&#8217;ll attack in this post: scheduling a backup every other day.</p>
<h4>Requirements</h4>
<p>We&#8217;ll need two plugins to do the following steps.  The first one, of course, is <a href="http://scompt.com/projects/wp-crontrol">WP-Crontrol</a> as that&#8217;s what this whole series is about.  The second plugin you&#8217;ll need is <a href="http://www.ilfilosofo.com/blog/wp-db-backup/">WP Database Backup</a> because that&#8217;s the focus of this post.</p>
<h4>The Lay of the Land</h4>
<div class="imageright"><a title="The Manage-&gt;Crontrol admin panel that we start with" href="http://scompt.com/wordpress/wp-content/uploads/2008/04/manage_crons_before.jpg"><img src="http://scompt.com/wordpress/wp-content/uploads/2008/04/manage_crons_before-150x150.jpg" alt="The Manage-&gt;Crontrol admin panel that we start with" /></a></p>
<p>The Manage-&gt;Crontrol admin<br />
panel that we start with</p>
</div>
<p>As a first step, I recommend familiarizing yourself with WP-Crontrol and seeing what&#8217;s currently in the WP-Cron system.  Goto the Manage-&gt;Crontrol admin panel and you&#8217;ll see the current cron jobs that are scheduled.  Depending on the plugins that you use, the list may be empty; WordPress doesn&#8217;t make too much use of the cron system out of the box.</p>
<p>Cron schedules are stored in the Settings-&gt;Crontrol admin panel.  There, you will see comes with WordPress (hourly and daily), as well as one that comes with WP-Crontrol (twicedaily) and one from WP Database Backup (weekly).  There&#8217;s a chance that other plugins have added additional schedules also.</p>
<div class="imageright"><a title="The Settings-&gt;Crontrol admin panel that we start with" href="http://scompt.com/wordpress/wp-content/uploads/2008/04/manage_schedules_before.jpg"><img src="http://scompt.com/wordpress/wp-content/uploads/2008/04/manage_schedules_before-150x150.jpg" alt="The Settings-&gt;Crontrol admin panel that we start with" /></a></p>
<p>The Settings-&gt;Crontrol admin<br />
panel that we start with</p>
</div>
<p>Now pop over to the WP Database Backup configuration in the Manage-&gt;Backup admin panel.  At the bottom of the page, in the &#8216;Scheduled Backup&#8217; section, you&#8217;ll see the same list of schedules.  That&#8217;s no coincidence.  The backup plugin pulls it&#8217;s list from the same place that WP-Crontrol does, namely the <code>cron_schedules</code> filter.  You&#8217;ll notice that if your desired interval isn&#8217;t in this list, you&#8217;re outta luck.</p>
<h4>Adding the schedule</h4>
<p>At this point, we should be able to jump right in and get to adding the &#8216;Every other day&#8217; schedule.  Here&#8217;s how to get started:</p>
<div class="imageright"><a title="Having added the new schedule" href="http://scompt.com/wordpress/wp-content/uploads/2008/04/added_new_schedule.jpg"><img src="http://scompt.com/wordpress/wp-content/uploads/2008/04/added_new_schedule-150x150.jpg" alt="Having added the new schedule" /></a></p>
<p>Having added the new schedule</p>
</div>
<div class="imageleft"><a title="Adding the new schedule" href="http://scompt.com/wordpress/wp-content/uploads/2008/04/add_new_schedule.jpg"><img src="http://scompt.com/wordpress/wp-content/uploads/2008/04/add_new_schedule-150x150.jpg" alt="Adding the new schedule" /></a></p>
<p>Adding the new schedule</p>
</div>
<ol>
<li>Go back to the Settings-&gt;Crontrol admin panel.  This is where cron schedules are managed, remember?</li>
<li>Take a look at the bottom of the page under the heading &#8216;Add a new cron schedule&#8217;.  This is where we want to be.  Let&#8217;s start filling out the form.</li>
<li><strong>Internal name</strong> is just something used by WordPress to keep track of your schedule.  Something simple, preferably lower-case with no spaces or weird characters is advised.  A good idea for our new schedule would be &#8216;everyotherday&#8217;.  Crazy, I know.</li>
<li><strong>Interval</strong> is the number of seconds between executions of the cron job.  Instead of trying to figure out the number of seconds in two days, we&#8217;ll just let Crontrol do it for us.  Enter &#8217;2 days&#8217; in the box and it will figure out that there are 172800 seconds in two days after the schedule is added.  <a href="http://www.gnu.org/software/tar/manual/html_node/tar_119.html#SEC119">GNU Date Input</a> is what provides this magic and you can use any of the units shown at that link.</li>
<li><strong>Display name</strong> is&#8230; wait for it&#8230; the name of the schedule that is displayed to the user, you, when selecting schedules.  A good value for this might be &#8216;Weekly&#8217;, but &#8216;wöchentlich&#8217; or &#8216;toutes les semaines&#8217; work also depending on where you hail from.</li>
<li>Click on the button at the bottom and gaze in wonder as your new schedule appears in the list.  Notice that there&#8217;s a delete link to the right of it while next to the other schedules there&#8217;s none.  This is because you can only delete schedules that have been added by Crontrol to prevent disturbing cron jobs that are expecting certain schedules to be present.</li>
</ol>
<h4>Putting the schedule to use</h4>
<p>Now that the schedule is in place, we need to tell WP Database Backup to use it.  Luckily, this is super simple.  If you go back to the Manage-&gt;Backup admin panel, you&#8217;ll see that the new &#8216;everyotherday&#8217; schedule is available.  All that&#8217;s left to do is select the new schedule and submit the backup job.</p>
<h4>Verifying and tweaking</h4>
<p>The backup cron job is now added, but let&#8217;s go take a look at it to see exactly what and when is scheduled.  To do this, go to the Manage-&gt;Crontrol admin panel.  If there weren&#8217;t any hooks present before, there should be one now: <code>wp_db_backup_cron</code>.  You can see that it is using our every other day schedule, as expected.  You can also see that it&#8217;s scheduled to run about two days from right now.  In my case, that means at 11 o&#8217;clock in the morning.  This isn&#8217;t too nice; we&#8217;d much rather have it run at 2am or some such time.  Here&#8217;s how to get that done:</p>
<div class="imageright"><a title="The final cron job" href="http://scompt.com/wordpress/wp-content/uploads/2008/04/final_cron.jpg"><img src="http://scompt.com/wordpress/wp-content/uploads/2008/04/final_cron-150x95.jpg" alt="The final cron job" /></a></p>
<p>The final cron job</p>
</div>
<ol>
<li>Click on the &#8216;Edit&#8217; link next to the <code>wp_db_backup_cron</code> cron job to get the details into the edit box below.</li>
<li>Change the &#8216;Next Run&#8217; date to the more desirable 2am time and click on &#8216;Modify&#8217;.</li>
<li>Verify that the backup job will run next in two days at 2am.</li>
</ol>
<h4>Conclusion</h4>
<p>In this post, we&#8217;ve exercised two of the main features provided by WP-Crontrol: adding new cron schedules and editing existing cron jobs.  Keep an eye on this series on <a href="http://scompt.com/archives/series/taking-control-of-wp-cron-using-wp-crontrol">Taking control of WP-Cron using WP-Crontrol</a> to further example of using WP-Crontrol and all of it&#8217;s features.</p>
<p>[Edit: If you liked this, you might like some of the posts in my series on <a href="http://scompt.com/archives/series/pimp-my-manage-panel">Pimping your Manage panel</a>.]</p>
]]></content:encoded>
			<wfw:commentRss>http://scompt.com/blog/archives/2008/04/29/add-a-new-wordpress-backup-schedule-with-wp-crontrol/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
	
		<series:name><![CDATA[Taking control of WP-Cron using WP-Crontrol]]></series:name>
	</item>
		<item>
		<title>Custom filtering in the WordPress Manage Posts screen</title>
		<link>http://scompt.com/blog/archives/2008/02/25/custom-filtering-in-the-wordpress-manage-posts-screen</link>
		<comments>http://scompt.com/blog/archives/2008/02/25/custom-filtering-in-the-wordpress-manage-posts-screen#comments</comments>
		<pubDate>Mon, 25 Feb 2008 10:26:59 +0000</pubDate>
		<dc:creator>scompt</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[wordpress]]></category>
		<category><![CDATA[writing]]></category>

		<guid isPermaLink="false">http://scompt.com/archives/2008/02/25/custom-filtering-in-the-wordpress-manage-posts-screen</guid>
		<description><![CDATA[This is the most recent post my series on customizing the Manage Posts/Pages screen. The first couple posts dealt with adding custom columns to the Manage Posts and Manage Pages screens and this post will demonstrate how one can add custom filtering to the Manage Posts screen using the restrict_manage_posts action. Introduction As was the [...]]]></description>
			<content:encoded><![CDATA[<p>This is the most recent post my series on <a href="http://scompt.com/archives/series/pimp-my-manage-panel">customizing the Manage Posts/Pages screen</a>.  The first couple posts dealt with adding custom columns to the <a href="http://scompt.com/archives/2007/10/20/adding-custom-columns-to-the-wordpress-manage-posts-screen">Manage Posts</a> and <a href="http://scompt.com/archives/2007/10/26/adding-custom-columns-to-the-wordpress-manage-pages-screen">Manage Pages</a> screens and this post will demonstrate how one can add custom filtering to the Manage Posts screen using the <code>restrict_manage_posts</code> action.</p>
<p><span id="more-176"></span></p>
<h4>Introduction</h4>
<p>As was the case with the manage_posts_columns and manage_posts_custom_column hooks, a search on <a href="http://www.google.com/search?q=restrict_manage_posts">Google</a> or the <a href="http://wordpress.org/search/restrict_manage_posts">Codex</a> turns up little in the way of documentation.  The only things that approach being useful are the source code available at <a href="http://xref.redalt.com/wptrunk/wp-admin/edit.php.htm">redalt.com</a> and the one sentence on the <a href="http://codex.wordpress.org/Plugin_API/Action_Reference">Codex</a>:</p>
<blockquote><p>&#8220;Runs before the list of posts to edit is put on the screen in the admin menus.&#8221;</p></blockquote>
<p>This article will expand on the code that was developed in a <a href="http://scompt.com/archives/2007/10/20/adding-custom-columns-to-the-wordpress-manage-posts-screen">previous one</a>.  That code adds a new <em>attachments</em> column to the Manage Posts screen.  The code that will developed below will allow filtering on this column.  WordPress versions 2.2 &mdash; 2.5 will be targeted as these are the only versions with the needed hook.</p>
<h4>Overview</h4>
<div class="imageright">
<a href='/wordpress/wp-content/uploads/2008/02/custom_filtering1.png' title="The Manage Posts screen we're starting with"><img src='/wordpress/wp-content/uploads/2008/02/custom_filtering1.thumbnail.png' alt="The Manage Posts screen we're starting with" /></a></p>
<p>The Manage Posts screen <br />we&#8217;re starting with</p>
</div>
<p>Your Manage Posts screen should look like the one to the right, minus the red and green boxes.  This is our canvas.  Inside the red box, you can see the column that we added previously, which we will be filtering on now.  Inside the green box, we will be adding the UI elements we want: a dropdown box and a button just like the other filters.</p>
<p>There are two steps that need to be taken to add a custom filter to the Manage Posts screen.  First, the UI elements need to be added.  These will allow the user to select the criteria he/she wants to the filter on.  The criteria selected are used in the second step to actually do the filtering by modifying the WordPress query.</p>
<h4>Adding the interface</h4>
<p>We will be adding two UI elements to the Manage Posts screen: a dropdown box and a button.  The dropdown box will contain the criteria that we want to filter on (&#8220;Has attachment(s)&#8221;/&#8221;Has no attachments&#8221;).  The button will trigger the filtering.  It should be immediately obvious that this interface is patterned after the existing filters provided with WordPress.</p>
<p>The hook that we&#8217;ll be using to add these elements is the <code>restrict_manage_posts</code> action, which is executed at exactly that green-box location from above.  The action handler needs to just echo a bunch of HTML corresponding to the dropdown and button.  The code below does just that.</p>
<p><code>
<pre name="code" class="php">add_action(&#x27;restrict_manage_posts&#x27;, &#x27;scompt_restrict_manage_posts&#x27;);
function scompt_restrict_manage_posts() {
    ?&gt;
        &lt;form name=&quot;scompt_attachmentform&quot; id=&quot;scompt_attachmentform&quot; action=&quot;&quot; method=&quot;get&quot;&gt;
            &lt;fieldset&gt;
            &lt;legend&gt;&lt;?php _e(&#x27;Attachments&#x27;); ?&gt;&amp;hellip;&lt;/legend&gt;
            &lt;select name=&#x27;scompt_attachments&#x27; id=&#x27;scompt_attachments&#x27; class=&#x27;postform&#x27;&gt;
                &lt;option value=&quot;&quot;&gt;&lt;?php _e(&#x27;All&#x27;); ?&gt;&lt;/option&gt;
                &lt;option value=&quot;has&quot;&gt;&lt;?php _e(&#x27;Has attachments&#x27;); ?&gt;&lt;/option&gt;
                &lt;option value=&quot;hasnt&quot;&gt;&lt;?php _e(&#x27;Has no attachments&#x27;); ?&gt;&lt;/option&gt;
            &lt;/select&gt;
            &lt;input type=&quot;submit&quot; name=&quot;submit&quot; value=&quot;&lt;?php _e(&#x27;Filter&#x27;) ?&gt;&quot; class=&quot;button&quot; /&gt;
        &lt;/fieldset&gt;
        &lt;/form&gt;
    &lt;?php
}</pre>
<p></code></p>
<div class="imageright">
<a href='/wordpress/wp-content/uploads/2008/02/custom_filtering2.png' title='After adding the UI elements'><img src='/wordpress/wp-content/uploads/2008/02/custom_filtering2.thumbnail.png' alt='After adding the UI elements' /></a></p>
<p>After adding the UI elements</p>
</div>
<p>You&#8217;ll notice that there is a form tag in there.  Unfortunately, WordPress calls the <code>restrict_manage_posts</code> action <strong>after</strong> the form tag ends.  That means we&#8217;ve got to do it on our own.  Also, it means the styling is a bit funky.  If you toss this code in a plugin or in your theme&#8217;s <code>functions.php</code> file, you&#8217;ll see something similar to the image on the right.</p>
<p>Clicking on the button won&#8217;t do anything at this point.  All we&#8217;re doing right now is sending some POST data to WordPress, but we&#8217;re not telling it to do anything with it.  That&#8217;s what we&#8217;ll do in the next step.</p>
<h4>Filtering the posts</h4>
<p>To do the actual filtering, we need to modify the WordPress query that finds the posts to be displayed.  This is documented in a <a href="http://codex.wordpress.org/Query_Overview">couple</a> <a href="http://codex.wordpress.org/Custom_Queries">Codex</a> articles, so I won&#8217;t go too deeply into the philosophy behind it here.  The particular hook that we need to use here is <code>posts_where</code>, which is used to change the WHERE clause of the query that is sent to the database.</p>
<p><code>
<pre name="code" class="php">add_filter(&#x27;posts_where&#x27;, &#x27;scompt_posts_where&#x27;);
function scompt_posts_where($where) {
    if( is_admin() ) {
        global $wpdb;
        if( $_GET[&#x27;scompt_attachments&#x27;] == &#x27;has&#x27; ) {
            $where .= &quot; AND ID IN (SELECT post_parent FROM {$wpdb-&gt;posts} WHERE post_type=&#x27;attachment&#x27; )&quot;;
        } else if( $_GET[&#x27;scompt_attachments&#x27;] == &#x27;hasnt&#x27; ) {
            $where .= &quot; AND ID NOT IN (SELECT post_parent FROM {$wpdb-&gt;posts} WHERE post_type=&#x27;attachment&#x27; )&quot;;
        }
    }
    return $where;
}</pre>
<p></code></p>
<p>You&#8217;ll see that the first line of the <code>scompt_posts_where</code> function calls the <code>is_admin</code> function.  This is to make sure that this filter handler will only be executed in the WordPress administrative backend.  From there, we look at the $_GET variable to see if anything should be done.  If the <code>scompt_attachments</code> variable is set to &#8216;has&#8217; or &#8216;hasnt&#8217;, then we need to modify the WHERE clause.</p>
<div class="imageright">
<a href='/wordpress/wp-content/uploads/2008/02/custom_filtering3.png' title='Posts filtered on attachment status'><img src='/wordpress/wp-content/uploads/2008/02/custom_filtering3.thumbnail.png' alt='Posts filtered on attachment status' /></a></p>
<p>Posts filtered on attachment status</p>
</div>
<p>With this code in place, you should be able to select a value from the Attachments dropdown again and see the results filtered.  You Manage Posts screen should now look similar to the one at the right.  That&#8217;s all well and good, but we can do better.<br />
<h4>Sprucing it up</h4>
<p>There are three code changes that can be made that will make the end result much more usable.  The first two deal with the UI side of things and the last one is a performance issue.  The UI changes also bring our new interface inline with what WordPress already does.  Take a look at the Category dropdown next to our new interface.  Notice that there are post counts next to the individual categories.  We want that.  Now select a category and filter on it.  Notice that the choice of category is maintained.  We want that too.  The code below adds both of those features along with some nicer styling.</p>
<p><code>
<pre name="code" class="php">add_action(&#x27;restrict_manage_posts&#x27;, &#x27;scompt_restrict_manage_posts&#x27;);
function scompt_restrict_manage_posts() {
    global $wpdb;
    $has_count = $wpdb-&gt;get_var(&quot;SELECT COUNT(*) FROM wp_posts WHERE post_type=&#x27;post&#x27; AND ID IN (SELECT post_parent FROM wp_posts WHERE post_type=&#x27;attachment&#x27;)&quot;);
    $hasnt_count = $wpdb-&gt;get_var(&quot;SELECT COUNT(*) FROM wp_posts WHERE post_type=&#x27;post&#x27; AND ID NOT IN (SELECT post_parent FROM wp_posts WHERE post_type=&#x27;attachment&#x27;)&quot;);
    ?&gt;
		&lt;form name=&quot;scompt_attachmentform&quot; id=&quot;scompt_attachmentform&quot; action=&quot;&quot; method=&quot;get&quot;&gt;
			&lt;fieldset style=&quot;margin: 0pt 1em 1em 1.5em; padding: 0pt; float: left;&quot;&gt;
    			&lt;legend&gt;&lt;?php _e(&#x27;Attachments&#x27;); ?&gt;&amp;hellip;&lt;/legend&gt;
    			&lt;select name=&#x27;scompt_attachments&#x27; id=&#x27;scompt_attachments&#x27; class=&#x27;postform&#x27;&gt;
        			&lt;option value=&quot;&quot;&gt;&lt;?php _e(&#x27;All&#x27;); ?&gt;&lt;/option&gt;
        			&lt;option value=&quot;has&quot; &lt;?php if( isset($_GET[&#x27;scompt_attachments&#x27;]) &amp;&amp; $_GET[&#x27;scompt_attachments&#x27;]==&#x27;has&#x27;) echo &#x27;selected=&quot;selected&quot;&#x27; ?&gt;&gt;&lt;?php _e(&#x27;Has attachments&#x27;); ?&gt;  (&lt;?php echo $has_count ?&gt;)&lt;/option&gt;
        			&lt;option value=&quot;hasnt&quot; &lt;?php if( isset($_GET[&#x27;scompt_attachments&#x27;]) &amp;&amp; $_GET[&#x27;scompt_attachments&#x27;]==&#x27;hasnt&#x27;) echo &#x27;selected=&quot;selected&quot;&#x27; ?&gt;&gt;&lt;?php _e(&#x27;Has no attachments&#x27;); ?&gt;  (&lt;?php echo $hasnt_count ?&gt;)&lt;/option&gt;
        		&lt;/select&gt;
			&lt;/fieldset&gt;
			&lt;input type=&quot;submit&quot; name=&quot;submit&quot; value=&quot;&lt;?php _e(&#x27;Filter &amp;#187;&#x27;); ?/&gt;&quot; class=&quot;button&quot; style=&quot;float:left;margin:14px 0pt 1em;position:relative;top:0.35em;&quot;/&gt;
		&lt;/form&gt;
	&lt;?php
}</pre>
<p></code></p>
<div class="imageright">
<a href='/wordpress/wp-content/uploads/2008/02/custom_filtering4.png' title='With a bit of visual finery'><img src='/wordpress/wp-content/uploads/2008/02/custom_filtering4.thumbnail.png' alt='With a bit of visual finery' /></a></p>
<p>With a bit of visual finery</p>
</div>
<p>Lines 4 and 5 query the database to get the count of posts with and without any attachments.  Two separate, complicated queries isn&#8217;t optimal, but this isn&#8217;t an MySQL tutorial.  Nevertheless, if you have a better solution, please let me know.  With these counts in hand, we display them to the user in lines 12 and 13.  In those same lines, we check the <code>$_GET</code> variable to see if an option should be pre-selected.  The final version of the dropdown can be seen in the image to the right.</p>
<p>The performance improvement to be made has to do with how often the <code>scompt_posts_where</code> filter hook gets executed.  As the code stands right now, the function will be executed every time WordPress makes a query, in the admin, out of the admin, in feeds &#8230; everywhere.  The <code>is_admin()</code> call prevents too much work from being invested for no reason, but an even better solution would be to just not execute anything unless we&#8217;re in the administrative backend.  To accomplish that, we change the filter code to the following:</p>
<p><code>
<pre name="code" class="php">add_action(&#x27;admin_head&#x27;, &#x27;scompt_admin_head&#x27;);
function scompt_admin_head() {
    add_filter(&#x27;posts_where&#x27;, &#x27;scompt_posts_where&#x27;);
}
function scompt_posts_where($where) {
    global $wpdb;
    if( $_GET[&#x27;scompt_attachments&#x27;] == &#x27;has&#x27; ) {
        $where .= &quot; AND ID IN (SELECT post_parent FROM {$wpdb-&gt;posts} WHERE post_type=&#x27;attachment&#x27; )&quot;;
    } else if( $_GET[&#x27;scompt_attachments&#x27;] == &#x27;hasnt&#x27; ) {
        $where .= &quot; AND ID NOT IN (SELECT post_parent FROM {$wpdb-&gt;posts} WHERE post_type=&#x27;attachment&#x27; )&quot;;
    }
    return $where;
}</pre>
<p></code></p>
<p>Did you notice the difference?  Now, instead of always adding the <code>posts_where</code> filter, it is only added when the <code>admin_head</code> action is called, which conveniently only happens in the administrative backend.  This will save a couple function calls, which might be useful for a couple more seconds of uptime during your next Slashdotting.</p>
<h4>What about pages?</h4>
<p>Similar to the case of the <a href="http://scompt.com/archives/2007/10/20/adding-custom-columns-to-the-wordpress-manage-posts-screen"><code>manage_posts_custom_columns</code> hooks</a>, the Manage Pages screen is still a second-class citizen.  It doesn&#8217;t call the <code>restrict_manage_posts</code> action, so there&#8217;s no chance to do any filtering.  However, keep your eyes on <a href="http://scompt.com">scompt.com</a> as I plan on releasing a plugin that will provide this functionality soon.</p>
<h4>Complete Code</h4>
<p>The code shown below is the final version of what we&#8217;ve been developing in this article.  It has been tested in WordPress 2.3.3, but should work in old 2.2 and the new 2.5 versions, based on a quick look at the code.</p>
<p><code>
<pre name="code" class="php">add_action(&#x27;restrict_manage_posts&#x27;, &#x27;scompt_restrict_manage_posts&#x27;);
function scompt_restrict_manage_posts() {
    global $wpdb;
    $has_count = $wpdb-&gt;get_var(&quot;SELECT COUNT(*) FROM wp_posts WHERE post_type=&#x27;post&#x27; AND ID IN (SELECT post_parent FROM wp_posts WHERE post_type=&#x27;attachment&#x27;)&quot;);
    $hasnt_count = $wpdb-&gt;get_var(&quot;SELECT COUNT(*) FROM wp_posts WHERE post_type=&#x27;post&#x27; AND ID NOT IN (SELECT post_parent FROM wp_posts WHERE post_type=&#x27;attachment&#x27;)&quot;);
    ?&gt;
		&lt;form name=&quot;scompt_attachmentform&quot; id=&quot;scompt_attachmentform&quot; action=&quot;&quot; method=&quot;get&quot;&gt;
			&lt;fieldset style=&quot;margin: 0pt 1em 1em 1.5em; padding: 0pt; float: left;&quot;&gt;
    			&lt;legend&gt;&lt;?php _e(&#x27;Attachments&#x27;); ?&gt;&amp;hellip;&lt;/legend&gt;
    			&lt;select name=&#x27;scompt_attachments&#x27; id=&#x27;scompt_attachments&#x27; class=&#x27;postform&#x27;&gt;
        			&lt;option value=&quot;&quot;&gt;&lt;?php _e(&#x27;All&#x27;); ?&gt;&lt;/option&gt;
        			&lt;option value=&quot;has&quot; &lt;?php if( isset($_GET[&#x27;scompt_attachments&#x27;]) &amp;&amp; $_GET[&#x27;scompt_attachments&#x27;]==&#x27;has&#x27;) echo &#x27;selected=&quot;selected&quot;&#x27; ?&gt;&gt;&lt;?php _e(&#x27;Has attachments&#x27;); ?&gt;  (&lt;?php echo $has_count ?&gt;)&lt;/option&gt;
        			&lt;option value=&quot;hasnt&quot; &lt;?php if( isset($_GET[&#x27;scompt_attachments&#x27;]) &amp;&amp; $_GET[&#x27;scompt_attachments&#x27;]==&#x27;hasnt&#x27;) echo &#x27;selected=&quot;selected&quot;&#x27; ?&gt;&gt;&lt;?php _e(&#x27;Has no attachments&#x27;); ?&gt;  (&lt;?php echo $hasnt_count ?&gt;)&lt;/option&gt;
        		&lt;/select&gt;
			&lt;/fieldset&gt;
			&lt;input type=&quot;submit&quot; name=&quot;submit&quot; value=&quot;&lt;?php _e(&#x27;Filter &amp;#187;&#x27;); ?&gt;&quot; class=&quot;button&quot; style=&quot;float:left;margin:14px 0pt 1em;position:relative;top:0.35em;&quot;/&gt;
		&lt;/form&gt;
	&lt;?php
}

add_action(&#x27;admin_head&#x27;, &#x27;scompt_admin_head&#x27;);
function scompt_admin_head() {
    add_filter(&#x27;posts_where&#x27;, &#x27;scompt_posts_where&#x27;);
}
function scompt_posts_where($where) {
    global $wpdb;
    if( $_GET[&#x27;scompt_attachments&#x27;] == &#x27;has&#x27; ) {
        $where .= &quot; AND ID IN (SELECT post_parent FROM {$wpdb-&gt;posts} WHERE post_type=&#x27;attachment&#x27; )&quot;;
    } else if( $_GET[&#x27;scompt_attachments&#x27;] == &#x27;hasnt&#x27; ) {
        $where .= &quot; AND ID NOT IN (SELECT post_parent FROM {$wpdb-&gt;posts} WHERE post_type=&#x27;attachment&#x27; )&quot;;
    }
    return $where;
}</pre>
<p></code></p>
]]></content:encoded>
			<wfw:commentRss>http://scompt.com/blog/archives/2008/02/25/custom-filtering-in-the-wordpress-manage-posts-screen/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
	
		<series:name><![CDATA[Pimp my Manage panel]]></series:name>
	</item>
		<item>
		<title>Würzburg International Film Weekend</title>
		<link>http://scompt.com/blog/archives/2008/02/04/wurzburg-international-film-weekend</link>
		<comments>http://scompt.com/blog/archives/2008/02/04/wurzburg-international-film-weekend#comments</comments>
		<pubDate>Mon, 04 Feb 2008 10:52:05 +0000</pubDate>
		<dc:creator>scompt</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[film]]></category>
		<category><![CDATA[writing]]></category>

		<guid isPermaLink="false">http://scompt.com/archives/2008/02/04/wurzburg-international-film-weekend</guid>
		<description><![CDATA[Another year in Würzburg, another International Film Weekend. As I did last year, I bought a 10-pack of tickets a couple weeks before the festival took place. Unfortunately, I was only able to find time to use 5 of the tickets to actually see films, but I was happy with my choices. Here&#8217;s a quick [...]]]></description>
			<content:encoded><![CDATA[<div class="imageright"><a href="http://www.filmwochenende.de/"><img src='http://scompt.com/wordpress/wp-content/uploads/2008/02/filmwowue.thumbnail.jpg' alt='Würzburg International Film Weekend Poster' /></a></div>
<p>Another year in Würzburg, another <a href="http://www.filmwochenende.de/">International Film Weekend</a>.  As I did last year, I bought a 10-pack of tickets a couple weeks before the festival took place.  Unfortunately, I was only able to find time to use 5 of the tickets to actually see films, but I was happy with my choices.  Here&#8217;s a quick run-down of what I saw and what I thought about them.  There are probably some spoilers.</p>
<p><span id="more-167"></span></p>
<h3><a href="http://imdb.com/title/tt0480025/">This is England</a> <img class="flag" src='http://scompt.com/wordpress/wp-content/uploads/2008/02/uk-flag.thumbnail.gif' alt='United Kingdom Flag' /></h3>
<p><strong>This is England</strong> takes place in England during the tail end of the Falklands War.  A young, bullied kid gets taken in by a group of well-meaning skinheads.  A friend returning from a stint in prison fractures the group and takes it (with the youngster) in the nationalistic, racially-oriented direction that skinheads are generally known for.  From here, things spiral downwards before reaching a violent climax.</p>
<p>I really enjoyed <strong>This is England</strong>, especially the performance by the bullied kid, <a href="http://imdb.com/name/nm2129938/">Thomas Turgoose</a>.  The portrayal of the &#8220;old-school&#8221;, rude-boy influenced skinhead s showed a side of that subculture that isn&#8217;t widely known.  In contrast, the racist who returns from prisons shows the image of a skinhead that most people associate with the term.  The one part of the film that left me cold was the ending, which I felt dragged on a bit too long after the tense climax.</p>
<h3><a href="http://www.filmwochenende.de/index.php?option=com_content&#038;task=view&#038;id=430&#038;Itemid=116">Der große Navigator</a> <img class="flag" src='http://scompt.com/wordpress/wp-content/uploads/2008/02/gm-flag.thumbnail.gif' alt='German Flag' /></h3>
<p><strong>Der große Navigator (The Great Navigator)</strong> is a documentary film about a German missionary who is sent to former East Germany to mission to the masses and attract churchgoers and do what missionaries, in general, do.  Along the way, themes such as materialism and the role of religion are dealt with.</p>
<p>I enjoyed this film although I think I missed out on a lot of it because I was in the first row and had to crane my neck to see the screen.  Add to that the fact that I was blasted by the nearby speakers and you end up with a less-than-optimal foreign-movie going experience.  Nevertheless, seeing a new (for me) part of German culture (former East Germany) was fascinating, although I&#8217;m not completely sold on the idea that the film couldn&#8217;t have been made anywhere else in Germany.</p>
<h3><a href="http://imdb.com/title/tt1112116/">Lastochki Prileteli</a> <img class="flag" src='http://scompt.com/wordpress/wp-content/uploads/2008/02/rs-flag.thumbnail.gif' alt='Russian Flag' /></h3>
<p><strong>Lastochki Prileteli (Swallows Have Arrived)</strong> is about a Russian professor&#8217;s fight with drug addiction.  It follows his downward spiral to the point where he&#8217;s trapped in his house by withdrawal and paranoia.</p>
<p>Aside from watching the film in a sweltering theater, I enjoyed <strong>Lastochki Prileteli</strong> well enough.  It was a bit slow, but that also worked well with the addiction theme in a lot of ways.  This was enhanced by the fact that the director didn&#8217;t actually show the protagonist using any drugs until much later in the film.</p>
<h3><a href="http://imdb.com/title/tt0417046/">Gymnaslærer Pedersen</a> <img class="flag" src='http://scompt.com/wordpress/wp-content/uploads/2008/02/no-flag.thumbnail.gif' alt='Norwegian Flag' /></h3>
<p><strong>Gymnaslærer Pedersen (Pedersen: High-School Teacher)</strong> is a film about a Norwegian high school teacher who gets caught up in the socialist movement of the 70s.  Along the way, he falls for a fellow comrade leading to a complementary love plot.</p>
<p>This was a really fun film.  Fantastical scene transitions and the imagination of the characters were shown in over the top, humorous ways.  The entire film is told as a flashback, which serves to show the difference between students in the 70s and those from the present day.  It&#8217;s hard to imagine a socialist (or any type, for that matter) rebellion coming from the happy-go-lucky present day students.</p>
<h3><a href="http://imdb.com/title/tt0873600/">Das Erbe der Bergler</a> <img class="flag" src='http://scompt.com/wordpress/wp-content/uploads/2008/02/sz-flag.thumbnail.gif' alt='Swiss Flag' /></h3>
<p><strong>Das Erbe der Bergler (The Legacy of the Mountain People)</strong> is a documentary about a group of people in Switzerland that, once a year, go up on the mountains and cut hay for usage/sale in the village.  This involves hiking up the mountain (or taking a helicopter if you&#8217;re too old to hike because you&#8217;ve been doing it for 60 years), cutting hay in alpine meadows on the side of the mountain, and bundling it to be sent down to the valley to be stored until Winter.  The bundles are sent by sliding them down a steel cable, which makes a pretty dramatic scene.</p>
<p>This was an awesome documentary about a tradition that is still carried out like it was decades ago: with handmade tools and hard labor.  The tools used by the workers were hand-crafted by artisans in the village.  When the bundles are retrieved from the barn in Winter, the villagers use sleds also created in the village.  Unfortunately, there wasn&#8217;t too much dialog, as that&#8217;s one of the things that makes Swiss films so fun.  Instead, the director let the work of the <em>Bergler</em> speak for itself.  The director himself was at the screening and answered questions afterwards, another film festival benefit.</p>
<hr />
<div class="imageright"><a href='http://scompt.com/wordpress/wp-content/uploads/2008/02/tickets.jpg' title='Ticekts'><img src='http://scompt.com/wordpress/wp-content/uploads/2008/02/tickets.thumbnail.jpg' alt='Würzburg International Film Weekend Tickets' /></a></div>
<p>The thesis of this post, if there is one, is that film festivals kick ass.  I&#8217;ve been to the Würzburg International Film Weekend two years in a row now and not been disappointed.  When I lived in Edinburgh, I attended the <a href="http://www.edfilmfest.org.uk/">Edinburgh International Film Festival</a> and had a blast.  Most of the films I saw at the EIFF were at <a href="http://www.filmhousecinema.com/">Filmhouse Cinema</a>, which is, bar none, the best cinema I&#8217;ve ever been to.  I spent many hundreds of pounds when I lived around the corner from it.  I can only hope that, one day, <a href="http://www.grandintheatre.com/">Grandin Theatre</a> gets it act together and is able to host something as interesting.  Midnight showings of the Goonies are awesome, but not exactly intellectually demanding.</p>
]]></content:encoded>
			<wfw:commentRss>http://scompt.com/blog/archives/2008/02/04/wurzburg-international-film-weekend/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Bringing the World Home</title>
		<link>http://scompt.com/blog/archives/2004/11/10/bringing-the-world-home</link>
		<comments>http://scompt.com/blog/archives/2004/11/10/bringing-the-world-home#comments</comments>
		<pubDate>Wed, 10 Nov 2004 13:00:55 +0000</pubDate>
		<dc:creator>scompt</dc:creator>
				<category><![CDATA[writing]]></category>

		<guid isPermaLink="false">http://scompt.com/wordpress/bringing-the-world-home</guid>
		<description><![CDATA[An essay written as part of the application to the Bringing the World Home summit. Bringing the world home is important to me because I think there is a great disconnect between what the American people are like and what the world thinks the American people are like. This disconnect was exemplified when the 2004 [...]]]></description>
			<content:encoded><![CDATA[<p>An essay written as part of the application to the <a href="http://www.aidemocracy.org/Initiative.cfm?initiative_id=100704_564784839_New">Bringing the World Home</a> summit.</p>
<p>Bringing the world home is important to me because I think there is a great disconnect between what the American people are like and what the world thinks the American people are like.  This disconnect was exemplified when the 2004 Election played out.  Polls of foreign citizens clearly showed a desire to remove George Bush from office, but when the results came in, they were shocked to see that America had reelected him.  I think this shows the strong difference in goals and values of the two groups.  It is obvious that there will be a difference, but I think that neither group even understands from where the other is coming.</p>
<p>Like any relationship counselor will tell you, the key is communication.  The key to bridging this divide is to get citizens of different countries talking and exploring their differences.  This need not be something formal; these connections happen spontaneously every time people get together.  The challenge is to get these people together so the dialog can start flowing.  That’s what bringing the world home means to me.</p>
<p>The benefits of increased communication are many.  The immediate result, as I mentioned previously, is that understanding between Americans and the rest of the world is increased.  This understanding spreads among friends and from child to parent and leads to a much broader segment of the population having less trepidation regarding foreigners.  Less fear leads to more travel, which leads to more communication.  Bringing the world home means to me giving this cycle a helping hand.</p>
<p><em>Updated Nov 14</em> &#8211; Didn&#8217;t make the cut.  Maybe next year.</p>
]]></content:encoded>
			<wfw:commentRss>http://scompt.com/blog/archives/2004/11/10/bringing-the-world-home/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Brigitte Boisselier</title>
		<link>http://scompt.com/blog/archives/2004/06/26/brigitte-boisselier</link>
		<comments>http://scompt.com/blog/archives/2004/06/26/brigitte-boisselier#comments</comments>
		<pubDate>Sat, 26 Jun 2004 18:25:41 +0000</pubDate>
		<dc:creator>scompt</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[writing]]></category>

		<guid isPermaLink="false">http://scompt.com/wordpress/brigitte-boisselier</guid>
		<description><![CDATA[This part is my notes and commentary from the presentation given by Dr. Brigitte Boisselier. just saw a video clip of the past news clips Raelians knew it was coming, dolly thanks to queen victoria, women can use painkillers for birth showed pictures of bad babies, deformed these are from sexual reproduction show pic of [...]]]></description>
			<content:encoded><![CDATA[<p><em>This part is my notes and commentary from the presentation given by Dr. Brigitte Boisselier.</em></p>
<p><span id="more-12"></span></p>
<ul>
<li>just saw a video clip of the past news clips</li>
<li>Raelians knew it was coming, dolly</li>
<li>thanks to queen victoria, women can use painkillers for birth</li>
<li>showed pictures of bad babies, deformed</li>
<li>these are from sexual reproduction</li>
<li>show pic of healthy baby, this is the cloned baby</li>
<li>10,799 born</li>
<li>411 with defects</li>
<li>17 die from defects</li>
<li>per day in us</li>
<li>defects is the reason we hate cloning</li>
<li>same defects in IVF as in cloning</li>
<li>defects are fact of assisted reproduction</li>
<li>10% success with sex</li>
<li>30% success with IVF</li>
<li>45% success with cloning</li>
<li>safer to clone than have sex</li>
<li>army of clones? -&gt; a gov won&#8217;t wait 18 years for army</li>
<li>baby will be shunned &#8211; same thing we said about test tube baby</li>
<li>overpopulation is a problem from sex also</li>
<li>can&#8217;t go back to france, 20 years jail</li>
<li>apply an electric impulse to fuse the egg and cells</li>
<li>we don&#8217;t know what happens, but the DNA resets itself</li>
<li>this is a part of you, just like cells down the drain</li>
<li>it should be considered as our right to use our genes the way we want</li>
<li>new lab soon in a country welcoming</li>
<li>human cloning, a key to eternity</li>
<li>I can expect to live 250-300 years</li>
<li>evolution = despair, chance</li>
<li>god = guilt, fear, suffering for paradise</li>
<li>raelism = I am here to create and blossom and live eternally on this paradise, thanks to science</li>
<li>60,000 raelians on this planet</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://scompt.com/blog/archives/2004/06/26/brigitte-boisselier/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<series:name><![CDATA[Rael Presentation]]></series:name>
	</item>
		<item>
		<title>Rael</title>
		<link>http://scompt.com/blog/archives/2004/06/26/rael</link>
		<comments>http://scompt.com/blog/archives/2004/06/26/rael#comments</comments>
		<pubDate>Sat, 26 Jun 2004 18:25:22 +0000</pubDate>
		<dc:creator>scompt</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[writing]]></category>

		<guid isPermaLink="false">http://scompt.com/wordpress/rael</guid>
		<description><![CDATA[This part is my notes and commentary from the presentation given by Rael. just showed a video with all of his news appearances here he is, in a white space suit likes scotland because of racecar drivers impressed by the numbers, there are about 30-40 what the pope says is not interesting talks bad about [...]]]></description>
			<content:encoded><![CDATA[<p><em>This part is my notes and commentary from the presentation given by Rael.</em></p>
<p><span id="more-11"></span></p>
<ul>
<li>just showed a video with all of his news appearances</li>
<li>here he is, in a white space suit</li>
<li>likes scotland because of racecar drivers</li>
<li>impressed by the numbers, there are about 30-40</li>
<li>what the pope says is not interesting</li>
<li>talks bad about the pope</li>
<li>lots of killing from catholics</li>
<li>just by being here, would be burned alive, long ago</li>
<li>there is no god</li>
<li>muslims are as repressive as we were not long ago</li>
<li>3 bodyguards, one asian, black, while</li>
<li>ethical committees = inquisition</li>
<li>science is science, should be protected from influence, including ethics</li>
<li>media lies</li>
<li>internet sets you free from media</li>
<li>being mixed with computer chips is great</li>
<li>science fiction for our grandfathers is now</li>
<li>GM, nano, cloning are all good</li>
<li>Concorde is a miracle</li>
<li>CS accelerates everything</li>
<li>within 20 years, we will discover almost everything possible thanks to moore&#8217;s law</li>
<li>likes to talk about sheep in scotland</li>
<li>truths are father time and mother consciousness</li>
<li>love and emotion are all chemical processes</li>
<li>is that not despairing??</li>
<li>I want to die.  please, do so</li>
<li>25+ suicidal -&gt; religious</li>
<li>80+ happy -&gt; atheists</li>
<li>close to buddhism, far from monotheism</li>
<li>doing something in the name of god, all is possible</li>
<li>mozart raised by wolves would just bark</li>
<li>&#8220;we have data about children raised by wolves&#8221;</li>
<li>what is crazy is wisdom</li>
<li>pope uses 25 meds/day and has 30 doctors, and is against science</li>
<li>anybody would switch position on stem cells if a kid needed them</li>
<li>GM is good for starving</li>
<li>only rich care about organic/GM</li>
<li>not a doomsday cult, future is beautiful</li>
<li>take out god, put in eloem, bible is good</li>
<li>we&#8217;re in process of eloemisation</li>
<li>only god can fly, &#8230;. we can fly</li>
<li>we are connected in a planetary brain, we&#8217;re each a neuron</li>
<li>cancer = bombs</li>
<li>transhumanism is similar</li>
<li>stay in computer or be born again into a body</li>
<li>met human being, like us&#8230; eloem</li>
<li>glowing fish is art</li>
<li>pink glowing rabbit is art/beauty</li>
<li>peacock is art by eloem</li>
<li>create birds that sing mozart</li>
<li>what can I say after such stimulation</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://scompt.com/blog/archives/2004/06/26/rael/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<series:name><![CDATA[Rael Presentation]]></series:name>
	</item>
		<item>
		<title>Raelians &amp; Clonaid</title>
		<link>http://scompt.com/blog/archives/2004/06/26/raelians-clonaid</link>
		<comments>http://scompt.com/blog/archives/2004/06/26/raelians-clonaid#comments</comments>
		<pubDate>Sat, 26 Jun 2004 18:24:36 +0000</pubDate>
		<dc:creator>scompt</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[writing]]></category>

		<guid isPermaLink="false">http://scompt.com/wordpress/raelians-clonaid</guid>
		<description><![CDATA[<p><i>This is part of a 3 part series consisting my notes from a presentation given by the Rael movement on June 18.  Due to a lack of time, I've posted them as they were written in my notebook.</i></p>

<p><i>This part details some of my initial impressions and commentary on the introduction part of the presentation.  Any people references are to a couple Raelians who set the stage and introduced the main speakers.</i></p>]]></description>
			<content:encoded><![CDATA[<p><em>This part details some of my initial impressions and commentary on the introduction part of the presentation.  Any people references are to a couple Raelians who set the stage and introduced the main speakers.</em></p>
<p><span id="more-13"></span></p>
<p>I feel as if I just walked into another universe, but I really just entered a run-of-the-mill conference room at the Sheraton Grand in Edinburgh, Scotland.  This alter-universe feeling was brought about by the Raelians, preparing for a public lecture given by their leader, Rael.  This is the group that last year said they had successfully cloned a human child.  The setting in the entrance is somewhat eerie.  The lecture starts at 19h, but we show up at 18h15 and are the 2nd and 3rd people to buy tickets.  On the right of the entrance is a selection of book with titles including: Let&#8217;s Welcome our Fathers from Space, Yes to Cloning, The True Face of God.  The woman I buy my ticket (£3, £5) from is a nice asian  with a strong accept.  All of the other workers have strong french accents.  I hesitate to crack a smile as I read the titles and peruse the tables of contents.  I fear being abducted afterwards or becoming the focus of a more intense hypnotic ray.  The audience is of a mixed sort.  The first five that show up (including us) appear to be students.  Also in attendance is a ~14 year old boy with his father.  This is perhaps the most worrying attendee, for he may not know the difference between truth and Rael.  But, I digress&#8230; I should at least hear what he has to say first.</p>
<p>Right now, the audience seems to be split about 50/50 between students and adults.  A camera has just been set up next to me and they&#8217;re interviewing people about their attendance at the lecture.  I&#8217;m really hoping to be selected as I&#8217;ve got a opinion about them.  namely, I don&#8217;t like it.</p>
<p>I&#8217;m eavesdropping on some US backpackers right now cracking jokes about propaganda and drugs.</p>
<p>French people are everywhere.  I wonder if it&#8217;s not some kind of takeover tactic originating from continental Europe.  The group filming is actually for a german TV station.  Unfortunately, I missed getting on camera.</p>
<p>They&#8217;ve opened the doors to the lecture hall now and we&#8217;re inside.  I choose a seat next to the aisle just in case they start passing out kool-aid.  They&#8217;re playing with the lights now they can get them completely off for the video presentations.  You can bet that I&#8217;ll have my hand on my backpack ready to run every time they go off.  There are more Raelians coming in now.  You can tell because they have a pendant around their neck with their symbol.</p>
<p>They&#8217;ve begun:</p>
<ul>
<li>both founders are here</li>
<li>bishop is introducing the pair</li>
<li>she is US, performer</li>
<li>here on their own, no salary</li>
<li>Glen Carter, president of Brit Rael</li>
<li>first in EU with both Clonaid &amp; Rael</li>
<li>Clonaid != Rael</li>
<li>CEO is also a bishop</li>
<li>Support cloning &amp; furthering of science</li>
<li>all donation</li>
<li>why scotland?</li>
<li>home of UK science</li>
<li>first clone, dolly</li>
<li>actor, played jesus before</li>
<li>we&#8217;re created scientifically</li>
<li>tried to disprove it first</li>
<li>only thing ever labeled are the exits</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://scompt.com/blog/archives/2004/06/26/raelians-clonaid/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<series:name><![CDATA[Rael Presentation]]></series:name>
	</item>
		<item>
		<title>Tibetan Film Festival</title>
		<link>http://scompt.com/blog/archives/2004/06/11/tibetan-film-festival</link>
		<comments>http://scompt.com/blog/archives/2004/06/11/tibetan-film-festival#comments</comments>
		<pubDate>Sat, 12 Jun 2004 00:18:38 +0000</pubDate>
		<dc:creator>scompt</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[film]]></category>
		<category><![CDATA[writing]]></category>

		<guid isPermaLink="false">http://scompt.com/wordpress/tibetan-film-festival</guid>
		<description><![CDATA[I just got back from seeing the second movie of the Tibetan Film Festival at Filmhouse Cinema. This film, &#8220;Tibet: Cry of the Snow Lion&#8221; was a straight-up documentary about the history of the Tibetan struggle, as opposed to the first one, &#8220;Kundun&#8220;, which was more of a docu-drama. Being a documentary, it provided much [...]]]></description>
			<content:encoded><![CDATA[<p>I just got back from seeing the second movie of the Tibetan Film Festival at <a href="http://www.filmhousecinema.com">Filmhouse Cinema</a>.  This film, &#8220;<a href="http://imdb.com/title/tt0373389/">Tibet: Cry of the Snow Lion</a>&#8221; was a straight-up documentary about the history of the Tibetan struggle, as opposed to the first one, &#8220;<a href="http://imdb.com/title/tt0119485/">Kundun</a>&#8220;, which was more of a docu-drama.  Being a documentary, it provided much of the background to the situation and gave context to the first one.  In this aspect, it may have been more useful to show them in reverse order.</p>
<p>The documentary had numerous very powerful scenes, most of which concerned the torture of the Tibetan people.  Many times, the term genocide was mentioned.  Either because of my own ignorance, or lack of media attention, I was not aware the attrocities were on this scale.  The number of deaths that were quoted were somewhat confusing.  At some point, 30 million was stated and compared to the relatively few murders committed by Hitler and other ethnic cleansers of recent past.  A little while later, 1.5 million was stated as a number of deaths.  I must have missed something.  A point that was emphasized at the end of the film, by the <a href="http://www.dalailama.com">Dalai Lama</a> himself, was the importance of non-agressive resistance against the Chinese.  To have X million of your followers killed and maintain this policy is asounding and one of the main things that draw me toward the religion/philosphy/idea of <a href="http://www.buddhanet.net">Buddhism</a>.  More on this later.</p>
<p>A quick summary of the first film of the festival &#8220;Kundun&#8221; is that is follows the current Dalai Lama&#8217;s life from being discovered in a small village to making the choice to leave his country in order to better serve it.  Of the ciriticisms I&#8217;ve read of this film, the most prominent one is that because the Dalai Lama consulted, it is somewhat one-sided in its retelling of the facts.  This may be true, but in light of the horrible images displayed by the second film, is somewhat inconsequential.  It might even be said that it isn&#8217;t as one-sided as it could have been considering its lack of such images.</p>
<p>Related topics for future writing:</p>
<ul>
<li>Events/activities in Edinburgh relating to Buddhism/Spirituality</li>
<li>Edinburgh as an opportunity for personal growth.</li>
<li>Writing</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://scompt.com/blog/archives/2004/06/11/tibetan-film-festival/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

