From c819b98b236c15ad0b46fc296d9a0e2c1617fee9 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Mon, 9 Nov 2009 04:30:12 +0000 Subject: [PATCH] Login bonus fixed, template fixed, referenced to paidlinks removed: - The login bonus was given even when the 'active rallye' is disabled - Template member_doubler.tpl fixed - References of ext-paidlinks (deprecated) removed, ext-sponsor - TODOs.txt updated --- DOCS/TODOs.txt | 1 - inc/extensions/ext-bonus.php | 72 ++++++++++----------- inc/modules/chk_login.php | 2 +- templates/de/html/member/member_doubler.tpl | 26 +++----- 4 files changed, 46 insertions(+), 55 deletions(-) diff --git a/DOCS/TODOs.txt b/DOCS/TODOs.txt index 4bd1bbb08e..102b463296 100644 --- a/DOCS/TODOs.txt +++ b/DOCS/TODOs.txt @@ -211,7 +211,6 @@ Warning: DOMDocument::loadHTMLFile(): Unexpected end tag : tr in templates/de/ht Warning: DOMDocument::loadHTMLFile(): Unexpected end tag : td in templates/de/html/member/member_welcome_footer.tpl, line: 1 in Warning: DOMDocument::loadHTMLFile(): Unexpected end tag : tr in templates/de/html/member/member_welcome_footer.tpl, line: 2 in Warning: DOMDocument::loadHTMLFile(): Unexpected end tag : table in templates/de/html/member/member_welcome_footer.tpl, line: 3 in -Warning: DOMDocument::loadHTMLFile(): Unexpected end tag : div in templates/de/html/member/member_doubler.tpl, line: 56 in Warning: DOMDocument::loadHTMLFile(): Unexpected end tag : table in templates/de/html/member/member_footer.tpl, line: 6 in Warning: DOMDocument::loadHTMLFile(): Document is empty in templates/de/html/header.tpl, line: 1 in /home Warning: DOMDocument::loadHTMLFile(): Unexpected end tag : div in templates/de/html/page_footer.tpl, line: 1 in /home diff --git a/inc/extensions/ext-bonus.php b/inc/extensions/ext-bonus.php index 3271dd23d9..65ed3f3cde 100644 --- a/inc/extensions/ext-bonus.php +++ b/inc/extensions/ext-bonus.php @@ -54,22 +54,22 @@ switch (getExtensionMode()) { addMemberMenuSql('main','bonus','Bonuspunkte','N','Y',7); addExtensionSql("DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_bonus`"); addExtensionSql("CREATE TABLE `{?_MYSQL_PREFIX?}_bonus` ( -id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT, -cat_id BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, -subject VARCHAR(255) NOT NULL DEFAULT '', -text LONGTEXT NOT NULL, -receivers LONGTEXT NOT NULL, -points BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, -time TINYINT(3) UNSIGNED NOT NULL DEFAULT 0, -data_type ENUM('NEW','QUEUE','SEND') NOT NULL DEFAULT 'NEW', -timestamp VARCHAR(10) NOT NULL DEFAULT 0, -url VARCHAR(255) NOT NULL DEFAULT '', -target_send BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, -clicks BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, -mails_sent BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, -KEY (cat_id), -PRIMARY KEY (id) -)TYPE={?_TABLE_TYPE?}"); +`id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT, +`cat_id` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, +`subject` VARCHAR(255) NOT NULL DEFAULT '', +`text` LONGTEXT NOT NULL, +`receivers` LONGTEXT NOT NULL, +`points` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, +`time` TINYINT(3) UNSIGNED NOT NULL DEFAULT 0, +`data_type` ENUM('NEW','QUEUE','SEND') NOT NULL DEFAULT 'NEW', +`timestamp` VARCHAR(10) NOT NULL DEFAULT 0, +`url` VARCHAR(255) NOT NULL DEFAULT '', +`target_send` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, +`clicks` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, +`mails_sent` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, +KEY (`cat_id`), +PRIMARY KEY (`id`) +)TYPE={?_TABLE_TYPE?} COMMENT='Bonus mails'"); addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_user_links` MODIFY `link_type` ENUM('NORMAL','BONUS') NOT NULL DEFAULT 'NORMAL'"); addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_user_links` ADD `bonus_id` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0"); addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_user_links` ADD INDEX (`bonus_id`)"); @@ -107,7 +107,7 @@ PRIMARY KEY (id) switch (getCurrentExtensionVersion()) { case '0.1.6': // SQL queries for v0.1.6 // Update notes (these will be set as task text!) - setExtensionUpdateNotes("Paid-Links wurden verschoben in die Erweiterung paidlinks."); + setExtensionUpdateNotes("Paid-Links wurden verschoben in die Erweiterung sponsor."); break; case '0.2.0': // SQL queries for v0.2.0 @@ -135,17 +135,17 @@ PRIMARY KEY (id) case '0.2.2': // SQL queries for v0.2.2 addExtensionSql("DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_bonus_turbo`"); addExtensionSql("CREATE TABLE `{?_MYSQL_PREFIX?}_bonus_turbo` ( -id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT, -userid BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, -mail_id BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, -bonus_id BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, -level BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, -points FLOAT(20,3) NOT NULL DEFAULT '0.000', -timemark VARCHAR(32) NOT NULL DEFAULT 0, -PRIMARY KEY (id), -KEY mail_id (mail_id), -KEY bonus_id (bonus_id), -KEY userid (userid) +`id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT, +`userid` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, +`mail_id` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, +`bonus_id` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, +`level` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, +`points` FLOAT(20,3) NOT NULL DEFAULT '0.000', +`timemark` VARCHAR(32) NOT NULL DEFAULT 0, +PRIMARY KEY (`id`), +INDEX `mail_id` (`mail_id`), +INDEX `bonus_id` (`bonus_id`), +INDEX `userid` (`userid`) ) TYPE={?_TABLE_TYPE?}"); // Update notes (these will be set as task text!) @@ -170,7 +170,7 @@ KEY userid (userid) addExtensionSql("DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_bonus_customer`"); // Update notes (these will be set as task text!) - setExtensionUpdateNotes("Tabellen {?_MYSQL_PREFIX?}_bonus_urls und {?_MYSQL_PREFIX?}_bonus_customer entfernt, da dies bald von der Erweiterung paidlinks erledigt wird."); + setExtensionUpdateNotes("Tabellen {?_MYSQL_PREFIX?}_bonus_urls und {?_MYSQL_PREFIX?}_bonus_customer entfernt, da dies bald von der Erweiterung sponsor erledigt wird."); break; case '0.2.6': // SQL queries for v0.2.6 @@ -184,12 +184,12 @@ KEY userid (userid) break; case '0.2.8': // SQL queries for v0.2.8 - addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_bonus` SET timestamp=0 WHERE timestamp='0000000000'"); - addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_bonus_turbo` CHANGE points points FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000"); - addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` CHANGE turbo_bonus turbo_bonus FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000"); - addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` CHANGE login_bonus login_bonus FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000"); - addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_user_data` CHANGE turbo_bonus turbo_bonus FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000"); - addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_user_data` CHANGE login_bonus login_bonus FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000"); + addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_bonus` SET `timestamp`=0 WHERE `timestamp`='0000000000'"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_bonus_turbo` CHANGE `points` `points` FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` CHANGE `turbo_bonus` `turbo_bonus` FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` CHANGE `login_bonus` `login_bonus` FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_user_data` CHANGE `turbo_bonus` `turbo_bonus` FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_user_data` CHANGE `login_bonus` `login_bonus` FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000"); // Update notes (these will be set as task text!) setExtensionUpdateNotes("5 Nachkommastellen implementiert"); @@ -302,7 +302,7 @@ KEY userid (userid) break; case '0.4.7': // SQL queries for v0.4.7 - addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_user_data` SET login_bonus=0, turbo_bonus=0,bonus_ref=0,bonus_order=0,bonus_stats=0"); + addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_user_data` SET `login_bonus`=0, `turbo_bonus`=0, `bonus_ref`=0, `bonus_order`=0, `bonus_stats`=0"); // Update notes (these will be set as task text!) setExtensionUpdateNotes("Die Aktiv-Rallye wurde nicht auf 0 {?POINTS?} gesetzt. Dieser Fehler ist nun behoben. Allerdings ist mit diesem Update auch die Aktiv-Rallye zurückgesetzt worden."); diff --git a/inc/modules/chk_login.php b/inc/modules/chk_login.php index 87d743e3f1..216166dc99 100644 --- a/inc/modules/chk_login.php +++ b/inc/modules/chk_login.php @@ -81,7 +81,7 @@ LIMIT 1", // Bonus is not given by default ;-) $bonus = false; - if ((getExtensionVersion('sql_patches') >= '0.2.8') && (getExtensionVersion('bonus') >= '0.2.1') && (getConfig('bonus_login_yn') == 'Y')) { + if ((isExtensionInstalledAndNewer('sql_patches', '0.2.8')) && (isExtensionInstalledAndNewer('bonus', '0.2.1')) && (getConfig('bonus_active') == 'Y') && (getConfig('bonus_login_yn') == 'Y')) { // Update last login if far enougth away SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_user_data` diff --git a/templates/de/html/member/member_doubler.tpl b/templates/de/html/member/member_doubler.tpl index 82ba5d33ca..ce5d4be525 100644 --- a/templates/de/html/member/member_doubler.tpl +++ b/templates/de/html/member/member_doubler.tpl @@ -1,25 +1,19 @@
{--DOUBLER_MEMBER_YOUR_LINK--}:
- {?URL?}/doubler.php?refid=$content[userid]
-
- Tipp: Nutzen Sie diesen zum Werben unseres {?mt_word2?}, um die $content[refid]% Referal-Vergütung zu erhalten! -
+
+ {?URL?}/doubler.php?refid=$content[userid] +
+
+ Tipp: Nutzen Sie diesen zum Werben unseres {?mt_word2?}, um die $content[refid]% Referal-Vergütung zu erhalten! +
-
-
{--DOUBLER_MEMBER_ALREADY_PAYOUT--}:

-
+
{--DOUBLER_MEMBER_ALREADY_PAYOUT--}:
$content[payout_history] -
-
-
{--DOUBLER_MEMBER_NEXT_PAYOUT--}:

-
+
{--DOUBLER_MEMBER_NEXT_PAYOUT--}:
$content[next_table] -
-
-
{--DOUBLER_MEMBER_REF_PAYOUT--}:

-
+
{--DOUBLER_MEMBER_REF_PAYOUT--}:
$content[payout_ref]
@@ -51,6 +45,4 @@ {--DOUBLER_YOUR_ADVERTISING_HERE--} {--DOUBLER_CONTACT_US--} - -- 2.39.5