source: extensions/Admin_Messages/main.inc.php @ 32840

Last change on this file since 32840 was 32642, checked in by plg, 3 years ago

compatibility Piwigo 12

File size: 1.6 KB
Line 
1<?php
2/*
3Plugin Name: Admin Messages
4Version: auto
5Description: Allows administrators to leave messages on the main admin page.
6Plugin URI: http://piwigo.org/ext/extension_view.php?eid=505
7Author: Mistic
8Author URI: http://www.strangeplanet.fr
9Has Settings: true
10*/
11
12if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!');
13
14global $prefixeTable;
15
16// +-----------------------------------------------------------------------+
17//        Variables globales AM
18// +-----------------------------------------------------------------------+
19define('AM_DIR' , basename(dirname(__FILE__)));
20define('AM_PATH' , PHPWG_PLUGINS_PATH . AM_DIR . '/');
21define('AM_TABLE', $prefixeTable .'admin_messages');
22define('AM_ADMIN', get_root_url() . 'admin.php?page=plugin-' . AM_DIR);
23
24
25// +-----------------------------------------------------------------------+
26//          Triggers
27// +-----------------------------------------------------------------------+
28add_event_handler('loc_begin_page_tail', 'AM_load_admin_messages'); // affichage sur admin
29
30// +-----------------------------------------------------------------------+
31//          Fonctions
32// +-----------------------------------------------------------------------+
33
34// affichage sur admin
35function AM_load_admin_messages() {
36  global $template, $page, $conf, $user;
37 
38  if (script_basename() == 'admin' AND defined('IN_ADMIN') AND IN_ADMIN 
39    AND isset($page['body_id']) AND $page['body_id']=='theAdminPage' 
40    AND $page['page'] == 'intro') 
41  {
42    include(AM_PATH . 'admin_messages.php');
43  }
44}
45?>
Note: See TracBrowser for help on using the repository browser.