source: extensions/grum_plugins_classes-2/genericjs.class.inc.php @ 14974

Last change on this file since 14974 was 3395, checked in by grum, 15 years ago

Add plugin Grum Plugins Class-2

  • Property svn:executable set to *
File size: 1.0 KB
Line 
1<?php
2
3/* -----------------------------------------------------------------------------
4  class name: genericjs
5  class version: 2.0
6  date: 2008-07-20
7  ------------------------------------------------------------------------------
8  author: grum at grum.dnsalias.com
9  << May the Little SpaceFrog be with you >>
10  ------------------------------------------------------------------------------
11
12   this classes provides base functions to add genericjs.js file into html page
13
14   > see genericjs.js file to know javascript functions added
15
16    - constructor genericjs()
17   ---------------------------------------------------------------------- */
18
19
20class genericjs
21{
22  function genericjs()
23  {
24    add_event_handler('loc_end_page_header', array(&$this, 'load_JS'));
25  }
26
27  function load_JS()
28  {
29    global $template;
30
31    $name='plugins/'.basename(dirname(__FILE__)).'/genericjs.js';
32
33    $template->append('head_elements', '<script src="'.$name.'" type="text/javascript"></script>');
34
35  }
36
37} //class
38
39$genericjs=new genericjs();
40
41?>
Note: See TracBrowser for help on using the repository browser.