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

Revision 4292, 2.8 KB checked in by EXFTB, 10 years ago (diff)

first global update

  • Property svn:eol-style set to LF
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
33{  global $prefixeTable; 
34   plugin_uninstall(); // en cas de mauvaise deinstallation anterieure
35        $q = '
36INSERT INTO '.CONFIG_TABLE.' (param,value,comment)
37        VALUES
38        ("LLGBO","true,true,true,true,true,true,true,theAboutPage;theTagsPage;theCommentsPage;theIdentificationPage;theAdminPage,true,true,true","Look like gbo settings");';
39  pwg_query($q);
40}
41function plugin_activate()
42{ global $conf; 
43 // Vérification de la config, si pas bon -> reinstallation
44if ((!isset($conf['LLGBO'])) or (substr_count($conf['LLGBO'] , ',') != 10)) {
45         $conf['LLGBO'] = "true,true,true,true,true,true,true,theAboutPage;theTagsPage;theCommentsPage;theIdentificationPage;theAdminPage,true,true,true";
46         plugin_install();}
47}
48
49function  plugin_uninstall()
50{ global $prefixeTable;
51  $q = '
52DELETE FROM '.CONFIG_TABLE.' WHERE param="LLGBO" LIMIT 1;';
53  pwg_query( $q );
54}
55
56?>
Note: See TracBrowser for help on using the repository browser.