From: Roland Häder Date: Sat, 6 Aug 2011 22:05:37 +0000 (+0000) Subject: Extension ext-forced continued: X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=59db3a67b3cf68aaad36a9a68196c5634066ab6d;p=mailer.git Extension ext-forced continued: - Added missing XML templates for campaigns and costs - Added missing what-list_forced_costs.php (stub) - Added missing language strings for missing entries message - Renamed table column to naming convention - TODOs.txt updated --- diff --git a/.gitattributes b/.gitattributes index 60f5bfe0fc..d9eb29067c 100644 --- a/.gitattributes +++ b/.gitattributes @@ -534,6 +534,7 @@ inc/modules/admin/what-list_doubler.php svneol=native#text/plain inc/modules/admin/what-list_email_max_rec.php svneol=native#text/plain inc/modules/admin/what-list_forced_ads.php svneol=native#text/plain inc/modules/admin/what-list_forced_campaigns.php svneol=native#text/plain +inc/modules/admin/what-list_forced_costs.php svneol=native#text/plain inc/modules/admin/what-list_holiday.php svneol=native#text/plain inc/modules/admin/what-list_links.php svneol=native#text/plain inc/modules/admin/what-list_network_api_translation.php svneol=native#text/plain diff --git a/DOCS/TODOs.txt b/DOCS/TODOs.txt index 2d2002df6d..b4bd19d231 100644 --- a/DOCS/TODOs.txt +++ b/DOCS/TODOs.txt @@ -45,6 +45,7 @@ ./inc/extensions-functions.php:562: // @TODO Extension is loaded, what next? ./inc/filter/bonus_filter.php:56: // @TODO This query isn't right, it will only update if the user was for a longer time away! ./inc/filter/cache_filter.php:92: // @TODO This should be rewritten not to load the cache file for just checking if it is there for save removal. +./inc/filter/forced_filter.php:73: // @TODO This part is unfinished ./inc/functions.php:1222: // @TODO Move this SQL code into a function, let's say 'getTimestampFromPoolId($id) ? ./inc/functions.php:1310: // @TODO Are these convertions still required? ./inc/functions.php:1330:// @TODO Rewrite this function to use readFromFile() and writeToFile() @@ -185,6 +186,7 @@ ./inc/template-functions.php:273: // @TODO Remove this sanity-check if all is fine ./inc/template-functions.php:596:// @TODO $simple/$constants are deprecated ./inc/wrapper-functions.php:512:// @TODO Do some more sanity check here +./inc/xml-functions.php:189: // @TODO Handle characters ./mailid.php:139: // @TODO Rewrite this to a filter ./mailid.php:96: // @TODO Rewrite this to a filter ./mailid_top.php:105: // @TODO Rewrite this to a filter diff --git a/inc/extensions/ext-forced.php b/inc/extensions/ext-forced.php index 1c8c17f759..8981f447ab 100644 --- a/inc/extensions/ext-forced.php +++ b/inc/extensions/ext-forced.php @@ -78,8 +78,8 @@ PRIMARY KEY (`forced_ads_id`)", `forced_campaign_id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT, `forced_campaign_created` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, `forced_campaign_status` ENUM('ACTIVE','PENDING','EXPIRED','LOCKED') NOT NULL DEFAULT 'PENDING', +`forced_campaign_last_locked` TIMESTAMP NULL DEFAULT NULL, `forced_campaign_lock_reason` VARCHAR(255) NULL DEFAULT NULL, -`forced_campaign_lock_timetstamp` TIMESTAMP NULL DEFAULT NULL, `forced_campaign_expired` TIMESTAMP NULL DEFAULT NULL, `forced_campaign_ordered_clicks` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, `forced_campaign_payment_api` FLOAT(20,5) UNSIGNED NULL DEFAULT NULL, diff --git a/inc/language/forced_de.php b/inc/language/forced_de.php index 09cf5c39e0..dee391ec06 100644 --- a/inc/language/forced_de.php +++ b/inc/language/forced_de.php @@ -42,6 +42,7 @@ if (!defined('__SECURITY')) { // Language definitions addMessages(array( + // Admin - forced ads 'ADMIN_FORCED_ADS_404' => "Es wurden keine Forced-Werbemittel gefunden.", 'ADMIN_ADD_FORCED_AD_TITLE' => "Hinzufügen eines Forced-Werbemittels:", 'ADMIN_ADD_FORCED_ADD_SUBMIT' => "Forced-Werbemittel hinzufügen", @@ -67,6 +68,12 @@ addMessages(array( 'ADMIN_FORCED_ADS_HAS_FRAMEBREAKER' => "Framekiller?", 'ADMIN_FORCED_ADS_ADDED' => "Hinzugefügt", + // Admin - forced campaigns + 'ADMIN_FORCED_CAMPAIGNS_404' => "Es wurde keine Forced-Kampagnen gefunden.", + + // Admin - forced costs + 'ADMIN_FORCED_COSTS_404' => "Es wurden keine Forced-Kosten gefunden.", + // Earning names 'EARNING_PROVIDER_FORCED_POPUP' => "Forced-PopUp", )); diff --git a/inc/modules/admin/what-list_forced_campaigns.php b/inc/modules/admin/what-list_forced_campaigns.php index 4656edd2a1..fd4b45d7e3 100644 --- a/inc/modules/admin/what-list_forced_campaigns.php +++ b/inc/modules/admin/what-list_forced_campaigns.php @@ -6,9 +6,9 @@ * -------------------------------------------------------------------- * * File : what-list_forced_campaigns.php * * -------------------------------------------------------------------- * - * Short description : List/add Forced-Ads * + * Short description : List/add forced campaigns * * -------------------------------------------------------------------- * - * Kurzbeschreibung : Auflisten/Hinzufuegen von Forced-Werbemitteln * + * Kurzbeschreibung : Auflisten/Hinzufuegen von Forced-Kampagnen * * -------------------------------------------------------------------- * * $Revision:: $ * * $Date:: $ * diff --git a/inc/modules/admin/what-list_forced_costs.php b/inc/modules/admin/what-list_forced_costs.php new file mode 100644 index 0000000000..c7d63409fe --- /dev/null +++ b/inc/modules/admin/what-list_forced_costs.php @@ -0,0 +1,95 @@ + 0) && ((!isPostRequestElementSet('forced_costs_id')) || (!is_array(postRequestElement('forced_costs_id'))) || (count(postRequestElement('forced_costs_id')) == 0))) { + // Not found so output message + displayMessage('{--ADMIN_FORCED_COSTS_NO_SELECTIONS--}'); + + // Abort here + return; +} // END - if + +// Edit or delete button hit? +if (isFormSent('add')) { + // Add new forced ad + showEntriesByXmlCallback('admin_add_do_forced_costs'); +} elseif (isFormSent('edit')) { + // Show entries for editing + showEntriesByXmlCallback('admin_edit_show_forced_costs'); + + // Do not show the list of URLs after this template + $show = false; +} elseif (isFormSent('do_edit')) { + // Change data of entries + showEntriesByXmlCallback('admin_edit_do_forced_costs'); +} elseif (isFormSent('delete')) { + // Show entries for deletion + showEntriesByXmlCallback('admin_delete_show_forced_costs'); + + // Do not show the list of URLs after this template + $show = false; +} elseif (isFormSent('do_delete')) { + // Remove entries from database + showEntriesByXmlCallback('admin_delete_do_forced_costs'); +} + +// Show entries? +if ($show === false) { + // No, a form has already been show + return false; +} // END - if + +// List all URLs +showEntriesByXmlCallback('admin_list_forced_costs'); + +// Display form for adding a forced-ad +loadTemplate('admin_add_forced_costs'); + +// [EOF] +?> diff --git a/templates/xml/admin/admin_list_forced_campaigns.xml b/templates/xml/admin/admin_list_forced_campaigns.xml new file mode 100644 index 0000000000..ce359ce5ad --- /dev/null +++ b/templates/xml/admin/admin_list_forced_campaigns.xml @@ -0,0 +1,137 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/templates/xml/admin/admin_list_forced_costs.xml b/templates/xml/admin/admin_list_forced_costs.xml new file mode 100644 index 0000000000..d32609a7b1 --- /dev/null +++ b/templates/xml/admin/admin_list_forced_costs.xml @@ -0,0 +1,94 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +