| Apache Linux webd001.cluster107.gra.hosting.ovh.net 5.15.167-ovh-vps-grsec-zfs-classid #1 SMP Tue Sep 17 08:14:20 UTC 2024 x86_64 uid=2234(oyaide) gid=100(users) groups=100(users) server ip : 213.186.33.18 | your ip : 216.73.216.109 safemode OFF > / home / oyaide / www / moycompany.com / piwigo2 / plugins / PersoFooter / |
| Filename | /home/oyaide/www/moycompany.com/piwigo2/plugins/PersoFooter/main.inc.php |
| Size | 2.8 kb |
| Permission | rw----r-- |
| Owner | oyaide : users |
| Create time | 30-Mar-2016 16:36 |
| Last modified | 19-Mar-2016 05:56 |
| Last accessed | 19-Mar-2016 05:56 |
| Actions | edit | rename | delete | download (gzip) |
| View | text | code | image |
<?php
/*
Plugin Name: Perso Footer
Version: 2.8.a
Description: Add information in the footer
Plugin URI: http://piwigo.org/ext/extension_view.php?eid=554
Author: ddtddt
Author URI: http://temmii.com/piwigo/
*/
// +-----------------------------------------------------------------------+
// | Perso Footer plugin for piwigo |
// +-----------------------------------------------------------------------+
// | Copyright(C) 2011 - 2016 ddtddt http://temmii.com/piwigo/ |
// +-----------------------------------------------------------------------+
// | This program is free software; you can redistribute it and/or modify |
// | it under the terms of the GNU General Public License as published by |
// | the Free Software Foundation |
// | |
// | This program is distributed in the hope that it will be useful, but |
// | WITHOUT ANY WARRANTY; without even the implied warranty of |
// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
// | General Public License for more details. |
// | |
// | You should have received a copy of the GNU General Public License |
// | along with this program; if not, write to the Free Software |
// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
// | USA. |
// +-----------------------------------------------------------------------+
if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!');
define('PFT_DIR' , basename(dirname(__FILE__)));
define('PFT_PATH' , PHPWG_PLUGINS_PATH . PFT_DIR . '/');
define('PFT_ADMIN',get_root_url().'admin.php?page=plugin-'.PFT_DIR);
add_event_handler('get_admin_plugin_menu_links', 'PFT_admin_menu');
function PFT_admin_menu($menu)
{
array_push($menu, array(
'NAME' => 'Perso Footer',
'URL' => get_admin_plugin_menu_link(PFT_PATH . 'admin.php')));
return $menu;
}
add_event_handler('loc_end_page_tail', 'pft');
function pft()
{
global $page;
if ((script_basename() != 'admin') and ($page['body_id'] != 'thePopuphelpPage'))
{
global $template, $conf;
$PAED = pwg_db_fetch_assoc(pwg_query("SELECT state FROM " . PLUGINS_TABLE . " WHERE id = 'ExtendedDescription';"));
if($PAED['state'] == 'active') add_event_handler('AP_render_content', 'get_user_language_desc');
$pat=trigger_change('AP_render_content', $conf['persoFooter']);
if (!empty($pat))
{
$template->assign('PERSO_FOOTER2', $pat);
}
$template->set_filename('PERSO_FOOTER', realpath(PFT_PATH.'persofooter.tpl'));
$template->append('footer_elements', $template->parse('PERSO_FOOTER', true));
}
}
?>
/*
Plugin Name: Perso Footer
Version: 2.8.a
Description: Add information in the footer
Plugin URI: http://piwigo.org/ext/extension_view.php?eid=554
Author: ddtddt
Author URI: http://temmii.com/piwigo/
*/
// +-----------------------------------------------------------------------+
// | Perso Footer plugin for piwigo |
// +-----------------------------------------------------------------------+
// | Copyright(C) 2011 - 2016 ddtddt http://temmii.com/piwigo/ |
// +-----------------------------------------------------------------------+
// | This program is free software; you can redistribute it and/or modify |
// | it under the terms of the GNU General Public License as published by |
// | the Free Software Foundation |
// | |
// | This program is distributed in the hope that it will be useful, but |
// | WITHOUT ANY WARRANTY; without even the implied warranty of |
// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
// | General Public License for more details. |
// | |
// | You should have received a copy of the GNU General Public License |
// | along with this program; if not, write to the Free Software |
// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
// | USA. |
// +-----------------------------------------------------------------------+
if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!');
define('PFT_DIR' , basename(dirname(__FILE__)));
define('PFT_PATH' , PHPWG_PLUGINS_PATH . PFT_DIR . '/');
define('PFT_ADMIN',get_root_url().'admin.php?page=plugin-'.PFT_DIR);
add_event_handler('get_admin_plugin_menu_links', 'PFT_admin_menu');
function PFT_admin_menu($menu)
{
array_push($menu, array(
'NAME' => 'Perso Footer',
'URL' => get_admin_plugin_menu_link(PFT_PATH . 'admin.php')));
return $menu;
}
add_event_handler('loc_end_page_tail', 'pft');
function pft()
{
global $page;
if ((script_basename() != 'admin') and ($page['body_id'] != 'thePopuphelpPage'))
{
global $template, $conf;
$PAED = pwg_db_fetch_assoc(pwg_query("SELECT state FROM " . PLUGINS_TABLE . " WHERE id = 'ExtendedDescription';"));
if($PAED['state'] == 'active') add_event_handler('AP_render_content', 'get_user_language_desc');
$pat=trigger_change('AP_render_content', $conf['persoFooter']);
if (!empty($pat))
{
$template->assign('PERSO_FOOTER2', $pat);
}
$template->set_filename('PERSO_FOOTER', realpath(PFT_PATH.'persofooter.tpl'));
$template->append('footer_elements', $template->parse('PERSO_FOOTER', true));
}
}
?>