Advanced search  

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Pages: [1]   Go Down

Author Topic: HTML to put search field on regular web page?  (Read 3955 times)

0 Members and 1 Guest are viewing this topic.

ayoungblood

  • Coppermine newbie
  • Offline Offline
  • Posts: 19
HTML to put search field on regular web page?
« on: February 19, 2006, 02:56:28 am »

What HTML code do I use to put a search field on a regular web page that will search the coppermine archive and jump to the results page?

I have looked searched for this for awhile and appologize in advance it if has already been answered. Please point me to the thread if so.

Thanks,

Alan
Logged

kegobeer

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 4637
  • Beer - it does a body good!
    • The Kazebeer Family Website
Re: HTML to put search field on regular web page?
« Reply #2 on: February 19, 2006, 03:17:39 am »

In case those links don't work exactly right (those posts were for 1.3.x, and if you're using 1.4.x it may not work correctly), this is copied from the search page in Coppermine:

Code: [Select]
<form method="post" action="thumbnails.php" name="searchcpg">
<!-- Start standard table -->
<table align="center" width="60%" cellspacing="1" cellpadding="0" class="maintable">
        <tr>
                <td class="tableh1" colspan="1">Search the file collection</td>
        </tr>

        <tr>
            <td class="tableb" align="center" >
                <input type="text" style="width: 80%" name="search" maxlength="255" value="" class="textinput" />
                <input type="submit" value="search" class="button" />
                <input type="hidden" name="album" value="search" />
            </td>
        </tr>
                <tr>
                        <td class="tableb">

                                <table align="center" width="60%">
                                        <tr>
                                                <td>Search in:</td>
                                                <td align="center">Age:</td>
                                        </tr>
                                        <tr>
                                                <td><input type="checkbox" name="title" id="title" class="checkbox" checked="checked" /><label for="title" class="clickable_option">Title</label></td>

                                                <td align="right">Newer than <input type="text" name="newer_than" size="3" maxlength="4" class="textinput" /> days</td>
                                        </tr>
                                        <tr>
                                                <td><input type="checkbox" name="caption" id="caption" class="checkbox" checked="checked" /><label for="caption" class="clickable_option">Caption</label></td>
                                                <td align="right">Older than <input type="text" name="older_than" size="3" maxlength="4" class="textinput" /> days</td>

                                        </tr>
                                        <tr>
                                                <td><input type="checkbox" name="keywords" id="keywords" class="checkbox" checked="checked" /><label for="keywords" class="clickable_option">Keywords</label></td>
                                                <td>&nbsp;</td>

                                        </tr>
                                        <tr>
                                                <td><input type="checkbox" name="owner_name" id="owner_name" class="checkbox" /><label for="owner_name" class="clickable_option">Owner name</label></td>

                                                <td align="right"><select name="type" class="listbox">
                                                        <option value="AND" selected="selected">Match all words (AND)</option>
                                                        <option value="OR">Match any words (OR)</option></select>
                                                </td>
                                        </tr>
                                        <tr>
                                                <td><input type="checkbox" name="filename" id="filename" class="checkbox" /><label for="filename" class="clickable_option">Filename</label></td>

                                                <td>&nbsp;</td>
                                        </tr>
                                               
                                                <tr>
                <td>&nbsp;</td>
                <td>&nbsp;</td>
        </tr>
                                </table>
                        </td>
                </tr></table>

<!-- End standard table -->
</form>

If you aren't using your theme's style.css on that page, you'll have to edit or remove the class statements.  If thumbnails.php isn't in the same directory as your html file, you'll have to edit the url.  Otherwise it should work. 
Logged
Do not send me a private message unless I ask for one.  Make your post public so everyone can benefit.

There are no stupid questions
But there are a LOT of inquisitive idiots

ayoungblood

  • Coppermine newbie
  • Offline Offline
  • Posts: 19
Re: HTML to put search field on regular web page?
« Reply #3 on: February 19, 2006, 04:27:19 am »

Thank You for the quick and helpful response. I'll try it as Build my new site.

Alan
Logged
Pages: [1]   Go Up
 

Page created in 0.018 seconds with 19 queries.