Commit f5937f0e authored by Marco Nolletti's avatar Marco Nolletti

Merge branch 'DEVELOPMENT'

parents 1a1350a8 4dbaf5dd
......@@ -49,6 +49,7 @@ class admin_plugin_photogallery extends DokuWiki_Admin_Plugin {
$ok = version_compare(PHP_VERSION,'5.4.45',">=");
$this->_info_row('Current PHP version',phpversion(),$ok);
$this->_info_row('Running webserver',htmlentities($_SERVER['SERVER_SOFTWARE']));
$this->_info_row('PHP memory limit',ini_get('memory_limit'));
$ok = extension_loaded('exif');
$this->_info_row('EXIF extension',($ok ? '' : 'not').' loaded',$ok);
$ok = extension_loaded('curl');
......
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg id="svg2" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://www.w3.org/2000/svg" height="24" width="24" version="1.1" xmlns:cc="http://creativecommons.org/ns#" xmlns:dc="http://purl.org/dc/elements/1.1/" viewBox="0 0 24 24">
<metadata id="metadata10">
<rdf:RDF>
<cc:Work rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage"/>
<dc:title/>
</cc:Work>
</rdf:RDF>
</metadata>
<path id="path7" d="m20.135 3.9297h-16.269c-0.64745 0-1.1621 0.52709-1.1621 1.1745v13.588c0 0.64745 0.51464 1.1745 1.1621 1.1745h16.269c0.64745 0 1.1621-0.52709 1.1621-1.1745v-13.588c0-0.64745-0.51464-1.1745-1.1621-1.1745zm-4.279 8.2052c-0.12451-0.14526-0.31543-0.25732-0.53124-0.25732-0.21167 0-0.36108 0.09961-0.53124 0.23657l-0.77611 0.65575c-0.16186 0.11621-0.29052 0.19507-0.47729 0.19507-0.17846 0-0.34033-0.0664-0.45654-0.17016-0.0415-0.03735-0.11621-0.10791-0.17846-0.17016l-2.2329-2.4155c-0.167-0.192-0.416-0.3122-0.6942-0.3122-0.27807 0-0.53539 0.13696-0.69726 0.32373l-5.2502 6.3334v-10.812c0.041503-0.28222 0.26147-0.48559 0.54369-0.48559h14.846c0.28637 0 0.51879 0.21167 0.53539 0.49804l0.01245 10.807-4.113-4.4284zm0.79271-1.5647c1.0998 0 1.9922-0.89232 1.9922-1.9922 0-1.0998-0.89232-1.9922-1.9922-1.9922-1.0998 0-1.9922 0.89232-1.9922 1.9922 0 1.0998 0.89232 1.9922 1.9922 1.9922z"/>
</svg>
......@@ -10,15 +10,15 @@ $conf['use_phpThumb'] = 0;
$conf['autoplay'] = 1;
$conf['poster_width'] = 220;
$conf['poster_height'] = 220;
$conf['posteralign'] = 'left';
$conf['thumbnail_width'] = 80;
$conf['thumbnail_height'] = 60;
$conf['image_width'] = 800;
$conf['image_height'] = 600;
$conf['viewport_width'] = 800;
$conf['viewport_height'] = 600;
$conf['viewport_rotate'] = 1;
$conf['panorama_ratio'] = '16:9';
$conf['panorama_width'] = 4000;
$conf['panorama_height'] = 3000;
$conf['posteralign'] = 'left';
$conf['panorama_width'] = 3840;
$conf['panorama_height'] = 2160;
$conf['sort'] = 'file';
$conf['options'] = 'showtitle,showinfo';
......@@ -10,16 +10,16 @@ $meta['use_phpThumb'] = array('onoff');
$meta['autoplay'] = array('onoff');
$meta['poster_width'] = array('numeric');
$meta['poster_height'] = array('numeric');
$meta['posteralign'] = array('string');
$meta['thumbnail_width'] = array('numeric');
$meta['thumbnail_height'] = array('numeric');
$meta['image_width'] = array('numeric');
$meta['image_height'] = array('numeric');
$meta['viewport_width'] = array('numeric');
$meta['viewport_height'] = array('numeric');
$meta['viewport_rotate'] = array('onoff');
$meta['panorama_ratio'] = array('string','_pattern' => '/([0-9]+):([0-9]+)/');
$meta['panorama_width'] = array('numeric');
$meta['panorama_height'] = array('numeric');
$meta['posteralign'] = array('string');
$meta['panorama_ratio'] = array('string','_pattern' => '/([0-9]+):([0-9]+)/');
$meta['sort'] = array('multichoice', '_choices' => array('file','mod','date','title','random'));
$meta['options'] = array('multicheckbox', '_choices' => array('crop','reverse','recursive','showtitle','showinfo','showfname'));
$meta['options'] = array('multicheckbox', '_choices' => array('fullsize','crop','reverse','recursive','showtitle','showinfo','showfname'));
......@@ -10,15 +10,15 @@ $lang['use_phpThumb'] = 'phpThumb für Cache und Thumbnails generation Verwe
$lang['autoplay'] = 'Start automatisch die Galeriebilder Diashow';
$lang['poster_width'] = 'Bildbreite für Poster';
$lang['poster_height'] = 'Bildhöhe für Poster';
$lang['posteralign'] = 'Bildausrichtung für Poster (links=left|rechts=right)';
$lang['thumbnail_width'] = 'Bildbreite für Vorschau';
$lang['thumbnail_height'] = 'Bildhöhe für Vorschau';
$lang['image_width'] = 'Bildbreite';
$lang['image_height'] = 'Bildhöhe';
$lang['viewport_width'] = 'Ansichtsfensterbreite';
$lang['viewport_height'] = 'Ansichtsfensterhöhe';
$lang['viewport_rotate'] = 'Ansichtsfenster für horizontale Bilder drehen';
$lang['panorama_ratio'] = 'Bild as Panorama betrachet wenn das Bildseitenverhältnis größer als der Parameter ist (A:B mit A>B)';
$lang['panorama_width'] = 'Bildbreite für Panorama';
$lang['panorama_height'] = 'Bildhöhe für Panorama';
$lang['posteralign'] = 'Bildausrichtung für Poster (links=left|rechts=right)';
$lang['panorama_width'] = 'Ansichtsfensterbreite für Panorama';
$lang['panorama_height'] = 'Ansichtsfensterhöhe für Panorama';
$lang['sort'] = 'Sortierung der Galeriebilder';
$lang['sort_o_file'] = 'Dateiname';
......@@ -28,6 +28,7 @@ $lang['sort_o_title'] = 'EXIF Titel';
$lang['sort_o_random'] = 'Zufällig';
$lang['options'] = 'Zusätzliche Standardeinstellungen';
$lang['options_o_fullsize'] = 'Fullsize';
$lang['options_o_crop'] = 'Zuschneiden';
$lang['options_o_reverse'] = 'Sortierung umdrehen';
$lang['options_o_recursive'] = 'Unterordner durchsuchen';
......
......@@ -10,15 +10,15 @@ $lang['use_phpThumb'] = 'Use phpThumb per cache and thumbnails generation';
$lang['autoplay'] = 'Automatically start the photogallery slideshow';
$lang['poster_width'] = 'Poster image width';
$lang['poster_height'] = 'Poster image height';
$lang['posteralign'] = 'Poster image alignment (left|right)';
$lang['thumbnail_width'] = 'Thumbnail image width';
$lang['thumbnail_height'] = 'Thumbnail image height';
$lang['image_width'] = 'Image width';
$lang['image_height'] = 'Image height';
$lang['viewport_width'] = 'Viewport width';
$lang['viewport_height'] = 'Viewport height';
$lang['viewport_rotate'] = 'Rotate viewport for portrate images';
$lang['panorama_ratio'] = 'Consider the image as panorama if the aspect ratio is greater than the parameter (A:B con A>B)';
$lang['panorama_width'] = 'Panoramic image width';
$lang['panorama_height'] = 'Panoramic image height';
$lang['posteralign'] = 'Poster image alignment (left|right)';
$lang['panorama_width'] = 'Panoramic image vireport width';
$lang['panorama_height'] = 'Panoramic image vireport height';
$lang['sort'] = 'How to sort the gallery images';
$lang['sort_o_file'] = 'Sort by filename';
......@@ -28,6 +28,7 @@ $lang['sort_o_title'] = 'Sort by EXIF title';
$lang['sort_o_random'] = 'Sort randomly';
$lang['options'] = 'Additional default options';
$lang['options_o_fullsize'] = 'Fullsize';
$lang['options_o_crop'] = 'Crop';
$lang['options_o_reverse'] = 'Invert sort order';
$lang['options_o_recursive'] = 'Recurse subfolders';
......
......@@ -10,15 +10,15 @@ $lang['use_phpThumb'] = 'Usa phpThumb per cache e generazione delle icone';
$lang['autoplay'] = 'Avvia automaticamente l\'avanzamento delle foto';
$lang['poster_width'] = 'Larghezza immagine poster';
$lang['poster_height'] = 'Altezza immagine poster';
$lang['posteralign'] = 'Allineamento dell\'immagine poster (left|right)';
$lang['thumbnail_width'] = 'Larghezza immagine anteprima';
$lang['thumbnail_height'] = 'Altezza immagine anteprima';
$lang['image_width'] = 'Larghezza immagine';
$lang['image_height'] = 'Altezza immagine';
$lang['viewport_width'] = 'Larghezza del quadro che contiene l\'immagine';
$lang['viewport_height'] = 'Altezza del quadro che contiene l\'immagine';
$lang['viewport_rotate'] = 'Ruota il quadro per immagini orizzontali';
$lang['panorama_ratio'] = 'Considera l\'immagine panoramica se il suo rapporto di forma &egrave maggiore del parametro (A:B con A>B)';
$lang['panorama_width'] = 'Larghezza immagine panoramica';
$lang['panorama_height'] = 'Altezza immagine panoramica';
$lang['posteralign'] = 'Allineamento dell\'immagine poster (left|right)';
$lang['panorama_width'] = 'Larghezza del quadro per immagini panoramiche';
$lang['panorama_height'] = 'Altezza del quadro per immagini panoramiche';
$lang['sort'] = 'Ordinamemento delle immagini';
$lang['sort_o_file'] = 'Ordina per nome del file';
......@@ -28,6 +28,7 @@ $lang['sort_o_title'] = 'Ordina per titolo EXIF';
$lang['sort_o_random'] = 'Ordina casualmente';
$lang['options'] = 'Altre opzioni di default';
$lang['options_o_fullsize'] = 'Dimensione originale';
$lang['options_o_crop'] = 'Ritaglia';
$lang['options_o_reverse'] = 'Inverti';
$lang['options_o_recursive'] = 'Ricerca ricorsiva';
......
base photogallery
author Marco Nolletti
email mnolletti@gmail.com
date 2017-04-21
date 2017-04-24
name PhotoGallery Plugin
desc Creates a gallery of images from a namespace (PHP Version >= 5.4.45 required)
url http://www.dokuwiki.org/plugin:photogallery
......@@ -41,22 +41,22 @@ jQuery(document).on('click', 'a.pg-start', function() {
return false;
});
/**
* Attach click event to the poster <a> tag
Runs when complete page is fully loaded, including all frames, objects and images
*/
jQuery(window).load(function(){
// Trigger thumbnails preload
jQuery('img.pg-preload').each(function(index) {
jQuery(this).attr('src', jQuery(this).data('src'));
});
//alert("ok window");
// Trigger images preload
// jQuery('ul.pg-show').each(function(index) {
// var $li = jQuery(this).children('li').first().data('src');
// //jQuery('<img src="'.$li.'"/>');
// // jQuery(this).attr('src', jQuery(this).data('src'));
// /**
// * Attach click event to the poster <a> tag
// Runs when complete page is fully loaded, including all frames, objects and images
// */
// jQuery(window).load(function(){
// // Trigger thumbnails preload
// jQuery('img.pg-preload').each(function(index) {
// jQuery(this).attr('src', jQuery(this).data('src'));
// });
});
// //alert("ok window");
// // Trigger images preload
// // jQuery('ul.pg-show').each(function(index) {
// // var $li = jQuery(this).children('li').first().data('src');
// // //jQuery('<img src="'.$li.'"/>');
// // // jQuery(this).attr('src', jQuery(this).data('src'));
// // });
// });
// jQuery("img.lazy").lazyload();
......@@ -81,14 +81,15 @@ class syntax_plugin_photogallery extends DokuWiki_Syntax_Plugin {
$data['ph'] = $this->getConf('poster_height');
$data['tw'] = $this->getConf('thumbnail_width');
$data['th'] = $this->getConf('thumbnail_height');
$data['iw'] = $this->getConf('image_width');
$data['ih'] = $this->getConf('image_height');
$data['iw'] = $this->getConf('viewport_width');
$data['ih'] = $this->getConf('viewport_height');
$data['vprot'] = $this->getConf('viewport_rotate');
$data['panar'] = $this->getConf('panorama_ratio');
$data['panw'] = $this->getConf('panorama_width');
$data['panh'] = $this->getConf('panorama_height');
$data['posteralign'] = $this->getConf('posteralign');
$data['filter'] = '';
$data['fullsize'] = $this->getConf('fullsize');
$data['sort'] = $this->getConf('sort');
$data['limit'] = 0;
$data['offset'] = 0;
......@@ -681,8 +682,6 @@ class syntax_plugin_photogallery extends DokuWiki_Syntax_Plugin {
$ID = $img['id'];
$tw = $data['tw'];
$th = $data['th'];
// NOM evitare l'uso della cache quando le dimensioni sono come le originali
// NOM spostare in alto $ispan
// NOM Sistemare le dimensioni dei poster dei video
if($img['isvid']){
$vsrc = ml($ID);
......@@ -735,14 +734,11 @@ class syntax_plugin_photogallery extends DokuWiki_Syntax_Plugin {
$topt .= '!fltr=over|../images/pano_portrate.png';
}
}
$iw = $data['panw'];
$ih = $data['panh'];
} else{ // Normal image
$topt = 'zc=C'; // Crop to given size
}
// Calculates new image sizes fitting into viewport
if ($img['fullsize']){ // Override image size for fullsize
$topt .= '!fltr=over|../images/image_fullsize.png';
$iw = $mw;
$ih = $mh;
} else{
......@@ -754,22 +750,28 @@ class syntax_plugin_photogallery extends DokuWiki_Syntax_Plugin {
$iw = $vpw;
if ($ih > $vph)
$ih = $vph;
$iopt = 'zc=C'; // Crop to given size
} else{
$ratio = $this->_fit_ratio($mw,$mh,$vpw,$vph);
$iw = floor($mw * $ratio);
$ih = floor($mh * $ratio);
$iopt = 'iar=1'; // Simple resize
}
}
// Shows HR overlay
if ($iw * $ih > 12000000){
$topt .= '!fltr=over|../images/image_hr.png';
}
}
// // //prepare image attributes
// // // $ia = array();
// // // $ia['width'] = $iw;
// // // $ia['height'] = $ih;
// // // $ia['border'] = 0;
// // // $ia['title'] = $this->_caption($img,$data);
// // // $iatt = buildAttributes($ia); //NOM not used yet
// }
//prepare image attributes
// $ia = array();
// $ia['width'] = $iw;
// $ia['height'] = $ih;
// $ia['border'] = 0;
// $ia['title'] = $this->_caption($img,$data);
// $iatt = buildAttributes($ia); //NOM not used yet
$tpar['w'] = $tw;
$tpar['h'] = $th;
$ipar['w'] = $iw;
......@@ -779,8 +781,10 @@ class syntax_plugin_photogallery extends DokuWiki_Syntax_Plugin {
else
$tpar['media'] = idfilter($ID);
$ipar['media'] = $tpar['media'];
if ($data['phpthumb'] == true)
if ($data['phpthumb'] == true){
$tpar['opt'] = $topt;
$ipar['opt'] = $iopt;
}
$ipar['tok'] = media_get_token($ID,$iw,$ih);
$tpar['tok'] = media_get_token($ID,$tw,$th);
$isrc = PHOTOGALLERY_PGFETCH_REL.'?'. buildURLparams($ipar,'&amp;');
......@@ -791,8 +795,6 @@ class syntax_plugin_photogallery extends DokuWiki_Syntax_Plugin {
$tatt = buildAttributes($ta);
// HTML rendering
$ret ='';
$style =' style="display:none;"';
$style = ''; //NOM: controllare
$video = '';
if($img['isvid']){
$video .= '<div id="video'.$idx.'" style="display:none;">'.DOKU_LF;
......@@ -803,18 +805,9 @@ class syntax_plugin_photogallery extends DokuWiki_Syntax_Plugin {
$video .= '</div>'.DOKU_LF;
$ret .= '<li data-poster="'.$isrc.'" data-html="#video'.$idx.'">'.DOKU_LF;
} else{
$ret .= '<li data-src="'.$isrc.'"'.$style.'>'.DOKU_LF;
}
if ($idx < 25){
$ret .= '<img class="pg-preload" src="'.$tsrc.'" '.$tatt.'/>'.DOKU_LF;
// $ret .= '<img src="'.$tsrc.'" '.$tatt.'/>'.DOKU_LF;
}
else{
$ret .= '<img class="pg-preload" src="" data-src="'.$tsrc.'" '.$tatt.'/>'.DOKU_LF;
}
if ($idx < 5){
$ret .= '<img class="pg-preload" style="display:none;" src="'.$isrc.'" alt=""/>'.DOKU_LF;
$ret .= '<li data-src="'.$isrc.'">'.DOKU_LF;
}
$ret .= '<img src="'.$tsrc.'" '.$tatt.'/>'.DOKU_LF;
$ret .= $video;
$ret .= '</li>'.DOKU_LF;
return $ret;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment