Last change
on this file since 5097 was
4826,
checked in by patdenice, 15 years ago
|
Load jquery earlier...
Compatibility with AMM.
|
File size:
831 bytes
|
Line | |
---|
1 | <?php |
---|
2 | /* |
---|
3 | Plugin Name: Lightbox |
---|
4 | Version: auto |
---|
5 | Description: Display pictures in a lightbox. |
---|
6 | Plugin URI: http://fr.piwigo.org/ext/extension_view.php?eid=280 |
---|
7 | Author: P@t |
---|
8 | Author URI: http://www.gauchon.com |
---|
9 | */ |
---|
10 | |
---|
11 | define('LIGHTBOX_PATH' , PHPWG_PLUGINS_PATH.basename(dirname(__FILE__)).'/'); |
---|
12 | |
---|
13 | add_event_handler('init', 'load_jquery_lightbox_plugin'); |
---|
14 | add_event_handler('loc_end_index_thumbnails', 'lightbox_plugin', 40, 2); |
---|
15 | |
---|
16 | function load_jquery_lightbox_plugin() |
---|
17 | { |
---|
18 | global $template; |
---|
19 | |
---|
20 | $template->func_known_script(array('id'=>'jquery', 'src'=>get_root_url().'plugins/lightbox/jquery.min.js'), $smarty); |
---|
21 | } |
---|
22 | |
---|
23 | function lightbox_plugin($tpl_thumbnails_var, $pictures) |
---|
24 | { |
---|
25 | include(LIGHTBOX_PATH . 'lightbox.php'); |
---|
26 | return $tpl_thumbnails_var; |
---|
27 | } |
---|
28 | |
---|
29 | if (script_basename() == 'admin') |
---|
30 | include(dirname(__FILE__).'/admin/functions.inc.php'); |
---|
31 | |
---|
32 | ?> |
---|
Note: See
TracBrowser
for help on using the repository browser.