[3609] | 1 | <?php |
---|
| 2 | /* |
---|
[29326] | 3 | Plugin Name: Colored Tags |
---|
[10987] | 4 | Version: auto |
---|
[3609] | 5 | Description: Allow to manage color of tags, as you want... |
---|
[26665] | 6 | Plugin URI: auto |
---|
| 7 | Author: Mistic |
---|
[29326] | 8 | Author URI: http://www.strangeplanet.fr |
---|
[3609] | 9 | */ |
---|
| 10 | |
---|
[26665] | 11 | defined('PHPWG_ROOT_PATH') or die('Hacking attempt!'); |
---|
[3609] | 12 | |
---|
[15149] | 13 | global $prefixeTable, $conf; |
---|
[3609] | 14 | |
---|
[28853] | 15 | define('TYPETAGS_ID', basename(dirname(__FILE__))); |
---|
| 16 | define('TYPETAGS_PATH' , PHPWG_PLUGINS_PATH . TYPETAGS_ID . '/'); |
---|
| 17 | define('TYPETAGS_TABLE' , $prefixeTable . 'typetags'); |
---|
| 18 | define('TYPETAGS_ADMIN', get_root_url().'admin.php?page=plugin-' . TYPETAGS_ID); |
---|
[3609] | 19 | |
---|
[28853] | 20 | include_once(TYPETAGS_PATH . 'include/events_public.inc.php'); |
---|
[15149] | 21 | |
---|
| 22 | |
---|
[28853] | 23 | $conf['TypeTags'] = safe_unserialize($conf['TypeTags']); |
---|
[26665] | 24 | |
---|
| 25 | |
---|
[15149] | 26 | // tags on picture page |
---|
| 27 | /*if (script_basename() == 'picture') |
---|
| 28 | { |
---|
| 29 | add_event_handler('loc_end_picture', 'typetags_picture'); |
---|
| 30 | }*/ |
---|
| 31 | |
---|
| 32 | // tags everywhere |
---|
[26665] | 33 | if ($conf['TypeTags']['show_all'] and script_basename() != 'tags') |
---|
[15149] | 34 | { |
---|
[26665] | 35 | add_event_handler('render_tag_name', 'typetags_render', 0, 2); |
---|
[15149] | 36 | } |
---|
[26665] | 37 | |
---|
[15149] | 38 | // tags on tags page |
---|
[26665] | 39 | add_event_handler('loc_end_tags', 'typetags_tags'); |
---|
| 40 | |
---|
[26855] | 41 | // escape keywords meta |
---|
| 42 | add_event_handler('loc_begin_page_header', 'typetags_escape'); |
---|
[26665] | 43 | |
---|
[26855] | 44 | |
---|
[26665] | 45 | if (defined('IN_ADMIN')) |
---|
[15149] | 46 | { |
---|
[26665] | 47 | add_event_handler('get_admin_plugin_menu_links', 'typetags_admin_menu'); |
---|
[15149] | 48 | |
---|
[26665] | 49 | add_event_handler('loc_begin_admin_page', 'typetags_admin'); |
---|
[15149] | 50 | |
---|
[26665] | 51 | include_once(TYPETAGS_PATH . 'include/events_admin.inc.php'); |
---|
[3609] | 52 | } |
---|