source: extensions/SmiliesSupport/main.inc.php @ 30871

Last change on this file since 30871 was 28849, checked in by mistic100, 10 years ago

use new maintain class

File size: 1.3 KB
Line 
1<?php
2/*
3Plugin Name: Smilies Support
4Version: auto
5Description: Allow add Smilies for comments and descriptions.
6Plugin URI: auto
7Author: Atadilo & P@t & Mistic
8*/
9
10defined('PHPWG_ROOT_PATH') or die('Hacking attempt!');
11
12define('SMILIES_ID',      basename(dirname(__FILE__)));
13define('SMILIES_PATH',    PHPWG_PLUGINS_PATH . SMILIES_ID . '/');
14define('SMILIES_DIR',     SMILIES_PATH . 'smilies/');
15define('SMILIES_ADMIN',   get_root_url() . 'admin.php?page=plugin-' . SMILIES_ID);
16
17include_once(SMILIES_PATH.'include/functions.inc.php');
18include_once(SMILIES_PATH.'include/events.inc.php');
19
20
21add_event_handler('init', 'init_smiliessupport');
22
23if (defined('IN_ADMIN'))
24{
25  add_event_handler('init', 'smiliessupport_action');
26  add_event_handler('get_admin_plugin_menu_links', 'smiliessupport_admin_menu');
27}
28else if (!mobile_theme())
29{
30  add_event_handler('loc_after_page_header', 'add_smiliessupport', EVENT_HANDLER_PRIORITY_NEUTRAL+2);
31}
32
33add_event_handler('render_comment_content', 'SmiliesParse', EVENT_HANDLER_PRIORITY_NEUTRAL+10);
34add_event_handler('render_contact_content', 'SmiliesParse');
35
36
37function init_smiliessupport()
38{
39  global $conf;
40 
41  $conf['smiliessupport'] = safe_unserialize($conf['smiliessupport']);
42  $conf['smiliessupport_ext'] = array('gif', 'jpg', 'png', 'GIF', 'JPG', 'PNG');
43 
44  load_language('plugin.lang', SMILIES_PATH);
45}
Note: See TracBrowser for help on using the repository browser.