Changeset 32179
- Timestamp:
- May 5, 2020, 1:29:47 PM (4 years ago)
- Location:
- extensions/PersoFooter
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/PersoFooter/admin.php
r31458 r32179 1 1 <?php 2 2 // +-----------------------------------------------------------------------+ 3 // | Perso Footer plugin for piwigo|3 // | Perso Footer plugin for Piwigo by TEMMII | 4 4 // +-----------------------------------------------------------------------+ 5 // | Copyright(C) 2011 - 20 16ddtddt http://temmii.com/piwigo/ |5 // | Copyright(C) 2011 - 2020 ddtddt http://temmii.com/piwigo/ | 6 6 // +-----------------------------------------------------------------------+ 7 7 // | This program is free software; you can redistribute it and/or modify | … … 33 33 //-------------------------------------------------------- sections definitions 34 34 35 if (!is_webmaster()) 36 { 37 array_push($page['errors'], l10n('This section is reserved for the webmaster')); 38 } 39 else 40 { 35 if (!is_webmaster()){ 36 $_SESSION['page_errors'] = array(l10n('This section is reserved for the webmaster')); 37 }else{ 41 38 42 // Gestion des onglets 39 // Tab manage 43 40 if (!isset($_GET['tab'])) 44 41 $page['tab'] = 'gest'; … … 52 49 $tabsheet->assign(); 53 50 54 // Ongletgest51 // tab gest 55 52 switch ($page['tab']){ 56 53 case 'gest': 54 55 global $pwg_loaded_plugins; 57 56 58 57 $template->assign('gestA',array('PFTBASE' => $conf['persoFooter'],)); 59 $PAED = pwg_db_fetch_assoc(pwg_query("SELECT state FROM " . PLUGINS_TABLE . " WHERE id = 'ExtendedDescription';")); 60 if($PAED['state'] == 'active'){ 61 $template->assign('useED',1); 62 }else{ 63 $template->assign('useED',0); 64 } 58 if (isset($pwg_loaded_plugins['ExtendedDescription'])){ 59 $template->assign('useED',1); 60 }else{ 61 $template->assign('useED',0); 62 } 65 63 66 if (isset($_POST['submitpft'])) 67 { 68 conf_update_param('persoFooter', $_POST['perso_footer']); 69 $template->assign( 70 'gestA', 71 array('PFTBASE' => stripslashes($_POST['perso_footer']),)); 72 array_push($page['infos'], l10n('Configuration update')); 73 } 64 if (isset($_POST['submitpft'])){ 65 conf_update_param('persoFooter', $_POST['perso_footer']); 66 $template->assign( 67 'gestA', 68 array('PFTBASE' => stripslashes($_POST['perso_footer']),)); 69 $_SESSION['page_infos'] = array(l10n('Configuration update')); 70 } 74 71 break; 72 75 73 case 'help': 76 $template->assign(74 $template->assign( 77 75 'gestB', 78 array('meta'=>l10n('nul'),));76 array('meta'=>l10n('nul'),)); 79 77 80 78 break; -
extensions/PersoFooter/index.php
r31458 r32179 1 1 <?php 2 // +-----------------------------------------------------------------------+ 3 // | This file is part of Piwigo. | 4 // | | 5 // | For copyright and license information, please view the COPYING.txt | 6 // | file that was distributed with this source code. | 7 // +-----------------------------------------------------------------------+ 8 2 9 // Recursive call 3 10 $url = '../'; -
extensions/PersoFooter/language/en_UK/index.php
r31458 r32179 1 1 <?php 2 // +-----------------------------------------------------------------------+ 3 // | This file is part of Piwigo. | 4 // | | 5 // | For copyright and license information, please view the COPYING.txt | 6 // | file that was distributed with this source code. | 7 // +-----------------------------------------------------------------------+ 8 2 9 // Recursive call 3 10 $url = '../'; -
extensions/PersoFooter/language/en_UK/plugin.lang.php
r31458 r32179 1 1 <?php 2 2 // +-----------------------------------------------------------------------+ 3 // | Perso Footer plugin for piwigo|3 // | Perso Footer plugin for Piwigo by TEMMII | 4 4 // +-----------------------------------------------------------------------+ 5 // | Copyright(C) 2011 - 20 16ddtddt http://temmii.com/piwigo/ |5 // | Copyright(C) 2011 - 2020 ddtddt http://temmii.com/piwigo/ | 6 6 // +-----------------------------------------------------------------------+ 7 7 // | This program is free software; you can redistribute it and/or modify | -
extensions/PersoFooter/language/fr_FR/index.php
r31458 r32179 1 1 <?php 2 // +-----------------------------------------------------------------------+ 3 // | This file is part of Piwigo. | 4 // | | 5 // | For copyright and license information, please view the COPYING.txt | 6 // | file that was distributed with this source code. | 7 // +-----------------------------------------------------------------------+ 8 2 9 // Recursive call 3 10 $url = '../'; -
extensions/PersoFooter/language/fr_FR/plugin.lang.php
r31458 r32179 1 1 <?php 2 2 // +-----------------------------------------------------------------------+ 3 // | Perso Footer plugin for piwigo|3 // | Perso Footer plugin for Piwigo by TEMMII | 4 4 // +-----------------------------------------------------------------------+ 5 // | Copyright(C) 2011 - 20 16ddtddt http://temmii.com/piwigo/ |5 // | Copyright(C) 2011 - 2020 ddtddt http://temmii.com/piwigo/ | 6 6 // +-----------------------------------------------------------------------+ 7 7 // | This program is free software; you can redistribute it and/or modify | -
extensions/PersoFooter/language/index.php
r11216 r32179 1 1 <?php 2 2 // +-----------------------------------------------------------------------+ 3 // | Piwigo - a PHP based picture gallery | 4 // +-----------------------------------------------------------------------+ 5 // | Copyright(C) 2008-2009 Piwigo Team http://piwigo.org | 6 // | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net | 7 // | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick | 8 // +-----------------------------------------------------------------------+ 9 // | This program is free software; you can redistribute it and/or modify | 10 // | it under the terms of the GNU General Public License as published by | 11 // | the Free Software Foundation | 3 // | This file is part of Piwigo. | 12 4 // | | 13 // | This program is distributed in the hope that it will be useful, but | 14 // | WITHOUT ANY WARRANTY; without even the implied warranty of | 15 // | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | 16 // | General Public License for more details. | 17 // | | 18 // | You should have received a copy of the GNU General Public License | 19 // | along with this program; if not, write to the Free Software | 20 // | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, | 21 // | USA. | 5 // | For copyright and license information, please view the COPYING.txt | 6 // | file that was distributed with this source code. | 22 7 // +-----------------------------------------------------------------------+ 23 8 -
extensions/PersoFooter/main.inc.php
r31458 r32179 9 9 */ 10 10 // +-----------------------------------------------------------------------+ 11 // | Perso Footer plugin for piwigo|11 // | Perso Footer plugin for Piwigo by TEMMII | 12 12 // +-----------------------------------------------------------------------+ 13 // | Copyright(C) 2011 - 20 16ddtddt http://temmii.com/piwigo/ |13 // | Copyright(C) 2011 - 2020 ddtddt http://temmii.com/piwigo/ | 14 14 // +-----------------------------------------------------------------------+ 15 15 // | This program is free software; you can redistribute it and/or modify | … … 35 35 36 36 add_event_handler('get_admin_plugin_menu_links', 'PFT_admin_menu'); 37 function PFT_admin_menu($menu) 38 { 39 array_push($menu, array( 40 'NAME' => 'Perso Footer', 41 'URL' => get_admin_plugin_menu_link(PFT_PATH . 'admin.php'))); 37 function PFT_admin_menu($menu){ 38 if (is_webmaster()){ 39 array_push($menu, array( 40 'NAME' => 'Perso Footer', 41 'URL' => PFT_ADMIN)); 42 } 42 43 return $menu; 43 44 } 44 45 45 46 add_event_handler('loc_end_page_tail', 'pft'); 46 function pft() 47 { 48 global $page; 49 if ((script_basename() != 'admin') and ($page['body_id'] != 'thePopuphelpPage')) 50 { 47 function pft(){ 48 global $page, $pwg_loaded_plugins; 49 if ((script_basename() != 'admin') and ($page['body_id'] != 'thePopuphelpPage')){ 51 50 global $template, $conf; 52 $PAED = pwg_db_fetch_assoc(pwg_query("SELECT state FROM " . PLUGINS_TABLE . " WHERE id = 'ExtendedDescription';")); 53 if($PAED['state'] == 'active') add_event_handler('AP_render_content', 'get_user_language_desc'); 54 55 $pat=trigger_change('AP_render_content', $conf['persoFooter']); 56 if (!empty($pat)) 57 { 58 $template->assign('PERSO_FOOTER2', $pat); 59 } 60 51 if (isset($pwg_loaded_plugins['ExtendedDescription'])){add_event_handler('AP_render_content', 'get_user_language_desc');} 52 $pat=trigger_change('AP_render_content', $conf['persoFooter']); 53 if (!empty($pat)){ 54 $template->assign('PERSO_FOOTER2', $pat); 55 } 61 56 $template->set_filename('PERSO_FOOTER', realpath(PFT_PATH.'persofooter.tpl')); 62 57 $template->append('footer_elements', $template->parse('PERSO_FOOTER', true)); 63 64 58 } 59 } 65 60 ?> -
extensions/PersoFooter/maintain.class.php
r31458 r32179 1 1 <?php 2 2 // +-----------------------------------------------------------------------+ 3 // | Perso Footer plugin for piwigo|3 // | Perso Footer plugin for Piwigo by TEMMII | 4 4 // +-----------------------------------------------------------------------+ 5 // | Copyright(C) 2011 - 20 16ddtddt http://temmii.com/piwigo/ |5 // | Copyright(C) 2011 - 2020 ddtddt http://temmii.com/piwigo/ | 6 6 // +-----------------------------------------------------------------------+ 7 7 // | This program is free software; you can redistribute it and/or modify | … … 22 22 if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!'); 23 23 24 class PersoFooter_maintain extends PluginMaintain 25 { 26 function install($plugin_version, &$errors=array()) 27 { 28 $query = 'INSERT INTO ' . CONFIG_TABLE . ' (param,value,comment) VALUES ("persoFooter","","html displayed on the footer page of your galler...");'; 29 pwg_query($query); 24 class PersoFooter_maintain extends PluginMaintain{ 25 function install($plugin_version, &$errors=array()){ 26 pwg_query('INSERT INTO ' . CONFIG_TABLE . ' (param,value,comment) VALUES ("persoFooter","","html displayed on the footer page of your galler...");'); 30 27 } 31 28
Note: See TracChangeset
for help on using the changeset viewer.