function zem_article_image($atts) { global $thisarticle,$pfr,$img_dir, $id; if (is_array($atts)) extract($atts); $break = (empty($break)) ? "" : $break; $wraptag = (empty($wraptag)) ? "" : $wraptag; $limit = (empty($limit)) ? 1 : $limit; if (!empty($thisarticle["article_image"])) { $images = array_slice(split(",", $thisarticle["article_image"], $limit + 1), 0, $limit); foreach ($images as $id) { if (is_numeric($id)) { $rs = safe_row("*", "txp_image", "id='$id' limit 1"); if ($rs) { extract($rs); if (empty($thumbs)) { $out[]= "\"{$alt}\""."; } elseif (!empty($rs["thumbnail"])) { $out[]= ""."\"{$alt}\"".".""; } } } } if (is_array($out)) { if ($break == "li") { return ($wraptag) ? tag("
  • ".join("
  • \n
  • ",$out)."
  • ",$wraptag) : "
  • ".join("
  • \n
  • ",$out)."
  • "; } return ($wraptag) ? tag(join($break.n,$out),$wraptag) : join($break.n,$out); } } } function zem_article_thumb($atts) { $atts["thumbs"] = 1; return zem_article_image($atts); }