jDownloads Support Forum

Older Versions => jDownloads 3.2 (Support ended) => General => Topic started by: romagromov on 15.01.2016 21:57:32

Title: How to manage sorting option?
Post by: romagromov on 15.01.2016 21:57:32
Hi!

When sorting option enabled - in displays 

By Default  | Name | Author | Date | Hits

How to remove Default and Author?
How to add by Ratings and Featured?

Thanks!
Title: Re: How to manage sorting option?
Post by: ColinM on 16.01.2016 13:23:40
Hi
This would require some noticeable code changes.  But I think it would be useful to allow jD to have a selection of what sorting to use.  Would need a bit of planning on how to do in Config with interesting coding.

Colin
Title: Re: How to manage sorting option?
Post by: romagromov on 16.01.2016 15:03:25
Quote from: ColinM on 16.01.2016 13:23:40
Hi
This would require some noticeable code changes.  But I think it would be useful to allow jD to have a selection of what sorting to use.  Would need a bit of planning on how to do in Config with interesting coding.

Colin

Ok, I found how to remove Default and Author sorting. We just need to remove this options in template.
A more complicated question is how to add sorting by Ratings and Featured items.
I'm sure - this option will be very useful for users.
Title: Re: How to manage sorting option?
Post by: Arno on 26.01.2016 15:05:15
Yes we should rework this. Maybe with with the next version. We should also use a select box, so we need less place (important for responsive layouts).
Title: Re: How to manage sorting option?
Post by: ColinM on 27.01.2016 14:37:48
Arno
having a select box would be a good scheme as it would offer more possibilities within a fixed space. 

Having say a couple of buttons that could be assigned as 'favourite' types of search in config or by User Group might be useful as well.  This is still a small fixed space and could enhance the user interface.

Colin
Title: Re: How to manage sorting option?
Post by: Dom on 16.03.2016 09:18:23
I'm gonna jump in here real quick, so there's no need to open a new thread...

I want to remove just the "Author" and "Downloads" sort options. I can't see a way doing it via the layouts so I suspect I have to edit a php file? Can someone point me in the direction where to look? :)
Title: Re: How to manage sorting option?
Post by: romagromov on 16.03.2016 13:40:29
Quote from: Dom on 16.03.2016 09:18:23
I'm gonna jump in here real quick, so there's no need to open a new thread...

I want to remove just the "Author" and "Downloads" sort options. I can't see a way doing it via the layouts so I suspect I have to edit a php file? Can someone point me in the direction where to look? :)

Hi!

Open /components/com_jdownloads/views/category/default.php

Find line with text:

// display sort order bar

Remove needed line

for example

$author   = '<span class="jd-list-author" id="ordering3">'.JHtml::_('grid.sort', JText::_('COM_JDOWNLOADS_FE_SORT_ORDER_AUTHOR'), 'author', $listDirn, $listOrder).' | </span>';

Or remove variable .author below in code

(https://dl.dropboxusercontent.com/s/pekh918feyv5pwi/2016-03-16%20at%2014.44.png)

More important for me is to add new sort options - sort by Ratings and sort by Featured

Arno promised to integrate this options.

Waiting  ::)
Title: Re: How to manage sorting option?
Post by: Dom on 16.03.2016 14:00:33
awesome, that did the trick. 
Thank you very much! :)
Title: Re: How to manage sorting option?
Post by: Arno on 18.03.2016 11:43:59
QuoteArno promised to integrate this options.
Waiting
Ups... it seems that i had forgot it.  ::)

I have add it now to my Todo list! But we need a few weeks then we must first get ready the new layouts and also the Joomla 3.5 compatibility.
Title: Re: How to manage sorting option?
Post by: Arno on 04.04.2016 18:25:47
I have now added new options in the configuration. So it is now easy possible to select which data fields are visible for the sort order (see pic). Also the featured field can now be used.

But a sort order like top rated or most rated is not possible. I have instead created a new special module (see second pic).

Both is a part from version 3.2.42 (coming very soon).

[gelöscht durch Administrator]
Title: Re: How to manage sorting option?
Post by: Dom on 04.04.2016 19:03:09
Great job! :)
Title: Re: How to manage sorting option?
Post by: romagromov on 04.04.2016 22:02:47
Quote from: Arno on 04.04.2016 18:25:47

But a sort order like top rated or most rated is not possible. I have instead created a new special module (see second pic).

Both is a part from version 3.2.42 (coming very soon).

This module supports option "follow current category"?

For example, user browses category "Components".
Can this module displays top rated downloads from current category?
Title: Re: How to manage sorting option?
Post by: ColinM on 04.04.2016 23:37:43
Romagromov,
I understand where you are coming from and it would be nice.

Reget however that the module does not have a mode to use "current category". Presently you have to explicitly specify the category or categories, or all categories. 
As I see it there is no guarantee in general that the user is actually looking at a Category.  Providing the linkage for when a user moves from category to category could be 'interesting'.

Colin
Title: Re: How to manage sorting option?
Post by: romagromov on 05.04.2016 13:33:55
Ok, can you explain how user, which browsing specific category can get most rated downloads from this category?
Thanks. 
Title: Re: How to manage sorting option?
Post by: ColinM on 06.04.2016 00:31:39
Romagromov,
The module is part of the jD v42 release which we expect very soon now.  Like the oither modules it has a  configuration parameter that lets you specify a single cat, multiple cats and all cats.  If a selected Category has sub categories they are also included. 
Of course the search is limited to those Downloads that the user has view Access .

Colin
Title: Re: How to manage sorting option?
Post by: romagromov on 06.04.2016 09:45:19
Quote from: ColinM on 06.04.2016 00:31:39
Romagromov,
The module is part of the jD v42 release which we expect very soon now.  Like the oither modules it has a  configuration parameter that lets you specify a single cat, multiple cats and all cats.  If a selected Category has sub categories they are also included. 
Of course the search is limited to those Downloads that the user has view Access .

Colin


This old issue.
I have many categories. So, I should create many modules for each category - to display top rated items from each category.
Option "Follow current category" in module settings will resolve any problems.
With this option I can create only 1 module.

But my opinion is that it is much better to integrate option "sort by Ratings".

But, as Arno said : "a sort order like top rated or most rated is not possible"

And I know why - it because ratings data placed in separate mysql tables.

So it possible, but too difficult.

Thanks.

P.S. I also can't understand what is difference with mod_jdownloads_top and new special module, which Arno developed...
Title: Re: How to manage sorting option?
Post by: ColinM on 06.04.2016 14:38:09
Hi
Top Downloads module shows which Downloads have been downloaded the highest number of times.
Top Rated module shows which Downloads have the most 'stars'.  So typically those with 5 stars would appear first.
Most Rated  module shows which Downloads have the most votes.

Note that the 'star' is the average rating of all of those who have voted.

Colin
Title: Re: How to manage sorting option?
Post by: romagromov on 06.04.2016 14:40:20
Thanks  :D

So, now only 1 problem is how to make it following current category  ::)