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

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

code cleanup

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