Simple Search Box Simple Search Box
 

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

Simple Search Box

Started by davec, September 05, 2006, 06:13:16 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

davec

I have a client who would just like the simple search facility as in earleir versions of Coppermine. I have tried to find a solution on the forum but to no avail. Any suggestions appreciated. I am on 1.48 by the way.

Dave  ???

Joachim Müller

You're welcome to edit the search page and hide the additional input fields and checkboxes. Change them from "text" or "checkbox" to "hidden". Remove the surplus descriptive text and you're fine. Another option would be hiding the "surplus" fields using CSS attributes. Edit search.php, find        <tr>
            <td class="tableb" align="center" >
                <input type="text" style="width: 80%" name="search" maxlength="255" value="" class="textinput" />
                <input type="submit" value="{$lang_search_php['submit_search']}" class="button" />
                <input type="hidden" name="album" value="search" />
            </td>
        </tr>
and add after it (into a new line)<div style="display:none">
Then find                                        </tr>
                                                $customs
                                                $ip
                                </table>
                        </td>
                </tr>
and after it (into a new line)</div>

Haven't tested this, but should work as expected. Please report.

davec

Thanks for your help. The first part I put in as below

<input type="text" style="width: 80%" name="search" maxlength="255" value="" class="textinput" />
                <input type="submit" value="{$lang_search_php['submit_search']}" class="button" />
                <input type="hidden" name="album" value="search" />

            </td>
        </tr>
                <tr>
                        <td class="tableb"> <div style="display:none">
                                <table align="center" width="60%">

then the closing tag was placed as below. All seems to work well

</tr>
                                                $customs
                                                $ip
                                </table>
</div>
                        </td>

                </tr>

Dave  ;D

davec

Manged to modify the page as above thanks. Now have a second issue. On the site when a specific word is entered ie red, a host on non related images are also displayed. Client informs me that it didn't used to happen in the earler version they were using. It is only since we upgraded to 1.48. Any suggestions

Dave  :-\

Nibbler

include/search.inc.php, review the default search fields


if (!isset($USER['search']['params'])){
        $USER['search']['params']['title'] = $USER['search']['params']['caption'] = $USER['search']['params']['keywords'] = $USER['search']['params']['filename'] = 1;
}


Default is to search by title, caption, keywords, filename. Remove any that you do not wish to search by.

davec

Thanks for that I will give it a go. What was the search parammeter in earlier versions by the way?

Dave  :)

Nibbler

I think filename is new. Depends what previous version you were running.

davec

Originally started with 1.31 I believe and then did two upgrades over time. I will add and delete the various parameters and see what happens! Will keep you posted.

Dave  :)

davec

Had a play with the parameters and doesn't seem to make any difference.  If you go to http://www.weddingflowersonline.co.uk/gallery/index.php and type in red for instance it brings up pages which have no reference to that colour anywhere. Any ideas ?  ???

Dave

Nibbler

Brings up wired, obscured, pictured, ... all of which contain the word red. If you want exact word searches then try seaching the board.