forum.coppermine-gallery.net

Support => cpg1.4.x Support => Older/other versions => cpg1.4 miscellaneous => Topic started by: khm1972 on January 09, 2007, 09:08:13 am

Title: Search functions
Post by: khm1972 on January 09, 2007, 09:08:13 am
Hi

I have made a mall add on to my site, where I want to search Coppermine for photos taken with predefined lenses. See example on the index page of my site www.markussens.dk. However I can not get the script to work.

The names of the the predefined lenses in the script - match 100% what I have written in the added custome field "Lense" for image description. I have also tried adding the exact lense name under a photos key words, but that dosent do the trick.

Here is the code I am using

Code: [Select]
  <form action="http://www.markussens.dk/newsite/thumbnails.php" form method="get" enctype="text/plain" name="searchcpg" id="searchcpg">
                                    <select name="select" class="textinput">
                                      <option value="50mm f/1.8D AF Nikkor" selected="selected">50mm f/1.8D AF Nikkor</option>
                                      <option value="10-20mm F4-5.6 EX DC HSM Sigma">10-20mm F4-5.6 HSM Sigma</option>
                                      <option value="18-70mm f/3.5-4.5G ED-IF AF-S DX Zoom Nikkor">18-70mm f/3.5-4.5G Zoom Nikkor</option>
                                      <option value="70-200mm f/2.8G ED-IF AF-S VR Zoom Nikkor">70-200mm f/2.8G Zoom Nikkor</option>
                                    </select>
                                    <input type="hidden" name="album2" value="search" />
                                    <input type="submit" name="s&oslash;g" value="Submit" />
                                  </form>
                                  <p>&nbsp;</p>
                                  <p>&nbsp;</p>
                                  <script language="JavaScript" type="text/javascript">
          <!--
          document.searchcpg.search.focus();
          -->
                                  </script>
Thanks
Klaus
Title: Re: Search functions
Post by: Nibbler on January 09, 2007, 03:08:58 pm
Add

Code: [Select]
<input name="user1" type="hidden" value="1" />
inside the form.
Title: Re: Search functions
Post by: mrsleep99 on July 28, 2007, 04:39:43 am
If I wanted to add a search field to my main page where and in what file would I insert this code..? I'm looking to do the same thing. Thank you!!
Title: Re: Search functions
Post by: Joachim Müller on July 29, 2007, 12:44:36 pm
What's the "main page" for you? A page within coppermine or a non-coppermine page? Posting a link to the page where you want to add the search field to might help.
Title: Re: Search functions
Post by: mrsleep99 on July 31, 2007, 08:31:27 am
A coppermine page, the index page.
Title: Re: Search functions
Post by: Joachim Müller on August 01, 2007, 08:28:06 am
Why don't you do as I suggested:
Posting a link to the page where you want to add the search field to might help.