Rev | Line | |
---|
[3609] | 1 | <?php /* |
---|
[6297] | 2 | Plugin Name: BBCode Bar |
---|
| 3 | Version: auto |
---|
| 4 | Description: Allow use BBCode for comments and descriptions. |
---|
| 5 | Plugin URI: http://piwigo.org/ext/extension_view.php?eid=140 |
---|
| 6 | Author: Atadilo & P@t |
---|
[3609] | 7 | */ |
---|
| 8 | |
---|
| 9 | if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!'); |
---|
| 10 | |
---|
| 11 | include_once(dirname(__FILE__).'/bbcode_bar.inc.php'); |
---|
| 12 | |
---|
| 13 | add_event_handler('init', 'init_bbcode_bar'); |
---|
| 14 | |
---|
| 15 | function init_bbcode_bar() |
---|
| 16 | { |
---|
| 17 | remove_event_handler('render_comment_content', 'parse_comment_content' ); |
---|
| 18 | add_event_handler('render_comment_content', 'BBCodeParse'); |
---|
| 19 | add_event_handler('loc_begin_picture', 'set_bbcode_bar'); |
---|
| 20 | } |
---|
| 21 | |
---|
| 22 | if (script_basename() == 'admin') |
---|
| 23 | { |
---|
| 24 | add_event_handler('get_admin_plugin_menu_links', 'bbcode_bar_admin_menu'); |
---|
| 25 | |
---|
| 26 | function bbcode_bar_admin_menu($menu) |
---|
| 27 | { |
---|
| 28 | array_push($menu, |
---|
[6297] | 29 | array('NAME' => 'BBCode Bar', |
---|
[3609] | 30 | 'URL' => get_admin_plugin_menu_link(dirname(__FILE__) . '/bbcode_bar_admin.php'))); |
---|
| 31 | return $menu; |
---|
| 32 | } |
---|
| 33 | } |
---|
[3305] | 34 | ?> |
---|
Note: See
TracBrowser
for help on using the repository browser.