Access Denial

This is the most easiest preload sample. This preload deny access except the specific IP.

How to install

This may be your first contact with preload. Preload is shared files for site owners. They can customize their site with putting these files to the preload directory.

Download this preload from here, and put it to your /preload directory. By that, your site will come not to work for accesses except This IP is defined as the constant in the file. Change it, and try accessing again. Recovers your site by removing the file.

Detailed comments on this sample

There are two kinds of preload which are Site Preload and Module Preload. Module Preload is a part of the module, but it is not for site owners who want to customize their site.

Legacy System tries to load all files which are in /preload directory, but an extension of these files has to be ".class.php".

By property of PHP, preload file is loaded, parsed and executed. Therefore, you can write code in the preload file without functions and classes. But, Legacy doesn't recommend it.

You should understand XCube_ActionFilter and use it. XCube_ActionFilter is a kind of the task. Unlike mojavi and others, XOOPS Cube doesn't use ActionFilter as the initialization pipe-line process. They are optional extensions which does additional customizations.

The Class Naming Convention

You declare your sub-class of XCube_ActionFilter in your preload file. Your sub-class name has to equal body name of its file.

The file name is "AccessDenial.class.php" in this sample. Therefore, its sub-class name is "AccessDenial".

For more informations of XCube_ActionFilter, read comments of XCube_ActionFilter source code. Or you can get those comments as documents with Doxygen.