1 | <?php |
---|
2 | /* |
---|
3 | Theme Name: modus |
---|
4 | Version: 2.7.b |
---|
5 | Description: Responsive, horizontal menu, retina aware, no lost space. |
---|
6 | Theme URI: http://piwigo.org/ext/extension_view.php?eid=728 |
---|
7 | Author: rvelices |
---|
8 | Author URI: http://www.modusoptimus.com |
---|
9 | */ |
---|
10 | $themeconf = array( |
---|
11 | 'name' => 'modus', |
---|
12 | 'parent' => 'default', |
---|
13 | ); |
---|
14 | |
---|
15 | define('MODUS_POP',0); |
---|
16 | define('MODUS_STR_RECENT', "\xe2\x9c\xbd"); //HEAVY TEARDROP-SPOKED ASTERISK |
---|
17 | define('MODUS_STR_RECENT_CHILD', "\xe2\x9c\xbb"); //TEARDROP-SPOKED ASTERISK |
---|
18 | |
---|
19 | if (isset($conf['modus_theme']) && !is_array($conf['modus_theme'])) |
---|
20 | { |
---|
21 | $conf['modus_theme'] = unserialize($conf['modus_theme']); |
---|
22 | } |
---|
23 | |
---|
24 | if (!empty($_GET['skin']) && !preg_match('/[^a-zA-Z0-9_-]/', $_GET['skin'])) |
---|
25 | $conf['modus_theme']['skin'] = $_GET['skin']; |
---|
26 | |
---|
27 | $this->assign('MODUS_CSS_VERSION', crc32(implode(',', array( |
---|
28 | 'a'.@$conf['modus_theme']['skin'], |
---|
29 | @$conf['modus_theme']['album_thumb_size'], |
---|
30 | ImageStdParams::get_by_type(IMG_SQUARE)->max_width(), |
---|
31 | MODUS_POP |
---|
32 | )))); |
---|
33 | |
---|
34 | if (isset($_COOKIE['caps'])) |
---|
35 | { |
---|
36 | setcookie('caps',false,0,cookie_path()); |
---|
37 | pwg_set_session_var('caps', explode('x', $_COOKIE['caps']) ); |
---|
38 | /*file_put_contents(PHPWG_ROOT_PATH.$conf['data_location'].'tmp/modus.log', implode("\t", array( |
---|
39 | date("Y-m-d H:i:s"), $_COOKIE['caps'], $_SERVER['HTTP_USER_AGENT'] |
---|
40 | ))."\n", FILE_APPEND);*/ |
---|
41 | } |
---|
42 | |
---|
43 | if ('mobile'==get_device()) |
---|
44 | $conf['tag_letters_column_number'] = 1; |
---|
45 | elseif ('tablet'==get_device()) |
---|
46 | $conf['tag_letters_column_number'] = min($conf['tag_letters_column_number'],3); |
---|
47 | |
---|
48 | $this->smarty->registerFilter('pre', 'modus_smarty_prefilter_wrap'); |
---|
49 | function modus_smarty_prefilter_wrap($source) |
---|
50 | { |
---|
51 | include_once(dirname(__FILE__).'/functions.inc.php'); |
---|
52 | return modus_smarty_prefilter($source); |
---|
53 | } |
---|
54 | |
---|
55 | |
---|
56 | if (!defined('IN_ADMIN') && defined('RVCDN') ) |
---|
57 | { |
---|
58 | $this->smarty->registerFilter('pre', 'rv_cdn_prefilter' ); |
---|
59 | add_event_handler('combined_script', 'rv_cdn_combined_script', EVENT_HANDLER_PRIORITY_NEUTRAL, 2); |
---|
60 | } |
---|
61 | |
---|
62 | function rv_cdn_prefilter($source, &$smarty) |
---|
63 | { |
---|
64 | $source = str_replace('src="{$ROOT_URL}{$themeconf.icon_dir}/', 'src="'.RVCDN_ROOT_URL.'{$themeconf.icon_dir}/', $source); |
---|
65 | $source = str_replace('url({$'.'ROOT_URL}', 'url('.RVCDN_ROOT_URL, $source); |
---|
66 | return $source; |
---|
67 | } |
---|
68 | function rv_cdn_combined_script($url, $script) |
---|
69 | { |
---|
70 | if (!$script->is_remote()) |
---|
71 | $url = RVCDN_ROOT_URL.$script->path; |
---|
72 | return $url; |
---|
73 | } |
---|
74 | |
---|
75 | if (defined('RVPT_JQUERY_SRC')) |
---|
76 | add_event_handler('loc_begin_page_header', 'modus_loc_begin_page_header'); |
---|
77 | function modus_loc_begin_page_header() |
---|
78 | { |
---|
79 | $all = $GLOBALS['template']->scriptLoader->get_all(); |
---|
80 | if ( ($jq = @$all['jquery']) ) |
---|
81 | $jq->set_path(RVPT_JQUERY_SRC); |
---|
82 | } |
---|
83 | |
---|
84 | add_event_handler('combinable_preparse', 'modus_combinable_preparse'); |
---|
85 | function modus_combinable_preparse($template) |
---|
86 | { |
---|
87 | global $conf; |
---|
88 | include_once(dirname(__FILE__).'/functions.inc.php'); |
---|
89 | |
---|
90 | try { |
---|
91 | $template->smarty->registerPlugin('modifier', 'cssGradient', 'modus_css_gradient'); |
---|
92 | } catch(SmartyException $exc) {} |
---|
93 | |
---|
94 | include( dirname(__FILE__).'/skins/'.$conf['modus_theme']['skin'].'.inc.php' ); |
---|
95 | |
---|
96 | $template->assign( array( |
---|
97 | 'skin' => $skin, |
---|
98 | 'MODUS_ALBUM_THUMB_SIZE' => intval(@$conf['modus_theme']['album_thumb_size']), |
---|
99 | 'SQUARE_WIDTH' => ImageStdParams::get_by_type(IMG_SQUARE)->max_width(), |
---|
100 | 'loaded_plugins' => $GLOBALS['pwg_loaded_plugins'] |
---|
101 | )); |
---|
102 | } |
---|
103 | |
---|
104 | |
---|
105 | $this->smarty->registerPlugin('function', 'cssResolution', 'modus_css_resolution'); |
---|
106 | function modus_css_resolution($params) |
---|
107 | { |
---|
108 | $base = @$params['base']; |
---|
109 | $min = @$params['min']; |
---|
110 | $max = @$params['max']; |
---|
111 | |
---|
112 | $rules = array(); |
---|
113 | if (!empty($base)) |
---|
114 | $rules[] = $base; |
---|
115 | foreach(array('min','max') as $type) |
---|
116 | { |
---|
117 | if (!empty($$type)) |
---|
118 | $rules[] = '(-webkit-'.$type.'-device-pixel-ratio:'.$$type.')'; |
---|
119 | } |
---|
120 | $res = implode(' and ', $rules); |
---|
121 | |
---|
122 | $rules = array(); |
---|
123 | if (!empty($base)) |
---|
124 | $rules[] = $base; |
---|
125 | foreach(array('min','max') as $type) |
---|
126 | { |
---|
127 | if (!empty($$type)) |
---|
128 | $rules[] = '('.$type.'-resolution:'.round(96*$$type,1).'dpi)'; |
---|
129 | } |
---|
130 | $res .= ','.implode(' and ', $rules); |
---|
131 | |
---|
132 | return $res; |
---|
133 | } |
---|
134 | |
---|
135 | $this->smarty->registerPlugin('function', 'modus_thumbs', 'modus_thumbs'); |
---|
136 | function modus_thumbs($x, $smarty) |
---|
137 | { |
---|
138 | global $template, $page, $conf; |
---|
139 | |
---|
140 | $default_params = $smarty->getTemplateVars('derivative_params'); |
---|
141 | $row_height = $default_params->max_height(); |
---|
142 | $device = get_device(); |
---|
143 | $container_margin = 5; |
---|
144 | |
---|
145 | if ('mobile'==$device) |
---|
146 | { |
---|
147 | $horizontal_margin = floor(0.01*$row_height); |
---|
148 | $container_margin = 0; |
---|
149 | } |
---|
150 | elseif ('tablet'==$device) |
---|
151 | $horizontal_margin = floor(0.015*$row_height); |
---|
152 | else |
---|
153 | $horizontal_margin = floor(0.02*$row_height); |
---|
154 | $vertical_margin = $horizontal_margin+1; |
---|
155 | |
---|
156 | $candidates = array($default_params); |
---|
157 | foreach( ImageStdParams::get_defined_type_map() as $params) |
---|
158 | { |
---|
159 | if ($params->max_height() > $row_height && $params->sizing->max_crop == $default_params->sizing->max_crop ) |
---|
160 | { |
---|
161 | $candidates[] = $params; |
---|
162 | if (count($candidates)==3) |
---|
163 | break; |
---|
164 | } |
---|
165 | } |
---|
166 | |
---|
167 | $do_pop = MODUS_POP && 'desktop' == $device; |
---|
168 | $do_over = !MODUS_POP && 'desktop' == $device; |
---|
169 | |
---|
170 | if ($do_pop && !isset($_GET['rvts'])) echo '<div id=pop style=display:none;z-index:2;border:0;position:absolute></div> |
---|
171 | '; |
---|
172 | |
---|
173 | $new_icon = " <span class=albSymbol title=\"".l10n('posted on %s')."\">".MODUS_STR_RECENT.'</span>'; |
---|
174 | |
---|
175 | foreach($smarty->getTemplateVars('thumbnails') as $item) |
---|
176 | { |
---|
177 | $src_image = $item['src_image']; |
---|
178 | $new = !empty($item['icon_ts']) ? sprintf($new_icon, format_date($item['date_available'])) : ''; |
---|
179 | |
---|
180 | $idx=0; |
---|
181 | do { |
---|
182 | $cparams = $candidates[$idx]; |
---|
183 | $c = new DerivativeImage($cparams, $src_image); |
---|
184 | $csize = $c->get_size(); |
---|
185 | $idx++; |
---|
186 | } |
---|
187 | while($csize[1]<$row_height-2 && $idx<count($candidates)); |
---|
188 | |
---|
189 | if ($do_pop && $idx<count($candidates)) |
---|
190 | { |
---|
191 | $pop = new DerivativeImage($candidates[$idx], $src_image); |
---|
192 | $popsize = $pop->get_size(); |
---|
193 | } |
---|
194 | else |
---|
195 | { |
---|
196 | $pop = $c; |
---|
197 | $popsize = $csize; |
---|
198 | } |
---|
199 | |
---|
200 | $a_style = ''; |
---|
201 | if ($csize[1] < $row_height) |
---|
202 | $a_style=' style="top:'.floor(($row_height-$csize[1])/2).'px"'; |
---|
203 | elseif ($csize[1] > $row_height) |
---|
204 | $csize = $c->get_scaled_size(9999, $row_height); |
---|
205 | if ($do_pop) {?> |
---|
206 | <li style=width:<?=$csize[0]?>px;height:<?=$row_height?>px><a href="<?=$item['URL']?>"<?=$a_style?>><img src="<?=$c->get_url()?>" width=<?=$csize[0]?> height=<?=$csize[1]?> alt="<?=$item['TN_ALT']?>" data-pop='{"w":<?=$popsize[0]?>,"h":<?=$popsize[1]?>,"url":"<?=$pop->get_url()?>"}'></a><b class=popDesc><b><?=$item['NAME']?></b><?=$new?><br><?=$item['DESCRIPTION']?></b></li> |
---|
207 | <?php |
---|
208 | } elseif ($do_over) {?> |
---|
209 | <li style=width:<?=$csize[0]?>px;height:<?=$row_height?>px><a href="<?=$item['URL']?>"<?=$a_style?>><img src="<?=$c->get_url()?>" width=<?=$csize[0]?> height=<?=$csize[1]?> alt="<?=$item['TN_ALT']?>"></a><div class=overDesc><?=$item['NAME']?><?=$new?></div></li> |
---|
210 | <?php |
---|
211 | } else {?> |
---|
212 | <li style=width:<?=$csize[0]?>px;height:<?=$row_height?>px><a href="<?=$item['URL']?>"<?=$a_style?>><img src="<?=$c->get_url()?>" width=<?=$csize[0]?> height=<?=$csize[1]?> alt="<?=$item['TN_ALT']?>"></a></li> |
---|
213 | <?php |
---|
214 | } |
---|
215 | } |
---|
216 | |
---|
217 | $template->block_html_style(null, |
---|
218 | '#thumbnails{text-align:justify;overflow:hidden;margin-left:'.($container_margin-$horizontal_margin).'px;margin-right:'.$container_margin.'px} |
---|
219 | #thumbnails>li{float:left;overflow:hidden;position:relative;margin-bottom:'.$vertical_margin.'px;margin-left:'.$horizontal_margin.'px}#thumbnails>li>a{position:absolute;border:0}'); |
---|
220 | $template->block_footer_script(null, 'rvgtProcessor=new RVGThumbs({hMargin:'.$horizontal_margin.',rowHeight:'.$row_height.'});'); |
---|
221 | |
---|
222 | $my_base_name = basename(dirname(__FILE__)); |
---|
223 | // not async to avoid visible flickering reflow |
---|
224 | $template->scriptLoader->add('modus.arange', 1, array('jquery'), 'themes/'.$my_base_name."/js/thumb.arrange.min.js", 0); |
---|
225 | if ($do_pop) |
---|
226 | $template->scriptLoader->add('modus.pop', 2, array('jquery'), 'themes/'.$my_base_name."/js/thumb.pop.js", 0); |
---|
227 | } |
---|
228 | |
---|
229 | add_event_handler('loc_end_index', 'modus_on_end_index'); |
---|
230 | function modus_on_end_index() |
---|
231 | { |
---|
232 | global $template; |
---|
233 | if (!pwg_get_session_var('caps')) |
---|
234 | $template->block_footer_script(null, 'try{document.cookie="caps="+(window.devicePixelRatio?window.devicePixelRatio:1)+"x"+document.documentElement.clientWidth+"x"+document.documentElement.clientHeight+";path='.cookie_path().'"}catch(er){document.cookie="caps=1x1x1x"+err.message;}'); |
---|
235 | |
---|
236 | $req = null; |
---|
237 | $all = $template->scriptLoader->get_all(); |
---|
238 | if (isset($all['modus.thumb.pop']) || !MODUS_POP || 'desktop' != get_device()) |
---|
239 | return; |
---|
240 | foreach($all as $script) |
---|
241 | { |
---|
242 | if($script->load_mode==2 && !$script->is_remote() && count($script->precedents)==0) |
---|
243 | { |
---|
244 | $req = $script->id; |
---|
245 | break; |
---|
246 | } |
---|
247 | } |
---|
248 | if($req!=null) |
---|
249 | $template->scriptLoader->add('modus.pop', 2, array($req), 'themes/'.basename(dirname(__FILE__))."/js/thumb.pop.js", 0); |
---|
250 | } |
---|
251 | |
---|
252 | add_event_handler('get_index_derivative_params', 'modus_get_index_photo_derivative_params', EVENT_HANDLER_PRIORITY_NEUTRAL+1 ); |
---|
253 | function modus_get_index_photo_derivative_params($default) |
---|
254 | { |
---|
255 | global $conf; |
---|
256 | if (isset($conf['modus_theme']) && pwg_get_session_var('index_deriv')===null) |
---|
257 | { |
---|
258 | $type = $conf['modus_theme']['index_photo_deriv']; |
---|
259 | if ( $caps=pwg_get_session_var('caps') ) |
---|
260 | { |
---|
261 | if ( ($caps[0]>=2 && $caps[1]>=768) /*Ipad3 always has clientWidth 768 independently of orientation*/ |
---|
262 | || $caps[0]>=3 |
---|
263 | ) |
---|
264 | $type = $conf['modus_theme']['index_photo_deriv_hdpi']; |
---|
265 | } |
---|
266 | $new = @ImageStdParams::get_by_type($type); |
---|
267 | if ($new) return $new; |
---|
268 | } |
---|
269 | return $default; |
---|
270 | } |
---|
271 | |
---|
272 | add_event_handler('loc_end_index_category_thumbnails', 'modus_index_category_thumbnails' ); |
---|
273 | function modus_index_category_thumbnails($items) |
---|
274 | { |
---|
275 | global $page, $template, $conf; |
---|
276 | |
---|
277 | if ('categories'!=$page['section'] || !($wh=@$conf['modus_theme']['album_thumb_size']) ) |
---|
278 | return $items;; |
---|
279 | |
---|
280 | $template->assign('album_thumb_size', $wh); |
---|
281 | |
---|
282 | $def_params = ImageStdParams::get_custom($wh, $wh, 1, $wh, $wh); |
---|
283 | foreach( ImageStdParams::get_defined_type_map() as $params) |
---|
284 | { |
---|
285 | if ($params->max_height() == $wh) |
---|
286 | $alt_params = $params; |
---|
287 | } |
---|
288 | |
---|
289 | foreach($items as &$item) |
---|
290 | { |
---|
291 | $src_image = $item['representative']['src_image']; |
---|
292 | $src_size = $src_image->get_size(); |
---|
293 | |
---|
294 | $deriv = null; |
---|
295 | if (isset($alt_params) && $src_size[0]>=$src_size[1]) |
---|
296 | { |
---|
297 | $dsize = $alt_params->compute_final_size($src_size); |
---|
298 | if ($dsize[0]>=$wh && $dsize[1]>=$wh) |
---|
299 | { |
---|
300 | $deriv = new DerivativeImage($alt_params, $src_image); |
---|
301 | $rect = new ImageRect($dsize); |
---|
302 | $rect->crop_h( $dsize[0]-$wh, $item['representative']['coi'] ); |
---|
303 | $rect->crop_v( $dsize[1]-$wh, $item['representative']['coi'] ); |
---|
304 | $l = - $rect->l; |
---|
305 | $t = - $rect->t; |
---|
306 | } |
---|
307 | } |
---|
308 | |
---|
309 | if (!isset($deriv)) |
---|
310 | { |
---|
311 | $deriv = new DerivativeImage($def_params, $src_image); |
---|
312 | $dsize = $deriv->get_size(); |
---|
313 | $l = intval($wh-$dsize[0])/2; |
---|
314 | $t = intval($wh-$dsize[1])/2; |
---|
315 | } |
---|
316 | $item['modus_deriv'] = $deriv; |
---|
317 | |
---|
318 | if (!empty($item['icon_ts'])) |
---|
319 | $item['icon_ts']['TITLE'] = time_since($item['max_date_last'], 'month'); |
---|
320 | |
---|
321 | $styles = array(); |
---|
322 | if ($l<-1 || $l>1) |
---|
323 | $styles[] = 'left:'.(100*$l/$wh).'%'; |
---|
324 | |
---|
325 | if ($t<-1 || $t>1) |
---|
326 | $styles[] = 'top:'.$t.'px'; |
---|
327 | if (count($styles)) |
---|
328 | $styles = ' style='.implode(';', $styles); |
---|
329 | else |
---|
330 | $styles=''; |
---|
331 | $item['MODUS_STYLE'] = $styles; |
---|
332 | } |
---|
333 | |
---|
334 | return $items; |
---|
335 | } |
---|
336 | |
---|
337 | add_event_handler('loc_begin_picture', 'modus_loc_begin_picture'); |
---|
338 | function modus_loc_begin_picture() |
---|
339 | { |
---|
340 | global $conf, $template; |
---|
341 | if ( isset($_GET['slideshow']) ) |
---|
342 | { |
---|
343 | $conf['picture_menu'] = false; |
---|
344 | return; |
---|
345 | } |
---|
346 | |
---|
347 | if ( isset($_GET['map']) ) |
---|
348 | return; |
---|
349 | $template->append('head_elements', '<script>if(document.documentElement.offsetWidth>1270)document.documentElement.className=\'wide\'</script>'); |
---|
350 | } |
---|
351 | |
---|
352 | add_event_handler('render_element_content', 'modus_picture_content', EVENT_HANDLER_PRIORITY_NEUTRAL-1, 2 ); |
---|
353 | function modus_picture_content($content, $element_info) |
---|
354 | { |
---|
355 | global $conf, $picture, $template; |
---|
356 | |
---|
357 | if ( !empty($content) ) // someone hooked us - so we skip; |
---|
358 | return $content; |
---|
359 | |
---|
360 | $unique_derivatives = array(); |
---|
361 | $show_original = isset($element_info['element_url']); |
---|
362 | $added = array(); |
---|
363 | foreach($element_info['derivatives'] as $type => $derivative) |
---|
364 | { |
---|
365 | if ($type==IMG_SQUARE || $type==IMG_THUMB) |
---|
366 | continue; |
---|
367 | if (!array_key_exists($type, ImageStdParams::get_defined_type_map())) |
---|
368 | continue; |
---|
369 | $url = $derivative->get_url(); |
---|
370 | if (isset($added[$url])) |
---|
371 | continue; |
---|
372 | $added[$url] = 1; |
---|
373 | $show_original &= !($derivative->same_as_source()); |
---|
374 | $unique_derivatives[$type]= $derivative; |
---|
375 | } |
---|
376 | |
---|
377 | if (isset($_COOKIE['picture_deriv'])) // ignore persistence |
---|
378 | setcookie('picture_deriv', false, 0, cookie_path() ); |
---|
379 | |
---|
380 | $selected_derivative = null; |
---|
381 | if (isset($_COOKIE['phavsz'])) |
---|
382 | $available_size = explode('x', $_COOKIE['phavsz']); |
---|
383 | elseif ( ($caps=pwg_get_session_var('caps')) && $caps[0]>1 ) |
---|
384 | $available_size = array($caps[0]*$caps[1], $caps[0]*($caps[2]-100), $caps[0]); |
---|
385 | |
---|
386 | if (isset($available_size)) |
---|
387 | { |
---|
388 | foreach($unique_derivatives as $derivative) |
---|
389 | { |
---|
390 | $size = $derivative->get_size(); |
---|
391 | if (!$size) |
---|
392 | break; |
---|
393 | |
---|
394 | if ($size[0] <= $available_size[0] and $size[1] <= $available_size[1]) |
---|
395 | $selected_derivative = $derivative; |
---|
396 | else |
---|
397 | { |
---|
398 | if ($available_size[2]>1 || !$selected_derivative) |
---|
399 | $selected_derivative = $derivative; |
---|
400 | break; |
---|
401 | } |
---|
402 | } |
---|
403 | |
---|
404 | if ($available_size[2]>1 && $selected_derivative) |
---|
405 | { |
---|
406 | $ratio_w = $size[0] / $available_size[0]; |
---|
407 | $ratio_h = $size[1] / $available_size[1]; |
---|
408 | if ($ratio_w>1 || $ratio_h>1) |
---|
409 | { |
---|
410 | if ($ratio_w > $ratio_h) |
---|
411 | $display_size = array( $available_size[0]/$available_size[2], floor($size[1] / $ratio_w / $available_size[2]) ); |
---|
412 | else |
---|
413 | $display_size = array( floor($size[0] / $ratio_h / $available_size[2]), $available_size[1]/$available_size[2] ); |
---|
414 | } |
---|
415 | else |
---|
416 | $display_size = array( round($size[0]/$available_size[2]), round($size[1]/$available_size[2]) ); |
---|
417 | $template->assign( array( |
---|
418 | 'rvas_display_size' => $display_size, |
---|
419 | 'rvas_natural_size' => $size, |
---|
420 | )); |
---|
421 | } |
---|
422 | |
---|
423 | if (isset($picture['next']) |
---|
424 | and $picture['next']['src_image']->is_original()) |
---|
425 | { |
---|
426 | $next_best = null; |
---|
427 | foreach( $picture['next']['derivatives'] as $derivative) |
---|
428 | { |
---|
429 | $size = $derivative->get_size(); |
---|
430 | if (!$size) |
---|
431 | break; |
---|
432 | if ($size[0] <= $available_size[0] and $size[1] <= $available_size[1]) |
---|
433 | $next_best = $derivative; |
---|
434 | else |
---|
435 | { |
---|
436 | if ($available_size[2]>1 || !$next_best) |
---|
437 | $next_best = $derivative; |
---|
438 | break; |
---|
439 | } |
---|
440 | } |
---|
441 | |
---|
442 | if (isset($next_best)) |
---|
443 | $template->assign('U_PREFETCH', $next_best->get_url() ); |
---|
444 | } |
---|
445 | } |
---|
446 | |
---|
447 | $as_pending = false; |
---|
448 | if (!$selected_derivative) |
---|
449 | { |
---|
450 | $as_pending = true; |
---|
451 | $selected_derivative = $element_info['derivatives'][ pwg_get_session_var('picture_deriv',$conf['derivative_default_size']) ]; |
---|
452 | } |
---|
453 | |
---|
454 | |
---|
455 | if ($show_original) |
---|
456 | $template->assign( 'U_ORIGINAL', $element_info['element_url'] ); |
---|
457 | |
---|
458 | $template->append('current', array( |
---|
459 | 'selected_derivative' => $selected_derivative, |
---|
460 | 'unique_derivatives' => $unique_derivatives, |
---|
461 | ), true); |
---|
462 | |
---|
463 | |
---|
464 | $template->set_filenames( |
---|
465 | array('default_content'=>'picture_content_asize.tpl') |
---|
466 | ); |
---|
467 | |
---|
468 | $template->assign( array( |
---|
469 | 'ALT_IMG' => $element_info['file'], |
---|
470 | 'COOKIE_PATH' => cookie_path(), |
---|
471 | 'RVAS_PENDING' => $as_pending, |
---|
472 | ) |
---|
473 | ); |
---|
474 | return $template->parse( 'default_content', true); |
---|
475 | } |
---|
476 | |
---|
477 | ?> |
---|