Changeset 9276 for extensions/PHP_Optimisateur
- Timestamp:
- Feb 18, 2011, 5:34:50 PM (14 years ago)
- Location:
- extensions/PHP_Optimisateur
- Files:
-
- 15 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/PHP_Optimisateur/include/display_config.php
r9201 r9276 109 109 <tr> 110 110 <td><b>'.l10n('copyCOLOR').' :</b></td> 111 <td>#'.nice_hex_color($CONF['copyCOLOR']).' <span class="color-display" style="background-color:#'.nice_hex_color($CONF['copyCOLOR']).';"> </span></td> 111 <td> 112 #'.nice_hex_color($CONF['copyCOLOR']).' 113 <span class="color-display" style="background-color:#'.nice_hex_color($CONF['copyCOLOR']).';"> </span> 114 </td> 112 115 </tr> 113 116 <tr> -
extensions/PHP_Optimisateur/include/main.php
r9201 r9276 71 71 preg_match('#(.*)/(.*).([a-z]{3})$#', $FilesSortie[$i], $matches); 72 72 $FileFolder = $matches[1].'/'; // dossier de sortie 73 $FileName = $matches[2] .'.jpg'; // nom final73 $FileName = $matches[2]; // nom final 74 74 $FileExt = $matches[3]; // extension orginale 75 75 … … 101 101 // Compresse les fichiers dans le dossier de sortie 102 102 if (!isset($BlockNormal)) { 103 exec('include\nconvert.exe -q '.$CONF['Qnormal'].' -out jpeg -o "'.$FileFolder.$FileName.' " -dpi 72 '.$CONF['convOptions'].' -resize '.$CONF['DIMnormal'].' '.$CONF['DIMnormal'].' '.$CONF['copyNormal'].' "'.$FilesSource[$i].'"');103 exec('include\nconvert.exe -q '.$CONF['Qnormal'].' -out jpeg -o "'.$FileFolder.$FileName.'.jpg" -dpi 72 '.$CONF['convOptions'].' -resize '.$CONF['DIMnormal'].' '.$CONF['DIMnormal'].' '.$CONF['copyNormal'].' "'.$FilesSource[$i].'"'); 104 104 } 105 105 if (!isset($BlockThumbnail)) { 106 exec('include\nconvert.exe -q '.$CONF['Qthumbnail'].' -out jpeg -o "'.$FileFolder.'thumbnail/'.$CONF['prefixe_mini'].$FileName.' " -dpi 72 '.$CONF['convOptions'].' -resize '.$CONF['DIMthumbnail'].' '.$CONF['DIMthumbnail'].' -rmeta -rexifthumb "'.$FilesSource[$i].'"');106 exec('include\nconvert.exe -q '.$CONF['Qthumbnail'].' -out jpeg -o "'.$FileFolder.'thumbnail/'.$CONF['prefixe_mini'].$FileName.'.jpg" -dpi 72 '.$CONF['convOptions'].' -resize '.$CONF['DIMthumbnail'].' '.$CONF['DIMthumbnail'].' -rmeta -rexifthumb "'.$FilesSource[$i].'"'); 107 107 } 108 108 if (!isset($BlockHigh) AND $CONF['DIRhighORNOT']) { 109 109 if ($CONF['DIMhdORNOT']) { 110 exec('include\nconvert.exe -q '.$CONF['Qhd'].' -out jpeg -o "'.$FileFolder.'pwg_high/'.$FileName.' " -dpi '.$CONF['DPI'].' '.$CONF['convOptions'].' -resize '.$CONF['DIMhd'].' '.$CONF['DIMhd'].' '.$CONF['copyHD'].' "'.$FilesSource[$i].'"');110 exec('include\nconvert.exe -q '.$CONF['Qhd'].' -out jpeg -o "'.$FileFolder.'pwg_high/'.$FileName.'.jpg" -dpi '.$CONF['DPI'].' '.$CONF['convOptions'].' -resize '.$CONF['DIMhd'].' '.$CONF['DIMhd'].' '.$CONF['copyHD'].' "'.$FilesSource[$i].'"'); 111 111 } else if (!in_array($FileExt, $CONF['JPGexts'])) { 112 exec('include\nconvert.exe -q '.$CONF['Qhd'].' -out jpeg -o "'.$FileFolder.'pwg_high/'.$FileName.' " "'.$FilesSource[$i].'"');112 exec('include\nconvert.exe -q '.$CONF['Qhd'].' -out jpeg -o "'.$FileFolder.'pwg_high/'.$FileName.'.jpg" "'.$FilesSource[$i].'"'); 113 113 } else { 114 copy($FilesSource[$i], $FileFolder.'pwg_high/'.$FileName );114 copy($FilesSource[$i], $FileFolder.'pwg_high/'.$FileName.'.jpg'); 115 115 } 116 116 } … … 132 132 rmdir($dir); 133 133 } else if ($CONF['indexORNOT']) { 134 copy('include s/index.php', $dir.'/index.php');134 copy('include/index.php', $dir.'/index.php'); 135 135 } 136 136 } -
extensions/PHP_Optimisateur/include/setup.php
r9201 r9276 50 50 <td>'.l10n('silentORNOT').' :</td> 51 51 <td> 52 <label><input type="radio" name="silentORNOT" value="erase" '.(($CONF['silentORNOT']=='erase')?'checked="checked"':'').'/> '.l10n('erase').'</label> 53 <label><input type="radio" name="silentORNOT" value="block" '.(($CONF['silentORNOT']=='block')?'checked="checked"':'').'/> '.l10n('block').'</label> 54 <label><input type="radio" name="silentORNOT" value="pass" '.(($CONF['silentORNOT']=='pass')?'checked="checked"':'').'/> '.l10n('pass').'</label> 52 <input type="radio" id="silentORNOT1" name="silentORNOT" value="erase" '.(($CONF['silentORNOT']=='erase')?'checked="checked"':'').'/> 53 <label for="silentORNOT1">'.l10n('erase').'</label> 54 <input type="radio" id="silentORNOT2" name="silentORNOT" value="block" '.(($CONF['silentORNOT']=='block')?'checked="checked"':'').'/> 55 <label for="silentORNOT2">'.l10n('block').'</label> 56 <input type="radio" id="silentORNOT3" name="silentORNOT" value="pass" '.(($CONF['silentORNOT']=='pass')?'checked="checked"':'').'/> 57 <label for="silentORNOT3">'.l10n('pass').'</label> 55 58 </td> 56 59 </tr> … … 58 61 <td>'.l10n('DIRhighORNOT').' :</td> 59 62 <td> 60 <label><input type="radio" name="DIRhighORNOT" value="true" '.(($CONF['DIRhighORNOT'])?'checked="checked"':'').'/> '.l10n('yes').'</label> 61 <label><input type="radio" name="DIRhighORNOT" value="false" '.((!$CONF['DIRhighORNOT'])?'checked="checked"':'').'/> '.l10n('no').'</label> 63 <input type="radio" id="DIRhighORNOT1" name="DIRhighORNOT" value="true" '.(($CONF['DIRhighORNOT'])?'checked="checked"':'').'/> 64 <label for="DIRhighORNOT1">'.l10n('yes').'</label> 65 <input type="radio" id="DIRhighORNOT2" name="DIRhighORNOT" value="false" '.((!$CONF['DIRhighORNOT'])?'checked="checked"':'').'/> 66 <label for="DIRhighORNOT2">'.l10n('no').'</label> 62 67 </td> 63 68 </tr> … … 65 70 <td>'.l10n('DIMhdORNOT').' :</td> 66 71 <td> 67 <label><input type="radio" name="DIMhdORNOT" value="true" '.(($CONF['DIMhdORNOT'])?'checked="checked"':'').'/> '.l10n('yes').'</label> 68 <label><input type="radio" name="DIMhdORNOT" value="false" '.((!$CONF['DIMhdORNOT'])?'checked="checked"':'').'/> '.l10n('no').'</label> 72 <input type="radio" id="DIMhdORNOT1" name="DIMhdORNOT" value="true" '.(($CONF['DIMhdORNOT'])?'checked="checked"':'').'/> 73 <label for="DIMhdORNOT1">'.l10n('yes').'</label> 74 <input type="radio" id="DIMhdORNOT" name="DIMhdORNOT" value="false" '.((!$CONF['DIMhdORNOT'])?'checked="checked"':'').'/> 75 <label for="DIMhdORNOT2">'.l10n('no').'</label> 69 76 </td> 70 77 </tr> … … 72 79 <td>'.l10n('renameORNOT').' :</td> 73 80 <td> 74 <label><input type="radio" name="renameORNOT" value="true" '.(($CONF['renameORNOT'])?'checked="checked"':'').'/> '.l10n('yes').'</label> 75 <label><input type="radio" name="renameORNOT" value="false" '.((!$CONF['renameORNOT'])?'checked="checked"':'').'/> '.l10n('no').'</label> 81 <input type="radio" id="renameORNOT1" name="renameORNOT" value="true" '.(($CONF['renameORNOT'])?'checked="checked"':'').'/> 82 <label for="renameORNOT1">'.l10n('yes').'</label> 83 <input type="radio" id="renameORNOT2" name="renameORNOT" value="false" '.((!$CONF['renameORNOT'])?'checked="checked"':'').'/> 84 <label for="renameORNOT2">'.l10n('no').'</label> 76 85 </td> 77 86 </tr> … … 79 88 <td>'.l10n('indexORNOT').' :</td> 80 89 <td> 81 <label><input type="radio" name="indexORNOT" value="true" '.(($CONF['indexORNOT'])?'checked="checked"':'').'/> '.l10n('yes').'</label> 82 <label><input type="radio" name="indexORNOT" value="false" '.((!$CONF['indexORNOT'])?'checked="checked"':'').'/> '.l10n('no').'</label> 90 <input type="radio" id="indexORNOT1" name="indexORNOT" value="true" '.(($CONF['indexORNOT'])?'checked="checked"':'').'/> 91 <label for="indexORNOT1">'.l10n('yes').'</label> 92 <input type="radio" id="indexORNOT2" name="indexORNOT" value="false" '.((!$CONF['indexORNOT'])?'checked="checked"':'').'/> 93 <label for="indexORNOT2">'.l10n('no').'</label> 83 94 </td> 84 95 </tr> … … 132 143 <td>'.l10n('copyONhd').' :</td> 133 144 <td> 134 <label><input type="radio" name="copyONhd" value="true" '.(($CONF['copyONhd'])?'checked="checked"':'').'/> '.l10n('yes').'</label> 135 <label><input type="radio" name="copyONhd" value="false" '.((!$CONF['copyONhd'])?'checked="checked"':'').'/> '.l10n('no').'</label> 145 <input type="radio" id="copyONhd1" name="copyONhd" value="true" '.(($CONF['copyONhd'])?'checked="checked"':'').'/> 146 <label for="copyONhd1">'.l10n('yes').'</label> 147 <input type="radio" id="copyONhd2" name="copyONhd" value="false" '.((!$CONF['copyONhd'])?'checked="checked"':'').'/> 148 <label for="copyONhd2">'.l10n('no').'</label> 136 149 </td> 137 150 </tr> … … 139 152 <td>'.l10n('copyONnormal').' :</td> 140 153 <td> 141 <label><input type="radio" name="copyONnormal" value="true" '.(($CONF['copyONnormal'])?'checked="checked"':'').'/> '.l10n('yes').'</label> 142 <label><input type="radio" name="copyONnormal" value="false" '.((!$CONF['copyONnormal'])?'checked="checked"':'').'/> '.l10n('no').'</label> 154 <input type="radio" id="copyONnormal1" name="copyONnormal" value="true" '.(($CONF['copyONnormal'])?'checked="checked"':'').'/> 155 <label for="copyONnormal1">'.l10n('yes').'</label> 156 <input type="radio" id="copyONnormal2" name="copyONnormal" value="false" '.((!$CONF['copyONnormal'])?'checked="checked"':'').'/> 157 <label for="copyONnormal2">'.l10n('no').'</label> 143 158 </td> 144 159 </tr> … … 146 161 <td>'.l10n('copyPOS%s', l10n('copyPOSv')).' :</td> 147 162 <td> 148 <label><input type="radio" name="copyPOS[0]" value="top" '.(($CONF['copyPOS'][0]=='top')?'checked="checked"':'').'/> '.l10n('top').'</label> 149 <label><input type="radio" name="copyPOS[0]" value="center" '.(($CONF['copyPOS'][0]=='center')?'checked="checked"':'').'/> '.l10n('center').'</label> 150 <label><input type="radio" name="copyPOS[0]" value="bottom" '.(($CONF['copyPOS'][0]=='bottom')?'checked="checked"':'').'/> '.l10n('bottom').'</label> 163 <input type="radio" id="copyPOS01" name="copyPOS[0]" value="top" '.(($CONF['copyPOS'][0]=='top')?'checked="checked"':'').'/> 164 <label for="copyPOS01">'.l10n('top').'</label> 165 <input type="radio" id="copyPOS02" name="copyPOS[0]" value="center" '.(($CONF['copyPOS'][0]=='center')?'checked="checked"':'').'/> 166 <label for="copyPOS02">'.l10n('center').'</label> 167 <input type="radio" id="copyPOS03" name="copyPOS[0]" value="bottom" '.(($CONF['copyPOS'][0]=='bottom')?'checked="checked"':'').'/> 168 <label for="copyPOS03">'.l10n('bottom').'</label> 151 169 </td> 152 170 </tr> … … 154 172 <td>'.l10n('copyPOS%s', l10n('copyPOSh')).' :</td> 155 173 <td> 156 <label><input type="radio" name="copyPOS[1]" value="left" '.(($CONF['copyPOS'][1]=='left')?'checked="checked"':'').'/> '.l10n('left').'</label> 157 <label><input type="radio" name="copyPOS[1]" value="center" '.(($CONF['copyPOS'][1]=='center')?'checked="checked"':'').'/> '.l10n('center').'</label> 158 <label><input type="radio" name="copyPOS[1]" value="right" '.(($CONF['copyPOS'][1]=='right')?'checked="checked"':'').'/> '.l10n('right').'</label> 174 <input type="radio" id="copyPOS11" name="copyPOS[1]" value="left" '.(($CONF['copyPOS'][1]=='left')?'checked="checked"':'').'/> 175 <label for="copyPOS11">'.l10n('left').'</label> 176 <input type="radio" id="copyPOS12" name="copyPOS[1]" value="center" '.(($CONF['copyPOS'][1]=='center')?'checked="checked"':'').'/> 177 <label for="copyPOS12">'.l10n('center').'</label> 178 <input type="radio" id="copyPOS13" name="copyPOS[1]" value="right" '.(($CONF['copyPOS'][1]=='right')?'checked="checked"':'').'/> 179 <label for="copyPOS13">'.l10n('right').'</label> 159 180 </td> 160 181 </tr> … … 165 186 <tr> 166 187 <td>'.l10n('copyCOLOR').' :</td> 167 <td><input type="text" name="copyCOLOR" value="'.$CONF['copyCOLOR'].'" size="6" id="colorpicker"/></td>188 <td><input type="text" id="colorpicker" name="copyCOLOR" value="'.$CONF['copyCOLOR'].'" size="6"/></td> 168 189 <script type="text/javascript"> 169 190 $("#colorpicker").ColorPicker({ … … 209 230 $PAGE_CONTENT[0] .= '<label><input type="checkbox" name="Plugins['.$plugin_id.'][delete]" value="true" checked="checked"/> '.l10n('erase').'</label>'; 210 231 } else { 211 $PAGE_CONTENT[0] .= '<label><input type="radio" name="Plugins['.$plugin_id.'][active]" value="true" '.(($plugin_config['active'])?'checked="checked"':'').'/> '.l10n('Active').'</label> 212 <label><input type="radio" name="Plugins['.$plugin_id.'][active]" value="false" '.((!$plugin_config['active'])?'checked="checked"':'').'/> '.l10n('Inactive').'</label>'; 232 $PAGE_CONTENT[0] .= '<input type="radio" id="" id="active-'.$plugin_id.'" name="Plugins['.$plugin_id.'][active]" value="true" '.(($plugin_config['active'])?'checked="checked"':'').'/> 233 <label for="active-'.$plugin_id.'">'.l10n('Active').'</label> 234 <input type="radio" id="" id="inactive-'.$plugin_id.'"name="Plugins['.$plugin_id.'][active]" value="false" '.((!$plugin_config['active'])?'checked="checked"':'').'/> 235 <label for="inactive-'.$plugin_id.'">'.l10n('Inactive').'</label>'; 213 236 } 214 237 $PAGE_CONTENT[0] .= '</span> … … 230 253 $PAGE_CONTENT[2] .= '<div class="generic link"> 231 254 <input type="submit" value="'.l10n('Valid').'"/> 232 <input type="reset" value="'.l10n('Reset').'"/>233 255 <input type="reset" onclick="location.href=\'index.php\'" value="'.l10n('Back').'"/> 234 256 </div> -
extensions/PHP_Optimisateur/index.php
r9202 r9276 2 2 /***************************************\ 3 3 | PHP OPTIMISATEUR | 4 | Version 1.3|4 | Version 1.3.a | 5 5 \***************************************/ 6 6 … … 39 39 40 40 41 ### VERIFICATIONS ###41 ### PROCESSUS ### 42 42 if ($PAGE == 'home') { 43 43 if (!isset($ERRORS['fatal'])) { … … 93 93 if ($PAGE == 'home') { 94 94 if (isset($ERRORS['fatal'])) { 95 $PAGE_CONTENT[2] .= '<div class="generic link"><a class="input-submit" href="index.php">'.l10n('Back').'</a> <a class="input-submit" href="index.php?page=setup">'.l10n('Config').'</a></div>'; 95 $PAGE_CONTENT[2] .= ' 96 <div class="generic link"> 97 <a class="input-submit" href="index.php">'.l10n('Back').'</a> 98 <a class="input-submit" href="index.php?page=setup">'.l10n('Config').'</a> 99 </div>'; 96 100 97 101 } else { 98 102 include('include/display_config.php'); 99 103 100 $PAGE_CONTENT[2] .= '<div class="generic finish"> 104 $PAGE_CONTENT[2] .= ' 105 <div class="generic finish"> 101 106 <span id="ready-text">'.l10n('Ready').'</span> 102 107 <span id="loader"><img src="template/favicon.png" alt="PHP OPT"/></span> … … 118 123 } else if ($PAGE = 'process') { 119 124 ### Affichage des fichiers traités ### 120 $PAGE_CONTENT[0] .= '<div class="generic files"> 125 $PAGE_CONTENT[0] .= ' 126 <div class="generic files"> 121 127 <h2>'.l10n('Source files').'</h2> 122 128 <ul>'; … … 131 137 unset($FilesSortie); 132 138 133 $PAGE_CONTENT[2] .= '<div class="generic finish">'.l10n('Finish %d seconds', intval((microtime(true)-$TIME_START))).'</div> 139 $PAGE_CONTENT[2] .= ' 140 <div class="generic finish">'.l10n('Finish %d seconds', intval((microtime(true)-$TIME_START))).'</div> 134 141 <div class="generic link"> 135 142 <a class="input-submit" href="index.php">'.l10n('Back').'</a> … … 144 151 echo $PAGE_CONTENT[2]; 145 152 146 echo '<div class="generic footer"> 153 echo ' 154 <div class="generic footer"> 147 155 2010/2011 - <a href="http://www.strangeplanet.fr">Damien Sorel</a> - <a href="http://fr.piwigo.org/forum/viewtopic.php?id=19117">Forum</a> - <a href="http://fr.piwigo.org/doc/doku.php?id=tools:php_o">Documentation</a> 148 156 </div> -
extensions/PHP_Optimisateur/plugins/convert_pan/config.xml
r9201 r9276 3 3 <mode>Process</mode> 4 4 <DIMpanorama>500</DIMpanorama> 5 <DetectMode>name</DetectMode> 5 6 <NAMEpanorama>_pan</NAMEpanorama> 7 <RatioPan>2.85</RatioPan> 6 8 <RatioPanThumb>1.7</RatioPanThumb> 7 9 </plugin> -
extensions/PHP_Optimisateur/plugins/convert_pan/lang/en_UK.php
r9265 r9276 1 1 <?php 2 2 $Lang['convert_pan.unactive'] = " '0' to unactive"; 3 $Lang['convert_pan.DetectMode'] = "Detection mode"; 4 $Lang['convert_pan.DetectMode.name'] = "suffix"; 5 $Lang['convert_pan.DetectMode.ratio'] = "ratio"; 3 6 $Lang['convert_pan.DIMpanorama'] = "Panorama height"; 4 7 $Lang['convert_pan.NAMEpanorama'] = "Distinctive suffix"; 8 $Lang['convert_pan.RatioPan'] = "Minimal ratio"; 5 9 $Lang['convert_pan.RatioPanThumb'] = "Thumbnails ratio"; 6 10 ?> -
extensions/PHP_Optimisateur/plugins/convert_pan/lang/fr_FR.php
r9265 r9276 1 1 <?php 2 2 $Lang['convert_pan.unactive'] = " '0' pour désactiver"; 3 $Lang['convert_pan.DetectMode'] = "Mode de détection"; 4 $Lang['convert_pan.DetectMode.name'] = "suffixe"; 5 $Lang['convert_pan.DetectMode.ratio'] = "ratio"; 3 6 $Lang['convert_pan.DIMpanorama'] = "Hauteur du panorama"; 4 7 $Lang['convert_pan.NAMEpanorama'] = "Suffixe distinctif"; 8 $Lang['convert_pan.RatioPan'] = "Ratio minimum"; 5 9 $Lang['convert_pan.RatioPanThumb'] = "Ratio des miniatures"; 6 10 ?> -
extensions/PHP_Optimisateur/plugins/convert_pan/main.php
r9201 r9276 2 2 /***************************************\ 3 3 | PHP OPTIMISATEUR | 4 | Plugin ConvertPan 1. 1|4 | Plugin ConvertPan 1.2 | 5 5 \***************************************/ 6 6 … … 8 8 ## Crée des miniatures rognées pour ne pas avoir de minuscules images 9 9 10 $NAMEpanorama = $CONF['Plugins']['convert_pan']['NAMEpanorama']; // Suffixe des panoramas 11 $DIMpanorama = $CONF['Plugins']['convert_pan']['DIMpanorama']; // Hauteur des panoramas normaux 12 $RatioPanThumb = $CONF['Plugins']['convert_pan']['RatioPanThumb']; // Ratio des miniatures 10 $CP_namepanorama = $CONF['Plugins']['convert_pan']['NAMEpanorama']; // Suffixe des panoramas 11 $CP_detectmode = $CONF['Plugins']['convert_pan']['DetectMode']; // Mode de détection 12 $CP_dimpanorama = $CONF['Plugins']['convert_pan']['DIMpanorama']; // Hauteur des panoramas normaux 13 $CP_ratiopan = $CONF['Plugins']['convert_pan']['RatioPan']; // Ratio des panoramas 14 $CP_ratiopanthumb = $CONF['Plugins']['convert_pan']['RatioPanThumb']; // Ratio des miniatures 13 15 14 if (strpos($FileName, $NAMEpanorama) !== false) { 15 if (!isset($BlockNormal) AND $DIMpanorama != 0) { 16 exec('files\nconvert.exe -q '.$CONF['Qnormal'].' -out jpeg -o "'.$FileFolder.$FileName.'" -dpi 72 '.$CONF['convOptions'].' -resize 0 '.$DIMpanorama.' '.$CONF['copyNormal'].' "'.$FilesSource[$i].'"'); 17 $BlockNormal = true; 16 if (($CP_detectmode == 'name' AND strpos($FileName,$CP_namepanorama) !== false) OR ($CP_detectmode == 'ratio' AND $FileInfos['Width']/$FileInfos['Height'] >= $CP_ratiopan)) { 17 18 if (!isset($BlockNormal) AND $CP_dimpanorama != 0) { 19 exec('include\nconvert.exe -q '.$CONF['Qnormal'].' -out jpeg -o "'.$FileFolder.$FileName.'.jpg" -dpi 72 '.$CONF['convOptions'].' -resize 0 '.$CP_dimpanorama.' '.$CONF['copyNormal'].' "'.$FilesSource[$i].'"'); 20 $BlockNormal['convert_pan'] = true; 18 21 } 19 22 20 if (!isset($BlockThumbnail) AND $ RatioPanThumb != 0) {21 $DIMthumbnailV = $CONF['DIMthumbnail']/$C ONF['Plugins']['convert_pan']['RatioPanThumb'];23 if (!isset($BlockThumbnail) AND $CP_ratiopanthumb != 0) { 24 $DIMthumbnailV = $CONF['DIMthumbnail']/$CP_ratiopanthumb; 22 25 23 26 // on prend la miniature au milieu du panorama … … 25 28 $offset_x = ($tmp_x - $CONF['DIMthumbnail']) / 2; 26 29 27 exec(' files\nconvert.exe -q '.$CONF['Qthumbnail'].' -out jpeg -o "'.$FileFolder.'thumbnail/'.$CONF['prefixe_mini'].$FileName.'" -dpi 72 '.$CONF['convOptions'].' -resize 0 '.$DIMthumbnailV.' -crop '.$offset_x.' 0 '.$CONF['DIMthumbnail'].' '.$DIMthumbnailV.' -rmeta -rexifthumb "'.$FilesSource[$i].'"');28 $BlockThumbnail = true;30 exec('include\nconvert.exe -q '.$CONF['Qthumbnail'].' -out jpeg -o "'.$FileFolder.'thumbnail/'.$CONF['prefixe_mini'].$FileName.'.jpg" -dpi 72 '.$CONF['convOptions'].' -resize 0 '.$DIMthumbnailV.' -crop '.$offset_x.' 0 '.$CONF['DIMthumbnail'].' '.$DIMthumbnailV.' -rmeta -rexifthumb "'.$FilesSource[$i].'"'); 31 $BlockThumbnail['convert_pan'] = true; 29 32 } 30 33 } -
extensions/PHP_Optimisateur/plugins/convert_pan/setup.php
r9201 r9276 4 4 case 'read_config': 5 5 load_plugin_lang('convert_pan'); 6 $PAGE_CONTENT[0] .= '<table> 6 $PAGE_CONTENT[0] .= ' 7 <table> 7 8 <tr> 8 <td>'.l10n('convert_pan.NAMEpanorama').' :</td> 9 <td>'.$plugin_config['NAMEpanorama'].'</td> 10 </tr> 9 <td>'.l10n('convert_pan.DetectMode').' :</td> 10 <td>'.$plugin_config['DetectMode'].'</td> 11 </tr>'; 12 13 if ($plugin_config['DetectMode'] == 'name') { 14 $PAGE_CONTENT[0] .= ' 15 <tr> 16 <td>'.l10n('convert_pan.NAMEpanorama').' :</td> 17 <td>'.$plugin_config['NAMEpanorama'].'</td> 18 </tr>'; 19 } else if ($plugin_config['DetectMode'] == 'ratio') { 20 $PAGE_CONTENT[0] .= ' 21 <tr> 22 <td>'.l10n('convert_pan.RatioPan').' :</td> 23 <td>'.$plugin_config['RatioPan'].'</td> 24 </tr>'; 25 } 26 27 $PAGE_CONTENT[0] .= ' 11 28 <tr> 12 29 <td>'.l10n('convert_pan.DIMpanorama').' :</td> … … 32 49 $$Errors['ErrorConfig'] = 'notice'; 33 50 } 51 if (!is_decimal($_POST['Plugins']['convert_pan']['RatioPan'])) { 52 $_POST['Plugins']['convert_pan']['RatioPan'] = 2.85; 53 $$Errors['ErrorConfig'] = 'notice'; 54 } 34 55 35 56 break; … … 38 59 case 'edit_config': 39 60 load_plugin_lang('convert_pan'); 40 $PAGE_CONTENT[0] .= '<table> 61 $PAGE_CONTENT[0] .= ' 62 <script type="text/javascript"> 63 function ToggleConfig(sel, section){ 64 var obj = $("#convert_pan-tr-"+section); 65 if(sel.checked){ 66 obj.show(); 67 }else{ 68 obj.hide(); 69 } 70 } 71 </script> 72 73 <table> 41 74 <tr> 75 <td>'.l10n('convert_pan.DetectMode').' :</td> 76 <td> 77 <input type="radio" id="convert_pan-radio-name" name="Plugins[convert_pan][DetectMode]" value="name" onchange="ToggleConfig(this,\'name\');" '.(($plugin_config['DetectMode']=='name')?'checked="checked"':'').'/> 78 <label for="convert_pan-radio-name">'.l10n('convert_pan.DetectMode.name').'</label> 79 <input type="radio" id="convert_pan.radio.ratio" name="Plugins[convert_pan][DetectMode]" value="ratio" onchange="ToggleConfig(this,\'ratio\');" '.(($plugin_config['DetectMode']=='ratio')?'checked="checked"':'').'/> 80 <label for="convert_pan-radio-ratio">'.l10n('convert_pan.DetectMode.ratio').'</label> 81 </td> 82 </tr> 83 <tr id="convert_pan-tr-name"> 42 84 <td>'.l10n('convert_pan.NAMEpanorama').' :</td> 43 85 <td><input type="text" name="Plugins[convert_pan][NAMEpanorama]" value="'.$plugin_config['NAMEpanorama'].'" size="6"/></td> 44 86 </tr> 87 <tr id="convert_pan-tr-ratio"> 88 <td>'.l10n('convert_pan.RatioPan').' :</td> 89 <td><input type="text" name="Plugins[convert_pan][RatioPan]" value="'.$plugin_config['RatioPan'].'" size="3"/>px</td> 90 </tr> 91 45 92 <tr> 46 93 <td>'.l10n('convert_pan.DIMpanorama').' :</td> … … 57 104 </td> 58 105 </tr> 59 </table>'; 106 </table> 107 108 <script type="text/javascript"> 109 ToggleConfig(document.forms[0].elements["Plugins[convert_pan][DetectMode]"][0], "name"); 110 ToggleConfig(document.forms[0].elements["Plugins[convert_pan][DetectMode]"][1], "ratio"); 111 </script>'; 60 112 break; 61 113 } -
extensions/PHP_Optimisateur/plugins/create_custom_thumbs/main.php
r9201 r9276 2 2 /***************************************\ 3 3 | PHP OPTIMISATEUR | 4 | Plugin CreateCustomThumbs 1.0 4 | Plugin CreateCustomThumbs 1.0.a | 5 5 \***************************************/ 6 6 … … 9 9 10 10 // CreateCustomThumbs à la priorité sur ConvertPan 11 if (isset($ CONF['Plugins']['convert_pan']) OR !isset($BlockThumbnail)) {11 if (isset($BlockThumbnail['convert_pan']) OR !isset($BlockThumbnail)) { 12 12 13 13 $FileSource = $FilesSource[$i]; // fichier de travail 14 $ DIMthumbnailV= $CONF['Plugins']['create_custom_thumbs']['DIMthumbnailV']; // Hauteur de l'image15 $ FRAMEparams = $CONF['Plugins']['create_custom_thumbs']['FRAMEparams']; // Paramètres du cadre14 $CCT_dimthumbnail = $CONF['Plugins']['create_custom_thumbs']['DIMthumbnailV']; // Hauteur de l'image 15 $CCT_frameparams = $CONF['Plugins']['create_custom_thumbs']['FRAMEparams']; // Paramètres du cadre 16 16 17 17 // Miniature de taille personnalisée 18 if ($ DIMthumbnailV!= 0) {19 $max = max($CONF['DIMthumbnail'], $ DIMthumbnailV);18 if ($CCT_dimthumbnail != 0) { 19 $max = max($CONF['DIMthumbnail'], $CCT_dimthumbnail); 20 20 21 21 // on prend la miniature au milieu de l'image … … 31 31 32 32 $offset_x = ($tmp_x - $CONF['DIMthumbnail']) / 2; 33 $offset_y = ($tmp_y - $ DIMthumbnailV) / 2;33 $offset_y = ($tmp_y - $CCT_dimthumbnail) / 2; 34 34 35 exec(' files\nconvert.exe -overwrite -q '.$CONF['Qthumbnail'].' -out jpeg -o "'.$FileFolder.'thumbnail/'.$CONF['prefixe_mini'].$FileName.'" -dpi 72 '.$CONF['convOptions'].' -resize '.$resize_param.' -crop '.$offset_x.' '.$offset_y.' '.$CONF['DIMthumbnail'].' '.$DIMthumbnailV.' -rmeta -rexifthumb "'.$FileSource.'"');35 exec('include\nconvert.exe -overwrite -q '.$CONF['Qthumbnail'].' -out jpeg -o "'.$FileFolder.'thumbnail/'.$CONF['prefixe_mini'].$FileName.'.jpg" -dpi 72 '.$CONF['convOptions'].' -resize '.$resize_param.' -crop '.$offset_x.' '.$offset_y.' '.$CONF['DIMthumbnail'].' '.$CCT_dimthumbnail.' -rmeta -rexifthumb "'.$FileSource.'"'); 36 36 37 $BlockThumbnail = true;38 $FileSource = $FileFolder.'thumbnail/'.$CONF['prefixe_mini'].$FileName ;37 $BlockThumbnail['create_custom_thumbs'] = true; 38 $FileSource = $FileFolder.'thumbnail/'.$CONF['prefixe_mini'].$FileName.'.jpg'; 39 39 } 40 40 41 41 // Cadre autour de la miniature 42 if ($ FRAMEparams['size1'] != 0 OR $FRAMEparams['size2'] != 0) {42 if ($CCT_frameparams['size1'] != 0 OR $CCT_frameparams['size2'] != 0) { 43 43 // Si la miniature n'a pas encore été générée il faut le faire 44 44 if ($FileSource == $FilesSource[$i]) { 45 exec(' files\nconvert.exe -q '.$CONF['Qthumbnail'].' -out jpeg -o "'.$FileFolder.'thumbnail/'.$CONF['prefixe_mini'].$FileName.'" -dpi 72 '.$CONF['convOptions'].' -resize '.$CONF['DIMthumbnail'].' '.$CONF['DIMthumbnail'].' -rmeta -rexifthumb "'.$FilesSource[$i].'"');46 $FileSource = $FileFolder.'thumbnail/'.$CONF['prefixe_mini'].$FileName ;45 exec('include\nconvert.exe -q '.$CONF['Qthumbnail'].' -out jpeg -o "'.$FileFolder.'thumbnail/'.$CONF['prefixe_mini'].$FileName.'.jpg" -dpi 72 '.$CONF['convOptions'].' -resize '.$CONF['DIMthumbnail'].' '.$CONF['DIMthumbnail'].' -rmeta -rexifthumb "'.$FilesSource[$i].'"'); 46 $FileSource = $FileFolder.'thumbnail/'.$CONF['prefixe_mini'].$FileName.'.jpg'; 47 47 } 48 48 … … 51 51 $y = imagesy($img)-1; 52 52 53 $colors[0] = hex2RGB($ FRAMEparams['color1']);54 $colors[1] = hex2RGB($ FRAMEparams['color2']);53 $colors[0] = hex2RGB($CCT_frameparams['color1']); 54 $colors[1] = hex2RGB($CCT_frameparams['color2']); 55 55 $colors[0] = imagecolorallocate($img, $colors[0]['r'], $colors[0]['g'], $colors[0]['b']); 56 56 $colors[1] = imagecolorallocate($img, $colors[1]['r'], $colors[1]['g'], $colors[1]['b']); 57 57 58 for ($m=0; $m<$ FRAMEparams['size1']; $m++) {58 for ($m=0; $m<$CCT_frameparams['size1']; $m++) { 59 59 imagerectangle($img, $m, $m, $x-$m, $y-$m, $colors[0]); 60 60 } 61 for ($m=$ FRAMEparams['size1']; $m<$FRAMEparams['size1']+$FRAMEparams['size2']; $m++) {61 for ($m=$CCT_frameparams['size1']; $m<$CCT_frameparams['size1']+$CCT_frameparams['size2']; $m++) { 62 62 imagerectangle($img, $m, $m, $x-$m, $y-$m, $colors[1]); 63 63 } 64 64 65 imagejpeg($img, $FileFolder.'thumbnail/'.$CONF['prefixe_mini'].$FileName , $CONF['Qthumbnail']);65 imagejpeg($img, $FileFolder.'thumbnail/'.$CONF['prefixe_mini'].$FileName.'.jpg', $CONF['Qthumbnail']); 66 66 imagedestroy($img); 67 67 68 $BlockThumbnail = true;69 $FileSource = $FileFolder.'thumbnail/'.$CONF['prefixe_mini'].$FileName ;68 $BlockThumbnail['create_custom_thumbs'] = true; 69 $FileSource = $FileFolder.'thumbnail/'.$CONF['prefixe_mini'].$FileName.'.jpg'; 70 70 } 71 71 } -
extensions/PHP_Optimisateur/plugins/create_custom_thumbs/setup.php
r9201 r9276 8 8 $plugin_config['FRAMEparams']['color2'] = nice_hex_color($plugin_config['FRAMEparams']['color2']); 9 9 10 $PAGE_CONTENT[0] .= '<table> 10 $PAGE_CONTENT[0] .= ' 11 <table> 11 12 <tr> 12 13 <td>'.l10n('create_custom_thumbs.DIMthumbnailV').' :</td> … … 61 62 $plugin_config['FRAMEparams']['color2'] = nice_hex_color($plugin_config['FRAMEparams']['color2']); 62 63 63 $PAGE_CONTENT[0] .='<table> 64 $PAGE_CONTENT[0] .=' 65 <table> 64 66 <tr> 65 67 <td>'.l10n('create_custom_thumbs.DIMthumbnailV').' :</td> -
extensions/PHP_Optimisateur/plugins/front2back_support/main.php
r9201 r9276 2 2 /***************************************\ 3 3 | PHP OPTIMISATEUR | 4 | Plugin Front2Back Support 1.1 4 | Plugin Front2Back Support 1.1.a | 5 5 \***************************************/ 6 6 … … 9 9 ## Supprime le suffixe et déplace aussi les fichiers du repertoire source 10 10 11 $ NAMEverso = $CONF['Plugins']['front2back_support']['NAMEverso']; // Suffixe des versions alternatives12 $ MOVEverso = $CONF['Plugins']['front2back_support']['MOVEverso']; // Déplacer les images originales dans un sous dosssier 'verso'11 $F2B_nameverso = $CONF['Plugins']['front2back_support']['NAMEverso']; // Suffixe des versions alternatives 12 $F2B_moveverso = $CONF['Plugins']['front2back_support']['MOVEverso']; // Déplacer les images originales dans un sous dosssier 'verso' 13 13 14 if (strpos($FileName, $ NAMEverso) !== false) {15 $FileNameClean = str_replace($ NAMEverso, '', $FileName);14 if (strpos($FileName, $F2B_nameverso) !== false) { 15 $FileNameClean = str_replace($F2B_nameverso, '', $FileName); 16 16 17 17 // Image normale … … 19 19 mkdir($FileFolder.'thumbnail/verso'); 20 20 } 21 exec(' files\nconvert.exe -q '.$CONF['Qnormal'].' -out jpeg -o "'.$FileFolder.'thumbnail/verso/'.$FileNameClean.'" -dpi 72 '.$CONF['convOptions'].' -resize '.$CONF['DIMnormal'].' '.$CONF['DIMnormal'].' '.$CONF['copyNormal'].' "'.$FilesSource[$i].'"');21 exec('include\nconvert.exe -q '.$CONF['Qnormal'].' -out jpeg -o "'.$FileFolder.'thumbnail/verso/'.$FileNameClean.'.jpg" -dpi 72 '.$CONF['convOptions'].' -resize '.$CONF['DIMnormal'].' '.$CONF['DIMnormal'].' '.$CONF['copyNormal'].' "'.$FilesSource[$i].'"'); 22 22 23 23 // Image hd … … 27 27 } 28 28 if ($CONF['DIMhdORNOT']) { 29 exec('files\nconvert.exe -q '.$CONF['Qhd'].' -out jpeg -o "'.$FileFolder.'pwg_high/verso/'.$FileNameClean.'" -dpi '.$CONF['DPI'].' '.$CONF['convOptions'].' -resize '.$CONF['DIMhd'].' '.$CONF['DIMhd'].' '.$CONF['copyHD'].' "'.$FilesSource[$i].'"'); 29 exec('include\nconvert.exe -q '.$CONF['Qhd'].' -out jpeg -o "'.$FileFolder.'pwg_high/verso/'.$FileNameClean.'.jpg" -dpi '.$CONF['DPI'].' '.$CONF['convOptions'].' -resize '.$CONF['DIMhd'].' '.$CONF['DIMhd'].' '.$CONF['copyHD'].' "'.$FilesSource[$i].'"'); 30 } else if (!in_array($FileExt, $CONF['JPGexts'])) { 31 exec('include\nconvert.exe -q '.$CONF['Qhd'].' -out jpeg -o "'.$FileFolder.'pwg_high/'.$FileNameClean.'.jpg" "'.$FilesSource[$i].'"'); 30 32 } else { 31 copy($FilesSource[$i], $FileFolder.'pwg_high/verso/'.$FileNameClean );33 copy($FilesSource[$i], $FileFolder.'pwg_high/verso/'.$FileNameClean.'.jpg'); 32 34 } 33 35 } 34 36 35 37 // Déplacement de l'image originale 36 if ($ MOVEverso) {38 if ($F2B_moveverso) { 37 39 $FileFolderSource = str_replace($CONF['DIRsortie'], $CONF['DIRsource'], $FileFolder); 38 40 if (!file_exists($FileFolderSource.'verso')) { 39 41 mkdir($FileFolderSource.'verso', 0777, true); 40 42 } 41 rename($FileFolderSource.$FileName , $FileFolderSource.'verso/'.$FileNameClean);43 rename($FileFolderSource.$FileName.'.'.$FileExt, $FileFolderSource.'verso/'.$FileNameClean.'.'.$FileExt); 42 44 } 43 45 44 $BlockNormal = true; 45 $BlockThumbnail = true; 46 $BlockHigh = true; 46 // Suppression de la miniature si déjà crée (par un autre plugin) 47 if (file_exists($FileFolder.'thumbnail/'.$CONF['prefixe_mini'].$FileName.'.jpg')) { 48 unlink($FileFolder.'thumbnail/'.$CONF['prefixe_mini'].$FileName.'.jpg'); 49 } 50 51 $BlockNormal['front2back_support'] = true; 52 $BlockThumbnail['front2back_support'] = true; 53 $BlockHigh['front2back_support'] = true; 47 54 } 48 55 ?> -
extensions/PHP_Optimisateur/plugins/front2back_support/setup.php
r9201 r9276 4 4 case 'read_config': 5 5 load_plugin_lang('front2back_support'); 6 $PAGE_CONTENT[0] .= '<table> 6 $PAGE_CONTENT[0] .= ' 7 <table> 7 8 <tr> 8 9 <td>'.l10n('front2back_support.NAMEverso').' :</td> … … 24 25 case 'edit_config': 25 26 load_plugin_lang('front2back_support'); 26 $PAGE_CONTENT[0] .= '<table> 27 $PAGE_CONTENT[0] .= ' 28 <table> 27 29 <tr> 28 30 <td>'.l10n('front2back_support.NAMEverso').' :</td> … … 32 34 <td>'.l10n('front2back_support.MOVEverso').' :</td> 33 35 <td> 34 <label><input type="radio" name="Plugins[front2back_support][MOVEverso]" value="true" '.(($plugin_config['MOVEverso'])?'checked="checked"':'').'/> '.l10n('yes').'</label> 35 <label><input type="radio" name="Plugins[front2back_support][MOVEverso]" value="false" '.((!$plugin_config['MOVEverso'])?'checked="checked"':'').'/> '.l10n('no').'</label> 36 <input type="radio" id="front2back_support-move1" name="Plugins[front2back_support][MOVEverso]" value="true" '.(($plugin_config['MOVEverso'])?'checked="checked"':'').'/> 37 <label for="front2back_support-move1">'.l10n('yes').'</label> 38 <input type="radio" id="front2back_support-move2" name="Plugins[front2back_support][MOVEverso]" value="false" '.((!$plugin_config['MOVEverso'])?'checked="checked"':'').'/> 39 <label for="front2back_support-move2">'.l10n('no').'</label> 36 40 </td> 37 41 </tr> -
extensions/PHP_Optimisateur/plugins/watermark/main.php
r9201 r9276 8 8 ## Dépend des valeurs de $CONF['copyONhd'], $CONF['copyONnormal'] et $CONF['copyPOS'] 9 9 10 $ waterFILE= $CONF['Plugins']['watermark']['waterFILE']; // Fichier à incruster11 $ waterALPHA= $CONF['Plugins']['watermark']['waterALPHA']; // Opacité10 $WM_waterfile = $CONF['Plugins']['watermark']['waterFILE']; // Fichier à incruster 11 $WM_wateralpha = $CONF['Plugins']['watermark']['waterALPHA']; // Opacité 12 12 13 if (file_exists($ waterFILE)) {13 if (file_exists($WM_waterfile)) { 14 14 if ($CONF['copyONhd']) { 15 $CONF['copyHD'] = '-wmfile "'.$ waterFILE.'" -wmflag '.$CONF['copyPOS'].' -wmpos 0 0 -wmopacity '.$waterALPHA.'';15 $CONF['copyHD'] = '-wmfile "'.$WM_waterfile.'" -wmflag '.$CONF['copyPOS'].' -wmpos 0 0 -wmopacity '.$WM_wateralpha.''; 16 16 } 17 17 18 18 if ($CONF['copyONnormal']) { 19 $CONF['copyNormal'] = '-wmfile "'.$ waterFILE.'" -wmflag '.$CONF['copyPOS'].' -wmpos 0 0 -wmopacity '.$waterALPHA.'';19 $CONF['copyNormal'] = '-wmfile "'.$WM_waterfile.'" -wmflag '.$CONF['copyPOS'].' -wmpos 0 0 -wmopacity '.$WM_wateralpha.''; 20 20 } 21 21 } -
extensions/PHP_Optimisateur/plugins/watermark/setup.php
r9201 r9276 4 4 case 'read_config': 5 5 load_plugin_lang('watermark'); 6 $PAGE_CONTENT[0] .= '<table> 6 $PAGE_CONTENT[0] .= ' 7 <table> 7 8 <tr> 8 9 <td>'.l10n('watermark.waterFILE').' :</td> … … 28 29 case 'edit_config': 29 30 load_plugin_lang('watermark'); 30 $PAGE_CONTENT[0] .= '<table> 31 $PAGE_CONTENT[0] .= ' 32 <table> 31 33 <tr> 32 34 <td>'.l10n('watermark.waterFILE').' :</td>
Note: See TracChangeset
for help on using the changeset viewer.