jDownloads Support Forum

Older Versions => jDownloads 3.2 (Support ended) => Topic started by: mrm92 on 21.01.2016 10:26:17

Title: Search categories and tree module alphabetical view
Post by: mrm92 on 21.01.2016 10:26:17
Hi,
I'm using the Jdownloads search plugin and I didn't found a way to search the categories instead of files.
What can I do to solve this?
I have last Joomla! version (3.4.8 ) and last Jdownloads component version (3.2.41)

Meanwhile, in the tree module, there's a way to have alphabetical order? I set it on Jdownloads configuration->public , but doesn't affect the tree module.

Thanks


EDIT
I found a way to have alphabetical order in tree view:
go in modules\mod_jdownloads_tree
open helper.php and search this part of code
// Set sort ordering
        $ordering = 'c.lft';
        $dir = 'ASC';

modify 'c.lft' parameter into 'c.title'.

Hope to help someone who need it.

EDIT 2
With this mode some categories doesn't show up... probably there is more code to modify.
Title: Re: Search categories and tree module alphabetical view
Post by: ColinM on 21.01.2016 20:33:15
Hi
The search module is specifically setup to only search in Downloads.  I do not think anyone has previously asked asbout searching for categories.

Colin
Title: Re: Search categories and tree module alphabetical view
Post by: mrm92 on 22.01.2016 08:53:03
In case I want to try modify the search code, which are the files of my interest?
In alternative there's an external extension/compontent/plugin that allow me search categories?
Title: Re: Search categories and tree module alphabetical view
Post by: ColinM on 22.01.2016 15:48:54
Hi
This is not just a question of some simple changes to php files.  The Files info and the Category info are stored in different tables so you would need some sql knowledge as well. 
Trying to combine a search over the two different sets is challenging.  Also you have to deal with both the view Access and the Permissions, which are a nightmare

Incidentally why do you want to search the Categories?  It is unusual to have much descriptive material in them.  I think the Tree module is a better way to look at Cats.

Also you can have Downloads that only have a description so puttin one of those in each category would give a similar effect at much, much less effort.

Colin
Title: Re: Search categories and tree module alphabetical view
Post by: mrm92 on 22.01.2016 16:09:15
Thanks for the answer,
I need to search categories because in the future I'll have at least one hundred of them, and some users may want to search a category by the Search component, without search it by the Tree module (I think, a user may doesn't say 'where' is the category of interest). For example: a user says that a manual may be in subcategories "a", "b" or "c", but doesn't know the name of the file and where are collocated these subcategories, but can try to search a possible name that can correspond to the right subcategories... It's little forced but I know my users and I know they will need it.

But, simplier, do you know if there are external extension allowed to search Jdownloads categories?

Another problem is the tree module, that I solved it partially, the alphabetical order work but some categories don't show up.

Thanks
Title: Re: Search categories and tree module alphabetical view
Post by: Arno on 22.01.2016 16:35:52
Hi,
Quotemodify 'c.lft' parameter into 'c.title'.
when you use the title for the sort order you lose the categories structure. Try it in the backend categories list and you will see what i mean (click on title in the header).

A valid idea could be to sort only the main categories by title.  ::)
But i have in the moment not any time to implement this. Sorry.
It could be also tricky.
Title: Re: Search categories and tree module alphabetical view
Post by: mrm92 on 22.01.2016 16:54:58
Hi,
I try with "c.cat_dir" and "c.cat_dir_parent" but don't work properly.. They leave some casual (I think) subcategories. Can you tell me what the original "c.lft" represent effectively? Do you know if i need modify other files or create/modify some SQL code?
Thanks
Title: Re: Search categories and tree module alphabetical view
Post by: Eucrow on 19.02.2016 11:57:00
Hi!
I'm interested in the order of categories. mrm92, did you find any solution? I tried changing the c.title parameter  but, as you said before,  some categories doesn't show up.

Thank you  :)
Title: Re: Search categories and tree module alphabetical view
Post by: mrm92 on 22.02.2016 08:28:35
Hi Eucrow,
sorry but I didn't have to much time to find a solution.
So far I've had to manually move the categories to arrange alphabetically, and talk about 200/300 categories, so it is too cumbersome process. I hope that someone will find a solution.

Best regards