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

Last change on this file since 9789 was 9789, checked in by mistic100, 13 years ago

[extentions] Smilies Support

File size: 1.0 KB
Line 
1<?php
2/*
3Plugin Name: Smilies Support
4Version: 2.2.a
5Description: Allow add Smilies for comments and descriptions.
6Plugin URI: http://piwigo.org/ext/extension_view.php?eid=159
7Author: Atadilo & P@t & Mistic
8*/
9
10if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!');
11
12define('SMILIES_DIR' , basename(dirname(__FILE__)));
13define('SMILIES_PATH' , PHPWG_PLUGINS_PATH . SMILIES_DIR . '/');
14
15include_once(SMILIES_PATH.'smiliessupport.inc.php');
16
17add_event_handler('render_comment_content', 'SmiliesParse', 60);
18add_event_handler('loc_after_page_header', 'add_smiliessupport');
19
20function add_smiliessupport() {
21        global $page;
22        if ($page['body_id'] == 'theCommentsPage' OR $page['body_id'] == 'thePicturePage') {
23                set_smiliessupport_page();
24        }
25}
26
27if (script_basename() == 'admin')
28{
29        add_event_handler('get_admin_plugin_menu_links', 'smiliessupport_admin_menu');
30        function smiliessupport_admin_menu($menu) 
31        {
32                array_push($menu, array(
33                        'NAME' => 'Smilies Support',
34                        'URL' => get_root_url().'admin.php?page=plugin-' . SMILIES_DIR));
35                return $menu;
36        }
37}
38?>
Note: See TracBrowser for help on using the repository browser.