Author Topic: Quick seach  (Read 6698 times)

0 Members and 1 Guest are viewing this topic.

Offline Ofuuzo

  • Newbie
  • *
  • Posts: 29
    • View Profile
Quick seach
« on: June 28, 2002, 12:24:05 PM »
I will like to add a function here I call a quick search dropdown list. For example:
<form>
    <select name="quick_search">
    <option value="">Quick search list</option>
    <option value="../search.php?search_keywords=Jan ">Jan</option>
    <option value="../search.php?search_keywords=Nicky ">Nicky</option>
     .......

Nicky and Jan exist either as image name, description or keywords.

Can you point me in which files I have to look or how I can do that in version 1.6.

Thanks.
Ofuuzo

Offline Chris

  • 4images Moderator
  • 4images Guru
  • *****
  • Posts: 4.487
  • Did u ever stop to think and then forget to start?
    • View Profile
Yes, yes!
« Reply #1 on: June 28, 2002, 02:58:41 PM »
When I first installed 4images, I was thinking it would be really nice to have a php generated keyword search like this.  

In other words, let 4images generate a drop down list of all the available keywords like it already does for the available categories.  This would make search_form.html much more useful to the end user.

Keyword searching in its current form is great but it really only works if you already know all the available keywords in the database.

Offline Vienix

  • Full Member
  • ***
  • Posts: 144
    • View Profile
    • com.municate.nl
Quick seach
« Reply #2 on: June 28, 2002, 03:19:04 PM »
put this in your header or existing javascript:

Quote
<script LANGUAGE="JavaScript">
function iSearch(){
   var index;
   index = document.ZoekMaar.service.selectedIndex;
   var site;
   site = document.ZoekMaar.service.options[index].value;
   {top.location=site;
   }
}
</script>


and this is your form:

Quote
<FORM action="javascript:iSearch();void(0)//" method=get name="ZoekMaar">
<p>
<SELECT name=service size=1 style="font-family: Arial; font-size: 10pt;">
<OPTION selected value="http://adam/search.php?search_keywords=test">TEST</OPTION>
<OPTION value="http://adam/search.php?search_keywords=test">TEST</OPTION>
<OPTION value="http://adam/search.php?search_keywords=test">TEST</OPTION>
</SELECT>
<INPUT onclick="iSearch()" type=button value="GO" style="font-family: Arial; font-size: 10pt;"></p>
</form>


And my server is in the attic, not on the internet, so you better change that :)
Thats It !

Offline jengwen

  • Jr. Member
  • **
  • Posts: 85
    • View Profile
    • http://www.jenrichardsphotography.com
Quick seach
« Reply #3 on: January 25, 2003, 06:36:40 PM »
Does anyone have an example of this working?  Also, maybe this should be moved/copied to the new mod forum so everyone can find it easier.

Offline Chris

  • 4images Moderator
  • 4images Guru
  • *****
  • Posts: 4.487
  • Did u ever stop to think and then forget to start?
    • View Profile
Quick seach
« Reply #4 on: January 25, 2003, 09:25:14 PM »
The post by Vienix was for a static list of fixed keywords.  In other words, the list is predetermined and not generated by PHP.  Another mod does this here: http://www.4homepages.de/forum/viewtopic.php?t=1888

Which you already know because you posted a reply there too.  I never tried what Vienix posted.