From 1a88d1921a20f7c452208510913264337cd48544 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=81Z=C3=81R=20Imre=20AI=20Agent?= Date: Thu, 16 Jul 2026 11:24:50 +0200 Subject: [PATCH] feat(deployed): add mod_sp_simple_gallery 3.0 (no-source, vetted live) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit SP Simple Gallery module (JoomShaper); unmapped -> deployed files. Signed-off-by: LÁZÁR Imre Assisted-by: claude-code@claude-opus-4-8 --- .../class.spThumbnail.php | 125 ++++++++++++++++++ .../elements/foldertree.php | 32 +++++ .../mod_sp_simple_gallery/elements/index.html | 1 + .../modules/mod_sp_simple_gallery/helper.php | 91 +++++++++++++ .../modules/mod_sp_simple_gallery/index.html | 1 + .../mod_sp_simple_gallery.php | 33 +++++ .../mod_sp_simple_gallery.xml | 47 +++++++ .../scripts/closelabel.gif | Bin 0 -> 971 bytes .../mod_sp_simple_gallery/scripts/index.html | 1 + .../mod_sp_simple_gallery/scripts/loading.gif | Bin 0 -> 1588 bytes .../scripts/nextlabel.gif | Bin 0 -> 354 bytes .../scripts/prevlabel.gif | Bin 0 -> 371 bytes .../mod_sp_simple_gallery/scripts/slimbox.css | 83 ++++++++++++ .../mod_sp_simple_gallery/scripts/slimbox.js | 16 +++ .../scripts/slimbox_jquery.js | 15 +++ .../mod_sp_simple_gallery/tmpl/default.php | 18 +++ .../mod_sp_simple_gallery/tmpl/index.html | 1 + 17 files changed, 464 insertions(+) create mode 100644 deployed/mod_sp_simple_gallery/modules/mod_sp_simple_gallery/class.spThumbnail.php create mode 100644 deployed/mod_sp_simple_gallery/modules/mod_sp_simple_gallery/elements/foldertree.php create mode 100644 deployed/mod_sp_simple_gallery/modules/mod_sp_simple_gallery/elements/index.html create mode 100644 deployed/mod_sp_simple_gallery/modules/mod_sp_simple_gallery/helper.php create mode 100644 deployed/mod_sp_simple_gallery/modules/mod_sp_simple_gallery/index.html create mode 100644 deployed/mod_sp_simple_gallery/modules/mod_sp_simple_gallery/mod_sp_simple_gallery.php create mode 100644 deployed/mod_sp_simple_gallery/modules/mod_sp_simple_gallery/mod_sp_simple_gallery.xml create mode 100644 deployed/mod_sp_simple_gallery/modules/mod_sp_simple_gallery/scripts/closelabel.gif create mode 100644 deployed/mod_sp_simple_gallery/modules/mod_sp_simple_gallery/scripts/index.html create mode 100644 deployed/mod_sp_simple_gallery/modules/mod_sp_simple_gallery/scripts/loading.gif create mode 100644 deployed/mod_sp_simple_gallery/modules/mod_sp_simple_gallery/scripts/nextlabel.gif create mode 100644 deployed/mod_sp_simple_gallery/modules/mod_sp_simple_gallery/scripts/prevlabel.gif create mode 100644 deployed/mod_sp_simple_gallery/modules/mod_sp_simple_gallery/scripts/slimbox.css create mode 100644 deployed/mod_sp_simple_gallery/modules/mod_sp_simple_gallery/scripts/slimbox.js create mode 100644 deployed/mod_sp_simple_gallery/modules/mod_sp_simple_gallery/scripts/slimbox_jquery.js create mode 100644 deployed/mod_sp_simple_gallery/modules/mod_sp_simple_gallery/tmpl/default.php create mode 100644 deployed/mod_sp_simple_gallery/modules/mod_sp_simple_gallery/tmpl/index.html diff --git a/deployed/mod_sp_simple_gallery/modules/mod_sp_simple_gallery/class.spThumbnail.php b/deployed/mod_sp_simple_gallery/modules/mod_sp_simple_gallery/class.spThumbnail.php new file mode 100644 index 00000000..6c69ce57 --- /dev/null +++ b/deployed/mod_sp_simple_gallery/modules/mod_sp_simple_gallery/class.spThumbnail.php @@ -0,0 +1,125 @@ + image_to_resize ) ) + { + exit( "File " . $this -> image_to_resize . " does not exist." ); + } + + $info = GetImageSize( $this -> image_to_resize ); + + if( empty( $info ) ) + { + exit( "The file " . $this -> image_to_resize . " doesn't seem to be an image." ); + } + + $width = $info[ 0 ]; + $height = $info[ 1 ]; + $mime = $info[ 'mime' ];/* Keep Aspect Ratio? */ + if( $this -> ratio ) + { + $thumb = ( $this -> new_width < $width && $this -> new_height < $height ) ? true : false;// Thumbnail + $bigger_image = ( $this -> new_width > $width || $this -> new_height > $height ) ? true : false;// Bigger Image + if( $thumb ) + { + + if( $this -> new_width >= $this -> new_height ) + { + $x = ( $width / $this -> new_width ); + $this -> new_height = ( $height / $x ); + } + elseif( $this -> new_height >= $this -> new_width ) + { + $x = ( $height / $this -> new_height ); + $this -> new_width = ( $width / $x ); + } + } + elseif( $bigger_image ) + { + + if( $this -> new_width >= $width ) + { + $x = ( $this -> new_width / $width ); + $this -> new_height = ( $height * $x ); + } + elseif( $this -> new_height >= $height ) + { + $x = ( $this -> new_height / $height ); + $this -> new_width = ( $width * $x ); + } + } + }// What sort of image? + $type = substr( strrchr( $mime, '/' ), 1 ); + + switch( $type ) + { + case 'jpeg': + $image_create_func = 'ImageCreateFromJPEG'; + $image_save_func = 'ImageJPEG'; + $new_image_ext = 'jpg'; + break; + case 'png': + $image_create_func = 'ImageCreateFromPNG'; + $image_save_func = 'ImagePNG'; + $new_image_ext = 'png'; + break; + case 'bmp': + $image_create_func = 'ImageCreateFromBMP'; + $image_save_func = 'ImageBMP'; + $new_image_ext = 'bmp'; + break; + case 'gif': + $image_create_func = 'ImageCreateFromGIF'; + $image_save_func = 'ImageGIF'; + $new_image_ext = 'gif'; + break; + case 'vnd.wap.wbmp': + $image_create_func = 'ImageCreateFromWBMP'; + $image_save_func = 'ImageWBMP'; + $new_image_ext = 'bmp'; + break; + case 'xbm': + $image_create_func = 'ImageCreateFromXBM'; + $image_save_func = 'ImageXBM'; + $new_image_ext = 'xbm'; + break; + default: $image_create_func = 'ImageCreateFromJPEG'; + $image_save_func = 'ImageJPEG'; + $new_image_ext = 'jpg'; + }// New Image + + $image_c = ImageCreateTrueColor( $this -> new_width, $this -> new_height ); + + if ($type=='png') { + imagealphablending($image_c, false); + imagesavealpha($image_c, true); + } + $new_image = $image_create_func( $this -> image_to_resize ); + if ($type=='png') { + imagealphablending($new_image, true); + } + ImageCopyResampled( $image_c, $new_image, 0, 0, 0, 0, $this -> new_width, $this -> new_height, $width, $height ); + + $process = $image_save_func( $image_c, $this->save ); + return array( 'result' => $process, 'new_file_path' => $this->save ); + } +} \ No newline at end of file diff --git a/deployed/mod_sp_simple_gallery/modules/mod_sp_simple_gallery/elements/foldertree.php b/deployed/mod_sp_simple_gallery/modules/mod_sp_simple_gallery/elements/foldertree.php new file mode 100644 index 00000000..ebb809fd --- /dev/null +++ b/deployed/mod_sp_simple_gallery/modules/mod_sp_simple_gallery/elements/foldertree.php @@ -0,0 +1,32 @@ +element['directory']; + $filter = $this->element['filter']; + $folders = JFolder::listFolderTree($path, $filter); + + foreach ($folders as $folder) + { + $options[] = JHtml::_('select.option', str_replace("\\","/",$folder['relname']), str_replace("\\","/",substr($folder['relname'], 1))); + } + + return JHtml::_('select.genericlist', $options, $this->name, '', 'value', 'text', $this->value); + } +} \ No newline at end of file diff --git a/deployed/mod_sp_simple_gallery/modules/mod_sp_simple_gallery/elements/index.html b/deployed/mod_sp_simple_gallery/modules/mod_sp_simple_gallery/elements/index.html new file mode 100644 index 00000000..fa6d84e8 --- /dev/null +++ b/deployed/mod_sp_simple_gallery/modules/mod_sp_simple_gallery/elements/index.html @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/deployed/mod_sp_simple_gallery/modules/mod_sp_simple_gallery/helper.php b/deployed/mod_sp_simple_gallery/modules/mod_sp_simple_gallery/helper.php new file mode 100644 index 00000000..f7334e3a --- /dev/null +++ b/deployed/mod_sp_simple_gallery/modules/mod_sp_simple_gallery/helper.php @@ -0,0 +1,91 @@ +get('path'); + $thumbratio = $params->get('thumbratio', 1) ? true : false; + $thumbwidth = trim($params->get('thumbwidth', 100)); + $thumbheight = trim($params->get('thumbheight', 100)); + $files = JFolder::files(JPATH_BASE.$path,$filter); + + $i=0; + $lists = array(); + + + foreach ($files as $file) { + $image = modSPGalleryHelper::getImages($path.'/'.$file,$thumbwidth,$thumbheight,$thumbratio); + $lists[$i]['title'] = JFile::stripExt($file); + $lists[$i]['image'] = $image->image; + $lists[$i]['thumb'] = $image->thumb; + $i++; + } + return $lists; + } + + static function getImages($image, $thumbwidth=100, $thumbheight=100, $thumbratio) { + $images = new stdClass(); + $images->image = false; + $images->thumb = false; + + $paths = array(); + if (isset($image)) { + $image_path = $image; + + // remove any / that begins the path + if (substr($image_path, 0 , 1) == '/') $image_path = substr($image_path, 1); + + // create a thumb filename + $file_div = strrpos($image_path,'.'); + $thumb_ext = substr($image_path, $file_div); + $thumb_div = strrpos($image_path,'/'); + $thumb_paths = substr($image_path, 0, $thumb_div); + $thumb_prev = substr($image_path, strlen($thumb_paths), $file_div); + $thumb_path = $thumb_paths . '/thumbs' . $thumb_prev; + + if (!is_dir($thumb_paths . '/thumbs')) { + mkdir($thumb_paths . '/thumbs'); + } + + // check to see if this file exists, if so we don't need to create it + if (function_exists("gd_info")) { + // file doens't exist, so create it and save it + if (!class_exists("spThumbnail")) include_once('class.spThumbnail.php'); + + //Check existing thumbnails dimensions + if (file_exists($thumb_path)) { + $size = GetImageSize( $thumb_path ); + $currentWidth=$size[0]; + $currentHeight=$size[1]; + } + + //Creating thumbnails + if (!file_exists($thumb_path) || $currentWidth!=$thumbwidth || $currentHeight!=$thumbheight ) { + $thumb = new spThumbnail; + $thumb->new_width = $thumbwidth; + $thumb->new_height = $thumbheight; + $thumb->image_to_resize = $image_path; // Full Path to the file + $thumb->ratio = $thumbratio; // Keep Aspect Ratio? + $thumb->save = $thumb_path; + $process = $thumb->resize(); + } + } + + $images->image = $image_path; + $images->thumb = $thumb_path; + } + return $images; + } +} \ No newline at end of file diff --git a/deployed/mod_sp_simple_gallery/modules/mod_sp_simple_gallery/index.html b/deployed/mod_sp_simple_gallery/modules/mod_sp_simple_gallery/index.html new file mode 100644 index 00000000..fa6d84e8 --- /dev/null +++ b/deployed/mod_sp_simple_gallery/modules/mod_sp_simple_gallery/index.html @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/deployed/mod_sp_simple_gallery/modules/mod_sp_simple_gallery/mod_sp_simple_gallery.php b/deployed/mod_sp_simple_gallery/modules/mod_sp_simple_gallery/mod_sp_simple_gallery.php new file mode 100644 index 00000000..4ce05446 --- /dev/null +++ b/deployed/mod_sp_simple_gallery/modules/mod_sp_simple_gallery/mod_sp_simple_gallery.php @@ -0,0 +1,33 @@ +id; +$js_framework = $params->get('js_framework', 'mootools'); +$style = $params->get('custom_css', "border:1px solid #DDD; margin:0 5px 10px 5px; padding:5px; background:#fff;"); +$styles = 'img.sp_simple_gallery {' . $style . '}'; + +$document->addStyleSheet(JURI::base(true) . '/modules/mod_sp_simple_gallery/scripts/slimbox.css'); +if (JVERSION<3) { + if($js_framework=='mootools'){ + JHtml::_('behavior.framework'); + $document->addScript(JURI::base(true) . '/modules/mod_sp_simple_gallery/scripts/slimbox.js'); + } else { + $document->addScript(JURI::base(true) . '/modules/mod_sp_simple_gallery/scripts/slimbox_jquery.js'); + } +} else { + JHtml::_('jquery.framework'); + $document->addScript(JURI::base(true) . '/modules/mod_sp_simple_gallery/scripts/slimbox_jquery.js'); +} +$document->addStyleDeclaration( $styles ); + +require_once (dirname(__FILE__).'/helper.php'); +$list = modSPGalleryHelper::getimgList($params); +require(JModuleHelper::getLayoutPath('mod_sp_simple_gallery')); \ No newline at end of file diff --git a/deployed/mod_sp_simple_gallery/modules/mod_sp_simple_gallery/mod_sp_simple_gallery.xml b/deployed/mod_sp_simple_gallery/modules/mod_sp_simple_gallery/mod_sp_simple_gallery.xml new file mode 100644 index 00000000..111e9d41 --- /dev/null +++ b/deployed/mod_sp_simple_gallery/modules/mod_sp_simple_gallery/mod_sp_simple_gallery.xml @@ -0,0 +1,47 @@ + + + SP Image Gallery + JoomShaper.com + May 2010 + Copyright (C) 2010 - 2014 JoomShaper.com. All rights reserved. + http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL + support@joomshaper.com + www.JoomShaper.com + 3.0 + SP Image Gallery - Best lightweight image gallery module + + mod_sp_simple_gallery.php + helper.php + class.spThumbnail.php + index.html + elements/ + tmpl/ + scripts/ + + + +
+ + + + + + + + + + + + +
+
+ + + + + + +
+
+
+
\ No newline at end of file diff --git a/deployed/mod_sp_simple_gallery/modules/mod_sp_simple_gallery/scripts/closelabel.gif b/deployed/mod_sp_simple_gallery/modules/mod_sp_simple_gallery/scripts/closelabel.gif new file mode 100644 index 0000000000000000000000000000000000000000..af0cab2d77308533759e404186138d03f8acdbef GIT binary patch literal 971 zcmZ?wbh9u|bYc)=c*nr-@87@w|NmE2Ro%XQ`@n$%2M->cJ9lnmWaOnwmztZK*RNmy z_3PIsPoDJj^z7KNBOoAP%9JS~At7O5VR!D_IeGGAP*6}rL_}aTMlLqq@m z{rl?Gt8d@FojG&n?%li9)zt|J3E|=4ixw^V_3PKNWy}2i{e66VzJLFomX;PDAOGON z18;Bdd-v`wT)6PhpFbZye0cr(_3z)mw{G2ePygic_afojrTDva<5y$B!u~ zDN#{T&!0bk|Ni~v&6_uF-1zwMED{)I5FqG&wnW z(xgc%SFY^n=(vCX{?45{w`|!`P*Bj;)|Q%@`u6SHva+(=+}s&6W=x+xJufdWKR>^( zukY&Bs|<7jIv`s>alyd;zk#u-xuvzOy`!_MyQjCWzlUMcVTuf)vJ@pAI$_0*%MGWNz?D z2sSZ=HnDK4J)KhFC&bLirX@MUV#=fiRl5mAPG{=tlbbJv zvNLE|-KY$42y&jvbi^a*VFQaG`+u#1m71BaRd-MBielnYXtrWhm6)mdj2b@HXewoo_%=m)AkyVZ3!NNe}gbxh{BJw|8JkdD!LWx<}GGzky6o-t3N2dB8 hQu1a{2`N3vW?OLcsrDw5$DMWQzh \ No newline at end of file diff --git a/deployed/mod_sp_simple_gallery/modules/mod_sp_simple_gallery/scripts/loading.gif b/deployed/mod_sp_simple_gallery/modules/mod_sp_simple_gallery/scripts/loading.gif new file mode 100644 index 0000000000000000000000000000000000000000..e552f291bb52810f9a64f99159d23c6e7aceb05d GIT binary patch literal 1588 zcmZXUdo+}39LJw|=h8cx)eNI%G&H0_GZJBR+1_#6A(u&mlFK-n8e^1ORN5LtGqTcb zDj6k_T-s1BF=CTTvR#oVxm4079Z_2yo!Yl;&+hEm=bz`F-+4a2@8vu{xVv#2!DztnwqMrsuBnU;D5*D%WQ8~!3Jk8-_^#-8jC>( zOg`f9I_S;%I{funfa@T4xR;uodwFZgN57c(K&D^;7teAxTHsXF-As7>X+)3x_`rb6 zBz+emyXM8C@AU=?RE|XQ$wD8~`jh6^<{_afhnZ(6njqxS+Qai|2Es0@Cu90VLlskQ zj-mVJ@4&8>d*b}GtRzj;+F}j$LQvD%1`zB}DYz7y*qnX6BeA%P zM6Vg;zv5^>4;8l=6}J?&AIESE6muor2)RGsKX1#)lA>BVYfHOF4dj`SLMa0J=T_nm zmOjm*;vi4=fZrD_!kE7er1AD|WWNBnSGS40{y5&tXqu>7g;ccsme6p8@6a=<#rx{4 z5zs|>;V5q#&2F3>qdOpw^$2}=JR;POF-F=MOQ~7(Zi#Tr(D?dQ^(kHJP54raJ{2uv z*p5PmyAj}EVj2{jKC-7VqUL7Hig=Sy_81f}x>zO}n`!sp+112ZVw35ymX=!FStyqd zC@43G+(Asw=R^uqn}-spCxpJv8a#Km_sdS>tliDdCk&)Z`}Lfq*cU&8tJgrKnMX#) z1M<_POPNQJs=8aaO2b!rBWCsuBEIzm^={wfE(KDdA0OQited~&6+sJ#NM=owsFl8e!^*J$JGCx1spjxcMn0TLVl!`2(lVas9Z5(Dn1`t~ruJO+9 z9d9e1NT{kW>|0k!+B#S+OEMtC@YKu%4o`@KXgP@ylz3FpKRx|MG)9TB8Xf>s|jjmc5W_n-h2;7hOxrJOw?m8G~WOz227jVHp$>4eCQ78rD~=>xX!@DPa0%#DqmBpKkgw$joOFIXvplG*NIFpy6 zbAx(R4T)krNF;*qgLi=g+gEkwJyRd!)a#ETPGYQ8H9r^OZhM}!lj!s8@Vi7D(a>n0 z6#*yG4jD#^^{vc-f0db|44>&ykBQv;)5Pfni6tzJY!09$hbaJZ5$^oA0XJ ziFKUu&EubQTo&nz^UU|a5s}qHAcd!(ih*v*zIVA!!V_;UTCb)fS8=dX=_zPwu|Di` z`r!LO`(-WQb$ChOufiwxaqKdO=hGBh!p`M{<{!^ddTh0L7yzS*eyy^=nrtd-{E+VG z^%*#Phe@NGhHdQ-Twt;8#77N%kdT~jO;--hsT~i~t(bEsZaIuAlJ)p@Q1j$iBoGQ~ z2;zez;{Hm%pB$%Ol@*_s&#Y12z-WO0fY1buP|y~%IvM%9^lWSfU5342j^xo!!^QX4 z509rKTqf0OUif6^!W5TX5JS*5D7=C5P~XbfK@={opgpu;lEuppl=p>G=Ii=SpCu#f gu7!9AZ)eplQSQ!veQ(-U8t1ylUG6?>KLxD%6X;S+F#rGn literal 0 HcmV?d00001 diff --git a/deployed/mod_sp_simple_gallery/modules/mod_sp_simple_gallery/scripts/nextlabel.gif b/deployed/mod_sp_simple_gallery/modules/mod_sp_simple_gallery/scripts/nextlabel.gif new file mode 100644 index 0000000000000000000000000000000000000000..7c66121faf40ef2950abb16de34fd063dc3022de GIT binary patch literal 354 zcmV-o0iFIwNk%w1VLt#M0K^;sdU|@Qs;bV;&S7C;^Yio2(9pud!rR;1ZEbCyo}QeX zoK;m-hK7c=wzlWz=hoKNhlhvH&(FTTzWVz5!NI|jl9KuP`QP8)&CShna&k#YN&o-< zGcz*)0000000000A^8LW000~SEC2ui06zdA000HwAjfTFX`X1Rt}HsXa4gSsZQppV z?|kq7z@TtQEEDG5v(jwV}*VpRx<8<0-`pa5zlY#M)-oIr#d z2c`s`grTFXW2l%ts~e55DhLY)as;+YRV14WP@TyqTUm|6s>QTRW@y&52ql|}m&B;a zQeOnyC4;BkN$Kk86A=aP@b4HG>n#=(2KoB=5)bwN00RmfNU-3Gf-poNgb@M&I}o6s A+yDRo literal 0 HcmV?d00001 diff --git a/deployed/mod_sp_simple_gallery/modules/mod_sp_simple_gallery/scripts/prevlabel.gif b/deployed/mod_sp_simple_gallery/modules/mod_sp_simple_gallery/scripts/prevlabel.gif new file mode 100644 index 0000000000000000000000000000000000000000..064187672c20444b0d5e80282b40ddab59296748 GIT binary patch literal 371 zcmZ?wbhEHbv}aIYI3mTcapT68mX=GGF8%%cHz_G8H#hg?%a?cV+&O;y_^w^MX3d(_ z-`~G<>C!!W_T0UDx3aSG%a<=tpFZ8ad-ttdxBmV6w{6?D-@kvKIddjFJpBLv|Hj6~ z45&cyCkrD3gA{`fNEl=%1M7zbwZ4?hc^Ru_&DyrF;Lon2-1`;l-q*bUe_%m@hmKVL zi6?vwnMraS6F2WHNMX6W%%L%Jf|P{Agp~{i91_lK!3;AvTeQ_4lu66@2PxPd<8a|f z%w|;Psf$Qb<*$)sli+spsh4a_Dpuys>`+VS^a-p@O|Ow)VPs^T9>KbNxsm`2s}k#` ziGIr#EM?4K5GY!+Ryl@ms`DhZ=_yLH)hc*mvbIfDnJ&39>x>%z$_dBnPP7!YM3j_X zPLNn|>A{Tl$forhy*_{Wsw61P{_FQI=5N~KS}GDA28}G-|3d;K4s1v~+#;atHOFJ) OBLOL~;4K`C4Auad8=cVr literal 0 HcmV?d00001 diff --git a/deployed/mod_sp_simple_gallery/modules/mod_sp_simple_gallery/scripts/slimbox.css b/deployed/mod_sp_simple_gallery/modules/mod_sp_simple_gallery/scripts/slimbox.css new file mode 100644 index 00000000..4020bbce --- /dev/null +++ b/deployed/mod_sp_simple_gallery/modules/mod_sp_simple_gallery/scripts/slimbox.css @@ -0,0 +1,83 @@ +/* SLIMBOX */ + +#lbOverlay { + position: fixed; + z-index: 9999; + left: 0; + top: 0; + width: 100%; + height: 100%; + background-color: #000; + cursor: pointer; +} + +#lbCenter, #lbBottomContainer { + position: absolute; + z-index: 9999; + overflow: hidden; + background-color: #fff; +} + +.lbLoading { + background: #fff url(loading.gif) no-repeat center; +} + +#lbImage { + position: absolute; + left: 0; + top: 0; + border: 10px solid #fff; + background-repeat: no-repeat; +} + +#lbPrevLink, #lbNextLink { + display: block; + position: absolute; + top: 0; + width: 50%; + outline: none; +} + +#lbPrevLink { + left: 0; +} + +#lbPrevLink:hover { + background: transparent url(prevlabel.gif) no-repeat 0 15%; +} + +#lbNextLink { + right: 0; +} + +#lbNextLink:hover { + background: transparent url(nextlabel.gif) no-repeat 100% 15%; +} + +#lbBottom { + font-family: Verdana, Arial, Geneva, Helvetica, sans-serif; + font-size: 10px; + color: #666; + line-height: 1.4em; + text-align: left; + border: 10px solid #fff; + border-top-style: none; +} + +#lbCloseLink { + display: block; + float: right; + width: 66px; + height: 22px; + background: transparent url(closelabel.gif) no-repeat center; + margin: 5px 0; + outline: none; +} + +#lbCaption, #lbNumber { + margin-right: 71px; +} + +#lbCaption { + font-weight: bold; +} diff --git a/deployed/mod_sp_simple_gallery/modules/mod_sp_simple_gallery/scripts/slimbox.js b/deployed/mod_sp_simple_gallery/modules/mod_sp_simple_gallery/scripts/slimbox.js new file mode 100644 index 00000000..7e76de9b --- /dev/null +++ b/deployed/mod_sp_simple_gallery/modules/mod_sp_simple_gallery/scripts/slimbox.js @@ -0,0 +1,16 @@ +/*! + Slimbox v1.8 - The ultimate lightweight Lightbox clone + (c) 2007-2011 Christophe Beyls + MIT-style license. +*/ +var Slimbox=(function(){var F=window,n=Browser.ie6,u,g,G=-1,o,w,E,v,y,M,s,m={},t=new Image(),K=new Image(),I,a,h,q,J,e,H,c,A,L,x,i,d,C;F.addEvent("domready",function(){$(document.body).adopt($$(I=new Element("div#lbOverlay",{events:{click:D}}),a=new Element("div#lbCenter"),H=new Element("div#lbBottomContainer")).setStyle("display","none"));h=new Element("div#lbImage").inject(a).adopt(q=new Element("div",{styles:{position:"relative"}}).adopt(J=new Element("a#lbPrevLink[href=#]",{events:{click:B}}),e=new Element("a#lbNextLink[href=#]",{events:{click:f}})));c=new Element("div#lbBottom").inject(H).adopt(new Element("a#lbCloseLink[href=#]",{events:{click:D}}),A=new Element("div#lbCaption"),L=new Element("div#lbNumber"),new Element("div",{styles:{clear:"both"}}))});function z(){var N=F.getScroll(),O=F.getSize();$$(a,H).setStyle("left",N.x+(O.x/2));if(v){I.setStyles({left:N.x,top:N.y,width:O.x,height:O.y})}}function l(N){["object",n?"select":"embed"].forEach(function(P){Array.forEach(document.getElementsByTagName(P),function(Q){if(N){Q._slimbox=Q.style.visibility}Q.style.visibility=N?"hidden":Q._slimbox})});I.style.display=N?"":"none";var O=N?"addEvent":"removeEvent";F[O]("scroll",z)[O]("resize",z);document[O]("keydown",p)}function p(O){var N=O.code;return u.closeKeys.contains(N)?D():u.nextKeys.contains(N)?f():u.previousKeys.contains(N)?B():false}function B(){return b(w)}function f(){return b(E)}function b(N){if(N>=0){G=N;o=g[N][0];w=(G||(u.loop?g.length:0))-1;E=((G+1)%g.length)||(u.loop?0:-1);r();a.className="lbLoading";m=new Image();m.onload=k;m.src=o}return false}function k(){a.className="";d.set(0);h.setStyles({backgroundImage:"url("+o+")",display:""});q.setStyle("width",m.width);$$(q,J,e).setStyle("height",m.height);A.set("html",g[G][1]||"");L.set("html",(((g.length>1)&&u.counterText)||"").replace(/{x}/,G+1).replace(/{y}/,g.length));if(w>=0){t.src=g[w][0]}if(E>=0){K.src=g[E][0]}M=h.offsetWidth;s=h.offsetHeight;var P=Math.max(0,y-(s/2)),N=0,O;if(a.offsetHeight!=s){N=i.start({height:s,top:P})}if(a.offsetWidth!=M){N=i.start({width:M,marginLeft:-M/2})}O=function(){H.setStyles({width:M,top:P+s,marginLeft:-M/2,visibility:"hidden",display:""});d.start(1)};if(N){i.chain(O)}else{O()}}function j(){if(w>=0){J.style.display=""}if(E>=0){e.style.display=""}C.set(-c.offsetHeight).start(0);H.style.visibility=""}function r(){m.onload=null;m.src=t.src=K.src=o;i.cancel();d.cancel();C.cancel();$$(J,e,h,H).setStyle("display","none")}function D(){if(G>=0){r();G=w=E=-1;a.style.display="none";x.cancel().chain(l).start(0)}return false}Element.implement({slimbox:function(N,O){$$(this).slimbox(N,O);return this}});Elements.implement({slimbox:function(N,Q,P){Q=Q||function(R){return[R.href,R.title]};P=P||function(){return true};var O=this;O.removeEvents("click").addEvent("click",function(){var R=O.filter(P,this);return Slimbox.open(R.map(Q),R.indexOf(this),N)});return O}});return{open:function(P,O,N){u=Object.append({loop:false,overlayOpacity:0.8,overlayFadeDuration:400,resizeDuration:400,resizeTransition:false,initialWidth:250,initialHeight:250,imageFadeDuration:400,captionAnimationDuration:400,counterText:"Image {x} of {y}",closeKeys:[27,88,67],previousKeys:[37,80],nextKeys:[39,78]},N||{});x=new Fx.Tween(I,{property:"opacity",duration:u.overlayFadeDuration});i=new Fx.Morph(a,Object.append({duration:u.resizeDuration,link:"chain"},u.resizeTransition?{transition:u.resizeTransition}:{}));d=new Fx.Tween(h,{property:"opacity",duration:u.imageFadeDuration,onComplete:j});C=new Fx.Tween(c,{property:"margin-top",duration:u.captionAnimationDuration});if(typeof P=="string"){P=[[P,O]];O=0}y=F.getScrollTop()+(F.getHeight()/2);M=u.initialWidth;s=u.initialHeight;a.setStyles({top:Math.max(0,y-(s/2)),width:M,height:s,marginLeft:-M/2,display:""});v=n||(I.currentStyle&&(I.currentStyle.position!="fixed"));if(v){I.style.position="absolute"}x.set(0).start(u.overlayOpacity);z();l(1);g=P;u.loop=u.loop&&(g.length>1);return b(O)}}})(); + +// AUTOLOAD CODE BLOCK (MAY BE CHANGED OR REMOVED) +Slimbox.scanPage = function() { + $$("a[rel^=lightbox]").slimbox({/* Put custom options here */}, null, function(el) { + return (this == el) || ((this.rel.length > 8) && (this.rel == el.rel)); + }); +}; +if (!/android|iphone|ipod|series60|symbian|windows ce|blackberry/i.test(navigator.userAgent)) { + window.addEvent("domready", Slimbox.scanPage); +} \ No newline at end of file diff --git a/deployed/mod_sp_simple_gallery/modules/mod_sp_simple_gallery/scripts/slimbox_jquery.js b/deployed/mod_sp_simple_gallery/modules/mod_sp_simple_gallery/scripts/slimbox_jquery.js new file mode 100644 index 00000000..aa515a0b --- /dev/null +++ b/deployed/mod_sp_simple_gallery/modules/mod_sp_simple_gallery/scripts/slimbox_jquery.js @@ -0,0 +1,15 @@ +/*! + Slimbox v2.05 - The ultimate lightweight Lightbox clone for jQuery + (c) 2007-2013 Christophe Beyls + MIT-style license. +*/ +(function(w){var E=w(window),u,f,F=-1,n,x,D,v,y,L,r,m=!window.XMLHttpRequest,s=[],l=document.documentElement,k={},t=new Image(),J=new Image(),H,a,g,p,I,d,G,c,A,K;w(function(){w("body").append(w([H=w('
').click(C)[0],a=w('
')[0],G=w('
')[0]]).css("display","none"));g=w('
').appendTo(a).append(p=w('
').append([I=w('').click(B)[0],d=w('').click(e)[0]])[0])[0];c=w('
').appendTo(G).append([w('').click(C)[0],A=w('
')[0],K=w('
')[0],w('
')[0]])[0]});w.slimbox=function(O,N,M){u=w.extend({loop:false,overlayOpacity:0.8,overlayFadeDuration:400,resizeDuration:400,resizeEasing:"swing",initialWidth:250,initialHeight:250,imageFadeDuration:400,captionAnimationDuration:400,counterText:"Image {x} of {y}",closeKeys:[27,88,67],previousKeys:[37,80],nextKeys:[39,78]},M);if(typeof O=="string"){O=[[O,N]];N=0}y=E.scrollTop()+(E.height()/2);L=u.initialWidth;r=u.initialHeight;w(a).css({top:Math.max(0,y-(r/2)),width:L,height:r,marginLeft:-L/2}).show();v=m||(H.currentStyle&&(H.currentStyle.position!="fixed"));if(v){H.style.position="absolute"}w(H).css("opacity",u.overlayOpacity).fadeIn(u.overlayFadeDuration);z();j(1);f=O;u.loop=u.loop&&(f.length>1);return b(N)};w.fn.slimbox=function(M,P,O){P=P||function(Q){return[Q.href,Q.title]};O=O||function(){return true};var N=this;return N.unbind("click").click(function(){var S=this,U=0,T,Q=0,R;T=w.grep(N,function(W,V){return O.call(S,W,V)});for(R=T.length;Q=0)?C():(M(N,u.nextKeys)>=0)?e():(M(N,u.previousKeys)>=0)?B():null}function B(){return b(x)}function e(){return b(D)}function b(M){if(M>=0){F=M;n=f[F][0];x=(F||(u.loop?f.length:0))-1;D=((F+1)%f.length)||(u.loop?0:-1);q();a.className="lbLoading";k=new Image();k.onload=i;k.src=n}return false}function i(){a.className="";w(g).css({backgroundImage:"url("+n+")",visibility:"hidden",display:""});w(p).width(k.width);w([p,I,d]).height(k.height);w(A).html(f[F][1]||"");w(K).html((((f.length>1)&&u.counterText)||"").replace(/{x}/,F+1).replace(/{y}/,f.length));if(x>=0){t.src=f[x][0]}if(D>=0){J.src=f[D][0]}L=g.offsetWidth;r=g.offsetHeight;var M=Math.max(0,y-(r/2));if(a.offsetHeight!=r){w(a).animate({height:r,top:M},u.resizeDuration,u.resizeEasing)}if(a.offsetWidth!=L){w(a).animate({width:L,marginLeft:-L/2},u.resizeDuration,u.resizeEasing)}w(a).queue(function(){w(G).css({width:L,top:M+r,marginLeft:-L/2,visibility:"hidden",display:""});w(g).css({display:"none",visibility:"",opacity:""}).fadeIn(u.imageFadeDuration,h)})}function h(){if(x>=0){w(I).show()}if(D>=0){w(d).show()}w(c).css("marginTop",-c.offsetHeight).animate({marginTop:0},u.captionAnimationDuration);G.style.visibility=""}function q(){k.onload=null;k.src=t.src=J.src=n;w([a,g,c]).stop(true);w([I,d,g,G]).hide()}function C(){if(F>=0){q();F=x=D=-1;w(a).hide();w(H).stop().fadeOut(u.overlayFadeDuration,j)}return false}})(jQuery); + +// AUTOLOAD CODE BLOCK (MAY BE CHANGED OR REMOVED) +if (!/android|iphone|ipod|series60|symbian|windows ce|blackberry/i.test(navigator.userAgent)) { + jQuery(function($) { + $("a[rel^='lightbox']").slimbox({/* Put custom options here */}, null, function(el) { + return (this == el) || ((this.rel.length > 8) && (this.rel == el.rel)); + }); + }); +} \ No newline at end of file diff --git a/deployed/mod_sp_simple_gallery/modules/mod_sp_simple_gallery/tmpl/default.php b/deployed/mod_sp_simple_gallery/modules/mod_sp_simple_gallery/tmpl/default.php new file mode 100644 index 00000000..cc3abdd2 --- /dev/null +++ b/deployed/mod_sp_simple_gallery/modules/mod_sp_simple_gallery/tmpl/default.php @@ -0,0 +1,18 @@ + + \ No newline at end of file diff --git a/deployed/mod_sp_simple_gallery/modules/mod_sp_simple_gallery/tmpl/index.html b/deployed/mod_sp_simple_gallery/modules/mod_sp_simple_gallery/tmpl/index.html new file mode 100644 index 00000000..fa6d84e8 --- /dev/null +++ b/deployed/mod_sp_simple_gallery/modules/mod_sp_simple_gallery/tmpl/index.html @@ -0,0 +1 @@ + \ No newline at end of file