Changeset 26665 for extensions/typetags/main.inc.php
- Timestamp:
- Jan 12, 2014, 7:13:40 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/typetags/main.inc.php
r21361 r26665 1 1 <?php 2 2 /* 3 Plugin Name: TypeT@gs3 Plugin Name: Coloured Tags (TypeT@gs) 4 4 Version: auto 5 5 Description: Allow to manage color of tags, as you want... 6 Plugin URI: http://piwigo.org/ext/extension_view.php?eid=1667 Author: Sakkhho & P@t &Mistic6 Plugin URI: auto 7 Author: Mistic 8 8 */ 9 9 10 if (!defined('PHPWG_ROOT_PATH'))die('Hacking attempt!');10 defined('PHPWG_ROOT_PATH') or die('Hacking attempt!'); 11 11 12 12 global $prefixeTable, $conf; 13 13 14 define('typetags_PATH' , PHPWG_PLUGINS_PATH . basename(dirname(__FILE__)) . '/'); 15 define('typetags_TABLE' , $prefixeTable . 'typetags'); 16 define('typetags_ADMIN', get_root_url().'admin.php?page=plugin-' . basename(dirname(__FILE__))); 14 define('TYPETAGS_ID', basename(dirname(__FILE__))); 15 define('TYPETAGS_PATH' , PHPWG_PLUGINS_PATH . TYPETAGS_ID . '/'); 16 define('TYPETAGS_TABLE' , $prefixeTable . 'typetags'); 17 define('TYPETAGS_ADMIN', get_root_url().'admin.php?page=plugin-' . TYPETAGS_ID); 18 define('TYPETAGS_VERSION', 'auto'); 17 19 18 20 19 include_once(typetags_PATH . 'typetags.php');20 21 $conf['TypeTags'] = unserialize($conf['TypeTags']); 22 23 24 include_once(TYPETAGS_PATH . 'include/events_public.inc.php'); 21 25 22 26 // tags on picture page … … 27 31 28 32 // tags everywhere 29 if ( $conf['TypeTags']['show_all'] and script_basename() != 'tags')33 if ($conf['TypeTags']['show_all'] and script_basename() != 'tags') 30 34 { 31 add_event_handler('render_tag_name', 'typetags_render', 0); 32 } 33 // tags on tags page 34 else if (script_basename() == 'tags') 35 { 36 add_event_handler('loc_begin_page_header', 'typetags_tags'); 35 add_event_handler('render_tag_name', 'typetags_render', 0, 2); 37 36 } 38 37 38 // tags on tags page 39 add_event_handler('loc_end_tags', 'typetags_tags'); 39 40 40 add_event_handler('get_admin_plugin_menu_links', 'typetags_admin_menu');41 41 42 function typetags_admin_menu($menu)42 if (defined('IN_ADMIN')) 43 43 { 44 a rray_push($menu, array(45 'NAME' => 'TypeT@gs', 46 'URL' => typetags_ADMIN,47 )); 48 return $menu;44 add_event_handler('get_admin_plugin_menu_links', 'typetags_admin_menu'); 45 46 add_event_handler('loc_begin_admin_page', 'typetags_admin'); 47 48 include_once(TYPETAGS_PATH . 'include/events_admin.inc.php'); 49 49 } 50 51 ?>
Note: See TracChangeset
for help on using the changeset viewer.