[16591] | 1 | <?php |
---|
| 2 | /* |
---|
| 3 | Plugin Name: User Collections |
---|
| 4 | Version: auto |
---|
[16597] | 5 | Description: Registered users can select pictures from the gallery and save them into collections, like advanced favorites. |
---|
| 6 | Plugin URI: http://piwigo.org/ext/extension_view.php?eid=615 |
---|
[16591] | 7 | Author: Mistic |
---|
| 8 | Author URI: http://www.strangeplanet.fr |
---|
| 9 | */ |
---|
| 10 | |
---|
| 11 | defined('PHPWG_ROOT_PATH') or die('Hacking attempt!'); |
---|
| 12 | |
---|
| 13 | global $conf, $prefixeTable; |
---|
| 14 | |
---|
[16597] | 15 | define('USER_COLLEC_PATH', PHPWG_PLUGINS_PATH . basename(dirname(__FILE__)) . '/'); |
---|
| 16 | define('COLLECTIONS_TABLE', $prefixeTable.'collections'); |
---|
[16591] | 17 | define('COLLECTION_IMAGES_TABLE',$prefixeTable.'collection_images'); |
---|
[16597] | 18 | define('USER_COLLEC_ADMIN', get_root_url() . 'admin.php?page=plugin-' . basename(dirname(__FILE__))); |
---|
| 19 | define('USER_COLLEC_PUBLIC', make_index_url(array('section' => 'collections')) . '/'); |
---|
[16591] | 20 | |
---|
| 21 | |
---|
| 22 | add_event_handler('init', 'user_collections_init'); |
---|
| 23 | |
---|
| 24 | add_event_handler('loc_end_section_init', 'user_collections_section_init'); |
---|
| 25 | add_event_handler('loc_end_index', 'user_collections_page'); |
---|
| 26 | |
---|
| 27 | add_event_handler('loc_end_index', 'user_collections_index_actions'); |
---|
| 28 | add_event_handler('loc_end_index_thumbnails', 'user_collections_thumbnails_list', EVENT_HANDLER_PRIORITY_NEUTRAL, 2); |
---|
| 29 | |
---|
| 30 | add_event_handler('loc_end_picture', 'user_collections_picture_page'); |
---|
| 31 | |
---|
| 32 | add_event_handler('blockmanager_register_blocks', 'user_collections_add_menublock'); |
---|
| 33 | add_event_handler('blockmanager_apply', 'user_collections_applymenu'); |
---|
| 34 | |
---|
| 35 | require(USER_COLLEC_PATH . 'include/functions.inc.php'); |
---|
| 36 | require(USER_COLLEC_PATH . 'include/UserCollection.class.php'); |
---|
| 37 | require(USER_COLLEC_PATH . 'include/events.inc.php'); |
---|
| 38 | |
---|
| 39 | ?> |
---|