source: extensions/bbcode_bar/main.inc.php @ 7157

Revision 6297, 927 bytes checked in by patdenice, 10 years ago (diff)

Compatible 2.1

Line 
1<?php /*
2Plugin Name: BBCode Bar
3Version: auto
4Description: Allow use BBCode for comments and descriptions.
5Plugin URI: http://piwigo.org/ext/extension_view.php?eid=140
6Author: Atadilo & P@t
7*/
8
9if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!');
10
11include_once(dirname(__FILE__).'/bbcode_bar.inc.php');
12
13add_event_handler('init', 'init_bbcode_bar');
14
15function 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
22if (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,
29      array('NAME' => 'BBCode Bar',
30            'URL' => get_admin_plugin_menu_link(dirname(__FILE__) . '/bbcode_bar_admin.php')));
31    return $menu;
32  }
33}
34?>
Note: See TracBrowser for help on using the repository browser.