source: extensions/CommentEditor/main.inc.php @ 3462

Last change on this file since 3462 was 3462, checked in by Criss, 15 years ago

Display edit block on picture page if request comes from this page
Add simple administration configuration management
Add and remove default configuration from databaseon plugin install / uninstall

  • Property svn:eol-style set to LF
File size: 2.4 KB
RevLine 
[3426]1<?php
[3462]2/* $Id: main.inc.php,v 1.13 2009/06/26 09:49:12 Criss Exp $ */
[3426]3/*
4 Plugin Name: Comment Editor
[3462]5 Version: 1.0.h
[3426]6 Description: Allow to edit comment
[3431]7 Plugin URI: http://piwigo.org/ext/extension_view.php?eid=296
[3426]8 Author: Criss
9 Author URI: http://piwigo.org/
10*/
11
[3431]12/** History **
13
[3462]14  2009-06-?? 1.0.h
15                    Display edit block on picture page if request comes
16                    from this page
17                    Add simple administration configuration management
18                    Add and remove default configuration from database
19                    on plugin install / uninstall
[3443]20
[3462]21  2009-06-22 1.0.g
22                    Deactivate anti-flood on update
23                    Adviser can edit only its comments
24                    Language file converted in UTF-8
25                    Add home link in edit and message block title bar
[3439]26
[3462]27  2009-06-22 1.0.f
28                    Add edit link for author even if he's not an admin
29                    Code cleanup
[3436]30
[3462]31  2009-06-18 1.0.e
32                    Check existence of function update_user_comment()
[3434]33
[3462]34  2009-06-18 1.0.d
35                    Improve sanity checking
[3433]36
[3462]37  2009-06-18 1.0.c
38                    Add maintain.inc.php file
39                    Fix bug in CE_Comment::validateAuthor()
[3431]40
[3462]41  2009-06-18 1.0.b
42                    Fix plugin URI to be available in plugin update
43                    check page.
44                    Reduce code line size.
45
[3431]46*/
[3426]47if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!');
48
[3462]49define('CE_VERSION',  '1.0.h');
50define('CE_PATH',     PHPWG_PLUGINS_PATH.basename(dirname(__FILE__)).'/');
51define('CE_ROOT',     dirname(__FILE__).'/');
[3426]52include_once(CE_PATH . 'include/ce_common.inc.php');
53
[3462]54$ce_config = new CE_Config($ce_config_default);
55$ce_plugin = new CE_Plugin($plugin['id'], $ce_config);
[3426]56
[3462]57add_event_handler('get_admin_plugin_menu_links',
58                  array(&$ce_plugin, 'get_admin_plugin_menu_links'));
59add_event_handler('render_comment_content',
60                  array(&$ce_plugin, 'render_comment_content'));
61add_event_handler('loc_begin_page_header',
62                  array(&$ce_plugin, 'loc_begin_page_header'));
63switch (script_basename()) {
64  case 'index':
65    add_event_handler('loc_begin_index',
66                      array(&$ce_plugin, 'loc_begin_index'), 1);
67    break;
68  case 'picture':
69    add_event_handler('loc_begin_picture',
70                      array(&$ce_plugin, 'loc_begin_picture'), 1);
71    break;
72  default:
73}
[3426]74set_plugin_data($plugin['id'], $ce_plugin);
75
76?>
Note: See TracBrowser for help on using the repository browser.