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

Revision 15733, 1.2 KB checked in by mistic100, 8 years ago (diff)

don't mess up "Letters" tag page

Line 
1<?php
2/*
3Plugin Name: TypeT@gs
4Version: auto
5Description: Allow to manage color of tags, as you want...
6Plugin URI: http://piwigo.org/ext/extension_view.php?eid=166
7Author: Sakkhho & P@t & Mistic
8*/
9
10if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!');
11
12global $prefixeTable, $conf;
13
14define('typetags_PATH' , PHPWG_PLUGINS_PATH . basename(dirname(__FILE__)) . '/');
15define('typetags_TABLE' , $prefixeTable . 'typetags');
16define('typetags_ADMIN', get_root_url().'admin.php?page=plugin-' . basename(dirname(__FILE__)));
17
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
29if ( $conf['TypeTags']['show_all'] and script_basename() != 'tags' )
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
42function typetags_admin_menu($menu)
43{
44  array_push($menu, array(
45    'NAME' => 'TypeT@gs',
46    'URL' => typetags_ADMIN,
47  ));
48  return $menu;
49}
50
51?>
Note: See TracBrowser for help on using the repository browser.