Author Topic: Code for Search Box Outside 4images Gallery?  (Read 3915 times)

0 Members and 1 Guest are viewing this topic.

Offline mightyaf

  • Newbie
  • *
  • Posts: 24
    • View Profile
Code for Search Box Outside 4images Gallery?
« on: April 14, 2005, 09:51:27 PM »
I would like my visitors to use the search box right on my front page outside the 4images gallery. I am using PHP I tried to use the same code found in search_form.html inside the default template folder but that does not work. I am looking for the simple search code, not the Advanced search. I searched the forums but can't find the code. All help is appreciated.  :?:

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Re: Code for Search Box Outside 4images Gallery?
« Reply #1 on: April 15, 2005, 12:05:11 AM »
so what happend if u create same search form as in default template and use action="4images/search.php" in it?
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline mightyaf

  • Newbie
  • *
  • Posts: 24
    • View Profile
Re: Code for Search Box Outside 4images Gallery?
« Reply #2 on: April 15, 2005, 03:14:38 AM »
Ater trying it out step by step, I got it to work. Here is the code, simple but to some not easy.
Quote
<form method="post" action="4images/search.php">
  <table width="100%" border="0" cellspacing="0" cellpadding="1">
    <tr>
      <td class="head1">
        <table width="100%" border="0" cellpadding="4" cellspacing="0">
          <tr>
          <td colspan="2" valign="top" class="head1">&nbsp;</td>
          </tr>
          <tr>
            <td valign="top" class="row1">&nbsp;
         </td>
            <td class="row1" valign="top">
              <input type="text" name="search_keywords" size="40" class="input" />
              <br />
              <input type="checkbox" name="search_new_images" value="1" />
              Search only within the past 14 days </td>
          </tr>
          <tr>
            <td class="row1">&nbsp;</td>
            <td class="row1">
              <input type="submit" value="Search" class="button" />
            </td>
          </tr>
        </table>      </td>
    </tr>
  </table>
</form>
Thanks V@no for the help.

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Re: Code for Search Box Outside 4images Gallery?
« Reply #3 on: April 15, 2005, 03:46:11 AM »
but to some not easy.
I had fate in you ;) :)
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)