dbFields = array( 'shortname'=>'', 'enablePages'=>false, 'enablePosts'=>true, 'enableDefaultHomePage'=>false ); } function __construct() { parent::__construct(); global $Url; // Disable the plugin IF ... $this->disable = false; if( (!$this->getDbField('enablePosts')) && ($Url->whereAmI()=='post') ) { $this->disable = true; } elseif( (!$this->getDbField('enablePages')) && ($Url->whereAmI()=='page') ) { $this->disable = true; } elseif( !$this->getDbField('enableDefaultHomePage') && ($Url->whereAmI()=='page') ) { global $Site; if( Text::isNotEmpty($Site->homePage()) ) { $this->disable = true; } } elseif( ($Url->whereAmI()!='post') && ($Url->whereAmI()!='page') ) { $this->disable = true; } } public function form() { global $Language; $html = '