Last change
on this file since 9682 was
9682,
checked in by mistic100, 14 years ago
|
[extentions] BBcode Bar
- compatibility with Piwigo 2.2.0
- many corrections
|
File size:
1005 bytes
|
Line | |
---|
1 | <?php |
---|
2 | /* |
---|
3 | Plugin Name: BBCode Bar |
---|
4 | Version: 2.2.0 |
---|
5 | Description: Allow use BBCode for comments and descriptions. |
---|
6 | Plugin URI: http://piwigo.org/ext/extension_view.php?eid=140 |
---|
7 | Author: Atadilo & P@t & Mistic |
---|
8 | */ |
---|
9 | |
---|
10 | if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!'); |
---|
11 | |
---|
12 | define('BBcode_DIR' , basename(dirname(__FILE__))); |
---|
13 | define('BBcode_PATH' , PHPWG_PLUGINS_PATH . BBcode_DIR . '/'); |
---|
14 | |
---|
15 | include_once(BBcode_PATH.'bbcode_bar.inc.php'); |
---|
16 | add_event_handler('init', 'init_bbcode_bar'); |
---|
17 | |
---|
18 | function init_bbcode_bar() |
---|
19 | { |
---|
20 | remove_event_handler('render_comment_content', 'render_comment_content'); |
---|
21 | add_event_handler('render_comment_content', 'BBCodeParse'); |
---|
22 | add_event_handler('loc_begin_picture', 'set_bbcode_bar'); |
---|
23 | } |
---|
24 | |
---|
25 | if (script_basename() == 'admin') |
---|
26 | { |
---|
27 | add_event_handler('get_admin_plugin_menu_links', 'bbcode_bar_admin_menu'); |
---|
28 | function bbcode_bar_admin_menu($menu) |
---|
29 | { |
---|
30 | array_push($menu, array( |
---|
31 | 'NAME' => 'BBCode Bar', |
---|
32 | 'URL' => get_root_url().'admin.php?page=plugin-' . BBcode_DIR |
---|
33 | )); |
---|
34 | return $menu; |
---|
35 | } |
---|
36 | } |
---|
37 | ?> |
---|
Note: See
TracBrowser
for help on using the repository browser.