'Title', 'URL' => get_admin_plugin_menu_link(TITLE_PATH . 'admin/admin.php'))); return $menu; } //add prefiltre photo add_event_handler('loc_begin_admin', 'titlePadminf',60); add_event_handler('loc_begin_admin_page', 'titlePadminA',60); function titlePadminf() { global $template; $template->set_prefilter('picture_modify', 'titlePadminfT'); } function titlePadminfT($content, &$smarty) { $search = '##'; $replacement = '

{\'Title - Plugin title\'|@translate} {\'title_photo\'|@translate} : 

'; return preg_replace($search, $replacement, $content); } function titlePadminA() { load_language('plugin.lang', TITLE_PATH); if (isset($_GET['image_id'])) { global $template, $prefixeTable; $query = ' select id,title FROM ' . TITLE_PHOTO_TABLE . ' WHERE id = '.$_GET['image_id'].' ;'; $result = pwg_query($query); $row = mysql_fetch_array($result); $titleP=$row['title']; $template->assign( array( 'titleCONTENT' => $titleP, )); } if (isset($_POST['subtitlephoto'])) { $query = ' DELETE FROM ' . TITLE_PHOTO_TABLE . ' WHERE id = '.$_GET['image_id'].' ;'; $result = pwg_query($query); $q = ' INSERT INTO ' . $prefixeTable . 'title_photo(id,title)VALUES ('.$_GET['image_id'].',"'.$_POST['insertitleP'].'");'; pwg_query($q); $template->assign( array( 'titleCONTENT' => $_POST['insertitleP'], )); } } //add prefiltre album add_event_handler('loc_end_cat_modify', 'titleAadminf', 60); add_event_handler('loc_end_cat_modify', 'titleAadminA', 60); function titleAadminf() { global $template; $template->set_prefilter('album_properties', 'titleAadminfT'); } function titleAadminfT($content, &$smarty) { $search = '##'; $replacement = '

{\'Title - Plugin title\'|@translate} {\'title_album\'|@translate} : 

'; return preg_replace($search, $replacement, $content); } function titleAadminA() { load_language('plugin.lang', TITLE_PATH); if (isset($_GET['cat_id'])) { global $template, $prefixeTable; $query = ' select id,title FROM ' . TITLE_ALBUM_TABLE . ' WHERE id = '.$_GET['cat_id'].' ;'; $result = pwg_query($query); $row = mysql_fetch_array($result); $titleA=$row['title']; $template->assign( array( 'titleCONTENT' => $titleA, )); } if (isset($_POST['subtitlealbum'])) { $query = ' DELETE FROM ' . TITLE_ALBUM_TABLE . ' WHERE id = '.$_GET['cat_id'].' ;'; $result = pwg_query($query); $q = ' INSERT INTO ' . $prefixeTable . 'title_album(id,title)VALUES ('.$_GET['cat_id'].',"'.$_POST['insertitleA'].'");'; pwg_query($q); $template->assign( array( 'titleCONTENT' => $_POST['insertitleA'], )); } } ?>