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

Last change on this file since 31645 was 29067, checked in by rvelices, 10 years ago

feqture 3101: Allow multi language tags to be recognized from selectize or metadata sync

File size: 2.5 KB
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',        'parse_lang_tag');
48add_event_handler ('render_category_description', 'get_extended_desc', EVENT_HANDLER_PRIORITY_NEUTRAL, 2);
49// tags
50add_event_handler ('render_tag_name',   'parse_lang_tag');
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);
53add_event_handler ('get_tag_name_like_where', 'ed_name_like_where');
54// element
55add_event_handler ('render_element_name',        'parse_lang_tag');
56add_event_handler ('render_element_description', 'get_extended_desc', EVENT_HANDLER_PRIORITY_NEUTRAL, 2);
57// mail/nbm
58add_event_handler ('nbm_render_user_customize_mail_content', 'get_extended_desc');
59add_event_handler ('mail_group_assign_vars',                 'extended_desc_mail_group_assign_vars');
60// removals
61add_event_handler ('loc_end_index_category_thumbnails', 'ext_remove_cat', EVENT_HANDLER_PRIORITY_NEUTRAL, 2);
62add_event_handler ('loc_end_index_thumbnails',          'ext_remove_image', EVENT_HANDLER_PRIORITY_NEUTRAL, 2);
63add_event_handler ('get_categories_menu_sql_where',     'ext_remove_menubar_cats');
Note: See TracBrowser for help on using the repository browser.