1 | <?php |
---|
2 | /* $Id: main.inc.php,v 1.8 2009/06/22 12:25:04 Criss Exp $ */ |
---|
3 | /* |
---|
4 | Plugin Name: Comment Editor |
---|
5 | Version: 1.0.f |
---|
6 | Description: Allow to edit comment |
---|
7 | Plugin URI: http://piwigo.org/ext/extension_view.php?eid=296 |
---|
8 | Author: Criss |
---|
9 | Author URI: http://piwigo.org/ |
---|
10 | */ |
---|
11 | |
---|
12 | /** History ** |
---|
13 | |
---|
14 | 2009-06-22 1.0.f |
---|
15 | Add edit link for author even if he's not an admin |
---|
16 | Code cleanup |
---|
17 | |
---|
18 | 2009-06-18 1.0.e |
---|
19 | Check existence of function update_user_comment() |
---|
20 | |
---|
21 | 2009-06-18 1.0.d |
---|
22 | Improve sanity checking |
---|
23 | |
---|
24 | 2009-06-18 1.0.c |
---|
25 | Add maintain.inc.php file |
---|
26 | Fix bug in CE_Comment::validateAuthor() |
---|
27 | |
---|
28 | 2009-06-18 1.0.b |
---|
29 | Fix plugin URI to be available in plugin update |
---|
30 | check page. |
---|
31 | Reduce code line size. |
---|
32 | |
---|
33 | */ |
---|
34 | if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!'); |
---|
35 | |
---|
36 | define('CE_PATH', PHPWG_PLUGINS_PATH.basename(dirname(__FILE__)).'/'); |
---|
37 | define('CE_ROOT', dirname(__FILE__).'/'); |
---|
38 | include_once(CE_PATH . 'include/ce_common.inc.php'); |
---|
39 | |
---|
40 | |
---|
41 | $ce_plugin = new CE_Plugin(); |
---|
42 | add_event_handler( 'render_comment_content', |
---|
43 | array(&$ce_plugin, 'render_comment_content')); |
---|
44 | add_event_handler( 'loc_begin_page_header', |
---|
45 | array(&$ce_plugin, 'loc_begin_page_header')); |
---|
46 | add_event_handler( 'loc_begin_index', |
---|
47 | array(&$ce_plugin, 'loc_end_index'), 1); |
---|
48 | |
---|
49 | set_plugin_data($plugin['id'], $ce_plugin); |
---|
50 | |
---|
51 | ?> |
---|