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

Create download layout - change Dropdown "Select Category" [solved in jD 3.2.60

Started by ciklon, 25.07.2017 00:30:40

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

ciklon

Hi,
I have some questions regarding the "Select Category" in front-end "create download". I have archived more than 1,800 categories and now the selection of one category is quite difficult because they are ordered by ID.

1. How I can make categories to sort by name (ASC)?
2. Is it possible to make a cascade selection for category?

Thanks

  •  

ColinM

Hi
One way to limit the number of Categories listed in the Front End Create/Edit form is to make use of the Permissions about which User Groups can create or edit a Category.

Permissions in a Top level Category are normally cascaded down its sub category chain. So it is only necessary to set those.  Suppose for example you have top level categories called CatOne, CatTwo and CatThree.  Then create User Groups called say OneUG, TwoUG and ThreeUG.   Use the jD Users Groups Settings to give these UGs a high ranking (say 131,132 and 133 respectively), that they can change categories, the types of file allowed and other such things.  Set the Permissions for CatOne so that OneUG is allowed to create and edit, leaving permissions for TwoUG and ThreeUG as inherited - do NOT use Deny as there may be unintended consequences! Now do the similar for CatTwo allowing create/edit for TwoUG and the same pattern for CatThree and ThreeUG.

When you set the permissions you MUST do a SAVE as this causes the cascading through the sub cats.

So a user who belongs to OneUG will only see those categories in CatOne and its subcats.  The discipline then comes on the login.

Not an ideal solution but it does make it more workable.
Also could you please put in a suggestion for being able to specify category order in front end create/edit and sy being able to show current level plus say 2 levels below.

Colin

Colin M
  •  

ciklon

Hi ColinM,
Thank you for the comprehensive explanatory answer on limiting categories and the use of rights for this purpose. I think this works, but I'm interested in sorting the categories in the drop-down menu.

- On my first question above - sorting the categories alphabetically, as in the old version 1.9.2.11

Screenshot of the configuration options jD 3.2.52:



Screenshot of the categories sorted alphabetically in jD 1.9.2.11:



Screenshot of categories not sorted alphabetically in jD 3.2.52:




- On my second question above - Category display type: cascading dropdowns. For example, categories have the following tree structure:

cat1
-cat1a
--cat1a1
---xxx
----xxx
cat2
-cat2a
--cat2a1
---xxx
----xxx
cat3
-cat3a
--cat3a1
---xxx
----xxx
xxx

Where cat1, cat2, cat3 are level1; cat1a, cat2a, cat3a are level2; cat1a1, cat2a1, cat3a1 are level3

One screenshot for such choice, but from another component:



  •  

ColinM

Hi,
Yes it does seem that the Front End Category sort is not being respected in the create/edit Download form but it is ok elsewhere - see pic below.  There is a complication compared to earlier versions as only those categories where the user group has create/edit permissions are shown.  Presently not sure if a bug or a suggestion :-\ ! Will discuss with Arno.

Presently one can set the number of levels shown but it is fixed at the selected number of levels below the top level.  I am not sure within the upload form how one would use the different levels as you indicated given the constraints. One needs to see the relationship between the parent and child categories.  I am aware that many users have the same name for a sub category but a different name for the the parent, for example using years as the parent levels and months as the child level.

Colin

[gelöscht durch Administrator]
Colin M
  •  

Arno

I think I could fix it now in next version 3.2.53 (coming very soon). It is now used always the sort order as defined in configuration for the frontend.
Best Regards / Gruß
Arno
Please make a Donation for jDownloads and/or write a review on the Joomla! Extensions directory!
  •  

ciklon

Thanks, I'm waiting for the next version when it's published.  :)
  •  

ciklon

Hi Arno,
After installing the new version 3.2.53, many of the categories are missing in the dropdown menu. :'(
  •  

ColinM

Hi
V3.2.53 not yet released officially - think Arno sent you a test version so perhaps you could identify the missing categories. 
Note that only those that are visible and user has required permissions for create, edit and download will be listed so I would not expect to see all categories.
Colin
EDIT I have now checked this and as suspected when creating a Download only those Categories with both View Access and with create, edit and download permissions are shown in the Pull Down.  They are of course listed in the correct order as selected.
C
Colin M
  •  

ciklon

Probably a test version downloaded here. I apologize for not specifying this before.
Showing 166 of 1,875 categories, their number being the same for a super user and a regular registered user.


[gelöscht durch Administrator]
  •  

ciklon

After installing the version 3.2.53 published on the site and using various configuration options i noticed  the following  in the create  form :
Only displayed categories  with public access regardless of the group of the user who logged into the site.

If I use "Categories default sort order / Category Manager order" are shown 1285 categories (maybe only  all categories  with public access).
If I use "Categories default sort order / Title Alphabetical" are shown 140 categories (only public access).
If I use "Categories default sort order / Title Reverse Alphabetical" are shown 1285 categories (maybe all categories only with public access).

Some solution for this issue?

Thanks
  •  

ColinM

Hi
Have you set up the ranking value for the User Groups Settings for user groups entitled to upload?  Note because of the inheritance factors every one is an implied member of the public group.

What have you set the permissions on the public user group  - did you set via the Options Button? Only the those UGs with create and Edit permissions are listed.
Are you sure you set by User Group?  For the uploaders which User Group did you set as Parent - best if you use Registered as Parent

Colin
Colin M
  •  

ciklon

Attached screenshoots for user group options.

Solution for
QuoteIf I use "Categories default sort order / Title Alphabetical" are shown 140 categories (only public access).
- Show the same number of categories as the other options:

Edit mysite/administrator/components/com_jdownloads/models/fields/jdcategoryselecteditfe.php

#75               $query->order('a.level ASC, a.title ASC');

add             a.parent_id ASC

#75              $query->order('a.level ASC, a.parent_id ASC, a.title ASC');


I still do not have a decision to display the categories according to the specified access rights. Even as a super user, only those categories with public access are visible.

[gelöscht durch Administrator]
  •  

ColinM

Hi
Thanks for all the pics.  I can see that you are using the Options button to set the Component  permissions.  Noted that the Premiun, Elite and Platinum UGs all have the same capability. 
How many top level categories do you have?  It is normally better to leave the Component Permissions as Inherited and set the required permissions on the Top Level Categories.  This gives much more flexibility and control.
Have you used Deny permission anywhere?  This causes unexpected side effects and should not be used normally. If you have or think you may have then use the jD Tools to reset permissions on Categories and on Downloads.
You should also grant Edit Permission.
What view Access have you set?
Would be much simpler if I could look directly

COlin
Colin M
  •  

ciklon

Hi
Deny permissions for download and upload only for "Public".
I Sent you PM with data for login.
  •  

Arno

Hi,
sad to say but in the version 3.2.43 exist a bug with the category select box. So it was required to publish a new version with the old (unsorted) sort order. I have in the moment not the time to fix the bug as it is a little bit tricky.  ::)


Best Regards / Gruß
Arno
Please make a Donation for jDownloads and/or write a review on the Joomla! Extensions directory!
  •