<?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"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: How to add a search function to NextGen gallery wordpress plugin</title>
	<atom:link href="http://www.ikiru.ch/blog/2008/how-to-add-a-search-function-for-nextgen-gallery-wordpress-plugin/feed" rel="self" type="application/rss+xml" />
	<link>http://www.ikiru.ch/blog/2008/how-to-add-a-search-function-for-nextgen-gallery-wordpress-plugin</link>
	<description>Les aléas de la vie coutumière sont impénétrables</description>
	<lastBuildDate>Fri, 12 Mar 2010 09:21:42 +0100</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: cerafil</title>
		<link>http://www.ikiru.ch/blog/2008/how-to-add-a-search-function-for-nextgen-gallery-wordpress-plugin/comment-page-5#comment-168812</link>
		<dc:creator>cerafil</dc:creator>
		<pubDate>Wed, 03 Feb 2010 18:24:34 +0000</pubDate>
		<guid isPermaLink="false">http://www.ikiru.ch/blog/?p=651#comment-168812</guid>
		<description>Hello? Anybody? I really want to have the same search options as this site. It is wonderfull!</description>
		<content:encoded><![CDATA[<p>Hello? Anybody? I really want to have the same search options as this site. It is wonderfull!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Cerafil</title>
		<link>http://www.ikiru.ch/blog/2008/how-to-add-a-search-function-for-nextgen-gallery-wordpress-plugin/comment-page-5#comment-168589</link>
		<dc:creator>Cerafil</dc:creator>
		<pubDate>Fri, 29 Jan 2010 21:16:16 +0000</pubDate>
		<guid isPermaLink="false">http://www.ikiru.ch/blog/?p=651#comment-168589</guid>
		<description>This is it. Where should I add the code?

&lt;blockquote&gt;


&lt;form method=&quot;get&quot; class=&quot;searchform&quot; action=&quot;/&quot;&gt;



&lt;input type=&quot;text&quot; class=&quot;text inputblur&quot; value=&quot;&quot; name=&quot;s&quot; /&gt;


&lt;input name=&quot;submit&quot; value=&quot;Search&quot; type=&quot;image&quot; src=&quot;/images/magnifier2-gray.gif&quot; style=&quot;display: block; border:none; padding: 0 0 0 5px; margin: 0;&quot; /&gt;






&lt;/blockquote&gt;</description>
		<content:encoded><![CDATA[<p>This is it. Where should I add the code?</p>
<blockquote>
<p>&lt;form method=&quot;get&quot; class=&quot;searchform&quot; action=&quot;/&#8221;&gt;</p>
<p>&lt;input type=&quot;text&quot; class=&quot;text inputblur&quot; value=&quot;&#8221; name=&#8221;s&#8221; /&gt;</p>
<p>&lt;input name=&quot;submit&quot; value=&quot;Search&quot; type=&quot;image&quot; src=&quot;/images/magnifier2-gray.gif&#8221; style=&#8221;display: block; border:none; padding: 0 0 0 5px; margin: 0;&#8221; /&gt;</p>
</blockquote>
]]></content:encoded>
	</item>
	<item>
		<title>By: Pand3monium</title>
		<link>http://www.ikiru.ch/blog/2008/how-to-add-a-search-function-for-nextgen-gallery-wordpress-plugin/comment-page-5#comment-168580</link>
		<dc:creator>Pand3monium</dc:creator>
		<pubDate>Fri, 29 Jan 2010 20:48:51 +0000</pubDate>
		<guid isPermaLink="false">http://www.ikiru.ch/blog/?p=651#comment-168580</guid>
		<description>chances are that&#039;s what you want</description>
		<content:encoded><![CDATA[<p>chances are that&#8217;s what you want</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Cerafil</title>
		<link>http://www.ikiru.ch/blog/2008/how-to-add-a-search-function-for-nextgen-gallery-wordpress-plugin/comment-page-5#comment-168579</link>
		<dc:creator>Cerafil</dc:creator>
		<pubDate>Fri, 29 Jan 2010 20:44:26 +0000</pubDate>
		<guid isPermaLink="false">http://www.ikiru.ch/blog/?p=651#comment-168579</guid>
		<description>Hi I am on AtaHualpa Theme but I cannot find my searh.php Only (Search Form.php)

Can you point me in the right direction pls</description>
		<content:encoded><![CDATA[<p>Hi I am on AtaHualpa Theme but I cannot find my searh.php Only (Search Form.php)</p>
<p>Can you point me in the right direction pls</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Vejito</title>
		<link>http://www.ikiru.ch/blog/2008/how-to-add-a-search-function-for-nextgen-gallery-wordpress-plugin/comment-page-4#comment-166328</link>
		<dc:creator>Vejito</dc:creator>
		<pubDate>Sun, 06 Dec 2009 11:53:36 +0000</pubDate>
		<guid isPermaLink="false">http://www.ikiru.ch/blog/?p=651#comment-166328</guid>
		<description>Hello Psyko !

Petite question encore si jamais tu as le temps de repondre.
J&#039;ai enfin des resultats, mais comme certains ici les images s&#039;affichent sur une seule colonne et ensuite quand je clique sur une image pour voir le resultat il m&#039;affiche le jpg tout simplement sans effet d&#039;ouverture.

Pourrais tu m&#039;expliquer comment arranger le code afin d&#039;avoir les resultats sur plusieurs colonnes et comment faire pour que quand je clique sur une image il me l&#039;ouvre comme une image de la gallerie avec le loader ?

Merci d&#039;avance !!!

Vejito</description>
		<content:encoded><![CDATA[<p>Hello Psyko !</p>
<p>Petite question encore si jamais tu as le temps de repondre.<br />
J&#8217;ai enfin des resultats, mais comme certains ici les images s&#8217;affichent sur une seule colonne et ensuite quand je clique sur une image pour voir le resultat il m&#8217;affiche le jpg tout simplement sans effet d&#8217;ouverture.</p>
<p>Pourrais tu m&#8217;expliquer comment arranger le code afin d&#8217;avoir les resultats sur plusieurs colonnes et comment faire pour que quand je clique sur une image il me l&#8217;ouvre comme une image de la gallerie avec le loader ?</p>
<p>Merci d&#8217;avance !!!</p>
<p>Vejito</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Yoda</title>
		<link>http://www.ikiru.ch/blog/2008/how-to-add-a-search-function-for-nextgen-gallery-wordpress-plugin/comment-page-4#comment-165148</link>
		<dc:creator>Yoda</dc:creator>
		<pubDate>Wed, 04 Nov 2009 07:28:59 +0000</pubDate>
		<guid isPermaLink="false">http://www.ikiru.ch/blog/?p=651#comment-165148</guid>
		<description>J&#039;ai trouvé ce site http://www.vrwebdesign.co.uk/latestnews/tutorials/search-images-gen-gallery/ qui part de la même base. Maintenant je n&#039;ai plus d&#039;erreurs, mais je n&#039;ai jamais de résultats :(
Je ne rentre jamais dans le &quot;if (have_posts())&quot;</description>
		<content:encoded><![CDATA[<p>J&#8217;ai trouvé ce site <a href="http://www.vrwebdesign.co.uk/latestnews/tutorials/search-images-gen-gallery/" rel="nofollow">http://www.vrwebdesign.co.uk/latestnews/tutorials/search-images-gen-gallery/</a> qui part de la même base. Maintenant je n&#8217;ai plus d&#8217;erreurs, mais je n&#8217;ai jamais de résultats <img src='http://www.ikiru.ch/blog/wp-includes/images/smilies/icon_sad.gif' alt=':(' class='wp-smiley' /><br />
Je ne rentre jamais dans le &#8220;if (have_posts())&#8221;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Yoda</title>
		<link>http://www.ikiru.ch/blog/2008/how-to-add-a-search-function-for-nextgen-gallery-wordpress-plugin/comment-page-4#comment-165146</link>
		<dc:creator>Yoda</dc:creator>
		<pubDate>Wed, 04 Nov 2009 06:46:29 +0000</pubDate>
		<guid isPermaLink="false">http://www.ikiru.ch/blog/?p=651#comment-165146</guid>
		<description>Bonjour,

J&#039;ai voulu mettre cette fonctionnalité (qui manque cruellement à NextGen) sur un wordpress 2.8.5 avec nextgen 1.3.6

Lorsque je lance une recherche, j&#039;ai l&#039;erreur suivante : 
Fatal error: Class &#039;nggallery&#039; not found in ..../wp-content/themes/mandigo/functions.php on line 259

Une idée du problème ?</description>
		<content:encoded><![CDATA[<p>Bonjour,</p>
<p>J&#8217;ai voulu mettre cette fonctionnalité (qui manque cruellement à NextGen) sur un wordpress 2.8.5 avec nextgen 1.3.6</p>
<p>Lorsque je lance une recherche, j&#8217;ai l&#8217;erreur suivante :<br />
Fatal error: Class &#8216;nggallery&#8217; not found in &#8230;./wp-content/themes/mandigo/functions.php on line 259</p>
<p>Une idée du problème ?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Vejito</title>
		<link>http://www.ikiru.ch/blog/2008/how-to-add-a-search-function-for-nextgen-gallery-wordpress-plugin/comment-page-4#comment-164817</link>
		<dc:creator>Vejito</dc:creator>
		<pubDate>Fri, 23 Oct 2009 14:19:48 +0000</pubDate>
		<guid isPermaLink="false">http://www.ikiru.ch/blog/?p=651#comment-164817</guid>
		<description>Bon,

alors cela fonctionne d&#039;une certaine maniere mais pas celle attendue.
Pour que cela me donne quelquechose, j&#039;ai change dans le code FROM wp_ngg_pictures en FROM wp_milanngg_pictures avec le nom de ma db.

Cela me donne un resultat, MAIS s&#039;affiche bizarrement comme sur le screen suivant :
http://new.ilanmizrahi.com/searchpb.JPG

Moi toujours pas comprendre, mais moi avancer ;)
Merci de ton aide :)</description>
		<content:encoded><![CDATA[<p>Bon,</p>
<p>alors cela fonctionne d&#8217;une certaine maniere mais pas celle attendue.<br />
Pour que cela me donne quelquechose, j&#8217;ai change dans le code FROM wp_ngg_pictures en FROM wp_milanngg_pictures avec le nom de ma db.</p>
<p>Cela me donne un resultat, MAIS s&#8217;affiche bizarrement comme sur le screen suivant :<br />
<a href="http://new.ilanmizrahi.com/searchpb.JPG" rel="nofollow">http://new.ilanmizrahi.com/searchpb.JPG</a></p>
<p>Moi toujours pas comprendre, mais moi avancer <img src='http://www.ikiru.ch/blog/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /><br />
Merci de ton aide <img src='http://www.ikiru.ch/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Vejito</title>
		<link>http://www.ikiru.ch/blog/2008/how-to-add-a-search-function-for-nextgen-gallery-wordpress-plugin/comment-page-4#comment-164793</link>
		<dc:creator>Vejito</dc:creator>
		<pubDate>Thu, 22 Oct 2009 23:52:20 +0000</pubDate>
		<guid isPermaLink="false">http://www.ikiru.ch/blog/?p=651#comment-164793</guid>
		<description>Bon j&#039;ai essaye avec ces codes que j&#039;ai mis a la fin de chaque fichier.
Je n&#039;ai plus de message d&#039;erreur :D mais je ne trouve pas de reponse :(

---------------------------
get(&#039;s&#039;);
	$keywords = preg_replace(&#039;/\+/&#039;,&#039; &#039;,$search);
	if (function_exists (&#039;ngg_get_search_pictures&#039;)) {  // function from functions.php
		$nggpictures = ngg_get_search_pictures($keywords, &#039;&#039;); // put the number of pictures by row you want, if you don&#039;t want &quot;4&quot;

		echo &quot;Pictures&quot;;
		if ($nggpictures) {
			echo $nggpictures;
			echo &#039;&#160;&#039;;
		}
		else {
			echo &#039;No pictures were found.&#039;;
		}
	}
}
// End of NextGen Gallery search
?&gt;
---------------------------------

get_results($nngquery, ARRAY_A);

	if ($pictures) foreach($pictures as $pic) { 

		$out .= &#039;&#039;;
		$out .= &#039;&lt;a href=&quot;get_image_url($pic[pid]).&#039;&quot; title=&quot;&#039;.stripslashes($pic[description]).&#039;&quot; rel=&quot;nofollow&quot;&gt;&#039;;
		$out .=  &#039;&#039;;
		$out .=  &quot;&lt;/a&gt;\n&quot;;
// pictures use float left, so don&#039;t need the code that outputs a 
//				if ($count == 0) {
//				$out .= &quot;&quot;;
//				}
//				++$count;
//				$count%=$numberPicRow;
	}
	return $out;
};
?&gt;
-----------------------------

Une tite idee ? :)</description>
		<content:encoded><![CDATA[<p>Bon j&#8217;ai essaye avec ces codes que j&#8217;ai mis a la fin de chaque fichier.<br />
Je n&#8217;ai plus de message d&#8217;erreur <img src='http://www.ikiru.ch/blog/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' />  mais je ne trouve pas de reponse <img src='http://www.ikiru.ch/blog/wp-includes/images/smilies/icon_sad.gif' alt=':(' class='wp-smiley' /> </p>
<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<br />
get(&#8217;s&#8217;);<br />
	$keywords = preg_replace(&#8216;/\+/&#8217;,&#8217; &#8216;,$search);<br />
	if (function_exists (&#8216;ngg_get_search_pictures&#8217;)) {  // function from functions.php<br />
		$nggpictures = ngg_get_search_pictures($keywords, &#8221;); // put the number of pictures by row you want, if you don&#8217;t want &#8220;4&#8243;</p>
<p>		echo &#8220;Pictures&#8221;;<br />
		if ($nggpictures) {<br />
			echo $nggpictures;<br />
			echo &#8216;&nbsp;&#8217;;<br />
		}<br />
		else {<br />
			echo &#8216;No pictures were found.&#8217;;<br />
		}<br />
	}<br />
}<br />
// End of NextGen Gallery search<br />
?&gt;<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;</p>
<p>get_results($nngquery, ARRAY_A);</p>
<p>	if ($pictures) foreach($pictures as $pic) { </p>
<p>		$out .= &#8221;;<br />
		$out .= &#8216;<a href="get_image_url($pic[pid]).'" title="'.stripslashes($pic[description]).'" rel="nofollow">&#8216;;<br />
		$out .=  &#8221;;<br />
		$out .=  &#8220;</a>\n&#8221;;<br />
// pictures use float left, so don&#8217;t need the code that outputs a<br />
//				if ($count == 0) {<br />
//				$out .= &#8220;&#8221;;<br />
//				}<br />
//				++$count;<br />
//				$count%=$numberPicRow;<br />
	}<br />
	return $out;<br />
};<br />
?&gt;<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;</p>
<p>Une tite idee ? <img src='http://www.ikiru.ch/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Vejito</title>
		<link>http://www.ikiru.ch/blog/2008/how-to-add-a-search-function-for-nextgen-gallery-wordpress-plugin/comment-page-4#comment-164790</link>
		<dc:creator>Vejito</dc:creator>
		<pubDate>Thu, 22 Oct 2009 23:09:35 +0000</pubDate>
		<guid isPermaLink="false">http://www.ikiru.ch/blog/?p=651#comment-164790</guid>
		<description>J&#039;ai essaye le coup de la derniere chance, mais ca ne fonctionne pas, toujours ce message avec le plugin.php, je ne sais pas ce qu&#039;il vient faire dans l&#039;histoire celui la.

Mais merci quand meme de ton aide, je vais chercher un autre search pour les galeries en esperant en trouver un, car j&#039;en ai absolument besoin !

;)</description>
		<content:encoded><![CDATA[<p>J&#8217;ai essaye le coup de la derniere chance, mais ca ne fonctionne pas, toujours ce message avec le plugin.php, je ne sais pas ce qu&#8217;il vient faire dans l&#8217;histoire celui la.</p>
<p>Mais merci quand meme de ton aide, je vais chercher un autre search pour les galeries en esperant en trouver un, car j&#8217;en ai absolument besoin !</p>
<p> <img src='http://www.ikiru.ch/blog/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Psykotik</title>
		<link>http://www.ikiru.ch/blog/2008/how-to-add-a-search-function-for-nextgen-gallery-wordpress-plugin/comment-page-4#comment-164789</link>
		<dc:creator>Psykotik</dc:creator>
		<pubDate>Thu, 22 Oct 2009 21:41:40 +0000</pubDate>
		<guid isPermaLink="false">http://www.ikiru.ch/blog/?p=651#comment-164789</guid>
		<description>Ca me paraît à peu près certain que ce que tu as ajouté n&#039;est pas en cause, puisque la ligne 243 ne contient pas de code, et que de toute façon le code ne touche pas aux headers et sessions (alors que le message d&#039;erreur est un problèmes avec ces derniers).

C&#039;est donc soit le dernier include qui se passe mal (include_once(&#039;backend/readme.php&#039;);) soit le fait d&#039;ouvrir/fermer les balises qui pose problème (j&#039;aurais jamais vu un truc pareil, mais à tout hasard, efface la fermeture et la réouverture du code php qui se suivent, en lignes 241 et 243).

Je suis désolé, mais je ne vais pas pouvoir t&#039;aider beaucoup plus...</description>
		<content:encoded><![CDATA[<p>Ca me paraît à peu près certain que ce que tu as ajouté n&#8217;est pas en cause, puisque la ligne 243 ne contient pas de code, et que de toute façon le code ne touche pas aux headers et sessions (alors que le message d&#8217;erreur est un problèmes avec ces derniers).</p>
<p>C&#8217;est donc soit le dernier include qui se passe mal (include_once(&#8216;backend/readme.php&#8217;);) soit le fait d&#8217;ouvrir/fermer les balises qui pose problème (j&#8217;aurais jamais vu un truc pareil, mais à tout hasard, efface la fermeture et la réouverture du code php qui se suivent, en lignes 241 et 243).</p>
<p>Je suis désolé, mais je ne vais pas pouvoir t&#8217;aider beaucoup plus&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Vejito</title>
		<link>http://www.ikiru.ch/blog/2008/how-to-add-a-search-function-for-nextgen-gallery-wordpress-plugin/comment-page-4#comment-164786</link>
		<dc:creator>Vejito</dc:creator>
		<pubDate>Thu, 22 Oct 2009 16:33:22 +0000</pubDate>
		<guid isPermaLink="false">http://www.ikiru.ch/blog/?p=651#comment-164786</guid>
		<description>Bonjour !

Merci pour tes observations sur le site, Ilan est mon beau frere, et oui c&#039;est son metier ;)

Pour revenir a nous moutons, j&#039;ai donc rajouter les balises php comme ceci
http://new.ilanmizrahi.com/functions.txt

En upgradant le fichier, j&#039;ai un message d&#039;erreur dans ma console d&#039;administration :
Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /hsphere/local/home/calibre/new.ilanmizrahi.com/web/wp-content/themes/mandigo/functions.php:243) in /hsphere/local/home/calibre/new.ilanmizrahi.com/web/wp-includes/plugin.php on line 339

Moi pas comprendre :( Encore merci pour ton temps ;)</description>
		<content:encoded><![CDATA[<p>Bonjour !</p>
<p>Merci pour tes observations sur le site, Ilan est mon beau frere, et oui c&#8217;est son metier <img src='http://www.ikiru.ch/blog/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p>Pour revenir a nous moutons, j&#8217;ai donc rajouter les balises php comme ceci<br />
<a href="http://new.ilanmizrahi.com/functions.txt" rel="nofollow">http://new.ilanmizrahi.com/functions.txt</a></p>
<p>En upgradant le fichier, j&#8217;ai un message d&#8217;erreur dans ma console d&#8217;administration :<br />
Warning: session_start() [function.session-start]: Cannot send session cache limiter &#8211; headers already sent (output started at /hsphere/local/home/calibre/new.ilanmizrahi.com/web/wp-content/themes/mandigo/functions.php:243) in /hsphere/local/home/calibre/new.ilanmizrahi.com/web/wp-includes/plugin.php on line 339</p>
<p>Moi pas comprendre <img src='http://www.ikiru.ch/blog/wp-includes/images/smilies/icon_sad.gif' alt=':(' class='wp-smiley' />  Encore merci pour ton temps <img src='http://www.ikiru.ch/blog/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Psykotik</title>
		<link>http://www.ikiru.ch/blog/2008/how-to-add-a-search-function-for-nextgen-gallery-wordpress-plugin/comment-page-4#comment-164780</link>
		<dc:creator>Psykotik</dc:creator>
		<pubDate>Thu, 22 Oct 2009 14:49:28 +0000</pubDate>
		<guid isPermaLink="false">http://www.ikiru.ch/blog/?p=651#comment-164780</guid>
		<description>Salut Vejito,

D&#039;après ce que je vois dans ton fichier functions.txt, tu as refermé le code php (par un &quot;?&gt;&quot;), mais tu ne l&#039;as pas réouvert pour le code de recherche ajouté...

Mets mon code entre tags php, c&#039;est à dire fais-le précéder par un &quot;&lt; ? php&quot; et finir par un &quot;? &gt;&quot; (sans les guillemets et les espaces que j&#039;ai ajoutés dans les guillemets).

Très sympa tes photos. Très chouette site, d&#039;ailleurs. Et si c&#039;est ton métier, très beau métier de toute façon :)</description>
		<content:encoded><![CDATA[<p>Salut Vejito,</p>
<p>D&#8217;après ce que je vois dans ton fichier functions.txt, tu as refermé le code php (par un &#8220;?>&#8221;), mais tu ne l&#8217;as pas réouvert pour le code de recherche ajouté&#8230;</p>
<p>Mets mon code entre tags php, c&#8217;est à dire fais-le précéder par un &#8220;< ? php" et finir par un "? >&#8221; (sans les guillemets et les espaces que j&#8217;ai ajoutés dans les guillemets).</p>
<p>Très sympa tes photos. Très chouette site, d&#8217;ailleurs. Et si c&#8217;est ton métier, très beau métier de toute façon <img src='http://www.ikiru.ch/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Vejito</title>
		<link>http://www.ikiru.ch/blog/2008/how-to-add-a-search-function-for-nextgen-gallery-wordpress-plugin/comment-page-4#comment-164588</link>
		<dc:creator>Vejito</dc:creator>
		<pubDate>Sun, 18 Oct 2009 15:01:47 +0000</pubDate>
		<guid isPermaLink="false">http://www.ikiru.ch/blog/?p=651#comment-164588</guid>
		<description>Bonjour !

Alors les messages d&#039;erreur s&#039;affichent en haut de ma page web lorsque je mets a jour mon function.php, cela me donne sur mon index en haut :

&quot;
/** ** Function to do searchs on gallery pics from NextGen Gallery plugin ** ** @keywords keywords, usually gave by the standard search query from wordpress ** @numberPicCol number of pic by row. If null, it takes 4 by default */ function ngg_get_search_pictures ($keywords, $numberPicRow = NULL) { global $wpdb; $count=1; if (!$numberPicRow) { $numberPicRow = &quot;4&quot;; } $nngquery = $wpdb-&gt;prepare( &quot; SELECT pid,description,alttext FROM wp_ngg_pictures WHERE MATCH (description, filename, alttext) AGAINST (%s IN BOOLEAN MODE) AND exclude != 1 &quot;,&quot;*&quot;.$keywords.&quot;*&quot;); $pictures = $wpdb-&gt;get_results($nngquery, ARRAY_A); if ($pictures) foreach($pictures as $pic) { $out .= &#039;&#039;; $out .= &#039;&#039;.stripslashes($pic[alttext]).&#039;&#039;; $out .= &quot;\n&quot;; if ($count == 0) { $out .= &quot;
&quot;; } ++$count; $count%=$numberPicRow; } return $out; }; 

&quot;
et mon affichage (police, taille...) s&#039;agrandit.


Voila le fichier search.php modifie :
http://new.ilanmizrahi.com/search.txt

et le fichier functions.php
http://new.ilanmizrahi.com/functions.txt

Merci d&#039;avance pour ton aide :)</description>
		<content:encoded><![CDATA[<p>Bonjour !</p>
<p>Alors les messages d&#8217;erreur s&#8217;affichent en haut de ma page web lorsque je mets a jour mon function.php, cela me donne sur mon index en haut :</p>
<p>&#8221;<br />
/** ** Function to do searchs on gallery pics from NextGen Gallery plugin ** ** @keywords keywords, usually gave by the standard search query from wordpress ** @numberPicCol number of pic by row. If null, it takes 4 by default */ function ngg_get_search_pictures ($keywords, $numberPicRow = NULL) { global $wpdb; $count=1; if (!$numberPicRow) { $numberPicRow = &#8220;4&#8243;; } $nngquery = $wpdb-&gt;prepare( &#8221; SELECT pid,description,alttext FROM wp_ngg_pictures WHERE MATCH (description, filename, alttext) AGAINST (%s IN BOOLEAN MODE) AND exclude != 1 &#8220;,&#8221;*&#8221;.$keywords.&#8221;*&#8221;); $pictures = $wpdb-&gt;get_results($nngquery, ARRAY_A); if ($pictures) foreach($pictures as $pic) { $out .= &#8221;; $out .= &#8221;.stripslashes($pic[alttext]).&#8221;; $out .= &#8220;\n&#8221;; if ($count == 0) { $out .= &#8221;<br />
&#8221;; } ++$count; $count%=$numberPicRow; } return $out; }; </p>
<p>&#8221;<br />
et mon affichage (police, taille&#8230;) s&#8217;agrandit.</p>
<p>Voila le fichier search.php modifie :<br />
<a href="http://new.ilanmizrahi.com/search.txt" rel="nofollow">http://new.ilanmizrahi.com/search.txt</a></p>
<p>et le fichier functions.php<br />
<a href="http://new.ilanmizrahi.com/functions.txt" rel="nofollow">http://new.ilanmizrahi.com/functions.txt</a></p>
<p>Merci d&#8217;avance pour ton aide <img src='http://www.ikiru.ch/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Psykotik</title>
		<link>http://www.ikiru.ch/blog/2008/how-to-add-a-search-function-for-nextgen-gallery-wordpress-plugin/comment-page-4#comment-164474</link>
		<dc:creator>Psykotik</dc:creator>
		<pubDate>Fri, 16 Oct 2009 07:13:01 +0000</pubDate>
		<guid isPermaLink="false">http://www.ikiru.ch/blog/?p=651#comment-164474</guid>
		<description>Hello Vejito,

Est-ce que tu voudrais tout d&#039;abord m&#039;indiquer de quels codes d&#039;erreur il s&#039;agit ?

Sinon, tu me confirmes d&#039;avoir bien pris le second code du point 2 ?</description>
		<content:encoded><![CDATA[<p>Hello Vejito,</p>
<p>Est-ce que tu voudrais tout d&#8217;abord m&#8217;indiquer de quels codes d&#8217;erreur il s&#8217;agit ?</p>
<p>Sinon, tu me confirmes d&#8217;avoir bien pris le second code du point 2 ?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Vejito</title>
		<link>http://www.ikiru.ch/blog/2008/how-to-add-a-search-function-for-nextgen-gallery-wordpress-plugin/comment-page-4#comment-164447</link>
		<dc:creator>Vejito</dc:creator>
		<pubDate>Thu, 15 Oct 2009 21:55:48 +0000</pubDate>
		<guid isPermaLink="false">http://www.ikiru.ch/blog/?p=651#comment-164447</guid>
		<description>Bonjour Psykotik,

J&#039;ai suivi le tuto pour rajouter ce search, mais probleme, cela me mets des codes d&#039;erreur en haut de ma page.

J&#039;ai WP 2.8.4 et Nextgen 1.3.5

Pourrais tu m&#039;aider dans ma demarche ? A la rigueur puis je t&#039;envoyer le code des mes 2 pages par mail ?
Merci d&#039;avance pour tout reponse de ta part !</description>
		<content:encoded><![CDATA[<p>Bonjour Psykotik,</p>
<p>J&#8217;ai suivi le tuto pour rajouter ce search, mais probleme, cela me mets des codes d&#8217;erreur en haut de ma page.</p>
<p>J&#8217;ai WP 2.8.4 et Nextgen 1.3.5</p>
<p>Pourrais tu m&#8217;aider dans ma demarche ? A la rigueur puis je t&#8217;envoyer le code des mes 2 pages par mail ?<br />
Merci d&#8217;avance pour tout reponse de ta part !</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ryd</title>
		<link>http://www.ikiru.ch/blog/2008/how-to-add-a-search-function-for-nextgen-gallery-wordpress-plugin/comment-page-4#comment-159376</link>
		<dc:creator>Ryd</dc:creator>
		<pubDate>Wed, 22 Jul 2009 04:25:50 +0000</pubDate>
		<guid isPermaLink="false">http://www.ikiru.ch/blog/?p=651#comment-159376</guid>
		<description>hi, thanks for the code before, it&#039;s really a great help... ^,^

by the way, i have a little problem here, not with the implementation actually (it works in some way), but with the sql query...

it&#039;s using full-text search function if i&#039;m not wrong
and from my reading so far, full-text search will not return any result (NULL) for some particular keywords (i.e. &#039;the&#039;,&#039;a&#039;,etc.) called &#039;stopwords&#039;, but when i try your site search function for these keywords it worked smoothly. 

i wonder how this could be done? is there any tricks behind it? as my implementation with your code (the sql query) this is somehow didn&#039;t work unless you replace the full-text search with string function (using &#039;LIKE&#039;).

and the last thing i can&#039;t figure how does it work in the query, it using &#039;*$keywords*&#039;. As i know the &#039;*&#039; operator it should be appended to the word to be affected (not prepended), so &#039;*$keywords&#039; (without &#039;*&#039; in the end) will be useless in my opinion (i tested it).</description>
		<content:encoded><![CDATA[<p>hi, thanks for the code before, it&#8217;s really a great help&#8230; ^,^</p>
<p>by the way, i have a little problem here, not with the implementation actually (it works in some way), but with the sql query&#8230;</p>
<p>it&#8217;s using full-text search function if i&#8217;m not wrong<br />
and from my reading so far, full-text search will not return any result (NULL) for some particular keywords (i.e. &#8216;the&#8217;,'a&#8217;,etc.) called &#8217;stopwords&#8217;, but when i try your site search function for these keywords it worked smoothly. </p>
<p>i wonder how this could be done? is there any tricks behind it? as my implementation with your code (the sql query) this is somehow didn&#8217;t work unless you replace the full-text search with string function (using &#8216;LIKE&#8217;).</p>
<p>and the last thing i can&#8217;t figure how does it work in the query, it using &#8216;*$keywords*&#8217;. As i know the &#8216;*&#8217; operator it should be appended to the word to be affected (not prepended), so &#8216;*$keywords&#8217; (without &#8216;*&#8217; in the end) will be useless in my opinion (i tested it).</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Anonymous</title>
		<link>http://www.ikiru.ch/blog/2008/how-to-add-a-search-function-for-nextgen-gallery-wordpress-plugin/comment-page-4#comment-159316</link>
		<dc:creator>Anonymous</dc:creator>
		<pubDate>Mon, 20 Jul 2009 08:47:48 +0000</pubDate>
		<guid isPermaLink="false">http://www.ikiru.ch/blog/?p=651#comment-159316</guid>
		<description>&#039;There was one thing that needed fixing (’&gt;’ was incorrect… worked when swapped out for ‘&gt;’) but&#039; in my below comment...

the first &#039;&gt;&#039; was written as &#039;&amp; gt ;&#039; without spaces.</description>
		<content:encoded><![CDATA[<p>&#8216;There was one thing that needed fixing (’&gt;’ was incorrect… worked when swapped out for ‘&gt;’) but&#8217; in my below comment&#8230;</p>
<p>the first &#8216;&gt;&#8217; was written as &#8216;&amp; gt ;&#8217; without spaces.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Pand3monium</title>
		<link>http://www.ikiru.ch/blog/2008/how-to-add-a-search-function-for-nextgen-gallery-wordpress-plugin/comment-page-4#comment-159315</link>
		<dc:creator>Pand3monium</dc:creator>
		<pubDate>Mon, 20 Jul 2009 08:44:40 +0000</pubDate>
		<guid isPermaLink="false">http://www.ikiru.ch/blog/?p=651#comment-159315</guid>
		<description>Ok, so I used the code from reply 34&#039;s pingback.

There was one thing that needed fixing (&#039;&gt;&#039; was incorrect... worked when swapped out for &#039;&gt;&#039;) but, while I don&#039;t know php, I got it working by comparing to an older version of the code posted previously.

What I now need is for the search function to work via tags, rather than whatever it works by now. It&#039;s rather necessary for me as my site is art-based and thus it kinda needs to be searchable properly.

here is what I&#039;m using currently for my functions:

## Function to do searches on gallery pics from NextGen Gallery plugin
##
## 2 vars : (1) $keywords (usually coming from the standard search query from wordpress)
## (2) $numberPicCol (number of pic by row, if null it takes 4 )
function ngg_get_search_pictures ($keywords, $numberPicRow = NULL) {
global $wpdb;
$count=1;
if (!$numberPicRow) { $numberPicRow = &quot;4&quot;; }

$nngquery = &quot;
SELECT pid,description,alttext
FROM   wp_ngg_pictures
WHERE  MATCH (description, filename, alttext) AGAINST (&#039;*$keywords*&#039; IN BOOLEAN MODE)
AND exclude = &#039;0&#039;
UNION
SELECT pid,description,alttext
FROM wp_ngg_pictures, wp_terms, wp_term_relationships
WHERE pid = term_id = term_taxonomy_id and
MATCH (name) AGAINST (&#039;*$keywords*&#039; IN BOOLEAN MODE)
AND exclude = &#039;0&#039;
&quot;;
$pictures = $wpdb-&gt;get_results($nngquery, ARRAY_A);
if ($pictures) foreach($pictures as $pic) {

$out .= &#039;&lt;a title=&quot;&#039;.stripslashes($pic[alttext]).&#039;&quot; href=&quot;get_image_url($pic[pid]).&#039;&quot; rel=&quot;nofollow&quot;&gt;&#039;;
$out .= &#039;&#039;;
$out .= &quot;&lt;/a&gt;\n&quot;;
if ($count == 0) {
$out .= &quot;&quot;;
}
++$count;
$count%=$numberPicRow;
}
return $out;
};</description>
		<content:encoded><![CDATA[<p>Ok, so I used the code from reply 34&#8217;s pingback.</p>
<p>There was one thing that needed fixing (&#8216;&gt;&#8217; was incorrect&#8230; worked when swapped out for &#8216;&gt;&#8217;) but, while I don&#8217;t know php, I got it working by comparing to an older version of the code posted previously.</p>
<p>What I now need is for the search function to work via tags, rather than whatever it works by now. It&#8217;s rather necessary for me as my site is art-based and thus it kinda needs to be searchable properly.</p>
<p>here is what I&#8217;m using currently for my functions:</p>
<p>## Function to do searches on gallery pics from NextGen Gallery plugin<br />
##<br />
## 2 vars : (1) $keywords (usually coming from the standard search query from wordpress)<br />
## (2) $numberPicCol (number of pic by row, if null it takes 4 )<br />
function ngg_get_search_pictures ($keywords, $numberPicRow = NULL) {<br />
global $wpdb;<br />
$count=1;<br />
if (!$numberPicRow) { $numberPicRow = &#8220;4&#8243;; }</p>
<p>$nngquery = &#8221;<br />
SELECT pid,description,alttext<br />
FROM   wp_ngg_pictures<br />
WHERE  MATCH (description, filename, alttext) AGAINST (&#8216;*$keywords*&#8217; IN BOOLEAN MODE)<br />
AND exclude = &#8216;0&#8242;<br />
UNION<br />
SELECT pid,description,alttext<br />
FROM wp_ngg_pictures, wp_terms, wp_term_relationships<br />
WHERE pid = term_id = term_taxonomy_id and<br />
MATCH (name) AGAINST (&#8216;*$keywords*&#8217; IN BOOLEAN MODE)<br />
AND exclude = &#8216;0&#8242;<br />
&#8221;;<br />
$pictures = $wpdb-&gt;get_results($nngquery, ARRAY_A);<br />
if ($pictures) foreach($pictures as $pic) {</p>
<p>$out .= &#8216;<a title="'.stripslashes($pic[alttext]).'" href="get_image_url($pic[pid]).'" rel="nofollow">&#8216;;<br />
$out .= &#8221;;<br />
$out .= &#8220;</a>\n&#8221;;<br />
if ($count == 0) {<br />
$out .= &#8220;&#8221;;<br />
}<br />
++$count;<br />
$count%=$numberPicRow;<br />
}<br />
return $out;<br />
};</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: digimarc</title>
		<link>http://www.ikiru.ch/blog/2008/how-to-add-a-search-function-for-nextgen-gallery-wordpress-plugin/comment-page-4#comment-158124</link>
		<dc:creator>digimarc</dc:creator>
		<pubDate>Tue, 09 Jun 2009 18:19:37 +0000</pubDate>
		<guid isPermaLink="false">http://www.ikiru.ch/blog/?p=651#comment-158124</guid>
		<description>I have been fighting with this for days now and not getting any image results back.  I think I found a fix.  I have adjusted it below.  The important part is the $wpdb-&gt;prefix statement.  Combined with the information from Flynn, I got everything working, finally!

&lt;code&gt;FROM &quot; .$wpdb-&gt;prefix. &quot;ngg_pictures&lt;/code&gt;

&lt;code&gt;
/** 
** Function to do searchs on gallery pics from NextGen Gallery plugin
**
** @keywords		keywords, usually gave by the standard search query from wordpress
** @numberPicCol	number of pic by row. If null, it takes 4 by default
*/
function ngg_get_search_pictures ($keywords, $numberPicRow = NULL) {
	global $wpdb;
	$count=1; 
	if (!$numberPicRow) { $numberPicRow = &quot;4&quot;; }

	$nngquery = $wpdb-&gt;prepare( &quot;
				SELECT pid,description,alttext
				FROM &quot; .$wpdb-&gt;prefix. &quot;ngg_pictures
				WHERE MATCH (description, filename, alttext) AGAINST (%s IN BOOLEAN MODE)
				AND exclude != 1&quot;
				, &quot;*&quot;.$keywords.&quot;*&quot;);
	$pictures = $wpdb-&gt;get_results($nngquery, ARRAY_A);

	if ($pictures) foreach($pictures as $pic) { 
				
		$out .= &#039;&lt;a title=&quot;&#039;.stripslashes($pic[description]).&#039;&quot; rel=&quot;nofollow&quot;&gt;&#039;;
		$out .=  &#039;&#039;;
		$out .=  &quot;&lt;/a&gt;\n&quot;; 
		
		if ($count == 0) {
			$out .= &quot;&quot;;
		}
		
		++$count;
		$count%=$numberPicRow;
	}
	return $out;
};
&lt;/code&gt;</description>
		<content:encoded><![CDATA[<p>I have been fighting with this for days now and not getting any image results back.  I think I found a fix.  I have adjusted it below.  The important part is the $wpdb-&gt;prefix statement.  Combined with the information from Flynn, I got everything working, finally!</p>
<p><code>FROM " .$wpdb-&gt;prefix. "ngg_pictures</code></p>
<p><code><br />
/**<br />
** Function to do searchs on gallery pics from NextGen Gallery plugin<br />
**<br />
** @keywords		keywords, usually gave by the standard search query from wordpress<br />
** @numberPicCol	number of pic by row. If null, it takes 4 by default<br />
*/<br />
function ngg_get_search_pictures ($keywords, $numberPicRow = NULL) {<br />
	global $wpdb;<br />
	$count=1;<br />
	if (!$numberPicRow) { $numberPicRow = "4"; }</p>
<p>	$nngquery = $wpdb-&gt;prepare( "<br />
				SELECT pid,description,alttext<br />
				FROM " .$wpdb-&gt;prefix. "ngg_pictures<br />
				WHERE MATCH (description, filename, alttext) AGAINST (%s IN BOOLEAN MODE)<br />
				AND exclude != 1"<br />
				, "*".$keywords."*");<br />
	$pictures = $wpdb-&gt;get_results($nngquery, ARRAY_A);</p>
<p>	if ($pictures) foreach($pictures as $pic) { </p>
<p>		$out .= '<a title="'.stripslashes($pic[description]).'" rel="nofollow">';<br />
		$out .=  '';<br />
		$out .=  "</a>\n"; </p>
<p>		if ($count == 0) {<br />
			$out .= "";<br />
		}</p>
<p>		++$count;<br />
		$count%=$numberPicRow;<br />
	}<br />
	return $out;<br />
};<br />
</code></p>
]]></content:encoded>
	</item>
</channel>
</rss>
