Lines Matching refs:data

64         $data = array();
77 $data['command'] = $cmd;
80 $data['phpthumb'] = $this->getConf('use_phpThumb');
81 $data['autoplay'] = $this->getConf('autoplay');
82 $data['pw'] = $this->getConf('poster_width');
83 $data['ph'] = $this->getConf('poster_height');
84 $data['tw'] = $this->getConf('thumbnail_width');
85 $data['th'] = $this->getConf('thumbnail_height');
86 $data['iw'] = $this->getConf('viewport_width');
87 $data['ih'] = $this->getConf('viewport_height');
88 $data['vprot'] = $this->getConf('viewport_rotate');
89 $data['panar'] = $this->getConf('panorama_ratio');
90 $data['panw'] = $this->getConf('panorama_width');
91 $data['panh'] = $this->getConf('panorama_height');
92 $data['posteralign'] = $this->getConf('posteralign');
93 $data['filter'] = '';
94 $data['fullsize'] = $this->getConf('fullsize');
95 $data['sort'] = $this->getConf('sort');
96 $data['limit'] = 0;
97 $data['offset'] = 0;
98 $data['ns'] = getNS($ID);
99 $this->_setConfOptions($data,$this->getConf('options'));
108 $data['sort'] = 'title';
110 $data['sort'] = 'date';
112 $data['sort'] = 'mod';
114 $data['limit'] = $match[1];
116 $data['offset'] = $match[1];
118 $data['cols'] = (int) $param;
121 $data['iw'] = $match[1];
122 $data['ih'] = $match[3];
124 $data['tw'] = $match[1];
125 $data['th'] = $match[3];
130 $data['filter'] = $param;
133 $data[substr($param,2)] = false;
135 $data[$param] = true;
141 if ($data['phpthumb'] == true){
144 $data['phpthumb'] = false;
162 $data['rss'] = true;
173 $data[$type[1].'w'] = $size[1];
174 $data[$type[1].'h'] = $size[3];
185 $data[$line[0]] = $line[1];
190 $page = $data['pg'];
202 $data['ns'] = $rdata['ns'];
204 if ((!isset($data[$key])) and (isset($rdata[$key]))){
205 $data[$key] = $value;
213 return $data;
224 function render($mode, Doku_Renderer $R, $data){ argument
230 $cmd = $data['command'];
233 if($this->_auth_check($data)){
235 $this->_photo_gallery($data, $R); // Start gallery
238 msg(sprintf($this->getLang('notauthorized'),$data['ns']),-1);
244 $files = $this->_findimages($data);
270 function _photo_gallery($data, $R){ argument
277 $cmd = $data['command'];
278 if (empty($data['rss'])) {
279 if(($cmd == 'show') and (!$this->_media_folder_exists($data['ns']))){
280 … $R->doc .= '<div class="nothing">'.sprintf($this->getLang('nsnotexists'),$data['ns']).'</div>';
282 }elseif (($cmd == 'link') and (!page_exists($data['pg']))){
283 … $R->doc .= '<div class="nothing">'.sprintf($this->getLang('pgnotexists'),$data['pg']).'</div>';
288 $files = $this->_findimages($data);
297 if (isset($data['zipfile']))
299 $zip = $data['ns'].":".$data['zipfile'];
301 if($this->_zip_auth_check($data)){
302 …$data['ziplink'] = $R->internalmedia($zip,$this->getLang('lnk_download'),null,null,null,null,'link…
312 if ($data['posteralign'] == 'right'){
313 $this->_description($files,$data,$R);
314 $this->_poster($files,$data,$R);
317 $this->_poster($files,$data,$R);
318 $this->_description($files,$data,$R);
329 function _findimages(&$data){ argument
334 if (!empty($data['rss'])) {
335 $files = $this->_loadRSS($data['ns']);
337 $dir = utf8_encodeFN(str_replace(':','/',$data['ns']));
339 $depth = !empty($data['recursive']) ? 0 : 1;
353 if ($data['fullsize'] == true)
358 if(($modifier == 'fullsize') || ($data['fullsize'] == 1)) // Show in full size
375 if ($data['filter']) {
376 if(!preg_match($data['filter'],noNS($files[$i]['id'])))
384 if ($data['sort'] == 'random') {
387 if( $data['sort'] == 'date') {
389 } elseif ($data['sort'] == 'mod') {
391 } elseif($data['sort'] == 'title') {
395 if (!empty($data['reverse'])) $files = array_reverse($files);
399 if( $data['offset']) {
400 $offset = $data['offset'];
407 $i = array_search($data['posterimg'] ?? [], array_column($files, 'file'));
415 if ($data['limit'])
416 $files = array_slice($files,0,$data['limit']);
516 function _lightgallery($files,$data,$pgid){ argument
527 $ret .= $this->_image($img,$data,$i);
539 function _poster($files,$data,$R){ argument
540 $pgid = 'pg-'.substr(md5($data['ns']),4);
541 if ($data['posteralign'] == 'right')
547 $cmd = $data['command'];
550 $w = $data['pw'];
551 $h = $data['ph'];
563 $href = wl($data['pg'], 'gallery0#lg=1&amp;slide=0');
585 $R->doc .= $this->_lightgallery($files,$data,$pgid);
588 $ch = strval(intval($data['th'])+20);
589 $auto = $data['autoplay'] ? 'true' : 'false';
592 $R->doc .= 'InitPgGallery('.$data['tw'].','.$ch.','.$auto.');';
605 protected function _description($files,$data,$R){ argument
614 if ($data['posteralign'] == 'right')
619 $R->header($data['title'],2,0);
620 $R->doc .= '<p>' . ($data['description'] ?? '') . '</p>';
626 if (isset($data['ziplink'])){
627 $R->doc .= ' - '.$data['ziplink'];
630 … $R->doc .= '<p style="text-align:left"><i>' . ($data['copyright'] ?? '') . '</i></p>'.DOKU_LF;
637 protected function _image(&$img,$data,$idx){ argument
645 $tw = $data['tw'];
646 $th = $data['th'];
658 $iw = $data['iw'];
659 $ih = $data['ih'];
671 if (preg_match('/([0-9]+):([0-9]+)/',$data['panar'],$matches))
675 $vpw = $data['panw'];
676 $vph = $data['panh'];
678 $vpw = $data['iw'];
679 $vph = $data['ih'];
681 if (($mh > $mw) and ($data['vprot'])) // Invert viewport for portrait images
684 if ($data['phpthumb'] == true) {
687 $tw = floor($data['th'] * 0.6 * $img_ar);
688 $cropw = floor(($tw - $data['tw']) / 2);
692 $th = floor($data['tw'] * 0.6 * $img_ar);
693 $croph = floor(($th - $data['th']) / 2);
706 if (!empty($data['crop'])) {
732 if (!empty($data['rss']))
738 if ($data['phpthumb'] == true) {
748 $ta['alt'] = $this->_caption($img,$data);
873 function _caption($img,$data){ argument
875 if (!empty($data['showtitle'])) {
881 if (!empty($data['showdescription'])) {
887 if (!empty($data['showkeywords'])) {
893 if (!empty($data['showinfo'])) {
896 if (!empty($data['showfname'])) {
899 if (!empty($data['showlink'])) {
968 protected function _auth_check($data){ argument
981 if (!empty($data['authlist'])) {
982 $authlist = $data['authlist'] . ','. $conf['superuser'];
991 function _zip_auth_check($data){ argument
1002 $authlist = $data['zipauthlist'];
1022 function _setConfOptions(&$data, $optstr){ argument
1025 $data[trim($opt)] = true;