Ignore:
Timestamp:
Jan 28, 2011, 4:54:02 PM (13 years ago)
Author:
grum
Message:

release 3.4.0
fix bug:1984, bug:2109
js file are minified, remove packed files

File:
1 edited

Legend:

Unmodified
Added
Removed
  • extensions/GrumPluginClasses/classes/GPCTranslate.class.inc.php

    r5550 r8961  
    33/* -----------------------------------------------------------------------------
    44  class name     : GPCTranslate
    5   class version  : 2.1.0
    6   plugin version : 3.0.0
    7   date           : 2010-03-31
     5  class version  : 2.1.1
     6  plugin version : 3.4.0
     7  date           : 2011-01-28
    88  ------------------------------------------------------------------------------
    99  author: grum at piwigo.org
    1010  << May the Little SpaceFrog be with you >>
    1111  ------------------------------------------------------------------------------
    12 
    1312
    1413  ------------------------------------------------------------------------------
     
    1918| 2.1.0   | 2010/03/31 | * update class & functions names
    2019|         |            |
     20| 2.1.1   | 2011/01/09 | * fixbug on js loading
    2121|         |            |
    22 |         |            |
     22|         |            | * use GPCCore::addUI function (the class is kept for
     23|         |            |   compatibility with older plugins)
    2324|         |            |
    2425|         |            |
    2526
    2627  ------------------------------------------------------------------------------
    27 
    28 
    2928   class call API in HTML header, and provide a .js file manage API call
    3029        >>  http://code.google.com/apis/ajaxlanguage/
    3130
    3231    - constructor
    33 
    3432   ---------------------------------------------------------------------- */
    3533class GPCTranslate
     
    3735  public function __construct()
    3836  {
    39     add_event_handler('loc_end_page_header', array(&$this, 'loadJS'));
     37    GPCCore::addUI('googleTranslate');
    4038  }
    41 
    42   public function loadJS()
    43   {
    44     global $template;
    45 
    46     $googleload='
    47 <script type="text/javascript" src="http://www.google.com/jsapi"></script>
    48 <script type="text/javascript" src="plugins/'.basename(dirname(__FILE__)).'/google_translate.js"></script>';
    49 
    50     $template->append('head_elements', $googleload);
    51   }
    52 
    5339} //class
    5440
Note: See TracChangeset for help on using the changeset viewer.