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