array( 'link' => 0, 'block' => 1, ), 'menubar_link' => array( 'menu' => 1, 'specials' => 0, ), 'menubar_block' => array( 'number' => 5, 'display_days' => true, ), 'truncate_summary' => 350, ))); // Installation function plugin_install() { global $prefixeTable; pwg_query("CREATE TABLE `" . $prefixeTable . "contests` ( `id` INT NOT NULL AUTO_INCREMENT , `name` VARCHAR( 255 ) NOT NULL , `date_begin` DATE NOT NULL , `date_end` DATE NOT NULL , `visible` TINYINT(1) NOT NULL , `logo` VARCHAR( 255 ) NULL , `banner` VARCHAR( 255 ) NULL , `summary` TEXT NULL , `description` TEXT NULL , PRIMARY KEY ( `id` ) ) DEFAULT CHARSET=utf8;"); pwg_query("CREATE TABLE `" . $prefixeTable . "contests_results` ( `image_id` INT NOT NULL , `contest_id` INT NOT NULL , `rank` INT NOT NULL , `author` VARCHAR( 255 ) NOT NULL , `comment` TEXT NULL, UNIQUE ( `image_id` , `contest_id` ) ) DEFAULT CHARSET=utf8;"); pwg_query("INSERT INTO " . CONFIG_TABLE . "(param,value,comment) VALUES('ContestResults', '" . default_config . "', 'Parametres du plugin ContestResults');"); } // Activation function plugin_activate(){ global $conf, $prefixeTable; include('include/compatibility.inc.php'); } // Désinstallation function plugin_uninstall() { global $prefixeTable; pwg_query("DROP TABLE `" . $prefixeTable . "contests`;"); pwg_query("DROP TABLE `" . $prefixeTable . "contests_results`;"); pwg_query("DELETE FROM " . CONFIG_TABLE . " WHERE `param` = 'ContestResults';"); } ?>