Changeset 32386
- Timestamp:
- Jan 17, 2021, 6:31:22 PM (3 years ago)
- Location:
- extensions/delete_hit_rate
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/delete_hit_rate/admin.php
r31436 r32386 2 2 3 3 // +-----------------------------------------------------------------------+ 4 // | Delete Hit/Rate plugin for piwigo 4 // | Delete Hit/Rate plugin for piwigo by TEMMII | 5 5 // +-----------------------------------------------------------------------+ 6 // | Copyright(C) 2011-20 16ddtddt http://temmii.com/piwigo/ |6 // | Copyright(C) 2011-2021 ddtddt http://temmii.com/piwigo/ | 7 7 // +-----------------------------------------------------------------------+ 8 8 // | This program is free software; you can redistribute it and/or modify | -
extensions/delete_hit_rate/index.php
r9796 r32386 1 1 <?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 24 2 // Recursive call 25 3 $url = '../'; -
extensions/delete_hit_rate/initadmin.php
r31437 r32386 2 2 3 3 // +-----------------------------------------------------------------------+ 4 // | Delete Hit/Rate plugin for piwigo 5 // +-----------------------------------------------------------------------+ 6 // | Copyright(C) 2011-20 16ddtddt http://temmii.com/piwigo/ |4 // | Delete Hit/Rate plugin for piwigo by TEMMII | 5 // +-----------------------------------------------------------------------+ 6 // | Copyright(C) 2011-2021 ddtddt http://temmii.com/piwigo/ | 7 7 // +-----------------------------------------------------------------------+ 8 8 // | This program is free software; you can redistribute it and/or modify | … … 28 28 define('PDHR_ADMIN',get_root_url().'admin.php?page=plugin-'.PDHR_DIR); 29 29 30 add_event_handler('get_admin_plugin_menu_links', 'dphr_admin_menu');30 /*add_event_handler('get_admin_plugin_menu_links', 'dphr_admin_menu'); 31 31 function dphr_admin_menu($menu){ 32 32 load_language('plugin.lang', PDHR_PATH); … … 36 36 ); 37 37 return $menu; 38 } 38 }*/ 39 39 40 40 //add prefiltre photo 41 41 add_event_handler('loc_begin_admin', 'plugdphrPf',60); 42 add_event_handler('loc_begin_admin _page', 'plugdphrPf2',60);42 add_event_handler('loc_begin_admin', 'plugdphrPf2',60); 43 43 44 44 function plugdphrPf() … … 57 57 { 58 58 load_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>#"; 63 66 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 '; 72 77 73 78 return preg_replace($search, $replacement, $content); … … 85 90 redirect($_SERVER['REQUEST_URI']); 86 91 } 92 $_SESSION['page_infos'] = $admin_base_url; 87 93 $query = 'UPDATE ' . IMAGES_TABLE . ' SET hit= \'0\' WHERE id = '.$photoid[0].';'; 88 94 $result = pwg_query($query); … … 99 105 redirect($_SERVER['REQUEST_URI']); 100 106 } 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].';'; 102 108 $result = pwg_query($query); 103 109 $query = 'DELETE FROM ' . RATE_TABLE . ' WHERE element_id = '.$photoid[0].';'; … … 127 133 { 128 134 load_language('plugin.lang', PDHR_PATH); 129 $search = '# </ul>130 </td>131 </tr> 132 </table>#';135 $search = '# </div> 136 </div> 137 138 <div class="catLock">#'; 133 139 134 140 $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"> 141 147 '; 142 148 … … 199 205 foreach ($delval as $delrate) 200 206 { 201 $query = 'UPDATE ' . IMAGES_TABLE . ' SET rating_score = \'NULL\'WHERE id = \''.$delrate.'\';';207 $query = 'UPDATE ' . IMAGES_TABLE . ' SET rating_score = NULL WHERE id = \''.$delrate.'\';'; 202 208 $result = pwg_query($query); 203 209 -
extensions/delete_hit_rate/language/en_UK/index.php
r9796 r32386 1 1 <?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 24 2 // Recursive call 25 3 $url = '../'; -
extensions/delete_hit_rate/language/en_UK/plugin.lang.php
r31802 r32386 1 1 <?php 2 2 // +-----------------------------------------------------------------------+ 3 // | Delete Hit/Rate plugin for piwigo 3 // | Delete Hit/Rate plugin for piwigo by TEMMII | 4 4 // +-----------------------------------------------------------------------+ 5 // | Copyright(C) 2011-20 16ddtddt http://temmii.com/piwigo/ |5 // | Copyright(C) 2011-2021 ddtddt http://temmii.com/piwigo/ | 6 6 // +-----------------------------------------------------------------------+ 7 7 // | This program is free software; you can redistribute it and/or modify | -
extensions/delete_hit_rate/language/fr_FR/index.php
r9796 r32386 1 1 <?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 24 2 // Recursive call 25 3 $url = '../'; -
extensions/delete_hit_rate/language/fr_FR/plugin.lang.php
r31796 r32386 1 1 <?php 2 2 // +-----------------------------------------------------------------------+ 3 // | Delete Hit/Rate plugin for piwigo 3 // | Delete Hit/Rate plugin for piwigo by TEMMII | 4 4 // +-----------------------------------------------------------------------+ 5 // | Copyright(C) 2011-20 16ddtddt http://temmii.com/piwigo/ |5 // | Copyright(C) 2011-2021 ddtddt http://temmii.com/piwigo/ | 6 6 // +-----------------------------------------------------------------------+ 7 7 // | This program is free software; you can redistribute it and/or modify | -
extensions/delete_hit_rate/language/index.php
r9796 r32386 1 1 <?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 24 2 // Recursive call 25 3 $url = '../'; -
extensions/delete_hit_rate/main.inc.php
r31437 r32386 7 7 Author: ddtddt 8 8 Author URI: http://temmii.com/piwigo/ 9 Has Settings: true 9 10 */ 10 11 // +-----------------------------------------------------------------------+ 11 // | Delete Hit/Rate plugin for piwigo 12 // | Delete Hit/Rate plugin for piwigo by TEMMII | 12 13 // +-----------------------------------------------------------------------+ 13 // | Copyright(C) 2011-20 16ddtddt http://temmii.com/piwigo/ |14 // | Copyright(C) 2011-2021 ddtddt http://temmii.com/piwigo/ | 14 15 // +-----------------------------------------------------------------------+ 15 16 // | This program is free software; you can redistribute it and/or modify |
Note: See TracChangeset
for help on using the changeset viewer.