Changeset 32181 for extensions/Photo_add_by/initpicture.php
- Timestamp:
- May 6, 2020, 10:07:34 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/Photo_add_by/initpicture.php
r31465 r32181 1 1 <?php 2 2 // +-----------------------------------------------------------------------+ 3 // | Photo added by plugin for Piwigo 3 // | Photo added by plugin for Piwigo by TEMMII | 4 4 // +-----------------------------------------------------------------------+ 5 // | Copyright(C) 2012-20 16ddtddt http://temmii.com/piwigo/ |5 // | Copyright(C) 2012-2020 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', 'pabI', 55 ); 24 25 function pabI() 26 { 24 function pabI(){ 27 25 global $template; 28 26 $template->set_prefilter('picture', 'pabIT'); 29 27 } 30 28 31 32 function pabIT($content, &$smarty) 33 { 34 35 global $conf; 36 37 $search = '#<div id="'.$conf['Photo_add_by'].'" class="imageInfo">#'; 38 39 $replacement = ' 29 function pabIT($content, &$smarty){ 30 global $conf, $pwg_loaded_plugins; 31 $search = '#<div id="'.$conf['Photo_add_by'].'" class="imageInfo">#'; 32 if (isset($pwg_loaded_plugins['manage_properties_photos'])){ 33 $replacement = '<div id="'.$conf['Photo_add_by'].'" class="imageInfo">'; 34 }else{ 35 $replacement = ' 40 36 {if $PAB} 41 37 <div id="pab1" class="imageInfo"> … … 45 41 {/if} 46 42 <div id="'.$conf['Photo_add_by'].'" class="imageInfo">'; 47 43 } 48 44 return preg_replace($search, $replacement, $content); 49 45 }
Note: See TracChangeset
for help on using the changeset viewer.