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

Revision 11392, 1.4 KB checked in by mistic100, 9 years ago (diff)

add a list of all SmartAlbums

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');
17define('SMART_ADMIN', get_root_url().'admin.php?page=plugin-' . SMART_DIR);
18
19add_event_handler('invalidate_user_cache', 'smart_make_all_associations');
20include_once(SMART_PATH.'include/functions.inc.php');
21
22if (script_basename() == 'index')
23{
24  add_event_handler('loc_end_section_init', 'smart_init_page_items');
25  include_once(SMART_PATH.'include/init_page_items.php');
26}
27else if (script_basename() == 'admin')
28{
29  load_language('plugin.lang', SMART_PATH);
30 
31  add_event_handler('loc_begin_cat_modify', 'smart_cat_modify'); 
32  include_once(SMART_PATH.'include/init_cat_modify.php');
33 
34  add_event_handler('loc_begin_cat_list', 'smart_cat_list');
35  include_once(SMART_PATH.'include/init_cat_list.php');
36 
37  add_event_handler('get_admin_plugin_menu_links', 'smart_admin_menu');
38        function smart_admin_menu($menu) 
39        {
40                array_push($menu, array(
41                        'NAME' => 'SmartAlbums',
42                        'URL' => SMART_ADMIN,
43      )
44    );
45                return $menu;
46        }
47}
48
49?>
Note: See TracBrowser for help on using the repository browser.