toAttribute($this->var['media_caption'])."' href='".e107::getParser()->replaceConstants($this->var['media_url'],'abs')."' rel='lightbox.Gallery2' >"; $text .= $this->var['media_caption']; $text .= ""; return $text; } function sc_gallery_thumb($parm='') { $tp = e107::getParser(); $w = 190; $h = 150; $class = ($this->slideMode == TRUE) ? 'gallery-slideshow-thumb' : 'gallery-thumb'; $rel = ($this->slideMode == TRUE) ? 'lightbox.SlideGallery' : 'lightbox.Gallery'; $att = vartrue($parm) ? $parm : 'aw='.$w.'&ah='.$h ; // 'aw=190&ah=150'; $pop_w = vartrue(e107::getPlugPref('gallery','pop_w'),1024); $pop_h = vartrue(e107::getPlugPref('gallery','pop_h'),768); $attFull = 'w='.$pop_w.'&h='.$pop_h; $wm_text = vartrue(e107::getPlugPref('gallery','watermark_text')); $wm_font = vartrue(e107::getPlugPref('gallery','watermark_font')); $wm_size = vartrue(e107::getPlugPref('gallery','watermark_size'),20); $wm_pos = vartrue(e107::getPlugPref('gallery','watermark_pos'),"BR"); $wm_color = vartrue(e107::getPlugPref('gallery','watermark_color'),"fff"); $wm_opacity = vartrue(e107::getPlugPref('gallery','watermark_opacity'),"70"); $wm_padding = vartrue(e107::getPlugPref('gallery','watermark_padding'),"5"); /* "wmt" (WaterMarkText) [ex: &fltr[]=wmt||||||||] where: is the text to use as a watermark, is the font size (1-5 for built-in font, or point size for TrueType fonts), is the alignment (one of BR, BL, TR, TL, C, R, L, T, B, * where B=bottom, T=top, L=left, R=right, C=centre, *=tile), is the hex color of the text is the filename of the TTF file (optional, if omitted a built-in font will be used) is opacity from 0 to 100, is the edge (and inter-tile) margin in percent is the angle */ if($wm_text) { $attFull .= "&wm=".$wm_text."|".$wm_size."|".$wm_pos."|".$wm_color."|".$wm_font."|".$wm_opacity."|".$wm_padding; } // echo "

".$attFull; $text = "
"; $text .= ""; $text .= ""; return $text; } function sc_gallery_cat_title($parm='') { $tp = e107::getParser(); $text = ""; $text .= $tp->toHtml($this->var['media_cat_title']); $text .= ""; return $text; } function sc_gallery_cat_thumb($parm='') { $att = ($parm) ?$parm : 'aw=190&ah=150'; $text = ""; $text .= ""; $text .= ""; return $text; } function sc_gallery_nextprev($parm='') { $url = e_SELF."?cat=".$this->curCat."--AMP--frm=--FROM--"; $parm = 'total='.$this->total.'&amount='.$this->amount.'¤t='.$this->from.'&url='.$url; // .'&url='.$url; $text .= e107::getParser()->parseTemplate("{NEXTPREV=".$parm."}"); return $text; } function sc_gallery_slideshow($parm='') { $this->sliderCat = ($parm) ? intval($parm) : vartrue(e107::getPlugPref('gallery','slideshow_category'),1); $template = e107::getTemplate('gallery','gallery','SLIDESHOW_WRAPPER'); return e107::getParser()->parseTemplate($template); } function sc_gallery_slides($parm) { $this->slideMode = TRUE; $amount = ($parm) ? intval($parm) : 3; // vartrue(e107::getPlugPref('gallery','slideshow_perslide'),3); $tp = e107::getParser(); $list = e107::getMedia()->getImages('gallery_'.$this->sliderCat); $item_template = e107::getTemplate('gallery','gallery','SLIDESHOW_SLIDE_ITEM'); $count = 1; foreach($list as $row) { $this->setParserVars($row); $inner .= ($count == 1) ? "\n\n\n\n\n" : ""; if($count == $amount) { $count = 1; $this->slideCount++; } else { $count++; } } $inner .= ($count != 1) ? "" : ""; return $inner; } function sc_gallery_jumper($parm) { // echo "SlideCount=".$this->slideCount; if($this->slideCount ==1 ){ return "gallery-jumper must be loaded after Gallery-Slides"; } $text = ''; for($i=1; $i < ($this->slideCount +1); $i++) { $val = ($parm == 'space') ? " " : $i; $text .= ''.$val.''; } return $text; } } ?>