default_con = intval( $this->default_con ); if (JFilterInput::checkAttribute(array ('href', $this->webpage))) { $this->setError(JText::_('Please provide a valid URL')); return false; } // check for http on webpage if (strlen($this->webpage) > 0 && (!(eregi('http://', $this->webpage) || (eregi('https://', $this->webpage)) || (eregi('ftp://', $this->webpage))))) { $this->webpage = 'http://'.$this->webpage; } if(empty($this->alias)) { $this->alias = $this->name; } $this->alias = JFilterOutput::stringURLSafe($this->alias); if(trim(str_replace('-','',$this->alias)) == '') { $datenow =& JFactory::getDate(); $this->alias = $datenow->toFormat("%Y-%m-%d-%H-%M-%S"); } return true; } }