'on', 'main_button_type' => 'button', 'record_title' => 'Title', 'record_text' => 'Description', 'record_img' => '', 'show_pic_button' => 'on', 'pic_button_type' => 'button' ); if (empty($conf['vkbutton'])) { pwg_query('INSERT INTO ' . CONFIG_TABLE . ' (param,value,comment) VALUES ("vkbutton" , "'.pwg_db_real_escape_string(serialize($config)).'" , "vkbutton configuration");'); } } function plugin_install() { global $conf; $config = array( 'show_main_button' => 'on', 'main_button_type' => 'button', 'record_title' => 'Title', 'record_text' => 'Description', 'record_img' => '', 'show_pic_button' => 'on', 'pic_button_type' => 'button' ); if (empty($conf['vkbutton'])) { pwg_query('INSERT INTO ' . CONFIG_TABLE . ' (param,value,comment) VALUES ("vkbutton" , "'.pwg_db_real_escape_string(serialize($config)).'" , "vkbutton configuration");'); } } function plugin_uninstall() { pwg_query('DELETE FROM ' . CONFIG_TABLE . ' WHERE '.CONFIG_TABLE.'.param="vkbutton" LIMIT 1;'); unset($conf['vkbutton']); }