Source for file class.plugin.php
Documentation is available at class.plugin.php
* @package linea21.modules
* @author Simon Georget <simon@linea21.com>
* @license http://opensource.org/licenses/gpl-3.0.html
throw new Exception($name. ' plugin : xml file was not found');
$this->info['name'] = $name;
$this->info['shortname'] = str_replace('l21_', '', $name);
$this->info['description'] = $flow->description;
$this->info['version'] = $flow->version;
$this->info['date'] = $flow->date;
$this->info['compatibility'] = $flow->compatibility;
$this->info['author'] = $flow->author;
$this->info['homepage'] = $flow->homepage;
$this->info['settings'] = (integer) $flow->settings;
$this->info['default_language'] = $flow->default_language;
$this->info['image'] = $flow->image;
$this->info['active_path'] = SITE_PATH. 'plugins/'. $this->info['name']. '/.active';
$this->info['active_url'] = SITE_ROOT_URL. 'plugins/'. $this->info['name']. '/';
$this->info['relative_url'] = '../plugins/'. $this->info['name']. '/';
foreach($flow->apps->app as $el) {
$this->info['apps'][]=(string) $el;
if(!empty($this->info['image'])) return true;
if($this->info['settings'] == true) return true;
return '../plugins/'. $this->info['name']. '/'. $this->info['image'];
public function getVar($varname) {
return $this->info[$varname];
// we check if the current app is concerned by the module
if(file_exists(SITE_PATH. 'plugins/'. $this->info['name']. '/__init__.php')) {
include_once(SITE_PATH. 'plugins/'. $this->info['name']. '/__init__.php');
if(file_exists(SITE_PATH. 'plugins/'. $this->info['name']. '/__install__.php')) {
include_once(SITE_PATH. 'plugins/'. $this->info['name']. '/__install__.php');
|