Changeset 32302 for extensions/title/initadmin.php
- Timestamp:
- Oct 31, 2020, 8:28:51 PM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/title/initadmin.php
r32070 r32302 1 1 <?php 2 2 // +-----------------------------------------------------------------------+ 3 // | Title plugin for piwigo 3 // | Title plugin for piwigo by TEMMII | 4 4 // +-----------------------------------------------------------------------+ 5 5 // | Copyright(C) 2011 - 2020 ddtddt http://temmii.com/piwigo/ | … … 38 38 add_event_handler('loc_begin_admin_page', 'titlePadminA',60); 39 39 40 function titlePadminf() 41 { 42 global $template; 43 $template->set_prefilter('picture_modify', 'titlePadminfT'); 44 } 40 function titlePadminf(){ 41 global $template; 42 $template->set_prefilter('picture_modify', 'titlePadminfT'); 43 } 45 44 46 function titlePadminfT($content, &$smarty) 47 { 45 function titlePadminfT($content, &$smarty){ 48 46 $search = '#<p style="margin:40px 0 0 0">#'; 49 50 47 $replacement = ' 51 48 <p> … … 58 55 59 56 return preg_replace($search, $replacement, $content); 60 57 } 61 58 62 59 function titlePadminA(){ 63 60 if (isset($_GET['image_id'])){ 64 global $template, $prefixeTable ;61 global $template, $prefixeTable, $pwg_loaded_plugins; 65 62 $query = 'select id,title FROM ' . TITLE_PHOTO_TABLE . ' WHERE id = '.$_GET['image_id'].';'; 66 63 $result = pwg_query($query); 67 64 $row = pwg_db_fetch_assoc($result); 68 65 $titleP=$row['title']; 69 $PAED = pwg_db_fetch_assoc(pwg_query("SELECT state FROM " . PLUGINS_TABLE . " WHERE id = 'ExtendedDescription';")); 70 if($PAED['state'] == 'active'){ 66 if (isset($pwg_loaded_plugins['ExtendedDescription'])){ 71 67 $template->assign('useED',1); 72 68 }else{ … … 119 115 function titleAadminA(){ 120 116 if (isset($_GET['cat_id'])){ 121 global $template, $prefixeTable ;117 global $template, $prefixeTable, $pwg_loaded_plugins; 122 118 $query = 'select id,title FROM ' . TITLE_ALBUM_TABLE . ' WHERE id = '.$_GET['cat_id'].';'; 123 119 $result = pwg_query($query); 124 120 $row = pwg_db_fetch_assoc($result); 125 121 $titleA=$row['title']; 126 $PAED = pwg_db_fetch_assoc(pwg_query("SELECT state FROM " . PLUGINS_TABLE . " WHERE id = 'ExtendedDescription';")); 127 if($PAED['state'] == 'active'){ 122 if (isset($pwg_loaded_plugins['ExtendedDescription'])){ 128 123 $template->assign('useED',1); 129 124 }else{
Note: See TracChangeset
for help on using the changeset viewer.