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

Last change on this file since 29492 was 28835, checked in by mistic100, 10 years ago

use new maintain class

File size: 1.2 KB
RevLine 
[9682]1<?php 
2/*
[6297]3Plugin Name: BBCode Bar
[10597]4Version: auto
[6297]5Description: Allow use BBCode for comments and descriptions.
[23278]6Plugin URI: auto
[9682]7Author: Atadilo & P@t & Mistic
[3609]8*/
9
[26076]10defined('PHPWG_ROOT_PATH') or die('Hacking attempt!');
[3609]11
[28835]12define('BBCODE_ID' ,   basename(dirname(__FILE__)));
13define('BBCODE_PATH' , PHPWG_PLUGINS_PATH . BBCODE_ID . '/');
14define('BBCODE_ADMIN', get_root_url() . 'admin.php?page=plugin-' . BBCODE_ID);
[3609]15
[26076]16include_once(BBCODE_PATH.'include/functions.inc.php');
17include_once(BBCODE_PATH.'include/events.inc.php');
18
19
[3609]20add_event_handler('init', 'init_bbcode_bar');
21
[26076]22if (defined('IN_ADMIN'))
[3609]23{
[26076]24  add_event_handler('get_admin_plugin_menu_links', 'bbcode_bar_admin_menu');
[3609]25}
[26076]26else
27{
28  add_event_handler('loc_after_page_header', 'add_bbcode_bar', EVENT_HANDLER_PRIORITY_NEUTRAL+1);
29}
[3609]30
[26076]31add_event_handler('render_comment_content', 'BBCodeParse');
32add_event_handler('render_contact_content', 'BBCodeParse');
33
34
35function init_bbcode_bar()
[11295]36{
[26076]37  global $conf;
[10983]38 
[28835]39  $conf['bbcode_bar'] = safe_unserialize($conf['bbcode_bar']);
[26076]40  $conf['bbcode_bar_codes'] = array('b','i','u','s','p','center','right','quote','ul','ol','img','url','email','size','color');
41 
42  load_language('plugin.lang', BBCODE_PATH);
43 
44  remove_event_handler('render_comment_content', 'render_comment_content');
[9765]45}
Note: See TracBrowser for help on using the repository browser.