- Timestamp:
- Jan 28, 2011, 4:54:02 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/GrumPluginClasses/classes/GPCTranslate.class.inc.php
r5550 r8961 3 3 /* ----------------------------------------------------------------------------- 4 4 class name : GPCTranslate 5 class version : 2.1. 06 plugin version : 3. 0.07 date : 201 0-03-315 class version : 2.1.1 6 plugin version : 3.4.0 7 date : 2011-01-28 8 8 ------------------------------------------------------------------------------ 9 9 author: grum at piwigo.org 10 10 << May the Little SpaceFrog be with you >> 11 11 ------------------------------------------------------------------------------ 12 13 12 14 13 ------------------------------------------------------------------------------ … … 19 18 | 2.1.0 | 2010/03/31 | * update class & functions names 20 19 | | | 20 | 2.1.1 | 2011/01/09 | * fixbug on js loading 21 21 | | | 22 | | | 22 | | | * use GPCCore::addUI function (the class is kept for 23 | | | compatibility with older plugins) 23 24 | | | 24 25 | | | 25 26 26 27 ------------------------------------------------------------------------------ 27 28 29 28 class call API in HTML header, and provide a .js file manage API call 30 29 >> http://code.google.com/apis/ajaxlanguage/ 31 30 32 31 - constructor 33 34 32 ---------------------------------------------------------------------- */ 35 33 class GPCTranslate … … 37 35 public function __construct() 38 36 { 39 add_event_handler('loc_end_page_header', array(&$this, 'loadJS'));37 GPCCore::addUI('googleTranslate'); 40 38 } 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 53 39 } //class 54 40
Note: See TracChangeset
for help on using the changeset viewer.