Changeset 16121 for extensions/ExtendedDescription
- Timestamp:
- Jun 28, 2012, 3:08:25 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/ExtendedDescription/main.inc.php
r16120 r16121 125 125 $replacements[] = ($param == 'subcatify_category_description') ? '' : 'get_img_thumb("$1", "$2", "$3")'; 126 126 127 // Balises [photo=xx.yy;SQ|TH|XXS|XS|S|M|L|XL|XXL ]128 $patterns[] = '#\[photo=([\d\.]*);?(SQ|TH|XXS|XS|S|M|L|XL|XXL|) \]#ie';129 $replacements[] = ($param == 'subcatify_category_description') ? '' : 'get_photo_sized("$1", "$2" )';127 // Balises [photo=xx.yy;SQ|TH|XXS|XS|S|M|L|XL|XXL;true|false] 128 $patterns[] = '#\[photo=([\d\.]*);?(SQ|TH|XXS|XS|S|M|L|XL|XXL|);?(true|false|)\]#ie'; 129 $replacements[] = ($param == 'subcatify_category_description') ? '' : 'get_photo_sized("$1", "$2", "$3")'; 130 130 131 131 // [random album=xx] … … 372 372 373 373 // Return html code for a photo 374 function get_photo_sized($elem_id, $size )374 function get_photo_sized($elem_id, $size, $show_url) 375 375 { 376 376 global $template; 377 378 if (empty($size)) $size = 'M'; 379 if (empty($show_url)) $show_url = 'true'; 377 380 378 381 list($image_id, $cat_id) = array_pad(explode(".",$elem_id), 2, ""); … … 390 393 ); 391 394 392 if (empty($size)) $size = 'M';393 395 $deriv_type = $size_map[ strtoupper($size) ]; 394 396 … … 434 436 } 435 437 436 return '<a href="'.$url.'">'.$template->parse('extended_description_content', true).'</a>'; 438 $content = $template->parse('extended_description_content', true); 439 if (get_boolean($show_url)) 440 { 441 return '<a href="'.$url.'">'.$content.'</a>'; 442 } 443 else 444 { 445 return $content; 446 } 437 447 } 438 448
Note: See TracChangeset
for help on using the changeset viewer.