Changeset 32735 for extensions/manage_properties_photos
- Timestamp:
- Feb 3, 2022, 11:18:51 PM (2 years ago)
- Location:
- extensions/manage_properties_photos
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/manage_properties_photos/admin.php
r32218 r32735 3 3 // | Manage Properties Photos plugin for Piwigo by TEMMII | 4 4 // +-----------------------------------------------------------------------+ 5 // | Copyright(C) 2007-202 0ddtddt http://temmii.com/piwigo/ |5 // | Copyright(C) 2007-2022 ddtddt http://temmii.com/piwigo/ | 6 6 // +-----------------------------------------------------------------------+ 7 7 // | This program is free software; you can redistribute it and/or modify | … … 48 48 }else{ 49 49 pwg_query('DELETE FROM ' . ADD_PROP_PHOTO_TABLE . ' where dataprop ="plugdownload_counter";'); 50 } 51 /*end*/ 52 /*Color Palette*/ 53 if (isset($pwg_loaded_plugins['ColorPalette'])){ 54 $row = pwg_db_fetch_assoc(pwg_query('SELECT dataprop FROM '. ADD_PROP_PHOTO_TABLE .' where dataprop ="plugColorPalette";')); 55 if(empty($row)){ 56 $row = pwg_db_fetch_assoc(pwg_query('SELECT MAX(orderprop) FROM '. ADD_PROP_PHOTO_TABLE )); 57 $or = ($row['MAX(orderprop)'] + 1); 58 pwg_query('INSERT INTO ' . $prefixeTable . 'add_properties_photos(wording,orderprop,active,edit,Typ,dataprop)VALUES ("ColorPalette","' . $or . '","0",0,"1","plugColorPalette");'); 59 } 60 }else{ 61 pwg_query('DELETE FROM ' . ADD_PROP_PHOTO_TABLE . ' where dataprop ="plugColorPalette";'); 62 } 63 /*end*/ 64 /*Expiry Date*/ 65 if (isset($pwg_loaded_plugins['expiry_date'])){ 66 $row = pwg_db_fetch_assoc(pwg_query('SELECT dataprop FROM '. ADD_PROP_PHOTO_TABLE .' where dataprop ="plugexpiry_date";')); 67 if(empty($row)){ 68 $row = pwg_db_fetch_assoc(pwg_query('SELECT MAX(orderprop) FROM '. ADD_PROP_PHOTO_TABLE )); 69 $or = ($row['MAX(orderprop)'] + 1); 70 pwg_query('INSERT INTO ' . $prefixeTable . 'add_properties_photos(wording,orderprop,active,edit,Typ,dataprop)VALUES ("expiry_date","' . $or . '","0",0,"1","plugexpiry_date");'); 71 } 72 }else{ 73 pwg_query('DELETE FROM ' . ADD_PROP_PHOTO_TABLE . ' where dataprop ="plugexpiry_date";'); 50 74 } 51 75 /*end*/ … … 239 263 $items['AIPWORDING'] = l10n('Visits'); 240 264 }else if($info_photos['id_prop_pho']==10){ 241 $items['AIPWORDING'] = l10n(' Average');265 $items['AIPWORDING'] = l10n('Rating score'); 242 266 }else if($info_photos['id_prop_pho']==11){ 243 267 $items['AIPWORDING'] = l10n('Who can see this photo?'); … … 253 277 }else if($info_photos['dataprop']=="plugdownload_counter"){ 254 278 $items['AIPWORDING'] = l10n('Downloads'); 279 }else if($info_photos['dataprop']=="plugColorPalette"){ 280 $items['AIPWORDING'] = l10n('Palette'); 281 }else if($info_photos['dataprop']=="plugexpiry_date"){ 282 $items['AIPWORDING'] = l10n('Expiry date'); 255 283 }else{ 256 284 $items['AIPWORDING'] = trigger_change('AP_render_content',$info_photos['wording']); -
extensions/manage_properties_photos/admin/admin.tpl
r32180 r32735 272 272 line-height: 22px; 273 273 } 274 275 li.categoryLi{ 276 list-style:none; 277 } 278 274 279 {/html_style} 275 280 -
extensions/manage_properties_photos/initadmin.php
r32650 r32735 3 3 // | Manage Properties Photos plugin for Piwigo by TEMMII | 4 4 // +-----------------------------------------------------------------------+ 5 // | Copyright(C) 2007-202 1ddtddt http://temmii.com/piwigo/ |5 // | Copyright(C) 2007-2022 ddtddt http://temmii.com/piwigo/ | 6 6 // +-----------------------------------------------------------------------+ 7 7 // | This program is free software; you can redistribute it and/or modify | -
extensions/manage_properties_photos/initpicture.php
r32650 r32735 3 3 // | Manage Properties Photos plugin for Piwigo by TEMMII | 4 4 // +-----------------------------------------------------------------------+ 5 // | Copyright(C) 2007-202 1ddtddt http://temmii.com/piwigo/ |5 // | Copyright(C) 2007-2022 ddtddt http://temmii.com/piwigo/ | 6 6 // +-----------------------------------------------------------------------+ 7 7 // | This program is free software; you can redistribute it and/or modify | … … 22 22 //Ajout du prefiltre 23 23 add_event_handler('loc_begin_picture', 'add_info_photo_pre', 05); 24 add_event_handler('loc_end_picture', 'add_info_photo_pre2', 95); 24 25 25 26 function add_info_photo_pre() { 26 27 global $template; 27 $template->set_prefilter('picture', 'add_info_photo_preT'); 28 $template->set_prefilter('picture', 'add_info_photo_preT'); 29 } 30 31 function add_info_photo_pre2() { 32 global $template,$pwg_loaded_plugins; 33 if (isset($pwg_loaded_plugins['ColorPalette'])){ 34 $template->set_prefilter('picture', 'color_palette_picture_prefilter',0); 35 } 28 36 } 29 37 … … 199 207 <dd>{$DOWNLOAD_COUNTER}</dd> 200 208 </div> 209 {else if $addinfophotos.AIPWORDING == \'ColorPalette\'} 210 {$INFO_PALETTE} 211 {else if $addinfophotos.AIPWORDING == \'expiry_date\'} 212 {if isset($expiry_date)} 213 <div id="expd_expiry_date" class="imageInfo"> 214 <dt>{\'Expiry date\'|@translate}</dt> 215 <dd>{\'%s, in %s days\'|@translate:$expiry_date:$expd_days}</dd> 216 </div> 217 {/if} 218 {if isset($expired_on_date)} 219 <div id="expd_expired_on_date" class="imageInfo"> 220 <dt>{\'expired on\'|@translate}</dt> 221 <dd>{$expired_on_date}</dd> 222 </div> 223 {/if} 201 224 {else if $addinfophotos.AIPDATA} 202 225 <div id="add_info" class="imageInfo"> … … 431 454 </dl> 432 455 </div> 456 {else if $addinfophotos.AIPWORDING == \'ColorPalette\'} 457 {strip} 458 {combine_css id="colorpalette.paletteinfo_css" path=$COLOR_PALETTE_PATH|cat:"template/palette_info.css"} 459 {combine_script id="colorpalette.paletteinfo_js" require="jquery" load="async" path=$COLOR_PALETTE_PATH|cat:"template/palette_info.js"} 460 {footer_script} 461 var paletteUrl = \'{$palette_url}\'; 462 {/footer_script} 463 <div id="color_palette" class="imageInfo"> 464 <dl class="row mb-0"> 465 <dt class="col-sm-5">{\'Palette\'|@translate}</dt> 466 <dd class="col-sm-7" id="palette_colors"> 467 {foreach 468 from=$palette_colors item=color name=color_loop} 469 <div class="color_palette_item" 470 style="background-color: #{$color.hex};" 471 data-color="{$color.rgb}" 472 onclick="paletteItemClick(this);" 473 title="#{$color.hex}"></div> 474 {/foreach} 475 <a id="palette_search" href="#" style="display: none;">{\'Search\'|@translate}</a> 476 <div style="clear: both"/> 477 </dd> 478 </dl> 479 </div> 480 {/strip} 481 {else if $addinfophotos.AIPWORDING == \'expiry_date\'} 482 {if isset($expiry_date)} 483 <div id="expd_expiry_date" class="imageInfo"> 484 <dl class="row mb-0"> 485 <dt class="col-sm-5">{\'Expiry date\'|@translate}</dt> 486 <dd class="col-sm-7">{\'%s, in %s days\'|@translate:$expiry_date:$expd_days}</dd> 487 </dl> 488 </div> 489 {/if} 490 {if isset($expired_on_date)} 491 <div id="expd_expired_on_date" class="imageInfo"> 492 <dl class="row mb-0"> 493 <dt class="col-sm-5">{\'expired on\'|@translate}</dt> 494 <dd class="col-sm-7">{$expired_on_date}</dd> 495 </dl> 496 </div> 497 {/if} 433 498 {else if $addinfophotos.AIPDATA} 434 499 <div id="add_info" class="imageInfo"> … … 792 857 </tr> 793 858 </div> 859 {else if $addinfophotos.AIPWORDING == \'ColorPalette\'} 860 {strip} 861 {combine_css id="colorpalette.paletteinfo_css" path=$COLOR_PALETTE_PATH|cat:"template/palette_info.css"} 862 {combine_script id="colorpalette.paletteinfo_js" require="jquery" load="async" path=$COLOR_PALETTE_PATH|cat:"template/palette_info.js"} 863 {footer_script} 864 var paletteUrl = \'{$palette_url}\'; 865 {/footer_script} 866 <div id="color_palette" class="imageInfo"> 867 <tr> 868 <th scope="row">{\'Palette\'|@translate}</th> 869 <td id="palette_colors"> 870 {foreach 871 from=$palette_colors item=color name=color_loop} 872 <div class="color_palette_item" 873 style="background-color: #{$color.hex};" 874 data-color="{$color.rgb}" 875 onclick="paletteItemClick(this);" 876 title="#{$color.hex}"></div> 877 {/foreach} 878 <a id="palette_search" href="#" style="display: none;">{\'Search\'|@translate}</a> 879 <div style="clear: both"/> 880 </td> 881 </div> 882 {/strip} 883 {else if $addinfophotos.AIPWORDING == \'expiry_date\'} 884 {if isset($expiry_date)} 885 <div id="expd_expiry_date" class="imageInfo"> 886 <tr> 887 <th scope="row">{\'Expiry date\'|@translate}</th> 888 <td>{\'%s, in %s days\'|@translate:$expiry_date:$expd_days}</td> 889 </tr> 890 </div> 891 {/if} 892 {if isset($expired_on_date)} 893 <div id="expd_expired_on_date" class="imageInfo"> 894 <tr> 895 <th scope="row">{\'expired on\'|@translate}</th> 896 <td>{$expired_on_date}</td> 897 </tr> 898 </div> 899 {/if} 794 900 {else if $addinfophotos.AIPDATA} 795 901 <div id="add_info" class="imageInfo"> … … 1015 1121 <dd>{$DOWNLOAD_COUNTER}</dd> 1016 1122 </li> 1123 {else if $addinfophotos.AIPWORDING == \'ColorPalette\'} 1124 {$INFO_PALETTE} 1125 {else if $addinfophotos.AIPWORDING == \'expiry_date\'} 1126 {if isset($expiry_date)} 1127 <li id="expd_expiry_date" class="imageInfo"> 1128 <dt>{\'Expiry date\'|@translate}</dt> 1129 <dd">{\'%s, in %s days\'|@translate:$expiry_date:$expd_days}</dd> 1130 </li> 1131 {/if} 1132 {if isset($expired_on_date)} 1133 <li id="expd_expired_on_date" class="imageInfo"> 1134 <dt>{\'expired on\'|@translate}</dt> 1135 <dd>{$expired_on_date}</dd> 1136 </li> 1137 {/if} 1017 1138 {else if $addinfophotos.AIPDATA} 1018 1139 <li id="add_info" class="imageInfo"> … … 1079 1200 1080 1201 if (isset($pwg_loaded_plugins['ExtendedDescription'])){add_event_handler('AP_render_content', 'get_user_language_desc');} 1081 1202 1082 1203 $tab_add_info_one_photo = tab_add_info_by_photo_show(); 1083 1204 -
extensions/manage_properties_photos/main.inc.php
r32551 r32735 13 13 // | Manage Properties Photos plugin for Piwigo by TEMMII | 14 14 // +-----------------------------------------------------------------------+ 15 // | Copyright(C) 2007-202 1ddtddt http://temmii.com/piwigo/ |15 // | Copyright(C) 2007-2022 ddtddt http://temmii.com/piwigo/ | 16 16 // +-----------------------------------------------------------------------+ 17 17 // | This program is free software; you can redistribute it and/or modify | -
extensions/manage_properties_photos/maintain.class.php
r32391 r32735 3 3 // | Manage Properties Photos plugin for Piwigo by TEMMII | 4 4 // +-----------------------------------------------------------------------+ 5 // | Copyright(C) 2007-202 1ddtddt http://temmii.com/piwigo/ |5 // | Copyright(C) 2007-2022 ddtddt http://temmii.com/piwigo/ | 6 6 // +-----------------------------------------------------------------------+ 7 7 // | This program is free software; you can redistribute it and/or modify |
Note: See TracChangeset
for help on using the changeset viewer.