source: extensions/lightbox/main.inc.php @ 5097

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/*
3Plugin Name: Lightbox
4Version: auto
5Description: Display pictures in a lightbox.
6Plugin URI: http://fr.piwigo.org/ext/extension_view.php?eid=280
7Author: P@t
8Author URI: http://www.gauchon.com
9*/
10
11define('LIGHTBOX_PATH' , PHPWG_PLUGINS_PATH.basename(dirname(__FILE__)).'/');
12
13add_event_handler('init', 'load_jquery_lightbox_plugin');
14add_event_handler('loc_end_index_thumbnails', 'lightbox_plugin', 40, 2);
15
16function 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
23function lightbox_plugin($tpl_thumbnails_var, $pictures)
24{
25  include(LIGHTBOX_PATH . 'lightbox.php');
26  return $tpl_thumbnails_var;
27}
28
29if (script_basename()  == 'admin')
30  include(dirname(__FILE__).'/admin/functions.inc.php');
31
32?>
Note: See TracBrowser for help on using the repository browser.