source: extensions/PersoFooter/main.inc.php

Last change on this file was 32904, checked in by ddtddt, 15 months ago

[PersoFooter] compatybilité php8

File size: 2.6 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://temmii.com/piwigo/
9Has Settings: webmaster
10*/
11// +-----------------------------------------------------------------------+
12// | Perso Footer plugin for Piwigo by TEMMII                              |
13// +-----------------------------------------------------------------------+
14// | Copyright(C) 2011 - 2023 ddtddt             http://temmii.com/piwigo/ |
15// +-----------------------------------------------------------------------+
16// | This program is free software; you can redistribute it and/or modify  |
17// | it under the terms of the GNU General Public License as published by  |
18// | the Free Software Foundation                                          |
19// |                                                                       |
20// | This program is distributed in the hope that it will be useful, but   |
21// | WITHOUT ANY WARRANTY; without even the implied warranty of            |
22// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU      |
23// | General Public License for more details.                              |
24// |                                                                       |
25// | You should have received a copy of the GNU General Public License     |
26// | along with this program; if not, write to the Free Software           |
27// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
28// | USA.                                                                  |
29// +-----------------------------------------------------------------------+
30
31if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!');
32
33define('PFT_DIR' , basename(dirname(__FILE__)));
34define('PFT_PATH' , PHPWG_PLUGINS_PATH . PFT_DIR . '/');
35define('PFT_ADMIN',get_root_url().'admin.php?page=plugin-'.PFT_DIR);
36
37add_event_handler('loc_end_page_tail', 'pft');
38function pft(){
39global $page, $pwg_loaded_plugins;
40  if ((script_basename() != 'admin') and (isset($page['body_id']) and ($page['body_id'] != 'thePopuphelpPage'))){
41        global $template, $conf;
42        if (isset($pwg_loaded_plugins['ExtendedDescription'])){add_event_handler('AP_render_content', 'get_user_language_desc');}
43        $pat=trigger_change('AP_render_content', $conf['persoFooter']);
44         if (!empty($pat)){
45                $template->assign('PERSO_FOOTER2', $pat);
46        }else{
47                $template->assign('PERSO_FOOTER2', "");
48        }
49        $template->set_filename('PERSO_FOOTER', realpath(PFT_PATH.'persofooter.tpl')); 
50        $template->append('footer_elements', $template->parse('PERSO_FOOTER', true));
51  }
52}
53?>
Note: See TracBrowser for help on using the repository browser.