source: extensions/Admin_Messages/main.inc.php

Last change on this file was 32642, checked in by plg, 2 years ago

compatibility Piwigo 12

File size: 1.6 KB
RevLine 
[9421]1<?php
2/*
3Plugin Name: Admin Messages
[10982]4Version: auto
[9421]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
[32642]9Has Settings: true
[9421]10*/
11
12if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!');
13
14global $prefixeTable;
15
16// +-----------------------------------------------------------------------+
[12356]17//        Variables globales AM
[9421]18// +-----------------------------------------------------------------------+
19define('AM_DIR' , basename(dirname(__FILE__)));
[9786]20define('AM_PATH' , PHPWG_PLUGINS_PATH . AM_DIR . '/');
[9421]21define('AM_TABLE', $prefixeTable .'admin_messages');
[9786]22define('AM_ADMIN', get_root_url() . 'admin.php?page=plugin-' . AM_DIR);
[9421]23
24
25// +-----------------------------------------------------------------------+
[12356]26//          Triggers
[9421]27// +-----------------------------------------------------------------------+
28add_event_handler('loc_begin_page_tail', 'AM_load_admin_messages'); // affichage sur admin
29
30// +-----------------------------------------------------------------------+
[12356]31//          Fonctions
[9421]32// +-----------------------------------------------------------------------+
33
34// affichage sur admin
35function AM_load_admin_messages() {
[12356]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  }
[9421]44}
45?>
Note: See TracBrowser for help on using the repository browser.