Changeset 32302
- Timestamp:
- Oct 31, 2020, 8:28:51 PM (3 years ago)
- Location:
- extensions/title
- Files:
-
- 27 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/title/admin.php
r31456 r32302 1 1 <?php 2 2 // +-----------------------------------------------------------------------+ 3 // | Title plugin for piwigo 4 // +-----------------------------------------------------------------------+ 5 // | Copyright(C) 2011 - 20 16ddtddt http://temmii.com/piwigo/ |3 // | Title plugin for piwigo by TEMMII | 4 // +-----------------------------------------------------------------------+ 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 | … … 21 21 22 22 if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!'); 23 global $template, $conf, $user ;23 global $template, $conf, $user, $pwg_loaded_plugins; 24 24 include_once(PHPWG_ROOT_PATH .'admin/include/tabsheet.class.php'); 25 25 $my_base_url = PHPWG_ROOT_PATH.'admin.php?page=plugin-'; … … 38 38 $tabsheet = new tabsheet(); 39 39 $tabsheet->add('plugtitle', l10n('title_tab_plgtitle'), TITLE_ADMIN . '-plugtitle'); 40 $PAC = pwg_db_fetch_assoc(pwg_query("SELECT state FROM " . PLUGINS_TABLE . " WHERE id = 'ContactForm';")); 41 if($PAC['state'] == 'active'){ 40 if (isset($pwg_loaded_plugins['ContactForm'])){ 42 41 $tabsheet->add('contacttitle', l10n('Contact Title'), TITLE_ADMIN . '-contacttitle'); 43 42 } 44 $PAAP = pwg_db_fetch_assoc(pwg_query("SELECT state FROM " . PLUGINS_TABLE . " WHERE id = 'AdditionalPages';")); 45 if($PAAP['state'] == 'active'){ 43 if (isset($pwg_loaded_plugins['AdditionalPages'])){ 46 44 $tabsheet->add('AdditionalPagestitle', l10n('Additional Pages Title'), TITLE_ADMIN . '-AdditionalPagestitle'); 47 45 } -
extensions/title/index.php
r9407 r32302 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/title/initadmin.php
r32070 r32302 1 1 <?php 2 2 // +-----------------------------------------------------------------------+ 3 // | Title plugin for piwigo 3 // | Title plugin for piwigo by TEMMII | 4 4 // +-----------------------------------------------------------------------+ 5 5 // | Copyright(C) 2011 - 2020 ddtddt http://temmii.com/piwigo/ | … … 38 38 add_event_handler('loc_begin_admin_page', 'titlePadminA',60); 39 39 40 function titlePadminf() 41 { 42 global $template; 43 $template->set_prefilter('picture_modify', 'titlePadminfT'); 44 } 40 function titlePadminf(){ 41 global $template; 42 $template->set_prefilter('picture_modify', 'titlePadminfT'); 43 } 45 44 46 function titlePadminfT($content, &$smarty) 47 { 45 function titlePadminfT($content, &$smarty){ 48 46 $search = '#<p style="margin:40px 0 0 0">#'; 49 50 47 $replacement = ' 51 48 <p> … … 58 55 59 56 return preg_replace($search, $replacement, $content); 60 57 } 61 58 62 59 function titlePadminA(){ 63 60 if (isset($_GET['image_id'])){ 64 global $template, $prefixeTable ;61 global $template, $prefixeTable, $pwg_loaded_plugins; 65 62 $query = 'select id,title FROM ' . TITLE_PHOTO_TABLE . ' WHERE id = '.$_GET['image_id'].';'; 66 63 $result = pwg_query($query); 67 64 $row = pwg_db_fetch_assoc($result); 68 65 $titleP=$row['title']; 69 $PAED = pwg_db_fetch_assoc(pwg_query("SELECT state FROM " . PLUGINS_TABLE . " WHERE id = 'ExtendedDescription';")); 70 if($PAED['state'] == 'active'){ 66 if (isset($pwg_loaded_plugins['ExtendedDescription'])){ 71 67 $template->assign('useED',1); 72 68 }else{ … … 119 115 function titleAadminA(){ 120 116 if (isset($_GET['cat_id'])){ 121 global $template, $prefixeTable ;117 global $template, $prefixeTable, $pwg_loaded_plugins; 122 118 $query = 'select id,title FROM ' . TITLE_ALBUM_TABLE . ' WHERE id = '.$_GET['cat_id'].';'; 123 119 $result = pwg_query($query); 124 120 $row = pwg_db_fetch_assoc($result); 125 121 $titleA=$row['title']; 126 $PAED = pwg_db_fetch_assoc(pwg_query("SELECT state FROM " . PLUGINS_TABLE . " WHERE id = 'ExtendedDescription';")); 127 if($PAED['state'] == 'active'){ 122 if (isset($pwg_loaded_plugins['ExtendedDescription'])){ 128 123 $template->assign('useED',1); 129 124 }else{ -
extensions/title/language/ca_ES/index.php
r15086 r32302 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 9 // Recursive call 2 10 $url = '../'; 3 11 header( 'Request-URI: '.$url ); -
extensions/title/language/cs_CZ/index.php
r11661 r32302 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/title/language/da_DK/index.php
r18252 r32302 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 9 // Recursive call 2 10 $url = '../'; 3 11 header( 'Request-URI: '.$url ); -
extensions/title/language/de_DE/index.php
r9429 r32302 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/title/language/el_GR/index.php
r15330 r32302 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 9 // Recursive call 2 10 $url = '../'; 3 11 header( 'Request-URI: '.$url ); -
extensions/title/language/en_UK/index.php
r31456 r32302 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/title/language/en_UK/plugin.lang.php
r31456 r32302 1 1 <?php 2 2 // +-----------------------------------------------------------------------+ 3 // | Title plugin for piwigo 3 // | Title 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/title/language/eo_EO/index.php
r25934 r32302 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 9 // Recursive call 2 10 $url = '../'; 3 11 header( 'Request-URI: '.$url ); -
extensions/title/language/fa_IR/index.php
r26508 r32302 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 9 // Recursive call 2 10 $url = '../'; 3 11 header( 'Request-URI: '.$url ); -
extensions/title/language/fr_CA/index.php
r25042 r32302 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/title/language/fr_FR/index.php
r31456 r32302 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/title/language/fr_FR/plugin.lang.php
r31456 r32302 1 1 <?php 2 2 // +-----------------------------------------------------------------------+ 3 // | Title plugin for piwigo 3 // | Title 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/title/language/hu_HU/index.php
r9432 r32302 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/title/language/index.php
r9407 r32302 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/title/language/it_IT/index.php
r11529 r32302 1 1 <?php 2 2 // +-----------------------------------------------------------------------+ 3 // | Piwigo - a PHP based photo gallery | 4 // +-----------------------------------------------------------------------+ 5 // | Copyright(C) 2008-2011 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/title/language/lv_LV/index.php
r9794 r32302 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/title/language/nb_NO/index.php
r30022 r32302 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 9 // Recursive call 2 10 $url = '../'; 3 11 header( 'Request-URI: '.$url ); -
extensions/title/language/pt_PT/index.php
r15618 r32302 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 9 // Recursive call 2 10 $url = '../'; 3 11 header( 'Request-URI: '.$url ); -
extensions/title/language/sk_SK/index.php
r9507 r32302 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/title/language/sr_RS/index.php
r30808 r32302 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 9 // Recursive call 2 10 $url = '../'; 3 11 header( 'Request-URI: '.$url ); -
extensions/title/language/sv_SE/index.php
r24016 r32302 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 9 // Recursive call 2 10 $url = '../'; 3 11 header( 'Request-URI: '.$url ); -
extensions/title/language/tr_TR/index.php
r15927 r32302 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 9 // Recursive call 2 10 $url = '../'; 3 11 header( 'Request-URI: '.$url ); -
extensions/title/main.inc.php
r31456 r32302 10 10 11 11 // +-----------------------------------------------------------------------+ 12 // | Title plugin for piwigo 12 // | Title plugin for piwigo by TEMMII | 13 13 // +-----------------------------------------------------------------------+ 14 // | Copyright(C) 2011 - 20 16ddtddt http://temmii.com/piwigo/ |14 // | Copyright(C) 2011 - 2020 ddtddt http://temmii.com/piwigo/ | 15 15 // +-----------------------------------------------------------------------+ 16 16 // | This program is free software; you can redistribute it and/or modify | … … 48 48 add_event_handler('loc_begin_page_header', 'plug_Title', 56 ); 49 49 50 function plug_Title() 51 { 52 global $template; 53 $template->set_prefilter('header', 'plug_TitleP'); 54 55 $PAED = pwg_db_fetch_assoc(pwg_query("SELECT state FROM " . PLUGINS_TABLE . " WHERE id = 'ExtendedDescription';")); 56 if($PAED['state'] == 'active') add_event_handler('AP_render_content', 'get_user_language_desc'); 57 } 50 function plug_Title(){ 51 global $template, $pwg_loaded_plugins; 52 $template->set_prefilter('header', 'plug_TitleP'); 53 if (isset($pwg_loaded_plugins['ExtendedDescription'])){ 54 add_event_handler('AP_render_content', 'get_user_language_desc'); 55 } 56 } 58 57 59 function plug_TitleP($content, &$smarty) 60 { 58 function plug_TitleP($content, &$smarty){ 61 59 $search = '#<title>.*?</title>#'; 62 63 60 $replacement = '<title>{$PERSO_TITLE}</title> 64 61 '; 65 66 62 return preg_replace($search, $replacement, $content); 67 63 } 68 64 69 65 // Plugin for admin 70 if (script_basename() == 'admin') 71 { 66 if (script_basename() == 'admin'){ 72 67 include_once(dirname(__FILE__).'/initadmin.php'); 73 68 } … … 75 70 // no empty ! 76 71 add_event_handler('loc_begin_page_header', 'plugTitle', 61 ); 77 function plugTitle() 78 { 79 global $template, $conf; 80 81 $titlegen = & $conf['gallery_title']; 82 if (!empty($titlegen)) 83 { 84 $template->assign('PERSO_TITLE', $titlegen); 85 } 86 87 } 88 72 function plugTitle(){ 73 global $template, $conf; 74 $titlegen = & $conf['gallery_title']; 75 if (!empty($titlegen)){ 76 $template->assign('PERSO_TITLE', $titlegen); 77 } 78 } 89 79 90 80 //use title on photo page 91 81 add_event_handler('loc_begin_page_header', 'TitlePhoto', 76 ); 92 function TitlePhoto() 93 { 94 global $template, $page; 95 96 if ( !empty($page['image_id']) ) 97 { 82 function TitlePhoto(){ 83 global $template, $page; 84 if ( !empty($page['image_id']) ){ 98 85 $query = ' 99 86 select id,title … … 104 91 $row = pwg_db_fetch_assoc($result); 105 92 $titleP=$row['title']; 106 107 93 $titlePED=trigger_change('AP_render_content', $titleP); 108 109 if (!empty($titlePED)) 110 { 111 $template->assign('PERSO_TITLE', $titlePED); 112 } 113 } 114 } 94 if (!empty($titlePED)){ 95 $template->assign('PERSO_TITLE', $titlePED); 96 } 97 } 98 } 115 99 116 100 // use title on album page 117 101 add_event_handler('loc_begin_page_header', 'Titlealbum', 71 ); 118 function Titlealbum() 119 { 120 global $template, $page; 121 if (!empty($page['category']['id']) ) 122 { 102 function Titlealbum(){ 103 global $template, $page; 104 if (!empty($page['category']['id']) ){ 123 105 $query = ' 124 106 select id,title … … 129 111 $row = pwg_db_fetch_assoc($result); 130 112 $titleA=$row['title']; 113 $titleAED=trigger_change('AP_render_content', $titleA); 114 if (!empty($titleAED)){ 115 $template->assign('PERSO_TITLE', $titleAED); 116 } 117 } 118 } 131 119 132 $titleAED=trigger_change('AP_render_content', $titleA); 133 134 if (!empty($titleAED)) 135 { 136 $template->assign('PERSO_TITLE', $titleAED); 137 } 138 } 139 } 140 141 //other pages 142 add_event_handler('loc_begin_page_header', 'Titleother', 66 ); 143 function Titleother() 144 { 145 global $template, $page, $conf; 146 147 $query = ' 120 //other pages 121 add_event_handler('loc_begin_page_header', 'Titleother', 66 ); 122 function Titleother(){ 123 global $template, $page, $conf, $pwg_loaded_plugins; 124 $query = ' 148 125 select id,page,title 149 126 FROM ' . TITLE_TABLE . ' … … 151 128 152 129 ;'; 153 $result = pwg_query($query); 154 $titlespecial = array(); 155 while ($row = pwg_db_fetch_assoc($result)) 156 { 157 $titlespecial[$row['page']] = $row['title']; 158 $titlespecialED[$row['page']]=trigger_change('AP_render_content', $titlespecial[$row['page']]); 159 } 160 161 if (isset($page['section']) and $page['section'] == 'categories' and empty($page['category']['id']) and !empty($titlespecialED['home'])) 162 { 163 $template->assign('PERSO_TITLE', $titlespecialED['home']); 164 } 165 if (isset($page['section']) and $page['section'] == 'best_rated' and !empty($titlespecialED['best_rated'])) 166 { 167 $template->assign('PERSO_TITLE', $titlespecialED['best_rated']); 168 } 169 if (isset($page['section']) and $page['section'] == 'most_visited' and !empty($titlespecialED['most_visited'])) 170 { 171 $template->assign('PERSO_TITLE', $titlespecialED['most_visited']); 172 } 173 if (isset($page['section']) and $page['section'] == 'recent_pics' and !empty($titlespecialED['recent_pics'])) 174 { 175 $template->assign('PERSO_TITLE', $titlespecialED['recent_pics']); 176 } 177 if (isset($page['section']) and $page['section'] == 'recent_cats' and !empty($titlespecialED['recent_cats'])) 178 { 179 $template->assign('PERSO_TITLE', $titlespecialED['recent_cats']); 180 } 181 if (isset($page['section']) and $page['section'] == 'favorites' and !empty($titlespecialED['favorites'])) 182 { 183 $template->assign('PERSO_TITLE', $titlespecialED['favorites']); 184 } 185 if (script_basename() == 'tags' and !empty($titlespecialED['tags'])) 186 { 187 $template->assign('PERSO_TITLE', $titlespecialED['tags']); 188 } 189 if (script_basename() == 'comments' and !empty($titlespecialED['comments'])) 190 { 191 $template->assign('PERSO_TITLE', $titlespecialED['comments']); 192 } 193 if (script_basename() == 'about' and !empty($titlespecialED['about'])) 194 { 195 $template->assign('PERSO_TITLE', $titlespecialED['about']); 196 } 197 if (script_basename() == 'search' and !empty($titlespecialED['search'])) 198 { 199 $template->assign('PERSO_TITLE', $titlespecialED['search']); 200 } 201 if (isset($page['section']) and $page['section'] == 'list' and !empty($titlespecialED['random'])) 202 { 203 $template->assign('PERSO_TITLE', $titlespecialED['random']); 204 } 205 if (script_basename() == 'notification' and !empty($titlespecialED['notification'])) 206 { 207 $template->assign('PERSO_TITLE', $titlespecialED['notification']); 208 } 209 210 $PAC = pwg_db_fetch_assoc(pwg_query("SELECT state FROM " . PLUGINS_TABLE . " WHERE id = 'ContactForm';")); 211 if($PAC['state'] == 'active') 212 { 213 $titlespecialED['contact']=trigger_change('AP_render_content', $conf['contacttitle']); 214 if (isset($page['section']) and $page['section'] == 'contact' and !empty($titlespecialED['contact'])) 215 { 216 $template->assign('PERSO_TITLE', $titlespecialED['contact']); 217 } 130 $result = pwg_query($query); 131 $titlespecial = array(); 132 while ($row = pwg_db_fetch_assoc($result)){ 133 $titlespecial[$row['page']] = $row['title']; 134 $titlespecialED[$row['page']]=trigger_change('AP_render_content', $titlespecial[$row['page']]); 135 } 136 if (isset($page['section']) and $page['section'] == 'categories' and empty($page['category']['id']) and !empty($titlespecialED['home'])){ 137 $template->assign('PERSO_TITLE', $titlespecialED['home']); 138 } 139 if (isset($page['section']) and $page['section'] == 'best_rated' and !empty($titlespecialED['best_rated'])){ 140 $template->assign('PERSO_TITLE', $titlespecialED['best_rated']); 141 } 142 if (isset($page['section']) and $page['section'] == 'most_visited' and !empty($titlespecialED['most_visited'])){ 143 $template->assign('PERSO_TITLE', $titlespecialED['most_visited']); 144 } 145 if (isset($page['section']) and $page['section'] == 'recent_pics' and !empty($titlespecialED['recent_pics'])){ 146 $template->assign('PERSO_TITLE', $titlespecialED['recent_pics']); 147 } 148 if (isset($page['section']) and $page['section'] == 'recent_cats' and !empty($titlespecialED['recent_cats'])){ 149 $template->assign('PERSO_TITLE', $titlespecialED['recent_cats']); 150 } 151 if (isset($page['section']) and $page['section'] == 'favorites' and !empty($titlespecialED['favorites'])){ 152 $template->assign('PERSO_TITLE', $titlespecialED['favorites']); 153 } 154 if (script_basename() == 'tags' and !empty($titlespecialED['tags'])){ 155 $template->assign('PERSO_TITLE', $titlespecialED['tags']); 156 } 157 if (script_basename() == 'comments' and !empty($titlespecialED['comments'])){ 158 $template->assign('PERSO_TITLE', $titlespecialED['comments']); 159 } 160 if (script_basename() == 'about' and !empty($titlespecialED['about'])){ 161 $template->assign('PERSO_TITLE', $titlespecialED['about']); 162 } 163 if (script_basename() == 'search' and !empty($titlespecialED['search'])){ 164 $template->assign('PERSO_TITLE', $titlespecialED['search']); 165 } 166 if (isset($page['section']) and $page['section'] == 'list' and !empty($titlespecialED['random'])){ 167 $template->assign('PERSO_TITLE', $titlespecialED['random']); 168 } 169 if (script_basename() == 'notification' and !empty($titlespecialED['notification'])){ 170 $template->assign('PERSO_TITLE', $titlespecialED['notification']); 171 } 172 if (isset($pwg_loaded_plugins['ContactForm'])){ 173 $titlespecialED['contact']=trigger_change('AP_render_content', $conf['contacttitle']); 174 if (isset($page['section']) and $page['section'] == 'contact' and !empty($titlespecialED['contact'])){ 175 $template->assign('PERSO_TITLE', $titlespecialED['contact']); 218 176 } 219 220 $PAAP = pwg_db_fetch_assoc(pwg_query("SELECT state FROM " . PLUGINS_TABLE . " WHERE id = 'AdditionalPages';")); 221 if($PAAP['state'] == 'active') 222 { 223 177 } 178 if (isset($pwg_loaded_plugins['AdditionalPages'])){ 224 179 global $prefixeTable; 225 if ( !empty($page['additional_page']['id']) ) 226 { 180 if ( !empty($page['additional_page']['id']) ){ 227 181 if (!defined('TITLE_AP_TABLE')) define('TITLE_AP_TABLE', $prefixeTable.'title_ap'); 228 182 $lire=$page['additional_page']['id']; … … 236 190 $titleap=$row['title']; 237 191 $titlespecialED['AdditionalPages']=trigger_change('AP_render_content', $titleap); 238 }239 if (isset($page['section']) and $page['section'] == 'additional_page' and !empty($titlespecialED['AdditionalPages']))240 {241 $template->assign('PERSO_TITLE', $titlespecialED['AdditionalPages']);242 }243 192 } 244 } 193 if (isset($page['section']) and $page['section'] == 'additional_page' and !empty($titlespecialED['AdditionalPages'])){ 194 $template->assign('PERSO_TITLE', $titlespecialED['AdditionalPages']); 195 } 196 } 197 } 245 198 246 199 ?> -
extensions/title/maintain.class.php
r31456 r32302 1 1 <?php 2 2 // +-----------------------------------------------------------------------+ 3 // | Title plugin for piwigo 3 // | Title 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 |
Note: See TracChangeset
for help on using the changeset viewer.