Added ext-signup and ext-shredder from idea pool
authorRoland Häder <roland@mxchange.org>
Thu, 4 Oct 2012 14:44:13 +0000 (14:44 +0000)
committerRoland Häder <roland@mxchange.org>
Thu, 4 Oct 2012 14:44:13 +0000 (14:44 +0000)
.gitattributes
inc/extensions/ext-shredder.php [new file with mode: 0644]
inc/extensions/ext-signup.php [new file with mode: 0644]
templates/de/html/ext/ext_shredder.tpl [new file with mode: 0644]
templates/de/html/ext/ext_signup.tpl [new file with mode: 0644]

index 3caecbf54c89715c5a79b0257c62f742b349f06e..81b0cd72bfed6240ef3b81dc9a6bc31335959915 100644 (file)
@@ -200,6 +200,8 @@ inc/extensions/ext-report.php svneol=native#text/plain
 inc/extensions/ext-rewrite.php svneol=native#text/plain
 inc/extensions/ext-safe.php svneol=native#text/plain
 inc/extensions/ext-seo.php svneol=native#text/plain
+inc/extensions/ext-shredder.php svneol=native#text/plain
+inc/extensions/ext-signup.php svneol=native#text/plain
 inc/extensions/ext-sponsor.php svneol=native#text/plain
 inc/extensions/ext-sql_patches.php svneol=native#text/plain
 inc/extensions/ext-support.php svneol=native#text/plain
@@ -1747,6 +1749,8 @@ templates/de/html/ext/ext_report.tpl svneol=native#text/plain
 templates/de/html/ext/ext_rewrite.tpl svneol=native#text/plain
 templates/de/html/ext/ext_safe.tpl svneol=native#text/plain
 templates/de/html/ext/ext_seo.tpl svneol=native#text/plain
+templates/de/html/ext/ext_shredder.tpl svneol=native#text/plain
+templates/de/html/ext/ext_signup.tpl svneol=native#text/plain
 templates/de/html/ext/ext_sponsor.tpl svneol=native#text/plain
 templates/de/html/ext/ext_sql_patches.tpl svneol=native#text/plain
 templates/de/html/ext/ext_support.tpl svneol=native#text/plain
diff --git a/inc/extensions/ext-shredder.php b/inc/extensions/ext-shredder.php
new file mode 100644 (file)
index 0000000..56d867e
--- /dev/null
@@ -0,0 +1,101 @@
+<?php
+/************************************************************************
+ * Mailer-Project 0.2.1-FINAL                         Start: 01/01/2005 *
+ * ==========================                   Last change: 01/01/2005 *
+ *                                                                      *
+ * -------------------------------------------------------------------- *
+ * File              : ext-shredder.php                                 *
+ * -------------------------------------------------------------------- *
+ * Short description : Points can be shreddered                         *
+ * -------------------------------------------------------------------- *
+ * Kurzbeschreibung  : Punkte koennen geschreddert werden               *
+ * -------------------------------------------------------------------- *
+ *                                                                      *
+ * -------------------------------------------------------------------- *
+ * $Revision::                                                        $ *
+ * $Date::                                                            $ *
+ * $Tag:: 0.2.1-FINAL                                                 $ *
+ * $Author::                                                          $ *
+ * -------------------------------------------------------------------- *
+ * Copyright (c) 2003 - 2009 by Roland Haeder                           *
+ * 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 *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or    *
+ * (at your option) any later version.                                  *
+ *                                                                      *
+ * This program is distributed in the hope that it will be useful,      *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of       *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the        *
+ * GNU General Public License for more details.                         *
+ *                                                                      *
+ * You should have received a copy of the GNU General Public License    *
+ * along with this program; if not, write to the Free Software          *
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,               *
+ * MA  02110-1301  USA                                                  *
+ ************************************************************************/
+
+// Some security stuff...
+if (!defined('__SECURITY')) {
+       exit();
+} // END - if
+
+// Version number
+setThisExtensionVersion('0.0.0');
+
+// Version history array (add more with , '0.1' and so on)
+setExtensionVersionHistory(array('0.0.0'));
+
+// This extension is in development (non-productive)
+enableExtensionProductive(false);
+
+switch (getExtensionMode()) {
+       case 'register': // Do stuff when installtion is running
+               // SQL commands to run
+               addExtensionSql('');
+               break;
+
+       case 'remove': // Do stuff when removing extension
+               // SQL commands to run
+               addExtensionSql('');
+               break;
+
+       case 'activate': // Do stuff when admin activates this extension
+               // SQL commands to run
+               addExtensionSql('');
+               break;
+
+       case 'deactivate': // Do stuff when admin deactivates this extension
+               // SQL commands to run
+               addExtensionSql('');
+               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;
+               } // END - switch
+               break;
+
+       case 'modify': // When the extension got modified
+               break;
+
+       case 'test': // For testing purposes
+               break;
+
+       case 'init': // Do stuff when extension is initialized
+               break;
+
+       default: // Unknown extension mode
+               logDebugMessage(__FILE__, __LINE__, sprintf("Unknown extension mode %s in extension %s detected.", getExtensionMode(), getCurrentExtensionName()));
+               break;
+} // END - switch
+
+// [EOF]
+?>
diff --git a/inc/extensions/ext-signup.php b/inc/extensions/ext-signup.php
new file mode 100644 (file)
index 0000000..71f6c24
--- /dev/null
@@ -0,0 +1,176 @@
+<?php
+/************************************************************************
+ * Mailer-Project 0.2.1-FINAL                         Start: 03/22/2004 *
+ * ==========================                   Last change: 06/28/2004 *
+ *                                                                      *
+ * -------------------------------------------------------------------- *
+ * File              : ext-signup.php                                   *
+ * -------------------------------------------------------------------- *
+ * Short description : SignUp Campaignes                                *
+ * -------------------------------------------------------------------- *
+ * Kurzbeschreibung  : SignUp-Kampagnen                                 *
+ * -------------------------------------------------------------------- *
+ *                                                                      *
+ * -------------------------------------------------------------------- *
+ * $Revision::                                                        $ *
+ * $Date::                                                            $ *
+ * $Tag:: 0.2.1-FINAL                                                 $ *
+ * $Author::                                                          $ *
+ * -------------------------------------------------------------------- *
+ * Copyright (c) 2003 - 2009 by Roland Haeder                           *
+ * 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 *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or    *
+ * (at your option) any later version.                                  *
+ *                                                                      *
+ * This program is distributed in the hope that it will be useful,      *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of       *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the        *
+ * GNU General Public License for more details.                         *
+ *                                                                      *
+ * You should have received a copy of the GNU General Public License    *
+ * along with this program; if not, write to the Free Software          *
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,               *
+ * MA  02110-1301  USA                                                  *
+ ************************************************************************/
+
+// Some security stuff...
+if (!defined('__SECURITY')) {
+       exit();
+} // END - if
+
+// Version number
+setThisExtensionVersion('0.0.0');
+
+// Version history array (add more with , '0.1' and so on)
+setExtensionVersionHistory(array('0.0.0'));
+
+// This extension is in development (non-productive)
+enableExtensionProductive(false);
+
+switch (getExtensionMode()) {
+       case 'register': // Do stuff when installtion is running
+               // Add dependeny on 'sponsor'
+               addExtensionDependency('sponsor');
+
+               // SignUp data
+               addDropTableSql('signup_data');
+               addCreateTableSql('signup_data', "
+`signup_id` BIGINT (20) UNSIGNED NOT NULL AUTO_INCREMENT,
+`signup_sponsor_id` BIGINT (20) UNSIGNED NOT NULL,
+`signup_title` VARCHAR (255) NOT NULL DEFAULT '',
+`signup_text` LONGTEXT,
+`signup_welcome_text` TINYTEXT,
+`signup_question` VARCHAR (255) NOT NULL DEFAULT '',
+`signup_url` VARCHAR (255) NOT NULL DEFAULT '',
+`signup_banner` VARCHAR (255) NOT NULL DEFAULT '',
+`signup_bonus` FLOAT (20,5) UNSIGNED NOT NULL DEFAULT 0.00000,
+`signup_start` TIMESTAMP NOT NULL DEFAULT '0000-00-00 00:00:00',
+`signup_end` TIMESTAMP NOT NULL DEFAULT '0000-00-00 00:00:00',
+`signup_expiration` TIMESTAMP NULL DEFAULT NULL,
+`signup_amount` BIGINT (20) UNSIGNED NOT NULL DEFAULT 0,
+`signup_counter` BIGINT (20) UNSIGNED NOT NULL DEFAULT 0,
+`signup_points` FLOAT (20,5) UNSIGNED NOT NULL DEFAULT 0.00000,
+`signup_active` ENUM('Y','N') NOT NULL DEFAULT 'N',
+`signup_warn_expire` ENUM('Y','N') NOT NULL DEFAULT 'Y',
+`signup_warn_amount` BIGINT (20) UNSIGNED NOT NULL DEFAULT 0,
+`signup_warn_interval` BIGINT (20) UNSIGNED NOT NULL DEFAULT {%pipe,getOneDay%},
+`signup_status` ENUM('PENDING','APPROVED','LOCKED','DELETED') NOT NULL DEFAULT 'PENDING',
+`signup_clicks` BIGINT (20) UNSIGNED NOT NULL DEFAULT 0,
+`signup_views` BIGINT (20) UNSIGNED NOT NULL DEFAULT 0,
+INDEX (`signup_sponsor_id`),
+PRIMARY KEY (`signup_id`)",
+                       'General sign-up data');
+
+               // Users entered words
+               addDropTableSql('signup_user_data');
+               addCreateTableSql('signup_user_data', "
+`id` BIGINT (20) UNSIGNED NOT NULL AUTO_INCREMENT,
+`signup_id` BIGINT (20) UNSIGNED NOT NULL DEFAULT 0,
+`signup_userid` BIGINT (20) UNSIGNED NOT NULL DEFAULT 0,
+`signup_bonus` FLOAT (20,5) UNSIGNED NOT NULL DEFAULT 0.00000,
+`signup_word` VARCHAR (255) NOT NULL DEFAULT '',
+`signup_added` TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP,
+`signup_status` ENUM('PENDING','APPROVED','DECLINED') NOT NULL DEFAULT 'PENDING',
+UNIQUE `signup_user` (`signup_id`, `signup_userid`),
+PRIMARY KEY (`id`)",
+                       'Sign-up -> user connection table');
+
+               // Admin menu
+               addAdminMenuSql('signup', NULL, 'SignUp-Aktionen', 'Richten Sie hier SignUp-Aktionen ein oder schalten Sie welche von Ihren Sponsoren frei.', 5);
+               addAdminMenuSql('signup', 'add_signup', 'Hinzuf&uuml;gen', 'Neue SignUp-Aktion einrichten.', 1);
+               addAdminMenuSql('signup', 'unlock_signup', 'SignUps freigeben', 'Freigeben von Sponsoren-Accounts und deren angemeldete SignUp-Aktionen.', 2);
+               addAdminMenuSql('signup', 'list_signup', 'Auflisten', 'Alle SignUp-Aktionen auflisten, &auml;dern, l&ouml;schen und eine einfache Statistik dazu anzeigen.', 3);
+
+               // Guest menu
+               addGuestMenuSql('main', 'signup', 'SignUp-Aktionen', 'N', 'Y', 7);
+
+               // Member menu
+               addMemberMenuSql('main', 'signup', 'SignUp-Aktionen', 'N', 'Y', 7);
+
+               // Add entry to sponsor registry
+               addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_sponsor_registry` (`ext_name`, `is_active`, `admin_id`, `stamp_added`) VALUES ('signup', 'N', '".GET_ADMIN_ID($_COOKIE['admin_login'])."', '".time()."')");
+
+               // Sponsor menu
+               addSponsorMenuSql('actions', 'signup', 'SignUp-Aktion', 'N', 2);
+               break;
+
+       case 'remove': // Do stuff when removing extension
+               // Remove tables
+               addDropTableSql('signup_data');
+               addDropTableSql('signup_user_data');
+
+               // Remove menu entries
+               addExtensionSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_admin_menu` WHERE `action`='signup' LIMIT 4");
+               addExtensionSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_guest_menu` WHERE `what`='signup' LIMIT 1");
+               addExtensionSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_member_menu` WHERE `what`='signup' LIMIT 1");
+
+               // Add entry for registry removal
+               addExtensionSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_sponsor_registry` WHERE `ext_name`='signup' LIMIT 1");
+
+               // ... and entry from sponsor menu
+               addExtensionSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_sponsor_menu` WHERE `what`='signup' LIMIT 1");
+               break;
+
+       case 'activate': // Do stuff when admin activates this extension
+               // SQL commands to run
+               addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_guest_menu` SET `locked`='N', visible='Y' WHERE `action`='signup' OR `what`='signup' LIMIT 4");
+               addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_member_menu` SET `locked`='N', visible='Y' WHERE `what`='signup' LIMIT 1");
+               break;
+
+       case 'deactivate': // Do stuff when admin deactivates this extension
+               // SQL commands to run
+               addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_guest_menu` SET `locked`='Y', visible='N' WHERE `action`='signup' OR `what`='signup' LIMIT 4");
+               addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_member_menu` SET `locked`='Y', visible='N' WHERE `what`='signup' LIMIT 1");
+               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;
+               } // END - switch
+               break;
+
+       case 'modify': // When the extension got modified
+               break;
+
+       case 'test': // For testing purposes
+               break;
+
+       case 'init': // Do stuff when extension is initialized
+               break;
+
+       default: // Unknown extension mode
+               logDebugMessage(__FILE__, __LINE__, sprintf("Unknown extension mode %s in extension %s detected.", getExtensionMode(), getCurrentExtensionName()));
+               break;
+} // END - switch
+
+// [EOF]
+?>
diff --git a/templates/de/html/ext/ext_shredder.tpl b/templates/de/html/ext/ext_shredder.tpl
new file mode 100644 (file)
index 0000000..1a59956
--- /dev/null
@@ -0,0 +1,12 @@
+<div class="para">
+       Lassen Sie Ihre Mitglied ihre {?POINTS?} zu einem guten Zweck vernichten
+       (&quot;schreddern&quot;). Dabei k&ouml;nnen die Mitglieder einen kleinen
+       Text eingeben, der auch sp&auml;ter in allen Men&uuml;systemen (nicht
+       Sponsor) sichtbar ist.
+</div>
+
+<div class="para">
+       N&uuml;tzlich ist diese Erweiterung zum Beispiel dann, wenn der {?MT_WORD?}
+       als nicht-profitorientiert l&auml;uft und wo das Mitglied seine
+       T&auml;tigkeit als &quot;Spende&quot; einbringen kann.
+</div>
diff --git a/templates/de/html/ext/ext_signup.tpl b/templates/de/html/ext/ext_signup.tpl
new file mode 100644 (file)
index 0000000..584fda6
--- /dev/null
@@ -0,0 +1,23 @@
+<div align="para">
+       Richten Sie mit dieser Erweiterung so genannte SignUp-Aktionen (<em>sign
+       up</em>, zu Deutsch: Anmeldung) ein, oder lassen Sie Ihre Sponsoren
+       einrichten. Signup-Aktionen sind auch als &quot;Bonusaktionen&qupt;
+       bekannt. Dabei k&ouml;nnen Sie entweder die vorgegebenen {?POINTS?} - oder
+       was Sie auch immer vergeben m&ouml;chten - als Anmeldebonus an Ihre
+       Mitglieder verg&uuml;ten.
+</div>
+
+<div align="para">
+       Als Administrator und Sponsor erhalten Sie f&uuml;r jede Anmeldung der
+       Mitglieder Mails zugesandt. Sie k&ouml;nnen dann im Adminbereich die
+       Anmeldung nach &Uuml;berpr&uuml;fung annehmen oder ablehnen und einen
+       Ablehngrund dabei angeben. Ist die Verg&uuml;tung auf {?POINTS?}
+       eingestellt, werden dem Mitglied die {?POINTS?} bei Annahme
+       verg&uuml;tet.
+</div>
+
+<div align="para">
+       Sowohl Sponsoren als auch Administratoren k&ouml;nnen beim Einrichten einer
+       SignUp-Aktion einen kurzen Willkommenstext eingeben, der dann dem Mitglied
+       mit der Annahme zusammen zugeschickt wird.
+</div>