Changeset 32220


Ignore:
Timestamp:
Jun 1, 2020, 9:05:02 PM (4 years ago)
Author:
ddtddt
Message:
 
Location:
extensions/bmp_description
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • extensions/bmp_description/initadmin.php

    r31469 r32220  
    11<?php
    22// +-----------------------------------------------------------------------+
    3 // | Batch Manager, Photo Description by plugin for Piwigo                 |
     3// | Batch Manager, Photo Description by plugin for Piwigo by TEMMII       |
    44// +-----------------------------------------------------------------------+
    5 // | Copyright(C) 2013-2016 ddtddt               http://temmii.com/piwigo/ |
     5// | Copyright(C) 2013-2020 ddtddt               http://temmii.com/piwigo/ |
    66// +-----------------------------------------------------------------------+
    77// | This program is free software; you can redistribute it and/or modify  |
     
    2020// +-----------------------------------------------------------------------+
    2121if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!');
    22 
    23 load_language('plugin.lang', BMPD_PATH);
    2422
    2523global $prefilter;
     
    6765 
    6866function BMPD_loc_end_element_set_global(){
    69         global $template;
    70          $PAED = pwg_db_fetch_assoc(pwg_query("SELECT state FROM " . PLUGINS_TABLE . " WHERE id = 'ExtendedDescription';"));
    71                 if($PAED['state'] == 'active'){
    72                   $templatebmpd='
    73                    <input type="checkbox" name="check_BMPD4"> '.l10n('remove description').'<br>
    74                    <textarea rows="5" cols="50" placeholder="'.l10n('Type here the description')."  /  ".l10n('Use Extended Description tags...').'" class="description" name="BMPD3" id="BMPD3"></textarea><br>
    75                    <input type="checkbox" name="check_BMPD"> '.l10n('confirm').'
    76               ';
    77                 }else{
    78                   $templatebmpd='
    79                    <input type="checkbox" name="check_BMPD4"> '.l10n('remove description').'<br>
    80                    <textarea rows="5" cols="50" placeholder="'.l10n('Type here the description').'" class="description" name="BMPD3" id="BMPD3"></textarea><br>
    81                    <input type="checkbox" name="check_BMPD"> '.l10n('confirm').'
    82               ';
    83                 }
    84         $template->append('element_set_global_plugins_actions', array(
    85       'ID' => 'BMPD3',
    86       'NAME' => l10n('Set description'),
    87       'CONTENT' => $templatebmpd,
    88         ));
    89  }
     67  global $template, $pwg_loaded_plugins;
     68        if (isset($pwg_loaded_plugins['ExtendedDescription'])){
     69          $templatebmpd='
     70           <input type="checkbox" name="check_BMPD4"> '.l10n('remove description').'<br>
     71           <textarea rows="5" cols="50" placeholder="'.l10n('Type here the description')."  /  ".l10n('Use Extended Description tags...').'" class="description" name="BMPD3" id="BMPD3"></textarea><br>
     72           <input type="checkbox" name="check_BMPD"> '.l10n('confirm').'
     73          ';
     74        }else{
     75          $templatebmpd='
     76           <input type="checkbox" name="check_BMPD4"> '.l10n('remove description').'<br>
     77           <textarea rows="5" cols="50" placeholder="'.l10n('Type here the description').'" class="description" name="BMPD3" id="BMPD3"></textarea><br>
     78           <input type="checkbox" name="check_BMPD"> '.l10n('confirm').'
     79          ';
     80        }
     81  $template->append('element_set_global_plugins_actions', array(
     82        'ID' => 'BMPD3',
     83        'NAME' => l10n('Set description'),
     84        'CONTENT' => $templatebmpd,
     85  ));
     86}
    9087
    91 function BMPD_element_set_global_action($action, $collection) {
     88function BMPD_element_set_global_action($action, $collection){
    9289  if ($action == 'BMPD3'){
    9390    global $page;
  • extensions/bmp_description/language/en_UK/plugin.lang.php

    r31469 r32220  
    11<?php
    22// +-----------------------------------------------------------------------+
    3 // | Batch Manager, Photo Description by plugin for Piwigo                 |
     3// | Batch Manager, Photo Description by plugin for Piwigo by TEMMII       |
    44// +-----------------------------------------------------------------------+
    5 // | Copyright(C) 2013-2016 ddtddt               http://temmii.com/piwigo/ |
     5// | Copyright(C) 2013-2020 ddtddt               http://temmii.com/piwigo/ |
    66// +-----------------------------------------------------------------------+
    77// | This program is free software; you can redistribute it and/or modify  |
  • extensions/bmp_description/language/fr_FR/plugin.lang.php

    r31469 r32220  
    11<?php
    22// +-----------------------------------------------------------------------+
    3 // | Batch Manager, Photo Description by plugin for Piwigo                 |
     3// | Batch Manager, Photo Description by plugin for Piwigo by TEMMII       |
    44// +-----------------------------------------------------------------------+
    5 // | Copyright(C) 2013-2016 ddtddt               http://temmii.com/piwigo/ |
     5// | Copyright(C) 2013-2020 ddtddt               http://temmii.com/piwigo/ |
    66// +-----------------------------------------------------------------------+
    77// | This program is free software; you can redistribute it and/or modify  |
  • extensions/bmp_description/main.inc.php

    r31469 r32220  
    1010
    1111// +-----------------------------------------------------------------------+
    12 // | Batch Manager, Photo Description by plugin for Piwigo                 |
     12// | Batch Manager, Photo Description by plugin for Piwigo by TEMMII       |
    1313// +-----------------------------------------------------------------------+
    14 // | Copyright(C) 2013-2016 ddtddt               http://temmii.com/piwigo/ |
     14// | Copyright(C) 2013-2020 ddtddt               http://temmii.com/piwigo/ |
    1515// +-----------------------------------------------------------------------+
    1616// | This program is free software; you can redistribute it and/or modify  |
     
    4242
    4343// Plugin for admin
    44 if (script_basename() == 'admin')   
    45 {
     44if (script_basename() == 'admin'){
    4645  include_once(dirname(__FILE__).'/initadmin.php');
    4746}
Note: See TracChangeset for help on using the changeset viewer.