1 | <?php |
---|
2 | // +-----------------------------------------------------------------------+ |
---|
3 | // | Plugin Name : Register_llgbo | |
---|
4 | // | Plugin Version : 1.0 | |
---|
5 | // | File Version : 0.1 | |
---|
6 | // | Plugin Version author : Ex-FTB | |
---|
7 | // | Plugin description : | |
---|
8 | // | Ce plugin permet d'afficher les miniatures au survol des boutons | |
---|
9 | // | de navigation. This plugin allows display thumbnail under buton | |
---|
10 | // | | |
---|
11 | // +-----------------------------------------------------------------------+ |
---|
12 | // | This program is free software; you can redistribute it and/or modify | |
---|
13 | // | it under the terms of the GNU General Public License as published by | |
---|
14 | // | the Free Software Foundation | |
---|
15 | // | | |
---|
16 | // | This program is distributed in the hope that it will be useful, but | |
---|
17 | // | WITHOUT ANY WARRANTY; without even the implied warranty of | |
---|
18 | // | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
---|
19 | // | General Public License for more details. | |
---|
20 | // | | |
---|
21 | // | You should have received a copy of the GNU General Public License | |
---|
22 | // | along with this program; if not, write to the Free Software | |
---|
23 | // | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, | |
---|
24 | // | USA. | |
---|
25 | // +-----------------------------------------------------------------------+ |
---|
26 | |
---|
27 | // ****************************************** |
---|
28 | // ** Database install - uninstall queries ** |
---|
29 | // ****************************************** |
---|
30 | if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!'); |
---|
31 | function plugin_install() |
---|
32 | { global $prefixeTable,$conf,$ttvalues,$plugvalues,$frvalues; |
---|
33 | plugin_uninstall(); // en cas de mauvaise deinstallation anterieure |
---|
34 | $q = ' |
---|
35 | INSERT INTO '.CONFIG_TABLE.' (param,value,comment) |
---|
36 | VALUES |
---|
37 | ("LLGBO","'.$plugvalues.'","look like gbo global settings");'; |
---|
38 | pwg_query($q); |
---|
39 | $q = ' |
---|
40 | INSERT INTO '.CONFIG_TABLE.' (param,value,comment) |
---|
41 | VALUES |
---|
42 | ("LLGBOTOOLTIP","'.$ttvalues.'","look like gbo tooltip settings");'; |
---|
43 | pwg_query($q); |
---|
44 | $q = ' |
---|
45 | INSERT INTO '.CONFIG_TABLE.' (param,value,comment) |
---|
46 | VALUES |
---|
47 | ("LLGBOFRAME","'.$frvalues.'","look like gbo frame settings");'; |
---|
48 | pwg_query($q); |
---|
49 | |
---|
50 | $conf['LLGBO_SETTINGS'] = explode("," , $plugvalues); |
---|
51 | $conf['LLGBO_TOOLTIP'] = explode(",",$ttvalues); |
---|
52 | $conf['LLGBO_FRAME'] = explode (",", $frvalues); |
---|
53 | |
---|
54 | } |
---|
55 | function plugin_activate() |
---|
56 | { global $prefixeTable,$conf,$ttvalues,$plugvalues,$frvalues; |
---|
57 | /////////////////////////////////////////////////// |
---|
58 | // Vérification de la config, si pas bon -> reinstallation |
---|
59 | $plugvalues = "true,true,true,true,true,true,true,theAboutPage;theTagsPage;theCommentsPage;theIdentificationPage;theAdminPage,true,true"; |
---|
60 | $ttvalues = "150,2,#fff,#000,#c92,#dadada"; |
---|
61 | $frvalues = "#16195f,#ffffff,3,#040404,1,#ffffff,7,#ffffff,1,#fdfdfd,1,#fcfcfc,1,#fafafa,1,#eaeaea,1,#d3d3d3,1,#bababa,1,#9f9f9f,1,#858585,1,#777777,1,#646464,1,#575757,1,#474747,1"; |
---|
62 | // |
---|
63 | if ( (!isset($conf['LLGBO'])) or (substr_count($conf['LLGBO'], ',') != 9) |
---|
64 | or (!isset($conf['LLGBOTOOLTIP'])) or (substr_count($conf['LLGBOTOOLTIP'], ',') != 5) |
---|
65 | or (!isset($conf['LLGBOFRAME'])) or (substr_count($conf['LLGBOFRAME'], ',') != 32)) |
---|
66 | { plugin_install(); } |
---|
67 | } |
---|
68 | |
---|
69 | function plugin_uninstall() |
---|
70 | { global $prefixeTable; |
---|
71 | $q = ' |
---|
72 | DELETE FROM '.CONFIG_TABLE.' WHERE param like "LLGBO%" LIMIT 4;'; |
---|
73 | pwg_query( $q ); |
---|
74 | } |
---|
75 | |
---|
76 | ?> |
---|