a8767741938e5551eb1f8f1dabff95b77744bac3
[mailer.git] / inc / extensions / ext-top10.php
1 <?php
2 /************************************************************************
3  * Mailer v0.2.1-FINAL                                Start: 11/20/2004 *
4  * ================                             Last change: 11/20/2004 *
5  *                                                                      *
6  * -------------------------------------------------------------------- *
7  * File              : ext-top10.php                                    *
8  * -------------------------------------------------------------------- *
9  * Short description : TOP10 clicker / points amount / etc.             *
10  * -------------------------------------------------------------------- *
11  * Kurzbeschreibung  : TOP10-Klicker / Guthaben / Ref-Werber            *
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 }
43
44 // Version number
45 setThisExtensionVersion('0.1.2');
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'));
49
50 switch (getExtensionMode()) {
51         case 'register': // Do stuff when installation is running (modules.php?module=admin is called)
52                 // SQL commands to run
53                 addGuestMenuSql('main','top10','TOP-10','Y','Y', 7);
54                 addAdminMenuSql('setup','config_top10','TOP-10 Listen','Stellen Sie hier ein, wie lang die TOP-Listen sein sollen, also wie viele Pl&auml;tze angezeigt werden sollen.', 8);
55                 addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD top10_max TINYINT(3) UNSIGNED NOT NULL DEFAULT 10");
56                 break;
57
58         case 'remove': // Do stuff when removing extension
59                 // SQL commands to run
60                 addExtensionSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_guest_menu` WHERE `what`='top10'");
61                 addExtensionSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_admin_menu` WHERE `what`='config_top10'");
62                 break;
63
64         case 'activate': // Do stuff when admin activates this extension
65                 // SQL commands to run
66                 addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_guest_menu` SET `visible`='Y', `locked`='N' WHERE `what`='top10' LIMIT 1");
67                 break;
68
69         case 'deactivate': // Do stuff when admin deactivates this extension
70                 // SQL commands to run
71                 addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_guest_menu` SET `visible`='N', `locked`='Y' WHERE `what`='top10' LIMIT 1");
72                 break;
73
74         case 'update': // Update an extension
75                 switch (getCurrentExtensionVersion()) {
76                         case '0.0.1': // SQL queries for v0.0.1
77                                 // Update notes (these will be set as task text!)
78                                 setExtensionUpdateNotes("Fehler <em>Column: 'userid' in group statement is ambiguous</em> im Gastbereich beseitigt.");
79                                 break;
80
81                         case '0.0.2': // SQL queries for v0.0.2
82                                 // Update notes (these will be set as task text!)
83                                 setExtensionUpdateNotes("Wegen des Theme-Supportes hat sich die URL zur CSS-Datei ge&auml;ndert.");
84                                 break;
85
86                         case '0.0.3': // SQL queries for v0.0.3
87                                 // Update notes (these will be set as task text!)
88                                 setExtensionUpdateNotes("Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist.");
89                                 break;
90
91                         case '0.0.4': // SQL queries for v0.0.4
92                                 // Update notes (these will be set as task text!)
93                                 setExtensionUpdateNotes("Problem mit Speicherung der Einstellungen beseitigt.");
94                                 break;
95
96                         case '0.0.5': // SQL queries for v0.0.5
97                                 // Update notes (these will be set as task text!)
98                                 setExtensionUpdateNotes("Men&uuml;punkte im Gast-/Mitgliedsbereich k&ouml;nnen nicht mehr aufgerufen werden, wenn die Erweiterung deaktiviert ist.");
99                                 break;
100
101                         case '0.0.6': // SQL queries for v0.0.6
102                                 // Update notes (these will be set as task text!)
103                                 setExtensionUpdateNotes("Im Gastbereich konnte als Nicht-Admin die Seite nicht ge&ouml;ffnet werden.");
104                                 break;
105
106                         case '0.0.7': // SQL queries for v0.0.7
107                                 // Update notes (these will be set as task text!)
108                                 setExtensionUpdateNotes("Design &quot;Solid-Business&quot; eingebaut.");
109                                 break;
110
111                         case '0.0.8': // SQL queries for v0.0.8
112                                 // Update notes (these will be set as task text!)
113                                 setExtensionUpdateNotes("Seit <strong>Patch 340</strong> &uuml;berfl&uuml;ssige HTML-Tags entfernt.");
114                                 break;
115
116                         case '0.0.9': // SQL queries for v0.0.9
117                                 // Update notes (these will be set as task text!)
118                                 setExtensionUpdateNotes("Rechtschreibefehler beseitigt.");
119                                 break;
120
121                         case '0.1.0': // SQL queries for v0.2.1
122                                 // Update notes (these will be set as task text!)
123                                 setExtensionUpdateNotes("HTML-Code ausgelagert in Templates und SQL-Anweisungen abgesichert.");
124                                 break;
125
126                         case '0.1.1': // SQL queries for v0.1.1
127                                 // Update notes (these will be set as task text!)
128                                 setExtensionUpdateNotes("Abspeichern von Einstellungen repariert.");
129                                 break;
130
131                         case '0.1.2': // SQL queries for v0.1.2
132                                 // Update notes (these will be set as task text!)
133                                 setExtensionUpdateNotes("Fehlerhinweis bei deaktivierter Erweiterung verbessert.");
134                                 break;
135                 }
136                 break;
137
138         case 'modify': // When the extension got modified
139                 break;
140
141         case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305.
142                 break;
143
144         case 'init': // Do stuff when extension is initialized
145                 break;
146
147         default: // Unknown extension mode
148                 DEBUG_LOG(__FILE__, __LINE__, sprintf("Unknown extension mode %s detected.", getExtensionMode()));
149                 break;
150 }
151
152 //
153 ?>