[7750] | 1 | <?php |
---|
| 2 | /* |
---|
[7751] | 3 | Plugin Name: Piwigo Donate |
---|
[7750] | 4 | Version: auto |
---|
[7751] | 5 | Description: You like Piwigo you want to support us financially you can add a link to donate on your site in the footer |
---|
| 6 | Plugin URI: http://piwigo.org/ext/extension_view.php?eid=463 |
---|
[7750] | 7 | Author: ddtddt |
---|
[31451] | 8 | Author URI: http://temmii.com/piwigo/ |
---|
[7750] | 9 | */ |
---|
| 10 | |
---|
[31451] | 11 | // +-----------------------------------------------------------------------+ |
---|
| 12 | // | Piwigo Donate plugin for piwigo | |
---|
| 13 | // +-----------------------------------------------------------------------+ |
---|
| 14 | // | Copyright(C) 2010-2016 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 | |
---|
[10027] | 31 | if (!defined('PHPWG_ROOT_PATH')) |
---|
| 32 | { |
---|
| 33 | die('Hacking attempt!'); |
---|
| 34 | } |
---|
[7750] | 35 | |
---|
| 36 | define('PIDO_DIR' , basename(dirname(__FILE__))); |
---|
| 37 | define('PIDO_PATH' , PHPWG_PLUGINS_PATH . PIDO_DIR . '/'); |
---|
| 38 | |
---|
[10027] | 39 | add_event_handler('loc_end_page_tail', 'Piwigodonate'); |
---|
[7750] | 40 | |
---|
| 41 | function Piwigodonate() |
---|
[10027] | 42 | { |
---|
| 43 | if (script_basename() != 'admin') |
---|
| 44 | { |
---|
| 45 | global $template; |
---|
| 46 | load_language('plugin.lang', PIDO_PATH); |
---|
[7750] | 47 | |
---|
[10027] | 48 | $template->assign( |
---|
[7750] | 49 | 'DONATE', PHPWG_URL.'/donate' |
---|
| 50 | ); |
---|
| 51 | |
---|
[10031] | 52 | $template->set_filename('donate', realpath(PIDO_PATH.'donate.tpl')); |
---|
| 53 | $template->append('footer_elements', $template->parse('donate', true)); |
---|
[7750] | 54 | |
---|
[10031] | 55 | |
---|
| 56 | |
---|
| 57 | |
---|
[10027] | 58 | } |
---|
| 59 | } |
---|
| 60 | |
---|
| 61 | |
---|
[7750] | 62 | ?> |
---|