ExternalResources
ExternalResources is a core plugin, it allows the system administrator to point references to some (or all) static resources to another server (on an individual basis, or all-in-one). This allows for parallel downloading of resources, giving a faster page load. Where the Google hosted JQuery libraries are used, this can greatly improve load times.
The only file not supported is info.php as the keyfile needs to reside on the same domain as the rest of PHPCredLocker.
Plugin Configuration
The configuration file contains two key options
- active - Is the plugin enabled?
- url - The main resources path to use, this allows all files (except info.php) to be automatically redirected to another URL. Each file's path will be appended onto the end
Additional configuration
It's also possible to override on a per-resource basis: To load JQuery from googlecode, set the following.
$this->js->jquery->url = 'https://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js';
Essentially, the url parameter overrides all other settings (except disabled). You can set any of the following
- url - A full url to the resource. Takes precedence over all other settings
- path - Any directories within the resources dir (for example, bootstrap CSS is bootstrap/css/)
- fname - The filename to load (.js will be appended automatically)
- forcemin - Force use of minimal code, takes one of three options - false, ".min","". The first disables the setting, the second forces the fname to be followed by .min and the final ensures that .min will never be added, regardless of the main system config
Supported Resources
Resources must be specified by internal name, the following are used in PHPCredLocker
- css->bootstrap
- css->bootstrapresponsive
- css->jquerytooltip
- js->jquery
- js->bootstrap
- js->jquerytooltip
- js->main
- js->base64
Each can be overriden in the plugin config in the manner specified above