<?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>elektroelch.net</title>
	<atom:link href="http://elektroelch.net/feed/" rel="self" type="application/rss+xml" />
	<link>http://elektroelch.net</link>
	<description></description>
	<lastBuildDate>Thu, 15 Jul 2010 18:53:20 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=</generator>
		<item>
		<title>Stop supporting commercial themes and plugins for free!</title>
		<link>http://elektroelch.net/blog/stop-supporting-commercial-themes-and-plugins-for-free/</link>
		<comments>http://elektroelch.net/blog/stop-supporting-commercial-themes-and-plugins-for-free/#comments</comments>
		<pubDate>Thu, 15 Jul 2010 18:53:20 +0000</pubDate>
		<dc:creator>Latz</dc:creator>
				<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://elektroelch.net/?p=40</guid>
		<description><![CDATA[For the last days there has been much excitement about Thesis. Fo those who don&#8217;t know: Thesis is one of the more popular commercial themes for WordPress. Despite the special problems with this theme and its author it&#8217;s a more general question if customers of commercial should be supported for free by the community or [...]]]></description>
			<content:encoded><![CDATA[<p>For the last days there has been much excitement about Thesis. Fo those who don&#8217;t know: Thesis is one of the more popular commercial themes for WordPress. Despite the special problems with this theme and its author it&#8217;s a more general question if customers of commercial should be supported for free by the community or not. So the question is:</p>
<p><center><b>Shall we stop supporting commercial<br/>themes and plugins for free?</b></center></p>
<p><strong>Pro:</strong></p>
<ul>
<li>The creator of commercial themes and plugins is making money from it and why should I give support? I will not get any money from my support but the creator will earn even more with subsequent products because of &#8220;the great support&#8221;.</li>
<li>People asking for support often are consultants, coders or designers making money from WordPress. They will not give me a single dollar if I give them support and help them to satisfy their customers.</li>
<li>There are special forums and mailinglist of commercial themes/plugins by the companies. Customers should use those.</li>
<li>I don&#8217;t support anything not GPL. Viva la revolución!</li>
<li>I could support the users but I would charge them for it.</li>
<li>There are better alternatives which are GPL. People should start using those and I&#8217;ll happily give them support.</li>
<li>&#8230;</li>
</ul>
<p><strong>Contra:</strong></p>
<ul>
<li>It&#8217;s all about the community! I don&#8217;t give a damn if others make money from it.</li>
<li>For me it doesn&#8217;t matter if I give support for free or commercial themes/plugins. The only reward I want is reputation.</li>
<li>Many of the commercial authors are active members of the WordPress community and give free support for other problems themselves.</li>
<li>Not all users (if not the majority) of commercial themes/plugins are professionals.</li>
<li>Often the commercial support is poor and the WordPress community should help those poor lost souls with their problems.</li>
<li>There are many support forums for other commercial software where people help each other in their spare time why should WordPress themes and plugins be an exception?</li>
<li>All this commercial stuff is making WordPress even more popular and so there will be more people helping WordPress getting better and better</li>
<li>Even Matt Mullenweg is profiting from all the free support from the community. Automattic would never be able to do it themselves and to present and enhance the best blogging system since sliced bread.</li>
<li>&#8230;</li>
</ul>
<p>BTW: This is the third best article about this topic! (Couldn&#8217;t resist.)</p>
<p>Some links:</p>
<ul>
<li><a href ="http://www.mitchcanter.com/2010/wordpress/the-great-thesis-thesiswp-vs-wordpress-debate-rages-on/">Discussion betweeen Matt Mullenweg and Chris Paerson about the Thesis theme</a></li>
<li><a href="http://drewblas.com/2010/07/15/an-analysis-of-gpled-code-in-thesis/">An analysis of GPL’ed code in Thesis</a></li>
<li><a href="http://www.blogherald.com/2010/07/15/inevitable-wordpress-to-sue-thesis-founder/">Inevitable: WordPress To Sue Thesis Founder</a></li>
<li><a href="http://ryan.boren.me/2010/07/15/wordpress-theme-licensing/">Ryan Boren: WordPress Theme Licensing</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://elektroelch.net/blog/stop-supporting-commercial-themes-and-plugins-for-free/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Updated pagebar v2.58</title>
		<link>http://elektroelch.net/blog/updated-pagebar-v2-58/</link>
		<comments>http://elektroelch.net/blog/updated-pagebar-v2-58/#comments</comments>
		<pubDate>Tue, 29 Jun 2010 11:45:03 +0000</pubDate>
		<dc:creator>Latz</dc:creator>
				<category><![CDATA[pagebar]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://elektroelch.net/?p=38</guid>
		<description><![CDATA[Some days I was happy that pagebar v2.57 does seem to work with the new WordPress v3.0 flawlessly but I laughed too soon. Mark (no link given) pointed out that custom taxonomies are disrupted when using pagebar v2.57. The reason was some code I borrows from the &#8220;Multi Page Toolkit&#8220;: add_action&#40;'init', 'pb_allpage_permalink', -1&#41;; function pb_allpage_permalink&#40;&#41; [...]]]></description>
			<content:encoded><![CDATA[<p>Some days I was happy that pagebar v2.57 does seem to work with the new WordPress v3.0 flawlessly but I laughed too soon. Mark (no link given) pointed out that <a href="http://justintadlock.com/archives/2009/05/06/custom-taxonomies-in-wordpress-28">custom taxonomies</a> are disrupted when using pagebar v2.57. </p>
<p>The reason was some code I borrows from the &#8220;<a href="http://wordpress.org/extend/plugins/multi-page-toolkit/">Multi Page Toolkit</a>&#8220;:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;">add_action<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'init'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'pb_allpage_permalink'</span><span style="color: #339933;">,</span> <span style="color: #339933;">-</span><span style="color: #cc66cc;">1</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">function</span> pb_allpage_permalink<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">global</span> <span style="color: #000088;">$wp_rewrite</span><span style="color: #339933;">;</span>
	<span style="color: #000088;">$wp_rewrite</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">add_endpoint</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;all&quot;</span><span style="color: #339933;">,</span> EP_ALL<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #000088;">$wp_rewrite</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">flush_rules</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

<p>This code enables pagebar to display all parts of a page which is splitted into multiple parts. As you might see the code adds a new rule to the permalink structure. Unfortunately it corrupted the permalinks in a way that custom taxonomies stopped to worked. </p>
<p>The solution to this problem was to fire the action much, much later and to to update the rules transient (soft flush):</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;">add_action<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'init'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'pb_allpage_permalink'</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">99</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">function</span> pb_allpage_permalink<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">global</span> <span style="color: #000088;">$wp_rewrite</span><span style="color: #339933;">;</span>
	<span style="color: #000088;">$wp_rewrite</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">add_endpoint</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;all&quot;</span><span style="color: #339933;">,</span> EP_ALL<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #000088;">$wp_rewrite</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">flush_rules</span><span style="color: #009900;">&#40;</span><span style="color: #009900; font-weight: bold;">false</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

<p>Hopefully this will solve the problems with custom taxonomies completely.</p>
<p>Download:</p>
<ul>
<li>
<a href="http://downloads.wordpress.org/plugin/pagebar.zip">pagebar258.zip</a>
</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://elektroelch.net/blog/updated-pagebar-v2-58/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>So your WordPress plugin kills the Theme Editor?</title>
		<link>http://elektroelch.net/blog/so-your-wordpress-plugin-kills-the-theme-editor/</link>
		<comments>http://elektroelch.net/blog/so-your-wordpress-plugin-kills-the-theme-editor/#comments</comments>
		<pubDate>Wed, 23 Dec 2009 16:43:03 +0000</pubDate>
		<dc:creator>Latz</dc:creator>
				<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://elektroelch.net/?p=26</guid>
		<description><![CDATA[You&#8217;ve created a plugin that worked happily since version 2.5 of WordPress. Then came version 2.9 and the users of your plugin complain that the theme editor does not work anymore! What the theme editor? What have I to do with the theme editor? That were my thoughts when I received bug reports for the [...]]]></description>
			<content:encoded><![CDATA[<p><img class="imgright" src="http://lh5.ggpht.com/_Z3e_jASabuQ/SzIqaE0i76I/AAAAAAAAAc4/VPVHfDQT56Q/s800/themeeditor.jpg"/>You&#8217;ve created a plugin that worked happily since version 2.5 of WordPress. Then came version 2.9 and the users of your plugin complain that the <a href="http://codex.wordpress.org/Editing_Files#Using_the_File_Editor">theme editor</a> does not work anymore! What the theme editor? What have I to do with the theme editor?</p>
<p>That were my thoughts when I received bug reports for the <a href="http://wordpress.org/extend/plugins/pagebar/">pagebar plugin</a>. I had absolutely no idea why and first checked the usual suspects; with no success. So I tried a different approach and disabled all initialisation code. The theme editor worked. I enabled the first disabled line and Eureka! The theme editor failed. This has to be the<br />
erroneous line:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000088;">$dir</span> <span style="color: #339933;">=</span> trailingslashit<span style="color: #009900;">&#40;</span>WP_CONTENT <span style="color: #009900;">&#91;</span><span style="color: #339933;">...</span><span style="color: #009900;">&#93;</span></pre></div></div>

<p>The <code>$dir</code> variable is global and that seemed to be the problem. A short look at <code>theme-editor.php</code> shows that&#8217;s there a global variable called <code>$dir</code>. So I changed the variable name in my plugin to a more unique name and voilà, everything works as expected.</p>
<p>There are some lessons I learned from this incident:</p>
<ul>
<li>Use a unique name for your global variables.</li>
<li>Better: Never use global variables at all.</li>
<li>Even better: encapsulate everythin inside a class.</li>
</ul>
<ul>
</ul>
<p>I hope his short story helped you to debug your plugin and leave some happy users behind.</p>
]]></content:encoded>
			<wfw:commentRss>http://elektroelch.net/blog/so-your-wordpress-plugin-kills-the-theme-editor/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Photographing and filming British buildings makes you a terrorist suspect</title>
		<link>http://elektroelch.net/blog/photographing-and-filming-british-buildings-makes-you-a-terrorist-suspect/</link>
		<comments>http://elektroelch.net/blog/photographing-and-filming-british-buildings-makes-you-a-terrorist-suspect/#comments</comments>
		<pubDate>Wed, 16 Dec 2009 17:46:57 +0000</pubDate>
		<dc:creator>Latz</dc:creator>
				<category><![CDATA[politics]]></category>

		<guid isPermaLink="false">http://elektroelch.net/?p=23</guid>
		<description><![CDATA[Today I came across some nice articles and videos by Paul Lewis: &#8216;You&#8217;re filming for fun? I don&#8217;t believe you&#8217; and A few photographs add up to a minor terror alert. You definitely should follow his feed.]]></description>
			<content:encoded><![CDATA[<p><img src="http://elektroelch.net/wp-content/uploads/2009/12/nophoto_small.png" alt="nophoto_small" title="nophoto_small" width="101" height="101" class="alignright size-full wp-image-25" />Today I came across some nice articles and videos by <a href="http://www.guardian.co.uk/profile/paullewis">Paul Lewis</a>:<br />
<a href="http://www.guardian.co.uk/uk/video/2009/dec/15/police-terrorism">&#8216;You&#8217;re filming for fun? I don&#8217;t believe you&#8217;</a> and <a href="http://www.guardian.co.uk/uk/video/2009/dec/11/photographs-police-anti-terrorism-laws">A few photographs add up to a minor terror alert</a>. You definitely should follow his <a href="http://www.guardian.co.uk/profile/paullewis/rss">feed</a>.<br clear="all"/></p>
]]></content:encoded>
			<wfw:commentRss>http://elektroelch.net/blog/photographing-and-filming-british-buildings-makes-you-a-terrorist-suspect/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Meet the WordPress core developers (almost)</title>
		<link>http://elektroelch.net/blog/meet-the-wordpress-core-developers-almost/</link>
		<comments>http://elektroelch.net/blog/meet-the-wordpress-core-developers-almost/#comments</comments>
		<pubDate>Tue, 15 Dec 2009 18:04:26 +0000</pubDate>
		<dc:creator>Latz</dc:creator>
				<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://elektroelch.net/?p=21</guid>
		<description><![CDATA[How does Peter Westwood look like? How does Mark Jaquith talk? Is Ryan Boren funny? You can find some anwers in this video from the first meetup of all WordPress core developers:]]></description>
			<content:encoded><![CDATA[<p>How does <a href="http://westi.wordpress.com/">Peter Westwood</a> look like? How does <a href="http://markjaquith.com/">Mark Jaquith</a> talk? Is <a href="http://boren.nu/">Ryan Boren</a> funny? You can find some anwers in this video from the first meetup of all WordPress core developers:</p>
<p><center><embed src="http://v.wordpress.com/wp-content/plugins/video/flvplayer.swf?ver=1.11" type="application/x-shockwave-flash" width="400" height="224" allowscriptaccess="always" allowfullscreen="true" flashvars="guid=OxzyETzZ&amp;width=400&amp;height=224" title="WordPress Core Commit Team Meetup"></embed><br />
</center><br />
<br/></p>
]]></content:encoded>
			<wfw:commentRss>http://elektroelch.net/blog/meet-the-wordpress-core-developers-almost/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>noteaser &#8211; The unknown WordPress tag</title>
		<link>http://elektroelch.net/blog/noteaser-the-unkown-wordpress-tag/</link>
		<comments>http://elektroelch.net/blog/noteaser-the-unkown-wordpress-tag/#comments</comments>
		<pubDate>Mon, 14 Dec 2009 17:23:55 +0000</pubDate>
		<dc:creator>Latz</dc:creator>
				<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://elektroelch.net/?p=19</guid>
		<description><![CDATA[Most WordPress users will know the &#60;!&#45;&#45;more&#45;&#45;&#62; tag which allows you to create a teaser for your blog post. The text in front of the tag will be displayed on the main blog page and after clicking the &#8220;more&#8221; link the single post page containing the teaser and remaining part of the blog post will [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://elektroelch.de/pics/noteaser.png" alt="noteaser" title="noteaser" width="208" height="74" class="alignright size-full wp-image-573" />Most WordPress users will know the &lt;!&#45;&#45;more&#45;&#45;&gt; tag which allows you to create a teaser for your blog post. The text in front of the tag will be displayed on the main blog page and after clicking the &#8220;more&#8221; link the single post page containing the teaser and remaining part of the blog post will be displayed.</p>
<p>More often than not this is adequate but there may be situation where you want to create a separate teaser which isn&#8217;t displayed on the single post page. So it may be a good idea to create a collage as the teaser for a post containing various images. On the post page itself the collage would not be appropriate. Another situation could be a very striking teaser which does not fit into the main post but still is a good teaser to attract readers.</p>
<p>To hide these parts of the post you can use the lesser known &lt;!&#45;&#45;noteaser&#45;&#45;&gt; tag:</p>
<div class="wp_syntax">
<div class="code" <pre style="font-family:monospace;">
Teaser text. &lt;!&#45;&#45;more&#45;&#45;&gt;&lt;!&#45;&#45;noteaser&#45;&#45;&gt;Post text.
</div>
</div>
<p>The &lt;!&#45;&#45;noteaser&#45;&#45;&gt; necessarily has to follow directly after the &lt;!&#45;&#45;more&#45;&#45;&gt; tag otherwise it will not be evaluated.</p>
<p>However there are some issues using the tag:</p>
<ul>
<li>After clicking the more tag the content of the post will be moved to the top of the browser window. This may be appropriate for a standard posting where the teaser text shall be hidden from the reader&#8217;s eyes. Using the <em>noteaser</em> tag there is no such text any more and the reader is wondering if there is anything above.</li>
<li>The text in front of the &lt;!&#45;&#45;more&#45;&#45;&gt;&lt;!&#45;&#45;noteaser&#45;&#45;&gt; tags will not be shown on the preview page. So you have to write your post in two steps: first creating the text as usual and inserting the &lt;!&#45;&#45;noteaser&#45;&#45;&#038;gt in the final state.</li>
<li>All line breaks are preserved. To avoid an additional empty line at the top of the post you should insert the tags on a single line.</li>
</ul>
<p>These issues may be solved by creating a plugin&#8230; maybe later. Nevertheless the tag is a nice tool to add a different view to your blog.</p>
]]></content:encoded>
			<wfw:commentRss>http://elektroelch.net/blog/noteaser-the-unkown-wordpress-tag/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Christmas market in Braunschweig</title>
		<link>http://elektroelch.net/blog/christmas-market-in-braunschweig/</link>
		<comments>http://elektroelch.net/blog/christmas-market-in-braunschweig/#comments</comments>
		<pubDate>Wed, 09 Dec 2009 15:12:41 +0000</pubDate>
		<dc:creator>Latz</dc:creator>
				<category><![CDATA[images]]></category>

		<guid isPermaLink="false">http://elektroelch.net/?p=17</guid>
		<description><![CDATA[This work is licenced under a Creative Commons Licence.]]></description>
			<content:encoded><![CDATA[<p><span id="more-17"></span><!--noteaser--><center><a href="/pics/weihnachtsmarkt_bs_2009/herzen.jpg" border="0" rel="lightbox[17]"><img src="http://elektroelch.de/pics/herzen_thumb.jpg" alt="herzen_thumb" title="herzen_thumb" width="368" height="236" class="alignnone size-full wp-image-568" /></a></p>
<p><a href="/pics/weihnachtsmarkt_bs_2009/karusell.jpg" border="0" rel="lightbox[17]"><img src="http://elektroelch.de/pics/karusell_thumb.jpg" alt="karusell_thumb" title="karusell_thumb" width="392" height="264" class="alignnone size-full wp-image-569" /></a></p>
<p><a href="/pics/weihnachtsmarkt_bs_2009/kugeln.jpg" border="0" rel="lightbox[17]"><img src="http://elektroelch.de/pics/kugeln_thumb.jpg" alt="kugeln_thumb" title="kugeln_thumb" width="324" height="222" class="alignnone size-full wp-image-570" /></a></p>
<p><a href="/pics/weihnachtsmarkt_bs_2009/puppen.jpg" border="0" rel="lightbox[17]"><img src="http://elektroelch.de/pics/puppen_thumb.jpg" alt="puppen_thumb" title="puppen_thumb" width="369" height="240" class="alignnone size-full wp-image-571" /></a></p>
<p><a href="/pics/weihnachtsmarkt_bs_2009/herzen1.jpg" border="0" rel="lightbox[17]"><img src="http://elektroelch.de/pics/herzen1_thumb.jpg" alt="herzen1_thumb" title="herzen1_thumb" width="392" height="264" class="alignnone size-full wp-image-567" /></a></p>
<p><a href="/pics/weihnachtsmarkt_bs_2009/bananen.jpg" border="0" rel="lightbox[17]"><img src="http://elektroelch.de/pics/bananen_thumb.jpg" alt="bananen_thumb" title="bananen_thumb" width="362" height="227" class="alignnone size-full wp-image-566" /></a></p>
<p><a href="/pics/weihnachtsmarkt_bs_2009/ballons.jpg" border="0" rel="lightbox[17]"><img src="http://elektroelch.de/pics/ballons_thumb.jpg" alt="ballons_thumb" title="ballons_thumb" width="264" height="392" class="alignnone size-full wp-image-565" /></a></p>
<p></center></p>
<p><a rel="license" href="http://creativecommons.org/licenses/by-nc-sa/3.0/de/"><img alt="Creative Commons License" style="border-width:0" src="http://i.creativecommons.org/l/by-nc-sa/3.0/de/88x31.png" /></a><br />This work is licenced under a <a rel="license" href="http://creativecommons.org/licenses/by-nc-sa/3.0/de/">Creative Commons Licence</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://elektroelch.net/blog/christmas-market-in-braunschweig/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Accessing WordPress data from outside WordPress</title>
		<link>http://elektroelch.net/blog/accessing-wordpress-data-from-outside-wordpress/</link>
		<comments>http://elektroelch.net/blog/accessing-wordpress-data-from-outside-wordpress/#comments</comments>
		<pubDate>Mon, 26 Oct 2009 12:01:39 +0000</pubDate>
		<dc:creator>Latz</dc:creator>
				<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://elektroelch.net/?p=15</guid>
		<description><![CDATA[(img by shindohd) There are times when you want to access the data from your WordPress database from a webpage outside of your WordPress installation. This can be done by using the mysql_connect of PHP and selecting the data with some genuine SQL statements. This will work but it has the substantive disadvantage that the [...]]]></description>
			<content:encoded><![CDATA[<dl class="imgright" style:"width: 188px;">
<dt><img src="http://lh3.ggpht.com/_Z3e_jASabuQ/SuWLxuXrBWI/AAAAAAAAAaE/f_DIi5In4U4/s144/3835365695_5e515a3492_m.jpg" width="188" height="143" /></dt>
<dd>(img by <a href="http://www.flickr.com/photos/shindotv/">shindohd</a>)</dd>
</dl>
<p>There are times when you want to access the data from your WordPress database from a webpage outside of your WordPress installation. This can be done by using the <code><a href="http://www.php.net/manual/en/function.mysql-connect.php">mysql_connect</a></code> of PHP and selecting the data with some genuine SQL statements. This will work but it has the substantive disadvantage that the WordPress database is changed now and then and that the SQL statement will fail sooner or later.</p>
<p>There has to be a better solution and there is one! Simply use the function provided by WordPress itself to access the data. It&#8217;s as simple as this code:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #b1b100;">include</span> <span style="color: #0000ff;">'../blog/wp-blog-header.php'</span><span style="color: #339933;">;</span></pre></div></div>

<p>In this example WordPress is installed in the directory &#8220;../blog&#8221; relative to the directory of the current script. You have to adapt it to your installation, of course. Now you can access the database using the <code>$wpdb</code>-instance, i.e.</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000088;">$post_id</span> <span style="color: #339933;">=</span> <span style="color: #cc66cc;">666</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$sql</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;select post_title from <span style="color: #006699; font-weight: bold;">$wpdb-&gt;posts</span> where ID=<span style="color: #006699; font-weight: bold;">$post_id</span>&quot;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$title</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$wpdb</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">get_var</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$sql</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>Ok, if Automattic decides to change the row names you&#8217;ve lost again. So you should completely avoid direct database calls and use the functions build into WordPress which are also available after including the above file:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000088;">$post_id</span> <span style="color: #339933;">=</span> <span style="color: #cc66cc;">666</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$title</span> <span style="color: #339933;">=</span>  get_the_title<span style="color: #009900;">&#40;</span><span style="color: #000088;">$post_id</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>This should be a safe call for a very long time!</p>
]]></content:encoded>
			<wfw:commentRss>http://elektroelch.net/blog/accessing-wordpress-data-from-outside-wordpress/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>First meeting for launching a hackerspace in Kassel/Germany</title>
		<link>http://elektroelch.net/blog/first-meeting-for-launching-a-hackerspace-in-kasselgermany/</link>
		<comments>http://elektroelch.net/blog/first-meeting-for-launching-a-hackerspace-in-kasselgermany/#comments</comments>
		<pubDate>Fri, 09 Oct 2009 16:24:14 +0000</pubDate>
		<dc:creator>Latz</dc:creator>
				<category><![CDATA[flipdot]]></category>

		<guid isPermaLink="false">http://elektroelch.net/?p=10</guid>
		<description><![CDATA[Kassel, a city located at the Fulda, population 200,000, is as ugly as sin but it&#8217;s got the]]></description>
			<content:encoded><![CDATA[<p><img src="http://lh5.ggpht.com/_Z3e_jASabuQ/SsyUwrMKZ8I/AAAAAAAAAZE/LMAOIZ8LORg/s144/flipdot.jpg" class="imgright" /><a href="http://en.wikipedia.org/wiki/Kassel">Kassel</a>, a city located at the <a href="http://en.wikipedia.org/wiki/Fulda_River">Fulda</a>, population 200,000, is as ugly as sin but it&#8217;s got the <a href="<a href="http://www.wilhelmshoehe.de/herkules_index.cfm">Herkules</a>, a pile of <a href="http://www.museum-kassel.de/">museums</a>, a great <a href="http://en.wikipedia.org/wiki/Hackerspace">hackerspace</a>, a <a href="http://www.staatstheater-kassel.de/">national theatre</a>, a <a href="http://cms.uni-kassel.de/unicms/index.php?id=grp-international">university</a>&#8230;</p>
<p>Wait, wait, wait! A hackerspace? In Kassel? No, of course there isn&#8217;t one. Not yet. But there could be soon. Some people thought they could change this state and create such a space in Kassel, whereby space does not exclusively has to be taken as a physical room.</p>
<p>So the call went out into the great wide open of the Internet and the initiators hoped for a small group of interested people. at the first meeting in a small pub this small group turned out to be a large group of 28 combatants.</p>
<p>Unfortunately the locality was quite unsuitable for such a large group. If only five or ten people had shown up it would have been a nice and cosy get-together but actually we had to make the best of the circumstances. Some verbal contributions could hardly be heard others not at all. But nobody could expect such an immense interest. Nonetheless everybody was concentrated and the discussion was quite constructive. After a short introduction to the basic ideas of hackerspaces everyone told a bit about his background, his intentions, ideas, and expectations. I think a lot of <a href="http://en.wikipedia.org/wiki/Blinkenlights">Blinkenlights</a> will be created in the near future.</p>
<p>Obviously there is a great crowd of hardware freaks, programmers, and artistically interested men (yes, there wasn&#8217;t a single woman) having many ideas for new and/or interesting projects  and ideas how they can help others and how others can help them. The initiators presented a welled planned  concept and even looked after some affordable rooms with a good infrastructure. Next week we will have a go and see.</p>
<p>Hopefully everybody will keep at it and the new hackerspace will have a good substantial and financial foundation. It&#8217;s going to be interesting!</p>
<p>Links:
<ul>
<li><a href="http://flipdot.org">flipdot.org</a> (German)</li>
<li><a href="http://flipdot.org/blog/">flipdot blog</a>(German)</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://elektroelch.net/blog/first-meeting-for-launching-a-hackerspace-in-kasselgermany/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Botany Bay: Old Men with Ballpoint Pens</title>
		<link>http://elektroelch.net/blog/botany-bay-old-men-with-ballpoint-pens/</link>
		<comments>http://elektroelch.net/blog/botany-bay-old-men-with-ballpoint-pens/#comments</comments>
		<pubDate>Thu, 27 Aug 2009 12:51:43 +0000</pubDate>
		<dc:creator>Latz</dc:creator>
				<category><![CDATA[politics]]></category>

		<guid isPermaLink="false">http://elektroelch.net/?p=5</guid>
		<description><![CDATA[Botany Bay made a nice music clip about surveillance. You may not know the people in the clip (German politicians) but that does not matter at all. Old Men With Ballpoint Pens They know it is the worst thing Not being in control So they bring in all the big guns To ease their troubled [...]]]></description>
			<content:encoded><![CDATA[<p>Botany Bay made a nice music clip about surveillance. You may not know the people in the clip (German politicians) but that does not matter at all.</p>
<p><object width="560" height="340"><param name="movie" value="http://www.youtube.com/v/jhX55YdHk1U&#038;hl=en&#038;fs=1&#038;rel=0&#038;color1=0x006699&#038;color2=0x54abd6"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/jhX55YdHk1U&#038;hl=en&#038;fs=1&#038;rel=0&#038;color1=0x006699&#038;color2=0x54abd6" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="560" height="340"></embed></object></p>
<blockquote><p>
    <strong>Old Men With Ballpoint Pens</strong></p>
<p>    They know it is the worst thing<br />
    Not being in control<br />
    So they bring in all the big guns<br />
    To ease their troubled souls<br />
    You can see them in the tabloids<br />
    Where they smile their empty smiles<br />
    Selling tales of lawless chaos<br />
    And lies upon lies<br />
    They waste no time, they’re on the way<br />
    They’re quick to bend the laws<br />
    To abuse the ones who suffered<br />
    For their twisted cause</p>
<p>    Old men with ballpoint pens<br />
    Old men with ballpoint pens<br />
    Old men with ballpoint pens<br />
    Old men with ballpoint pens</p>
<p>    They know what you’ve been doing<br />
    They know where you have been<br />
    They read the words, both yours and mine<br />
    They’ve seen what you have seen<br />
    They’re here to protect you<br />
    All for the common good<br />
    Don’t you dare to get in their way<br />
    They just know what’s good for you<br />
    And if you’re feeling watched<br />
    And if you’re full of fear<br />
    Remember that, remember how<br />
    It was you who brought them here</p>
<p>    Old men with ballpoint pens… <cite></cite></p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://elektroelch.net/blog/botany-bay-old-men-with-ballpoint-pens/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
