1
0
mirror of https://github.com/e107inc/e107.git synced 2025-10-12 13:34:39 +02:00

Styled for smaller thumbnails in slideshow mode.

This commit is contained in:
CaMer0n
2012-04-25 10:38:12 +00:00
parent e4605efb86
commit a4a433a148
4 changed files with 16 additions and 12 deletions

View File

@@ -16,11 +16,12 @@ class gallery_shortcodes extends e_shortcode
public $from = 0;
public $curCat = null;
public $sliderCat = 1;
public $slideMode = FALSE;
function sc_gallery_caption($parm='')
{
$tp = e107::getParser();
$text = "<a title='".$tp->toAttribute($this->var['media_caption'])."' href='".e107::getParser()->replaceConstants($this->var['media_url'],'abs')."' rel='lightbox[Gallery2]' >";
$text = "<a class='gallery-caption' title='".$tp->toAttribute($this->var['media_caption'])."' href='".e107::getParser()->replaceConstants($this->var['media_url'],'abs')."' rel='lightbox[Gallery2]' >";
$text .= $this->var['media_caption'];
$text .= "</a>";
return $text;
@@ -29,9 +30,10 @@ class gallery_shortcodes extends e_shortcode
function sc_gallery_thumb($parm='')
{
$tp = e107::getParser();
$class = ($this->slideMode == TRUE) ? 'gallery-slideshow-thumb' : 'gallery-thumb';
$att = ($parm) ?$parm : 'aw=190&ah=150';
$text = "<a title='".$tp->toAttribute($this->var['media_caption'])."' href='".e107::getParser()->replaceConstants($this->var['media_url'],'abs')."' rel='lightbox[Gallery]' >";
$text .= "<img src='".e107::getParser()->thumbUrl($this->var['media_url'],$att)."' alt='' />";
$text = "<a class='".$class."' title='".$tp->toAttribute($this->var['media_caption'])."' href='".e107::getParser()->replaceConstants($this->var['media_url'],'abs')."' rel='lightbox[Gallery]' >";
$text .= "<img class='".$class."' src='".e107::getParser()->thumbUrl($this->var['media_url'],$att)."' alt='' />";
$text .= "</a>";
return $text;
}
@@ -72,6 +74,7 @@ class gallery_shortcodes extends e_shortcode
function sc_gallery_slides($parm)
{
$this->slideMode = TRUE;
$amount = ($parm) ? intval($parm) : vartrue(e107::getPlugPref('gallery','slideshow_perslide'),3);
$tp = e107::getParser();
$list = e107::getMedia()->getImages('gallery_'.$this->sliderCat);