<?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/"
	>

<channel>
	<title>Nicolas Kuttler &#187; nicolas</title>
	<atom:link href="http://www.nkuttler.de/author/nicolas/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.nkuttler.de</link>
	<description>WordPress Services, IT Services</description>
	<lastBuildDate>Tue, 07 Sep 2010 21:36:37 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Access/ownership of new pages in typo3</title>
		<link>http://www.nkuttler.de/2010/08/17/typo3-user-group-owner-new-pages/</link>
		<comments>http://www.nkuttler.de/2010/08/17/typo3-user-group-owner-new-pages/#comments</comments>
		<pubDate>Tue, 17 Aug 2010 13:00:51 +0000</pubDate>
		<dc:creator>nicolas</dc:creator>
				<category><![CDATA[Content Management]]></category>
		<category><![CDATA[howto]]></category>
		<category><![CDATA[Typo3]]></category>
		<category><![CDATA[typoscript]]></category>

		<guid isPermaLink="false">http://www.nkuttler.de/?p=1876</guid>
		<description><![CDATA[Typo3 has a very powerful workspace feature. You can use it to give different groups different access rights to a sitetree. This is useful when you have many users, groups and workspaces. One problem that can appear when you don&#8217;t configure everything properly is that new pages, created by an admin for example, can&#8217;t be [...]]]></description>
			<content:encoded><![CDATA[<p>Typo3 has a very powerful workspace feature. You can use it to give different groups different access rights to a sitetree. This is useful when you have many users, groups and workspaces. One problem that can appear when you don&#8217;t configure everything properly is that new pages, created by an admin for example, can&#8217;t be edited by other users.</p>
<p>You can fixing this by forcing user- and group ownership of new pages and elements. First, find the root page of the subtree for which you want to set default owner and group. Then add something like in the example below to the page&#8217;s <code>TSCONFIG</code>:<span id="more-1876"></span></p>

<div class="wp_syntax"><div class="code"><pre class="typoscript" style="font-family:monospace;">TCEMAIN<span style="color: #339933; font-weight: bold;">.</span>permissions <span style="color: #009900;">&#123;</span>
	<span style="color: #aaa; font-style: italic;"># ID of the backend user that will own new pages</span>
	userid <span style="color: #339933; font-weight: bold;">=</span> <span style="color: #cc0000;">3</span>
	<span style="color: #aaa; font-style: italic;"># ID of the backend group that will own new pages</span>
	groupid <span style="color: #339933; font-weight: bold;">=</span> <span style="color: #cc0000;">1</span>
&nbsp;
	<span style="color: #aaa; font-style: italic;"># This is optional, explicitly set permissions</span>
	<span style="color: #aaa; font-style: italic;">#user = show, editcontent, edit, delete, new</span>
	<span style="color: #aaa; font-style: italic;">#group = show, editcontent, edit, delete, new</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://www.nkuttler.de/2010/08/17/typo3-user-group-owner-new-pages/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Merging and splitting XML files with simpleXML</title>
		<link>http://www.nkuttler.de/2010/08/06/merging-and-splitting-xml-files-with-simplexml/</link>
		<comments>http://www.nkuttler.de/2010/08/06/merging-and-splitting-xml-files-with-simplexml/#comments</comments>
		<pubDate>Fri, 06 Aug 2010 11:00:22 +0000</pubDate>
		<dc:creator>nicolas</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[simpleXML]]></category>
		<category><![CDATA[XML]]></category>

		<guid isPermaLink="false">http://nkuttler.wordpress-server.de/?p=1798</guid>
		<description><![CDATA[Here&#8217;s a way to merge parts of two XML files with PHP&#8217;s simpleXML. This also preserves the attributes, which was where the information was stored in my case. This script will not work out of the box for you, so edit it. Use var_dump(), print_r() and friends. $file1 = 'file1.xml'; $file2 = 'file2.xml'; $fileout = [...]]]></description>
			<content:encoded><![CDATA[<p>Here&#8217;s a way to merge parts of two XML files with PHP&#8217;s simpleXML. This also preserves the attributes, which was where the information was stored in my case. This script will not work out of the box for you, so edit it. Use <code>var_dump()</code>, <code>print_r()</code> and friends.<span id="more-1798"></span></p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;">	<span style="color: #000088;">$file1</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'file1.xml'</span><span style="color: #339933;">;</span>
	<span style="color: #000088;">$file2</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'file2.xml'</span><span style="color: #339933;">;</span>
	<span style="color: #000088;">$fileout</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'fileout.xml'</span><span style="color: #339933;">;</span>
&nbsp;
	<span style="color: #000088;">$xml1</span> <span style="color: #339933;">=</span> <span style="color: #990000;">simplexml_load_file</span><span style="color: #009900;">&#40;</span> <span style="color: #000088;">$file1</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #000088;">$xml2</span> <span style="color: #339933;">=</span> <span style="color: #990000;">simplexml_load_file</span><span style="color: #009900;">&#40;</span> <span style="color: #000088;">$file2</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
	<span style="color: #666666; font-style: italic;">// loop through the FOO and add them and their attributes to xml1</span>
	<span style="color: #b1b100;">foreach</span><span style="color: #009900;">&#40;</span> <span style="color: #000088;">$xml2</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">FOO</span> <span style="color: #b1b100;">as</span> <span style="color: #000088;">$foo</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
		<span style="color: #000088;">$new</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$xml1</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">addChild</span><span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">'FOO'</span> <span style="color: #339933;">,</span> <span style="color: #000088;">$foo</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #b1b100;">foreach</span><span style="color: #009900;">&#40;</span> <span style="color: #000088;">$foo</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">attributes</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #b1b100;">as</span> <span style="color: #000088;">$key</span> <span style="color: #339933;">=&gt;</span> <span style="color: #000088;">$value</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
			<span style="color: #000088;">$new</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">addAttribute</span><span style="color: #009900;">&#40;</span> <span style="color: #000088;">$key</span><span style="color: #339933;">,</span> <span style="color: #000088;">$value</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #009900;">&#125;</span>
	<span style="color: #009900;">&#125;</span>
&nbsp;
	<span style="color: #000088;">$fh</span> <span style="color: #339933;">=</span> <span style="color: #990000;">fopen</span><span style="color: #009900;">&#40;</span> <span style="color: #000088;">$fileout</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'w'</span><span style="color: #009900;">&#41;</span> or <span style="color: #990000;">die</span> <span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">&quot;can't open file <span style="color: #006699; font-weight: bold;">$fileout</span>&quot;</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #990000;">fwrite</span><span style="color: #009900;">&#40;</span> <span style="color: #000088;">$fh</span><span style="color: #339933;">,</span> <span style="color: #000088;">$xml1</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">asXML</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #990000;">fclose</span><span style="color: #009900;">&#40;</span> <span style="color: #000088;">$fh</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>And here is a way to split information from one XML file into several:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;">	<span style="color: #000088;">$filein</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'filein.xml'</span><span style="color: #339933;">;</span>
	<span style="color: #000088;">$xml</span> <span style="color: #339933;">=</span> <span style="color: #990000;">simplexml_load_file</span><span style="color: #009900;">&#40;</span> <span style="color: #000088;">$filein</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
	<span style="color: #b1b100;">foreach</span><span style="color: #009900;">&#40;</span> <span style="color: #000088;">$xml</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">FOO</span> <span style="color: #b1b100;">as</span> <span style="color: #000088;">$foo</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
		<span style="color: #000088;">$foo_id</span> <span style="color: #339933;">=</span> <span style="color: #009900;">&#40;</span>string<span style="color: #009900;">&#41;</span> <span style="color: #000088;">$foo</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'Id'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
		<span style="color: #000088;">$fileout</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$foo_id</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">'.xml'</span><span style="color: #339933;">;</span>
		<span style="color: #000088;">$fh</span> <span style="color: #339933;">=</span> <span style="color: #990000;">fopen</span><span style="color: #009900;">&#40;</span> <span style="color: #000088;">$fileout</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'w'</span><span style="color: #009900;">&#41;</span> or <span style="color: #990000;">die</span> <span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">&quot;can't open file <span style="color: #006699; font-weight: bold;">$fileout</span>&quot;</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #990000;">fwrite</span><span style="color: #009900;">&#40;</span> <span style="color: #000088;">$fh</span><span style="color: #339933;">,</span> <span style="color: #000088;">$foo</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">asXML</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #990000;">fclose</span><span style="color: #009900;">&#40;</span> <span style="color: #000088;">$fh</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span></pre></div></div>

<p>Btw, I have noticed a rather odd thing, <code>var_dump()</code>ing a simpleXML object that contains arrays only dumped the array&#8217;s first element for me, I had to build a <code>foreach()</code> loop to dump the whole array.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.nkuttler.de/2010/08/06/merging-and-splitting-xml-files-with-simplexml/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>wp_enqueue_style, versioning and conditional CSS comments</title>
		<link>http://www.nkuttler.de/2010/07/28/wordpress-style-version-conditional-comments/</link>
		<comments>http://www.nkuttler.de/2010/07/28/wordpress-style-version-conditional-comments/#comments</comments>
		<pubDate>Wed, 28 Jul 2010 13:00:28 +0000</pubDate>
		<dc:creator>nicolas</dc:creator>
				<category><![CDATA[Content Management]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[WordPress theme]]></category>
		<category><![CDATA[wp_enqueue_style]]></category>

		<guid isPermaLink="false">http://nkuttler.wordpress-server.de/?p=1796</guid>
		<description><![CDATA[I like to enqueue my CSS styles because it has the benefit of adding a version string. A link like style.css?ver=0.7 is useful because it will force visitors to download an updated style.css when the version number is increased. Here&#8217;s what I currently use in my functions.php: if &#40; !is_admin&#40;&#41; &#41; &#123; $theme = get_theme&#40; [...]]]></description>
			<content:encoded><![CDATA[<p>I like to enqueue my CSS styles because it has the benefit of adding a version string. A link like <code>style.css?ver=0.7</code> is useful because it will force visitors to download an updated <code>style.css</code> when the version number is increased. Here&#8217;s what I currently use in my <code>functions.php</code>:<span id="more-1796"></span></p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span> <span style="color: #339933;">!</span>is_admin<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span> 
    <span style="color: #000088;">$theme</span>  <span style="color: #339933;">=</span> get_theme<span style="color: #009900;">&#40;</span> get_current_theme<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    wp_register_style<span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">'your-style'</span><span style="color: #339933;">,</span> get_bloginfo<span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">'stylesheet_url'</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span> <span style="color: #009900; font-weight: bold;">false</span><span style="color: #339933;">,</span> <span style="color: #000088;">$theme</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'Version'</span><span style="color: #009900;">&#93;</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    wp_enqueue_style<span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">'your-style'</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

<p>I don&#8217;t really like the <code>get_theme()</code> line, but I am not aware of a better way to get the version info. What&#8217;s good about that line is that it gets the version of the current child theme, if you&#8217;re using one.</p>
<p>One problem with enqueuing styles is that most themes need one or two additional CSS files inside conditional comments for a certain browser. <a href="http://www.andrewnacin.com/">Nacin</a> pointed me to a solution:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span> <span style="color: #339933;">!</span>is_admin<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span> 
    <span style="color: #000088;">$theme</span>  <span style="color: #339933;">=</span> get_theme<span style="color: #009900;">&#40;</span> get_current_theme<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    wp_register_style<span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">'your-style'</span><span style="color: #339933;">,</span> get_bloginfo<span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">'stylesheet_url'</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span> <span style="color: #009900; font-weight: bold;">false</span><span style="color: #339933;">,</span> <span style="color: #000088;">$theme</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'Version'</span><span style="color: #009900;">&#93;</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #000088;">$GLOBALS</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'wp_styles'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">add_data</span><span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">'your-style'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'conditional'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'lte IE 8'</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    wp_enqueue_style<span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">'your-style'</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

<p>See also the relevant <a href="http://core.trac.wordpress.org/ticket/10891">discussion on trac</a>. Using this could lead to script concatenation problems in the WordPress core (which doesn&#8217;t concern a theme developer) and if a website uses plugins like <a href="http://wordpress.org/extend/plugins/wp-minify/">wp-minify</a>. So you probably only want to use this in your own themes, not public ones.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.nkuttler.de/2010/07/28/wordpress-style-version-conditional-comments/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Ajax For All WordPress Blogs</title>
		<link>http://www.nkuttler.de/2010/07/22/automatic-ajax-for-wordpress-plugin/</link>
		<comments>http://www.nkuttler.de/2010/07/22/automatic-ajax-for-wordpress-plugin/#comments</comments>
		<pubDate>Thu, 22 Jul 2010 18:25:37 +0000</pubDate>
		<dc:creator>nicolas</dc:creator>
				<category><![CDATA[Content Management]]></category>
		<category><![CDATA[ajax]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[plugin]]></category>
		<category><![CDATA[SEO]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[WordPress plugin]]></category>
		<category><![CDATA[WordPress theme]]></category>

		<guid isPermaLink="false">http://www.nkuttler.de/?p=1851</guid>
		<description><![CDATA[This is a new plugin of mine that will turn many existing WordPress blogs and their themes into Ajax-powered blogs. The best way to see what this plugin does is to look at the live demo. The theme on that site wasn&#8217;t tweaked at all to make the Ajax functionality work (except some irrelevant CSS [...]]]></description>
			<content:encoded><![CDATA[<p>This is a new plugin of mine that will turn many existing WordPress blogs and their themes into Ajax-powered blogs. The best way to see what this plugin does is to look at the <a href="http://ajax.nkuttler.de">live demo</a>.<span id="more-1851"></span></p>
<p>The theme on that site wasn&#8217;t  tweaked at all to make the Ajax functionality work (except some irrelevant CSS changes). It works out of the box on most WordPress themes that follow the <a href="http://codex.wordpress.org/Theme_Development#Anatomy_of_a_Theme">theme coding recommendations</a>, see the plugin&#8217;s <tt>readme.txt</tt> for details.</p>
<p>Downloads are available at <a href=http://wordpress.org/extend/plugins/ajax-for-all/">WordPress.org</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.nkuttler.de/2010/07/22/automatic-ajax-for-wordpress-plugin/feed/</wfw:commentRss>
		<slash:comments>69</slash:comments>
		</item>
		<item>
		<title>WordPress is stupid</title>
		<link>http://www.nkuttler.de/2010/07/13/wordpress-is-stupid/</link>
		<comments>http://www.nkuttler.de/2010/07/13/wordpress-is-stupid/#comments</comments>
		<pubDate>Tue, 13 Jul 2010 15:00:28 +0000</pubDate>
		<dc:creator>nicolas</dc:creator>
				<category><![CDATA[Content Management]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[rant]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://nkuttler.wordpress-server.de/?p=1823</guid>
		<description><![CDATA[In case you haven&#8217;t been aware of this, WordPress core developers think that potentially breaking thousands of links on thousands of sites is an accepatable edge case. Here&#8217;s a great summary of what has been said. I have another equally stupid pet bug. Basically, a CSS file can break core functionality which can lead to [...]]]></description>
			<content:encoded><![CDATA[<p>In case you haven&#8217;t been aware of this, WordPress core developers think that <a href="http://core.trac.wordpress.org/ticket/13583">potentially breaking thousands of links on thousands of sites</a> is <a href="http://lists.automattic.com/pipermail/wp-hackers/2010-July/032858.html">an accepatable edge case</a>. Here&#8217;s a <a href="http://justintadlock.com/archives/2010/07/08/lowercase-p-dangit">great summary</a> of what has been said.<span id="more-1823"></span></p>
<p>I have another <a href="http://core.trac.wordpress.org/ticket/14243">equally stupid</a> pet bug. Basically, a CSS file can break core functionality which can lead to bugs in plugins like my <a href="http://www.nkuttler.de/2008/10/07/theme-switch-and-preview-plugin/">theme switching</a> plugin. It&#8217;s a rather rare bug but the sloppiness of the coding is on the same level.</p>
<p>I have a code-centric blog. I post a lot of code, and of course readers post code themselves from time to time. Of course WordPress has to <a href="http://www.nkuttler.de/2010/06/08/wp_nav_menu-wordpress-3-0/#comment-2202">mess with comments as well</a>. I realize that removing potential XSS code is a good security measure. But seriously. Do <strong>not</strong> delete any content before it goes into the database (besides SQL sanitization). I can&#8217;t even recover that comment now.</p>
<p>WordPress rant over <img src='http://www.nkuttler.de/wp-includes/images/smilies/icon_sad.gif' alt=':-(' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.nkuttler.de/2010/07/13/wordpress-is-stupid/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Samsung ML-1610 on Debian GNU/Linux</title>
		<link>http://www.nkuttler.de/2010/06/30/samsung-ml-1610-driver-linux/</link>
		<comments>http://www.nkuttler.de/2010/06/30/samsung-ml-1610-driver-linux/#comments</comments>
		<pubDate>Wed, 30 Jun 2010 15:00:24 +0000</pubDate>
		<dc:creator>nicolas</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[cups]]></category>
		<category><![CDATA[Debian]]></category>
		<category><![CDATA[howto]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[printer]]></category>
		<category><![CDATA[printing]]></category>

		<guid isPermaLink="false">http://nkuttler.wordpress-server.de/?p=1772</guid>
		<description><![CDATA[I bought this printer a long time ago and it was connected to my Mac until that box died. I tried to install it once but never tried again after I didn&#8217;t get it to work in less than five minutes. Well, this time I did invest like ten minutes and it works just fine. [...]]]></description>
			<content:encoded><![CDATA[<p>I bought this printer a long time ago and it was connected to my Mac until that box died. I tried to install it once but never tried again after I didn&#8217;t get it to work in less than five minutes. Well, this time I did invest like ten minutes and it works just fine.<span id="more-1772"></span></p>

<div class="wp_syntax"><div class="code"><pre class="shell" style="font-family:monospace;"># apt-get install cups splix</pre></div></div>

<p>Then go to the CUPS admin site at <tt>http://localhost:631/</tt> and then <tt>Administration</tt>, <tt>Add new Printer</tt>, click through and select the splix driver for the ML-1610. That&#8217;s all. <img src='http://www.nkuttler.de/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<p>I think the first time I tried I just hadn&#8217;t installed the splix driver&#8230; which is easy enough to find:</p>

<div class="wp_syntax"><div class="code"><pre class="shell" style="font-family:monospace;">$ apt-cache search samsung driver</pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://www.nkuttler.de/2010/06/30/samsung-ml-1610-driver-linux/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Using recordmydesktop to upload to YouTube, Vimeo etc.</title>
		<link>http://www.nkuttler.de/2010/06/21/convert-recordmydesktop-movies-to-flash/</link>
		<comments>http://www.nkuttler.de/2010/06/21/convert-recordmydesktop-movies-to-flash/#comments</comments>
		<pubDate>Mon, 21 Jun 2010 13:10:51 +0000</pubDate>
		<dc:creator>nicolas</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[usability]]></category>
		<category><![CDATA[video]]></category>
		<category><![CDATA[xorg]]></category>

		<guid isPermaLink="false">http://www.nkuttler.de/?p=1527</guid>
		<description><![CDATA[recordMyDesktop is a great tool to make videos of what you&#8217;re doing with your computer. This can be very useful to demonstrate software features or to document workflows. By default, recordMyDesktop produces Ogg-Theora-Vorbis. If you want to share your files or upload them to a video site you&#8217;ll want to convert them to something more [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://recordmydesktop.sourceforge.net/">recordMyDesktop</a> is a great tool to make videos of what you&#8217;re doing with your computer. This can be very useful to demonstrate software features or to document workflows. By default, recordMyDesktop produces Ogg-Theora-Vorbis. If you want to share your files or upload them to a video site you&#8217;ll want to convert them to something more common.<span id="more-1527"></span></p>

<div class="wp_syntax"><div class="code"><pre class="shell" style="font-family:monospace;">mencoder out.ogv -ovc xvid -oac mp3lame -xvidencopts pass=1 -o out.avi</pre></div></div>

<p>This will produce a video of good enough quality so that people can see what you are doing.</p>
<p>Here&#8217;s an example:</p>
<p><object width="500" height="400"><param name="movie" value="http://www.youtube.com/v/OTv8loMWDPU&#038;fs=1"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/OTv8loMWDPU&#038;fs=1" type="application/x-shockwave-flash" width="500" height="400" allowscriptaccess="always" allowfullscreen="true"></embed></object></p>
<p>Please notice that mouse and click highlighting aren&#8217;t recordMyDesktop features.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.nkuttler.de/2010/06/21/convert-recordmydesktop-movies-to-flash/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Password protecting the wp-admin directory</title>
		<link>http://www.nkuttler.de/2010/06/14/htaccess-protect-wordpress-admin/</link>
		<comments>http://www.nkuttler.de/2010/06/14/htaccess-protect-wordpress-admin/#comments</comments>
		<pubDate>Mon, 14 Jun 2010 13:16:07 +0000</pubDate>
		<dc:creator>nicolas</dc:creator>
				<category><![CDATA[Content Management]]></category>
		<category><![CDATA[ajax]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[howto]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[lighttpd]]></category>
		<category><![CDATA[security]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://www.nkuttler.de/?p=1584</guid>
		<description><![CDATA[Several places recommend to block the WordPress admin area with a password. While this certainly is a good idea, implementing it properly is non-trivial. One of the problems is that the WordPress Ajax handler script is located in the admin directory. So password-protecting the admin area will break all Ajax functionality your blog might be [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://codex.wordpress.org/Hardening_WordPress">Several</a> <a href="http://wordpress.tv/2009/07/11/brad-williams-security-montreal09/">places</a> recommend to block the WordPress admin area with a password. While this certainly is a good idea, implementing it properly is non-trivial. <span id="more-1584"></span></p>
<p>One of the problems is that the WordPress Ajax handler script is located in the admin directory. So password-protecting the admin area will break all Ajax functionality your blog might be using on the frontend.</p>
<p>First, see <a href="http://httpd.apache.org/docs/2.2/howto/auth.html">this tutorial</a> on how to password protect directories with an <tt>.htaccess</tt> file. <a href="http://sivel.net">Sivel</a> has an <a href="http://core.trac.wordpress.org/ticket/12400#comment:23">example</a> for whitelisting the Ajax handler, add these line to your <tt>.htaccess</tt> file:</p>

<div class="wp_syntax"><div class="code"><pre class="apache" style="font-family:monospace;"><span style="color: #adadad; font-style: italic;"># These are the lines that do the password protection.</span>
<span style="color: #adadad; font-style: italic;"># You probably already created them while reading through the tutorial linked above.</span>
<span style="color: #00007f;">AuthUserFile</span> /path/to/your/htpasswd
<span style="color: #00007f;">AuthType</span> basic
<span style="color: #00007f;">AuthName</span> <span style="color: #7f007f;">&quot;Restricted Resource&quot;</span>
<span style="color: #00007f;">require</span> valid-<span style="color: #00007f;">user</span>
&nbsp;
<span style="color: #adadad; font-style: italic;"># This is the whitelisting of the ajax handler</span>
&lt;<span style="color: #000000; font-weight:bold;">Files</span> admin-ajax.php&gt;
    <span style="color: #00007f;">Order</span> <span style="color: #00007f;">allow</span>,<span style="color: #00007f;">deny</span>
    <span style="color: #00007f;">Allow</span> <span style="color: #00007f;">from</span> <span style="color: #00007f;">all</span>
    <span style="color: #00007f;">Satisfy</span> any 
&lt;/<span style="color: #000000; font-weight:bold;">Files</span>&gt;</pre></div></div>

<p>Please notice that you absolutely need to create the <tt>htpasswd</tt> file, see the linked tutorial above.</p>
<p><strong>Update:</strong> <code>/wp-admin/css/install.css</code> is also sometimes needed on the frontend, you should whitelist that as well.</p>
<p>Here&#8217;s the necessary configuration to whitelist a file in a password protected location in lighttpd:</p>

<div class="wp_syntax"><div class="code"><pre class="perl" style="font-family:monospace;"><span style="color: #0000ff;">$HTTP</span><span style="color: #009900;">&#91;</span><span style="color: #ff0000;">&quot;url&quot;</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=~</span> <span style="color: #ff0000;">&quot;^<span style="color: #000099; font-weight: bold;">\/</span>wp-admin<span style="color: #000099; font-weight: bold;">\/</span>.*&quot;</span> <span style="color: #009900;">&#123;</span>
    <span style="color: #0000ff;">$HTTP</span><span style="color: #009900;">&#91;</span><span style="color: #ff0000;">&quot;url&quot;</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">!~</span> <span style="color: #ff0000;">&quot;^<span style="color: #000099; font-weight: bold;">\/</span>wp-admin<span style="color: #000099; font-weight: bold;">\/</span>(admin-ajax<span style="color: #000099; font-weight: bold;">\.</span>php|css<span style="color: #000099; font-weight: bold;">\/</span>install<span style="color: #000099; font-weight: bold;">\.</span>css&quot;</span> <span style="color: #009900;">&#123;</span>
        auth<span style="color: #339933;">.</span><span style="color: #000066;">require</span> <span style="color: #339933;">=</span> <span style="color: #009900;">&#40;</span>
            <span style="color: #ff0000;">&quot;&quot;</span> <span style="color: #339933;">=&gt;</span> <span style="color: #009900;">&#40;</span>
                <span style="color: #ff0000;">&quot;method&quot;</span> <span style="color: #339933;">=&gt;</span> <span style="color: #ff0000;">&quot;basic&quot;</span><span style="color: #339933;">,</span>
                <span style="color: #ff0000;">&quot;realm&quot;</span> <span style="color: #339933;">=&gt;</span> <span style="color: #ff0000;">&quot;Password protected area&quot;</span><span style="color: #339933;">,</span>
                <span style="color: #ff0000;">&quot;require&quot;</span> <span style="color: #339933;">=&gt;</span> <span style="color: #ff0000;">&quot;user=theuser&quot;</span><span style="color: #339933;">,</span>
            <span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span>
        <span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span>
    <span style="color: #009900;">&#125;</span><span style="color: #339933;">,</span>
<span style="color: #009900;">&#125;</span><span style="color: #339933;">,</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://www.nkuttler.de/2010/06/14/htaccess-protect-wordpress-admin/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to add support for navigation menus to your WordPress theme</title>
		<link>http://www.nkuttler.de/2010/06/08/wp_nav_menu-wordpress-3-0/</link>
		<comments>http://www.nkuttler.de/2010/06/08/wp_nav_menu-wordpress-3-0/#comments</comments>
		<pubDate>Tue, 08 Jun 2010 15:00:50 +0000</pubDate>
		<dc:creator>nicolas</dc:creator>
				<category><![CDATA[Content Management]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[howto]]></category>
		<category><![CDATA[navigation]]></category>
		<category><![CDATA[template]]></category>
		<category><![CDATA[theme]]></category>
		<category><![CDATA[usability]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[WordPress theme]]></category>
		<category><![CDATA[wp_nav_menu]]></category>

		<guid isPermaLink="false">http://www.nkuttler.de/?p=1613</guid>
		<description><![CDATA[The new navigation menus system in WordPress 3.0 looks promising, but in my opinion it&#8217;s not very usable yet. Anyway, here&#8217;s one way to add navigation menus to your theme while maintaining backward compatibility: In your theme&#8217;s functions.php add something like the following code: 1 2 3 4 5 6 7 8 9 10 11 [...]]]></description>
			<content:encoded><![CDATA[<p>The new <a href="http://codex.wordpress.org/Appearance_Menus_SubPanel">navigation menus</a> system in WordPress 3.0 looks promising, but in my opinion it&#8217;s not very usable yet. Anyway, here&#8217;s one way to add navigation menus to your theme while maintaining backward compatibility:</p>
<p>In your theme&#8217;s <code>functions.php</code> add something like the following code:<span id="more-1613"></span></p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
</pre></td><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">function</span> mytheme_addmenus<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
	register_nav_menus<span style="color: #009900;">&#40;</span>
		<span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span>
			<span style="color: #0000ff;">'main_nav'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'The Main Menu'</span><span style="color: #339933;">,</span>
		<span style="color: #009900;">&#41;</span>
	<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
add_action<span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">'init'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'mytheme_addmenus'</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">function</span> mytheme_nav<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span> <span style="color: #990000;">function_exists</span><span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">'wp_nav_menu'</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span>
        wp_nav_menu<span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">'menu=main_nav&amp;container_class=pagemenu&amp;fallback_cb=mytheme_nav_fallback'</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #b1b100;">else</span>
        mytheme_nav_fallback<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">function</span> mytheme_nav_fallback<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    wp_page_menu<span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">'show_home=Start&amp;menu_class=pagemenu'</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></td></tr></table></div>

<p>In line 1 we add support for the navigation menus. The <code>mytheme_nav()</code> function is what you will use in the theme to display the menu. Inside that function we check if <code>wp_nav_menu()</code> exists, that means if we&#8217;re running WordPress 3.0 (or later). If not we&#8217;ll use the fallback function <code>mytheme_nav_fallback()</code>.</p>
<p>Notice that the fallback also gets called if no navigation menus have been created in the admin area. That&#8217;s what the <code>fallback_cb</code> parameter on line 4 does.</p>
<p>To keep the HTM markup and the CSS consistent you&#8217;ll have to use the <code>container_class</code> parameter on <code>wp_nav_menu</code> but the <code>menu_class</code> parameter for <code>wp_page_menu</code>.</p>
<p>In your template use the following code to use your new custom function:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span> mytheme_nav<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span></pre></div></div>

<h3>Resources</h3>
<ul>
<li><a href="http://codex.wordpress.org/Function_Reference/wp_nav_menu">wp_nav_menu() reference</a></li>
<li><a href="http://codex.wordpress.org/Template_Tags/wp_page_menu">wp_page_menu() reference</a></li>
<li><a href="http://justintadlock.com/archives/2010/06/01/goodbye-headaches-hello-menus">Informative article on nav menus by Justin Tadlock</a></li>
</ul>
<a name="wptoc_0_0_0"></a><h2>Ramblings</h2>
<p>What&#8217;s good about the new menu system:</p>
<ul>
<li>Total control over what appears in the menu</li>
<li>You can add posts, pages, categories and tags in the menu</li>
<li>Very nice drag and drop interface</li>
</ul>
<p>What&#8217;s bad:</p>
<ul>
<li>You will have to teach your users how to use the system properly.</li>
<li>If you create new pages they won&#8217;t be added to your existing menu (except for top level pages).</li>
<li>You can not control your page menus through the navigation menus interface. I think it is&#8230; very very odd that WordPress doesn&#8217;t have a simple drag-and-drop interface to arrange pages.</li>
<li>The previous point means that the new menu system is useless unless you update your theme.</li>
<li>The <code>wp_nav_menu()</code> call is inconsistent with the existing <code>wp_page_menu()</code> function.</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.nkuttler.de/2010/06/08/wp_nav_menu-wordpress-3-0/feed/</wfw:commentRss>
		<slash:comments>29</slash:comments>
		</item>
		<item>
		<title>WPMU fast backend switch</title>
		<link>http://www.nkuttler.de/2010/06/07/wpmu-switch-backend/</link>
		<comments>http://www.nkuttler.de/2010/06/07/wpmu-switch-backend/#comments</comments>
		<pubDate>Mon, 07 Jun 2010 11:10:46 +0000</pubDate>
		<dc:creator>nicolas</dc:creator>
				<category><![CDATA[Content Management]]></category>
		<category><![CDATA[navigation]]></category>
		<category><![CDATA[usability]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[WordPress plugin]]></category>
		<category><![CDATA[WPMU]]></category>

		<guid isPermaLink="false">http://nkuttler.wordpress-server.de/?p=1687</guid>
		<description><![CDATA[I recently converted several simple WordPress installs into a single WPMU install. As I use all of the blogs myself I wanted a quick way to switch between the various backends. This is probably only useful if you don&#8217;t have too many blogs and use all of them yourself. The switch links will be added [...]]]></description>
			<content:encoded><![CDATA[<p>I recently converted several simple WordPress installs into a single WPMU install. As I use all of the blogs myself I wanted a quick way to switch between the various backends. This is probably  only useful if you don&#8217;t have too many blogs and use all of them yourself. The switch links will be added to your super admin menu.<span id="more-1687"></span></p>
<p>By the way, I use the <a href="http://wordpress.org/extend/plugins/ozh-admin-drop-down-menu/">Ozh admin menu plugin</a>. You might need two clicks to switch if  you don&#8217;t. </p>
<p><a href="http://wordpress.org/extend/plugins/wpmu-fast-backend-switch/">Download the plugin</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.nkuttler.de/2010/06/07/wpmu-switch-backend/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
