<?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>h4x3d.com &#187; code</title>
	<atom:link href="http://h4x3d.com/tag/code/feed/" rel="self" type="application/rss+xml" />
	<link>http://h4x3d.com</link>
	<description>online portfolio of Julian Klewes</description>
	<lastBuildDate>Mon, 25 Jul 2011 13:18:32 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>How to remove W3 Total Cache html comment in footer</title>
		<link>http://h4x3d.com/how-to-remove-w3-total-cache-html-comment-in-footer/</link>
		<comments>http://h4x3d.com/how-to-remove-w3-total-cache-html-comment-in-footer/#comments</comments>
		<pubDate>Fri, 10 Sep 2010 08:28:21 +0000</pubDate>
		<dc:creator>jz</dc:creator>
				<category><![CDATA[code]]></category>
		<category><![CDATA[how to]]></category>
		<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[2010]]></category>
		<category><![CDATA[credits]]></category>
		<category><![CDATA[footer]]></category>
		<category><![CDATA[html]]></category>
		<category><![CDATA[remove]]></category>
		<category><![CDATA[W3 Total Cache]]></category>

		<guid isPermaLink="false">http://www.h4x3d.com/?p=1417</guid>
		<description><![CDATA[I am not discussing whether it should be done or not, but just saying where to do it. W3 Total Cache is a great plugin and they surely deserve some SEO juice / kudos for their work, but I have seen questions unanswered on the net of people not knowing where to delete pieces of [...]]]></description>
			<content:encoded><![CDATA[<p><em>I am not discussing whether it should be done or not, but just saying where to do it.</em><br />
W3 Total Cache is a great plugin and they surely deserve some SEO juice / kudos for their work, but I have seen questions unanswered on the net of people not knowing where to delete pieces of comments that are inserted into their pages. Again, I am not touching the ethics of removing credits, but just offer the tools. Use as liked.</p>
<pre><code>/wp-content/plugins/w3-total-cache/lib/W3/Plugin/TotalCache.php</code></pre>
<p>and uncomment/change as desired.</p>
<p>from</p>
<pre><code>/wp-content/plugins/w3-total-cache/w3-total-cache.php</code></pre>
<p>you can find the lead (the references to the above mentioned file).<br />
find the lines using the search for the html comment&#8230; </p>
]]></content:encoded>
			<wfw:commentRss>http://h4x3d.com/how-to-remove-w3-total-cache-html-comment-in-footer/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>WordPress Mu embed not working for youtube, input, code, etc.</title>
		<link>http://h4x3d.com/wordpress-mu-embed-not-working-for-youtube-input-code-etc/</link>
		<comments>http://h4x3d.com/wordpress-mu-embed-not-working-for-youtube-input-code-etc/#comments</comments>
		<pubDate>Tue, 01 Dec 2009 20:16:32 +0000</pubDate>
		<dc:creator>jz</dc:creator>
				<category><![CDATA[code]]></category>
		<category><![CDATA[embed]]></category>
		<category><![CDATA[includes]]></category>
		<category><![CDATA[input]]></category>
		<category><![CDATA[plugin]]></category>
		<category><![CDATA[unfiltered]]></category>
		<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[wordpress mu]]></category>
		<category><![CDATA[youtube]]></category>

		<guid isPermaLink="false">http://www.h4x3d.com/?p=1402</guid>
		<description><![CDATA[Today I wanted to publish a real quick post about how to embed a paypal button into your wordpress post. A topic that has been covered many times elsewhere (if you consult google), but yet many paypal buttons failed to hide the merchant&#8217;s email address which would result in evil spam to be sent. Anyhow, [...]]]></description>
			<content:encoded><![CDATA[<p>Today I wanted to publish a real quick post about how to embed a paypal button into your wordpress post. A topic that has been covered many times elsewhere (if you consult google), but yet many paypal buttons failed to hide the merchant&#8217;s email address which would result in evil spam to be sent. Anyhow, I thought posting this quick article would take max 5 minutes or so, but it turned out to be more difficult: WordPress MU for security purposes does not allow specific HTML code to be included in posts or pages.<br />
This is for security reasons, as mentioned before, because in a multi-blog environment people could post all sorts of crap to compromise your site, server and work, ultimately driving you nuts and causing all sorts of havoc.</p>
<p>After some Googling <a href="http://www.clickonf5.org/wordpress-mu/youtube-other-video-not-embedding-wordpress-mu/5820">I</a> <a href="http://mu.wordpress.org/forums/topic/1964?replies=6">found</a> <a href="http://mu.wordpress.org/forums/topic/1964/page/2#post-46843">several</a> <a href="http://blogs.voxeo.com/behindtheblog/2008/08/01/tip-how-to-modify-wordpress-mu-to-allow-embed-objects-specifically-for-slideshare/">interesting</a> <a href="http://php-princess.net/2009/06/16/embedding-youtube-videos-in-wordpress-mu/">articles</a>, <a href="http://kafekafe.com/wordpress-mu/2009/06/24/wordpress-mu-embed-code/">most</a> of <a href="http://www.darkavenger.co.uk/words/2009/09/get-youtube-videos-to-work-in-wordpress-mu/">them</a> repeated themselves and said &#8220;well.. edit the ksas.php file in wp-includes&#8221; and then stated a long-list with many interesting HTML pieces. This works, but a plugin is more fancy I thought: so I googled on and found a plugin called <a href="http://wordpress.org/extend/plugins/unfiltered-mu/">&#8220;unfiltered&#8221; content WordPress MU</a>, released by the WordPress guys. This is in so far cool, as you can either stick it in the mu-plugins folder and have it sidewide, or in the regular plugins folder and just activate it on a blog by blog basis. Since I am running this WordPress MU installation on my own and do not have posts to monitor for &#8220;havoc causing script includes&#8221;, I decided to go for the plugin and enable it side-wide. This way I can upgrade my wordpress mu next time a new version comes out and keep my sanity (because by then I would probably have forgotten about the includes folder and the php file that I need to update every time&#8230;)</p>
<p>Hope this helps,<br />
best,<br />
jez</p>
]]></content:encoded>
			<wfw:commentRss>http://h4x3d.com/wordpress-mu-embed-not-working-for-youtube-input-code-etc/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Adding a paypal button to your wordpress page</title>
		<link>http://h4x3d.com/adding-a-paypal-button-to-your-wordpress-page/</link>
		<comments>http://h4x3d.com/adding-a-paypal-button-to-your-wordpress-page/#comments</comments>
		<pubDate>Tue, 01 Dec 2009 15:39:23 +0000</pubDate>
		<dc:creator>jz</dc:creator>
				<category><![CDATA[asides]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[donate]]></category>
		<category><![CDATA[form]]></category>
		<category><![CDATA[paypal]]></category>
		<category><![CDATA[plugin]]></category>
		<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://www.h4x3d.com/?p=1398</guid>
		<description><![CDATA[update: f§*king wordpress mu won&#8217;t let me enter tags in my posts. I have tried the wordpress RAW plugin and other filters, but still. more updates on this tomorrow -> solution There are different approaches to doing this (adding a paypal button to your wordpress page, or any html or php website): You can copy&#38;paste [...]]]></description>
			<content:encoded><![CDATA[<p><strong><a href="http://www.h4x3d.com/wordpress-mu-embed-not-working-for-youtube-input-code-etc/">update: f§*king wordpress mu won&#8217;t let me enter  tags in my posts. I have tried the wordpress RAW plugin and other filters, but still. more updates on this tomorrow -> solution</a></strong></p>
<p>There are different approaches to doing this (adding a paypal button to your wordpress page, or any html or php website):</p>
<p>You can copy&amp;paste the code you find on most pages and wonder why you get really a lot of spam emails<br />
or you can use the &#8220;secure merchant id&#8221; code from paypal<br />
or you can grab a plugin at wordpress.org</p>
<p>To explain the first (revealing code)</p>
<pre><span style=' color: Blue;'>&lt;</span><span style=' color: Maroon;'>form</span> <span style=' color: Red;'>name</span>=”_xclick” <span style=' color: Red;'>action</span>=”https://www.paypal.com/cgi-bin/webscr” <span style=' color: Red;'>method</span>=”post”<span style=' color: Blue;'>&gt;</span>
<span style=' color: Blue;'>&lt;</span><span style=' color: Maroon;'>input</span> <span style=' color: Red;'>type</span>=”hidden” <span style=' color: Red;'>name</span>=”cmd” <span style=' color: Red;'>value</span>=”_xclick”/<span style=' color: Blue;'>&gt;</span>
<span style=' color: Blue;'>&lt;</span><span style=' color: Maroon;'>input</span> <span style=' color: Red;'>type</span>=”hidden” <span style=' color: Red;'>name</span>=”business” <span style=' color: Red;'>value</span>=”user@spam-me-please.com”/<span style=' color: Blue;'>&gt;</span>
<span style=' color: Blue;'>&lt;</span><span style=' color: Maroon;'>input</span> <span style=' color: Red;'>type</span>=”hidden” <span style=' color: Red;'>name</span>=”item_name” <span style=' color: Red;'>value</span>=”Customer Service”/<span style=' color: Blue;'>&gt;</span>
<span style=' color: Blue;'>&lt;</span><span style=' color: Maroon;'>input</span> <span style=' color: Red;'>type</span>=”hidden” <span style=' color: Red;'>name</span>=”currency_code” <span style=' color: Red;'>value</span>=”USD”/<span style=' color: Blue;'>&gt;</span>
<span style=' color: Blue;'>&lt;</span><span style=' color: Maroon;'>input</span> <span style=' color: Red;'>type</span>=”hidden” <span style=' color: Red;'>name</span>=”amount” <span style=' color: Red;'>value</span>=”1.00″/<span style=' color: Blue;'>&gt;</span>
<span style=' color: Blue;'>&lt;</span><span style=' color: Maroon;'>input</span> <span style=' color: Red;'>type</span>=”image” <span style=' color: Red;'>src</span>=”http://www.paypal.com/en_US/i/btn/btn_donate_LG.gif” <span style=' color: Red;'>border</span>=”0″ <span style=' color: Red;'>name</span>=”submit” <span style=' color: Red;'>alt</span>=”Make payments with PayPal - it’s fast, free and secure!”/<span style=' color: Blue;'>&gt;</span>
<span style=' color: Blue;'>&lt;</span>/<span style=' color: Maroon;'>form</span><span style=' color: Blue;'>&gt;</span></pre>
<p>While this has its advantages: you can easily specify the parameters, it also has the problem that your email address is very likely to be scraped and spammed by bots. So next time you receive one of those fake paypal &#8220;you need to click here to reactivate your account&#8221; emails&#8230; guess why you are receiving it.</p>
<p>I use the second version, the paypal secured id, because I am not too keen to exposing (any) email address to spam bots. The code below will generate a paypal button with my id in it. To change that or to get your code you need to login to paypal and get it from the merchant tab. Or you can enter &#8220;paypal button&#8221; in the search field top right of the page.</p>
<p>2) Click on Merchant services.<br />
3) Click on websites payment standards.<br />
4) Click on accept contributions.<br />
5) Click on get donation button.</p>
<pre><span style=' color: Blue;'>&lt;</span><span style=' color: Maroon;'>form</span> <span style=' color: Red;'>action</span>="<span style=' color: Blue;'>https://www.paypal.com/cgi-bin/webscr</span>" <span style=' color: Red;'>method</span>="<span style=' color: Blue;'>post</span>"<span style=' color: Blue;'>&gt;</span>
<span style=' color: Blue;'>&lt;</span><span style=' color: Maroon;'>input</span> <span style=' color: Red;'>type</span>="<span style=' color: Blue;'>hidden</span>" <span style=' color: Red;'>name</span>="<span style=' color: Blue;'>cmd</span>" <span style=' color: Red;'>value</span>="<span style=' color: Blue;'>_s-xclick</span>"/<span style=' color: Blue;'>&gt;</span>
<span style=' color: Blue;'>&lt;</span><span style=' color: Maroon;'>input</span> <span style=' color: Red;'>type</span>="<span style=' color: Blue;'>hidden</span>" <span style=' color: Red;'>name</span>="<span style=' color: Blue;'>hosted_button_id</span>" <span style=' color: Red;'>value</span>="<span style=' color: Blue;'>10155388</span>"/<span style=' color: Blue;'>&gt;</span>
<span style=' color: Blue;'>&lt;</span><span style=' color: Maroon;'>input</span> <span style=' color: Red;'>type</span>="<span style=' color: Blue;'>image</span>" <span style=' color: Red;'>src</span>="<span style=' color: Blue;'>https://www.paypal.com/en_US/i/btn/btn_donate_LG.gif</span>" <span style=' color: Red;'>style</span>="<span style=' color: Blue;'>width: 100px; float: right;</span>" <span style=' color: Red;'>border</span>="<span style=' color: Blue;'>0</span>" <span style=' color: Red;'>name</span>="<span style=' color: Blue;'>submit</span>" <span style=' color: Red;'>alt</span>="<span style=' color: Blue;'>PayPal - The safer, easier way to pay online!</span>"/<span style=' color: Blue;'>&gt;</span>
<span style=' color: Blue;'>&lt;</span>/<span style=' color: Maroon;'>form</span><span style=' color: Blue;'>&gt;</span></pre>
<p>And now to the fun part actually: you will not be able to copy and paste the code(s) mentioned above, because wordpress will strip the input fields and nothing will display. So unless you are putting this code into your template (e.g. by including it in a separate php file), it won&#8217;t work, I believe.</p>
<p>You can however grab a wordpress plugin, like this <a href="http://wordpress.org/extend/plugins/paypal-donations/">paypal plugin</a> to help you out.</p>
<p>Also of help &#8211; this support post at <a href="http://en.forums.wordpress.com/topic/adding-a-custom-paypal-link-easy-as-1-2-3?replies=7">wordpress</a></p>
<p>hope this helps anyone,<br />
best,<br />
jez</p>
]]></content:encoded>
			<wfw:commentRss>http://h4x3d.com/adding-a-paypal-button-to-your-wordpress-page/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Survs.com Invites 2009</title>
		<link>http://h4x3d.com/survscom-invites-2009/</link>
		<comments>http://h4x3d.com/survscom-invites-2009/#comments</comments>
		<pubDate>Sat, 28 Feb 2009 12:24:33 +0000</pubDate>
		<dc:creator>jez</dc:creator>
				<category><![CDATA[unsorted]]></category>
		<category><![CDATA[2009]]></category>
		<category><![CDATA[ajax]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[Design]]></category>
		<category><![CDATA[february]]></category>
		<category><![CDATA[free]]></category>
		<category><![CDATA[invites]]></category>
		<category><![CDATA[signup]]></category>
		<category><![CDATA[survey]]></category>
		<category><![CDATA[survs.com]]></category>

		<guid isPermaLink="false">http://www.h4x3d.com/survscom-invites-2009/</guid>
		<description><![CDATA[Click Image for larger preview survs.com offers free, uncomplicated, yet powerful surveys using the latest ajax technology (e.g. saving forms every few seconds, making a &#8220;save&#8221; button obsolete). Their service is currently still in beta and entirely advertisement free. I have used survs.com before for a university assignment and received not only great responses (simple, [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.h4x3d.com/wp-content/uploads/survs.jpg"><img src="http://www.h4x3d.com/wp-content/uploads/survs1.jpg" alt="survs1" width="500" height="299" class="aligncenter size-full wp-image-1265" /></a><br />Click Image for larger preview <br />
<a href="http://survs.com">survs.com</a> offers free, uncomplicated, yet powerful surveys using the latest ajax technology (e.g. saving forms every few seconds, making a &#8220;save&#8221; button obsolete).<br />
Their service is currently still in beta and entirely advertisement free.<br />
I have used survs.com before for a university assignment and received not only great responses (simple, elegant interface, no fuzz), but also amazing stats that could be exported to excel via .xls files.</p>
<p><em>I have ten invites, so leave a comment and I will send you one!</em></p>
]]></content:encoded>
			<wfw:commentRss>http://h4x3d.com/survscom-invites-2009/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>New Year, update copyright script/code php</title>
		<link>http://h4x3d.com/new-year-update-copyright-scriptcode-php/</link>
		<comments>http://h4x3d.com/new-year-update-copyright-scriptcode-php/#comments</comments>
		<pubDate>Mon, 07 Jan 2008 14:07:03 +0000</pubDate>
		<dc:creator>jez</dc:creator>
				<category><![CDATA[code]]></category>
		<category><![CDATA[2008]]></category>
		<category><![CDATA[copyright]]></category>
		<category><![CDATA[new year]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[year]]></category>

		<guid isPermaLink="false">http://www.h4x3d.com/new-year-update-copyright-scriptcode-php/</guid>
		<description><![CDATA[I always laugh at sites that have &#8220;old&#8221; copyright information on them and I almost forgot to update mine. No-longer shall I be doing that with thanks to PHPÂ´s little helper in form of the following one-line (I call it) &#8220;New Year Update Copyright script&#8221; in PHP: What it does is quite obvious: it outputs [...]]]></description>
			<content:encoded><![CDATA[<p>I always laugh at sites that have &#8220;old&#8221; copyright information on them and I almost forgot to update mine.<br />
No-longer shall I be doing that with thanks to PHPÂ´s little helper in form of the following one-line (I call it) &#8220;New Year Update Copyright script&#8221; in PHP:</p>
<pre><code></code></pre>
<p>What it does is quite obvious: it outputs the current year, so for instance you could have it say:<br />
(c) 2006 &#8211; (php block here)</p>
<p>this would render (c) 2006 &#8211; 2008</p>
<p>- hope this helps anyone.<br />
Now as I look at this issue, I wonder if I was smart enough to build that into all my themes. If not, I got some revising to do after I have finished my next exam in January (11th).</p>
<p><em>Update:</em> bleh I put</p>
<pre><code></code></pre>
<p>in pretty much all my themes, which is stupid I fear &#8211; but for now it is noted on my to-do list and will be sorted out with the next wave of updates!</p>
<p><em>Update:</em> <a href="http://lorelle.wordpress.com/2007/09/03/displaying-the-date-in-your-wordpress-theme/">Lorelle</a> put the_time(); too, so I guess I might as well leave it like that.</p>
]]></content:encoded>
			<wfw:commentRss>http://h4x3d.com/new-year-update-copyright-scriptcode-php/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>how-to tar.gz a directory</title>
		<link>http://h4x3d.com/how-to-targz-a-directory/</link>
		<comments>http://h4x3d.com/how-to-targz-a-directory/#comments</comments>
		<pubDate>Thu, 18 Oct 2007 20:53:48 +0000</pubDate>
		<dc:creator>jez</dc:creator>
				<category><![CDATA[code]]></category>
		<category><![CDATA[archive]]></category>
		<category><![CDATA[tar]]></category>
		<category><![CDATA[tar.gz]]></category>
		<category><![CDATA[zip]]></category>

		<guid isPermaLink="false">http://www.h4x3d.com/how-to-targz-a-directory/</guid>
		<description><![CDATA[Do you know the following situation- You are downloading thousands of (small) files from your ftp (server) and it is annoyingly slow and time consuming&#8230; If you have shell access to your server, e.g. you can use Putty, logon and cd to your file directory (often httpdocs or www) and execute the following code: tar [...]]]></description>
			<content:encoded><![CDATA[<p>Do you know the following situation- You are downloading thousands of (small) files from your ftp (server) and it is annoyingly slow and time consuming&#8230; If you have shell access to your server, e.g. you can use Putty, logon and cd to your file directory (often httpdocs or www) and execute the following code:</p>
<p><em>tar -pczf fatfile.tar.gz *</em></p>
<p>This will create a tar.hz archive with the name of fatfile.tar.gz<br />
It will include all files of the current directory and all sub-directories.</p>
<p>Now you can easily download this file instead of many small files (as experienced before).<br />
If you don&#8217;t have shell access (look- even Dreamhost offers this feature for $6,95/month),<br />
you might consider getting your own <a href="http://control.zone.net/aff.php?aff=009">Virtual Private Server</a> as I did.</p>
]]></content:encoded>
			<wfw:commentRss>http://h4x3d.com/how-to-targz-a-directory/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Show code on wordpress css</title>
		<link>http://h4x3d.com/show-code-on-wordpress-css/</link>
		<comments>http://h4x3d.com/show-code-on-wordpress-css/#comments</comments>
		<pubDate>Wed, 22 Aug 2007 06:54:10 +0000</pubDate>
		<dc:creator>jez</dc:creator>
				<category><![CDATA[code]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[display]]></category>
		<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://www.h4x3d.com/show-code-on-wordpress-css/</guid>
		<description><![CDATA[Hi, one of the people commenting here asked for a way of displaying code in one of my themes. For ages I have been using the following code and it worked flawless in connection with the code markup plugin for wordpress: .primary pre#hack { white-space: pre-wrap; /* css-3 */ white-space: -moz-pre-wrap !important; /* Mozilla, since [...]]]></description>
			<content:encoded><![CDATA[<p>Hi, one of the people commenting here asked for a way of displaying code in one of my themes.<br />
For ages I have been using the following code and it worked flawless in connection with the code <a href="http://www.thunderguy.com/semicolon/wordpress/code-markup-wordpress-plugin/">markup plugin</a> for wordpress:</p>
<pre><code>
.primary pre#hack {
		white-space: pre-wrap;		/* css-3 */
		white-space: -moz-pre-wrap !important;		/* Mozilla, since 1999 */
		white-space: -pre-wrap;		/* Opera 4-6 */
		white-space: -o-pre-wrap;	/* Opera 7 */
		word-wrap: break-word;		/* Internet Explorer 5.5+ */
}

.primary pre {
  overflow: auto;
  cursor:pointer;
  position:relative;
}

.primary pre code {
  display: block;
  margin:10px;
  padding:4px;
  border:1px solid #ddd;
  background:#F5F5F5;
  font:10px Lucida Sans Typewriter, Courier, monospace;
}
</code></pre>
<pre><code>.primary can be changed to what you need, e.g. .post or .entry</code></pre>
<p><strong>Usage within WordPress</strong><br />
Simply go to the &#8220;code&#8221; editor of WordPress and paste your code.<br />
Surround it by a
<pre> and <code> tag and add the id of "hack" to the
<pre>.
(
<pre><code> stuff here </code> </pre>
]]></content:encoded>
			<wfw:commentRss>http://h4x3d.com/show-code-on-wordpress-css/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>22 years now</title>
		<link>http://h4x3d.com/22-years-now/</link>
		<comments>http://h4x3d.com/22-years-now/#comments</comments>
		<pubDate>Thu, 02 Aug 2007 04:10:13 +0000</pubDate>
		<dc:creator>jez</dc:creator>
				<category><![CDATA[Dailies]]></category>
		<category><![CDATA[birthday]]></category>
		<category><![CDATA[calculate your age]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[jez]]></category>
		<category><![CDATA[php age script]]></category>

		<guid isPermaLink="false">http://www.h4x3d.com/22-years-now/</guid>
		<description><![CDATA[Hey all, in case you wondered why the 21 from my short bio turned to 22 overnight&#8230; &#8230; I am now one year older. I really liked the 21, kind of- 22 looks stupid, doesn&#8217;t it? Anyhow I am currently still on the road and will be reading through all the comments and mails from [...]]]></description>
			<content:encoded><![CDATA[<p>Hey all, in case you wondered why the 21 from my short bio turned to <strong>22</strong> overnight&#8230;<br />
&#8230; I am now one year older. I really liked the 21, kind of- <em>22</em> looks stupid, doesn&#8217;t it?</p>
<p>Anyhow I am currently still on the road and will be reading through all the comments and mails from the past 10 days.<br />
Feel free to leave your greetings here, I will be thankfully replying one-by-one.</p>
<p>If you are interested in the age-script code behind the age-calculation I use on this page, here it is (I found it on Google after some research):</p>
<pre><code>
&lt; ?php

  //calculate years of age (input string: YYYY-MM-DD)
  function age($age){
    list($year,$month,$day) = explode(&quot;-&quot;,$age);
    $year_diff  = date(&quot;Y&quot;) - $year;
    $month_diff = date(&quot;m&quot;) - $month;
    $day_diff   = date(&quot;d&quot;) - $day;
    if ($day_diff &lt; 0 || $month_diff
</code></pre>
<p><em>This should return 22 today!</em></p>
<p><em>If you want to output the age AGAIN, <strong>do not</strong> use the full function again, but only:</em></p>
<pre><code>

</code></pre>
]]></content:encoded>
			<wfw:commentRss>http://h4x3d.com/22-years-now/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Compressing moo.tools (javascript) even further</title>
		<link>http://h4x3d.com/compressing-mootools-javascript-even-further/</link>
		<comments>http://h4x3d.com/compressing-mootools-javascript-even-further/#comments</comments>
		<pubDate>Wed, 25 Apr 2007 09:45:06 +0000</pubDate>
		<dc:creator>jez</dc:creator>
				<category><![CDATA[code]]></category>
		<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[compress]]></category>
		<category><![CDATA[gzip]]></category>
		<category><![CDATA[htaccess]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[moo]]></category>
		<category><![CDATA[moo.fx]]></category>
		<category><![CDATA[moo.tools]]></category>
		<category><![CDATA[optimize]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[zlib]]></category>

		<guid isPermaLink="false">http://www.h4x3d.com/compressing-mootools-javascript-even-further/</guid>
		<description><![CDATA[Moo.tools is neat, I love it and use it whenever I can, but one thing is still bugging me: its size. Even though moo.tools can be downloaded compressed (using the great php5 version of dean edward&#8217;s packer), I personally find 18kb of javascript too much. So I started researching a bit with Google and found [...]]]></description>
			<content:encoded><![CDATA[<div style="float: right;padding: 20px"><!--adsense#200_inlay--></div>
<p><a href="http://mootools.net">Moo.tools</a> is neat, I love it and use it whenever I can, but one thing is still bugging me: its size.<br />
Even though moo.tools can be <a href="http://mootools.net/download">downloaded</a> <em>compressed</em> (using the great php5 version of <a href="http://dean.edwards.name/packer/">dean edward&#8217;s packer</a>), I personally find <b>18kb</b> of javascript too much.</p>
<p><em>So I started researching a bit with Google and found out different way of compressing moo.tools (or actually whatever javascript you have) even further:</em></p>
<p>The first method, which I am using works like this:<br />
+ You rename your javascript file (moo.tools) from the original filename.js to filename.js.<b>php</b><br />
+ Open the file with your favourite editor and add the following line just at the very <em>TOP</em> of the code:</p>
<pre><code>

</code></pre>
<p>+ Next, scroll down to the end of the file in your editor and add the following to the bottom:</p>
<pre><code>

</code></pre>
<p>+ Save your file and upload it.</p>
<p>Now add it to your website using the old HTML code, but keep in mind to add the <b>.php</b>-file extension.<br />
It might look like this:</p>
<pre><code>

</code></pre>
<p class="update">I was able to reduce the whooping 18kb moo.tools down to 9kb this way. Well, actually I did not do anything, but the server and its php and zlib.</p>
<div style="float: right;padding: 20px"><!--adsense#200_inlay--></div>
<p>Other methods:<br />
At the top of Javascript:</p>
<pre><code>

</code></pre>
<p>.htaccess method<br />
Save a compressed javascript file as *.jgz, and write .htaccess like this.</p>
<pre><code>
RewriteEngine on
RewriteCond %{HTTP_USER_AGENT} ".*Safari.*" [OR]
RewriteCond %{HTTP:Accept-Encoding} !gzip
RewriteRule (.*)\.jgz$ $1\.js [L]

AddType "text/javascript;charset=UTF-8" .jgz
AddEncoding gzip .jgz
</code></pre>
<div style="float: right;padding: 20px"><!--adsense#200_inlay--></div>
<p>Filesmatch .htaccess method:</p>
<pre><code>

ForceType text/javascript
Header set Content-Encoding: gzip

RewriteEngine On
RewriteCond %{HTTP_USER_AGENT} !".*Safari.*"
RewriteCond %{HTTP:Accept-Encoding} gzip
RewriteCond %{REQUEST_FILENAME}.gz -f
RewriteRule (.*)\.js$ $1\.js.gz [L]
ForceType text/javascript

</code></pre>
<p><u>Sources / Ideas:</u><br />
1. <a href="http://paulstamatiou.com/2007/03/18/how-to-optimize-your-css-even-more/" target="_Blank">paulstamatiou.com</a><br />
2. <a target="_Blank" href="http://joseph.randomnetworks.com/archives/2006/07/13/compressed-javascript/">randomnetworks.com</a></p>
]]></content:encoded>
			<wfw:commentRss>http://h4x3d.com/compressing-mootools-javascript-even-further/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Building a WordPress sideblog (plugin) that works</title>
		<link>http://h4x3d.com/building-a-wordpress-sideblog-plugin-that-works/</link>
		<comments>http://h4x3d.com/building-a-wordpress-sideblog-plugin-that-works/#comments</comments>
		<pubDate>Fri, 20 Apr 2007 17:17:14 +0000</pubDate>
		<dc:creator>jez</dc:creator>
				<category><![CDATA[code]]></category>
		<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[feed]]></category>
		<category><![CDATA[problem]]></category>
		<category><![CDATA[rss]]></category>

		<guid isPermaLink="false">http://www.h4x3d.com/building-a-wordpress-sideblog-plugin-that-works/</guid>
		<description><![CDATA[I am now using the WordPress Loop to output my asides, details below Okay, so first of all to clarify things, I am not going to actually code or build a (new) sideblog plugin for wordpress here, I am going to comment on existing sideblog plugins and compare them. In regard to the promising title, [...]]]></description>
			<content:encoded><![CDATA[<p class="update">I am now using the WordPress Loop to output my asides, details <a href="#below">below</a></p>
<p>Okay, so first of all to clarify things, I am not going to actually code or build a (new) sideblog plugin for wordpress here, I am going to comment on existing sideblog plugins and compare them. In regard to the promising title, I will than come up with a sideblog alternative, which will (definatly) work on everyone&#8217;s blog.</p>
<p>You probably wonder how people display those small articles about their daily ramblings, quick notes or links they have found on the internet on their blogs. You might also have read something about &#8216;asides&#8217; in WordPress on other blogs.</p>
<p>In order to display those miniblog articles (or sidenotes/asides) on your WordPress blog, you could either</p>
<ol>
<li>Use a special sideblog plugin (examples listed below)</li>
<li>Hard code a piece of content into your theme template </li>
<li>Include a php file which is updated externally</li>
<li>Do a mixture of all those three things (which I do)</li>
</ol>
<p>1. Existing Sideblog or Miniblog plugins for WordPress</p>
<p>At first I have tried out <a href="http://katesgasis.com/2006/05/02/sideblog-plugin-v30/" target="_blank">KatesGasis&#8217; sideblog (v.3)</a>, but for me it did not work out like the author described his plugin. The sideblog showed, but the pages however disappeared and my blog was creating random 404 errors. Some months later, other bloggers were also facing this problem. Finally, <a href="http://katesgasis.com/2007/03/18/weird-404s-by-sideblog/" target="_blank">the 404 issue</a> would be addressed by the plugin author himself. Future versions of the Sideblog plugin were released, but without any effect. It is currently in built 3.6 or so, but still does not work for me. It is rather nice and simple, but without a fix to the 404 issue, worthless for on-site use.</p>
<p>The next plugin I have tried out was <a href="http://blog.fileville.net/?page_id=121" target="_blank">Miniblog</a>. The original author of this plugin was <a href="http://www.nmyworld.com/" target="_blank">Ryan Poe</a>, but he gave up the coding on this project and turned it over to <a href="http://blog.fileville.net/?page_id=121" target="_blank">Joe</a>. After some juggling through the right site, finding the right version and getting it installed correctly (the docs were missing in the first zip file, which made the plugin display dodgy) I tried it out and was quite satiesfied. The tagging system (simpletagging) still worked, no 404s, pages were loading fine and the sideblog showed. After having posted another entry to my miniblog, it also showed up. How gross, because I set it to display only one record. Fiddling with the source code solved this problem, but another problem was added: In combination with the <a href="http://remstate.com/projects/in-series/" target="_blank">in-series plugin</a> (by REM state), entries that are part of a series are shown above the miniblog entries. </p>
<p>2. Quite confusing, and annoying. Since I did not want to drop the in-series plugin, I decided to hard-code my asides into my theme templates. Soon I was annoyed as well, also I did not have an archiving function of my posts as I was adding them in direct html code to the template. </p>
<p>3. I used the following code to ease the update process by only having to edit one external file, rather than navigating all the way up to my theme folder:</p>
<pre><code>
<div></div>

</code></pre>
</p>
<p>This of course was also no solution to the missing asides/sideblog problem, as the archiving option was missing.</p>
<p>4. Recently I came across a plugin called <a href="http://geekularity.com/fp-excluded-categories-plugin-for-wordpress/" target="_blank">Front Page Excluded Categories</a>, Instructions and FAQ can be found <a href="http://wordpress.org/extend/plugins/front-page-excluded-categories/" target="_blank">on the official wordpress.org website</a>. It does&nbsp;what its name suggests: Exclude on specific category from showing on your blog frontpage. I figured out (nothing new to some I guess), that I could use this to hide <a href="http://www.h4x3d.com/category/asides/" target="_blank">my asides category</a> from the <a href="http://www.h4x3d.com/" target="_blank">frontpage</a>. Then use the categories feed and re-insert <a href="http://www.h4x3d.com/category/asides/feed/" target="_blank">this RSS-Feed</a> into the main site template (theme) using another RSS-Feed plugin or some magpie-feed code. Voila, problem blown away! It works out of the box. You can use a RSS Importing Plugin such as <a href="http://adam.404.org/projects/friends-rss" target="_blank">Friends RSS Aggregator</a>&nbsp;or FirstRSS&nbsp;or (what&nbsp;I am currently using) <a href="http://jakobj.dk/blog/archives/35?lan=english" target="_blank">jRSS</a>. If your feed is getting &#8220;douged&#8221; up, run it through Feedburner and import the (cleaned) feedburner RSS.</p>
<p><a href="http://www.geeked.org/archives/tale-of-a-new-sideblog-and-how-publishing-an-rss-feed-to-your-blog-should-be-easier/" target="_blank">This guy (geeked.org) had a similar idea</a>, but did not get it to run.</p>
<div id="below">
<pre><code>
<div style="width: 230px">

have_posts()) : $my_query-&gt;the_post(); ?&gt;
 <sup></sup>

&lt; a href=&quot;" rel="bookmark" title="Permanent Link to "&gt;
</div>

</code></pre>
<p class="update">Is what I use now to display my asides!</p>
</div>
<p> (you need to fix the php tags though! e.g. move the brackets. I need a better code highlighter, seriously!)</p>
<div>Tags:  <a rel="tag" href="http://technorati.com/tag/wordpress">wordpress</a>, <a rel="tag" href="http://technorati.com/tag/asides">asides</a>, <a rel="tag" href="http://technorati.com/tag/miniblog">miniblog</a>, <a rel="tag" href="http://technorati.com/tag/sideblog">sideblog</a>, <a rel="tag" href="http://technorati.com/tag/code">code</a>, <a rel="tag" href="http://technorati.com/tag/feed">feed</a></div>
]]></content:encoded>
			<wfw:commentRss>http://h4x3d.com/building-a-wordpress-sideblog-plugin-that-works/feed/</wfw:commentRss>
		<slash:comments>25</slash:comments>
		</item>
	</channel>
</rss>

