News:

Support for jDownloads 3 has been ended
Since 17 August 2023 Joomla.org has discontinued support for Joomla 3.x. Therefore, we will no longer offer official support for our Joomla 3 jDownloads version 3.9.x from January 2024.
Please update your website to the latest Joomla version (Joomla 4 or Joomla 5) as soon as possible. Afterwards, please update jDownloads to the latest published version. The longer you delay, the more difficult the upgrade process for your website is likely to be.

Main Menu
Support-Forum

Search categories and tree module alphabetical view

Started by mrm92, 21.01.2016 10:26:17

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

mrm92

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

ColinM

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
Colin M
  •  

mrm92

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?
  •  

ColinM

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
Colin M
  •  

mrm92

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
  •  

Arno

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.
Best Regards / Gruß
Arno
Please make a Donation for jDownloads and/or write a review on the Joomla! Extensions directory!
  •  

mrm92

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
  •  

Eucrow

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  :)
  •  

mrm92

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
  •