Monitoring Options and Checking the Download Area

Introduction

This article deals with both using the the Monitoring system and setting up the Monitoring tab in Options.

The monitoring possibilities available in jDownloads have beeen significantly enhanced compared to those in previous versions.  In particular one can run a precheck, and also select to monitor a limited numer of Categories.

These particularly assist when uploading a large number of folders and files in order to make them into jDownloads Categories and Downloads.  The folders and files could have been uploaded to the appropriate location with say an FTP utility such as FileZilla, or by using your c-panel file manager or similar.

It is the 'jDownloads Administrator Monitoring' module that provides the 'Check Download Area' capability. The default module location 'jdcpanel' displays the module in the jDownloads control panel.  If you select the module location as 'cpanel' then it will appear in the Joomla! control panel.

An efficient method of creating these into Categories and Downloads is to use the button check button located at the bottom of the Control Panel the jDownloads Control Panel.

This assumes that you have uploaded the folders and files into the jDownloads 'region' whose default root directory is called 'jdownloads' and is located in the joomla root directory: <joomla-root>/jdownloads.  

The default setup for the Check Download Area is a 'test run'.

Dependant on the settings then a test run is carried out so that one can see if there are any problems.  Once activated a new panel opens and shows the progress.  On completion the view is like the picture on the right, which was for a 'Full Scan'.

Part way down is a View Details button that will show the 'log' of the items added.  This is also available in the Monitoring Log option in the Information Area.

It is advised that you examine these details to confirm all is well.



monitor00monitor01
At the bottom of the panel there is an option to make the changes permanent. If making the changes permanent is choosen then jDownloads reruns the monitoring but this time actually making the database entries.

Adding directories and files to create Categories and Downloads respectively involves making a significant number of database entries.  If there are only a modest number of existing Categories and Downloads, say around 1000 or less, and say just a couple of hundred new items one would do a Full Scan.  The options 'Monitor All Folders' and 'Monitor all FileTypes' determine, respectively, which folders and files are included in the search.  The default setting for these options are All Folders and All File Types.

But if there are many Categories or many Downloads already in jDownloads or you are adding a large number of directories and files then dependant upon your server the process may run out of the current PHP execution time limit.  Selecting in turn the options 'Search only for new directories' and  'Search only for new files' reduces the possibilty of exceeding the execution time limit.

Monitoring Types

There are five monitoring choices as noted below:
  1. Full scan
  2. Search only for new Directories
  3. Search only for new Files
  4. Check only for the existence of Categories
  5. Check only for the existence of Downloads

Scanning for new items

The first three options support the choice of a test run first.  In all cases, especially when there area large number of folders and files to be converteted into Categories and Downloads, see the notes below about restricting the search region and the setting of options 'Monitor all File Types' and 'Monitor All Folders'.

Full Scan  does what it says and looks for new directories and new files in the selected part  of the Download Area.  If it is not a test run then jDownloads will make the relevant database entries.
Search for New Directories will only look for new directories in the Download Area.  Again if it is not a test run then jDownloads will make the relevant database entries in the Category table.
Search for New Files will only look for new files, which must be in an existing category in the Download Area.  Similarly  if it is not a test run then jDownloads will make the relevant database entries in the Downloads table.  As with the Categories Search.

That is in the situation where you are dealing with a large number of entries then obviously do a Search only for new directories and, if successful, follow by Search only for new files.

Checking existence

The other two options, 'Check only for the existence of Categories' and 'Check only for the existence of Downloads', check the compatibility of the database entries for Categories and Downloads against the actual directories and files that exist on the server.

As an example a 'Check only for the existence of Categories' option was run.  If all is well then a message like the one on the right is shown.monitor02
To simulate a fault, the name of one of the directories was changed and the Check only for the existence of Categories option was run again as a 'Test Run'.

This time the message block showed the 'View Details' pulldown.  After clicking on View Details it showed that there was a missing directory.  If following the test Run you decide to make the change Permanent then the category will be unpublished.

monitor03
It is recommended that if the 'View Details' link appears then you should use it to check the report.

Adding many items

Adding directories and files to create Categories and Downloads respectively involves making a significant number of database entries.  If there are only a modest number of existing Categories and Downloads, say around 1000 or less, and say just a couple of hundred new items one would do a Full Scan. This always searches all directories in the Download Area for new directories and new files.

But if there are many Categories or many Downloads already in jDownloads or you are adding a large number of directories and files then dependant upon your server the process may run out of the current PHP execution time limit. 

Selecting in turn the options 'Search only for new directories' and 'Search only for new files' reduces the possibilty of exceeding the execution time limit.

Restricting the Search

To assist when there are a large number of entries to be checked there are two options in the Monitoring setup, 'Monitor all File Types' and 'Monitor All Folders', that will respectively restrict the file types that are consider for Downloads and  selecting those directories that are to be either included or excluded in the monitoring.

This limiting of the search path only applies to the 'Full Scan', the  'Search only for new directories' and the 'Search only for new files' settings. 

The other two monitoring choices which Check for existence always search all directories. 

The monitoring report will give you a reminder that a selective search region has been set as illustrated opposite with the  " Not all! Selective search is set " messages.
monitor04
The message shown was when using a Full Scan.  For very large sites then a suitable scheme might be to do the 'Search only for new directories' and, if successful, follow by 'Search only for new files'.

Configuring the Monitoring Options - General

From Joomla! 3.9 and higher, configuring components such as jDownloads is  by clicking on an Options button in the component.  For jDownloads the Options button is on the top right of the Control Panel as illustrated below.

monitor05

The Monitoring Tab options may be considered in three sections.
  1. Those options relating to the use of the  button check button on the jDownloads Control Panel.
  2. Options providing default descriptions for Categories and Downloads.
  3. Other options.

Use Test Run First

The first option in this section is 'Use Test Run'.  The default value is Yes.

This setting is particularly useful as it allows checking of errors and how many new files and directories have already been created as Downloads and Categories, and how many of each type are to be added.


monitor06
It allows any errors to be determined before committing to make the folders and files into Categories and Downloads.

If it is set to No then Categories and Downloads will be created without the precheck.

Monitor all file types

The default setting for option 'Monitor all File Types' is Yes.

When set to No then the option 'Monitor only the following File Types' appears as illustrated opposite.
monitor07

Enter the required types as a comma separated list.

Monitor all Folders

The Default setting for option 'Monitor All Folders' is Yes but when set to No then two additional options are shown which are useful when dealing with  large amounts of data.

The first of these options is 'Exclude or Include'. It allows either Excluding or Including the specified Folders and any Files in those folders from the monitoring.

The second option,'Folders List', shows the list of Folders that are to be included or excluded. Each specified folder in the 'chain' must be given on a separate line.

Because this may be a little complex initially, an extened example is given.

In this example as shown opposite the first two lines of the option 'Folders List' correspond to the top level categories Public and TopA.

The third line refers to a first level subcategory of TopB called books. 
monitor08
The Public and TopA categories and all their subcategories, and also subcategory TopB/books and all its subcategories, would be excluded from being checked for new folders and files.

It would however include category TopB and all its subcategories except those in subcategory 'books' and any of is subcategories.

This Exclude example is illustrated in more detail below. With the 'Exclude or Include' option set to button exclude the 'green' zone is excluded and the 'red' zone is included in the search.  If instead the 'Exclude or Include' option had been set to button exclude  the situation is reversed.

Recall that the incude and exclude options apply to the contents of the folders and any sub folders and files in them.

Note Do not include the Joomla! root or the base of the Downloads area in the list.
monitor09
In my test site about half the entries are in the Public and TopA categories and their sub categories.  So for monitoring one half I set 'Exclude' and for monitoring the other half I use 'Include'.

Automatic Publishing

The option 'Automatically Publish new found items' has a default setting of Yes.monitor11

This will then automatically Publish any new Category or Download found during the monitoring when making changes permanent.  Setting No leaves them unpublished.
 

Adding Descriptions

As the option titles suggest, options  'Default Downloads Description' and 'Default Category Description' allows you to specify a default descriptions for new Downloads and Categories created by the monitoring process.

The Default setting for both is an empty description.
monitor12

As shown both descriptions support multilingual text.  The text shown in the front end then depends on the language setting. See multilingual for more details.

Configuring - Extra Settings

Overview

This section allows uploading new Categories and Download with specific settings.

The Extra settings for Categories and for Downloads are activated by setting the relevant Option to Yes.  These are looked at in more detail below.

The 'Automatically disable both of the above Options after each scan' is a special option, it does as it name suggests.  That is after a Scan both of the 'Extra Settings' options will be turned off automatically by setting them to No.

This does not apply to a Test Run scan, only to scans that make changes permanent.  This could be an scan initiated by a 'cron' automatic scan.
exra options01

Extra settings for Categories

There are several available extra options for categories. 

Most of the options use pull down lists to select the available possibilities.

That is, apart from the description, you cannot specify something that has not been setup previously.

A special mention is made for tags.  Specifically you cannot type in a new tag name, you can only use existing tags.

Note that these settings will apply to the next monitoring scan that actually creates new categories.  This could be a 'cron' automonitoring scan
extra options02

An example from the backend showing an existing category (yellow folder) and two categories added using the Extra Categories option.
extra options04

Extra settings for Downloads

The extra setting for Dowloads are very similar to those available with Categories.

Again most options are specified by using a pull down. 

The Decription and Price options are specified directly. 

Note in particular these settings will apply to all of the Downloads created in the next monitoring scan, so be careful with the Price option!
extra options03

Example from the frontend of some new downloads added using the Extra Downloads option.
extra options05

Configuring - Other Options

Optimise Server Settings

The default setting for option 'Optimise Server Settings' is Yes. monitor13
When Yes, jDownloads will try to optimise relevant server limits for the monitoring script to prevent timeouts.

However in some situations it is useful to leave the server limits at their own values.

View additional info

The default setting for option 'View additional Information' is No..monitor14
When set to Yes relevant web server settings in the active php.ini file are shown in the monitor14B Tab on the jDownloads Control Panel.

The set shown opposite as an example are from an XAMPP test site.  The Maximum input and execution time are probably much higher that those use on a web based site.
monitor14A

Log file size

The option 'Maximum Monitoring Log File Size' is the the maximum size in kB of the Monitoring Log file. monitor15
When the maximum size is reached the 'oldest' entries are removed to make sufficient space for the next entry. Default: 32 - that is 32kB.

Colin Mercer February 2019, Updated August 2020

Tags: index

Print Email