예제 #1
0
 /**
  * @return array  associative array of item properties in the form "name" => "value"
  */
 function detailsArray()
 {
     $ret = array();
     //generic properties
     if (!empty($this->date)) {
         $ret[$this->translator->_g("Date")] = $this->date;
     }
     if (!empty($this->location)) {
         $ret[$this->translator->_g("Location")] = $this->location;
     }
     if (!empty($this->desc)) {
         $ret[$this->translator->_g("Description")] = $this->desc;
     }
     if (!empty($this->email)) {
         $ret[$this->translator->_g("Email")] = $this->emailLink();
     }
     //image properties
     if (!empty($this->camera)) {
         $ret[$this->translator->_g("Camera")] = $this->camera;
     }
     if (!empty($this->lens)) {
         $ret[$this->translator->_g("Lens")] = $this->lens;
     }
     if (!empty($this->film)) {
         $ret[$this->translator->_g("Film")] = $this->film;
     }
     if (!empty($this->darkroom)) {
         $ret[$this->translator->_g("Darkroom manipulation")] = $this->darkroom;
     }
     if (!empty($this->digital)) {
         $ret[$this->translator->_g("Digital manipulation")] = $this->digital;
     }
     //special properties
     if (!empty($this->copyright)) {
         $ret[$this->translator->_g("Copyright")] = $this->copyright;
     } elseif (!empty($this->artist)) {
         $ret[$this->translator->_g("Copyright")] = $this->artist;
     }
     if ($this->config->show_views) {
         $ret[$this->translator->_g("Viewed")] = $this->translator->_ng("viewed|%s time", "viewed|%s times", $this->hits);
     }
     return $ret;
 }
예제 #2
0
 /**
  * @return string link for adding a comment to image
  */
 function imageCommentLink()
 {
     return "<a href=\"" . $this->formatURL($this->gallery->idEncoded(), $this->image->id, null, "addcomment") . "\">" . $this->translator->_g("Add a comment") . "</a>";
 }