Vorsicht: Jede Aktualisierung dieser Liste kostet Ihnen eine Abfrage!',10)"); // Reload lock table addExtensionSql("DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_yoomedia_reload`"); addExtensionSql("CREATE TABLE `{?_MYSQL_PREFIX?}_yoomedia_reload` ( `id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT, `type` VARCHAR(255) NOT NULL DEFAULT 'general', `y_id` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, `y_reload` SMALLINT(6) UNSIGNED NOT NULL DEFAULT 0, `inserted` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, PRIMARY KEY (`id`), UNIQUE `y_type` (`type`,`y_id`) ) TYPE={?_TABLE_TYPE?} COMMENT='Reload lock reminder for Yoo!Media campaigns'"); break; case 'remove': // Do stuff when removing extension // SQL commands to run addExtensionSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_admin_menu` WHERE `what` IN('config_yoomedia','list_yoomedia_tm')"); addExtensionSql("DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_yoomedia_reload`"); break; case 'activate': // Do stuff when admin activates this extension // SQL commands to run break; case 'deactivate': // Do stuff when admin deactivates this extension // SQL commands to run break; case 'update': // Update an extension switch (getCurrentExtensionVersion()) { case '0.0.1': // SQL queries for v0.0.1 addExtensionSql(''); // Update notes (these will be set as task text!) setExtensionUpdateNotes(''); break; } break; case 'modify': // When the extension got modified break; case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305. break; case 'init': // Do stuff when extension is initialized // The translation table // @TODO Can this be moved into a database table? $GLOBALS['translation_tables']['yoomedia'] = array( // Error messages 'error_codes' => array( 1 => 'wrong_pass', 2 => 'wrong_sid', 3 => 'website_locked', 4 => 'api_data_error', 5 => 'requests_depleted', 6 => 'zero_result', 10 => 'incomplete_request' ), // For text mails 'textmail' => array( 0 => 'id', 1 => 'name', 2 => 'reload', 3 => 'wait', 4 => 'remain', 5 => 'pay', 6 => 'text' ) ); break; default: // Unknown extension mode DEBUG_LOG(__FILE__, __LINE__, sprintf("Unknown extension mode %s detected.", getExtensionMode())); break; } // [EOF] ?>