source: extensions/LLGBO2/maintain.inc.php @ 11899

Last change on this file since 11899 was 6548, checked in by EXFTB, 14 years ago

2.1.e fix $confquestion_mark_in_urls = false

  • Property svn:eol-style set to LF
File size: 3.7 KB
Line 
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// ******************************************
30if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!');
31function plugin_install()
32{  global $prefixeTable,$conf; 
33if (!defined('LLGBO_PATH'))
34{define('LLGBO_PATH' ,get_root_url().'plugins/'.basename(dirname(__FILE__)). '/');}
35include(LLGBO_PATH.'defaultvalues.php');
36  plugin_uninstall(); // en cas de mauvaise deinstallation anterieure
37        $q = '
38INSERT INTO '.CONFIG_TABLE.' (param,value,comment)
39        VALUES 
40        ("LLGBO","'.$plugvalues.'","look like gbo global settings");';
41  pwg_query($q);
42        $q = '
43INSERT INTO '.CONFIG_TABLE.' (param,value,comment)
44        VALUES 
45        ("LLGBOTOOLTIP","'.$ttvalues.'","look like gbo tooltip settings");';
46  pwg_query($q);
47        $q = '
48INSERT INTO '.CONFIG_TABLE.' (param,value,comment)
49        VALUES 
50        ("LLGBOFRAME","'.$frvalues.'","look like gbo frame settings");';
51  pwg_query($q);
52        $q = '
53INSERT INTO '.CONFIG_TABLE.' (param,value,comment)
54        VALUES 
55        ("LLGBOHEADER","'.$headvalues.'","look like gbo header settings");';
56  pwg_query($q);
57 
58$conf['LLGBO_SETTINGS'] =  explode("," , $plugvalues);
59$conf['LLGBO_TOOLTIP'] = explode(",",$ttvalues);
60$conf['LLGBO_FRAME'] = explode (",", $frvalues); 
61$conf['LLGBO_HEADER'] = explode (",", $headvalues);
62 
63}
64function plugin_activate()
65{ global $prefixeTable,$conf; 
66 ///////////////////////////////////////////////////
67// Vérification de la config, si pas bon -> reinstallation
68
69//
70 if ( (!isset($conf['LLGBO'])) or (substr_count($conf['LLGBO'], ',')  != 10) 
71 or  (!isset($conf['LLGBOTOOLTIP'])) or (substr_count($conf['LLGBOTOOLTIP'], ',')  != 5) 
72 or  (!isset($conf['LLGBOFRAME'])) or (substr_count($conf['LLGBOFRAME'], ',')  != 32)
73 or  (!isset($conf['LLGBOHEADER'])) or (substr_count($conf['LLGBOHEADER'], ',')  != 20)) 
74        {       
75        plugin_install(); }
76}
77
78function plugin_uninstall()
79{ global $prefixeTable;
80   $q = '
81DELETE FROM '.CONFIG_TABLE.' WHERE param like "LLGBO%" LIMIT 5;';
82  pwg_query( $q );
83}
84
85?>
Note: See TracBrowser for help on using the repository browser.