Commit 4dbaf5dd authored by Marco Nolletti's avatar Marco Nolletti

Fixed panorama images dimensions

Config options cleanup and reordering
Upped version
parent 040c8991
......@@ -17,8 +17,8 @@ $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['panorama_width'] = 3840;
$conf['panorama_height'] = 2160;
$conf['sort'] = 'file';
$conf['options'] = 'showtitle,showinfo';
......@@ -16,9 +16,9 @@ $meta['thumbnail_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['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('fullsize','crop','reverse','recursive','showtitle','showinfo','showfname'));
......
......@@ -17,8 +17,8 @@ $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['panorama_width'] = 'Ansichtsfensterbreite für Panorama';
$lang['panorama_height'] = 'Ansichtsfensterhöhe für Panorama';
$lang['sort'] = 'Sortierung der Galeriebilder';
$lang['sort_o_file'] = 'Dateiname';
......
......@@ -17,8 +17,8 @@ $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['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';
......
......@@ -17,8 +17,8 @@ $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['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';
......
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
......@@ -18,7 +18,7 @@ function InitPgGallery(tw,th,play){
autoplay:play,
showAfterLoad:true,
pause:4000,
preload:2,
preload:1,
mode:"lg-fade",
thumbWidth:tw,
thumbContHeight:th
......
......@@ -682,9 +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 non ridimensionare immagini più piccole
// NOM spostare in alto $ispan
// NOM Sistemare le dimensioni dei poster dei video
if($img['isvid']){
$vsrc = ml($ID);
......@@ -737,8 +734,6 @@ 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
}
......@@ -755,10 +750,12 @@ 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
......@@ -767,14 +764,14 @@ class syntax_plugin_photogallery extends DokuWiki_Syntax_Plugin {
}
}
// // //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;
......@@ -784,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,'&');
......
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