2 /************************************************************************
3 * Mailer v0.2.1-FINAL Start: 09/19/2004 *
4 * =================== Last change: 10/29/2004 *
6 * -------------------------------------------------------------------- *
7 * File : ext-other.php *
8 * -------------------------------------------------------------------- *
9 * Short description : Other administrative settings *
10 * -------------------------------------------------------------------- *
11 * Kurzbeschreibung : Weitere administrative Einstellungen *
12 * -------------------------------------------------------------------- *
15 * $Tag:: 0.2.1-FINAL $ *
17 * Needs to be in all Files and every File needs "svn propset *
18 * svn:keywords Date Revision" (autoprobset!) at least!!!!!! *
19 * -------------------------------------------------------------------- *
20 * Copyright (c) 2003 - 2009 by Roland Haeder *
21 * Copyright (c) 2009, 2010 by Mailer Developer Team *
22 * For more information visit: http://www.mxchange.org *
24 * This program is free software; you can redistribute it and/or modify *
25 * it under the terms of the GNU General Public License as published by *
26 * the Free Software Foundation; either version 2 of the License, or *
27 * (at your option) any later version. *
29 * This program is distributed in the hope that it will be useful, *
30 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
31 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
32 * GNU General Public License for more details. *
34 * You should have received a copy of the GNU General Public License *
35 * along with this program; if not, write to the Free Software *
36 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, *
38 ************************************************************************/
40 // Some security stuff...
41 if (!defined('__SECURITY')) {
46 setThisExtensionVersion('0.2.5');
48 // Version history array (add more with , '0.1.0' and so on)
49 setExtensionVersionHistory(array('0.0', '0.0.1', '0.0.2', '0.0.3', '0.0.4', '0.0.5', '0.0.6', '0.0.7', '0.0.8', '0.0.9', '0.1.0', '0.1.1', '0.1.2', '0.1.3', '0.1.4', '0.1.5', '0.1.6', '0.1.7', '0.1.8', '0.1.9', '0.2.0', '0.2.1', '0.2.2', '0.2.3', '0.2.4', '0.2.5'));
51 // Keep this extension always active!
52 setExtensionAlwaysActive('Y');
54 switch (getExtensionMode()) {
55 case 'register': // Do stuff when installation is running (modules.php?module=admin is called)
56 // SQL commands to run
57 addAdminMenuSql('setup','config_other','Sonstige Einstellungen','Sonstige Einstellungen an Ihrem {?mt_word?}.',13);
60 case 'remove': // Do stuff when removing extension
61 // SQL commands to run
62 addExtensionSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_admin_menu` WHERE `what`='config_other'");
65 unregisterFilter('page_footer', 'DISPLAY_DEBUG_SQL', true, getExtensionDryRun());
68 case 'activate': // Do stuff when admin activates this extension
69 // SQL commands to run
73 case 'deactivate': // Do stuff when admin deactivates this extension
74 // SQL commands to run
78 case 'update': // Update an extension
79 switch (getCurrentExtensionVersion()) {
80 case '0.0.1': // SQL queries for v0.0.1
81 // Update notes (these will be set as task text!)
82 setExtensionUpdateNotes("Fehler <div class=\"admin_failed\">Warning: Missing argument 2 for create_timestamp_from_selections() in {?PATH?}inc/libs/pro_functions.php on line 227</div> behoben.");
85 case '0.0.2': // SQL queries for v0.0.2
86 // Update notes (these will be set as task text!)
87 setExtensionUpdateNotes("Speichern der Einstellungen vereinfacht. Es wird dazu die Funktion adminSaveSettings() verwendet.");
90 case '0.0.3': // SQL queries for v0.0.3
91 // Update notes (these will be set as task text!)
92 setExtensionUpdateNotes("Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist.");
95 case '0.0.4': // SQL queries for v0.0.4
96 addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD max_comma TINYINT(3) UNSIGNED NOT NULL DEFAULT 3");
98 // Update notes (these will be set as task text!)
99 setExtensionUpdateNotes("Angezeigte Kommastellen können zwischen 0 und 5 eingestellt werden.");
102 case '0.0.5': // SQL queries for v0.0.5
103 // Update notes (these will be set as task text!)
104 setExtensionUpdateNotes("Problem mit Speicherung der Einstellungen beseitigt.");
107 case '0.0.6': // SQL queries for v0.0.6
108 // Update notes (these will be set as task text!)
109 setExtensionUpdateNotes("Problem mit Speicherung der Einstellungen endlich beseitigt.");
112 case '0.0.7': // SQL queries for v0.0.7
113 // Update notes (these will be set as task text!)
114 setExtensionUpdateNotes("Ausgabemodus der CSS-Dateien hinzugefügt. Bitte auch das Admin-Template aktualisieren!");
117 case '0.0.8': // SQL queries for v0.0.8
118 // Update notes (these will be set as task text!)
119 setExtensionUpdateNotes("Erweiterung bleibt wegen integrierten Schalters immer aktiv.");
122 case '0.0.9': // SQL queries for v0.0.9
123 // Update notes (these will be set as task text!)
124 setExtensionUpdateNotes("Abspeichern der Einstellungen repariert.");
127 case '0.1.0': // SQL queries for v0.2.1
128 // Update notes (these will be set as task text!)
129 setExtensionUpdateNotes("Folgende Einstellungen können auf 0 gesetzt werden:
131 <li>Selbe beworbene URL nicht mehr bewerbar (0 = URL kann sofort wieder gebucht werden)</li>
132 <li>Gütigkeitsdauer der Bestätigungslinks (0 = Bestätigungslinks laufen nie ab)</li>
133 <li>Sperrzeit des Mitgliedprofiles nach Änderung (0 = Mitglied kann sein Account immer und sofort ändern)</li>
134 <li>Profilaktualisierungsinterval (0 = Es wird keine Mail zum Profilaktualisierunng durch das Mitglied ausgesendet(</li>
135 <li>Erneute Aussendung der Mail (0 = Siehe oben)</li>
139 case '0.1.1': // SQL queries for v0.1.1
140 // Update notes (these will be set as task text!)
141 setExtensionUpdateNotes("Gast- und Mitgliedsmenüs lassen sich voneinander getrentt ein- und auschalten.");
144 case '0.1.2': // SQL queries for v0.1.2
145 // Update notes (these will be set as task text!)
146 setExtensionUpdateNotes("Wörter <strong>{?mt_word?}</strong>, <strong>{?mt_word2?}</strong> und <strong>{?mt_word3?}</strong> sind austauschbar.");
149 case '0.1.3': // SQL queries for v0.1.3
150 // Update notes (these will be set as task text!)
151 setExtensionUpdateNotes("Wort "Baustelle" vom Auto-Versand entfernt, da dieser nun klappt.");
154 case '0.1.4': // SQL queries for v0.1.4
155 // Update notes (these will be set as task text!)
156 setExtensionUpdateNotes("Abspeichern von Einstellungen repariert.");
159 case '0.1.5': // SQL queries for v0.1.5
160 // Update notes (these will be set as task text!)
161 setExtensionUpdateNotes("Abspeichern von Einstellungen repariert.");
164 case '0.1.6': // SQL queries for v0.1.6
165 addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD reject_url VARCHAR(255) NOT NULL DEFAULT '{?URL?}'");
167 // Update notes (these will be set as task text!)
168 setExtensionUpdateNotes("Bei Ablehnung der URL wird jetzt endlich eine Standart-URL eingesetzt, die konfigurierbar ist. Fehler beim Laden der Konfiguration gefunden.");
171 case '0.1.7': // SQL queries for v0.1.7
172 addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD currency VARCHAR(255) NOT NULL DEFAULT '€'");
174 // Update notes (these will be set as task text!)
175 setExtensionUpdateNotes("Standart-Währung der Gebühren für alle Erweiterungen geltend hinzugefügt.");
178 case '0.1.8': // SQL queries for v0.1.8
179 // Update notes (these will be set as task text!)
180 setExtensionUpdateNotes("Die sonstigen Einstellungen lassen sich nun nur noch ändern, wenn die Erweiterung <strong>other</strong> auch installiert ist. Anderfalls gibt es einen SQL-Fehler beim Speichern und GROSS_GESCHRIEBENE Worte im Formular.");
183 case '0.1.9': // SQL queries for v0.1.9
184 addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD mailid_error_redirect ENUM('index','reject') NOT NULL DEFAULT 'index'");
186 // Update notes (these will be set as task text!)
187 setExtensionUpdateNotes("Bei fehlerhafter Mail während der Bestätigung kann wahlweise zur Hauptseite weitergeleitet oder auf die eingestellte Ablehnungsseite umgeleitet werden.");
190 case '0.2.0': // SQL queries for v0.2.0
191 addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` CHANGE `mailid_error_redirect` `mailid_error_redirect` ENUM('INDEX','REJECT') NOT NULL DEFAULT 'INDEX'");
193 // Update notes (these will be set as task text!)
194 setExtensionUpdateNotes("Bei fehlerhafter Mail während der Bestätigung kann wahlweise zur Hauptseite weitergeleitet oder auf die eingestellte Ablehnungsseite umgeleitet werden.");
197 case '0.2.1': // SQL queries for v0.2.1
198 addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `min_age` TINYINT(3) UNSIGNED NOT NULL DEFAULT 16");
200 // Update notes (these will be set as task text!)
201 setExtensionUpdateNotes("Minimumalter ist nun konfigurierbar.");
204 case '0.2.2': // SQL queries for v0.2.2
205 addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `display_debug_sqls` ENUM('N','Y') NOT NULL DEFAULT 'N'");
207 // Update notes (these will be set as task text!)
208 setExtensionUpdateNotes("(Fast) alle SQL-Abfragen lassen sich nun zu Debugging-Zwecken (!) einschalten. Nur der Administrator sieht diese unten am Ende der Seite.");
211 case '0.2.3': // SQL queries for v0.2.3
212 addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `max_send` BIGINT(20) UNSIGNED NOT NULL DEFAULT 10");
214 // Update notes (these will be set as task text!)
215 setExtensionUpdateNotes("Fehlende Konfiguration hinzugefügt.");
218 case '0.2.4': // SQL queries for v0.2.4
220 registerFilter('page_footer', 'DISPLAY_DEBUG_SQL', false, true, getExtensionDryRun());
222 // Update notes (these will be set as task text!)
223 setExtensionUpdateNotes("Filter zum Anzeigen (Debug) von ausgeführten SQL-Anweisungen hinzugefügt.");
226 case '0.2.5': // SQL queries for v0.2.5
227 addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `code_length` TINYINT(3) UNSIGNED NOT NULL DEFAULT 5");
229 // Update notes (these will be set as task text!)
230 setExtensionUpdateNotes("Codelänge aus tables.sql rausgeholt.");
235 case 'modify': // When the extension got modified
238 case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305.
241 case 'init': // Do stuff when extension is initialized
244 default: // Unknown extension mode
245 logDebugMessage(__FILE__, __LINE__, sprintf("Unknown extension mode %s in extension %s detected.", getExtensionMode(), getCurrentExtensionName()));