Ignore:
Timestamp:
Jun 24, 2012, 9:19:27 PM (12 years ago)
Author:
grum
Message:

feature:2641- compatibility with Piwigo 2.4

File:
1 edited

Legend:

Unmodified
Added
Removed
  • extensions/lmt/lmt_root.class.inc.php

    r11342 r16014  
    1414  --------------------------------------------------------------------------- */
    1515include_once(PHPWG_PLUGINS_PATH.'GrumPluginClasses/classes/CommonPlugin.class.inc.php');
    16 include_once(PHPWG_PLUGINS_PATH.'GrumPluginClasses/classes/GPCCss.class.inc.php');
    17 include_once(PHPWG_PLUGINS_PATH.'GrumPluginClasses/classes/GPCAjax.class.inc.php');
    1816
    1917class LMT_root extends CommonPlugin
    2018{
    21   protected $css;   //the css object
    22   protected $css_icn;   //the css object
    23 
    2419  static public $licences=array('BY', 'BY-ND', 'BY-NC', 'BY-NC-ND', 'BY-NC-SA', 'BY-SA', 'CRIGHT', 'CLEFT', 'CC0', 'PD', 'DEFAULT');
    2520
     
    3530
    3631    $this->setTablesList(array('images', 'licence_author'));
    37 
    38     $this->css = new GPCCss(dirname($this->getFileLocation()).'/'.$this->getPluginNameFiles().".css");
    39     $this->css_icn = new GPCCss(dirname($this->getFileLocation()).'/'.$this->getPluginNameFiles()."_icn.css");
    40   }
    41 
    42   /**
    43    * destructor
    44    */
    45   public function __destruct()
    46   {
    47     unset($this->css);
    48     unset($this->css_icn);
    49     parent::__destruct();
    50   }
    51 
    52   public function initEvents()
    53   {
    54     add_event_handler('blockmanager_register_blocks', array(&$this, 'register_blocks') );
    55   }
    56 
    57   /**
    58    * menu block management
    59    */
    60   public function register_blocks()
    61   {
    62   }
    63 
     32  }
     33
     34
     35  public function loadCSS()
     36  {
     37    global $template;
     38
     39    parent::loadCSS();
     40    GPCCore::addUI('gpcCSS');
     41    GPCCore::addHeaderCSS('lmt.css', 'plugins/'.$this->getDirectory().'/'.$this->getPluginNameFiles().".css");
     42    GPCCore::addHeaderCSS('lmt_icn.css', 'plugins/'.$this->getDirectory().'/'.$this->getPluginNameFiles()."_icn.css");
     43  }
    6444
    6545  /**
Note: See TracChangeset for help on using the changeset viewer.