Author Topic: Search Button - One Click Search  (Read 6528 times)

0 Members and 1 Guest are viewing this topic.

Offline bgmurphy

  • Full Member
  • ***
  • Posts: 113
    • View Profile
Search Button - One Click Search
« on: June 26, 2003, 10:39:47 PM »
hey all - :D

i would like to create several '1-Click' shortcut search buttons or a drop-down box that does the same - that will screen all the images for a particular search term - [in my case a particular movie studio or client name] -

this is the '1-click search for dummies' version where one does not have to think - just do !!  :lol:

the '1-click' button or drop-down box shortcut should be viewable on all a pages either under the search box at the top or to the left under the random image ..

my guess the easiest way to do this is thru a plug-in where the admin can create, add, modify the list accordngly - several of my clients have requested this type of shortcut to specific material

this mod/plug-in should not be confused with the 'more like this' feature currently available or the standard search features

anyone up for the creative challenge?

thanx to all for your time -
bruce

Offline Chris

  • 4images Moderator
  • 4images Guru
  • *****
  • Posts: 4.487
  • Did u ever stop to think and then forget to start?
    • View Profile
Search Button - One Click Search
« Reply #1 on: June 28, 2003, 04:20:38 PM »
Where's the challenge in creating a basic HTML drop down list with  pre-populated search queries that use

Code: [Select]
href="{url_search}?search_keywords=studio1"
or
Code: [Select]
href="{url_search}?search_keywords=studio1&search_keywords=actor"

 :?:

Offline bgmurphy

  • Full Member
  • ***
  • Posts: 113
    • View Profile
Search Button - One Click Search
« Reply #2 on: June 29, 2003, 09:01:46 PM »
chris -

the reason i posted this is that i am not proficient in web design nor the internal workings of 4images tables/functions/etc, coding ...  :(

i can follow the posts and do cut and paste and simple deletes etc ..
(as are many of the others that read the forum !! )

i appreciate the help you offer the forum  ... but how can i make the coding you posted work for me ?

as it stands - i can make a dropdown box and select the dropdown item .. then what ?? .. what is the coding that searches the database to return images and which files (i know in the templates how to place the drop box - does the coding go before/after the box?) ....

thanx in advance
bruce

Offline bernd

  • Full Member
  • ***
  • Posts: 214
    • View Profile
Search Button - One Click Search
« Reply #3 on: June 29, 2003, 10:00:39 PM »
Quote from: Chris
Code: [Select]
href="{url_search}?search_keywords=studio1&search_keywords=actor"


Ain't this the same as
Code: [Select]
href="{url_search}?search_keywords=studio1+actor"

Just wondering,
bernd

Offline Jan

  • Administrator
  • 4images Guru
  • *****
  • Posts: 5.024
    • View Profile
    • 4images - Image Gallery Management System
Search Button - One Click Search
« Reply #4 on: June 30, 2003, 03:48:39 PM »
No, i think Chris means
href="{url_search}?search_keywords=studio1&search_user=actor"

In the other case, the second parameter will overwrite the first one.

Jan
Your first three "must do" before you ask a question:
1. Forum rules
2. FAQ
3. Search

Offline Chris

  • 4images Moderator
  • 4images Guru
  • *****
  • Posts: 4.487
  • Did u ever stop to think and then forget to start?
    • View Profile
Search Button - One Click Search
« Reply #5 on: June 30, 2003, 08:27:09 PM »
bernd had it right.  I meant:
Code: [Select]
href="{url_search}?search_keywords=studio1+actor"

Offline Chris

  • 4images Moderator
  • 4images Guru
  • *****
  • Posts: 4.487
  • Did u ever stop to think and then forget to start?
    • View Profile
Search Button - One Click Search
« Reply #6 on: June 30, 2003, 08:45:16 PM »
Quote from: bgmurphy
i appreciate the help you offer the forum  ... but how can i make the coding you posted work for me ?

Just place the link I gave you anywhere in your templates you'd like to use it.  It could be a list of links, a drop down box, any HTML tag that uses the href or link attribute.   :wink:

This tag:
Code: [Select]
{url_search}gets replaced by 4images with the URL in your site where you find search.php

This portion of the link
Code: [Select]
?search_keywords=studio1+actortells search.php what to search for.  The words "studio1" AND "actor" in this case.

From home.html you can see this form:
Code: [Select]
           <form method="post" action="{url_search}">
              <table border="0" cellspacing="0" cellpadding="1">
                <tr>
                  <td>
                    <input type="text" name="search_keywords" size="15" class="searchinput" />
                  </td>
                  <td>
                    <input type="submit" value="{lang_search}" class="button" name="submit" />
                  </td>
                </tr>
                <tr valign="top">
                  <td colspan="2"><a href="{url_search}" class="smalltext">{lang_advanced_search}</a></td>
                </tr>
              </table>
            </form>

Basic 4images template knowledge tells us that search.php is found by using the {url_search} tag and basic HTML knowledge tells us we can place "search_keywords=something" after a "?" in the browsers address bar to construct a GET method of using search.php