source: extensions/PersoFooter/main.inc.php @ 28752

Last change on this file since 28752 was 23487, checked in by ddtddt, 11 years ago

[extensions] - PersoFooter - exclude popup help - idea hkdigit

File size: 1.3 KB
Line 
1<?php
2/*
3Plugin Name: Perso Footer
4Version: auto
5Description: Add information in the footer
6Plugin URI: http://piwigo.org/ext/extension_view.php?eid=554
7Author: ddtddt
8Author URI: http://piwigo.org/
9*/
10
11if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!');
12
13define('PFT_DIR' , basename(dirname(__FILE__)));
14define('PFT_PATH' , PHPWG_PLUGINS_PATH . PFT_DIR . '/');
15
16add_event_handler('get_admin_plugin_menu_links', 'PFT_admin_menu');
17function PFT_admin_menu($menu)
18{
19  array_push($menu, array(
20        'NAME' => 'Perso Footer',
21    'URL' => get_admin_plugin_menu_link(PFT_PATH . 'admin/admin.php')));
22  return $menu;
23}
24
25add_event_handler('loc_end_page_tail', 'pft');
26function pft()
27 {
28        global $page;
29   if ((script_basename() != 'admin') and ($page['body_id'] != 'thePopuphelpPage'))
30  {
31        global $template, $conf;
32$PAED = pwg_db_fetch_assoc(pwg_query("SELECT state FROM " . PLUGINS_TABLE . " WHERE id = 'ExtendedDescription';"));
33if($PAED['state'] == 'active') add_event_handler('AP_render_content', 'get_user_language_desc');
34
35$pat=trigger_event('AP_render_content', $conf['persoFooter']);
36                 if (!empty($pat))
37                        {
38                                $template->assign('PERSO_FOOTER2', $pat);
39                        }
40                       
41        $template->set_filename('PERSO_FOOTER', realpath(PFT_PATH.'persofooter.tpl')); 
42        $template->append('footer_elements', $template->parse('PERSO_FOOTER', true));
43        }
44 }
45?>
Note: See TracBrowser for help on using the repository browser.