D
D
Dmitry Jafarov2020-09-01 15:45:44
DLE
Dmitry Jafarov, 2020-09-01 15:45:44

How to search by article title and not by content?

There is a site on CMS DataLife Engine version 10.2. With advanced search, the default value is " Search in articles". Is it possible to make it so that the default is "Search in the headings of articles". Surely you need to climb into PHP, and this is a dense forest for me)
[URL= https://fastpic.ru/view/112/2020/0901/f567bcb42a80... ]

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexey Tutubalin, 2020-09-01
@bordur88

File name:
engine/modules/search.php
Action:
Find:

<td class="search">
                            <select class="textin" name="titleonly" id="titleonly">
                                <option {$titleonly_sel['0']} value="0">{$lang['s_ncom']}</option>
                                <option {$titleonly_sel['1']} value="1">{$lang['s_ncom1']}</option>
                                <option {$titleonly_sel['2']} value="2">{$lang['s_static']}</option>
                                <option {$titleonly_sel['3']} value="3">{$lang['s_tnews']}</option>
                            </select>
                        </td>

Replaced by:
<td class="search">
                            <select class="textin" name="titleonly" id="titleonly">
                                
                                <option selected="selected" {$titleonly_sel['3']} value="3">{$lang['s_tnews']}</option>
                                <option {$titleonly_sel['0']} value="0">{$lang['s_ncom']}</option>
                                <option {$titleonly_sel['1']} value="1">{$lang['s_ncom1']}</option>
                                <option {$titleonly_sel['2']} value="2">{$lang['s_static']}</option>
                            </select>
                        </td>

To find:
$titleonly_sel[$titleonly] = 'selected="selected"';

Replaced by:
//$titleonly_sel[$titleonly] = 'selected="selected"';

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question