View Limits Module

Posted in Modules and Plugins v32

Shows Logged On users their download limits. (available from jDownloads 3.2.53 and higher)

The User Groups Settings allows limits to be set on how many Downloads, and the total size in Mbytes, that a user group may make within a day, a week and a month.


It should be noted that the module only operates for Logged On users; public and guest users are not shown limits. Further note that users may belong to multiple User Groups.  In this case the limits are taken from the User Group that has the higest jDownloads Ranking from all of those User Groups to which the user belongs.  For example if a User belongs to a User Group called say UG45 whose Parent User Group is Registered then if Registered has a higher jDownload Ranking than that of User Group UG45 then the limits for the member will be shown as belonging to the Registered User Group and those limits are used.

For more on jDownloads Ranking see Which User-Group is Used?

This is particularly obvious when using a new User Group as by default jDownloads sets a new group to have a zero ranking.


If a limit for the User Group is exceeded then the user recieves a message telling them they have exceeded their permitted level.  The message itself may be customised within the User Groups Settings to say which limit has been reached.

This can be incredibly annoying so the objective of the View Limits module is to be able to show users how many Downloads or how much Volume is available before they attempt to download a file.

This document is in several sections as noted below:

Setting limits for a User Group is very simple.  Suppose as an example we have User Groups called A-gradeUG and AAA-gradeUG where triple A rated users (AAA-gradeUG) have higher limits than the A rated users (A-gradeUG).  The limit values in User Groups Settings settings in this example are shown below.

view limits20B

The A-gradeUG limits are on both number and on volume but the AAA-gradeUG has no volume limits as well as being allowed more downloads in any time period.

The Number of Downloads, Transfer Speed Limit and the Daily Creation Limit are not currently shown in the View Limits Module

Setting up the limits is very straight forward.  In the jDownloads User Groups Settings just click on the name, such as A-gradeUG, and that will take you to the 'limits' and other settings specific to that user group.

Only the left hand side of the User Groups Settings page is shown.

Basically one just types the values into the relevant box.

If you do not wish the limit to apply then set it as a zero.

Each Limit has its own particular message shown to the user when  one or more limits have been reached.

The messages support multi-language capability.


Note that it is most important to set a Ranking Value.  This is essential as otherwise jDownloads will ignore the settings

In this example the ranking for A-gradeUG is 53 whilst for the AAA-gradeUG it is 57.

So if a user is a member of both User Groups then jDownloads will select the highest ranked UG from those to which the user belongs.

Why use values of 53 and 57?  The reason is that as well as being members of either, or both, of A-gradeUG or AAA-gradeUG a user is also an implicit member of the parent group, the grand parent group and so on because of the inheritance rules.

That is in this instance both A-gradeUG and AAA-gradeUG members will implicitly belong to the Registered User Group and the Public User Group.

The Registered UG has a ranking of 50 so we need to set the ranking at a  value higher than 50.

view limits21A


Module Configuration

 Configuring the View Limits module is the same as configuring most modules. Basically go to Extensions - Modules and click on the jDownloads View Limits module.

After configuring, the module setting could look like the picture opposite.

The Title shown in this example is the default title.

Clicking on the Message types box, as illustreated below, gives a choice of which limit to include in the view shown to the user.  In this example only the Daily limit has been selected so far. Just click on a limit to include it.

Tip: Holding down the Control key keeps the Pull Down on the screen so it is easier to add several items, but still one at a time.

view limits12


Because the module only shows limits for 'logged-on' users then it is best to set Access to Registered.

view limits11


The result is a display such as those shown opposite in the selected module position for three different User Groups.

The A-gradeUG had non zero values for all six limits but the AAA-gradeUG had only two non-zero setting so only those are shown.  The Super Users  had no limits set.

 view limits02view limits01Bview limits03

Note: To see the Downlad history you need to have an active jDownloads menu type 'List my Download History'. This could be in a 'hidden' menu.

See article Download History Menu Item for more details (opens in new tab/window).

Using module in a jDownloads Layout

A very convenient place to show a logged on user the remaining file and volume limits is at the Overview page of say a List All Categories view.

We can do this using the plugin. This will involve creating a copy of one of the existing layouts and editing it.

For more details on that see article: Editing a Layout

As an example we will use a copy of the Categories layout

"Standard Categories Layout V3.2"

The Subheader part of that Layout is shown opposite.

Just add the line

as shown.  Save & Close and then Activate the modified layout

view limits30

The result is as shown Opposite


It may be worthwhile configuring the module to disable

showing the the Title.


Placing the {loadmodule  } line in the sub header means it

will only show in the overview

view limits31

Another place to modify the same layout is in the main body

This will then show whenever a Category is being shown

as illustrated below.

view limits32

Note prior to capturing the image opposite the module

was modified to hide the Title.

view limits33

ColinM   28 July 2017