Changeset 32181 for extensions


Ignore:
Timestamp:
May 6, 2020, 10:07:34 PM (4 years ago)
Author:
ddtddt
Message:

[Photo_add_by] change for compatibilty new mpp

Location:
extensions/Photo_add_by
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • extensions/Photo_add_by/admin.php

    r31465 r32181  
    11<?php
    22// +-----------------------------------------------------------------------+
    3 // | Photo added by plugin for Piwigo                                      |
     3// | Photo added by plugin for Piwigo  by TEMMII                           |
    44// +-----------------------------------------------------------------------+
    5 // | Copyright(C) 2012-2016 ddtddt               http://temmii.com/piwigo/ |
     5// | Copyright(C) 2012-2020 ddtddt               http://temmii.com/piwigo/ |
    66// +-----------------------------------------------------------------------+
    77// | This program is free software; you can redistribute it and/or modify  |
  • extensions/Photo_add_by/initpicture.php

    r31465 r32181  
    11<?php
    22// +-----------------------------------------------------------------------+
    3 // | Photo added by plugin for Piwigo                                      |
     3// | Photo added by plugin for Piwigo  by TEMMII                           |
    44// +-----------------------------------------------------------------------+
    5 // | Copyright(C) 2012-2016 ddtddt               http://temmii.com/piwigo/ |
     5// | Copyright(C) 2012-2020 ddtddt               http://temmii.com/piwigo/ |
    66// +-----------------------------------------------------------------------+
    77// | This program is free software; you can redistribute it and/or modify  |
     
    2222//Ajout du prefiltre
    2323add_event_handler('loc_begin_picture', 'pabI', 55 );
    24 
    25 function pabI()
    26  {
     24function pabI(){
    2725        global $template;
    2826        $template->set_prefilter('picture', 'pabIT');
    29  }
     27}
    3028
    31 
    32 function pabIT($content, &$smarty)
    33  {
    34  
    35  global $conf;
    36  
    37   $search = '#<div id="'.$conf['Photo_add_by'].'" class="imageInfo">#';
    38 
    39   $replacement = '
     29function pabIT($content, &$smarty){
     30  global $conf, $pwg_loaded_plugins;
     31        $search = '#<div id="'.$conf['Photo_add_by'].'" class="imageInfo">#';
     32  if (isset($pwg_loaded_plugins['manage_properties_photos'])){
     33        $replacement = '<div id="'.$conf['Photo_add_by'].'" class="imageInfo">';
     34  }else{
     35        $replacement = '
    4036  {if $PAB}
    4137  <div id="pab1" class="imageInfo">
     
    4541{/if}
    4642<div id="'.$conf['Photo_add_by'].'" class="imageInfo">';
    47 
     43  }
    4844  return preg_replace($search, $replacement, $content);
    4945 }
  • extensions/Photo_add_by/language/en_UK/plugin.lang.php

    r31465 r32181  
    11<?php
    22// +-----------------------------------------------------------------------+
    3 // | Photo added by plugin for Piwigo                                      |
     3// | Photo added by plugin for Piwigo  by TEMMII                           |
    44// +-----------------------------------------------------------------------+
    5 // | Copyright(C) 2012-2016 ddtddt               http://temmii.com/piwigo/ |
     5// | Copyright(C) 2012-2020 ddtddt               http://temmii.com/piwigo/ |
    66// +-----------------------------------------------------------------------+
    77// | This program is free software; you can redistribute it and/or modify  |
     
    1919// | USA.                                                                  |
    2020// +-----------------------------------------------------------------------+
     21
    2122$lang['Photo added by'] = 'Photo added by';
    2223$lang['Add information before'] = 'Add information before';
  • extensions/Photo_add_by/language/fr_FR/plugin.lang.php

    r31465 r32181  
    11<?php
    22// +-----------------------------------------------------------------------+
    3 // | Photo added by plugin for Piwigo                                      |
     3// | Photo added by plugin for Piwigo  by TEMMII                           |
    44// +-----------------------------------------------------------------------+
    5 // | Copyright(C) 2012-2016 ddtddt               http://temmii.com/piwigo/ |
     5// | Copyright(C) 2012-2020 ddtddt               http://temmii.com/piwigo/ |
    66// +-----------------------------------------------------------------------+
    77// | This program is free software; you can redistribute it and/or modify  |
     
    1919// | USA.                                                                  |
    2020// +-----------------------------------------------------------------------+
     21
    2122$lang['Photo added by'] = 'Photo Ajoutée par';
    2223$lang['Add information before'] = 'Ajouter l\'information avant';
  • extensions/Photo_add_by/main.inc.php

    r31465 r32181  
    22/*
    33Plugin Name: Photo added by
    4 Version: auto
     4Version: 2.9.a
    55Description: Add who added photo on photo page
    66Plugin URI: http://piwigo.org/ext/extension_view.php?eid=621
     
    1010
    1111// +-----------------------------------------------------------------------+
    12 // | Photo added by plugin for Piwigo                                      |
     12// | Photo added by plugin for Piwigo  by TEMMII                           |
    1313// +-----------------------------------------------------------------------+
    14 // | Copyright(C) 2012-2016 ddtddt               http://temmii.com/piwigo/ |
     14// | Copyright(C) 2012-2020 ddtddt               http://temmii.com/piwigo/ |
    1515// +-----------------------------------------------------------------------+
    1616// | This program is free software; you can redistribute it and/or modify  |
     
    3131if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!');
    3232
    33 global $prefixeTable;
     33global $prefixeTable, $pwg_loaded_plugins;
    3434
    3535define('PAB_DIR' , basename(dirname(__FILE__)));
     
    5050add_event_handler('get_admin_plugin_menu_links', 'PAB_admin_menu');
    5151function PAB_admin_menu($menu){
    52   $menu[] = array(
    53     'NAME' => l10n('Photo added by'),
    54     'URL' => PAB_ADMIN,
    55   );
     52        global $pwg_loaded_plugins;
     53  if (is_webmaster()){
     54        if(isset($pwg_loaded_plugins['manage_properties_photos'])){}else{
     55                $menu[] = array(
     56                        'NAME' => l10n('Photo added by'),
     57                        'URL' => PAB_ADMIN,
     58                );
     59        }
     60  }
    5661  return $menu;
    5762}
  • extensions/Photo_add_by/maintain.class.php

    r31605 r32181  
    11<?php
    22// +-----------------------------------------------------------------------+
    3 // | Photo added by plugin for Piwigo                                      |
     3// | Photo added by plugin for Piwigo  by TEMMII                           |
    44// +-----------------------------------------------------------------------+
    5 // | Copyright(C) 2012-2016 ddtddt               http://temmii.com/piwigo/ |
     5// | Copyright(C) 2012-2020 ddtddt               http://temmii.com/piwigo/ |
    66// +-----------------------------------------------------------------------+
    77// | This program is free software; you can redistribute it and/or modify  |
     
    1919// | USA.                                                                  |
    2020// +-----------------------------------------------------------------------+
     21
    2122defined('PHPWG_ROOT_PATH') or die('Hacking attempt!');
    2223
     
    4647        conf_update_param('Photo_add_by_show',0,true);
    4748    }
     49        $template->delete_compiled_templates(array('picture' => 'picture.tpl'));
    4850  }
    4951
     
    6365  function deactivate()
    6466  {
     67        $template->delete_compiled_templates(array('picture' => 'picture.tpl'));
    6568  }
    6669
Note: See TracChangeset for help on using the changeset viewer.