View Limits Module [NEEDS REFS]

Show Logged On users their Download Limits.

The jDownloads View Limits module will display the standard limits that have been set up for the logged on user in their highest ranked User Group together with how many downloads remain before one or more limits are exceeded.

The User Groups Settings allows setting  limits on how many Downloads and limits on the total accumulated size in Mbytes, that a member of a user group may make within a day, a week and a month.  There is also a limit available to specify the maximum number of new Downloads that may be created in a day.  Additionally there are two special limits, namely "Download Duration Restriction" and "Transfer Speed Restriction".  The module does not show the special limits.

For more details on setting up limits please see  documentation-v3-9/general-items/157-setting-user-limits

It should be noted that the module only operates for Logged On users; public and guest users do not have 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 [NEEDS REFERENCE].  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 is shown a message telling them they have exceeded their permitted level.  The message itself may be customised within the User Groups Settings.

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:
 
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
 Also do not forget to make a Module Assignment on the Menu Assignment tab.  Typically I set 'On all pages'.
If you are displaying the module directly then you need to assign it to a position, typically in a side bar position.

Examples
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 limits01Bview limits03view limits02
 
Note: To see the Download history you need to have an active jDownloads menu type 'List my Download History'. This could be in a 'hidden' menu.
See article [NEEDS REFERENCE] for more details (opens in new tab/window).

Using the Show Limits 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  Joomla! loadmodule  plugin. This will involve creating a copy of one of the existing layouts and editing it.
But it also requires that jDownloads supports Joomla! content plugins.  This setting is in Options - Front End tab - field "Activate support for all Joomla! content Plugins". 

Setting this field to Yes will then also show field "Plugin support only in descriptions".  Set these fields to Yes and No respectively as indicated opposite.
module view limits34


As an example we will use a copy of the Categories layout . This is simply done by opening the layout in the backend and using the 'Save as a Copy button. This will then create a new layout with the title "Standard Categories Layout (2)".
For more details on editing layouts you are advised to see article: [NEEDS REFERENCE]

The Subheader part of that Layout is shown opposite.

Just add the line
loadmodule mod_jdownloads_view_limits enclosed in { } 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
line in the sub header means it will only show in the overview
view limits31
 Another  suitable 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.module view limits35
view limits33
 

ColinM   8 January 2019

Print Email

This site uses cookies. By continuing to browse the site, you are agreeing to our use of cookies.