534d7a300fde5cddc7154ab24037a26e808de42f
[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  * 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                  *
22  *                                                                      *
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.                                  *
27  *                                                                      *
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.                         *
32  *                                                                      *
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,               *
36  * MA  02110-1301  USA                                                  *
37  ************************************************************************/
38
39 // Some security stuff...
40 if (!defined('__SECURITY')) {
41         die();
42 } // END - if
43
44 // Version number
45 setThisExtensionVersion('0.2.5');
46
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'));
49
50 // Keep this extension always active!
51 setExtensionAlwaysActive('Y');
52
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 {?mt_word?}.',13);
57                 break;
58
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'");
62
63                 // Unregister filter
64                 unregisterFilter('page_footer', 'DISPLAY_DEBUG_SQL', false, true, getExtensionDryRun());
65                 break;
66
67         case 'activate': // Do stuff when admin activates this extension
68                 // SQL commands to run
69                 addExtensionSql('');
70                 break;
71
72         case 'deactivate': // Do stuff when admin deactivates this extension
73                 // SQL commands to run
74                 addExtensionSql('');
75                 break;
76
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.");
82                                 break;
83
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.");
87                                 break;
88
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.");
92                                 break;
93
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");
96
97                                 // Update notes (these will be set as task text!)
98                                 setExtensionUpdateNotes("Angezeigte Kommastellen k&ouml;nnen zwischen 0 und 5 eingestellt werden.");
99                                 break;
100
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.");
104                                 break;
105
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.");
109                                 break;
110
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&uuml;gt. Bitte auch das Admin-Template aktualisieren!");
114                                 break;
115
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.");
119                                 break;
120
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.");
124                                 break;
125
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&ouml;nnen auf 0 gesetzt werden:
129 <ol>
130 <li>Selbe beworbene URL nicht mehr bewerbar (0 = URL kann sofort wieder gebucht werden)</li>
131 <li>G&uuml;tigkeitsdauer der Best&auml;tigungslinks (0 = Best&auml;tigungslinks laufen nie ab)</li>
132 <li>Sperrzeit des Mitgliedprofiles nach &Auml;nderung (0 = Mitglied kann sein Account immer und sofort &auml;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>
135 </ol>");
136                                 break;
137
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&uuml;s lassen sich voneinander getrentt ein- und auschalten.");
141                                 break;
142
143                         case '0.1.2': // SQL queries for v0.1.2
144                                 // Update notes (these will be set as task text!)
145                                 setExtensionUpdateNotes("W&ouml;rter <strong>{?mt_word?}</strong>, <strong>{?mt_word2?}</strong> und <strong>{?mt_word3?}</strong> sind austauschbar.");
146                                 break;
147
148                         case '0.1.3': // SQL queries for v0.1.3
149                                 // Update notes (these will be set as task text!)
150                                 setExtensionUpdateNotes("Wort &quot;Baustelle&quot; vom Auto-Versand entfernt, da dieser nun klappt.");
151                                 break;
152
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.");
156                                 break;
157
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.");
161                                 break;
162
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?}'");
165
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.");
168                                 break;
169
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 '&euro;'");
172
173                                 // Update notes (these will be set as task text!)
174                                 setExtensionUpdateNotes("Standart-W&auml;hrung der Geb&uuml;hren f&uuml;r alle Erweiterungen geltend hinzugef&uuml;gt.");
175                                 break;
176
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 &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.");
180                                 break;
181
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'");
184
185                                 // Update notes (these will be set as task text!)
186                                 setExtensionUpdateNotes("Bei fehlerhafter Mail w&auml;hrend der Best&auml;tigung kann wahlweise zur Hauptseite weitergeleitet oder auf die eingestellte Ablehnungsseite umgeleitet werden.");
187                                 break;
188
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'");
191
192                                 // Update notes (these will be set as task text!)
193                                 setExtensionUpdateNotes("Bei fehlerhafter Mail w&auml;hrend der Best&auml;tigung kann wahlweise zur Hauptseite weitergeleitet oder auf die eingestellte Ablehnungsseite umgeleitet werden.");
194                                 break;
195
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");
198
199                                 // Update notes (these will be set as task text!)
200                                 setExtensionUpdateNotes("Minimumalter ist nun konfigurierbar.");
201                                 break;
202
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'");
205
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.");
208                                 break;
209
210                         case '0.2.3': // SQL queries for v0.2.3
211                                 addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `max_send` BIGINT(20) UNSIGNED NOT NULL DEFAULT 10");
212
213                                 // Update notes (these will be set as task text!)
214                                 setExtensionUpdateNotes("Fehlende Konfiguration hinzugef&uuml;gt.");
215                                 break;
216
217                         case '0.2.4': // SQL queries for v0.2.4
218                                 // Register filter
219                                 registerFilter('page_footer', 'DISPLAY_DEBUG_SQL', false, true, getExtensionDryRun());
220
221                                 // Update notes (these will be set as task text!)
222                                 setExtensionUpdateNotes("Filter zum Anzeigen (Debug) von ausgef&uuml;hrten SQL-Anweisungen hinzugef&uuml;gt.");
223                                 break;
224
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");
227
228                                 // Update notes (these will be set as task text!)
229                                 setExtensionUpdateNotes("Codel&auml;nge aus tables.sql rausgeholt.");
230                                 break;
231                 }
232                 break;
233
234         case 'modify': // When the extension got modified
235                 break;
236
237         case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305.
238                 break;
239
240         case 'init': // Do stuff when extension is initialized
241                 break;
242
243         default: // Unknown extension mode
244                 DEBUG_LOG(__FILE__, __LINE__, sprintf("Unknown extension mode %s detected.", getExtensionMode()));
245                 break;
246 }
247
248 // [EOF]
249 ?>