<?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>Sentido Web &#187; search</title>
	<atom:link href="http://sentidoweb.com/tag/search/feed" rel="self" type="application/rss+xml" />
	<link>http://sentidoweb.com</link>
	<description>Desarrollo web, HTML, CSS, Javascript, PHP, MySQL</description>
	<lastBuildDate>Tue, 10 Apr 2012 01:02:09 +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>Modificar las búsquedas en WordPress</title>
		<link>http://sentidoweb.com/2011/01/05/modificar-las-busquedas-en-wordpress.php</link>
		<comments>http://sentidoweb.com/2011/01/05/modificar-las-busquedas-en-wordpress.php#comments</comments>
		<pubDate>Wed, 05 Jan 2011 03:24:11 +0000</pubDate>
		<dc:creator>displaynone</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[filter]]></category>
		<category><![CDATA[found_posts]]></category>
		<category><![CDATA[posts_results]]></category>
		<category><![CDATA[search]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://sentidoweb.com/?p=2661</guid>
		<description><![CDATA[Si queremos modificar las búsquedas que ofrece WordPress para que devuelva lo que nosotros queremos tan solo hay que hacer dos funciones para dos filtros: add_filter&#40;'posts_results', 'mi_search'&#41;; function mi_search&#40;$posts&#41; &#123; $s = get_query_var&#40;'s'&#41;; if &#40;condicion&#40;$s&#41;&#41; &#123; $posts = array&#40;&#41;; $paged = intval&#40;get_query_var&#40;'paged'&#41;&#41;; if &#40;$paged &#60; 1&#41; $paged = 1; $posts_per_page = intval&#40;get_query_var&#40;'posts_per_page'&#41;&#41;; $from = &#40;$paged-1&#41;*$posts_per_page; [...]]]></description>
			<content:encoded><![CDATA[<p>Si queremos modificar las búsquedas que ofrece WordPress para que devuelva lo que nosotros queremos tan solo hay que hacer dos funciones para dos filtros:</p>
<pre><code><pre class="php">add_filter<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'posts_results'</span>, <span style="color: #ff0000;">'mi_search'</span><span style="color: #66cc66;">&#41;</span>;
<span style="color: #000000; font-weight: bold;">function</span> mi_search<span style="color: #66cc66;">&#40;</span><span style="color: #3E6D8F;">$posts</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span>
  <span style="color: #3E6D8F;">$s</span> = get_query_var<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'s'</span><span style="color: #66cc66;">&#41;</span>;
  <span style="color: #723b00;">if</span> <span style="color: #66cc66;">&#40;</span>condicion<span style="color: #66cc66;">&#40;</span><span style="color: #3E6D8F;">$s</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span>
    <span style="color: #3E6D8F;">$posts</span> = <a href="http://www.php.net/array"><span style="color: #000066;">array</span></a><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
    <span style="color: #3E6D8F;">$paged</span> = <a href="http://www.php.net/intval"><span style="color: #000066;">intval</span></a><span style="color: #66cc66;">&#40;</span>get_query_var<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'paged'</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>;
    <span style="color: #723b00;">if</span> <span style="color: #66cc66;">&#40;</span><span style="color: #3E6D8F;">$paged</span> &lt; <span style="color: #cc66cc;">1</span><span style="color: #66cc66;">&#41;</span> <span style="color: #3E6D8F;">$paged</span> = <span style="color: #cc66cc;">1</span>;
    <span style="color: #3E6D8F;">$posts_per_page</span> = <a href="http://www.php.net/intval"><span style="color: #000066;">intval</span></a><span style="color: #66cc66;">&#40;</span>get_query_var<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'posts_per_page'</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>;
    <span style="color: #3E6D8F;">$from</span> = <span style="color: #66cc66;">&#40;</span><span style="color: #3E6D8F;">$paged</span>-<span style="color: #cc66cc;">1</span><span style="color: #66cc66;">&#41;</span>*<span style="color: #3E6D8F;">$posts_per_page</span>;
    <a href="http://www.php.net/global"><span style="color: #000066;">global</span></a> <span style="color: #3E6D8F;">$wpdb</span>;
    <span style="color: #3E6D8F;">$_posts</span> = <span style="color: #3E6D8F;">$wpdb</span>-&gt;<span style="color: #006600;">get_results</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">"select post_id from $wpdb-&gt;posts where loquesea order by post_id desc limit $from, $posts_per_page"</span><span style="color: #66cc66;">&#41;</span>;
    <span style="color: #723b00;">foreach</span><span style="color: #66cc66;">&#40;</span><span style="color: #3E6D8F;">$_posts</span> <span style="color: #723b00;">as</span> <span style="color: #3E6D8F;">$p</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span>
      <span style="color: #3E6D8F;">$posts</span><span style="color: #66cc66;">&#91;</span><span style="color: #66cc66;">&#93;</span> = get_post<span style="color: #66cc66;">&#40;</span><span style="color: #3E6D8F;">$p</span>-&gt;<span style="color: #006600;">post_id</span><span style="color: #66cc66;">&#41;</span>;
    <span style="color: #66cc66;">&#125;</span>
  <span style="color: #66cc66;">&#125;</span>
  <span style="color: #723b00;">return</span> <span style="color: #3E6D8F;">$posts</span>;
<span style="color: #66cc66;">&#125;</span>
&nbsp;
add_filter<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'found_posts'</span>, <span style="color: #ff0000;">'mi_found_posts'</span><span style="color: #66cc66;">&#41;</span>;
<span style="color: #000000; font-weight: bold;">function</span> mi_found_posts<span style="color: #66cc66;">&#40;</span><span style="color: #3E6D8F;">$n</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span>
  <span style="color: #3E6D8F;">$s</span> = get_query_var<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'s'</span><span style="color: #66cc66;">&#41;</span>;
  <span style="color: #723b00;">if</span> <span style="color: #66cc66;">&#40;</span>condicion<span style="color: #66cc66;">&#40;</span><span style="color: #3E6D8F;">$s</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span>
    <a href="http://www.php.net/global"><span style="color: #000066;">global</span></a> <span style="color: #3E6D8F;">$wpdb</span>;
    <span style="color: #3E6D8F;">$res</span> = <span style="color: #3E6D8F;">$wpdb</span>-&gt;<span style="color: #006600;">get_results</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">"select count(*) as n from $wpdb-&gt;posts where condicion "</span><span style="color: #66cc66;">&#41;</span>;
    <span style="color: #3E6D8F;">$n</span> = <span style="color: #3E6D8F;">$res</span><span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">0</span><span style="color: #66cc66;">&#93;</span>-&gt;<span style="color: #006600;">n</span>;
  <span style="color: #66cc66;">&#125;</span>
&nbsp;
  <span style="color: #723b00;">return</span> <span style="color: #3E6D8F;">$n</span>;
<span style="color: #66cc66;">&#125;</span></pre></code></pre>]]></content:encoded>
			<wfw:commentRss>http://sentidoweb.com/2011/01/05/modificar-las-busquedas-en-wordpress.php/feed</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Optimizing Search Functionality with Large JavaScript Arrays</title>
		<link>http://sentidoweb.com/2010/08/11/optimizing-search-functionality-with-large-javascript-arrays.php</link>
		<comments>http://sentidoweb.com/2010/08/11/optimizing-search-functionality-with-large-javascript-arrays.php#comments</comments>
		<pubDate>Wed, 11 Aug 2010 07:00:57 +0000</pubDate>
		<dc:creator>displaynone</dc:creator>
				<category><![CDATA[Javascript]]></category>
		<category><![CDATA[Quicklinks]]></category>
		<category><![CDATA[array]]></category>
		<category><![CDATA[search]]></category>

		<guid isPermaLink="false">http://scriptandstyle.com/submissions/optimizing-search-functionality-with-large-javascript-arrays</guid>
		<description><![CDATA[Processing arrays can take quite a few bit of time, this is something that can directly impacts the loading speed of your page and depend of the computer and the browser your users use. When you think that a typical users can load your website with a netbook , or an iphone for that matter, [...]]]></description>
			<content:encoded><![CDATA[Processing arrays can take quite a few bit of time, this is something  that can directly impacts the loading speed of your page and depend of  the computer and the browser your users use. When you think that a  typical users can load your website with a netbook , or an iphone for  that matter, speeding up search in large arrays can be a good way to  optimize your code &#8230;

<a title="Optimizing Search Functionality with Large JavaScript Arrays" href="http://scriptandstyle.com/submissions/optimizing-search-functionality-with-large-javascript-arrays">Post original</a>]]></content:encoded>
			<wfw:commentRss>http://sentidoweb.com/2010/08/11/optimizing-search-functionality-with-large-javascript-arrays.php/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>QuickSearch: filtro de contenido con jQuery</title>
		<link>http://sentidoweb.com/2008/10/24/quicksearch-filtro-de-contenido-con-jquery.php</link>
		<comments>http://sentidoweb.com/2008/10/24/quicksearch-filtro-de-contenido-con-jquery.php#comments</comments>
		<pubDate>Fri, 24 Oct 2008 19:45:00 +0000</pubDate>
		<dc:creator>displaynone</dc:creator>
				<category><![CDATA[Javascript]]></category>
		<category><![CDATA[filtro]]></category>
		<category><![CDATA[jquery]]></category>
		<category><![CDATA[quicksearch]]></category>
		<category><![CDATA[search]]></category>

		<guid isPermaLink="false">http://sentidoweb.com/2008/10/24/quicksearch-filtro-de-contenido-con-jquery.php</guid>
		<description><![CDATA[QuickSearch es una librería bastante interesante que permite filtrar el contenido de elementos que contengan cierto texto. Tan solo hay que pasar una lista de elemtos y estos los filtrará para mostrar solo aquellos que cumplan cierto filtro de texto. Se puede pasar lista de elementos (ul), párrafos, tablas, &#8230; Se le puede indicar el [...]]]></description>
			<content:encoded><![CDATA[<strong>QuickSearch</strong> es una librería bastante interesante que permite filtrar el contenido de elementos que contengan cierto texto. Tan solo hay que pasar una lista de elemtos y estos los filtrará para mostrar solo aquellos que cumplan cierto filtro de texto.
Se puede pasar lista de elementos (ul), párrafos, tablas, &#8230; Se le puede indicar el texto o la imagen que muestre que se está filtrando datos, indicar retraso, añadir clases css, &#8230;
<a href="http://rikrikrik.com/jquery/quicksearch/">QuickSearch</a>
Vía / <a href="http://www.webappers.com/2008/10/24/quicksearch-v20-filters-large-sets-of-data-really-quickly/">WebAppers</a>
]]></content:encoded>
			<wfw:commentRss>http://sentidoweb.com/2008/10/24/quicksearch-filtro-de-contenido-con-jquery.php/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Google Code Search</title>
		<link>http://sentidoweb.com/2006/10/05/google-code-search.php</link>
		<comments>http://sentidoweb.com/2006/10/05/google-code-search.php#comments</comments>
		<pubDate>Thu, 05 Oct 2006 16:20:00 +0000</pubDate>
		<dc:creator>displaynone</dc:creator>
				<category><![CDATA[Google]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[google code search]]></category>
		<category><![CDATA[search]]></category>

		<guid isPermaLink="false">http://sentidoweb.com/2006/10/05/google-code-search.php</guid>
		<description><![CDATA[Gracias Google, si antes eras imprescindible para mi trabajo diario (tardo menos en usarte para buscar la documentación de un paquete de Java, que irme al directorio donde tengo la documentación de Java y buscar la clase que quiero), ahora con tu nuevo buscador de código, creo que me vas a facilitar la vida enormemente. [...]]]></description>
			<content:encoded><![CDATA[<img alt="google_code_search.png" src="http://sentidoweb.com/img/2006/10/google_code_search.png" width="288" height="119" class="right"/>Gracias Google, si antes eras imprescindible para mi trabajo diario (tardo menos en usarte para buscar la documentación de un paquete de Java, que irme al directorio donde tengo la documentación de Java y buscar la clase que quiero), ahora con tu nuevo buscador de código, creo que me vas a facilitar la vida enormemente.
He visto que permites buscar partes de código, las cuales me ayudarán a resolver dudas que me surjan. En las búsquedas puedo usar expresiones regulares, y ya sabes lo que <a href="http://sentidoweb.com/2006/07/11/regulazy-una-ayuda-para-tus-expresiones-regulares.php">me gusta usarlas</a>. Y no solo eso, sino que además me permites buscar en tipos de ficheros (por ejemplo buscar en archivos javascript) o buscar en tipos de paquetes e incluso según la licencia de uso, aunque eso sí, me gustaría que me dijeras como podemos informarte de que en Sentido Web usamos licencia CC.
¡Ah! y si todo esto no fuera suficiente, también buscas en el código contenido en archivos zip, todo un detalle.
Sin más me despido y vuelvo a repetir mi gratitud.
<em>[Perdonad el tono 'sentimental' de la entrada, pero es que me he emocionado, antes usaba los grupos de Google, pero esto creo que está mucho mejor]</em>
<a href="http://www.google.com/codesearch">Google Code Search</a>
Vía / <a href="http://digg.com/programming/GOOGLE_Debuts_CODE_SEARCH_ENGINE">Digg</a>
]]></content:encoded>
			<wfw:commentRss>http://sentidoweb.com/2006/10/05/google-code-search.php/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

