HTML to put search field on regular web page? HTML to put search field on regular web page?
 

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Main Menu

HTML to put search field on regular web page?

Started by ayoungblood, February 19, 2006, 02:56:28 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

ayoungblood

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


kegobeer

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:

<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. 
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

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

Alan