-is_active ENUM('Y', 'N') NOT NULL DEFAULT 'N',
-KEY(code),
-PRIMARY KEY(id)
-) TYPE=MyISAM";
- $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_countries (code, descr, is_active) VALUES ('DE', 'Deutschland', 'Y')";
-
- // Admin menu
- $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu (action, what, title, descr, sort) VALUES('country', NULL, 'Ländercodes verwalten', 'Stellen Sie hier Ländercodes ein, damit auch internationale Mitglieder sich zu Ihrem ".MT_WORD." anmelden können.', 8)";
- $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu (action, what, title, descr, sort) VALUES('country', 'list_country', 'Verwalten', 'Hinzufügen, Ändern und Löschen von Ländercodes.', 1)";
-
- // Add entry to user table
- $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_data ADD country_code BIGINT(20) UNSIGNED NOT NULL DEFAULT '1'";
- break;
-
-case "remove": // Do stuff when removing extension
- // SQL commands to run
- $SQLs[] = "DROP TABLE IF EXISTS "._MYSQL_PREFIX."_countries";
- $SQLs[] = "DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_admin_menu WHERE action='country' LIMIT 2";
- break;
-
-case "activate": // Do stuff when admin activates this extension
- // SQL commands to run
- $SQLs[] = "";
- break;
-
-case "deactivate": // Do stuff when admin deactivates this extension
- // SQL commands to run
- $SQLs[] = "";
- break;
-
-case "update": // Update an extension
- switch ($EXT_VER)
- {
- case "0.0.1": // SQL queries for v0.0.1
- // Update notes (these will be set as task text!)
- $UPDATE_NOTES = "SQL-Dateien hinzugefügt, die Sie mit z.B. phpMyAdmin einspielen können. (DOCS/country/README.de lesen!)";
+is_active ENUM('Y','N') NOT NULL DEFAULT 'N',
+KEY (code),
+PRIMARY KEY (id)
+) TYPE={?_TABLE_TYPE?}");
+ addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_countries` (code, descr, is_active) VALUES ('DE','Deutschland','Y')");
+
+ // Admin menu
+ addAdminMenuSql('country', NULL, 'Ländercodes verwalten','Stellen Sie hier Ländercodes ein, damit auch internationale Mitglieder sich zu Ihrem {?mt_word?} anmelden können.', 8);
+ addAdminMenuSql('country','list_country','Verwalten','Hinzufügen, Ändern und Löschen von Ländercodes.', 1);
+
+ // Add entry to user table
+ addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_user_data` ADD country_code BIGINT(20) UNSIGNED NOT NULL DEFAULT 1");