Changeset 32302


Ignore:
Timestamp:
Oct 31, 2020, 8:28:51 PM (3 years ago)
Author:
ddtddt
Message:

[title] php7.4 Notice

Location:
extensions/title
Files:
27 edited

Legend:

Unmodified
Added
Removed
  • extensions/title/admin.php

    r31456 r32302  
    11<?php
    22// +-----------------------------------------------------------------------+
    3 // | Title plugin for piwigo                                               |
    4 // +-----------------------------------------------------------------------+
    5 // | Copyright(C) 2011 - 2016 ddtddt             http://temmii.com/piwigo/ |
     3// | Title plugin for piwigo by TEMMII                                     |
     4// +-----------------------------------------------------------------------+
     5// | Copyright(C) 2011 - 2020 ddtddt             http://temmii.com/piwigo/ |
    66// +-----------------------------------------------------------------------+
    77// | This program is free software; you can redistribute it and/or modify  |
     
    2121
    2222if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!');
    23 global $template, $conf, $user;
     23global $template, $conf, $user, $pwg_loaded_plugins;
    2424include_once(PHPWG_ROOT_PATH .'admin/include/tabsheet.class.php');
    2525$my_base_url = PHPWG_ROOT_PATH.'admin.php?page=plugin-';
     
    3838$tabsheet = new tabsheet();
    3939  $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'])){
    4241        $tabsheet->add('contacttitle', l10n('Contact Title'), TITLE_ADMIN . '-contacttitle');
    4342  }
    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'])){
    4644        $tabsheet->add('AdditionalPagestitle', l10n('Additional Pages Title'), TITLE_ADMIN . '-AdditionalPagestitle');
    4745  }                       
  • extensions/title/index.php

    r9407 r32302  
    11<?php
    22// +-----------------------------------------------------------------------+
    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.                                          |
    124// |                                                                       |
    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.                      |
    227// +-----------------------------------------------------------------------+
    238
  • extensions/title/initadmin.php

    r32070 r32302  
    11<?php
    22// +-----------------------------------------------------------------------+
    3 // | Title plugin for piwigo                                               |
     3// | Title plugin for piwigo by TEMMII                                     |
    44// +-----------------------------------------------------------------------+
    55// | Copyright(C) 2011 - 2020 ddtddt             http://temmii.com/piwigo/ |
     
    3838add_event_handler('loc_begin_admin_page', 'titlePadminA',60);
    3939
    40 function titlePadminf()
    41         {
    42         global $template;
    43         $template->set_prefilter('picture_modify', 'titlePadminfT');
    44         }
     40function titlePadminf(){
     41  global $template;
     42  $template->set_prefilter('picture_modify', 'titlePadminfT');
     43}
    4544
    46 function titlePadminfT($content, &$smarty)
    47         {
     45function titlePadminfT($content, &$smarty){
    4846  $search = '#<p style="margin:40px 0 0 0">#';
    49  
    5047  $replacement = '
    5148    <p>
     
    5855
    5956  return preg_replace($search, $replacement, $content);
    60         }
     57}
    6158 
    6259function titlePadminA(){
    6360  if (isset($_GET['image_id'])){
    64         global $template, $prefixeTable;
     61        global $template, $prefixeTable, $pwg_loaded_plugins;
    6562        $query = 'select id,title FROM ' . TITLE_PHOTO_TABLE . ' WHERE id = '.$_GET['image_id'].';';
    6663        $result = pwg_query($query);
    6764        $row = pwg_db_fetch_assoc($result);
    6865    $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'])){
    7167          $template->assign('useED',1);
    7268    }else{
     
    119115function titleAadminA(){
    120116  if (isset($_GET['cat_id'])){
    121         global $template, $prefixeTable;
     117        global $template, $prefixeTable, $pwg_loaded_plugins;
    122118        $query = 'select id,title FROM ' . TITLE_ALBUM_TABLE . ' WHERE id = '.$_GET['cat_id'].';';
    123119        $result = pwg_query($query);
    124120        $row = pwg_db_fetch_assoc($result);
    125121        $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'])){
    128123          $template->assign('useED',1);
    129124    }else{
  • extensions/title/language/ca_ES/index.php

    r15086 r32302  
    11<?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
    210$url = '../';
    311header( 'Request-URI: '.$url );
  • extensions/title/language/cs_CZ/index.php

    r11661 r32302  
    11<?php
    22// +-----------------------------------------------------------------------+
    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.                                          |
    124// |                                                                       |
    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.                      |
    227// +-----------------------------------------------------------------------+
    238
  • extensions/title/language/da_DK/index.php

    r18252 r32302  
    11<?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
    210$url = '../';
    311header( 'Request-URI: '.$url );
  • extensions/title/language/de_DE/index.php

    r9429 r32302  
    11<?php
    22// +-----------------------------------------------------------------------+
    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.                                          |
    124// |                                                                       |
    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.                      |
    227// +-----------------------------------------------------------------------+
    238
  • extensions/title/language/el_GR/index.php

    r15330 r32302  
    11<?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
    210$url = '../';
    311header( 'Request-URI: '.$url );
  • extensions/title/language/en_UK/index.php

    r31456 r32302  
    11<?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
    29// Recursive call
    310$url = '../';
  • extensions/title/language/en_UK/plugin.lang.php

    r31456 r32302  
    11<?php
    22// +-----------------------------------------------------------------------+
    3 // | Title plugin for piwigo                                               |
     3// | Title plugin for piwigo by TEMMII                                     |
    44// +-----------------------------------------------------------------------+
    5 // | Copyright(C) 2011 - 2016 ddtddt             http://temmii.com/piwigo/ |
     5// | Copyright(C) 2011 - 2020 ddtddt             http://temmii.com/piwigo/ |
    66// +-----------------------------------------------------------------------+
    77// | This program is free software; you can redistribute it and/or modify  |
  • extensions/title/language/eo_EO/index.php

    r25934 r32302  
    11<?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
    210$url = '../';
    311header( 'Request-URI: '.$url );
  • extensions/title/language/fa_IR/index.php

    r26508 r32302  
    11<?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
    210$url = '../';
    311header( 'Request-URI: '.$url );
  • extensions/title/language/fr_CA/index.php

    r25042 r32302  
    11<?php
    22// +-----------------------------------------------------------------------+
    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.                                          |
    124// |                                                                       |
    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.                      |
    227// +-----------------------------------------------------------------------+
    238
  • extensions/title/language/fr_FR/index.php

    r31456 r32302  
    11<?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
    29// Recursive call
    310$url = '../';
  • extensions/title/language/fr_FR/plugin.lang.php

    r31456 r32302  
    11<?php
    22// +-----------------------------------------------------------------------+
    3 // | Title plugin for piwigo                                               |
     3// | Title plugin for piwigo by TEMMII                                     |
    44// +-----------------------------------------------------------------------+
    5 // | Copyright(C) 2011 - 2016 ddtddt             http://temmii.com/piwigo/ |
     5// | Copyright(C) 2011 - 2020 ddtddt             http://temmii.com/piwigo/ |
    66// +-----------------------------------------------------------------------+
    77// | This program is free software; you can redistribute it and/or modify  |
  • extensions/title/language/hu_HU/index.php

    r9432 r32302  
    11<?php
    22// +-----------------------------------------------------------------------+
    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.                                          |
    124// |                                                                       |
    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.                      |
    227// +-----------------------------------------------------------------------+
    238
  • extensions/title/language/index.php

    r9407 r32302  
    11<?php
    22// +-----------------------------------------------------------------------+
    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.                                          |
    124// |                                                                       |
    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.                      |
    227// +-----------------------------------------------------------------------+
    238
  • extensions/title/language/it_IT/index.php

    r11529 r32302  
    11<?php
    22// +-----------------------------------------------------------------------+
    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.                                          |
    124// |                                                                       |
    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.                      |
    227// +-----------------------------------------------------------------------+
    238
  • extensions/title/language/lv_LV/index.php

    r9794 r32302  
    11<?php
    22// +-----------------------------------------------------------------------+
    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.                                          |
    124// |                                                                       |
    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.                      |
    227// +-----------------------------------------------------------------------+
    238
  • extensions/title/language/nb_NO/index.php

    r30022 r32302  
    11<?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
    210$url = '../';
    311header( 'Request-URI: '.$url );
  • extensions/title/language/pt_PT/index.php

    r15618 r32302  
    11<?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
    210$url = '../';
    311header( 'Request-URI: '.$url );
  • extensions/title/language/sk_SK/index.php

    r9507 r32302  
    11<?php
    22// +-----------------------------------------------------------------------+
    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.                                          |
    124// |                                                                       |
    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.                      |
    227// +-----------------------------------------------------------------------+
    238
  • extensions/title/language/sr_RS/index.php

    r30808 r32302  
    11<?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
    210$url = '../';
    311header( 'Request-URI: '.$url );
  • extensions/title/language/sv_SE/index.php

    r24016 r32302  
    11<?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
    210$url = '../';
    311header( 'Request-URI: '.$url );
  • extensions/title/language/tr_TR/index.php

    r15927 r32302  
    11<?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
    210$url = '../';
    311header( 'Request-URI: '.$url );
  • extensions/title/main.inc.php

    r31456 r32302  
    1010
    1111// +-----------------------------------------------------------------------+
    12 // | Title plugin for piwigo                                               |
     12// | Title plugin for piwigo by TEMMII                                     |
    1313// +-----------------------------------------------------------------------+
    14 // | Copyright(C) 2011 - 2016 ddtddt             http://temmii.com/piwigo/ |
     14// | Copyright(C) 2011 - 2020 ddtddt             http://temmii.com/piwigo/ |
    1515// +-----------------------------------------------------------------------+
    1616// | This program is free software; you can redistribute it and/or modify  |
     
    4848add_event_handler('loc_begin_page_header', 'plug_Title', 56 );
    4949
    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  }
     50function 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}
    5857
    59 function plug_TitleP($content, &$smarty)
    60  {
     58function plug_TitleP($content, &$smarty){
    6159  $search = '#<title>.*?</title>#';
    62  
    6360  $replacement = '<title>{$PERSO_TITLE}</title>
    6461  ';
    65 
    6662  return preg_replace($search, $replacement, $content);
    67  }
     63}
    6864
    6965// Plugin for admin
    70 if (script_basename() == 'admin')   
    71 {
     66if (script_basename() == 'admin'){
    7267  include_once(dirname(__FILE__).'/initadmin.php');
    7368}
     
    7570// no empty !
    7671add_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 
     72function plugTitle(){
     73  global $template, $conf;
     74  $titlegen = & $conf['gallery_title'];
     75  if (!empty($titlegen)){                               
     76        $template->assign('PERSO_TITLE', $titlegen);
     77  }
     78}
    8979
    9080//use title on photo page
    9181add_event_handler('loc_begin_page_header', 'TitlePhoto', 76 );
    92 function TitlePhoto()
    93  {
    94                 global $template, $page;
    95 
    96                           if ( !empty($page['image_id']) )   
    97                                 {
     82function TitlePhoto(){
     83  global $template, $page;
     84  if ( !empty($page['image_id']) ){
    9885    $query = '
    9986select id,title
     
    10491$row = pwg_db_fetch_assoc($result);
    10592$titleP=$row['title'];
    106 
    10793$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}
    11599
    116100// use title on album page
    117101add_event_handler('loc_begin_page_header', 'Titlealbum', 71 );
    118 function Titlealbum()
    119  {
    120         global $template, $page;
    121                  if (!empty($page['category']['id']) )   
    122                                 {
     102function Titlealbum(){
     103  global $template, $page;
     104  if (!empty($page['category']['id']) ){
    123105    $query = '
    124106select id,title
     
    129111$row = pwg_db_fetch_assoc($result);
    130112$titleA=$row['title'];
     113$titleAED=trigger_change('AP_render_content', $titleA);
     114        if (!empty($titleAED)){
     115                                $template->assign('PERSO_TITLE', $titleAED);
     116        }
     117  }
     118}
    131119
    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
     121add_event_handler('loc_begin_page_header', 'Titleother', 66 );
     122function Titleother(){
     123  global $template, $page, $conf, $pwg_loaded_plugins;
     124  $query = '
    148125select id,page,title
    149126  FROM ' . TITLE_TABLE . '
     
    151128 
    152129  ;';
    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']);
    218176        }
    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'])){   
    224179        global $prefixeTable;
    225                         if ( !empty($page['additional_page']['id']) )   
    226                                 {
     180        if ( !empty($page['additional_page']['id']) ){
    227181                if (!defined('TITLE_AP_TABLE')) define('TITLE_AP_TABLE', $prefixeTable.'title_ap');     
    228182        $lire=$page['additional_page']['id'];
     
    236190        $titleap=$row['title'];
    237191        $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                 }
    243192        }
    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}
    245198 
    246199?>
  • extensions/title/maintain.class.php

    r31456 r32302  
    11<?php
    22// +-----------------------------------------------------------------------+
    3 // | Title plugin for piwigo                                               |
     3// | Title plugin for piwigo by TEMMII                                     |
    44// +-----------------------------------------------------------------------+
    5 // | Copyright(C) 2011 - 2016 ddtddt             http://temmii.com/piwigo/ |
     5// | Copyright(C) 2011 - 2020 ddtddt             http://temmii.com/piwigo/ |
    66// +-----------------------------------------------------------------------+
    77// | This program is free software; you can redistribute it and/or modify  |
Note: See TracChangeset for help on using the changeset viewer.