Ignore:
Timestamp:
12/27/09 21:59:11 (10 years ago)
Author:
EXFTB
Message:

LLGBO improve Header management

File:
1 edited

Legend:

Unmodified
Added
Removed
  • extensions/LLGBO2/maintain.inc.php

    r4523 r4574  
    3030if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!'); 
    3131function plugin_install() 
    32 {  global $prefixeTable,$conf,$ttvalues,$plugvalues,$frvalues;  
     32{  global $prefixeTable,$conf,$ttvalues,$plugvalues,$frvalues,$headvalues;  
    3333  plugin_uninstall(); // en cas de mauvaise deinstallation anterieure 
    3434        $q = ' 
     
    4747        ("LLGBOFRAME","'.$frvalues.'","look like gbo frame settings");'; 
    4848  pwg_query($q); 
     49        $q = ' 
     50INSERT INTO '.CONFIG_TABLE.' (param,value,comment) 
     51        VALUES   
     52        ("LLGBOHEADER","'.$headvalues.'","look like gbo header settings");'; 
     53  pwg_query($q); 
    4954   
    5055$conf['LLGBO_SETTINGS'] =  explode("," , $plugvalues); 
    5156$conf['LLGBO_TOOLTIP'] = explode(",",$ttvalues); 
    5257$conf['LLGBO_FRAME'] = explode (",", $frvalues);  
     58$conf['LLGBO_HEADER'] = explode (",", $headvalues); 
    5359  
    5460} 
    5561function plugin_activate() 
    56 { global $prefixeTable,$conf,$ttvalues,$plugvalues,$frvalues;  
     62{ global $prefixeTable,$conf,$ttvalues,$plugvalues,$frvalues,$headvalues;  
    5763 /////////////////////////////////////////////////// 
    5864// Vérification de la config, si pas bon -> reinstallation 
     
    6066$ttvalues = "150,2,#fff,#000,#c92,#dadada"; 
    6167$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"; 
     68$headvalues = "true,false,false,false,false,false,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true"; 
     69 
    6270// 
    6371 if ( (!isset($conf['LLGBO'])) or (substr_count($conf['LLGBO'], ',')  != 9)   
    6472 or  (!isset($conf['LLGBOTOOLTIP'])) or (substr_count($conf['LLGBOTOOLTIP'], ',')  != 5)  
    65  or  (!isset($conf['LLGBOFRAME'])) or (substr_count($conf['LLGBOFRAME'], ',')  != 32))   
     73 or  (!isset($conf['LLGBOFRAME'])) or (substr_count($conf['LLGBOFRAME'], ',')  != 32) 
     74 or  (!isset($conf['LLGBOHEADER'])) or (substr_count($conf['LLGBOHEADER'], ',')  != 21))   
    6675        {         plugin_install(); } 
    6776} 
     
    7079{ global $prefixeTable; 
    7180  $q = ' 
    72 DELETE FROM '.CONFIG_TABLE.' WHERE param like "LLGBO%" LIMIT 4;'; 
     81DELETE FROM '.CONFIG_TABLE.' WHERE param like "LLGBO%" LIMIT 5;'; 
    7382  pwg_query( $q ); 
    7483} 
Note: See TracChangeset for help on using the changeset viewer.