Changeset 17828 for extensions
- Timestamp:
- Sep 9, 2012, 4:36:02 PM (12 years ago)
- Location:
- extensions/stripped_black_bloc
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/stripped_black_bloc/admin/admin.inc.php
r13895 r17828 33 33 $config_send['starting_to']=(isset($_POST['f_starting_to'])) ? $_POST['f_starting_to'] : 1; 34 34 $config_send['catthumb']=(isset($_POST['f_catthumb'])) ? $_POST['f_catthumb'] : 'none'; 35 $config_send['portrait_limitation']=(isset($_POST['f_portrait_limitation'])) ? $_POST['f_portrait_limitation'] : 'none'; 35 36 conf_update_param('stripped_black_bloc', pwg_db_real_escape_string(serialize($config_send))); 36 37 -
extensions/stripped_black_bloc/admin/admin.tpl
r13894 r17828 45 45 <li> 46 46 <br><br> 47 <label>{'About portrait pictures :'|@translate}</label> 48 <br><br> 49 <label> 50 <input type="radio" name="f_portrait_limitation" id="portrait_limitation" value="none" {if $options.portrait_limitation=="none"}checked{/if}> 51 {'No Maximum Height, the width is the one set above'|@translate}</label> 52 <br> 53 <label> 54 <input type="radio" name="f_portrait_limitation" id="portrait_limitation" value="yes" {if $options.portrait_limitation=="yes"}checked{/if}> 55 {'Use the width parameter above as a maximum heigth'|@translate}</label> 56 <br> 57 </li> 58 <li> 59 <br><br> 47 60 <label for="thumbnail">{'About big thumbnails, for the albums :'|@translate}</label> 48 61 <br><br> -
extensions/stripped_black_bloc/admin/maintain.inc.php
r13895 r17828 13 13 'every_x' => 20, 14 14 'starting_to' => 1, 15 'catthumb' => 'none' //none - same - all 15 'catthumb' => 'none', //none - same - all 16 'portrait_limitation' => 'none' //none - yes 16 17 ); 17 18 -
extensions/stripped_black_bloc/admin/upgrade.inc.php
r13895 r17828 13 13 'every_x' => 20, 14 14 'starting_to' => 1, 15 'catthumb' => 'none' //none - same - all 15 'catthumb' => 'none', //none - same - all 16 'portrait_limitation' => 'none' //none - yes 16 17 ); 17 18 $query = " … … 21 22 load_conf_from_db(); 22 23 } 23 elseif (count(unserialize( $conf['stripped_black_bloc'] ))!= 6)24 elseif (count(unserialize( $conf['stripped_black_bloc'] ))!=7) 24 25 { 26 $conff=unserialize($conf['stripped_black_bloc']); 25 27 $config = array( 26 'color_main' => 'E6554F', 27 'column_width' => 170, 28 'thumbnail_width' => 150, 29 'every_x' => 20, 30 'starting_to' => 1, 31 'catthumb' => 'none' //none - same - all 32 ); 33 conf_update_param('stripped_black_bloc', pwg_db_real_escape_string(serialize($config))); 34 load_conf_from_db(); 35 } 36 elseif ($conff=unserialize($conf['stripped_black_bloc']) and ( !isset($conff['catthumb']) or empty($conff['catthumb'])) ) 37 { 38 $config = array( 39 'color_main' => $conff['color_main'], 40 'column_width' => $conff['column_width'], 41 'thumbnail_width' => $conff['thumbnail_width'], 42 'every_x' => $conff['every_x'], 43 'starting_to' => $conff['starting_to'], 44 'catthumb' => 'none' //none - same - all 28 'color_main' => (isset($conff['color_main'])) ? $conff['color_main'] :'E6554F', 29 'column_width' => (isset($conff['column_width'])) ? $conff['column_width'] :170, 30 'thumbnail_width' => (isset($conff['thumbnail_width'])) ? $conff['thumbnail_width'] :150, 31 'every_x' => (isset($conff['every_x'])) ? $conff['every_x'] : 20, 32 'starting_to' => (isset($conff['starting_to'])) ? $conff['starting_to'] :1, 33 'catthumb' => (isset($conff['catthumb'])) ? $conff['catthumb'] :'none', //none - same - all 34 'portrait_limitation' => (isset($conff['portrait_limitation'])) ? $conff['portrait_limitation'] :'none' //none - yes 45 35 ); 46 36 conf_update_param('stripped_black_bloc', pwg_db_real_escape_string(serialize($config))); -
extensions/stripped_black_bloc/local_head.tpl
r16790 r17828 9 9 max-width: {/literal}{if $stripped_black_bloc.thumbnail_width}{$stripped_black_bloc.thumbnail_width}{/if}{literal}px; 10 10 } 11 .bloc a {11 .bloc a { 12 12 max-width:{/literal}{if $stripped_black_bloc.thumbnail_width}{$stripped_black_bloc.thumbnail_width}{/if}{literal}px; 13 13 } … … 17 17 .bloc_big a { 18 18 max-width:{/literal}{if $stripped_black_bloc.thumbnail_width}{$stripped_black_bloc.thumbnail_width+$stripped_black_bloc.column_width}{/if}{literal}px; 19 } 20 .bloc_wide { 21 max-width: {/literal}{if $stripped_black_bloc.thumbnail_width}{$stripped_black_bloc.thumbnail_width+$stripped_black_bloc.column_width+$stripped_black_bloc.column_width}{/if}{literal}px; 22 } 23 .bloc_wide a { 24 max-width:{/literal}{if $stripped_black_bloc.thumbnail_width}{$stripped_black_bloc.thumbnail_width+$stripped_black_bloc.column_width+$stripped_black_bloc.column_width}{/if}{literal}px; 19 25 } 20 26 .content_block, .bloc_stuff, .two_columns { -
extensions/stripped_black_bloc/template/mainpage_categories.tpl
r13894 r17828 1 1 {define_derivative name='derivative_stripped_black_bloc' width=$stripped_black_bloc.thumbnail_width height=9999 crop=false} 2 2 {define_derivative name='derivative_stripped_black_bloc_big' width=$stripped_black_bloc.thumbnail_width+$stripped_black_bloc.column_width height=9999 crop=false} 3 {define_derivative name='derivative_stripped_black_bloc_wide' width=$stripped_black_bloc.thumbnail_width+$stripped_black_bloc.column_width+$stripped_black_bloc.column_width height=9999 crop=false} 4 {define_derivative name='derivative_stripped_black_bloc_vert' width=$stripped_black_bloc.thumbnail_width height=$stripped_black_bloc.thumbnail_width crop=false} 5 {define_derivative name='derivative_stripped_black_bloc_big_vert' width=$stripped_black_bloc.thumbnail_width+$stripped_black_bloc.column_width height=$stripped_black_bloc.thumbnail_width+$stripped_black_bloc.column_width crop=false} 6 3 7 {foreach from=$category_thumbnails item=cat} 4 {if $cat.TN_CLASS=="bloc_big" and $stripped_black_bloc.catthumb=="same"} 5 {assign var=derivative value=$pwg->derivative($derivative_stripped_black_bloc_big, $cat.representative.src_image)} 6 {elseif $stripped_black_bloc.catthumb=="all"} 7 {assign var=derivative value=$pwg->derivative($derivative_stripped_black_bloc_big, $cat.representative.src_image)} 8 {assign var=triplehigh value= $cat.representative.height+$cat.representative.height+$cat.representative.height} 9 {if $cat.representative.width gt $triplehigh} 10 {assign var=derivative value=$pwg->derivative($derivative_stripped_black_bloc_wide, $cat.representative.src_image)} 11 {assign var='size' value=$derivative->get_size()} 12 <div class="bloc_big album"> 13 <a href="{$cat.URL}" style="background: url({$derivative->get_url()}) no-repeat scroll center center transparent; height: {$size[1]}px; width: {$size[0]}px; opacity: 0.75;" > 14 {$cat.NAME} 15 </a> 16 <div class="title">{$cat.NAME}</div> 17 </div> 8 18 {else} 9 {assign var=derivative value=$pwg->derivative($derivative_stripped_black_bloc, $cat.representative.src_image)} 10 {/if} 11 {assign var='size' value=$derivative->get_size()} 19 {if $cat.representative.width < $cat.representative.height and $stripped_black_bloc.catthumb=="yes"} 20 {if $cat.TN_CLASS=="bloc_big" and $stripped_black_bloc.catthumb=="same"} 21 {assign var=derivative value=$pwg->derivative($derivative_stripped_black_bloc_big_vert, $cat.representative.src_image)} 22 {elseif $stripped_black_bloc.catthumb=="all"} 23 {assign var=derivative value=$pwg->derivative($derivative_stripped_black_bloc_big_vert, $cat.representative.src_image)} 24 {else} 25 {assign var=derivative value=$pwg->derivative($derivative_stripped_black_bloc_vert, $cat.representative.src_image)} 26 {/if} 27 {else} 28 {if $cat.TN_CLASS=="bloc_big" and $stripped_black_bloc.catthumb=="same"} 29 {assign var=derivative value=$pwg->derivative($derivative_stripped_black_bloc_big, $cat.representative.src_image)} 30 {elseif $stripped_black_bloc.catthumb=="all"} 31 {assign var=derivative value=$pwg->derivative($derivative_stripped_black_bloc_big, $cat.representative.src_image)} 32 {else} 33 {assign var=derivative value=$pwg->derivative($derivative_stripped_black_bloc, $cat.representative.src_image)} 34 {/if} 35 {/if} 36 {assign var='size' value=$derivative->get_size()} 12 37 <div class="{if $stripped_black_bloc.catthumb=="all"}bloc_big{else}{$cat.TN_CLASS}{/if} album"> 13 38 <a href="{$cat.URL}" style="background: url({$derivative->get_url()}) no-repeat scroll center center transparent; height: {$size[1]}px; width: {$size[0]}px; opacity: 0.75;" > … … 16 41 <div class="title">{$cat.NAME}</div> 17 42 </div> 43 {/if} 18 44 {/foreach} -
extensions/stripped_black_bloc/template/thumbnails.tpl
r17740 r17828 3 3 {define_derivative name='derivative_stripped_black_bloc' width=$stripped_black_bloc.thumbnail_width height=9999 crop=false} 4 4 {define_derivative name='derivative_stripped_black_bloc_big' width=$stripped_black_bloc.thumbnail_width+$stripped_black_bloc.column_width height=9999 crop=false} 5 {define_derivative name='derivative_stripped_black_bloc_wide' width=$stripped_black_bloc.thumbnail_width+$stripped_black_bloc.column_width+$stripped_black_bloc.column_width height=9999 crop=false} 6 {define_derivative name='derivative_stripped_black_bloc_vert' width=$stripped_black_bloc.thumbnail_width height=$stripped_black_bloc.thumbnail_width crop=false} 7 {define_derivative name='derivative_stripped_black_bloc_big_vert' width=$stripped_black_bloc.thumbnail_width+$stripped_black_bloc.column_width height=$stripped_black_bloc.thumbnail_width+$stripped_black_bloc.column_width crop=false} 5 8 {if !empty($thumbnails)} 6 9 {foreach from=$thumbnails item=thumbnail} 7 {if $thumbnail.TN_CLASS=="bloc"} 8 {assign var=derivative value=$pwg->derivative($derivative_stripped_black_bloc, $thumbnail.src_image)} 10 {assign var=triplehigh value=$thumbnail.height+$thumbnail.height+$thumbnail.height} 11 {if ($thumbnail.width > $triplehigh) } 12 {assign var=derivative value=$pwg->derivative($derivative_stripped_black_bloc_wide, $thumbnail.src_image)} 13 {assign var='size' value=$derivative->get_size()} 14 <div class="bloc bloc_wide"> 15 <a href="{$thumbnail.URL}" style="background: url({if $derivative->is_cached()}{$derivative->get_url()}{else}{$ROOT_URL}{$themeconf.img_dir}/loading.gif{/if}) no-repeat scroll center center transparent; height: {$size[1]}px; width: {$size[0]}px; opacity: 0.75;" {if !$derivative->is_cached()}data-src="{$derivative->get_url()}"{/if}> 16 {if isset($thumbnail.NAME)}{$thumbnail.NAME}{else}{$thumbnail.TN_TITLE}{/if} 17 </a> 18 {if $SHOW_THUMBNAIL_CAPTION } 19 <div class="title">{if isset($thumbnail.NAME)}{$thumbnail.NAME}{/if}</div> 20 {/if} 21 </div> 22 {else} 23 {if (($thumbnail.width < $thumbnail.height) and $stripped_black_bloc.portrait_limitation=="yes")} 24 {if $thumbnail.TN_CLASS=="bloc"} 25 {assign var=derivative value=$pwg->derivative($derivative_stripped_black_bloc_vert, $thumbnail.src_image)} 26 {else} 27 {assign var=derivative value=$pwg->derivative($derivative_stripped_black_bloc_big_vert, $thumbnail.src_image)} 28 {/if} 9 29 {else} 10 {assign var=derivative value=$pwg->derivative($derivative_stripped_black_bloc_big, $thumbnail.src_image)} 11 {/if} 12 {assign var='size' value=$derivative->get_size()} 13 <div class="{$thumbnail.TN_CLASS}"> 14 <a href="{$thumbnail.URL}" style="background: url({if $derivative->is_cached()}{$derivative->get_url()}{else}{$ROOT_URL}{$themeconf.img_dir}/loading.gif{/if}) no-repeat scroll center center transparent; height: {$size[1]}px; width: {$size[0]}px; opacity: 0.75;" {if !$derivative->is_cached()}data-src="{$derivative->get_url()}"{/if}> 30 {if $thumbnail.TN_CLASS=="bloc"} 31 {assign var=derivative value=$pwg->derivative($derivative_stripped_black_bloc, $thumbnail.src_image)} 32 {else} 33 {assign var=derivative value=$pwg->derivative($derivative_stripped_black_bloc_big, $thumbnail.src_image)} 34 {/if} 35 {/if} 36 {assign var='size' value=$derivative->get_size()} 37 <div class="{$thumbnail.TN_CLASS}"> 38 <a href="{$thumbnail.URL}" style="background: url({if $derivative->is_cached()}{$derivative->get_url()}{else}{$ROOT_URL}{$themeconf.img_dir}/loading.gif{/if}) no-repeat scroll center center transparent; height: {$size[1]}px; width: {$size[0]}px; opacity: 0.75;" {if !$derivative->is_cached()}data-src="{$derivative->get_url()}"{/if}> 15 39 {if isset($thumbnail.NAME)}{$thumbnail.NAME}{else}{$thumbnail.TN_TITLE}{/if} 16 </a>17 {if $SHOW_THUMBNAIL_CAPTION }40 </a> 41 {if $SHOW_THUMBNAIL_CAPTION } 18 42 <div class="title">{if isset($thumbnail.NAME)}{$thumbnail.NAME}{/if}</div> 19 43 {/if} 20 </div> 44 </div> 45 {/if} 21 46 {/foreach} 22 47 {/if}
Note: See TracChangeset
for help on using the changeset viewer.