<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	>
<channel>
	<title>Comments on: Highlight Search Terms</title>
	<atom:link href="http://schinckel.net/2006/04/18/highlight-search-terms/feed/" rel="self" type="application/rss+xml" />
	<link>http://schinckel.net/2006/04/18/highlight-search-terms/</link>
	<description>Like a fortune cookie, only without the fortune, and not a cookie.</description>
	<pubDate>Fri, 10 Sep 2010 20:03:06 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6.5</generator>
		<item>
		<title>By: BinaryKitten</title>
		<link>http://schinckel.net/2006/04/18/highlight-search-terms/#comment-7432</link>
		<dc:creator>BinaryKitten</dc:creator>
		<pubDate>Thu, 19 Feb 2009 19:12:58 +0000</pubDate>
		<guid isPermaLink="false">http://schinckel.blogsome.com/2006/04/18/highlight-search-terms/#comment-7432</guid>
		<description>came across after searching for "Smarty Highlight".

Works Well but it's a little off..
&lt;code&gt;
{assign var='hilite' value="\\1"}
{assign var='regex' value="/(?![^)("&#124;cat:$smarty.request.s&#124;cat:")/i"}
{$content&#124;regex_replace:$regex:$hilite}
&lt;/code&gt;

This makes it case insensitive and will replace the found item with itself.. 

Just a thought...</description>
		<content:encoded><![CDATA[<p>came across after searching for &#8220;Smarty Highlight&#8221;.</p>
<p>Works Well but it&#8217;s a little off..<br />
<code><br />
{assign var='hilite' value="\\1"}<br />
{assign var='regex' value="/(?![^)("|cat:$smarty.request.s|cat:")/i"}<br />
{$content|regex_replace:$regex:$hilite}<br />
</code></p>
<p>This makes it case insensitive and will replace the found item with itself.. </p>
<p>Just a thought&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: juglar103</title>
		<link>http://schinckel.net/2006/04/18/highlight-search-terms/#comment-1196</link>
		<dc:creator>juglar103</dc:creator>
		<pubDate>Fri, 12 May 2006 13:38:30 +0000</pubDate>
		<guid isPermaLink="false">http://schinckel.blogsome.com/2006/04/18/highlight-search-terms/#comment-1196</guid>
		<description>Thank you very much.</description>
		<content:encoded><![CDATA[<p>Thank you very much.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Matthew Schinckel</title>
		<link>http://schinckel.net/2006/04/18/highlight-search-terms/#comment-1186</link>
		<dc:creator>Matthew Schinckel</dc:creator>
		<pubDate>Wed, 10 May 2006 03:14:01 +0000</pubDate>
		<guid isPermaLink="false">http://schinckel.blogsome.com/2006/04/18/highlight-search-terms/#comment-1186</guid>
		<description>You might be able to do this using the &lt;code&gt;{$content&#124;replace:"No posts made":"There are no posts that meet your search criteria"}&lt;/code&gt; trick.</description>
		<content:encoded><![CDATA[<p>You might be able to do this using the <code>{$content|replace:"No posts made":"There are no posts that meet your search criteria"}</code> trick.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: juglar103</title>
		<link>http://schinckel.net/2006/04/18/highlight-search-terms/#comment-1182</link>
		<dc:creator>juglar103</dc:creator>
		<pubDate>Tue, 09 May 2006 14:44:46 +0000</pubDate>
		<guid isPermaLink="false">http://schinckel.blogsome.com/2006/04/18/highlight-search-terms/#comment-1182</guid>
		<description>Hi Matt
One question off-topic.
Is it posible personalize the "error message"?:
Its mean: change "No posts made".
Thank you.</description>
		<content:encoded><![CDATA[<p>Hi Matt<br />
One question off-topic.<br />
Is it posible personalize the &#8220;error message&#8221;?:<br />
Its mean: change &#8220;No posts made&#8221;.<br />
Thank you.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Matthew Schinckel</title>
		<link>http://schinckel.net/2006/04/18/highlight-search-terms/#comment-1110</link>
		<dc:creator>Matthew Schinckel</dc:creator>
		<pubDate>Tue, 18 Apr 2006 15:43:15 +0000</pubDate>
		<guid isPermaLink="false">http://schinckel.blogsome.com/2006/04/18/highlight-search-terms/#comment-1110</guid>
		<description>bondage</description>
		<content:encoded><![CDATA[<p>bondage</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Matthew Schinckel</title>
		<link>http://schinckel.net/2006/04/18/highlight-search-terms/#comment-1109</link>
		<dc:creator>Matthew Schinckel</dc:creator>
		<pubDate>Tue, 18 Apr 2006 15:39:27 +0000</pubDate>
		<guid isPermaLink="false">http://schinckel.blogsome.com/2006/04/18/highlight-search-terms/#comment-1109</guid>
		<description>And now I get why it seemed to be breaking sometimes before: the plugin only works with referrers, not with the current URL for within-site searches.

Luckily, I've got the code for the plugin, so I'll try to fix it and give it back to the Blogsome team.

It should only be swapping a check around, so it checks first to see if there's an &lt;code&gt;&#38;s&lt;/code&gt; in the URL, and then the referrer if there isn't.</description>
		<content:encoded><![CDATA[<p>And now I get why it seemed to be breaking sometimes before: the plugin only works with referrers, not with the current URL for within-site searches.</p>
<p>Luckily, I&#8217;ve got the code for the plugin, so I&#8217;ll try to fix it and give it back to the Blogsome team.</p>
<p>It should only be swapping a check around, so it checks first to see if there&#8217;s an <code>&amp;s</code> in the URL, and then the referrer if there isn&#8217;t.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Matthew Schinckel</title>
		<link>http://schinckel.net/2006/04/18/highlight-search-terms/#comment-1108</link>
		<dc:creator>Matthew Schinckel</dc:creator>
		<pubDate>Tue, 18 Apr 2006 15:33:23 +0000</pubDate>
		<guid isPermaLink="false">http://schinckel.blogsome.com/2006/04/18/highlight-search-terms/#comment-1108</guid>
		<description>Too hard to do right now.  There doesn't seem to be a way to get back references, which are required to replace case-insensitive text with the altered original, rather than the query as it was entered.

That is, &lt;b&gt;&lt;em&gt;Search&lt;/em&gt;&lt;/b&gt; get replaced by &lt;code&gt;&#60;span class="hilite"&#62;search&#60;/span&#62;&lt;/code&gt; not &lt;code&gt;&#60;span class="hilite"&#62;Search&#60;/span&#62;&lt;/code&gt;.</description>
		<content:encoded><![CDATA[<p>Too hard to do right now.  There doesn&#8217;t seem to be a way to get back references, which are required to replace case-insensitive text with the altered original, rather than the query as it was entered.</p>
<p>That is, <b><em>Search</em></b> get replaced by <code>&lt;span class="hilite"&gt;search&lt;/span&gt;</code> not <code>&lt;span class="hilite"&gt;Search&lt;/span&gt;</code>.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Matthew Schinckel</title>
		<link>http://schinckel.net/2006/04/18/highlight-search-terms/#comment-1107</link>
		<dc:creator>Matthew Schinckel</dc:creator>
		<pubDate>Tue, 18 Apr 2006 15:06:01 +0000</pubDate>
		<guid isPermaLink="false">http://schinckel.blogsome.com/2006/04/18/highlight-search-terms/#comment-1107</guid>
		<description>Actually, I'm not so sure.  It continues to highlight terms you've searched for last time, so it gets confusing.

I'll rewrite it so it's a bit nicer.</description>
		<content:encoded><![CDATA[<p>Actually, I&#8217;m not so sure.  It continues to highlight terms you&#8217;ve searched for last time, so it gets confusing.</p>
<p>I&#8217;ll rewrite it so it&#8217;s a bit nicer.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Matthew Schinckel</title>
		<link>http://schinckel.net/2006/04/18/highlight-search-terms/#comment-1106</link>
		<dc:creator>Matthew Schinckel</dc:creator>
		<pubDate>Tue, 18 Apr 2006 15:00:44 +0000</pubDate>
		<guid isPermaLink="false">http://schinckel.blogsome.com/2006/04/18/highlight-search-terms/#comment-1106</guid>
		<description>Okay, now it's weird.  It is already highlighting search terms from Google, even thoughâ€¦

Aha!  Moment of brilliance!  I'd activated the Search Hilite plugin, and this was colouring my results.  I must have chosen the same method of indicating the hilight as them!

I'll be honest.  That one is better than mine! </description>
		<content:encoded><![CDATA[<p>Okay, now it&#8217;s weird.  It is already highlighting search terms from Google, even thoughâ€¦</p>
<p>Aha!  Moment of brilliance!  I&#8217;d activated the Search Hilite plugin, and this was colouring my results.  I must have chosen the same method of indicating the hilight as them!</p>
<p>I&#8217;ll be honest.  That one is better than mine!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Matthew Schinckel</title>
		<link>http://schinckel.net/2006/04/18/highlight-search-terms/#comment-1105</link>
		<dc:creator>Matthew Schinckel</dc:creator>
		<pubDate>Tue, 18 Apr 2006 14:55:53 +0000</pubDate>
		<guid isPermaLink="false">http://schinckel.blogsome.com/2006/04/18/highlight-search-terms/#comment-1105</guid>
		<description>And I may have been wrong with regard to case sensitivity.  Apparently, &lt;strong&gt;Search&lt;/strong&gt; matches &lt;em&gt;Search&lt;/em&gt; and &lt;em&gt;search&lt;/em&gt;, but &lt;strong&gt;search&lt;/strong&gt; doesn't match &lt;em&gt;Search&lt;/em&gt;, only &lt;em&gt;search&lt;/em&gt;.

Still, I'll leave it implemented for now.  Might be useful.

I could also check the referrer, and if it's a search engine, highlight their search terms too.</description>
		<content:encoded><![CDATA[<p>And I may have been wrong with regard to case sensitivity.  Apparently, <strong>Search</strong> matches <em>Search</em> and <em>search</em>, but <strong>search</strong> doesn&#8217;t match <em>Search</em>, only <em>search</em>.</p>
<p>Still, I&#8217;ll leave it implemented for now.  Might be useful.</p>
<p>I could also check the referrer, and if it&#8217;s a search engine, highlight their search terms too.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
