<?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: Adding a search bar to the NextGEN Gallery Plugin</title>
	<atom:link href="http://wpswitch.com/blog/wordpress/adding-a-search-bar-to-the-nextgen-gallery-plugin/feed/" rel="self" type="application/rss+xml" />
	<link>http://wpswitch.com/blog/adding-a-search-bar-to-the-nextgen-gallery-plugin/</link>
	<description>Premium WordPress Themes and Design Blog</description>
	<lastBuildDate>Sun, 13 May 2012 23:16:25 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
<xhtml:meta xmlns:xhtml="http://www.w3.org/1999/xhtml" name="robots" content="noindex" />
	<item>
		<title>By: brandon</title>
		<link>http://wpswitch.com/blog/adding-a-search-bar-to-the-nextgen-gallery-plugin/#comment-19996</link>
		<dc:creator>brandon</dc:creator>
		<pubDate>Sun, 24 Jul 2011 21:27:30 +0000</pubDate>
		<guid isPermaLink="false">http://wpswitch.com/?p=1185#comment-19996</guid>
		<description>Is there anyway I can get this to display the image and the description beneath as it would in the gallery view?</description>
		<content:encoded><![CDATA[<p>Is there anyway I can get this to display the image and the description beneath as it would in the gallery view?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: minipower</title>
		<link>http://wpswitch.com/blog/adding-a-search-bar-to-the-nextgen-gallery-plugin/#comment-19910</link>
		<dc:creator>minipower</dc:creator>
		<pubDate>Thu, 10 Feb 2011 18:59:12 +0000</pubDate>
		<guid isPermaLink="false">http://wpswitch.com/?p=1185#comment-19910</guid>
		<description>Hi, i tried to paste the code above and then i figured out that i had to translate them in tags, after done that i receive this error &quot;Parse error: syntax error, unexpected &#039;;&#039;, expecting T_PAAMAYIM_NEKUDOTAYIM in functions.php on line 12&quot;, can you help me? the code that i added on the page functions.php is the following:

## Function to do search 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;
## start of tags code
UNION
SELECT pid,wp_ngg_pictures.description,alttext
FROM wp_ngg_pictures, wp_terms, wp_term_taxonomy, wp_term_relationships
WHERE wp_terms.term_id = wp_term_taxonomy.term_id and
wp_term_taxonomy.taxonomy = &#039;ngg_tag&#039; and
wp_term_taxonomy.term_taxonomy_id = wp_term_relationships.term_taxonomy_id and
wp_term_relationships.object_id = wp_ngg_pictures.pid and
MATCH (wp_terms.name) AGAINST (&#039;$keywords*&#039; IN BOOLEAN MODE)
AND exclude = &#039;0&#039;
## end of tags code
&quot;;
$pictures = $wpdb-&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;
};
Thx in advance</description>
		<content:encoded><![CDATA[<p>Hi, i tried to paste the code above and then i figured out that i had to translate them in tags, after done that i receive this error &#8220;Parse error: syntax error, unexpected &#8216;;&#8217;, expecting T_PAAMAYIM_NEKUDOTAYIM in functions.php on line 12&#8243;, can you help me? the code that i added on the page functions.php is the following:</p>
<p>## Function to do search 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;; }<br />
$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 = &#8217;0&#8242;<br />
## start of tags code<br />
UNION<br />
SELECT pid,wp_ngg_pictures.description,alttext<br />
FROM wp_ngg_pictures, wp_terms, wp_term_taxonomy, wp_term_relationships<br />
WHERE wp_terms.term_id = wp_term_taxonomy.term_id and<br />
wp_term_taxonomy.taxonomy = &#8216;ngg_tag&#8217; and<br />
wp_term_taxonomy.term_taxonomy_id = wp_term_relationships.term_taxonomy_id and<br />
wp_term_relationships.object_id = wp_ngg_pictures.pid and<br />
MATCH (wp_terms.name) AGAINST (&#8216;$keywords*&#8217; IN BOOLEAN MODE)<br />
AND exclude = &#8217;0&#8242;<br />
## end of tags code<br />
&#8220;;<br />
$pictures = $wpdb-&gt;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 />
Thx in advance</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Some Guy</title>
		<link>http://wpswitch.com/blog/adding-a-search-bar-to-the-nextgen-gallery-plugin/#comment-6113</link>
		<dc:creator>Some Guy</dc:creator>
		<pubDate>Thu, 12 Aug 2010 19:10:35 +0000</pubDate>
		<guid isPermaLink="false">http://wpswitch.com/?p=1185#comment-6113</guid>
		<description>Is there a way to narrow the search to only certain galleries or albums?</description>
		<content:encoded><![CDATA[<p>Is there a way to narrow the search to only certain galleries or albums?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Alison Shuman</title>
		<link>http://wpswitch.com/blog/adding-a-search-bar-to-the-nextgen-gallery-plugin/#comment-5302</link>
		<dc:creator>Alison Shuman</dc:creator>
		<pubDate>Sat, 31 Jul 2010 02:07:42 +0000</pubDate>
		<guid isPermaLink="false">http://wpswitch.com/?p=1185#comment-5302</guid>
		<description>Can you show me how to filter out duplicate images?

For each type of granite on this site, I typically upload pix into two galleries: one for the rooms in the house (&quot;kitchen&quot;, &quot;bathroom&quot;) and one for the project.

This means, if I search on something like &quot;typhoon bordeaux&quot;, I get duplicate photos.

How can I handle this?

Thank you SO much for posting this.  It took me a while to figure the code out but when it started working, I was hoping up and down with glee!</description>
		<content:encoded><![CDATA[<p>Can you show me how to filter out duplicate images?</p>
<p>For each type of granite on this site, I typically upload pix into two galleries: one for the rooms in the house (&#8220;kitchen&#8221;, &#8220;bathroom&#8221;) and one for the project.</p>
<p>This means, if I search on something like &#8220;typhoon bordeaux&#8221;, I get duplicate photos.</p>
<p>How can I handle this?</p>
<p>Thank you SO much for posting this.  It took me a while to figure the code out but when it started working, I was hoping up and down with glee!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: kamal</title>
		<link>http://wpswitch.com/blog/adding-a-search-bar-to-the-nextgen-gallery-plugin/#comment-459</link>
		<dc:creator>kamal</dc:creator>
		<pubDate>Mon, 28 Dec 2009 20:20:07 +0000</pubDate>
		<guid isPermaLink="false">http://wpswitch.com/?p=1185#comment-459</guid>
		<description>Thanks for this code, but there are a problem with php syntax highlighter!!!</description>
		<content:encoded><![CDATA[<p>Thanks for this code, but there are a problem with php syntax highlighter!!!</p>
]]></content:encoded>
	</item>
</channel>
</rss>

