array('default' => 'Additional Pages'), 'show_home' => true, 'level_perm' => false, 'group_perm' => false, 'user_perm' => false, 'language_perm' => false, 'homepage' => null, ); $query = 'INSERT INTO ' . CONFIG_TABLE . ' (param,value,comment) VALUES ("additional_pages" , "'.pwg_db_real_escape_string(serialize($config)).'" , "Additional Pages configuration");'; pwg_query($query); } } function plugin_activate() { global $prefixeTable; $q = pwg_query('SHOW COLUMNS FROM ' . HISTORY_TABLE . ' LIKE "section"'); $section = pwg_db_fetch_assoc($q); $type = $section['Type']; // Add additional page section into history table if (strpos($type, 'additional_page') === false) { $type = strtr($type , array(')' => ',\'additional_page\')')); pwg_query('ALTER TABLE ' . HISTORY_TABLE . ' CHANGE section section ' . $type . ' DEFAULT NULL'); } } function plugin_uninstall() { global $prefixeTable, $conf; $q = 'DROP TABLE ' . $prefixeTable . 'additionalpages;'; pwg_query($q); $q = 'DELETE FROM ' . CONFIG_TABLE . ' WHERE param="additional_pages" LIMIT 1;'; pwg_query($q); unset($conf['additional_pages']); } ?>