2 /************************************************************************
3 * MXChange v0.2.1 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 * For more information visit: http://www.mxchange.org *
23 * This program is free software; you can redistribute it and/or modify *
24 * it under the terms of the GNU General Public License as published by *
25 * the Free Software Foundation; either version 2 of the License, or *
26 * (at your option) any later version. *
28 * This program is distributed in the hope that it will be useful, *
29 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
30 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
31 * GNU General Public License for more details. *
33 * You should have received a copy of the GNU General Public License *
34 * along with this program; if not, write to the Free Software *
35 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, *
37 ************************************************************************/
39 // Some security stuff...
40 if (!defined('__SECURITY')) {
45 setThisExtensionVersion('0.2.5');
47 // Version history array (add more with , '0.1.0' and so on)
48 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'));
50 // Keep this extension always active!
51 setExtensionAlwaysActive('Y');
53 switch (getExtensionMode()) {
54 case 'register': // Do stuff when installation is running (modules.php?module=admin is called)
55 // SQL commands to run
56 addAdminMenuSql('setup','config_other','Sonstige Einstellungen','Sonstige Einstellungen an Ihrem Mailtausch.',13);
59 case 'remove': // Do stuff when removing extension
60 // SQL commands to run
61 addExtensionSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_admin_menu` WHERE `what`='config_other'");
64 unregisterFilter('page_footer', 'DISPLAY_DEBUG_SQL', false, true, getExtensionDryRun());
67 case 'activate': // Do stuff when admin activates this extension
68 // SQL commands to run
72 case 'deactivate': // Do stuff when admin deactivates this extension
73 // SQL commands to run
77 case 'update': // Update an extension
78 switch (getCurrentExtensionVersion()) {
79 case '0.0.1': // SQL queries for v0.0.1
80 // Update notes (these will be set as task text!)
81 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.");
84 case '0.0.2': // SQL queries for v0.0.2
85 // Update notes (these will be set as task text!)
86 setExtensionUpdateNotes("Speichern der Einstellungen vereinfacht. Es wird dazu die Funktion adminSaveSettings() verwendet.");
89 case '0.0.3': // SQL queries for v0.0.3
90 // Update notes (these will be set as task text!)
91 setExtensionUpdateNotes("Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist.");
94 case '0.0.4': // SQL queries for v0.0.4
95 addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD max_comma TINYINT(3) UNSIGNED NOT NULL DEFAULT 3");
97 // Update notes (these will be set as task text!)
98 setExtensionUpdateNotes("Angezeigte Kommastellen können zwischen 0 und 5 eingestellt werden.");
101 case '0.0.5': // SQL queries for v0.0.5
102 // Update notes (these will be set as task text!)
103 setExtensionUpdateNotes("Problem mit Speicherung der Einstellungen beseitigt.");
106 case '0.0.6': // SQL queries for v0.0.6
107 // Update notes (these will be set as task text!)
108 setExtensionUpdateNotes("Problem mit Speicherung der Einstellungen endlich beseitigt.");
111 case '0.0.7': // SQL queries for v0.0.7
112 // Update notes (these will be set as task text!)
113 setExtensionUpdateNotes("Ausgabemodus der CSS-Dateien hinzugefügt. Bitte auch das Admin-Template aktualisieren!");
116 case '0.0.8': // SQL queries for v0.0.8
117 // Update notes (these will be set as task text!)
118 setExtensionUpdateNotes("Erweiterung bleibt wegen integrierten Schalters immer aktiv.");
121 case '0.0.9': // SQL queries for v0.0.9
122 // Update notes (these will be set as task text!)
123 setExtensionUpdateNotes("Abspeichern der Einstellungen repariert.");
126 case '0.1.0': // SQL queries for v0.2.1
127 // Update notes (these will be set as task text!)
128 setExtensionUpdateNotes("Folgende Einstellungen können auf 0 gesetzt werden:
130 <li>Selbe beworbene URL nicht mehr bewerbar (0 = URL kann sofort wieder gebucht werden)</li>
131 <li>Gütigkeitsdauer der Bestätigungslinks (0 = Bestätigungslinks laufen nie ab)</li>
132 <li>Sperrzeit des Mitgliedprofiles nach Änderung (0 = Mitglied kann sein Account immer und sofort ändern)</li>
133 <li>Profilaktualisierungsinterval (0 = Es wird keine Mail zum Profilaktualisierunng durch das Mitglied ausgesendet(</li>
134 <li>Erneute Aussendung der Mail (0 = Siehe oben)</li>
138 case '0.1.1': // SQL queries for v0.1.1
139 // Update notes (these will be set as task text!)
140 setExtensionUpdateNotes("Gast- und Mitgliedsmenüs lassen sich voneinander getrentt ein- und auschalten.");
143 case '0.1.2': // SQL queries for v0.1.2
144 // Update notes (these will be set as task text!)
145 setExtensionUpdateNotes("Wörter <strong>Mailtausch</strong>, <strong>Mailtausches</strong> und <strong>Mailtauscher</strong> sind austauschbar.");
148 case '0.1.3': // SQL queries for v0.1.3
149 // Update notes (these will be set as task text!)
150 setExtensionUpdateNotes("Wort "Baustelle" vom Auto-Versand entfernt, da dieser nun klappt.");
153 case '0.1.4': // SQL queries for v0.1.4
154 // Update notes (these will be set as task text!)
155 setExtensionUpdateNotes("Abspeichern von Einstellungen repariert.");
158 case '0.1.5': // SQL queries for v0.1.5
159 // Update notes (these will be set as task text!)
160 setExtensionUpdateNotes("Abspeichern von Einstellungen repariert.");
163 case '0.1.6': // SQL queries for v0.1.6
164 addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD reject_url VARCHAR(255) NOT NULL DEFAULT '{?URL?}'");
166 // Update notes (these will be set as task text!)
167 setExtensionUpdateNotes("Bei Ablehnung der URL wird jetzt endlich eine Standart-URL eingesetzt, die konfigurierbar ist. Fehler beim Laden der Konfiguration gefunden.");
170 case '0.1.7': // SQL queries for v0.1.7
171 addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD currency VARCHAR(255) NOT NULL DEFAULT '€'");
173 // Update notes (these will be set as task text!)
174 setExtensionUpdateNotes("Standart-Währung der Gebühren für alle Erweiterungen geltend hinzugefügt.");
177 case '0.1.8': // SQL queries for v0.1.8
178 // Update notes (these will be set as task text!)
179 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.");
182 case '0.1.9': // SQL queries for v0.1.9
183 addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD mailid_error_redirect ENUM('index','reject') NOT NULL DEFAULT 'index'");
185 // Update notes (these will be set as task text!)
186 setExtensionUpdateNotes("Bei fehlerhafter Mail während der Bestätigung kann wahlweise zur Hauptseite weitergeleitet oder auf die eingestellte Ablehnungsseite umgeleitet werden.");
189 case '0.2.0': // SQL queries for v0.2.0
190 addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` CHANGE `mailid_error_redirect` `mailid_error_redirect` ENUM('INDEX','REJECT') NOT NULL DEFAULT 'INDEX'");
192 // Update notes (these will be set as task text!)
193 setExtensionUpdateNotes("Bei fehlerhafter Mail während der Bestätigung kann wahlweise zur Hauptseite weitergeleitet oder auf die eingestellte Ablehnungsseite umgeleitet werden.");
196 case '0.2.1': // SQL queries for v0.2.1
197 addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `min_age` TINYINT(3) UNSIGNED NOT NULL DEFAULT 16");
199 // Update notes (these will be set as task text!)
200 setExtensionUpdateNotes("Minimumalter ist nun konfigurierbar.");
203 case '0.2.2': // SQL queries for v0.2.2
204 addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `display_debug_sqls` ENUM('N','Y') NOT NULL DEFAULT 'N'");
206 // Update notes (these will be set as task text!)
207 setExtensionUpdateNotes("(Fast) alle SQL-Abfragen lassen sich nun zu Debugging-Zwecken (!) einschalten. Nur der Administrator sieht diese unten am Ende der Seite.");
210 case '0.2.3': // SQL queries for v0.2.3
211 addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `max_send` BIGINT(20) NOT NULL DEFAULT 10");
213 // Update notes (these will be set as task text!)
214 setExtensionUpdateNotes("Fehlende Konfiguration hinzugefügt.");
217 case '0.2.4': // SQL queries for v0.2.4
219 registerFilter('page_footer', 'DISPLAY_DEBUG_SQL', false, true, getExtensionDryRun());
221 // Update notes (these will be set as task text!)
222 setExtensionUpdateNotes("Filter zum Anzeigen (Debug) von ausgeführten SQL-Anweisungen hinzugefügt.");
225 case '0.2.5': // SQL queries for v0.2.5
226 addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `code_length` TINYINT(3) UNSIGNED NOT NULL DEFAULT 5");
228 // Update notes (these will be set as task text!)
229 setExtensionUpdateNotes("Codelänge aus tables.sql rausgeholt.");
234 case 'modify': // When the extension got modified
237 case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305.
240 case 'init': // Do stuff when extension is initialized
243 default: // Unknown extension mode
244 DEBUG_LOG(__FILE__, __LINE__, sprintf("Unknown extension mode %s detected.", getExtensionMode()));