public function parseValue($value)
 {
     if (!$value || $value == '0000-00-00 00:00:00') {
         if (is_object($this->listing)) {
             return $this->listing->created;
         }
     }
     return parent::parseValue($value);
 }
 public function canEdit($userID = null)
 {
     $app = JFactory::getApplication();
     if ($app->isSite()) {
         return false;
     } else {
         return parent::canEdit($userID);
     }
 }
 public function getOutput($options = array())
 {
     if (!$this->isPublished()) {
         return "";
     }
     if (intval($this->value) == 0) {
         $this->setVariable('value', $this->value);
         return $this->fetch('output.php', __CLASS__);
     } else {
         return parent::getOutput();
     }
 }
 public function storeValue($value)
 {
     if (!$value) {
         $db = JFactory::getDbo();
         $value = $db->getNullDate();
     }
     if ($value != $this->listing->updated) {
         return parent::storeValue($value);
     } else {
         return true;
     }
 }
 public function getInput($fieldValue = null)
 {
     if (!$this->isPublished()) {
         return "";
     }
     $app = JFactory::getApplication();
     if ($app->isSite()) {
         $value = !is_null($fieldValue) ? $fieldValue : $this->value;
         $this->setAttribute("type", "text", "input");
         $this->addAttribute("class", $this->getInputClass(), "input");
         $this->addAttribute("class", "readonly", "input");
         if ((int) $this->params->get("size", 32)) {
             $this->setAttribute("size", (int) $this->params->get("size", 32), "input");
         }
         $this->setAttribute("readonly", "readonly", "input");
         $this->setVariable('value', $value);
         return $this->fetch('input.php', __CLASS__);
     } else {
         return parent::getInput($fieldValue);
     }
 }