X-Git-Url: https://git.mxchange.org/?p=mailer.git;a=blobdiff_plain;f=inc%2Fextensions%2Fext-network.php;h=55ddf49e786e542d53d3fbecea81d214866746e0;hp=26307a43d49ff91b2cb602b2a554586bc5f2df1f;hb=c3b4eaf29946349ff058691db2dcb615a5379bb2;hpb=a4dd1eb45ae25ed017a862a4edac1e2828acbee6 diff --git a/inc/extensions/ext-network.php b/inc/extensions/ext-network.php index 26307a43d4..55ddf49e78 100644 --- a/inc/extensions/ext-network.php +++ b/inc/extensions/ext-network.php @@ -14,8 +14,6 @@ * $Date:: $ * * $Tag:: 0.2.1-FINAL $ * * $Author:: $ * - * Needs to be in all Files and every File needs "svn propset * - * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * * @TODO AbisZED: Which charset? * * @TODO Ad-Magnet: Layer(klick?). Layerviews.Skybannerklick/-view, * @@ -39,7 +37,7 @@ * @TODO Yoo!Media: What is LayerAd compared to Layer click? * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009, 2010 by Mailer Developer Team * + * Copyright (c) 2009 - 2011 by Mailer Developer Team * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -87,7 +85,7 @@ switch (getExtensionMode()) { `network_charset` VARCHAR(20) NOT NULL DEFAULT 'UTF-8', UNIQUE (`network_short_name`), PRIMARY KEY (`network_id`) -) TYPE={?_TABLE_TYPE?} COMMENT='Network data'"); +) ENGINE = {?_TABLE_TYPE?} CHARACTER SET utf8 COLLATE utf8_general_ci COMMENT = 'Network data'"); // Types the network provider is supporting (e.g. Forced-Banner and so on) // @TODO network_type_handle is an internal name and needs documentation @@ -101,7 +99,7 @@ PRIMARY KEY (`network_id`) `network_type_banner_url` VARCHAR(255) NULL DEFAULT NULL, UNIQUE `provider_type` (`network_id`,`network_type_handle`), PRIMARY KEY (`network_type_id`) -) TYPE={?_TABLE_TYPE?} COMMENT='Types provideable by networks'"); +) ENGINE = {?_TABLE_TYPE?} CHARACTER SET utf8 COLLATE utf8_general_ci COMMENT = 'Types provideable by networks'"); // HTTP parameters (names) for URLs addExtensionSql('DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_network_request_params`'); @@ -115,7 +113,7 @@ PRIMARY KEY (`network_type_id`) UNIQUE `provider_type_key` (`network_id`,`network_type_id`,`request_param_key`), UNIQUE `provider_type_value` (`network_id`,`network_type_id`,`request_param_value`), PRIMARY KEY (`network_param_id`) -) TYPE={?_TABLE_TYPE?} COMMENT='Request parameters for GET/POST request'"); +) ENGINE = {?_TABLE_TYPE?} CHARACTER SET utf8 COLLATE utf8_general_ci COMMENT = 'Request parameters for GET/POST request'"); // Error status codes addExtensionSql('DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_network_error_codes`'); @@ -127,7 +125,7 @@ PRIMARY KEY (`network_param_id`) UNIQUE `code_type` (`network_type_code_value`,`network_type_id`), INDEX (`network_type_id`), PRIMARY KEY (`network_type_code_id`) -) TYPE={?_TABLE_TYPE?} COMMENT='Error codes for all types'"); +) ENGINE = {?_TABLE_TYPE?} CHARACTER SET utf8 COLLATE utf8_general_ci COMMENT = 'Error codes for all types'"); // Code types (internal table) addExtensionSql('DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_network_error_types`'); @@ -136,7 +134,7 @@ PRIMARY KEY (`network_type_code_id`) `network_code` VARCHAR(100) NOT NULL DEFAULT 'INVALID_CODE', UNIQUE (`network_code`), PRIMARY KEY (`network_code_id`) -) TYPE={?_TABLE_TYPE?} COMMENT='Error types, generic data, DO NOT ALTER!'"); +) ENGINE = {?_TABLE_TYPE?} CHARACTER SET utf8 COLLATE utf8_general_ci COMMENT = 'Error types, generic data, DO NOT ALTER!'"); // Valid translation keys (we hate hard-coded arrays, you see?) addExtensionSql('DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_network_translations`'); @@ -145,7 +143,7 @@ PRIMARY KEY (`network_code_id`) `network_translation_name` VARCHAR(100) NOT NULL DEFAULT '', UNIQUE (`network_translation_name`), PRIMARY KEY (`network_translation_id`) -) TYPE={?_TABLE_TYPE?} COMMENT='Translations for array keys, generic data, DO NOT ALTER!'"); +) ENGINE = {?_TABLE_TYPE?} CHARACTER SET utf8 COLLATE utf8_general_ci COMMENT = 'Translations for array keys, generic data, DO NOT ALTER!'"); // Array-Element translation tables per type/provider addExtensionSql('DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_network_api_translation`'); @@ -158,7 +156,7 @@ PRIMARY KEY (`network_translation_id`) UNIQUE `provider_type_key` (`network_id`,`network_type_id`,`network_api_index`), INDEX (`sort`), PRIMARY KEY (`network_api_id`) -) TYPE={?_TABLE_TYPE?} COMMENT='Translation of API responses, generic data, DO NOT ALTER!'"); +) ENGINE = {?_TABLE_TYPE?} CHARACTER SET utf8 COLLATE utf8_general_ci COMMENT = 'Translation of API responses, generic data, DO NOT ALTER!'"); // Data from the webmaster (you!) addExtensionSql('DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_network_config`'); @@ -172,7 +170,7 @@ PRIMARY KEY (`network_api_id`) UNIQUE `network_affiliate` (`network_id`,`network_affiliate_id`), UNIQUE `affiliate_site` (`network_affiliate_id`,`network_site_id`), PRIMARY KEY (`network_id`) -) TYPE={?_TABLE_TYPE?} COMMENT='Configuration data from the webmaster (you!)'"); +) ENGINE = {?_TABLE_TYPE?} CHARACTER SET utf8 COLLATE utf8_general_ci COMMENT = 'Configuration data from the webmaster (you!)'"); // Configuration data for e.g. reload-time addExtensionSql('DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_network_types_config`'); @@ -187,7 +185,7 @@ PRIMARY KEY (`network_id`) `allow_erotic` VARCHAR(10) NOT NULL DEFAULT '', UNIQUE `provider_type` (`network_id`,`network_type_id`), PRIMARY KEY (`network_data_id`) -) TYPE={?_TABLE_TYPE?} COMMENT='Configuration data for every type (e.g. reload-time)'"); +) ENGINE = {?_TABLE_TYPE?} CHARACTER SET utf8 COLLATE utf8_general_ci COMMENT = 'Configuration data for every type (e.g. reload-time)'"); // Cache for queried APIs. Re-check depends on config // `network_cache_refresh` in seconds or if set to zero, full day @@ -198,10 +196,10 @@ PRIMARY KEY (`network_data_id`) `network_id` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, `network_type_id` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, `network_cache_data` MEDIUMBLOB, -`network_cache_timestamp` TIMESTAMP NOT NULL DEFAULT '0000-00-00 00:00', +`network_cache_timestamp` TIMESTAMP NULL DEFAULT NULL, UNIQUE `provider_type` (`network_id`,`network_type_id`), PRIMARY KEY (`network_cache_id`) -) TYPE={?_TABLE_TYPE?} COMMENT='Cache for all queried APIs'"); +) ENGINE = {?_TABLE_TYPE?} CHARACTER SET utf8 COLLATE utf8_general_ci COMMENT = 'Cache for all queried APIs'"); // Reload locks for several types addExtensionSql('DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_network_reloads`'); @@ -213,7 +211,7 @@ PRIMARY KEY (`network_cache_id`) `network_inserted` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, UNIQUE `provider_type` (`network_id`,`network_type_id`), PRIMARY KEY (`network_reload_id`) -) TYPE={?_TABLE_TYPE?} COMMENT='Reload locks'"); +) ENGINE = {?_TABLE_TYPE?} CHARACTER SET utf8 COLLATE utf8_general_ci COMMENT = 'Reload locks'"); // Insert API response array translations, these will be used for calling the right filter function addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_network_translations` (`network_translation_name`) VALUES @@ -299,7 +297,8 @@ PRIMARY KEY (`network_reload_id`) ('doubleads', 'doubleads.de', 'http://www.doubleads.de?ref=1063', '|', '|', 'GET', 'ISO-8859-1'), ('vipads', 'VIPads.de', 'http://vipads.de/index.php?seite=anmeldung&ref=Quix0r', '|', '|', 'GET', 'ISO-8859-1'), ('homeads', 'homeADS', 'http://www.homeads.de/?ref=1540', '|', '|', 'GET', 'WINDOWS-1252'), -('fucoexsponsor', 'FuCoExSponsor.net', 'http://fucoexsponsor.net/index.php?seite=anmeldung&ref=Quix0r', '|', '|', 'GET', 'ISO-8859-1')"); +('fucoexsponsor', 'FuCoExSponsor.net', 'http://fucoexsponsor.net/index.php?seite=anmeldung&ref=Quix0r', '|', '|', 'GET', 'ISO-8859-1'), +('adconvention', 'AdConvention', 'http://www.adconvention.de?ref=233', '|', '|', 'GET', 'WINDOWS-1252')"); // Network type handlers - A3H addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_network_types` (`network_type_id`, `network_id`,`network_type_handle`,`network_type_api_url`,`network_type_click_url`,`network_type_banner_url`) VALUES @@ -340,6 +339,19 @@ PRIMARY KEY (`network_reload_id`) (13, 4, 'forcedbanner', 'http://www.adcocktail.com/sc/kas/kas_fk.php', 'http://fk.adcocktail.com/fk_k.php?uid=%UID%&wid=%CID%&wsid=%SID%', 'http://fk.adcocktail.com/fk_v.php?uid=%UID%&wid=%CID%&wsid=%SID%'), (12, 4, 'textmail', 'http://www.adcocktail.com/sc/kas/kas_pm.php', 'http://pm.adcocktail.com/pm.php?uid=%UID%&wid=%CID%&wsid=%SID%', NULL)"); + // Network type handlers - AdConvention + addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_network_types` (`network_type_id`, `network_id`, `network_type_handle`, `network_type_api_url`, `network_type_click_url`, `network_type_banner_url`) VALUES +(295, 30, 'banner_click', 'http://www.adconvention.de/interface/', 'http://www.adconvention.de/codes/klickbanner.php?id=%UID%&bid=%CID%&aid=%SID%', 'http://www.adconvention.de/codes/viewbanner.php?id=%UID%&bid=%CID%&aid=%SID%'), +(294, 30, 'banner_view', 'http://www.adconvention.de/interface/', 'http://www.adconvention.de/codes/bannerklick.php?id=%UID%&bid=%CID%&aid=%CID%', 'http://www.adconvention.de/codes/bannerview.php?id=%UID%&bid=%CID%&aid=%SID%'), +(297, 30, 'button_view', 'http://www.adconvention.de/interface/', 'http://www.adconvention.de/codes/buttonklick.php?id=%UID%&bid=%CID%&aid=%SID%', 'http://www.adconvention.de/codes/buttonview.php?id=%UID%&bid=%CID%&aid=%SID%'), +(292, 30, 'forcedbanner', 'http://www.adconvention.de/interface/', 'http://www.adconvention.de/codes/forcedbannerklick.php?id=%UID%&bid=%CID%&aid=%SID%', 'http://www.adconvention.de/codes/forcedbannerview.php?id=%UID%&bid=%CID%&aid=%SID%'), +(293, 30, 'forcedtextlink', 'http://www.adconvention.de/interface/', 'http://www.adconvention.de/codes/forcedtextlinkklick.php?id=%UID%&bid=%CID%&aid=%SI%', NULL), +(300, 30, 'popup', 'http://www.adconvention.de/interface/', 'http://www.adconvention.de/codes/popup.php?id=%UID%&bid=%CID%&aid=%SID%', NULL), +(296, 30, 'skybanner_view', 'http://www.adconvention.de/interface/', 'http://www.adconvention.de/codes/skybannerklick.php?id=%UID%&bid=%CID%&aid=%SID%', 'http://www.adconvention.de/codes/skybannerview.php?id=%UID%&bid=%CID%&aid=%SID%'), +(298, 30, 'textlink_view', 'http://www.adconvention.de/interface/', 'http://www.adconvention.de/codes/textlinkview.php?id=%UID%&bid=%CID%&aid=%SID%', NULL), +(301, 30, 'textmail', 'http://www.adconvention.de/interface/', 'http://www.adconvention.de/codes/paidmail.php?id=%UID%&bid=%CID%&aid=%SID%', NULL), +(299, 30, 'traffic', 'http://www.adconvention.de/interface/', 'http://www.adconvention.de/codes/traffic.php?id=%UID%&bid=%CID%&aid=%SID%', NULL)"); + // Network type handlers - AdPaid addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_network_types` (`network_type_id`, `network_id`, `network_type_handle`, `network_type_api_url`, `network_type_click_url`, `network_type_banner_url`) VALUES (177, 5, 'banner', 'http://www.adpaid.de/interface/out_banner.php', 'http://www.adpaid.de/bannerklf.php?id=%CID%', 'http://www.adpaid.de/banner.php?id=%CID%'), @@ -872,6 +884,79 @@ PRIMARY KEY (`network_reload_id`) // Request parameters per type handler - AdCocktail + // Request parameters per type handler - AdConvention + addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_network_request_params` (`network_id`, `network_type_id`, `request_param_key`, `request_param_value`, `request_param_default`) VALUES +(30, 292, 'extra', 'typ', 'forcedbanner'), +(30, 292, 'id', 'id', NULL), +(30, 292, 'minimum_stay', 'ma', NULL), +(30, 292, 'password', 'pw', NULL), +(30, 292, 'reload', 'reload', NULL), +(30, 292, 'remain', 'uebrig', NULL), +(30, 292, 'reward', 'verguetung', NULL), +(30, 293, 'extra', 'typ', 'forcedtextlink'), +(30, 293, 'id', 'id', NULL), +(30, 293, 'minimum_stay', 'ma', NULL), +(30, 293, 'password', 'pw', NULL), +(30, 293, 'reload', 'reload', NULL), +(30, 293, 'remain', 'uebrig', NULL), +(30, 293, 'reward', 'verguetung', NULL), +(30, 294, 'extra', 'typ', 'bannerview'), +(30, 294, 'id', 'id', NULL), +(30, 294, 'minimum_stay', 'ma', NULL), +(30, 294, 'password', 'pw', NULL), +(30, 294, 'reload', 'reload', NULL), +(30, 294, 'remain', 'uebrig', NULL), +(30, 294, 'reward', 'verguetung', NULL), +(30, 295, 'extra', 'typ', 'bannerklick'), +(30, 295, 'id', 'id', NULL), +(30, 295, 'minimum_stay', 'ma', NULL), +(30, 295, 'password', 'pw', NULL), +(30, 295, 'reload', 'reload', NULL), +(30, 295, 'remain', 'uebrig', NULL), +(30, 295, 'reward', 'verguetung', NULL), +(30, 296, 'extra', 'typ', 'skybannerview'), +(30, 296, 'id', 'id', NULL), +(30, 296, 'minimum_stay', 'ma', NULL), +(30, 296, 'password', 'pw', NULL), +(30, 296, 'reload', 'reload', NULL), +(30, 296, 'remain', 'uebrig', NULL), +(30, 296, 'reward', 'verguetung', NULL), +(30, 297, 'extra', 'typ', 'buttonview'), +(30, 297, 'id', 'id', NULL), +(30, 297, 'minimum_stay', 'ma', NULL), +(30, 297, 'password', 'pw', NULL), +(30, 297, 'reload', 'reload', NULL), +(30, 297, 'remain', 'uebrig', NULL), +(30, 297, 'reward', 'verguetung', NULL), +(30, 298, 'extra', 'typ', 'textview'), +(30, 298, 'id', 'id', NULL), +(30, 298, 'minimum_stay', 'ma', NULL), +(30, 298, 'password', 'pw', NULL), +(30, 298, 'reload', 'reload', NULL), +(30, 298, 'remain', 'uebrig', NULL), +(30, 298, 'reward', 'verguetung', NULL), +(30, 299, 'extra', 'typ', 'traffic'), +(30, 299, 'id', 'id', NULL), +(30, 299, 'minimum_stay', 'ma', NULL), +(30, 299, 'password', 'pw', NULL), +(30, 299, 'reload', 'reload', NULL), +(30, 299, 'remain', 'uebrig', NULL), +(30, 299, 'reward', 'verguetung', NULL), +(30, 300, 'extra', 'typ', 'popup'), +(30, 300, 'id', 'id', NULL), +(30, 300, 'minimum_stay', 'ma', NULL), +(30, 300, 'password', 'pw', NULL), +(30, 300, 'reload', 'reload', NULL), +(30, 300, 'remain', 'uebrig', NULL), +(30, 300, 'reward', 'verguetung', NULL), +(30, 301, 'extra', 'typ', 'paidmail'), +(30, 301, 'id', 'id', NULL), +(30, 301, 'minimum_stay', 'ma', NULL), +(30, 301, 'password', 'pw', NULL), +(30, 301, 'reload', 'reload', NULL), +(30, 301, 'remain', 'uebrig', NULL), +(30, 301, 'reward', 'verguetung', NULL)"); + // Request parameters per type handler - AdPaid addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_network_request_params` (`network_id`, `network_type_id`, `request_param_key`, `request_param_value`, `request_param_default`) VALUES (5, 177, 'id', 'id', NULL), @@ -2941,6 +3026,65 @@ PRIMARY KEY (`network_reload_id`) // API array elements - ADCocktail + // API array elements - AdConvention + addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_network_api_translation` (`network_id`, `network_type_id`, `network_api_index`, `sort`) VALUES +(30, 292, 1, 1), +(30, 292, 2, 2), +(30, 292, 4, 3), +(30, 292, 5, 4), +(30, 292, 6, 5), +(30, 292, 10, 6), +(30, 293, 1, 1), +(30, 293, 2, 2), +(30, 293, 4, 3), +(30, 293, 5, 4), +(30, 293, 6, 5), +(30, 293, 10, 6), +(30, 294, 1, 1), +(30, 294, 2, 2), +(30, 294, 4, 3), +(30, 294, 5, 4), +(30, 294, 6, 5), +(30, 295, 1, 1), +(30, 295, 2, 2), +(30, 295, 4, 3), +(30, 295, 5, 4), +(30, 295, 6, 5), +(30, 296, 1, 1), +(30, 296, 2, 2), +(30, 296, 4, 3), +(30, 296, 5, 4), +(30, 296, 6, 5), +(30, 297, 1, 1), +(30, 297, 2, 2), +(30, 297, 4, 3), +(30, 297, 5, 4), +(30, 297, 6, 5), +(30, 298, 1, 1), +(30, 298, 2, 2), +(30, 298, 4, 3), +(30, 298, 5, 4), +(30, 298, 6, 5), +(30, 299, 1, 1), +(30, 299, 2, 2), +(30, 299, 4, 3), +(30, 299, 5, 4), +(30, 299, 6, 5), +(30, 299, 10, 6), +(30, 300, 1, 1), +(30, 300, 2, 2), +(30, 300, 4, 3), +(30, 300, 5, 4), +(30, 300, 6, 5), +(30, 300, 10, 6), +(30, 301, 1, 1), +(30, 301, 2, 2), +(30, 301, 4, 3), +(30, 301, 5, 4), +(30, 301, 6, 5), +(30, 301, 10, 6), +(30, 301, 9, 7)"); + // API array elements - AdPaid addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_network_api_translation` (`network_id`, `network_type_id`, `network_api_index`, `sort`) VALUES (5, 177, 7, 1),