<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	xmlns:georss="http://www.georss.org/georss" xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd"
	xmlns:media="http://search.yahoo.com/mrss/"
>

<channel>
	<title>Robert Buzink &#187; hack</title>
	<atom:link href="http://robertbuzink.com/topic/hack/feed/" rel="self" type="application/rss+xml" />
	<link>http://robertbuzink.com</link>
	<description>journalist &#38; webspecialist bij de Volkskrant</description>
	<lastBuildDate>Thu, 02 Sep 2010 00:03:41 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<!-- podcast_generator="podPress/8.8" - maintenance_release="8.8.4" -->
		<copyright>2006-2007 </copyright>
		<managingEditor>rjf.buzink@gmail.com (Robert Buzink)</managingEditor>
		<webMaster>rjf.buzink@gmail.com (Robert Buzink)</webMaster>
		<category>posts</category>
		<ttl>1440</ttl>
		<itunes:keywords></itunes:keywords>
		<itunes:subtitle></itunes:subtitle>
		<itunes:summary>een digitale poging tot orde die in het analoge ver te zoeken is</itunes:summary>
		<itunes:author>Robert Buzink</itunes:author>
		<itunes:category text="Society &amp; Culture"/>
		<itunes:owner>
			<itunes:name>Robert Buzink</itunes:name>
			<itunes:email>rjf.buzink@gmail.com</itunes:email>
		</itunes:owner>
		<itunes:block>No</itunes:block>
		<itunes:explicit>no</itunes:explicit>
		<itunes:image href="http://www.robertbuzink.com/journal/wp-content/plugins/podpress/images/powered_by_podpress.jpg" />
		<image>
			<url>http://www.robertbuzink.com/journal/wp-content/plugins/podpress/images/powered_by_podpress.jpg</url>
			<title>Robert Buzink</title>
			<link>http://robertbuzink.com</link>
			<width>144</width>
			<height>144</height>
		</image>
		<item>
		<title>Nette schoenen</title>
		<link>http://robertbuzink.com/2007/nette-schoenen/</link>
		<comments>http://robertbuzink.com/2007/nette-schoenen/#comments</comments>
		<pubDate>Sun, 29 Apr 2007 22:00:08 +0000</pubDate>
		<dc:creator>Robert Buzink</dc:creator>
				<category><![CDATA[van alles]]></category>
		<category><![CDATA[hack]]></category>
		<category><![CDATA[mode?]]></category>
		<category><![CDATA[te persoonlijk]]></category>

		<guid isPermaLink="false">http://www.robertbuzink.nl/journal/2007/04/29/nette-schoenen/</guid>
		<description><![CDATA[Ik kan er even niet op komen,  maar er is een term voor het modificeren van merkkleding. Tienermeisjes die hun Dr. Martins beschilderen,  dat soort dingen.  In navolging van die moedige dames heb ik de Salamanders van de overleden opa van Myga, mij overhandigd tijdens een emotioneel moment door oma,  onder [...]]]></description>
			<content:encoded><![CDATA[<p>Ik kan er even niet op komen,  maar er is een term voor het modificeren van merkkleding. Tienermeisjes die hun Dr. Martins beschilderen,  dat soort dingen.  In navolging van die moedige dames heb ik de Salamanders van de overleden opa van Myga, mij overhandigd tijdens een emotioneel moment door oma,  onder handen genomen.</p>
<p><span id="more-262"></span></p>
<p>Ik hou van leer,  maar niet van frutsels en franjes (tenminste niet als ze aan <em>mijn</em> lijf zitten). Zeg nou zelf: een stuk beter toch?</p>
<p align="center"><img id="image258" src="http://www.robertbuzink.com/journal/wp-content/uploads/2007/04/schoen_voor.thumbnail.jpg" alt="Schoen voor modificatie" /> <img id="image259" src="http://www.robertbuzink.com/journal/wp-content/uploads/2007/04/schoen_na.thumbnail.jpg" alt="Schoen na modificatie" /><br />
<strong>Voor</strong> <strong> Na </strong></p>
<p>En natuurlijk heb ik de franjes niet zomaar weggegooid.</p>
<p align="right">
<div style="text-align: center"><img id="image261" src="http://www.robertbuzink.com/journal/wp-content/uploads/2007/04/armband_schoen.thumbnail.jpg" alt="Leren armbandje van stuk schoen" /></div>
<p align="left">
<p align="left">Allemaal relatief oninteressant,  ware het niet dat mijn pappa mij altijd al in Salamanders probeerde te wringen.  Een van zijn stokpaardjes was zelfs dat als je eenmaal aan de Salamanders was, je nooit anders meer wilde. En daarom dus ook maar meteen de benen over elkaar:</p>
<div style="text-align: center"><img id="image260" src="http://www.robertbuzink.nl/journal/wp-content/uploads/2007/04/schoenen.jpg" alt="Schoen en benen over elkaar" /></div>
<p>Omdat een foto meer zegt dan verbale cliché&#8217;s over appels die van bomen vallen en zo verder.</p>
]]></content:encoded>
			<wfw:commentRss>http://robertbuzink.com/2007/nette-schoenen/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>YouTube Brackets (WordPress Plugin)</title>
		<link>http://robertbuzink.com/2006/youtube-brackets-wordpress-plugin/</link>
		<comments>http://robertbuzink.com/2006/youtube-brackets-wordpress-plugin/#comments</comments>
		<pubDate>Thu, 23 Nov 2006 04:24:56 +0000</pubDate>
		<dc:creator>Robert Buzink</dc:creator>
				<category><![CDATA[english]]></category>
		<category><![CDATA[hack]]></category>
		<category><![CDATA[nerd talk]]></category>
		<category><![CDATA[plugin]]></category>
		<category><![CDATA[software]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://www.robertbuzink.nl/journal/2006/11/23/youtube-brackets-wordpress-plugin/</guid>
		<description><![CDATA[YouTube offers a service that sends a video you are watching to your blog. It does not send html-code to your blog, but a code like this:
[ youtube=http://youtube.com/watch?v=4yX1F_nTcfc]
This works fine for blogs hosted on wordpress.com, but with standalone setups of wordpress it doesn&#8217;t work at all.


That&#8217;s why I quickly put together a plugin that makes [...]]]></description>
			<content:encoded><![CDATA[<p>YouTube offers a service that sends a video you are watching to your blog. It does not send html-code to your blog, but a code like this:</p>
<p>[ youtube=http://youtube.com/watch?v=4yX1F_nTcfc]</p>
<p>This works fine for blogs hosted on wordpress.com, but with standalone setups of wordpress it doesn&#8217;t work at all.<br />
<span id="more-247"></span><br />
<!--adsense--><br />
That&#8217;s why I quickly put together a plugin that makes the bracket code work. I used the <a href="http://www.mobvcasting.com/wp/?p=118" onclick="pageTracker._trackPageview('/outgoing/www.mobvcasting.com/wp/?p=118&amp;referer=');">Quicktime posting plugin</a> as a starter. Thank you, Shawn Van Every.</p>
<p><strong>Usage</strong><br />
Setup your standalone wordpress blog at YouTube and send a video to your blog. Or just copy the url of the YouTube video you are watching and put it in your blog like this:</p>
<p>[ youtube=http://youtube.com/watch?v=4yX1F_nTcfc] (without the space between bracket and y, though).</p>
<p>You can also set the size of the video in your post. Do something like this: [ youtube=http://www.youtube.com/watch?v=0jjgk1-ac1I 150 100] (without the space between bracket and y, though).<br />
<strong><br />
YouTube.com directions</strong><br />
1. Go to YouTube.com<br />
2. (Create an acount and) login<br />
3. Go to &#8216;My Account/Account settings/Video posting Settings&#8217;<br />
4. Choose &#8216;Add a Blog/Site&#8217;.<br />
5. Choose &#8216;Wordpress Self-Hosted&#8217;, fill in username and password of your WP blog, fill in api URL (http://your blog&#8217;s URL/xmlrpc.php) and a random WP API key (get one <a href="http://faq.wordpress.com/2005/10/19/api-key/" onclick="pageTracker._trackPageview('/outgoing/faq.wordpress.com/2005/10/19/api-key/?referer=');">here</a>).<sup>1</sup> and click on the &#8216;Add Blog&#8217; button.<br />
6. Watch a video at YouTube.com and choose &#8216;Post Video&#8217; from the options below the video.</p>
<p><strong>Download</strong></p>
<p><!--adsense--></p>
<p><a href="http://www.robertbuzink.com/wp-content/uploads/2007/04/youtubebrackets_3.0.zip" id="p256" onclick="pageTracker._trackPageview('/outgoing/www.robertbuzink.com/wp-content/uploads/2007/04/youtubebrackets_3.0.zip?referer=');">YouTube Brackets 3.0</a></p>
<p>Changelog: Cleaner code, pretty url support (youtube.com/v/), css (span class youtube). -Special thanks to Mike Thompson-</p>
<p><a href="http://www.robertbuzink.nl/journal/wp-content/uploads/2007/04/youtubebrackets_2.1.zip" title="Youtube Brackets 2.1" id="p255" onclick="pageTracker._trackPageview('/outgoing/www.robertbuzink.nl/journal/wp-content/uploads/2007/04/youtubebrackets_2.1.zip?referer=');">Youtube Brackets 2.1</a></p>
<p>Changelog: Resolved conflict with Shawns great quicktime posting plugin and added html-comment around code.</p>
<p><a href="http://www.robertbuzink.nl/wp-content/uploads/2006/12/youtubebrackets_2_beta.zip" id="p251" onclick="pageTracker._trackPageview('/outgoing/www.robertbuzink.nl/wp-content/uploads/2006/12/youtubebrackets_2_beta.zip?referer=');">YouTube Brackets 2 beta</a></p>
<p>Change log: Code now validates as XHTML 1.0 Transitional (thanks to <a href="http://karenblundell.com" onclick="pageTracker._trackPageview('/outgoing/karenblundell.com?referer=');">Karen</a>). Is only tested with Firefox and Internet Explorer though, but most probably works with all browsers. If you want to be sure, use version 1 (below).</p>
<p><a href="http://www.robertbuzink.nl/wp-content/uploads/2006/11/youtubebrackets1.zip" id="p249" onclick="pageTracker._trackPageview('/outgoing/www.robertbuzink.nl/wp-content/uploads/2006/11/youtubebrackets1.zip?referer=');">YouTube Brackets 1</a></p>
<p>Change log: Added size variables and cleaned up the code a bit.</p>
<p><a href="/wp-content/uploads/2006/11/youtubebrackets.zip" title="YouTube Brackets 1 beta" id="p248">YouTube Brackets 1 beta</a></p>
<p><strong>Installation</strong><br />
Upload to plugin directory and activate through admin-section/plugins.</p>
<ol class="footnotes"><li id="footnote_0_247" class="footnote">You have to register at wordpress.com in order to to get an api-key. You can register without creating a blog. It&#8217;s stupid YouTube asks for an API key with Self-Hosted WordPress blogs. They don&#8217;t need it at all. With Flickr you don&#8217;t have to provide an API key.</li></ol>]]></content:encoded>
			<wfw:commentRss>http://robertbuzink.com/2006/youtube-brackets-wordpress-plugin/feed/</wfw:commentRss>
		<slash:comments>226</slash:comments>
		</item>
		<item>
		<title>mailfeed &#8211; mail2feed php script</title>
		<link>http://robertbuzink.com/2006/mailfeed-mail2feed-php-script/</link>
		<comments>http://robertbuzink.com/2006/mailfeed-mail2feed-php-script/#comments</comments>
		<pubDate>Mon, 24 Jul 2006 23:14:24 +0000</pubDate>
		<dc:creator>Robert Buzink</dc:creator>
				<category><![CDATA[hack]]></category>
		<category><![CDATA[software]]></category>

		<guid isPermaLink="false">http://www.robertbuzink.nl/journal/2006/07/25/mailfeed-mail2feed-php-script/</guid>
		<description><![CDATA[Mailfeed is a php script, written by Ryan Grove, that converts your email&#8217;s inbox to a rss newsfeed. It&#8217;s not actively maintained and the producer of the script does not allow comments on his/her site.
1. Mailfeed greatly improves in some setups when you change

function RssItem($title, $description = "", $author = "", $category = "",
	$pubDate = [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://wiki.wonko.com/software/mailfeed" onclick="pageTracker._trackPageview('/outgoing/wiki.wonko.com/software/mailfeed?referer=');">Mailfeed</a> is a php script, written by Ryan Grove, that converts your email&#8217;s inbox to a rss newsfeed. It&#8217;s not actively maintained and the producer of the script does not allow comments on his/her site.</p>
<p>1. Mailfeed greatly improves in some setups when you change<br />
<span id="more-223"></span><br />
<code>function RssItem($title, $description = "", $author = "", $category = "",<br />
	$pubDate = "", $guid = "")<br />
{<br />
</code><br />
to</p>
<p><code>function RssItem($title, $description = "", $author = "", $category = "",<br />
	$pubDate = "", $guid = "")<br />
{</p>
<p>       $description = strip_tags($description);<br />
</code></p>
<p>This hack strips all html tags (code) from the emailbody, reducing malfunctioning due to invalid html-code in your emails. It is especially usefull when incorporating the feed into a mediawiki wiki (which, in most configurations, doesn&#8217;t allow many html tags anyways) with the <a href="http://meta.wikimedia.org/wiki/User:Mutante/RSSFeed" onclick="pageTracker._trackPageview('/outgoing/meta.wikimedia.org/wiki/User_Mutante/RSSFeed?referer=');">RSS-Feed Mediawiki extension</a>.</p>
<p>2. The feed doesn&#8217;t validate, creating some problems, but when you change</p>
<p><code>function RssHeader()<br />
{<br />
	header("Content-Type: text/xml");<br />
</code><br />
to</p>
<p><code>function RssHeader()<br />
{<br />
	header("Content-Type: application/xml");<br />
</code></p>
<p>it does (except for the date in some timezones, but that&#8217;s not a big problem.)!</p>
<p>ps the full code of the script as retrieved from <a href="http://wiki.wonko.com/software/mailfeed/mailfeed.php" onclick="pageTracker._trackPageview('/outgoing/wiki.wonko.com/software/mailfeed/mailfeed.php?referer=');">this location</a> July 25, 2006:</p>
<p><code><?php<br />
/*<br />
* MailFeed v1.0.1<br />
* Copyright © 2004 Ryan Grove <ryan@wonko.com>. All rights reserved.<br />
*<br />
* Checks a POP3, IMAP, or NNTP mailbox on demand and returns an RSS feed<br />
* containing the messages in the mailbox. See the MailFeed website at<br />
* http://wonko.com/software/mailfeed/ for details.<br />
*<br />
* Todo:<br />
* - Caching<br />
*<br />
******************************************************************************<br />
* This program is free software; you can redistribute it and/or modify it<br />
* under the terms of the GNU General Public License as published by the<br />
* Free Software Foundation; either version 2 of the License, or (at your<br />
* option) any later version.<br />
*<br />
* This program is distributed in the hope that it will be useful, but<br />
* WITHOUT ANY WARRANTY; without even the implied warranty of<br />
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General<br />
* Public License for more details.<br />
*<br />
* You should have received a copy of the GNU General Public License along<br />
* with this program; if not, write to the Free Software Foundation, Inc.,<br />
* 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA<br />
*/</p>
<p>###############################################################################<br />
# Configuration<br />
###############</p>
<p>/* POP3/IMAP/NNTP server to connect to, with optional port. */<br />
$server = "localhost:143";</p>
<p>/* Protocol specification (optional) */<br />
$protocol = "/notls";</p>
<p>/* Name of the mailbox to open. */<br />
$mailbox = "INBOX";</p>
<p>/* Your username. */<br />
$username = "";</p>
<p>/* Your password. */<br />
$password = "";</p>
<p>/* Whether or not to download the message body and display it in the<br />
   <description> element. */<br />
$downloadBody = true;</p>
<p>/* Whether or not to mark retrieved messages as seen. */<br />
$markSeen = true;</p>
<p>/* Whether or not to convert newlines to HTML line breaks in message bodies for<br />
   displaying in HTML-based RSS readers. */<br />
$htmlLineBreaks = true;</p>
<p>/* If the message body is longer than this number of bytes, it will be trimmed.<br />
   Set to 0 for no limit. */<br />
$bodyMaxLength = 4096;</p>
<p>###############################################################################<br />
# End of User-Editable Settings<br />
###############################</p>
<p>require_once("Mail/mimeDecode.php");</p>
<p>// Parse URL vars.<br />
foreach(array_keys($_GET) as $var)<br />
{<br />
	$value = urldecode($_GET[$var]);</p>
<p>	switch(strtolower($var))<br />
	{<br />
		case "server":<br />
			$server = $value;<br />
			break;</p>
<p>		case "protocol":<br />
			$protocol = $value;<br />
			break;</p>
<p>		case "mailbox":<br />
			$mailbox = $value;<br />
			break;</p>
<p>		case "username":<br />
		case "user":<br />
		case "login":<br />
			$username = $value;<br />
			break;</p>
<p>		case "password":<br />
		case "pass":<br />
			$password = $value;<br />
			break;</p>
<p>		case "markseen":<br />
		case "seen":<br />
			$markSeen = $value;<br />
			break;</p>
<p>		case "downloadbody":<br />
		case "showbody":<br />
		case "body":<br />
			$downloadBody = $value;<br />
			break;</p>
<p>		case "htmlLineBreaks":<br />
			$htmlLineBreaks = $value;<br />
			break;</p>
<p>		case "bodymaxlength":<br />
		case "maxbodylength":<br />
		case "bodylength":<br />
			$bodyMaxLength = $value;<br />
			break;<br />
	}<br />
}</p>
<p>RssHeader();</p>
<p>error_reporting(0);<br />
set_error_handler("errorHandler");</p>
<p>if ($conn = imap_open('{'.$server.$protocol.'}'.$mailbox, $username, $password, OP_READONLY))<br />
{<br />
	// Set up the parameters for the MimeDecode object.<br />
	$mimeParams = array();<br />
	$mimeParams['decode_headers'] = true;<br />
	$mimeParams['crlf']           = "\r\n";</p>
<p>	if ($downloadBody)<br />
	{<br />
		$mimeParams['include_bodies'] = true;<br />
		$mimeParams['decode_bodies']  = true;<br />
	}<br />
	else<br />
	{<br />
		$mimeParams['include_bodies'] = false;<br />
		$mimeParams['decode_bodies']  = false;<br />
	}</p>
<p>	// See if the mailbox contains any messages.<br />
	if ($msgCount = imap_num_msg($conn))<br />
	{<br />
		// Loop through the messages.<br />
		for($i = 1; $i <= $msgCount; $i++)<br />
		{<br />
			// Get the message header.<br />
			if ($downloadBody)<br />
				$header = imap_fetchheader($conn, $i, FT_PREFETCHTEXT);<br />
			else<br />
				$header = imap_fetchheader($conn, $i);</p>
<p>			// Get the message body if desired.<br />
			if ($downloadBody)<br />
			{<br />
				if ($markSeen)<br />
					$body = imap_body($conn, $i);<br />
				else<br />
					$body = imap_body($conn, $i, FT_PEEK);<br />
			}</p>
<p>			// Send the header and body through mimeDecode.<br />
			$mimeParams['input'] = $header.$body;<br />
			$message = Mail_mimeDecode::decode($mimeParams);</p>
<p>			// Some mail servers and clients use special messages for holding<br />
			// mailbox data; ignore that message if it exists.<br />
			if ($message->headers['subject'] != "DON'T DELETE THIS MESSAGE -- FOLDER INTERNAL DATA")<br />
			{<br />
				// Format the message for inclusion in the RSS feed.<br />
				if ($downloadBody)<br />
				{<br />
					// Does the message have an attachment?<br />
					if (strtolower($message->ctype_primary) == "multipart")<br />
					{<br />
						$body = trim($message->parts[0]->body);</p>
<p>						// Get information about the attachments.<br />
						$attachCount = count($message->parts) - 1;<br />
						$attachSize  = 0;</p>
<p>						for($p = 1; $p < count($message->parts); $p++)<br />
							$attachSize += strlen($message->parts[$p]->body);</p>
<p>						if ($attachCount == 1)<br />
							$body .= "\n\n[Message contains 1 attachment. (".translateSize($attachSize).")]";<br />
						else<br />
							$body .= "\n\n[Message contains $attachCount attachments. (".translateSize($attachSize).")]";<br />
					}<br />
					else<br />
					{<br />
						$body = trim($message->body);<br />
					}</p>
<p>					// Trim the body to $bodyMaxLength characters if desired.<br />
					if ($bodyMaxLength &#038;&#038; strlen($body) > $bodyMaxLength)<br />
						$body = substr($body, 0, $bodyMaxLength).'...';</p>
<p>					// Convert newlines to HTML line breaks if desired.<br />
					if ($htmlLineBreaks)<br />
						$body = nl2br($body);<br />
				}<br />
				else<br />
				{<br />
					$body = "";<br />
				}</p>
<p>				// Create the RSS item.<br />
				RssItem($message->headers['subject'], $body,<br />
					$message->headers['from'], $mailbox,<br />
					dateToRfc822($message->headers['date']));<br />
			}<br />
		}<br />
	}</p>
<p>	imap_close($conn);<br />
}</p>
<p>RssFooter();</p>
<p>restore_error_handler();</p>
<p>###############################################################################<br />
# RSS functions<br />
###############</p>
<p>function RssFooter()<br />
{<br />
	?><br />
		</channel><br />
	</rss><br />
	<?php<br />
}</p>
<p>function RssHeader()<br />
{<br />
	header("Content-Type: text/xml");</p>
<p>	echo "<?xml version=\"1.0\"?>\n";<br />
	?><br />
	<rss version="2.0"><br />
		<channel></p>
<p>			<description>Checks a POP3, IMAP, or NNTP mailbox on demand and returns an RSS feed containing the messages in the mailbox.</description><br />
			<docs>http://blogs.law.harvard.edu/tech/rss</docs><br />
			<generator>MailFeed v1.0.1</generator></p>
<link>http://wonko.com/software/mailfeed/</link>
	<?php<br />
}</p>
<p>function RssItem($title, $description = "", $author = "", $category = "",<br />
	$pubDate = "", $guid = "")<br />
{<br />
	?><br />
			<item></p>
<p>				<?php<br />
				if (strlen($pubDate))<br />
				{<br />
					?></p>
<pubDate><?=htmlspecialchars($pubDate)?></pubDate>
					<?php<br />
				}</p>
<p>				if (strlen($description))<br />
				{<br />
					?><br />
					<description><?=htmlspecialchars($description)?></description><br />
					<?php<br />
				}</p>
<p>				if (strlen($author))<br />
				{<br />
					?><br />
					<author><?=htmlspecialchars($author)?></author><br />
					<?php<br />
				}</p>
<p>				if (strlen($category))<br />
				{<br />
					?></p>
<p>					<?php<br />
				}</p>
<p>				if (strlen($guid))<br />
				{<br />
					?><br />
					<guid><?=htmlspecialchars($guid)?></guid><br />
					<?php<br />
				}<br />
				?><br />
			</item><br />
	<?<br />
}</p>
<p>###############################################################################<br />
# Error handling functions<br />
##########################</p>
<p>function errorHandler($errno, $errmsg, $filename, $linenum, $vars)<br />
{<br />
	if ($errno != E_NOTICE &#038;&#038; $errno != E_USER_NOTICE)<br />
	{<br />
		RssItem("MailFeed Error", "Error at line $linenum: ".htmlspecialchars($errmsg),<br />
			"MailFeed", "Errors", date("D, d M Y H:i:s T"));<br />
	}<br />
}</p>
<p>###############################################################################<br />
# Miscellaneous functions<br />
#########################</p>
<p>function dateToRfc822($date)<br />
{<br />
	$time = strtotime($date);</p>
<p>	if ($time > 0)<br />
		$date = date("D, d M Y H:i:s T", $time);</p>
<p>	return $date;<br />
}</p>
<p>function translateSize($size)<br />
{<br />
	$units    = array("bytes", "KB", "MB", "GB", "TB");</p>
<p>	for($i = 0; $size >= 1024 &#038;&#038; $i < count($units); $i++)<br />
		$size /= 1024;</p>
<p>	return round($size, 2)." {$units[$i]}";<br />
}<br />
?><br />
</code></p>
]]></content:encoded>
			<wfw:commentRss>http://robertbuzink.com/2006/mailfeed-mail2feed-php-script/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>wp-quotes &#8211; add quotes hack</title>
		<link>http://robertbuzink.com/2006/wp-quotes-add-quotes-hack/</link>
		<comments>http://robertbuzink.com/2006/wp-quotes-add-quotes-hack/#comments</comments>
		<pubDate>Thu, 15 Jun 2006 20:07:15 +0000</pubDate>
		<dc:creator>Robert Buzink</dc:creator>
				<category><![CDATA[hack]]></category>
		<category><![CDATA[software]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://www.robertbuzink.nl/journal/2006/06/15/wp-quotes-add-quotes-hack/</guid>
		<description><![CDATA[I use the wp-quotes  wordpress  plugin to display quotes (version 1.3 ). It didn&#39;t work for me first. I wasn&#39;t able to put quotes into the database. If you have the same problem, make sure the edit-quotes url is wp-admin/edit-quotes.php and not wp-admin/edit.php?page=edit-quotes.php
 
I tried to apply the following hack, but it doesn&#39;t [...]]]></description>
			<content:encoded><![CDATA[<p>I use the <a href="http://www.robertbuzink.nl/journal/wp-admin/line%20317%20in%20edit-quotes.php" onclick="pageTracker._trackPageview('/outgoing/www.robertbuzink.nl/journal/wp-admin/line_20317_20in_20edit-quotes.php?referer=');">wp-quotes</a> <a href="http://wordpress.org/" onclick="pageTracker._trackPageview('/outgoing/wordpress.org/?referer=');"> wordpress</a>  plugin to display quotes (<a href="http://www.zombierobot.com/downloads/wp-quotes-1.3.zip" onclick="pageTracker._trackPageview('/outgoing/www.zombierobot.com/downloads/wp-quotes-1.3.zip?referer=');">version 1.3</a> ). It didn&#39;t work for me first. I wasn&#39;t able to put quotes into the database. If you have the same problem, make sure the edit-quotes url is wp-admin/edit-quotes.php and not wp-admin/edit.php?page=edit-quotes.php</p>
<p> <span id="more-200"></span>
<p>I tried to apply the following hack, but it doesn&#39;t work as expected:</p>
<p>Replace in line 317 in edit-quotes.php action=&quot;&lt;?php echo $_SERVER[&#39;PHP_SELF&#39;]?&gt;&quot; with action=&quot;edit-quotes.php&quot; .</p>
<p>Placing edit-quotes.php into a different directory might work, because wordpress seems to direct post-attempt from &#39;wp-admin/edit.php?page=edit-quotes.php&#39; to &#39;wp-admin/edit.php&#39; instead of &#39;wp-admin/edit-quotes.php&#39;. But even after editing line 7 this results in a warning: &quot;<strong>Warning</strong>: main(): open_basedir restriction in effect. File(/journal/wp-admin/admin.php) is not within the allowed path(s): (/www/web1171:/tmp) in <strong>/www/web1171/html/journal/wp-content/plugins/wp-quotes/edit-quotes.php</strong> on line <strong>8&quot;</strong></p>
<p>Even putting redirecting in /.htaccess doesn&#39;t seem to work! Tjee: REDIRECT /journal/wp-admin/edit.php?page=edit-quotes.php http://www.robertbuzink.nl/journal/wp-admin/edit-quotes.php </p>
]]></content:encoded>
			<wfw:commentRss>http://robertbuzink.com/2006/wp-quotes-add-quotes-hack/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>
