public function onBeforeWrite()
    {
        parent::onBeforeWrite();
        $siteConfig = SiteConfig::current_site_config();
        if ($siteConfig->MustApprove) {
            $this->Visible = false;
        }
        if (substr($this->URL, 0, 4) != 'http' && $this->URL != '') {
            $this->URL = 'http://' . $this->URL;
        }
        /** setup the MD5 for Gravatar usage */
        $this->MD5Email = md5($this->Email);
        if ($siteConfig->AkismetKey) {
            $this->checkAkismet($siteConfig);
        }
        /** PHP and HTML do not like each other I guess. */
        $this->Comment = nl2br($this->Comment);
    }
public function onBeforeWrite()
    {
        parent::onBeforeWrite();
        $siteConfig = SiteConfig::current_site_config();
        if ($siteConfig->MustApprove) {
            $this->Visible = false;
        }
        if (substr($this->URL, 0, 4) != 'http' && $this->URL != '') {
            $this->URL = 'http://' . $this->URL;
        }
        /** setup the MD5 for Gravatar usage */
        $this->MD5Email = md5($this->Email);
        if ($siteConfig->AkismetKey) {
            $this->checkAkismet($siteConfig);
        }
        /** PHP and HTML do not like each other I guess. */
        $this->Comment = nl2br($this->Comment);
    }
public function onBeforeWrite ( ) { parent :: onBeforeWrite ( ) ; $ siteConfig = SiteConfig :: current_site_config ( ) ; if ( $ siteConfig -> MustApprove ) { $ this -> Visible = false ; } if ( substr ( $ this -> URL , 0 , 4 ) != 'http' && $ this -> URL != '' ) { $ this -> URL = 'http://' . $ this -> URL ; } /** setup the MD5 for Gravatar usage */ $ this -> MD5Email = md5 ( $ this -> Email ) ; if ( $ siteConfig -> AkismetKey ) { $ this -> checkAkismet ( $ siteConfig ) ; } /** PHP and HTML do not like each other I guess. */ $ this -> Comment = nl2br ( $ this -> Comment ) ; }
Setup the visibility and check the URI, because ppl forget about it.
Also, check Akismet.
Setup the visibility and check the URI because ppl forget about it . Also check Akismet .