source: extensions/typetags/main.inc.php @ 15907

Last change on this file since 15907 was 15733, checked in by mistic100, 12 years ago

don't mess up "Letters" tag page

File size: 1.2 KB
RevLine 
[3609]1<?php
2/*
3Plugin Name: TypeT@gs
[10987]4Version: auto
[3609]5Description: Allow to manage color of tags, as you want...
6Plugin URI: http://piwigo.org/ext/extension_view.php?eid=166
[9829]7Author: Sakkhho & P@t & Mistic
[3609]8*/
9
10if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!');
11
[15149]12global $prefixeTable, $conf;
[3609]13
[15149]14define('typetags_PATH' , PHPWG_PLUGINS_PATH . basename(dirname(__FILE__)) . '/');
[3609]15define('typetags_TABLE' , $prefixeTable . 'typetags');
[15149]16define('typetags_ADMIN', get_root_url().'admin.php?page=plugin-' . basename(dirname(__FILE__)));
[3609]17
[15149]18
19include(typetags_PATH . 'typetags.php');
20$conf['TypeTags'] = unserialize($conf['TypeTags']);
21
22// tags on picture page
23/*if (script_basename() == 'picture')
24{
25  add_event_handler('loc_end_picture', 'typetags_picture');
26}*/
27
28// tags everywhere
[15733]29if ( $conf['TypeTags']['show_all'] and script_basename() != 'tags' )
[15149]30{
31  add_event_handler('render_tag_name', 'typetags_render', 0);
32}
33// tags on tags page
34else if (script_basename() == 'tags')
35{
36  add_event_handler('loc_begin_page_header', 'typetags_tags');
37}
38
39
40add_event_handler('get_admin_plugin_menu_links', 'typetags_admin_menu');
41
[3609]42function typetags_admin_menu($menu)
43{
44  array_push($menu, array(
45    'NAME' => 'TypeT@gs',
[9863]46    'URL' => typetags_ADMIN,
[9829]47  ));
[3609]48  return $menu;
49}
50
[3301]51?>
Note: See TracBrowser for help on using the repository browser.