Changeset 13894
- Timestamp:
- Apr 4, 2012, 5:47:23 PM (12 years ago)
- Location:
- extensions/stripped_black_bloc
- Files:
-
- 1 deleted
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/stripped_black_bloc/admin/admin.inc.php
r12048 r13894 5 5 global $conf; 6 6 7 if (!isset($conf['stripped_black_bloc'])) 8 include(PHPWG_THEMES_PATH.'stripped_black_bloc/admin/upgrade.inc.php'); 7 include(PHPWG_THEMES_PATH.'stripped_black_bloc/admin/upgrade.inc.php'); 9 8 10 9 load_language('theme.lang', PHPWG_THEMES_PATH.'stripped_black_bloc/'); … … 33 32 $config_send['every_x']=(isset($_POST['f_every_x'])) ? $_POST['f_every_x'] : 20; 34 33 $config_send['starting_to']=(isset($_POST['f_starting_to'])) ? $_POST['f_starting_to'] : 1; 35 $config_send[' thumbnail']=(isset($_POST['f_thumbnail'])) ? $_POST['f_thumbnail'] : 'piwigo';34 $config_send['catthumb']=(isset($_POST['f_catthumb'])) ? $_POST['f_catthumb'] : 'none'; 36 35 conf_update_param('stripped_black_bloc', pwg_db_real_escape_string(serialize($config_send))); 37 36 -
extensions/stripped_black_bloc/admin/admin.tpl
r12048 r13894 1 {html_style}{literal} 2 FORM.properties SPAN.property { 3 float: left; 4 font-weight: bold; 5 margin: 0; 6 padding: 0 0.5em 0 0; 7 text-align: right; 8 width: auto; 9 } 10 {/literal}{/html_style} 11 1 12 <div class="titrePage"> 2 13 <h2>{'Stripped & Columns Theme Configuration'|@translate}</h2> … … 15 26 <label for="column_width"><span class="property">{'Width of columns'|@translate}</span> </label> 16 27 <input type="text" id="column_width" name="f_column_width" size="4" maxlength="4" value="{$options.column_width}" style="text-align:center;"> 17 px28 {'pixels'|@translate} 18 29 </li> 19 30 <li> 20 31 <label for="column_width"><span class="property">{'Width of thumbnails'|@translate}</span> </label> 21 32 <input type="text" id="column_width" name="f_thumbnail_width" size="4" maxlength="4" value="{$options.thumbnail_width}" style="text-align:center;"> 22 px {'it need to be inferior than the width of columns'|@translate}33 {'pixels'|@translate} {'(it need to be inferior than the width of columns)'|@translate} 23 34 </li> 24 35 <li> … … 33 44 </li> 34 45 <li> 35 <label for="thumbnail">{'The thumbnails can be generated by the theme'|@translate}</label> 36 </p> 46 <br><br> 47 <label for="thumbnail">{'About big thumbnails, for the albums :'|@translate}</label> 48 <br><br> 37 49 <label> 38 <input type="radio" name="f_ thumbnail" id="thumbnail" value="generated" {if $options.thumbnail=="generated"}checked{/if}>39 {' option thumbnail generated'|@translate}</label>50 <input type="radio" name="f_catthumb" id="catthumb" value="none" {if $options.catthumb=="none"}checked{/if}> 51 {'don\'t generate big thumbnails'|@translate}</label> 40 52 <br> 41 53 <label> 42 <input type="radio" name="f_ thumbnail" id="thumbnail" value="auto" {if $options.thumbnail=="auto"}checked{/if}>43 {' option thumbnail auto'|@translate}</label>54 <input type="radio" name="f_catthumb" id="catthumb" value="same" {if $options.catthumb=="same"}checked{/if}> 55 {'use the same config as above'|@translate}</label> 44 56 <br> 45 57 <label> 46 <input type="radio" name="f_ thumbnail" id="thumbnail" value="piwigo" {if $options.thumbnail=="piwigo"}checked{/if}>47 {' option thumbnail piwigo'|@translate}</label>58 <input type="radio" name="f_catthumb" id="catthumb" value="all" {if $options.catthumb=="all"}checked{/if}> 59 {'always generate big thumbnails'|@translate}</label> 48 60 <br> 49 61 </li> -
extensions/stripped_black_bloc/admin/upgrade.inc.php
r12048 r13894 13 13 'every_x' => 20, 14 14 'starting_to' => 1, 15 ' thumbnail' => 'piwigo' //generated - auto - piwigo16 17 15 'catthumb' => 'none' //none - same - all 16 ); 17 $query = " 18 18 INSERT INTO " . CONFIG_TABLE . " (param,value,comment) 19 19 VALUES ('stripped_black_bloc' , '".pwg_db_real_escape_string(serialize($config))."' , 'color_main#column_width#thumbnail_width#thumbnail(generated - auto - piwigo)');"; 20 21 22 pwg_query($query); 23 load_conf_from_db(); 20 pwg_query($query); 21 load_conf_from_db(); 24 22 } 25 23 elseif (count(unserialize( $conf['stripped_black_bloc'] ))!=6) … … 31 29 'every_x' => 20, 32 30 'starting_to' => 1, 33 'thumbnail' => 'piwigo' //generated - auto - piwigo 34 ); 35 36 31 'catthumb' => 'none' //none - same - all 32 ); 37 33 conf_update_param('stripped_black_bloc', pwg_db_real_escape_string(serialize($config))); 38 load_conf_from_db(); 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 45 ); 46 conf_update_param('stripped_black_bloc', pwg_db_real_escape_string(serialize($config))); 47 load_conf_from_db(); 39 48 } 40 49 ?> -
extensions/stripped_black_bloc/language/en_UK/theme.lang.php
r11823 r13894 7 7 $lang['Width of columns'] = "Width of columns"; 8 8 $lang['Width of thumbnails'] = "Width of thumbnails"; 9 $lang['it need to be inferior than the width of columns'] = "it needs to be strictly inferior than the width of columns"; 10 $lang['The thumbnails can be generated by the theme'] = "The thumbnails can be generated by the theme"; 11 $lang['option thumbnail generated'] = "generate all the thumbnails : they will have all the same width, the \"Width of thumbnails\", with respect to the original proportions"; 12 $lang['option thumbnail auto'] = "generate only the thumbnails with a width lower than that indicated in \"Width of thumbnails\" : it allows you to generate by Piwigo thumbnails much larger to have a variation of height (much more attractive)"; 13 $lang['option thumbnail piwigo'] = "generate nothing: thumbnails will be the ones of Piwigo"; 9 $lang['Create a big thumbnail every'] = "Create a big thumbnail every"; 10 $lang['... starting to the position number'] = "... starting to the position number"; 11 $lang['(set 0 to disable)'] = "(set 0 to disable)"; 12 $lang['(it need to be inferior than the width of columns)'] = "(it needs to be strictly inferior than the width of columns)"; 13 $lang['About big thumbnails, for the albums :'] = "About big thumbnails, for the albums :"; 14 $lang['don\'t generate big thumbnails'] = "don't generate big thumbnails"; 15 $lang['use the same config as above'] = "use the same config as above"; 16 $lang['always generate big thumbnails'] = "always generate big thumbnails"; 14 17 ?> -
extensions/stripped_black_bloc/language/fr_FR/theme.lang.php
r11823 r13894 7 7 $lang['Width of columns'] = "Largeur des colonnes"; 8 8 $lang['Width of thumbnails'] = "Largeur des miniatures"; 9 $lang['it need to be inferior than the width of columns'] = "cette largeur doit être strictement inférieure à celle des colonnes"; 10 $lang['The thumbnails can be generated by the theme'] = "Les miniatures peuvent être générées par le thème"; 11 $lang['option thumbnail generated'] = "générer toutes les miniatures : elles auront toutes la largeur indiquée dans \"Largeur des miniatures\" avec les proportions d'origines conservées"; 12 $lang['option thumbnail auto'] = "générer uniquement les miniatures ayant une largeur inférieure à celle indiquée dans \"Largeur des miniatures\" : cela permet notamment de générer par Piwigo des miniatures plus grosses pour avoir une variation de hauteur"; 13 $lang['option thumbnail piwigo'] = "ne rien générer : les miniatures seront celles de Piwigo"; 9 $lang['Create a big thumbnail every'] = "Créer une grosse miniature toutes les"; 10 $lang['... starting to the position number'] = "...à commencer par la position numéro"; 11 $lang['(set 0 to disable)'] = "(mettre 0 pour désactiver)"; 12 $lang['(it need to be inferior than the width of columns)'] = "(cette largeur doit être strictement inférieure à celle des colonnes)"; 13 $lang['About big thumbnails, for the albums :'] = "A propos de grosses miniatures, pour les images représentatives des albums :"; 14 $lang['don\'t generate big thumbnails'] = "ne pas générer de grosses miniatures"; 15 $lang['use the same config as above'] = "utiliser la config 'Créer une grosse miniature toutes les' ci-dessus"; 16 $lang['always generate big thumbnails'] = "toujours générer des grosses miniatures"; 14 17 ?> -
extensions/stripped_black_bloc/language/uk_UA/theme.lang.php
r13204 r13894 7 7 $lang['Width of columns'] = "Ширина стовпців"; 8 8 $lang['Width of thumbnails'] = "Ширина мініатюри"; 9 $lang['it need to be inferior than the width of columns'] = "вона повинна суворо поступаютися ширину стовпців"; 10 $lang['The thumbnails can be generated by the theme'] = "Мініатюри можуть бути отримані на тему"; 11 $lang['option thumbnail generated'] = "створити всі ескізи: вони будуть мати все ту ж ширину, \"Ширина мініатюри\", по відношенню до оригінальних пропорцій"; 12 $lang['option thumbnail auto'] = "створювати тільки ескізи з шириною менше, ніж зазначено в \"Ширина мініатюри\": він дозволяє генерувати у вигляді мініатюр Piwigo набагато більше, аби зміни висоту(є більш привабливим)"; 13 $lang['option thumbnail piwigo'] = "генерувати нічого: мініатюри будуть одними з Piwigo"; 9 $lang['Create a big thumbnail every'] = "Create a big thumbnail every"; 10 $lang['... starting to the position number'] = "... starting to the position number"; 11 $lang['(set 0 to disable)'] = "(set 0 to disable)"; 12 $lang['(it need to be inferior than the width of columns)'] = "(вона повинна суворо поступаютися ширину стовпців)"; 13 $lang['About big thumbnails, for the albums :'] = "Мініатюри можуть бути отримані на тему"; 14 $lang['don\'t generate big thumbnails'] = "don't generate big thumbnails"; 15 $lang['use the same config as above'] = "use the same config as above"; 16 $lang['always generate big thumbnails'] = "always generate big thumbnails"; 14 17 ?> -
extensions/stripped_black_bloc/template/mainpage_categories.tpl
r11709 r13894 1 {foreach from=$category_thumbnails item=cat} 2 <div class="bloc album"> 3 <a href="{$cat.URL}" style="background: url({$cat.TN_SRC}) no-repeat scroll center center transparent; height: {$cat.TN_HEIGHT}px; width: {$cat.TN_WIDTH}px; opacity: 0.75;" > 1 {define_derivative name='derivative_stripped_black_bloc' width=$stripped_black_bloc.thumbnail_width height=9999 crop=false} 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 {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 {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()} 12 <div class="{if $stripped_black_bloc.catthumb=="all"}bloc_big{else}{$cat.TN_CLASS}{/if} 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;" > 4 14 {$cat.NAME} 5 15 </a> -
extensions/stripped_black_bloc/template/thumbnails.tpl
r12048 r13894 1 {define_derivative name='derivative_stripped_black_bloc' width=$stripped_black_bloc.thumbnail_width height=9999 crop=false} 2 {define_derivative name='derivative_stripped_black_bloc_big' width=$stripped_black_bloc.thumbnail_width+$stripped_black_bloc.column_width height=9999 crop=false} 1 3 {if !empty($thumbnails)} 2 4 {foreach from=$thumbnails item=thumbnail} 3 <div class="{$thumbnail.TN_CLASS}"> 4 <a href="{$thumbnail.URL}" style="background: url({$thumbnail.TN_SRC}) no-repeat scroll center center transparent; height: {$thumbnail.TN_HEIGHT}px; width: {$thumbnail.TN_WIDTH}px; opacity: 0.75;" > 5 {if isset($thumbnail.NAME)}{$thumbnail.NAME}{else}{$thumbnail.TN_TITLE}{/if} 6 </a> 7 <div class="title">{if isset($thumbnail.NAME)}{$thumbnail.NAME}{/if}</div> 8 </div> 5 {if $thumbnail.TN_CLASS=="bloc"} 6 {assign var=derivative value=$pwg->derivative($derivative_stripped_black_bloc, $thumbnail.src_image)} 7 {else} 8 {assign var=derivative value=$pwg->derivative($derivative_stripped_black_bloc_big, $thumbnail.src_image)} 9 {/if} 10 {assign var='size' value=$derivative->get_size()} 11 <div class="{$thumbnail.TN_CLASS}"> 12 <a href="{$thumbnail.URL}" style="background: url({$derivative->get_url()}) no-repeat scroll center center transparent; height: {$size[1]}px; width: {$size[0]}px; opacity: 0.75;" > 13 {if isset($thumbnail.NAME)}{$thumbnail.NAME}{else}{$thumbnail.TN_TITLE}{/if} 14 </a> 15 <div class="title">{if isset($thumbnail.NAME)}{$thumbnail.NAME}{/if}</div> 16 </div> 9 17 {/foreach} 10 18 {/if} -
extensions/stripped_black_bloc/theme.css
r13212 r13894 209 209 text-decoration: none; 210 210 } 211 .masonry-brick, .bloc .title, . nav_bulle {211 .masonry-brick, .bloc .title, .bloc_big .title, .nav_bulle { 212 212 color: #FFFFFF; 213 213 background-image: url("img/btn.png"); … … 222 222 223 223 } 224 .bloc a {224 .bloc a, .bloc_big a { 225 225 border-radius: 5px 5px 5px 5px; 226 226 } -
extensions/stripped_black_bloc/themeconf.inc.php
r13015 r13894 48 48 global $template, $conf; 49 49 $config = unserialize( $conf['stripped_black_bloc'] ); 50 $template->assign( 'stripped_black_bloc', $config ); 50 51 $new_tplvar=array(); 51 52 $i=1; 52 53 foreach ($tpl_thumbnails_var as $tplvar) 53 54 { 54 list($width, $height, $type, $attr) = getimagesize( str_replace("../", "", $tplvar['TN_SRC']) ); 55 $tplvar['TN_WIDTH']=$width; 56 $tplvar['TN_HEIGHT']=$height; 57 if (!isset($tplvar['CAPTION_NB_IMAGES'])) 58 { 59 $conf_thumbnail_width=($i==$config['starting_to']) ? $config['column_width']+$config['thumbnail_width'] : $config['thumbnail_width']; 60 $tplvar['TN_CLASS']=($i==$config['starting_to']) ? "bloc_big" : "bloc"; 61 } 62 else 63 { 64 $conf_thumbnail_width=$config['thumbnail_width']; 65 } 66 if (isset($config['thumbnail'])) 67 { 68 switch ($config['thumbnail']) 69 { 70 case 'generated': 71 if (isset($tplvar['FILE_WIDTH'])) 72 { 73 $tplvar['TN_SRC']=get_root_url().PHPWG_THEMES_PATH."stripped_black_bloc/library/phpthumb/phpThumb.php?src=../../../../".$tplvar['FILE_PATH']."&w=".$conf_thumbnail_width; 74 } 75 else 76 { 77 $tplvar['TN_SRC']=get_root_url().PHPWG_THEMES_PATH."stripped_black_bloc/library/phpthumb/phpThumb.php?src=../../../../".str_replace("../", "", $tplvar['TN_SRC'])."&w=".$conf_thumbnail_width; 78 } 79 $tplvar['TN_HEIGHT']=floor($tplvar['TN_HEIGHT']*($conf_thumbnail_width/$tplvar['TN_WIDTH'])); 80 $tplvar['TN_WIDTH']=$conf_thumbnail_width; 81 break; 82 case 'auto': 83 if($tplvar['TN_WIDTH']<=$conf_thumbnail_width) 84 { 85 if (isset($tplvar['FILE_WIDTH'])) 86 { 87 $tplvar['TN_SRC']=get_root_url().PHPWG_THEMES_PATH."stripped_black_bloc/library/phpthumb/phpThumb.php?src=../../../../".$tplvar['FILE_PATH']."&w=".$conf_thumbnail_width; 88 } 89 else 90 { 91 $tplvar['TN_SRC']=get_root_url().PHPWG_THEMES_PATH."stripped_black_bloc/library/phpthumb/phpThumb.php?src=../../../../".str_replace("../", "", $tplvar['TN_SRC'])."&w=".$conf_thumbnail_width; 92 } 93 $tplvar['TN_HEIGHT']=floor($tplvar['TN_HEIGHT']*($conf_thumbnail_width/$tplvar['TN_WIDTH'])); 94 $tplvar['TN_WIDTH']=$conf_thumbnail_width; 95 } 96 break; 97 case 'piwigo':break; 98 } 99 } 100 $new_tplvar[]=$tplvar; 101 if ($i==$config['every_x']) 102 { 103 $i=1; 104 } 105 else { 106 $i++; 107 } 55 $tplvar['TN_CLASS']=($i==$config['starting_to']) ? "bloc_big" : "bloc"; 56 $new_tplvar[]=$tplvar; 57 $i= ($i==$config['every_x']) ? 1 : $i+1 ; 108 58 } 109 59 return $new_tplvar;
Note: See TracChangeset
for help on using the changeset viewer.