'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', 'titlePadminA',60); function titlePadminf() { global $template; $template->set_prefilter('picture_modify', 'titlePadminfT'); } function titlePadminfT($content, &$smarty) { $search = '#
{\'title_photo\'|@translate} : 

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['inser'].'");'; pwg_query($q); $template->assign( array( 'titleCONTENT' => $_POST['inser'], )); } } //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('categories', 'titleAadminfT'); } function titleAadminfT($content, &$smarty) { $search = '#name="reset">

#'; $replacement = 'name="reset">


{\'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['inser'].'");'; pwg_query($q); $template->assign( array( 'titleCONTENT' => $_POST['inser'], )); } } ?>