jDownloads Support Forum

Older Versions => jDownloads 3.2 (Support ended) => General => Topic started by: romagromov on 25.04.2016 19:03:20

Title: Search only in titles?
Post by: romagromov on 25.04.2016 19:03:20
Hi!
When i searching downloads in admin panel, Jdownloads search in title and description.
How I can switch off searching in description?
Thanks.
Title: Re: Search only in titles?
Post by: Arno on 22.05.2016 12:14:44
This is only possible with code changing.

Open administrator/components/com_jdownloads/models/downloads.php
and go to the line 338 - change it then as here listed:

// Filter by search in title
        $search = $this->getState('filter.search');
        if (!empty($search)) {
            if (stripos($search, 'id:') === 0) {
                $query->where('a.id = '.(int) substr($search, 3));
            } else {
                $search = $db->Quote('%'.$db->escape($search, true).'%');
                //$query->where('(a.file_title LIKE '.$search.' OR a.description LIKE '.$search.' OR a.description_long LIKE '.$search.' OR a.notes LIKE '.$search.')');
                $query->where('(a.file_title LIKE '.$search.')');
            }
        }


But note that your changes are lost after next update.
Title: Re: Search only in titles?
Post by: romagromov on 22.05.2016 12:18:30
Thanks!  :)
I think it should be option in admin settings.
Title: Re: Search only in titles?
Post by: Arno on 22.05.2016 12:47:31
Quote from: romagromov on 22.05.2016 12:18:30I think it should be option in admin settings.
Yes we could do it. But the problem is the translation team.
jDownloads exists in this moment in more then 50 languages.
So when we add an option must be also added text in the language files. So every team must translate the new text  again or the he is displayed only in english.

This is the reason why we do it not so fast for every small suggestion. It should be important for many  users.