source: extensions/SmartAlbums/main.inc.php @ 11381

Last change on this file since 11381 was 11380, checked in by mistic100, 13 years ago

add filters on date_creation fields, remove 'make associations on login'

File size: 1.4 KB
Line 
1<?php
2/*
3Plugin Name: SmartAlbums
4Version: auto
5Description: Easily create dynamic albums with tags, date and other criteria
6Plugin URI: http://piwigo.org/ext/extension_view.php?eid=544
7Author: Mistic
8Author URI: http://www.strangeplanet.fr
9*/
10
11if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!');
12global $prefixeTable;
13
14define('SMART_DIR', basename(dirname(__FILE__)));
15define('SMART_PATH', PHPWG_PLUGINS_PATH.SMART_DIR.'/');
16define('CATEGORY_FILTERS_TABLE', $prefixeTable.'category_filters');
17
18add_event_handler('invalidate_user_cache', 'smart_make_all_associations');
19include_once(SMART_PATH.'include/functions.inc.php');
20
21if (script_basename() == 'index')
22{
23  add_event_handler('loc_end_section_init', 'smart_init_page_items');
24  include_once(SMART_PATH.'include/init_page_items.php');
25}
26else if (script_basename() == 'admin')
27{
28  load_language('plugin.lang', SMART_PATH);
29 
30  add_event_handler('loc_begin_cat_modify', 'smart_cat_modify'); 
31  include_once(SMART_PATH.'include/init_cat_modify.php');
32 
33  add_event_handler('loc_begin_cat_list', 'smart_cat_list');
34  include_once(SMART_PATH.'include/init_cat_list.php');
35 
36  add_event_handler('get_admin_plugin_menu_links', 'smart_admin_menu');
37        function smart_admin_menu($menu) 
38        {
39                array_push($menu, array(
40                        'NAME' => 'SmartAlbums',
41                        'URL' => get_root_url().'admin.php?page=plugin-' . SMART_DIR));
42                return $menu;
43        }
44}
45
46?>
Note: See TracBrowser for help on using the repository browser.