Changeset 31557 for extensions/read_metadata/initadmin.php
- Timestamp:
- Apr 18, 2016, 2:41:11 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/read_metadata/initadmin.php
r31551 r31557 31 31 } 32 32 33 33 add_event_handler('loc_begin_admin', 'read_metadataprefiltre',60); 34 //add_event_handler('loc_begin_admin_page', 'read_metadataprefiltreA',60); 35 36 function read_metadataprefiltre(){ 37 global $template; 38 $template->set_prefilter('picture_modify', 'read_metadataprefiltreT'); 39 if(strstr($_SERVER['REQUEST_URI'], 'photo-')){ 40 $photoid = explode('photo-', $_SERVER['REQUEST_URI']); 41 if(strstr($photoid[1], '-properties')){$photoid = explode('-properties', $photoid[1]);} 42 else if(strstr($photoid[1], '&cat')){$photoid = explode('&cat', $photoid[1]);} 43 else {} 44 $template->assign( 45 array( 46 'U_SHOWMETADATA' => 'admin.php?page=plugin-read_metadata&showmetadata='.$photoid[0], 47 )); 48 } 49 if (isset($_GET['rmphotoid'])) { 50 check_input_parameter('rmphotoid', $_GET, false, PATTERN_ID); 51 $photoid[0]=$_GET['rmphotoid']; 52 $template->assign( 53 array( 54 'U_SHOWMETADATA' => 'admin.php?page=plugin-read_metadata&showmetadata='.$photoid[0], 55 )); 56 } 57 } 58 59 function read_metadataprefiltreT($content, &$smarty){ 60 $search = '# </ul> 61 </td> 62 </tr> 63 </table>#'; 64 65 $replacement = ' 66 <li><a href="{$U_SHOWMETADATA}"><span class="icon-eye"></span>{\'Show metadata\'|@translate}</a></li> 67 68 </ul> 69 </td> 70 </tr> 71 </table>'; 72 73 return preg_replace($search, $replacement, $content); 74 }
Note: See TracChangeset
for help on using the changeset viewer.