<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="wordpress/1.5.2" -->
<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/"
>

<channel>
	<title>8027.org</title>
	<link>http://8027.org</link>
	<description>Yet another WebLog...</description>
	<pubDate>Fri, 29 Dec 2006 22:51:18 +0000</pubDate>
	<generator>http://wordpress.org/?v=1.5.2</generator>
	<language>en</language>

		<item>
		<title>Quitting KDE</title>
		<link>http://8027.org/2006/12/03/abandonando-kde/</link>
		<comments>http://8027.org/2006/12/03/abandonando-kde/#comments</comments>
		<pubDate>Sun, 03 Dec 2006 18:54:52 +0000</pubDate>
		<dc:creator>nonick</dc:creator>
		
	<category>KDE</category>
		<guid>http://8027.org/2006/12/03/abandonando-kde/</guid>
		<description><![CDATA[	
Blahblah&#8230; Text in spanish only. Sorry.
]]></description>
			<content:encoded><![CDATA[	<p>
Blahblah&#8230; Text in spanish only. Sorry.</p>
]]></content:encoded>
			<wfw:commentRSS>http://8027.org/2006/12/03/abandonando-kde/feed/</wfw:commentRSS>
	</item>
		<item>
		<title>Fighting root</title>
		<link>http://8027.org/2006/12/03/fighting-rootluchando-con-root/</link>
		<comments>http://8027.org/2006/12/03/fighting-rootluchando-con-root/#comments</comments>
		<pubDate>Sun, 03 Dec 2006 18:33:12 +0000</pubDate>
		<dc:creator>nonick</dc:creator>
		
	<category>Bash</category>
		<guid>http://8027.org/2006/12/03/fighting-rootluchando-con-root/</guid>
		<description><![CDATA[	The sysadmin at my former employer had the bad habit of uploading files as root to directories we all used. It was a real PITA, so I hacked this script to fix the perms, without having to be root. No magic: the directory has to be writable.
	
	
	#!/bin/bash
	#
	# Wed Nov 23 19:25:14 CET 2005 * &#60;nonick [...]]]></description>
			<content:encoded><![CDATA[	<p>The sysadmin at my former employer had the bad habit of uploading files as root to directories we all used. It was a real PITA, so I <a href="http://8027.org/download/code/2005/11/findrootfiles.sh">hacked this script</a> to fix the perms, without having to be root. No magic: the directory has to be writable.</p>
	<p><a id="more-62"></a></p>
	<ol class="codelist">
	<li class="tab0 odd"><code>#!/bin/bash</code></li>
	<li class="tab0 even"><code>#</code></li>
	<li class="tab0 odd"><code># Wed Nov 23 19:25:14 CET 2005 * &lt;nonick AT 8027 DOT org&gt;</code></li>
	<li class="tab0 even"><code>#</code></li>
	<li class="tab0 odd"><code># Aarggh....</code></li>
	<li class="tab0 even"><code>#</code></li>
	<li class="odd">&nbsp;</li>
	<li class="tab0 even"><code>##################</code></li>
	<li class="tab0 odd"><code># Load lib</code></li>
	<li class="tab0 even"><code>#</code></li>
	<li class="tab0 odd"><code>if [ ! -f ~/bin/messages.sh ]; then</code></li>
	<li class="tab1 even"><code>echo &quot;~/bin/messages.sh is required but not found. Bye...&quot;</code></li>
	<li class="tab1 odd"><code>exit 1</code></li>
	<li class="tab0 even"><code>fi</code></li>
	<li class="tab0 odd"><code>. ~/bin/messages.sh</code></li>
	<li class="even">&nbsp;</li>
	<li class="odd">&nbsp;</li>
	<li class="tab0 even"><code>##################</code></li>
	<li class="tab0 odd"><code># Check params</code></li>
	<li class="tab0 even"><code>#</code></li>
	<li class="tab0 odd"><code>if (( ${#@} &lt; 1 ))</code></li>
	<li class="tab0 even"><code>then</code></li>
	<li class="tab1 odd"><code>echo</code></li>
	<li class="tab1 even"><code>echo $(basename $0)</code></li>
	<li class="tab1 odd"><code>echo</code></li>
	<li class="tab1 even"><code>echo &quot; Looks for files owned by root and moves and copies them to regain ownership&quot;</code></li>
	<li class="tab1 odd"><code>echo &quot; This needs the target directory to be writable by the user&quot;</code></li>
	<li class="tab1 even"><code>echo</code></li>
	<li class="tab1 odd"><code>echo &quot; Usage:&quot;</code></li>
	<li class="tab1 even"><code>echo &quot;        $0 &lt;directory&gt;&quot;</code></li>
	<li class="tab1 odd"><code>echo</code></li>
	<li class="tab1 even"><code>exit 1</code></li>
	<li class="tab0 odd"><code>fi</code></li>
	<li class="even">&nbsp;</li>
	<li class="tab0 odd"><code>dir=$1</code></li>
	<li class="even">&nbsp;</li>
	<li class="tab0 odd"><code>if [ ! -d &quot;$dir&quot; ] || [ ! -w &quot;$dir&quot; ]</code></li>
	<li class="tab0 even"><code>then</code></li>
	<li class="tab1 odd"><code>error_msg &quot;Error: either '$dir' is not a directory or it is not writable.&quot;</code></li>
	<li class="tab1 even"><code>exit 2</code></li>
	<li class="tab0 odd"><code>fi</code></li>
	<li class="even">&nbsp;</li>
	<li class="tab0 odd"><code>##################</code></li>
	<li class="tab0 even"><code># Go</code></li>
	<li class="tab0 odd"><code>#</code></li>
	<li class="tab0 even"><code>info_msg &quot;\nRegaining ownership of files in directory '${BLUE}$dir${OFF}'...\n\n&quot;</code></li>
	<li class="odd">&nbsp;</li>
	<li class="tab0 even"><code>for file in $(find $dir -name '*php')</code></li>
	<li class="tab0 odd"><code>do</code></li>
	<li class="tab1 even"><code>group=$(stat -c %g $file)</code></li>
	<li class="tab1 odd"><code>cnt=0</code></li>
	<li class="tab1 even"><code>if (( group == 0 ))</code></li>
	<li class="tab1 odd"><code>then</code></li>
	<li class="tab2 even"><code>run_cmd &quot;File ${RED}${file}${OFF} belongs to root, moving ... &quot;\</code></li>
	<li class="tab10 odd"><code>&quot;mv $file $file~~ &amp;&amp; cp $file~~ $file&quot;</code></li>
	<li class="tab2 even"><code>let cnt=$cnt+1</code></li>
	<li class="tab1 odd"><code>fi</code></li>
	<li class="tab0 even"><code>done</code></li>
	<li class="odd">&nbsp;</li>
	<li class="tab0 even"><code>info_msg &quot;\n${BLUE}${cnt}${OFF} files needed moving.\n\n&quot;</code></li>
	<li class="odd">&nbsp;</li>
	<li class="tab0 even"><code>if (( cnt &gt; 0 ))</code></li>
	<li class="tab0 odd"><code>then</code></li>
	<li class="tab1 even"><code>if ask_msg &quot;I left backup files. Remove them? &quot; &quot;N&quot;</code></li>
	<li class="tab1 odd"><code>then</code></li>
	<li class="tab2 even"><code>#run_cmd &quot;Removing ... &quot; &quot;find $dir -iname '*php~~' -exec rm \{\} \;&quot;</code></li>
	<li class="tab2 odd"><code>info_msg &quot;${RED}Feature disabled${OFF}\n\n&quot;</code></li>
	<li class="tab1 even"><code>fi</code></li>
	<li class="tab0 odd"><code>fi</code></li>
	<li class="even">&nbsp;</li>
	<li class="tab0 odd"><code>exit 0;</code></li>
	<li class="sourcelink"><strong>Download this code:</strong> <a href="http://8027.org/download/code/2005/11/findrootfiles.sh">findrootfiles.sh</a></li>
	</ol>
]]></content:encoded>
			<wfw:commentRSS>http://8027.org/2006/12/03/fighting-rootluchando-con-root/feed/</wfw:commentRSS>
	</item>
		<item>
		<title>leeme.sh</title>
		<link>http://8027.org/2006/12/03/leeme-readme/</link>
		<comments>http://8027.org/2006/12/03/leeme-readme/#comments</comments>
		<pubDate>Sun, 03 Dec 2006 18:06:18 +0000</pubDate>
		<dc:creator>nonick</dc:creator>
		
	<category>Bash</category>
		<guid>http://8027.org/2006/12/03/leeme-readme/</guid>
		<description><![CDATA[	
Desde hace años, tengo como costumbre describir todo lo que hago en ficheritos LEEME repartidos por todo el disco duro. Aquí está el script que uso para crearlos y editarlos. Puedes ver el código si pasas a la siguiente página&#8230;
	
	
	&#160;
	#!/bin/bash
	#
	# 'leeme':
	# vie ene 11 00:47:12 CET 2003 * Miguel de Benito &#60;nonick AT 8027 DOT [...]]]></description>
			<content:encoded><![CDATA[	<p>
Desde hace años, tengo como costumbre describir <strong>todo</strong> lo que hago en ficheritos LEEME repartidos por todo el disco duro. <a href="http://8027.org/download/code/2003/04/leeme.sh">Aquí está</a> el script que uso para crearlos y editarlos. Puedes ver el código si pasas a la siguiente página&#8230;</p>
	<p><a id="more-61"></a></p>
	<ol class="codelist">
	<li class="odd">&nbsp;</li>
	<li class="tab0 even"><code>#!/bin/bash</code></li>
	<li class="tab0 odd"><code>#</code></li>
	<li class="tab0 even"><code># 'leeme':</code></li>
	<li class="tab0 odd"><code># vie ene 11 00:47:12 CET 2003 * Miguel de Benito &lt;nonick AT 8027 DOT org&gt;</code></li>
	<li class="tab0 even"><code>#</code></li>
	<li class="tab0 odd"><code># Edita ficheros LEEME.</code></li>
	<li class="tab0 even"><code># Están compuestos de entradas delimitadas por $MARCA. La entrada más antigua</code></li>
	<li class="tab0 odd"><code># en última posición (al final del fichero)</code></li>
	<li class="tab0 even"><code>#</code></li>
	<li class="tab0 odd"><code># ---&gt; Esta versión es la de lagash, incluye una marca con el nombre del equipo</code></li>
	<li class="tab0 even"><code>#      en el que se editó el fichero LEEME</code></li>
	<li class="odd">&nbsp;</li>
	<li class="tab0 even"><code>FICH=./LEEME</code></li>
	<li class="tab0 odd"><code>MARCA=&quot;^###.*MBD.*$&quot;</code></li>
	<li class="tab0 even"><code>TMP=$(mktemp '/tmp/leeme.XXXXXX')</code></li>
	<li class="odd">&nbsp;</li>
	<li class="even">&nbsp;</li>
	<li class="tab0 odd"><code># Devuelve la fecha de modificación de su argumento en segundos</code></li>
	<li class="tab0 even"><code># desde época.</code></li>
	<li class="tab0 odd"><code>function mtime</code></li>
	<li class="tab0 even"><code>{</code></li>
	<li class="tab1 odd"><code>find &quot;$1&quot; -printf &quot;%C@&quot;</code></li>
	<li class="tab0 even"><code>}</code></li>
	<li class="odd">&nbsp;</li>
	<li class="even">&nbsp;</li>
	<li class="tab0 odd"><code>if [ -f $FICH ]; then</code></li>
	<li class="tab1 even"><code>echo &quot;$FICH encontrado. $(grep $MARCA $FICH |wc -l) ediciones.&quot;</code></li>
	<li class="tab1 odd"><code>echo &quot;Últimas 10:&quot;</code></li>
	<li class="tab1 even"><code>grep $MARCA $FICH | tail -10</code></li>
	<li class="tab1 odd"><code>read -p &quot;Editar? [s]&quot; -n 1 entrada</code></li>
	<li class="tab0 even"><code>else</code></li>
	<li class="tab1 odd"><code>echo &quot;$FICH no encontrado&quot;</code></li>
	<li class="tab1 even"><code>read -p &quot;Crear? [s]&quot; -n 1 entrada</code></li>
	<li class="tab0 odd"><code>fi</code></li>
	<li class="even">&nbsp;</li>
	<li class="tab0 odd"><code>echo</code></li>
	<li class="even">&nbsp;</li>
	<li class="tab0 odd"><code>case $entrada in</code></li>
	<li class="tab1 even"><code>'s'|'S'|'y'|'Y'|'')</code></li>
	<li class="tab2 odd"><code>echo -e &quot;### [ MBD $(date) (@${HOSTNAME}) ]\n\n\n&quot; &gt; $TMP</code></li>
	<li class="even">&nbsp;</li>
	<li class="tab2 odd"><code>[ -f $FICH ] &amp;&amp; cat $FICH &gt;&gt; $TMP</code></li>
	<li class="even">&nbsp;</li>
	<li class="tab2 odd"><code>fecha1=$(mtime $TMP)</code></li>
	<li class="tab2 even"><code>/usr/bin/vim +3  -c &quot;set textwidth=80&quot; $TMP</code></li>
	<li class="tab2 odd"><code>fecha2=$(mtime $TMP)</code></li>
	<li class="even">&nbsp;</li>
	<li class="tab2 odd"><code>if [ &quot;$fecha1&quot; == &quot;$fecha2&quot; ]; then</code></li>
	<li class="tab3 even"><code>echo &quot;Sin modificaciones.&quot;</code></li>
	<li class="tab2 odd"><code>else</code></li>
	<li class="tab3 even"><code>cp $TMP $FICH</code></li>
	<li class="tab2 odd"><code>fi</code></li>
	<li class="tab2 even"><code>;;</code></li>
	<li class="tab1 odd"><code>'n'|'N')</code></li>
	<li class="tab2 even"><code>;;</code></li>
	<li class="tab0 odd"><code>esac</code></li>
	<li class="even">&nbsp;</li>
	<li class="tab0 odd"><code>rm $TMP</code></li>
	<li class="tab0 even"><code>exit 0</code></li>
	<li class="odd">&nbsp;</li>
	<li class="sourcelink"><strong>Download this code:</strong> <a href="http://8027.org/download/code/2003/04/leeme.sh">leeme.sh</a></li>
	</ol>
]]></content:encoded>
			<wfw:commentRSS>http://8027.org/2006/12/03/leeme-readme/feed/</wfw:commentRSS>
	</item>
		<item>
		<title>New index</title>
		<link>http://8027.org/2006/12/01/new-index/</link>
		<comments>http://8027.org/2006/12/01/new-index/#comments</comments>
		<pubDate>Fri, 01 Dec 2006 09:06:30 +0000</pubDate>
		<dc:creator>nonick</dc:creator>
		
	<category>This site</category>
		<guid>http://8027.org/2006/12/01/new-index/</guid>
		<description><![CDATA[	Sorry, no english text.

]]></description>
			<content:encoded><![CDATA[	<p>Sorry, no english text.
</p>
]]></content:encoded>
			<wfw:commentRSS>http://8027.org/2006/12/01/new-index/feed/</wfw:commentRSS>
	</item>
		<item>
		<title>Good news for PHPlot</title>
		<link>http://8027.org/2006/11/15/bayuk-enters-phplot/</link>
		<comments>http://8027.org/2006/11/15/bayuk-enters-phplot/#comments</comments>
		<pubDate>Wed, 15 Nov 2006 19:27:58 +0000</pubDate>
		<dc:creator>nonick</dc:creator>
		
	<category>PHPlot</category>
		<guid>http://8027.org/2006/11/15/bayuk-enters-phplot/</guid>
		<description><![CDATA[	
To anyone currently using it, it is quite obvious that development on PHPlot was almost frozen. It&#8217;s almost been two years since my last CVS commit and during the last 21 months Afan only found time to do some. The only work was done by L.J. Bayuk, of whom I already talked here when he [...]]]></description>
			<content:encoded><![CDATA[	<p>
To anyone currently using it, it is quite obvious that development on <a href="http://8027.org/category/phplot">PHPlot</a> was almost frozen. It&#8217;s almost been two years since my last CVS commit and during the last 21 months Afan only found time to do some. The only work was done by L.J. Bayuk, of whom <a href="http://8027.org/2005/02/09/phplot-documentation-at-last/">I already talked</a> here when he submitted me a great and very <a href="http://8027.org/phplot/doc/manual/">complete user manual</a>. During all this time he has helped at the forums, sent bug reports and fixed them; but last 8th of November, Bayuk was added to the project developers assuming the maintainter role, and <a href="http://phplot.cvs.sourceforge.net/phplot/phplot/phplot.php?view=log">what an activity</a>! 10 commits, 7 fixed bugs and release <a href="http://sourceforge.net/forum/forum.php?forum_id=634631">5.0.rc3 ready</a> in 5 days.</p>
	<p>Looks like there&#8217;s good stuff coming!</p>
]]></content:encoded>
			<wfw:commentRSS>http://8027.org/2006/11/15/bayuk-enters-phplot/feed/</wfw:commentRSS>
	</item>
		<item>
		<title>More changes</title>
		<link>http://8027.org/2006/10/22/more-site-updates/</link>
		<comments>http://8027.org/2006/10/22/more-site-updates/#comments</comments>
		<pubDate>Sun, 22 Oct 2006 19:54:47 +0000</pubDate>
		<dc:creator>nonick</dc:creator>
		
	<category>This site</category>
	<category>Uninteresting</category>
		<guid>http://8027.org/2006/10/22/more-site-updates/</guid>
		<description><![CDATA[	Trust me, you don&#8217;t need to read this&#8230; Spanish text only.
]]></description>
			<content:encoded><![CDATA[	<p>Trust me, you don&#8217;t need to read this&#8230; Spanish text only.</p>
]]></content:encoded>
			<wfw:commentRSS>http://8027.org/2006/10/22/more-site-updates/feed/</wfw:commentRSS>
	</item>
		<item>
		<title>Long category descriptions in wordpress</title>
		<link>http://8027.org/2006/10/21/wp-long-category-descriptions/</link>
		<comments>http://8027.org/2006/10/21/wp-long-category-descriptions/#comments</comments>
		<pubDate>Sat, 21 Oct 2006 06:57:54 +0000</pubDate>
		<dc:creator>nonick</dc:creator>
		
	<category>This site</category>
	<category>WordPress</category>
		<guid>http://8027.org/2006/10/21/wp-long-category-descriptions/</guid>
		<description><![CDATA[	
Here is the outline of what I did to get some (translated) text displayed at the beginning of every category page. This is mostly a reminder to myself in order to be able to redo it in the unlikely case I upgrade Wordpress and have to go through it once again.
	
	
	Add the column to the [...]]]></description>
			<content:encoded><![CDATA[	<p>
Here is the outline of what I did to get some (translated) text displayed at the beginning of every category page. This is mostly a reminder to myself in order to be able to redo it in the unlikely case I upgrade Wordpress and have to go through it once again.</p>
	<p><a id="more-50"></a></p>
	<ol>
	<li>Add the column to the categories table.<br />
<code>ALTER TABLE wp_categories ADD COLUMN category_long_description LONGTEXT NOT NULL DEFAULT '' CHARACTER SET utf8 COLLATE utf8_general_ci AFTER category_description;</code><br />
Actually I intended to use <code>category_description</code> for this, but in my template it is used as the link&#8217;s <code>title</code> in the category listing on the sidebar.
</li>
	<li>Create  a file <code>category.php</code> in the theme&#8217;s directory. In my case it almost a copy of <code>archive.php</code>, but with the following line added:<br />
<code><br />
 &lt;div class="categorydescription"&gt;&lt;?php category_long_description(); ?&gt;&lt;/div&gt;<br />
</code>
</li>
	<li>Add that function (<code>category_long_description()</code>) to <code>wp-includes/template-functions-category.php</code>. Here is the code:<br />
<code><br />
/**<br />
 * Returns the long description for a given category<br />
 *<br />
 *  @param int $category Category identifier. Leave empty to default to current category.<br />
 */<br />
function category_long_description($category = 0) {<br />
	global $cat;<br />
	if (!$category) $category = $cat;<br />
		$category = &#038; get_category($category);<br />
	return apply_filters('category_long_description', $category->category_long_description, $category->cat_ID);<br />
}<br />
</code>
</li>
	<li>Tell <a href="http://8027.org/2005/11/01/multilingual-wordpress/">polyglot</a> to hook to the newly created filter to translate the text in the table. And by the way, tell it to hook to the filter <code>category_description</code> as well, because it should already be there. Edit <code>plugins/polyglot.php</code> and add:
	<p><code><br />
 // category descriptions should not have &lt;more&gt; tags. That's why we don't use lang_picker_respect_more().<br />
 add_filter('category_description', 'lang_picker',1);<br />
 add_filter('category_long_description', 'lang_picker',1);<br />
</code></p>
	</li>
	<li>
Last, modify the control panel to add the form field for the categories&#8217; descriptions. The hack is so easy that it just deserves light comment: in file <code>wp-admin/category.php</code> add the <code>textarea</code> in a couple of places, name it <code>category_long_description</code>, add the matching <code>$category_long_description</code> variable everywhere it is needed. Simple copy&#038;paste&#038;edit of the code for <code>category_description</code> will work.
</li>
	<li>Done. You can check that it works (or at least it should!) browsing some of the categories on this site (I haven&#8217;t added descriptions to all of them)</li>
	</ol>
]]></content:encoded>
			<wfw:commentRSS>http://8027.org/2006/10/21/wp-long-category-descriptions/feed/</wfw:commentRSS>
	</item>
		<item>
		<title>[Old stuff] Simple proxyes</title>
		<link>http://8027.org/2006/10/18/proxyc-remixed/</link>
		<comments>http://8027.org/2006/10/18/proxyc-remixed/#comments</comments>
		<pubDate>Wed, 18 Oct 2006 20:53:32 +0000</pubDate>
		<dc:creator>nonick</dc:creator>
		
	<category>Programming</category>
		<guid>http://8027.org/2006/10/18/proxyc-remixed/</guid>
		<description><![CDATA[	I f you need a quick-hack TCP proxy, netcat, a named fifo and one pipe might do the trick:

 mknod fifo p
 netcat -l -p [inbound_port] 0&#60;fifo &#166; netcat localhost [outbound_port] 1&#62;fifo

Of course you&#8217;ll need netcat. But it&#8217;s also possible and far more fun, to program one oneself or look at/improve one already made. At [...]]]></description>
			<content:encoded><![CDATA[	<p>I f you need a quick-hack TCP proxy, <a href="http://netcat.sourceforge.net">netcat</a>, a named fifo and one pipe might do the trick:<br />
<code><br />
 mknod fifo p<br />
 netcat -l -p [inbound_port] 0&lt;fifo | netcat localhost [outbound_port] 1&gt;fifo<br />
</code><br />
Of course you&#8217;ll need netcat. But it&#8217;s also possible and far more fun, to program one oneself or look at/improve one already made. At my job this february, I chose the latter and found <a href="http://mapleman.linuxreal.org/pyblosxom/data/static/proxyc.html">proxyc</a> by <a href="http://mapleman.linuxreal.org">Adrian Montero</a>.  While looking at it (to check what I was about to use), I worked a bit on the code fixing little things here and there, coding my own personal style and showing my usual lack of originality. The result, though a bit late, is <a href="/download/tools/proxyc-0.2.tar.gz">available for download here</a> just in case someone is interested.</p>
]]></content:encoded>
			<wfw:commentRSS>http://8027.org/2006/10/18/proxyc-remixed/feed/</wfw:commentRSS>
	</item>
		<item>
		<title>A little scheme book</title>
		<link>http://8027.org/2006/10/14/the-schemeprogramming-language/</link>
		<comments>http://8027.org/2006/10/14/the-schemeprogramming-language/#comments</comments>
		<pubDate>Sat, 14 Oct 2006 10:37:50 +0000</pubDate>
		<dc:creator>nonick</dc:creator>
		
	<category>Programming</category>
	<category>Books</category>
		<guid>http://8027.org/2006/10/14/the-schemeprogramming-language/</guid>
		<description><![CDATA[	Sorry, no english text  for the moment.
]]></description>
			<content:encoded><![CDATA[	<p>Sorry, no english text  for the moment.</p>
]]></content:encoded>
			<wfw:commentRSS>http://8027.org/2006/10/14/the-schemeprogramming-language/feed/</wfw:commentRSS>
	</item>
		<item>
		<title>Views counter</title>
		<link>http://8027.org/2006/10/10/view-count-plugin/</link>
		<comments>http://8027.org/2006/10/10/view-count-plugin/#comments</comments>
		<pubDate>Tue, 10 Oct 2006 21:56:04 +0000</pubDate>
		<dc:creator>nonick</dc:creator>
		
	<category>This site</category>
	<category>WordPress</category>
		<guid>http://8027.org/2006/10/10/view-count-plugin/</guid>
		<description><![CDATA[	I just installed the view-count plugin by Mike O’Connell.  As one would expect, it&#8217;s a very simple plugin. On the first run it ALTERs the posts table adding a BIGINT view_count column which is updated when users click on a post. To display the number of views, one has just to call the_view_count() at [...]]]></description>
			<content:encoded><![CDATA[	<p>I just installed the <a href="http://wunder-ful.com/wordpress-plugins">view-count plugin</a> by <a href="http://wunder-ful.com/">Mike O’Connell</a>.  As one would expect, it&#8217;s a very simple plugin. On the first run it <code>ALTER</code>s the posts table adding a <code>BIGINT view_count</code> column which is updated when users click on a post. To display the number of views, one has just to call <code>the_view_count()</code> at some place in the template. I&#8217;ll add it one day&#8230; <img src='http://8027.org/wp-images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' />  </p>
	<p>Alas, the counter never gets updated&#8230; the filters installed by the plugin never get called, since expects filter <code>single_template</code> to be applied somewhere during template rendering, but that filter name doesn&#8217;t even exist in my ancient wordpress version. I just added<br />
<code><br />
 if(is_single() || is_page())<br />
   apply_filter('single_template', $content);<br />
</code><br />
to <code>wp-includes/template-functions-post.php</code>, function <code>the_content()</code> and it works now. I hope that as it should <img src='http://8027.org/wp-images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRSS>http://8027.org/2006/10/10/view-count-plugin/feed/</wfw:commentRSS>
	</item>
	</channel>
</rss>
