dbFields = array( 'shortname'=>'', 'enablePages'=>false, 'enablePosts'=>false, 'enableDefaultHomePage'=>false ); } function __construct() { parent::__construct(); global $Url; $this->enable = false; if( $this->getDbField('enablePosts') && ($Url->whereAmI()=='post') ) { $this->enable = true; } elseif( $this->getDbField('enablePages') && ($Url->whereAmI()=='page') ) { $this->enable = true; } elseif( $this->getDbField('enableDefaultHomePage') && ($Url->whereAmI()=='home') ) { $this->enable = true; } } public function form() { global $Language; $html = '
'; $html .= ''; $html .= ''; $html .= '
'; $html .= '
'; $html .= 'getDbField('enablePages')?'checked':'').'>'; $html .= ''; $html .= '
'; $html .= '
'; $html .= 'getDbField('enablePosts')?'checked':'').'>'; $html .= ''; $html .= '
'; $html .= '
'; $html .= 'getDbField('enableDefaultHomePage')?'checked':'').'>'; $html .= ''; $html .= '
'; return $html; } public function postEnd() { if( $this->enable ) { return '
'; } return false; } public function pageEnd() { if( $this->enable ) { return '
'; } return false; } public function siteHead() { if( $this->enable ) { return ''; } return false; } public function siteBodyEnd() { if( $this->enable ) { $html = ' '; return $html; } return false; } }