mirror of
https://github.com/e107inc/e107.git
synced 2025-08-01 20:30:39 +02:00
Styled for smaller thumbnails in slideshow mode.
This commit is contained in:
@@ -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);
|
||||
|
@@ -5,7 +5,7 @@
|
||||
|
||||
.gallery-list-start { clear:both; }
|
||||
|
||||
.gallery-list-item { width:190px; height:180px; float:left; margin:3px; border:1px solid #000000; background-color:#000000 }
|
||||
.gallery-list-item { -webkit-border-radius:5px; -moz-border-radius:5px; border-radius:5px; width:190px; height:180px; float:left; margin:3px; border:1px solid #000000; background-color:#000000 }
|
||||
|
||||
.gallery-list-end { text-align:center; clear:both; padding-top:20px; }
|
||||
|
||||
@@ -32,8 +32,9 @@
|
||||
|
||||
|
||||
/* SLIDESHOW */
|
||||
#gallery-slideshow-wrapper { width: 610px; height: 170px; overflow: hidden; background: #000000; margin-left:auto;margin-right:auto }
|
||||
#gallery-slideshow-content { width: 2500px; }
|
||||
#gallery-slideshow-content .slide { float: left; width: 600px; padding:10px; height: 160px; }
|
||||
.gallery-slideshow-controls { clear:both; width: 610px; margin-left:auto; margin-right:auto; padding-bottom:10px; }
|
||||
.gallery-slide-item { margin-right:5px; }
|
||||
#gallery-slideshow-wrapper { -webkit-border-radius:5px; -moz-border-radius:5px; border-radius:5px; width: 660px; height: 146px; overflow: hidden; background: #000000; margin-left:auto;margin-right:auto }
|
||||
#gallery-slideshow-content { width: 3500px; }
|
||||
#gallery-slideshow-content .slide { float: left; width: 660px; padding:12px; height: 146px; }
|
||||
.gallery-slideshow-controls { clear:both; width: 660px; margin-left:auto; margin-right:auto; padding-bottom:10px; }
|
||||
.gallery-slide-item { margin-right:8px; }
|
||||
.gallery-slideshow-thumb { -webkit-border-radius:5px; -moz-border-radius:5px; border-radius:5px; }
|
||||
|
@@ -17,10 +17,10 @@
|
||||
</mainPrefs>
|
||||
<pluginPrefs>
|
||||
<pref name="slideshow_category">1</pref>
|
||||
<pref name="slideshow_perslide">3</pref>
|
||||
<pref name="slideshow_perslide">4</pref>
|
||||
<pref name="slideshow_duration">1</pref>
|
||||
<pref name="slideshow_auto">1</pref>
|
||||
<pref name="slideshow_freq">3</pref>
|
||||
<pref name="slideshow_freq">4</pref>
|
||||
<pref name="slideshow_circular">1</pref>
|
||||
<pref name="slideshow_effect">scroll</pref>
|
||||
<pref name="slideshow_transition">sinoidal</pref>
|
||||
|
@@ -58,7 +58,7 @@ $GALLERY_TEMPLATE['SLIDESHOW_WRAPPER'] = '
|
||||
</div>
|
||||
';
|
||||
|
||||
$GALLERY_TEMPLATE['SLIDESHOW_SLIDE_ITEM'] = '<span class="gallery-slide-item">{GALLERY_THUMB}</span>';
|
||||
$GALLERY_TEMPLATE['SLIDESHOW_SLIDE_ITEM'] = '<span class="gallery-slide-item">{GALLERY_THUMB=aw=150&ah=120}</span>';
|
||||
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user