83a90646a07c5aef9c16f7eab0c8c1a39f4057ac
[mailer.git] / inc / extensions / ext-other.php
1 <?php
2 /************************************************************************
3  * Mailer v0.2.1-FINAL                                Start: 09/19/2004 *
4  * ===================                          Last change: 10/29/2004 *
5  *                                                                      *
6  * -------------------------------------------------------------------- *
7  * File              : ext-other.php                                    *
8  * -------------------------------------------------------------------- *
9  * Short description : Other administrative settings                    *
10  * -------------------------------------------------------------------- *
11  * Kurzbeschreibung  : Weitere administrative Einstellungen             *
12  * -------------------------------------------------------------------- *
13  * $Revision::                                                        $ *
14  * $Date::                                                            $ *
15  * $Tag:: 0.2.1-FINAL                                                 $ *
16  * $Author::                                                          $ *
17  * -------------------------------------------------------------------- *
18  * Copyright (c) 2003 - 2009 by Roland Haeder                           *
19  * Copyright (c) 2009 - 2012 by Mailer Developer Team                   *
20  * For more information visit: http://mxchange.org                      *
21  *                                                                      *
22  * This program is free software; you can redistribute it and/or modify *
23  * it under the terms of the GNU General Public License as published by *
24  * the Free Software Foundation; either version 2 of the License, or    *
25  * (at your option) any later version.                                  *
26  *                                                                      *
27  * This program is distributed in the hope that it will be useful,      *
28  * but WITHOUT ANY WARRANTY; without even the implied warranty of       *
29  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the        *
30  * GNU General Public License for more details.                         *
31  *                                                                      *
32  * You should have received a copy of the GNU General Public License    *
33  * along with this program; if not, write to the Free Software          *
34  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,               *
35  * MA  02110-1301  USA                                                  *
36  ************************************************************************/
37
38 // Some security stuff...
39 if (!defined('__SECURITY')) {
40         die();
41 } // END - if
42
43 // Version number
44 setThisExtensionVersion('0.2.8');
45
46 // Version history array (add more with , '0.0.1' and so on)
47 setExtensionVersionHistory(array('0.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', '0.2.6', '0.2.7', '0.2.8'));
48
49 // Keep this extension always active!
50 setExtensionAlwaysActive('Y');
51
52 switch (getExtensionMode()) {
53         case 'register': // Do stuff when installation is running
54                 // SQL commands to run
55                 addAdminMenuSql('setup','config_other','Sonstige Einstellungen','Sonstige Einstellungen an Ihrem {?mt_word?}.',13);
56                 break;
57
58         case 'remove': // Do stuff when removing extension
59                 // SQL commands to run
60                 addExtensionSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_admin_menu` WHERE `what`='config_other'");
61
62                 // Unregister filter
63                 unregisterFilter(__FILE__, __LINE__, 'page_footer', 'DISPLAY_DEBUG_SQL', true, isExtensionDryRun());
64                 break;
65
66         case 'activate': // Do stuff when admin activates this extension
67                 // SQL commands to run
68                 addExtensionSql('');
69                 break;
70
71         case 'deactivate': // Do stuff when admin deactivates this extension
72                 // SQL commands to run
73                 addExtensionSql('');
74                 break;
75
76         case 'update': // Update an extension
77                 switch (getCurrentExtensionVersion()) {
78                         case '0.0.1': // SQL queries for v0.0.1
79                                 // Update notes (these will be set as task text!)
80                                 setExtensionUpdateNotes("Fehler <div class=\"notice\">Warning: Missing argument 2 for create_timestamp_from_selections() in {?PATH?}inc/libs/pro_functions.php on line 227</div> behoben.");
81                                 break;
82
83                         case '0.0.2': // SQL queries for v0.0.2
84                                 // Update notes (these will be set as task text!)
85                                 setExtensionUpdateNotes("Speichern der Einstellungen vereinfacht. Es wird dazu die Funktion adminSaveSettings() verwendet.");
86                                 break;
87
88                         case '0.0.3': // SQL queries for v0.0.3
89                                 // Update notes (these will be set as task text!)
90                                 setExtensionUpdateNotes("Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist.");
91                                 break;
92
93                         case '0.0.4': // SQL queries for v0.0.4
94                                 addConfigAddSql('max_comma', 'TINYINT(3) UNSIGNED NOT NULL DEFAULT 3');
95
96                                 // Update notes (these will be set as task text!)
97                                 setExtensionUpdateNotes("Angezeigte Kommastellen k&ouml;nnen zwischen 0 und 5 eingestellt werden.");
98                                 break;
99
100                         case '0.0.5': // SQL queries for v0.0.5
101                                 // Update notes (these will be set as task text!)
102                                 setExtensionUpdateNotes("Problem mit Speicherung der Einstellungen beseitigt.");
103                                 break;
104
105                         case '0.0.6': // SQL queries for v0.0.6
106                                 // Update notes (these will be set as task text!)
107                                 setExtensionUpdateNotes("Problem mit Speicherung der Einstellungen endlich beseitigt.");
108                                 break;
109
110                         case '0.0.7': // SQL queries for v0.0.7
111                                 // Update notes (these will be set as task text!)
112                                 setExtensionUpdateNotes("Ausgabemodus der CSS-Dateien hinzugef&uuml;gt. Bitte auch das Admin-Template aktualisieren!");
113                                 break;
114
115                         case '0.0.8': // SQL queries for v0.0.8
116                                 // Update notes (these will be set as task text!)
117                                 setExtensionUpdateNotes("Erweiterung bleibt wegen integrierten Schalters immer aktiv.");
118                                 break;
119
120                         case '0.0.9': // SQL queries for v0.0.9
121                                 // Update notes (these will be set as task text!)
122                                 setExtensionUpdateNotes("Abspeichern der Einstellungen repariert.");
123                                 break;
124
125                         case '0.1.0': // SQL queries for v0.2.1
126                                 // Update notes (these will be set as task text!)
127                                 setExtensionUpdateNotes("Folgende Einstellungen k&ouml;nnen auf 0 gesetzt werden:
128 <ol>
129 <li>Selbe beworbene URL nicht mehr bewerbar (0 = URL kann sofort wieder gebucht werden)</li>
130 <li>G&uuml;tigkeitsdauer der Best&auml;tigungslinks (0 = Best&auml;tigungslinks laufen nie ab)</li>
131 <li>Sperrzeit des Mitgliedprofiles nach &Auml;nderung (0 = Mitglied kann sein Account immer und sofort &auml;ndern)</li>
132 <li>Profilaktualisierungsinterval (0 = Es wird keine Mail zum Profilaktualisierunng durch das Mitglied ausgesendet(</li>
133 <li>Erneute Aussendung der Mail (0 = Siehe oben)</li>
134 </ol>");
135                                 break;
136
137                         case '0.1.1': // SQL queries for v0.1.1
138                                 // Update notes (these will be set as task text!)
139                                 setExtensionUpdateNotes("Gast- und Mitgliedsmen&uuml;s lassen sich voneinander getrentt ein- und auschalten.");
140                                 break;
141
142                         case '0.1.2': // SQL queries for v0.1.2
143                                 // Update notes (these will be set as task text!)
144                                 setExtensionUpdateNotes("W&ouml;rter <strong>{?mt_word?}</strong>, <strong>{?mt_word2?}</strong> und <strong>{?mt_word3?}</strong> sind austauschbar.");
145                                 break;
146
147                         case '0.1.3': // SQL queries for v0.1.3
148                                 // Update notes (these will be set as task text!)
149                                 setExtensionUpdateNotes("Wort &quot;Baustelle&quot; vom Auto-Versand entfernt, da dieser nun klappt.");
150                                 break;
151
152                         case '0.1.4': // SQL queries for v0.1.4
153                                 // Update notes (these will be set as task text!)
154                                 setExtensionUpdateNotes("Abspeichern von Einstellungen repariert.");
155                                 break;
156
157                         case '0.1.5': // SQL queries for v0.1.5
158                                 // Update notes (these will be set as task text!)
159                                 setExtensionUpdateNotes("Abspeichern von Einstellungen repariert.");
160                                 break;
161
162                         case '0.1.6': // SQL queries for v0.1.6
163                                 addConfigAddSql('reject_url', "VARCHAR(255) NOT NULL DEFAULT '{?URL?}'");
164
165                                 // Update notes (these will be set as task text!)
166                                 setExtensionUpdateNotes("Bei Ablehnung der URL wird jetzt endlich eine Standard-URL eingesetzt, die konfigurierbar ist. Fehler beim Laden der Konfiguration gefunden.");
167                                 break;
168
169                         case '0.1.7': // SQL queries for v0.1.7
170                                 addConfigAddSql('currency', "VARCHAR(255) NOT NULL DEFAULT '&euro;'");
171
172                                 // Update notes (these will be set as task text!)
173                                 setExtensionUpdateNotes("Standard-W&auml;hrung der Geb&uuml;hren f&uuml;r alle Erweiterungen geltend hinzugef&uuml;gt.");
174                                 break;
175
176                         case '0.1.8': // SQL queries for v0.1.8
177                                 // Update notes (these will be set as task text!)
178                                 setExtensionUpdateNotes("Die sonstigen Einstellungen lassen sich nun nur noch &auml;ndern, wenn die Erweiterung <strong>other</strong> auch installiert ist. Anderfalls gibt es einen SQL-Fehler beim Speichern und GROSS_GESCHRIEBENE Worte im Formular.");
179                                 break;
180
181                         case '0.1.9': // SQL queries for v0.1.9
182                                 addConfigAddSql('mailid_error_redirect', "ENUM('INDEX','REJECT') NOT NULL DEFAULT 'INDEX'");
183
184                                 // Update notes (these will be set as task text!)
185                                 setExtensionUpdateNotes("Bei fehlerhafter Mail w&auml;hrend der Best&auml;tigung kann wahlweise zur Hauptseite weitergeleitet oder auf die eingestellte Ablehnungsseite umgeleitet werden.");
186                                 break;
187
188                         case '0.2.0': // SQL queries for v0.2.0
189                                 addConfigChangeSql('mailid_error_redirect', 'mailid_error_redirect', "ENUM('INDEX','REJECT') NOT NULL DEFAULT 'INDEX'");
190
191                                 // Update notes (these will be set as task text!)
192                                 setExtensionUpdateNotes("Bei fehlerhafter Mail w&auml;hrend der Best&auml;tigung kann wahlweise zur Hauptseite weitergeleitet oder auf die eingestellte Ablehnungsseite umgeleitet werden.");
193                                 break;
194
195                         case '0.2.1': // SQL queries for v0.2.1
196                                 addConfigAddSql('min_age', 'TINYINT(3) UNSIGNED NOT NULL DEFAULT 16');
197
198                                 // Update notes (these will be set as task text!)
199                                 setExtensionUpdateNotes("Minimumalter ist nun konfigurierbar.");
200                                 break;
201
202                         case '0.2.2': // SQL queries for v0.2.2
203                                 addConfigAddSql('display_debug_sqls', "ENUM('N','Y') NOT NULL DEFAULT 'N'");
204
205                                 // Update notes (these will be set as task text!)
206                                 setExtensionUpdateNotes("(Fast) alle SQL-Abfragen lassen sich nun zu Debugging-Zwecken (!) einschalten. Nur der Administrator sieht diese unten am Ende der Seite.");
207                                 break;
208
209                         case '0.2.3': // SQL queries for v0.2.3
210                                 addConfigAddSql('max_send', 'BIGINT(20) UNSIGNED NOT NULL DEFAULT 10');
211
212                                 // Update notes (these will be set as task text!)
213                                 setExtensionUpdateNotes("Fehlende Konfiguration hinzugef&uuml;gt.");
214                                 break;
215
216                         case '0.2.4': // SQL queries for v0.2.4
217                                 // Register filter
218                                 registerFilter(__FILE__, __LINE__, 'page_footer', 'DISPLAY_DEBUG_SQL', false, true, isExtensionDryRun());
219
220                                 // Update notes (these will be set as task text!)
221                                 setExtensionUpdateNotes("Filter zum Anzeigen (Debug) von ausgef&uuml;hrten SQL-Anweisungen hinzugef&uuml;gt.");
222                                 break;
223
224                         case '0.2.5': // SQL queries for v0.2.5
225                                 addConfigAddSql('code_length', 'TINYINT(3) UNSIGNED NOT NULL DEFAULT 5');
226
227                                 // Update notes (these will be set as task text!)
228                                 setExtensionUpdateNotes("Codel&auml;nge aus tables.sql rausgeholt.");
229                                 break;
230
231                         case '0.2.6': // SQL queries for v0.2.6
232                                 addConfigAddSql('stats_enabled', "ENUM('Y','N') NOT NULL DEFAULT 'N'");
233
234                                 // Update notes (these will be set as task text!)
235                                 setExtensionUpdateNotes("Interne Statistiken sind nun abschaltbar (kann Performance bringen).");
236                                 break;
237
238                         case '0.2.7': // SQL queries for v0.2.7
239                                 addConfigChangeSql('stats_enabled', 'internal_stats', "ENUM('Y','N') NOT NULL DEFAULT 'N'");
240
241                                 // Update notes (these will be set as task text!)
242                                 setExtensionUpdateNotes("Der Suffix <strong>_enabled</strong> in Konfigurationseintr&auml;gen ist deprecated und sollte nicht mehr verwendet werden. Da sonst Wrapper-Funktionsnamen wie z.B. <strong>isStatsEnabledEnabled()</strong> nach streng genommender Namenskonvention entstehen.");
243                                 break;
244
245                         case '0.2.8': // SQL queries for v0.2.8
246                                 addConfigChangeSql('mailid_error_redirect', 'mailid_error_redirect', "ENUM('INDEX','REJECT') NOT NULL DEFAULT 'INDEX'");
247
248                                 // Update notes (these will be set as task text!)
249                                 setExtensionUpdateNotes("<strong>mailid_error_redirect</strong> bzw. alle ENUMs haben gross geschriebene Werte.");
250                                 break;
251                 } // END - switch
252                 break;
253
254         case 'modify': // When the extension got modified
255                 break;
256
257         case 'test': // For testing purposes
258                 break;
259
260         case 'init': // Do stuff when extension is initialized
261                 break;
262
263         default: // Unknown extension mode
264                 logDebugMessage(__FILE__, __LINE__, sprintf("Unknown extension mode %s in extension %s detected.", getExtensionMode(), getCurrentExtensionName()));
265                 break;
266 }
267
268 // [EOF]
269 ?>