1 | <?php |
---|
2 | // +-----------------------------------------------------------------------+ |
---|
3 | // | akBookStyle - a plugin for Piwigo | |
---|
4 | // +-----------------------------------------------------------------------+ |
---|
5 | // | Copyright(C) 2009 Nicolas Roudaire http://www.nikrou.net | |
---|
6 | // | Copyright(C) 2009 vdigital | |
---|
7 | // +-----------------------------------------------------------------------+ |
---|
8 | // | This program is free software; you can redistribute it and/or modify | |
---|
9 | // | it under the terms of the GNU General Public License as published by | |
---|
10 | // | the Free Software Foundation | |
---|
11 | // | | |
---|
12 | // | This program is distributed in the hope that it will be useful, but | |
---|
13 | // | WITHOUT ANY WARRANTY; without even the implied warranty of | |
---|
14 | // | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
---|
15 | // | General Public License for more details. | |
---|
16 | // | | |
---|
17 | // | You should have received a copy of the GNU General Public License | |
---|
18 | // | along with this program; if not, write to the Free Software | |
---|
19 | // | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, | |
---|
20 | // | USA. | |
---|
21 | // +-----------------------------------------------------------------------+ |
---|
22 | |
---|
23 | if (!defined('PHPWG_ROOT_PATH')) { |
---|
24 | die('Hacking attempt!'); |
---|
25 | } |
---|
26 | |
---|
27 | include_once AK_PLUGIN_ROOT . "/include/akContent.class.php"; |
---|
28 | |
---|
29 | $public_content = new akContent($plugin_config); |
---|
30 | |
---|
31 | add_event_handler('loc_begin_index_thumbnails', |
---|
32 | array($public_content, 'loc_begin_index_thumbnails') |
---|
33 | ); |
---|
34 | add_event_handler('loc_end_index_thumbnails', |
---|
35 | array($public_content, 'loc_end_index_thumbnails'), |
---|
36 | EVENT_HANDLER_PRIORITY_NEUTRAL, |
---|
37 | 2 |
---|
38 | ); |
---|
39 | |
---|
40 | if ($public_content->isJsonUrl()) { |
---|
41 | add_event_handler('loc_end_index_thumbnails', |
---|
42 | array($public_content, 'load_thumbnails'), |
---|
43 | EVENT_HANDLER_PRIORITY_NEUTRAL+1, |
---|
44 | 2 |
---|
45 | ); |
---|
46 | } |
---|
47 | ?> |
---|