Plugins embedding third-party JS additions
They are more and more nice javascript addition for website. For example:
http://
http://
...
These products are client-only and don't interfere with the framework inner working. Using them is usually easy but can be made easier by slightly altering the controller so we can write embedding plugin (such as we do for tinyMCE) that can automatically provide them to the pages.
Blueprint information
Related branches
Sprints
Whiteboard
Writing such a plugin is very easy:
- config/
<class name="GUI_MyPlugin" alias="MyPlugin" plugin="MyPlugin" />
- includes/
class GUI_MyPlugin extends PHPDS_dependant implements iPHPDS_activableGUI
{
protected $path;
public function construct($path = null)
{
$this->path = $path;
}
public function activate()
{
$file = $this->
$this-
}
}
Now to use it (in a controller):
$this-
As a php class, the plugin do whatever is needed to check environment, license, pathes, whatever.
March 2015: I've changed the API slightly and added auto-activation; see http://