Changeset 32386


Ignore:
Timestamp:
Jan 17, 2021, 6:31:22 PM (3 years ago)
Author:
ddtddt
Message:

[delete_hit_rate] piwigo 11

Location:
extensions/delete_hit_rate
Files:
9 edited

Legend:

Unmodified
Added
Removed
  • extensions/delete_hit_rate/admin.php

    r31436 r32386  
    22
    33// +-----------------------------------------------------------------------+
    4 // | Delete Hit/Rate plugin for piwigo                                     |
     4// | Delete Hit/Rate plugin for piwigo  by TEMMII                          |
    55// +-----------------------------------------------------------------------+
    6 // | Copyright(C) 2011-2016 ddtddt               http://temmii.com/piwigo/ |
     6// | Copyright(C) 2011-2021 ddtddt               http://temmii.com/piwigo/ |
    77// +-----------------------------------------------------------------------+
    88// | This program is free software; you can redistribute it and/or modify  |
  • extensions/delete_hit_rate/index.php

    r9796 r32386  
    11<?php
    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                                          |
    12 // |                                                                       |
    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.                                                                  |
    22 // +-----------------------------------------------------------------------+
    23 
    242// Recursive call
    253$url = '../';
  • extensions/delete_hit_rate/initadmin.php

    r31437 r32386  
    22
    33// +-----------------------------------------------------------------------+
    4 // | Delete Hit/Rate plugin for piwigo                                     |
    5 // +-----------------------------------------------------------------------+
    6 // | Copyright(C) 2011-2016 ddtddt               http://temmii.com/piwigo/ |
     4// | Delete Hit/Rate plugin for piwigo  by TEMMII                          |
     5// +-----------------------------------------------------------------------+
     6// | Copyright(C) 2011-2021 ddtddt               http://temmii.com/piwigo/ |
    77// +-----------------------------------------------------------------------+
    88// | This program is free software; you can redistribute it and/or modify  |
     
    2828define('PDHR_ADMIN',get_root_url().'admin.php?page=plugin-'.PDHR_DIR);
    2929
    30 add_event_handler('get_admin_plugin_menu_links', 'dphr_admin_menu');
     30/*add_event_handler('get_admin_plugin_menu_links', 'dphr_admin_menu');
    3131function dphr_admin_menu($menu){
    3232  load_language('plugin.lang', PDHR_PATH);
     
    3636  );
    3737  return $menu;
    38 }
     38}*/
    3939
    4040//add prefiltre photo
    4141add_event_handler('loc_begin_admin', 'plugdphrPf',60);
    42 add_event_handler('loc_begin_admin_page', 'plugdphrPf2',60);
     42add_event_handler('loc_begin_admin', 'plugdphrPf2',60);
    4343
    4444function plugdphrPf()
     
    5757        {
    5858load_language('plugin.lang', PDHR_PATH);
    59   $search = '#          </ul>
    60         </td>
    61       </tr>
    62     </table>#';
     59  $search = "#        </div>
     60      </div>
     61    </div>
     62
     63
     64    <p>
     65      <strong>#";
    6366 
    64   $replacement = '
    65         <li><a href="{$U_DELETEPHIT}" onclick="return confirm(\'{\'Are you sure?\'|@translate|@escape:javascript}\');"><span class="icon-trash mouse"></span>{\'Purge hit of the photo\'|@translate}</a></li>
    66         <li><a href="{$U_DELETEPRATE}" onclick="return confirm(\'{\'Are you sure?\'|@translate|@escape:javascript}\');"><span class="icon-trash mouse"></span>{\'Purge rate of the photo\'|@translate}</a></li>
    67 
    68           </ul>
    69         </td>
    70       </tr>
    71     </table>';
     67  $replacement = '        </div>
     68      </div>
     69    </div>
     70
     71
     72    <p>
     73      <strong>
     74        <a class="icon-trash mouse" href="{$U_DELETEPHIT}" onclick="return confirm(\'{\'Are you sure?\'|@translate|@escape:javascript}\');">{\'Purge hit of the photo\'|@translate}</a><br>
     75        <a class="icon-trash mouse" href="{$U_DELETEPRATE}" onclick="return confirm(\'{\'Are you sure?\'|@translate|@escape:javascript}\');">{\'Purge rate of the photo\'|@translate}</a><br><br>
     76  ';
    7277
    7378  return preg_replace($search, $replacement, $content);
     
    8590  redirect($_SERVER['REQUEST_URI']);
    8691  }
     92  $_SESSION['page_infos'] = $admin_base_url;
    8793  $query = 'UPDATE ' . IMAGES_TABLE . ' SET hit= \'0\' WHERE id = '.$photoid[0].';';
    8894  $result = pwg_query($query);
     
    99105  redirect($_SERVER['REQUEST_URI']);
    100106  }
    101   $query = 'UPDATE ' . IMAGES_TABLE . ' SET rating_score = \'NULL\' WHERE id = '.$photoid[0].';';
     107  $query = 'UPDATE ' . IMAGES_TABLE . ' SET rating_score = NULL WHERE id = '.$photoid[0].';';
    102108  $result = pwg_query($query);
    103109  $query = 'DELETE FROM ' . RATE_TABLE . ' WHERE element_id = '.$photoid[0].';';
     
    127133 {
    128134load_language('plugin.lang', PDHR_PATH);
    129   $search = '#</ul>
    130       </td>
    131     </tr>
    132   </table>#';
     135  $search = '#      </div>
     136    </div>
     137
     138    <div class="catLock">#';
    133139 
    134140  $replacement = '
    135                         <li><a href="{$U_DELETEAHIT}" onclick="return confirm(\'{\'Are you sure?\'|@translate|@escape:javascript}\');"><span class="icon-trash mouse"></span>{\'Purge hits on all pictures album\'|@translate}</a></li>
    136                         <li><a href="{$U_DELETEARATE}" onclick="return confirm(\'{\'Are you sure?\'|@translate|@escape:javascript}\');"><span class="icon-trash mouse"></span>{\'Purge rates on all pictures album\'|@translate}</a></li>
    137                    </ul>
    138       </td>
    139     </tr>
    140   </table>
     141                        <a class="icon-trash mouse" href="{$U_DELETEAHIT}" onclick="return confirm(\'{\'Are you sure?\'|@translate|@escape:javascript}\');">{\'Purge hits on all pictures album\'|@translate}</a>
     142                        <a class="icon-trash mouse" href="{$U_DELETEARATE}" onclick="return confirm(\'{\'Are you sure?\'|@translate|@escape:javascript}\');">{\'Purge rates on all pictures album\'|@translate}</a>
     143                        </div>
     144    </div>
     145
     146    <div class="catLock">
    141147  ';
    142148
     
    199205  foreach ($delval as $delrate)
    200206        {
    201         $query = 'UPDATE ' . IMAGES_TABLE . ' SET rating_score = \'NULL\' WHERE id = \''.$delrate.'\';';
     207        $query = 'UPDATE ' . IMAGES_TABLE . ' SET rating_score = NULL WHERE id = \''.$delrate.'\';';
    202208        $result = pwg_query($query);
    203209       
  • extensions/delete_hit_rate/language/en_UK/index.php

    r9796 r32386  
    11<?php
    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                                          |
    12 // |                                                                       |
    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.                                                                  |
    22 // +-----------------------------------------------------------------------+
    23 
    242// Recursive call
    253$url = '../';
  • extensions/delete_hit_rate/language/en_UK/plugin.lang.php

    r31802 r32386  
    11<?php
    22// +-----------------------------------------------------------------------+
    3 // | Delete Hit/Rate plugin for piwigo                                     |
     3// | Delete Hit/Rate plugin for piwigo  by TEMMII                          |
    44// +-----------------------------------------------------------------------+
    5 // | Copyright(C) 2011-2016 ddtddt               http://temmii.com/piwigo/ |
     5// | Copyright(C) 2011-2021 ddtddt               http://temmii.com/piwigo/ |
    66// +-----------------------------------------------------------------------+
    77// | This program is free software; you can redistribute it and/or modify  |
  • extensions/delete_hit_rate/language/fr_FR/index.php

    r9796 r32386  
    11<?php
    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                                          |
    12 // |                                                                       |
    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.                                                                  |
    22 // +-----------------------------------------------------------------------+
    23 
    242// Recursive call
    253$url = '../';
  • extensions/delete_hit_rate/language/fr_FR/plugin.lang.php

    r31796 r32386  
    11<?php
    22// +-----------------------------------------------------------------------+
    3 // | Delete Hit/Rate plugin for piwigo                                     |
     3// | Delete Hit/Rate plugin for piwigo  by TEMMII                          |
    44// +-----------------------------------------------------------------------+
    5 // | Copyright(C) 2011-2016 ddtddt               http://temmii.com/piwigo/ |
     5// | Copyright(C) 2011-2021 ddtddt               http://temmii.com/piwigo/ |
    66// +-----------------------------------------------------------------------+
    77// | This program is free software; you can redistribute it and/or modify  |
  • extensions/delete_hit_rate/language/index.php

    r9796 r32386  
    11<?php
    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                                          |
    12 // |                                                                       |
    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.                                                                  |
    22 // +-----------------------------------------------------------------------+
    23 
    242// Recursive call
    253$url = '../';
  • extensions/delete_hit_rate/main.inc.php

    r31437 r32386  
    77Author: ddtddt
    88Author URI: http://temmii.com/piwigo/
     9Has Settings: true
    910*/
    1011// +-----------------------------------------------------------------------+
    11 // | Delete Hit/Rate plugin for piwigo                                     |
     12// | Delete Hit/Rate plugin for piwigo  by TEMMII                          |
    1213// +-----------------------------------------------------------------------+
    13 // | Copyright(C) 2011-2016 ddtddt               http://temmii.com/piwigo/ |
     14// | Copyright(C) 2011-2021 ddtddt               http://temmii.com/piwigo/ |
    1415// +-----------------------------------------------------------------------+
    1516// | This program is free software; you can redistribute it and/or modify  |
Note: See TracChangeset for help on using the changeset viewer.