source: extensions/ExtendedDescription/main.inc.php @ 27028

Revision 26430, 2.5 KB checked in by mistic100, 6 years ago (diff)

slip help files + add entry in plugins list

Line 
1<?php
2/*
3Plugin Name: Extended Description
4Version: auto
5Description: Add multilinguale descriptions, banner, NMB, category name, etc...
6Plugin URI: http://piwigo.org/ext/extension_view.php?eid=175
7Author: P@t & Grum
8*/
9
10defined('PHPWG_ROOT_PATH') or die('Hacking attempt!');
11
12define('EXTENDED_DESC_PATH' , PHPWG_PLUGINS_PATH . basename(dirname(__FILE__)) . '/');
13
14
15global $conf;
16
17$extdesc_conf = array(
18  'more'           => '<!--more-->',
19  'complete'       => '<!--complete-->',
20  'up-down'        => '<!--up-down-->',
21  'not_visible'    => '<!--hidden-->',
22  'mb_not_visible' => '<!--mb-hidden-->'
23);
24
25$conf['ExtendedDescription'] = isset($conf['ExtendedDescription']) ?
26  array_merge($extdesc_conf, $conf['ExtendedDescription']) :
27  $extdesc_conf;
28
29
30include_once(EXTENDED_DESC_PATH . 'include/events.inc.php');
31include_once(EXTENDED_DESC_PATH . 'include/functions.inc.php');
32
33if (script_basename() == 'admin' or script_basename() == 'popuphelp')
34{
35  include_once(EXTENDED_DESC_PATH . 'include/admin.inc.php');
36
37  add_event_handler('get_popup_help_content', 'extended_desc_popup', EVENT_HANDLER_PRIORITY_NEUTRAL, 2);
38  add_event_handler('loc_begin_admin_page', 'add_ed_help');
39  add_event_handler('get_admin_plugin_menu_links', 'extdesc_admin_menu');
40}
41
42
43// main
44add_event_handler ('get_extended_desc',  'get_extended_desc');
45add_event_handler ('render_page_banner', 'get_extended_desc');
46// categories
47add_event_handler ('render_category_name',        'get_user_language_desc');
48add_event_handler ('render_category_description', 'get_extended_desc', EVENT_HANDLER_PRIORITY_NEUTRAL, 2);
49// tags
50add_event_handler ('render_tag_name',   'get_user_language_desc');
51add_event_handler ('render_tag_url',    'get_user_language_tag_url', 40);
52add_event_handler ('get_tag_alt_names', 'ed_get_all_alt_names', EVENT_HANDLER_PRIORITY_NEUTRAL, 2);
53// element
54add_event_handler ('render_element_name',        'get_user_language_desc');
55add_event_handler ('render_element_description', 'get_extended_desc', EVENT_HANDLER_PRIORITY_NEUTRAL, 2);
56// mail/nbm
57add_event_handler ('nbm_render_user_customize_mail_content', 'get_extended_desc');
58add_event_handler ('mail_group_assign_vars',                 'extended_desc_mail_group_assign_vars');
59// removals
60add_event_handler ('loc_end_index_category_thumbnails', 'ext_remove_cat', EVENT_HANDLER_PRIORITY_NEUTRAL, 2);
61add_event_handler ('loc_end_index_thumbnails',          'ext_remove_image', EVENT_HANDLER_PRIORITY_NEUTRAL, 2);
62add_event_handler ('get_categories_menu_sql_where',     'ext_remove_menubar_cats');
Note: See TracBrowser for help on using the repository browser.