<?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>codeterrorizer.com</title>
	<atom:link href="http://www.codeterrorizer.com/feed" rel="self" type="application/rss+xml" />
	<link>http://www.codeterrorizer.com</link>
	<description>Code Snippets</description>
	<lastBuildDate>Tue, 27 Jul 2010 14:47:36 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Typo3 Dev: Get Base URL in Extension</title>
		<link>http://www.codeterrorizer.com/typoscript/typo3-dev-get-base-url-in-extension</link>
		<comments>http://www.codeterrorizer.com/typoscript/typo3-dev-get-base-url-in-extension#comments</comments>
		<pubDate>Tue, 27 Jul 2010 14:46:31 +0000</pubDate>
		<dc:creator>Christian Koch</dc:creator>
				<category><![CDATA[t3 extension development]]></category>
		<category><![CDATA[typoscript]]></category>
		<category><![CDATA[ext base url]]></category>
		<category><![CDATA[extension baseurl]]></category>
		<category><![CDATA[t3 dev baseurl]]></category>
		<category><![CDATA[typo3 exteions development]]></category>

		<guid isPermaLink="false">http://www.codeterrorizer.com/?p=281</guid>
		<description><![CDATA[There are two ways to get the base URL in your Code, either you use:


print $GLOBALS['TSFE']-&#62;baseUrl;

or from your TypoScript configuration use:

print $GLOBALS['TSFE']-&#62;tmpl-&#62;setup['config.']['baseURL'];

Be careful, you have to set the baseURL in your TypoScript or both options won&#8217;t work at all.
Cheers


Related posts:Typo3 Multidomain RealURLTypo3 Extension Flexform onchange reloadTypo3 Extension Flexform, outsourcing Language Files for your flexform


Related posts:<ol><li><a href='http://www.codeterrorizer.com/typoscript/typo3-multidomain-realurl' rel='bookmark' title='Permanent Link: Typo3 Multidomain RealURL'>Typo3 Multidomain RealURL</a></li><li><a href='http://www.codeterrorizer.com/php/typo3-extension-flexform-onchange-reload' rel='bookmark' title='Permanent Link: Typo3 Extension Flexform onchange reload'>Typo3 Extension Flexform onchange reload</a></li><li><a href='http://www.codeterrorizer.com/php/typo3-flexform-outsourcing-language-for-your-flexform' rel='bookmark' title='Permanent Link: Typo3 Extension Flexform, outsourcing Language Files for your flexform'>Typo3 Extension Flexform, outsourcing Language Files for your flexform</a></li></ol>]]></description>
			<content:encoded><![CDATA[<p>There are two ways to get the base URL in your Code, either you use:</p>
<p><span id="more-281"></span></p>
<pre class="brush: php;">
print $GLOBALS['TSFE']-&gt;baseUrl;
</pre>
<p>or from your TypoScript configuration use:</p>
<pre class="brush: php;">
print $GLOBALS['TSFE']-&gt;tmpl-&gt;setup['config.']['baseURL'];
</pre>
<p>Be careful, you have to set the baseURL in your TypoScript or both options won&#8217;t work at all.</p>
<p>Cheers</p>


<p>Related posts:<ol><li><a href='http://www.codeterrorizer.com/typoscript/typo3-multidomain-realurl' rel='bookmark' title='Permanent Link: Typo3 Multidomain RealURL'>Typo3 Multidomain RealURL</a></li><li><a href='http://www.codeterrorizer.com/php/typo3-extension-flexform-onchange-reload' rel='bookmark' title='Permanent Link: Typo3 Extension Flexform onchange reload'>Typo3 Extension Flexform onchange reload</a></li><li><a href='http://www.codeterrorizer.com/php/typo3-flexform-outsourcing-language-for-your-flexform' rel='bookmark' title='Permanent Link: Typo3 Extension Flexform, outsourcing Language Files for your flexform'>Typo3 Extension Flexform, outsourcing Language Files for your flexform</a></li></ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.codeterrorizer.com/typoscript/typo3-dev-get-base-url-in-extension/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Starting and stopping Processes</title>
		<link>http://www.codeterrorizer.com/commands/starting-and-stopping-processes</link>
		<comments>http://www.codeterrorizer.com/commands/starting-and-stopping-processes#comments</comments>
		<pubDate>Fri, 09 Jul 2010 09:29:22 +0000</pubDate>
		<dc:creator>Christian Koch</dc:creator>
				<category><![CDATA[Commands]]></category>
		<category><![CDATA[linux proccess]]></category>
		<category><![CDATA[pause process]]></category>
		<category><![CDATA[start proccess]]></category>
		<category><![CDATA[stop proccess]]></category>

		<guid isPermaLink="false">http://www.codeterrorizer.com/?p=274</guid>
		<description><![CDATA[To pause your proccess first find your proccess id with ps ax or top command.

Using the process status command ps:

shell&#62; ps ax &#124; grep proccessname

Or using the top command:

shell&#62; top

Copy the process id of your proccess.
Stopping your process:

shell&#62; kill -STOP proccessid

Starting/Continuing your proccess again:

shell&#62; kill -CONT proccessid

That&#8217;s it  


Related posts:PHP MS SQL ODBC on DebianFast Read More


Related posts:<ol><li><a href='http://www.codeterrorizer.com/php/php-ms-sql-odbc-on-debian' rel='bookmark' title='Permanent Link: PHP MS SQL ODBC on Debian'>PHP MS SQL ODBC on Debian</a></li><li><a href='http://www.codeterrorizer.com/sqlite/fast-sqlite-tutorial' rel='bookmark' title='Permanent Link: Fast SQLite Tutorial'>Fast SQLite Tutorial</a></li></ol>]]></description>
			<content:encoded><![CDATA[<p>To pause your proccess first find your proccess id with ps ax or top command.</p>
<p><span id="more-274"></span></p>
<p>Using the process status command ps:</p>
<pre class="brush: bash;">
shell&gt; ps ax | grep proccessname
</pre>
<p>Or using the top command:</p>
<pre class="brush: bash;">
shell&gt; top
</pre>
<p>Copy the process id of your proccess.</p>
<p>Stopping your process:</p>
<pre class="brush: bash;">
shell&gt; kill -STOP proccessid
</pre>
<p>Starting/Continuing your proccess again:</p>
<pre class="brush: bash;">
shell&gt; kill -CONT proccessid
</pre>
<p>That&#8217;s it <img src='http://www.codeterrorizer.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>


<p>Related posts:<ol><li><a href='http://www.codeterrorizer.com/php/php-ms-sql-odbc-on-debian' rel='bookmark' title='Permanent Link: PHP MS SQL ODBC on Debian'>PHP MS SQL ODBC on Debian</a></li><li><a href='http://www.codeterrorizer.com/sqlite/fast-sqlite-tutorial' rel='bookmark' title='Permanent Link: Fast SQLite Tutorial'>Fast SQLite Tutorial</a></li></ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.codeterrorizer.com/commands/starting-and-stopping-processes/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>CSS: hover table rows</title>
		<link>http://www.codeterrorizer.com/css-hacks/hover-table-rows</link>
		<comments>http://www.codeterrorizer.com/css-hacks/hover-table-rows#comments</comments>
		<pubDate>Thu, 08 Jul 2010 09:06:56 +0000</pubDate>
		<dc:creator>Andrea Hildebrand</dc:creator>
				<category><![CDATA[Css Hacks]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[hover]]></category>
		<category><![CDATA[style]]></category>
		<category><![CDATA[table]]></category>

		<guid isPermaLink="false">http://www.codeterrorizer.com/?p=258</guid>
		<description><![CDATA[tr:hover td{background:#9a9a9a}
Example



Related posts:CSS :hover Pseudo Class


Related posts:<ol><li><a href='http://www.codeterrorizer.com/css-hacks/css-hover-pseudo-class' rel='bookmark' title='Permanent Link: CSS :hover Pseudo Class'>CSS :hover Pseudo Class</a></li></ol>]]></description>
			<content:encoded><![CDATA[<p><span id="more-258"></span>tr:hover td{background:#9a9a9a}</p>
<p>Example</p>
<p><img class="alignnone size-full wp-image-272" title="table-hover" src="http://www.codeterrorizer.com/wp-content/uploads/2010/07/table-hover1.jpg" alt="table-hover" width="571" height="126" /></p>


<p>Related posts:<ol><li><a href='http://www.codeterrorizer.com/css-hacks/css-hover-pseudo-class' rel='bookmark' title='Permanent Link: CSS :hover Pseudo Class'>CSS :hover Pseudo Class</a></li></ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.codeterrorizer.com/css-hacks/hover-table-rows/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>CSS: numbered list</title>
		<link>http://www.codeterrorizer.com/css-hacks/numbered-list-css</link>
		<comments>http://www.codeterrorizer.com/css-hacks/numbered-list-css#comments</comments>
		<pubDate>Thu, 08 Jul 2010 08:53:10 +0000</pubDate>
		<dc:creator>Andrea Hildebrand</dc:creator>
				<category><![CDATA[Css Hacks]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[list]]></category>

		<guid isPermaLink="false">http://www.codeterrorizer.com/?p=244</guid>
		<description><![CDATA[
ol li:before {content: counters(item, &#8220;.&#8221;)&#8221;. &#8220;; counter-increment:item}
ol {counter-reset: item}
ol li {display: block}
Put this CSS snippet at the bottom of your stylesheet!!! Otherwise, all the following CSS commands will be ignored in IE6 and IE7.
Example:



Related posts:Simple example on how to search a list with jQueryitalic font-style causes oversized divs in IE6CSS: hover table rows


Related posts:<ol><li><a href='http://www.codeterrorizer.com/jquery/simple-example-on-how-to-search-a-list-with-jquery' rel='bookmark' title='Permanent Link: Simple example on how to search a list with jQuery'>Simple example on how to search a list with jQuery</a></li><li><a href='http://www.codeterrorizer.com/css-hacks/italic-font-style-causes-oversized-divs-in-ie6' rel='bookmark' title='Permanent Link: italic font-style causes oversized divs in IE6'>italic font-style causes oversized divs in IE6</a></li><li><a href='http://www.codeterrorizer.com/css-hacks/hover-table-rows' rel='bookmark' title='Permanent Link: CSS: hover table rows'>CSS: hover table rows</a></li></ol>]]></description>
			<content:encoded><![CDATA[<p><span id="more-244"></span></p>
<p>ol li:before {content: counters(item, &#8220;.&#8221;)&#8221;. &#8220;; counter-increment:item}<br />
ol {counter-reset: item}<br />
ol li {display: block}</p>
<p>Put this CSS snippet at the bottom of your stylesheet!!! Otherwise, all the following CSS commands will be ignored in IE6 and IE7.</p>
<p>Example:<br />
<img class="size-full wp-image-245 alignnone" title="numbered-list" src="http://www.codeterrorizer.com/wp-content/uploads/2010/07/numbered-list.jpg" alt="numbered-list" width="390" height="361" /></p>


<p>Related posts:<ol><li><a href='http://www.codeterrorizer.com/jquery/simple-example-on-how-to-search-a-list-with-jquery' rel='bookmark' title='Permanent Link: Simple example on how to search a list with jQuery'>Simple example on how to search a list with jQuery</a></li><li><a href='http://www.codeterrorizer.com/css-hacks/italic-font-style-causes-oversized-divs-in-ie6' rel='bookmark' title='Permanent Link: italic font-style causes oversized divs in IE6'>italic font-style causes oversized divs in IE6</a></li><li><a href='http://www.codeterrorizer.com/css-hacks/hover-table-rows' rel='bookmark' title='Permanent Link: CSS: hover table rows'>CSS: hover table rows</a></li></ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.codeterrorizer.com/css-hacks/numbered-list-css/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Typo3 Multidomain RealURL</title>
		<link>http://www.codeterrorizer.com/typoscript/typo3-multidomain-realurl</link>
		<comments>http://www.codeterrorizer.com/typoscript/typo3-multidomain-realurl#comments</comments>
		<pubDate>Fri, 26 Mar 2010 14:30:42 +0000</pubDate>
		<dc:creator>Markus Bäck</dc:creator>
				<category><![CDATA[t3 extension development]]></category>
		<category><![CDATA[typoscript]]></category>
		<category><![CDATA[Typo3 Multidomain]]></category>
		<category><![CDATA[Typo3 Multidomain RealURL]]></category>
		<category><![CDATA[typscript]]></category>

		<guid isPermaLink="false">http://www.codeterrorizer.com/?p=233</guid>
		<description><![CDATA[Ever installed the RealURL Extension on a Multidomain Typo3 Installation and had difficulties running it?
Here you can find a short tutorial how to set it up right.

Open typo3conf/localconf.php and add following lines:

// realUrl Domains
$aPID = array(
'www.domain.com' =&#62; '1',
'www.domain2.com' =&#62; '2'
);

After add following to typo3conf/realurl_autoconf.php:

'pagePath' =&#62; array(
'type' =&#62; 'user',
'userFunc' =&#62; 'EXT:realurl/class.tx_realurl_advanced.php:&#38;tx_realurl_advanced-&#62;main',
'spaceCharacter' =&#62; '-',
'languageGetVar' =&#62; 'L',
'expireDays' =&#62; Read More


Related posts:<ol><li><a href='http://www.codeterrorizer.com/typoscript/typo3-typoscript-felogin-e-mail-sender' rel='bookmark' title='Permanent Link: Typo3 Typoscript felogin E-Mail sender'>Typo3 Typoscript felogin E-Mail sender</a></li><li><a href='http://www.codeterrorizer.com/php/typo3-flexform-outsourcing-language-for-your-flexform' rel='bookmark' title='Permanent Link: Typo3 Extension Flexform, outsourcing Language Files for your flexform'>Typo3 Extension Flexform, outsourcing Language Files for your flexform</a></li><li><a href='http://www.codeterrorizer.com/t3-extension-development/simple-image-processing' rel='bookmark' title='Permanent Link: Typo3 image processing'>Typo3 image processing</a></li></ol>]]></description>
			<content:encoded><![CDATA[<p>Ever installed the RealURL Extension on a Multidomain Typo3 Installation and had difficulties running it?<br />
Here you can find a short tutorial how to set it up right.</p>
<p><span id="more-233"></span></p>
<p>Open typo3conf/localconf.php and add following lines:</p>
<pre class="brush: php;">
// realUrl Domains
$aPID = array(
'www.domain.com' =&gt; '1',
'www.domain2.com' =&gt; '2'
);
</pre>
<p>After add following to typo3conf/realurl_autoconf.php:</p>
<pre class="brush: php;">
'pagePath' =&gt; array(
'type' =&gt; 'user',
'userFunc' =&gt; 'EXT:realurl/class.tx_realurl_advanced.php:&amp;tx_realurl_advanced-&gt;main',
'spaceCharacter' =&gt; '-',
'languageGetVar' =&gt; 'L',
'expireDays' =&gt; 3,
//'rootpage_id' =&gt; '1',
'rootpage_id' =&gt; $aPID[$_SERVER['HTTP_HOST']],
'disablePathCache' =&gt; 1,
'postVarSet_failureMode' =&gt; '',
),
</pre>
<p>After you edited realUrl_autoconf.php and localconf.php everything should work smoothly.</p>
<p>Additionaly you should prepare your .htacces as follows:</p>
<pre class="brush: plain;">
RewriteCond %{HTTP_HOST} ^domain.com$ [NC]
RewriteRule ^(.*)$ http://www.domain.com/$1 [QSA,R=301,L]

RewriteCond %{HTTP_HOST} ^domain2.com$ [NC]
RewriteRule ^(.*) http://www.domain2.com/$1 [QSA,L,R=301]
</pre>
<p>Enjoy</p>


<p>Related posts:<ol><li><a href='http://www.codeterrorizer.com/typoscript/typo3-typoscript-felogin-e-mail-sender' rel='bookmark' title='Permanent Link: Typo3 Typoscript felogin E-Mail sender'>Typo3 Typoscript felogin E-Mail sender</a></li><li><a href='http://www.codeterrorizer.com/php/typo3-flexform-outsourcing-language-for-your-flexform' rel='bookmark' title='Permanent Link: Typo3 Extension Flexform, outsourcing Language Files for your flexform'>Typo3 Extension Flexform, outsourcing Language Files for your flexform</a></li><li><a href='http://www.codeterrorizer.com/t3-extension-development/simple-image-processing' rel='bookmark' title='Permanent Link: Typo3 image processing'>Typo3 image processing</a></li></ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.codeterrorizer.com/typoscript/typo3-multidomain-realurl/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Typo3 Typoscript felogin E-Mail sender</title>
		<link>http://www.codeterrorizer.com/typoscript/typo3-typoscript-felogin-e-mail-sender</link>
		<comments>http://www.codeterrorizer.com/typoscript/typo3-typoscript-felogin-e-mail-sender#comments</comments>
		<pubDate>Wed, 17 Mar 2010 07:17:34 +0000</pubDate>
		<dc:creator>Christian Koch</dc:creator>
				<category><![CDATA[typoscript]]></category>
		<category><![CDATA[felogin mail]]></category>
		<category><![CDATA[felogin replyto]]></category>
		<category><![CDATA[felogin sender]]></category>
		<category><![CDATA[ts]]></category>

		<guid isPermaLink="false">http://www.codeterrorizer.com/?p=230</guid>
		<description><![CDATA[Ever wondered how to change the E-Mail Sender, Reply-To and Sender Name for felogin with TypoScript that you receive with Mails for forget Password?

Following should do the trick.
plugin.tx_felogin_pi1 {
	email_from = no-reply@domain.tld
	email_fromName = www.domain.tld
	replyTo = info@domain.tld
}


Related posts:PHP Class MailTypo3 Multidomain RealURLTypo3 Dev: Get Base URL in Extension


Related posts:<ol><li><a href='http://www.codeterrorizer.com/php/php-class-mail' rel='bookmark' title='Permanent Link: PHP Class Mail'>PHP Class Mail</a></li><li><a href='http://www.codeterrorizer.com/typoscript/typo3-multidomain-realurl' rel='bookmark' title='Permanent Link: Typo3 Multidomain RealURL'>Typo3 Multidomain RealURL</a></li><li><a href='http://www.codeterrorizer.com/typoscript/typo3-dev-get-base-url-in-extension' rel='bookmark' title='Permanent Link: Typo3 Dev: Get Base URL in Extension'>Typo3 Dev: Get Base URL in Extension</a></li></ol>]]></description>
			<content:encoded><![CDATA[<p>Ever wondered how to change the E-Mail Sender, Reply-To and Sender Name for felogin with TypoScript that you receive with Mails for forget Password?</p>
<p><span id="more-230"></span></p>
<p>Following should do the trick.</p>
<p>plugin.tx_felogin_pi1 {<br />
	email_from = no-reply@domain.tld<br />
	email_fromName = www.domain.tld<br />
	replyTo = info@domain.tld<br />
}</p>


<p>Related posts:<ol><li><a href='http://www.codeterrorizer.com/php/php-class-mail' rel='bookmark' title='Permanent Link: PHP Class Mail'>PHP Class Mail</a></li><li><a href='http://www.codeterrorizer.com/typoscript/typo3-multidomain-realurl' rel='bookmark' title='Permanent Link: Typo3 Multidomain RealURL'>Typo3 Multidomain RealURL</a></li><li><a href='http://www.codeterrorizer.com/typoscript/typo3-dev-get-base-url-in-extension' rel='bookmark' title='Permanent Link: Typo3 Dev: Get Base URL in Extension'>Typo3 Dev: Get Base URL in Extension</a></li></ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.codeterrorizer.com/typoscript/typo3-typoscript-felogin-e-mail-sender/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Simple example on how to search a list with jQuery</title>
		<link>http://www.codeterrorizer.com/jquery/simple-example-on-how-to-search-a-list-with-jquery</link>
		<comments>http://www.codeterrorizer.com/jquery/simple-example-on-how-to-search-a-list-with-jquery#comments</comments>
		<pubDate>Mon, 08 Mar 2010 20:48:20 +0000</pubDate>
		<dc:creator>Christian Koch</dc:creator>
				<category><![CDATA[jquery]]></category>
		<category><![CDATA[jquery li]]></category>
		<category><![CDATA[match]]></category>
		<category><![CDATA[regexp]]></category>
		<category><![CDATA[replace]]></category>
		<category><![CDATA[search list]]></category>
		<category><![CDATA[search ul]]></category>
		<category><![CDATA[ul li]]></category>

		<guid isPermaLink="false">http://www.codeterrorizer.com/?p=217</guid>
		<description><![CDATA[How to create a simple List Search with basic jQuery Functions.

First we need to create a simple unordered list for this example:

&#60;!DOCTYPE html PUBLIC &#34;-//W3C//DTD HTML 4.01 Transitional//EN&#34; &#34;http://www.w3.org/TR/html4/loose.dtd&#34;&#62;
&#60;html&#62;
&#60;head&#62;
	&#60;meta http-equiv=&#34;Content-Type&#34; content=&#34;text/html; charset=ISO-8859-1&#34;&#62;
	&#60;title&#62;Insert title here&#60;/title&#62;
	&#60;style type=&#34;text/css&#34;&#62;
		body{margin:0;padding:0}
		ul.search-list{list-style:none;margin:0;padding:0}
	&#60;/style&#62;
&#60;/head&#62;
&#60;body&#62;
	&#60;label for=&#34;search&#34;&#62;Search&#60;/label&#62;
	&#60;input type=&#34;text&#34; id=&#34;search&#34; name=&#34;searchword&#34; value=&#34;&#34; /&#62;
	&#60;ul class=&#34;search-list&#34;&#62;
		&#60;li&#62;eins&#60;/li&#62;
		&#60;li&#62;zwei&#60;/li&#62;
		&#60;li&#62;drei&#60;/li&#62;
		&#60;li&#62;vier&#60;/li&#62;
		&#60;li&#62;f&#38;uuml;nf&#60;/li&#62;
		&#60;li&#62;sechs&#60;/li&#62;
	&#60;/ul&#62;
&#60;/body&#62;
&#60;/html&#62;

Add the current jQuery Library into the header part. I use Googles jQuery API Read More


Related posts:<ol><li><a href='http://www.codeterrorizer.com/css-hacks/css-hover-pseudo-class' rel='bookmark' title='Permanent Link: CSS :hover Pseudo Class'>CSS :hover Pseudo Class</a></li><li><a href='http://www.codeterrorizer.com/css-hacks/numbered-list-css' rel='bookmark' title='Permanent Link: CSS: numbered list'>CSS: numbered list</a></li><li><a href='http://www.codeterrorizer.com/php/php-class-mail' rel='bookmark' title='Permanent Link: PHP Class Mail'>PHP Class Mail</a></li></ol>]]></description>
			<content:encoded><![CDATA[<p>How to create a simple List Search with basic jQuery Functions.</p>
<p><span id="more-217"></span></p>
<p>First we need to create a simple unordered list for this example:</p>
<pre class="brush: xml;">
&lt;!DOCTYPE html PUBLIC &quot;-//W3C//DTD HTML 4.01 Transitional//EN&quot; &quot;http://www.w3.org/TR/html4/loose.dtd&quot;&gt;
&lt;html&gt;
&lt;head&gt;
	&lt;meta http-equiv=&quot;Content-Type&quot; content=&quot;text/html; charset=ISO-8859-1&quot;&gt;
	&lt;title&gt;Insert title here&lt;/title&gt;
	&lt;style type=&quot;text/css&quot;&gt;
		body{margin:0;padding:0}
		ul.search-list{list-style:none;margin:0;padding:0}
	&lt;/style&gt;
&lt;/head&gt;
&lt;body&gt;
	&lt;label for=&quot;search&quot;&gt;Search&lt;/label&gt;
	&lt;input type=&quot;text&quot; id=&quot;search&quot; name=&quot;searchword&quot; value=&quot;&quot; /&gt;
	&lt;ul class=&quot;search-list&quot;&gt;
		&lt;li&gt;eins&lt;/li&gt;
		&lt;li&gt;zwei&lt;/li&gt;
		&lt;li&gt;drei&lt;/li&gt;
		&lt;li&gt;vier&lt;/li&gt;
		&lt;li&gt;f&amp;uuml;nf&lt;/li&gt;
		&lt;li&gt;sechs&lt;/li&gt;
	&lt;/ul&gt;
&lt;/body&gt;
&lt;/html&gt;
</pre>
<p>Add the current jQuery Library into the header part. I use Googles jQuery API in most of my projects to keep the transfer off my servers. I suggest the same for you if you are looking for performance.</p>
<pre class="brush: jscript;">
	&lt;script type=&quot;text/javascript&quot; src=&quot;http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js&quot;&gt;&lt;/script&gt;
</pre>
<p>To catch all changes from the search field with id &#8220;search&#8221; I am going to bind the the change keyup event to the id.</p>
<pre class="brush: jscript;">
$('#search').bind(&quot;change keyup&quot;, function() {
});
</pre>
<p>Going on I check how many letters the user inserted, this value I set to 2. Play with this as you like.</p>
<pre class="brush: jscript;">
searchWord = $(this).val();
if (searchWord.length &gt; 2) {
}
</pre>
<p>So, I start search the list as soon as the user inserted at least 3 letters.</p>
<p>To finally search the list I loop thru the list with jQuery&#8217;s each function and use their match function on each list item text.</p>
<pre class="brush: jscript;">
$('ul.search-list li').each(function() {
	text = $(this).text();
	if (text.match(searchWord)) {
		// Jipieh found one match, now do something with the current list item.
		// In my case I mark the background of the list item yellow.
		$(this).css('background-color', 'yellow');
	}
});
</pre>
<p>Just using match with the search string will not find case insensitive matches. Simply prepare the statement with RegExp as follows.</p>
<pre class="brush: jscript;">
// 'i' stands for case insensitive
if (text.match(RegExp(searchWord, 'i'))) {
</pre>
<p>Now finally the whole example at once <img src='http://www.codeterrorizer.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<pre class="brush: xml;">
&lt;!DOCTYPE html PUBLIC &quot;-//W3C//DTD HTML 4.01 Transitional//EN&quot; &quot;http://www.w3.org/TR/html4/loose.dtd&quot;&gt;
&lt;html&gt;
&lt;head&gt;
	&lt;meta http-equiv=&quot;Content-Type&quot; content=&quot;text/html; charset=ISO-8859-1&quot;&gt;
	&lt;title&gt;Insert title here&lt;/title&gt;
	&lt;script type=&quot;text/javascript&quot; src=&quot;http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js&quot;&gt;&lt;/script&gt;
	&lt;style type=&quot;text/css&quot;&gt;
		body{margin:0;padding:0}
		ul.search-list{list-style:none;margin:0;padding:0}
	&lt;/style&gt;
	&lt;script type=&quot;text/javascript&quot;&gt;
	$(document).ready(function(){
		//$('.search-list')
		$('#search').bind(&quot;change keyup&quot;, function() {
			searchWord = $(this).val();
			if (searchWord.length &gt;= 3) {
				$('ul.search-list li').each(function() {
					text = $(this).text();
					if (text.match(RegExp(searchWord, 'i'))) {
						$(this).css('background-color', 'yellow');
					}
				});
			}
		});
	});
	&lt;/script&gt;
&lt;/head&gt;
&lt;body&gt;
	&lt;label for=&quot;search&quot;&gt;Search&lt;/label&gt;
	&lt;input type=&quot;text&quot; id=&quot;search&quot; name=&quot;searchword&quot; value=&quot;&quot; /&gt;
	&lt;ul class=&quot;search-list&quot;&gt;
		&lt;li&gt;eins&lt;/li&gt;
		&lt;li&gt;zwei&lt;/li&gt;
		&lt;li&gt;drei&lt;/li&gt;
		&lt;li&gt;vier&lt;/li&gt;
		&lt;li&gt;f&amp;uuml;nf&lt;/li&gt;
		&lt;li&gt;sechs&lt;/li&gt;
	&lt;/ul&gt;
&lt;/body&gt;
&lt;/html&gt;
</pre>
<p>If this is not enough you also could just wrap the matched subtext with a background, simply change your js:</p>
<pre class="brush: jscript;">
if (searchWord.length &gt;= 1) {
	$('ul.search-list li').each(function(i, data) {
		text = $(this).text();
		if (text.match(RegExp(searchWord, 'i'))) {
			newHTML = text.replace(RegExp(searchWord), '&lt;span style=&quot;background:yellow&quot;&gt;'+searchWord+'&lt;/span&gt;');
			$('ul.search-list li:eq('+i+')').html(newHTML);
		}
	});
}
</pre>
<p>I suggest that in both cases you are also not searching just once, so you have to reset the last search results.<br />
With the first whole list item background example simply add one line:</p>
<pre class="brush: jscript;">
$('#search').bind(&quot;change keyup&quot;, function() {
	searchWord = $(this).val();
	if (searchWord.length &gt;= 1) {
		// this is new <img src='http://www.codeterrorizer.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  ... reset background
		$('ul.search-list li').css('background-color', 'white');
			$('ul.search-list li').each(function(i, data) {
			text = $(this).text();
			if (text.match(RegExp(searchWord, 'i'))) {
				$(this).css('background-color', 'yellow');
			}
		});
	}
});
</pre>
<p>With the snippet that just marks the specified search substring do this:</p>
<pre class="brush: jscript;">
$('#search').bind(&quot;change keyup&quot;, function() {
	searchWord = $(this).val();
	if (searchWord.length &gt;= 1) {
		// did it quick and dirty with class
		$('ul.search-list li span.mark-search-result').attr('background-color', 'white');

		$('ul.search-list li').each(function(i, data) {
			text = $(this).text();
			if (text.match(RegExp(searchWord, 'i'))) {
				newHTML = text.replace(RegExp(searchWord), '&lt;span style=&quot;background:yellow&quot; class=&quot;mark-search-result&quot;&gt;'+searchWord+'&lt;/span&gt;');
				$('ul.search-list li:eq('+i+')').html(newHTML);
			}
		});
	}
});
</pre>
<p>So that&#8217;s it, you could ofc ourse hide elemnts that don&#8217;t match and show them again or make whatever you like <img src='http://www.codeterrorizer.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>


<p>Related posts:<ol><li><a href='http://www.codeterrorizer.com/css-hacks/css-hover-pseudo-class' rel='bookmark' title='Permanent Link: CSS :hover Pseudo Class'>CSS :hover Pseudo Class</a></li><li><a href='http://www.codeterrorizer.com/css-hacks/numbered-list-css' rel='bookmark' title='Permanent Link: CSS: numbered list'>CSS: numbered list</a></li><li><a href='http://www.codeterrorizer.com/php/php-class-mail' rel='bookmark' title='Permanent Link: PHP Class Mail'>PHP Class Mail</a></li></ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.codeterrorizer.com/jquery/simple-example-on-how-to-search-a-list-with-jquery/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Typo3 Extension Flexform, outsourcing Language Files for your flexform</title>
		<link>http://www.codeterrorizer.com/php/typo3-flexform-outsourcing-language-for-your-flexform</link>
		<comments>http://www.codeterrorizer.com/php/typo3-flexform-outsourcing-language-for-your-flexform#comments</comments>
		<pubDate>Fri, 29 Jan 2010 16:17:53 +0000</pubDate>
		<dc:creator>Christian Koch</dc:creator>
				<category><![CDATA[Flexform]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[t3 extension development]]></category>
		<category><![CDATA[language]]></category>
		<category><![CDATA[typo3]]></category>

		<guid isPermaLink="false">http://www.codeterrorizer.com/?p=211</guid>
		<description><![CDATA[Maybe you have seen it in my last short tutorial &#8220;Typo3 Extension Flexform onchange reload&#8221; and wondered what I am doing there with

&#60;sheetTitle&#62;LLL:EXT:extension/res/lang/flexform.xml:sheet_general&#60;/sheetTitle&#62;


What I am doing there is simple, I put all my translations in a different folder in res/lib/flexform.xml under my Exteion directory.
flexform.xml looks just like every other language.xml:

&#60;?xml version=&#34;1.0&#34; encoding=&#34;utf-8&#34; standalone=&#34;yes&#34; ?&#62;
&#60;T3locallang&#62;
  Read More


Related posts:<ol><li><a href='http://www.codeterrorizer.com/php/typo3-extension-flexform-onchange-reload' rel='bookmark' title='Permanent Link: Typo3 Extension Flexform onchange reload'>Typo3 Extension Flexform onchange reload</a></li><li><a href='http://www.codeterrorizer.com/typoscript/typo3-multidomain-realurl' rel='bookmark' title='Permanent Link: Typo3 Multidomain RealURL'>Typo3 Multidomain RealURL</a></li><li><a href='http://www.codeterrorizer.com/t3-extension-development/simple-image-processing' rel='bookmark' title='Permanent Link: Typo3 image processing'>Typo3 image processing</a></li></ol>]]></description>
			<content:encoded><![CDATA[<p>Maybe you have seen it in my last short tutorial &#8220;<a href="http://www.codeterrorizer.com/php/typo3-extension-flexform-onchange-reload" title="Typo3 Extension Flexform onchange reload">Typo3 Extension Flexform onchange reload</a>&#8221; and wondered what I am doing there with</p>
<pre class="brush: xml;">
&lt;sheetTitle&gt;LLL:EXT:extension/res/lang/flexform.xml:sheet_general&lt;/sheetTitle&gt;
</pre>
<p><span id="more-211"></span></p>
<p>What I am doing there is simple, I put all my translations in a different folder in res/lib/flexform.xml under my Exteion directory.</p>
<p>flexform.xml looks just like every other language.xml:</p>
<pre class="brush: xml;">
&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot; standalone=&quot;yes&quot; ?&gt;
&lt;T3locallang&gt;
        &lt;meta type=&quot;array&quot;&gt;
                &lt;type&gt;module&lt;/type&gt;
                &lt;description&gt;&lt;/description&gt;
        &lt;/meta&gt;
        &lt;data type=&quot;array&quot;&gt;
                &lt;languageKey index=&quot;default&quot; type=&quot;array&quot;&gt;
                        &lt;label index=&quot;options&quot;&gt;Options&lt;/label&gt;
                        &lt;label index=&quot;backgroundImage&quot;&gt;Background image&lt;/label&gt;
                &lt;/languageKey&gt;
                &lt;languageKey index=&quot;de&quot; type=&quot;array&quot;&gt;
                        &lt;label index=&quot;options&quot;&gt;Optionen&lt;/label&gt;
                        &lt;label index=&quot;backgroundImage&quot;&gt;Hintergrund Bild&lt;/label&gt;
                &lt;/languageKey&gt;
        &lt;/data&gt;
&lt;/T3locallang&gt;
</pre>


<p>Related posts:<ol><li><a href='http://www.codeterrorizer.com/php/typo3-extension-flexform-onchange-reload' rel='bookmark' title='Permanent Link: Typo3 Extension Flexform onchange reload'>Typo3 Extension Flexform onchange reload</a></li><li><a href='http://www.codeterrorizer.com/typoscript/typo3-multidomain-realurl' rel='bookmark' title='Permanent Link: Typo3 Multidomain RealURL'>Typo3 Multidomain RealURL</a></li><li><a href='http://www.codeterrorizer.com/t3-extension-development/simple-image-processing' rel='bookmark' title='Permanent Link: Typo3 image processing'>Typo3 image processing</a></li></ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.codeterrorizer.com/php/typo3-flexform-outsourcing-language-for-your-flexform/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Typo3 Extension Flexform onchange reload</title>
		<link>http://www.codeterrorizer.com/php/typo3-extension-flexform-onchange-reload</link>
		<comments>http://www.codeterrorizer.com/php/typo3-extension-flexform-onchange-reload#comments</comments>
		<pubDate>Fri, 29 Jan 2010 16:05:16 +0000</pubDate>
		<dc:creator>Christian Koch</dc:creator>
				<category><![CDATA[Flexform]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[t3 extension development]]></category>
		<category><![CDATA[onchange]]></category>
		<category><![CDATA[reload]]></category>
		<category><![CDATA[typo3]]></category>

		<guid isPermaLink="false">http://www.codeterrorizer.com/?p=206</guid>
		<description><![CDATA[You want your typo flexform to reload after the backend user selects something.

Add the reload before your config Tag:

&#60;T3DataStructure&#62;
  &#60;sheets&#62;
    &#60;sDEF&#62;
      &#60;ROOT&#62;
        &#60;TCEforms&#62;
          &#60;sheetTitle&#62;LLL:EXT:extension/res/lang/flexform.xml:sheet_general&#60;/sheetTitle&#62;
       Read More


Related posts:<ol><li><a href='http://www.codeterrorizer.com/php/typo3-flexform-outsourcing-language-for-your-flexform' rel='bookmark' title='Permanent Link: Typo3 Extension Flexform, outsourcing Language Files for your flexform'>Typo3 Extension Flexform, outsourcing Language Files for your flexform</a></li><li><a href='http://www.codeterrorizer.com/typoscript/typo3-dev-get-base-url-in-extension' rel='bookmark' title='Permanent Link: Typo3 Dev: Get Base URL in Extension'>Typo3 Dev: Get Base URL in Extension</a></li><li><a href='http://www.codeterrorizer.com/typoscript/typo3-multidomain-realurl' rel='bookmark' title='Permanent Link: Typo3 Multidomain RealURL'>Typo3 Multidomain RealURL</a></li></ol>]]></description>
			<content:encoded><![CDATA[<p>You want your typo flexform to reload after the backend user selects something.</p>
<p><span id="more-206"></span><br />
Add the <onChange>reload</onChange> before your config Tag:</p>
<pre class="brush: xml;">
&lt;T3DataStructure&gt;
  &lt;sheets&gt;
    &lt;sDEF&gt;
      &lt;ROOT&gt;
        &lt;TCEforms&gt;
          &lt;sheetTitle&gt;LLL:EXT:extension/res/lang/flexform.xml:sheet_general&lt;/sheetTitle&gt;
        &lt;/TCEforms&gt;
        &lt;type&gt;array&lt;/type&gt;
        &lt;el&gt;
          &lt;topCategory&gt;
            &lt;TCEforms&gt;
              &lt;label&gt;LLL:EXT:extension/res/lang/flexform.xml:topCategory&lt;/label&gt;
              &lt;onChange&gt;reload&lt;/onChange&gt;
              &lt;config&gt;
                &lt;type&gt;group&lt;/type&gt;
                &lt;internal_type&gt;db&lt;/internal_type&gt;
                &lt;allowed&gt;pages&lt;/allowed&gt;
                &lt;size&gt;1&lt;/size&gt;
                &lt;minitems&gt;1&lt;/minitems&gt;
                &lt;maxitems&gt;1&lt;/maxitems&gt;
              &lt;/config&gt;
            &lt;/TCEforms&gt;
          &lt;/topCategory&gt;
        &lt;/el&gt;
      &lt;/ROOT&gt;
    &lt;/sDEF&gt;
  &lt;/sheets&gt;
&lt;/T3DataStructure&gt;
</pre>


<p>Related posts:<ol><li><a href='http://www.codeterrorizer.com/php/typo3-flexform-outsourcing-language-for-your-flexform' rel='bookmark' title='Permanent Link: Typo3 Extension Flexform, outsourcing Language Files for your flexform'>Typo3 Extension Flexform, outsourcing Language Files for your flexform</a></li><li><a href='http://www.codeterrorizer.com/typoscript/typo3-dev-get-base-url-in-extension' rel='bookmark' title='Permanent Link: Typo3 Dev: Get Base URL in Extension'>Typo3 Dev: Get Base URL in Extension</a></li><li><a href='http://www.codeterrorizer.com/typoscript/typo3-multidomain-realurl' rel='bookmark' title='Permanent Link: Typo3 Multidomain RealURL'>Typo3 Multidomain RealURL</a></li></ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.codeterrorizer.com/php/typo3-extension-flexform-onchange-reload/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>php.ini short tag in newer PHP versions disabled</title>
		<link>http://www.codeterrorizer.com/php/php-ini-short-tag-in-newer-php-versions-disabled</link>
		<comments>http://www.codeterrorizer.com/php/php-ini-short-tag-in-newer-php-versions-disabled#comments</comments>
		<pubDate>Mon, 11 Jan 2010 12:15:01 +0000</pubDate>
		<dc:creator>Christian Koch</dc:creator>
				<category><![CDATA[php]]></category>
		<category><![CDATA[php.ini]]></category>
		<category><![CDATA[short tag]]></category>
		<category><![CDATA[short_open_tag]]></category>
		<category><![CDATA[tag]]></category>

		<guid isPermaLink="false">http://www.codeterrorizer.com/?p=204</guid>
		<description><![CDATA[Simply enable short Tag&#8217;s like 


Related posts:<ol><li><a href='http://www.codeterrorizer.com/php/turn-off-deprecated-warnings' rel='bookmark' title='Permanent Link: Turn off Deprecated Warnings'>Turn off Deprecated Warnings</a></li></ol>]]></description>
			<content:encoded><![CDATA[<p>Simply enable short Tag&#8217;s like <? with:</p>
<p>short_open_tag = On</p>


<p>Related posts:<ol><li><a href='http://www.codeterrorizer.com/php/turn-off-deprecated-warnings' rel='bookmark' title='Permanent Link: Turn off Deprecated Warnings'>Turn off Deprecated Warnings</a></li></ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.codeterrorizer.com/php/php-ini-short-tag-in-newer-php-versions-disabled/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
