<?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>Urbans Blog &#187; trick</title>
	<atom:link href="http://www.urbans-blog.de/tag/trick/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.urbans-blog.de</link>
	<description>Der alltägliche Wahnsinn und mein Senf dazu</description>
	<lastBuildDate>Sun, 03 Apr 2011 13:18:47 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Checkboxes in admin interface &#8211; a quick &amp; dirty trick</title>
		<link>http://www.urbans-blog.de/2008/02/09/checkboxes-in-admin-interface-a-quick-dirty-trick/</link>
		<comments>http://www.urbans-blog.de/2008/02/09/checkboxes-in-admin-interface-a-quick-dirty-trick/#comments</comments>
		<pubDate>Sat, 09 Feb 2008 19:31:29 +0000</pubDate>
		<dc:creator>urban</dc:creator>
				<category><![CDATA[OXID eShop]]></category>
		<category><![CDATA[checkbox]]></category>
		<category><![CDATA[enum]]></category>
		<category><![CDATA[trick]]></category>

		<guid isPermaLink="false">http://www.urbans-blog.de/2008/02/09/checkboxes-in-admin-interface-a-quick-dirty-trick/</guid>
		<description><![CDATA[If you add enum-fields to a table and want to make them editable in an admin menue you are faced to the fact that if the box is not checked &#8211; no parameter is passed to the according PHP-script. Normally you would have to write a small module of the according class containing the save [...]]]></description>
			<content:encoded><![CDATA[<p>If you add enum-fields to a table and want to make them editable in an admin menue you are faced to the fact that if the box is not checked &#8211; no parameter is passed to the according PHP-script. Normally you would have to write a small module of the according class containing the save function with something like this:</p>
<p><pre><pre lang="php">
if(!isset($aParams[&#039;nameOfCheckboxField&#039;]))
&nbsp;&nbsp;&nbsp;&nbsp;$aParams[&#039;nameOfCheckboxField&#039;] = 0;
</pre></pre></p>
<p>Writing a module for such simple stuff is a bit overhead. So what you can do instead in the according template is:<br />
<pre><pre lang="php">
&lt;input type=&quot;hidden&quot; name=&quot;nameOfCheckboxField&quot; value=&quot;0&quot;&gt;
&lt;input type=&quot;checkbox&quot; name=&quot;nameOfCheckboxField&quot; value=&quot;1&quot;&gt;
</pre></pre><br />
So now, if the checkbox is checked, the parameter <em>nameOfCheckboxField</em> with value &#8220;1&#8243; is posted to the PHP script. If the checkbox is not checked then the value of the hidden field is posted &#8211; and you don&#8217;t need any module at all.</p>
<p>Off course this might not be totally valid code. But in the backend I would not care about validation as much as about functionality.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.urbans-blog.de/2008/02/09/checkboxes-in-admin-interface-a-quick-dirty-trick/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>615.810 EUR gewonnen? &#8211; Loteria Primitiva</title>
		<link>http://www.urbans-blog.de/2008/01/31/615810-eur-gewonnen-loteria-primitiva/</link>
		<comments>http://www.urbans-blog.de/2008/01/31/615810-eur-gewonnen-loteria-primitiva/#comments</comments>
		<pubDate>Thu, 31 Jan 2008 11:01:36 +0000</pubDate>
		<dc:creator>urban</dc:creator>
				<category><![CDATA[dies und das]]></category>
		<category><![CDATA[betrug]]></category>
		<category><![CDATA[gewinn]]></category>
		<category><![CDATA[loteria primitiva]]></category>
		<category><![CDATA[trick]]></category>

		<guid isPermaLink="false">http://www.urbans-blog.de/2008/01/31/615810-eur-gewonnen-loteria-primitiva/</guid>
		<description><![CDATA[Als ich eben meinen Briefkasten öffnete fand ich einen Umschlag, der aus Malaga, Spanien  stammte. Inhalt: eine Gewinnbenachrichtigung über EUR 615.810,00!! Von einer spanischen Lotterie, an der ich natürlich nie teilgenommen habe. Man könnte darüber jetzt viel Spaßiges schreiben &#8211; aber das haben, wie ich sehe, andere schon zur Genüge getan &#8211; ein Beispiel findet [...]]]></description>
			<content:encoded><![CDATA[<p>Als ich eben meinen Briefkasten öffnete fand ich einen Umschlag, der aus Malaga, Spanien  stammte. Inhalt: eine Gewinnbenachrichtigung über EUR 615.810,00!! Von einer spanischen Lotterie, an der ich natürlich nie teilgenommen habe.</p>
<p>Man könnte darüber jetzt viel Spaßiges schreiben &#8211; aber das haben, wie ich sehe, andere schon zur Genüge getan &#8211; ein Beispiel findet sich hier: <a href="http://www.andreas-lazar.de/2007/09/loteria-primitiva">Andis Soapbox: Loteria Primitiva</a>.</p>
<p>Dennoch wollte ich ein paar Worte darüber schreiben, auch um Leichtgläubige entsprechend vorzuwarnen. Wie das ganze funktioniert, kann man übrigens auch hier nachlesen: <a href="http://www.westfaelische-nachrichten.de/wna/lokales/kreis_steinfurt/steinfurt/Loteria_Primitiva_Ein_primitiver_Trick.html">Loteria Primitiva: Ein primitiver Trick</a>.</p>
<p>Schade eigentlich &#8230; &#8211; dieses Sümmchen hätte mir gerade verdammt gut in den Kram gepasst. *snüff*</p>
]]></content:encoded>
			<wfw:commentRss>http://www.urbans-blog.de/2008/01/31/615810-eur-gewonnen-loteria-primitiva/feed/</wfw:commentRss>
		<slash:comments>157</slash:comments>
		</item>
	</channel>
</rss>

