Changeset 30100 for extensions/ThumbnailTooltip/admin
- Timestamp:
- Oct 16, 2014, 9:39:11 AM (10 years ago)
- Location:
- extensions/ThumbnailTooltip/admin
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/ThumbnailTooltip/admin/admin.php
r28187 r30100 1 1 <?php 2 2 3 if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!'); 4 5 3 6 4 7 global $template, $conf; 5 8 9 10 6 11 load_language('plugin.lang', thumbnail_tooltip_PATH); 12 7 13 include(dirname(__FILE__).'/config_default.inc.php'); 14 8 15 $params = array_merge($config_default, unserialize($conf['thumbnail_tooltip'])); 9 16 17 18 10 19 if (isset($_POST['submit'])) { 20 11 21 $params = array( 22 12 23 'display_name' => $_POST['display_name'] ? true : false, 24 13 25 'value1' => $_POST['value1'], 26 14 27 'value2' => $_POST['value2'], 28 15 29 'value3' => $_POST['value3'], 30 16 31 'value4' => $_POST['value4'], 32 17 33 'value5' => $_POST['value5'], 34 18 35 'value6' => $_POST['value6'], 36 19 37 'separator' => $_POST['separator'], 38 20 39 'display_author_cat' => $_POST['display_author_cat'] 40 21 41 ); 22 42 43 44 23 45 $query = ' 46 24 47 UPDATE ' . CONFIG_TABLE . ' 48 25 49 SET value="' . addslashes(serialize($params)) . '" 50 26 51 WHERE param="thumbnail_tooltip" 52 27 53 LIMIT 1'; 54 28 55 pwg_query($query); 56 29 57 array_push($page['infos'], l10n('tn_configuration_saved')); 58 30 59 } 31 60 32 61 62 63 64 33 65 if (isset($_POST['restore'])) { 66 34 67 $params = $config_default; 35 68 69 70 36 71 $query = ' 72 37 73 UPDATE ' . CONFIG_TABLE . ' 74 38 75 SET value="' . addslashes(serialize($params)) . '" 76 39 77 WHERE param="thumbnail_tooltip" 78 40 79 LIMIT 1'; 80 41 81 pwg_query($query); 82 42 83 array_push($page['infos'], l10n('tn_default_parameters_saved')); 84 43 85 } 44 86 45 87 88 89 90 46 91 $template->assign(array( 92 47 93 'DISPLAY_NAME' => $params['display_name'], 94 48 95 'VALUE1' => $params['value1'], 96 49 97 'VALUE2' => $params['value2'], 98 50 99 'VALUE3' => $params['value3'], 100 51 101 'VALUE4' => $params['value4'], 102 52 103 'VALUE5' => $params['value5'], 104 53 105 'VALUE6' => $params['value6'], 106 54 107 'SEPARATOR' => $params['separator'], 108 55 109 'DISPLAY_AUTHOR_CAT' => $params['display_author_cat'] 110 56 111 )); 57 112 58 113 114 115 116 59 117 $template->set_filenames(array('plugin_admin_content' => dirname(__FILE__) . '/admin.tpl')); 118 60 119 $template->assign_var_from_handle('ADMIN_CONTENT', 'plugin_admin_content'); 120 61 121 ?> -
extensions/ThumbnailTooltip/admin/admin.tpl
r28262 r30100 1 1 <div class="titrePage"> 2 2 3 <h2>Thumbnail Tooltip</h2> 4 3 5 </div> 4 6 7 8 5 9 <form action="" method="post"> 6 10 11 12 7 13 <fieldset> 14 8 15 <legend>{'tn_display_img'|@translate}</legend> 16 9 17 <table> 18 10 19 <tr> 20 11 21 <td align="right" nowrap="nowrap">{'tn_display_name_img'|@translate} : </td> 22 12 23 <td><input type="radio" name="display_name" value="1" {if $DISPLAY_NAME}checked="checked"{/if} onClick="javascript: jQuery('.name_link').show();"> {'tn_yes'|@translate} 24 13 25 <input type="radio" name="display_name" value="0" {if !$DISPLAY_NAME}checked="checked"{/if} onClick="javascript: jQuery('.name_link').hide();"> {'tn_no'|@translate} 14 </td> 26 27 </td> 28 15 29 </tr> 30 16 31 17 <tr><td> </td></tr> 32 33 <tr><td> </td></tr> 34 35 18 36 19 37 <tr class="name_link"> 38 20 39 <td align="right" nowrap="nowrap">{'tn_name_link'|@translate} : </td> 40 21 41 <td><select name="value1" style="widht:30px"> 42 22 43 <option value="tn_type1" {if $VALUE1 == 'tn_type1'}selected="selected"{/if}>{'tn_type1'|@translate}</option> 44 23 45 <option value="tn_type2" {if $VALUE1 == 'tn_type2'}selected="selected"{/if}>{'tn_type2'|@translate}</option> 46 24 47 <option value="tn_type3" {if $VALUE1 == 'tn_type3'}selected="selected"{/if}>{'tn_type3'|@translate}</option> 48 25 49 <option value="tn_type4" {if $VALUE1 == 'tn_type4'}selected="selected"{/if}>{'tn_type4'|@translate}</option> 50 26 51 <option value="tn_type5" {if $VALUE1 == 'tn_type5'}selected="selected"{/if}>{'tn_type5'|@translate}</option> 52 27 53 <option value="tn_type6" {if $VALUE1 == 'tn_type6'}selected="selected"{/if}>{'tn_type6'|@translate}</option> 54 28 55 <option value="tn_type7" {if $VALUE1 == 'tn_type7'}selected="selected"{/if}>{'tn_type7'|@translate}</option> 56 29 57 <option value="tn_type8" {if $VALUE1 == 'tn_type8'}selected="selected"{/if}>{'tn_type8'|@translate}</option> 58 30 59 <option value="tn_type9" {if $VALUE1 == 'tn_type9'}selected="selected"{/if}>{'Dimensions'|@translate} - {'Filesize'|@translate}</option> 31 </select> 60 61 </select> 62 32 63 <select name="value2" style="widht:30px"> 64 33 65 <option value="none" {if $VALUE2 == 'tn_none'}selected="selected"{/if}>{'tn_none'|@translate}</option> 66 34 67 <option value="tn_type1" {if $VALUE2 == 'tn_type1'}selected="selected"{/if}>{'tn_type1'|@translate}</option> 68 35 69 <option value="tn_type2" {if $VALUE2 == 'tn_type2'}selected="selected"{/if}>{'tn_type2'|@translate}</option> 70 36 71 <option value="tn_type3" {if $VALUE2 == 'tn_type3'}selected="selected"{/if}>{'tn_type3'|@translate}</option> 72 37 73 <option value="tn_type4" {if $VALUE2 == 'tn_type4'}selected="selected"{/if}>{'tn_type4'|@translate}</option> 74 38 75 <option value="tn_type5" {if $VALUE2 == 'tn_type5'}selected="selected"{/if}>{'tn_type5'|@translate}</option> 76 39 77 <option value="tn_type6" {if $VALUE2 == 'tn_type6'}selected="selected"{/if}>{'tn_type6'|@translate}</option> 78 40 79 <option value="tn_type7" {if $VALUE2 == 'tn_type7'}selected="selected"{/if}>{'tn_type7'|@translate}</option> 80 41 81 <option value="tn_type8" {if $VALUE2 == 'tn_type8'}selected="selected"{/if}>{'tn_type8'|@translate}</option> 82 42 83 <option value="tn_type9" {if $VALUE2 == 'tn_type9'}selected="selected"{/if}>{'Dimensions'|@translate} - {'Filesize'|@translate}</option> 43 </select> 84 85 </select> 86 44 87 <select name="value3" style="widht:30px"> 88 45 89 <option value="none" {if $VALUE3 == 'tn_none'}selected="selected"{/if}>{'tn_none'|@translate}</option> 90 46 91 <option value="tn_type1" {if $VALUE3 == 'tn_type1'}selected="selected"{/if}>{'tn_type1'|@translate}</option> 92 47 93 <option value="tn_type2" {if $VALUE3 == 'tn_type2'}selected="selected"{/if}>{'tn_type2'|@translate}</option> 94 48 95 <option value="tn_type3" {if $VALUE3 == 'tn_type3'}selected="selected"{/if}>{'tn_type3'|@translate}</option> 96 49 97 <option value="tn_type4" {if $VALUE3 == 'tn_type4'}selected="selected"{/if}>{'tn_type4'|@translate}</option> 98 50 99 <option value="tn_type5" {if $VALUE3 == 'tn_type5'}selected="selected"{/if}>{'tn_type5'|@translate}</option> 100 51 101 <option value="tn_type6" {if $VALUE3 == 'tn_type6'}selected="selected"{/if}>{'tn_type6'|@translate}</option> 102 52 103 <option value="tn_type7" {if $VALUE3 == 'tn_type7'}selected="selected"{/if}>{'tn_type7'|@translate}</option> 104 53 105 <option value="tn_type8" {if $VALUE3 == 'tn_type8'}selected="selected"{/if}>{'tn_type8'|@translate}</option> 106 54 107 <option value="tn_type9" {if $VALUE3 == 'tn_type9'}selected="selected"{/if}>{'Dimensions'|@translate} - {'Filesize'|@translate}</option> 55 </select> 108 109 </select> 110 56 111 <select name="value4" style="widht:30px"> 112 57 113 <option value="none" {if $VALUE4 == 'tn_none'}selected="selected"{/if}>{'tn_none'|@translate}</option> 114 58 115 <option value="tn_type1" {if $VALUE4 == 'tn_type1'}selected="selected"{/if}>{'tn_type1'|@translate}</option> 116 59 117 <option value="tn_type2" {if $VALUE4 == 'tn_type2'}selected="selected"{/if}>{'tn_type2'|@translate}</option> 118 60 119 <option value="tn_type3" {if $VALUE4 == 'tn_type3'}selected="selected"{/if}>{'tn_type3'|@translate}</option> 120 61 121 <option value="tn_type4" {if $VALUE4 == 'tn_type4'}selected="selected"{/if}>{'tn_type4'|@translate}</option> 122 62 123 <option value="tn_type5" {if $VALUE4 == 'tn_type5'}selected="selected"{/if}>{'tn_type5'|@translate}</option> 124 63 125 <option value="tn_type6" {if $VALUE4 == 'tn_type6'}selected="selected"{/if}>{'tn_type6'|@translate}</option> 126 64 127 <option value="tn_type7" {if $VALUE4 == 'tn_type7'}selected="selected"{/if}>{'tn_type7'|@translate}</option> 128 65 129 <option value="tn_type8" {if $VALUE4 == 'tn_type8'}selected="selected"{/if}>{'tn_type8'|@translate}</option> 130 66 131 <option value="tn_type9" {if $VALUE4 == 'tn_type9'}selected="selected"{/if}>{'Dimensions'|@translate} - {'Filesize'|@translate}</option> 67 </select> 132 133 </select> 134 68 135 <select name="value5" style="widht:30px"> 136 69 137 <option value="none" {if $VALUE5 == 'tn_none'}selected="selected"{/if}>{'tn_none'|@translate}</option> 138 70 139 <option value="tn_type1" {if $VALUE5 == 'tn_type1'}selected="selected"{/if}>{'tn_type1'|@translate}</option> 140 71 141 <option value="tn_type2" {if $VALUE5 == 'tn_type2'}selected="selected"{/if}>{'tn_type2'|@translate}</option> 142 72 143 <option value="tn_type3" {if $VALUE5 == 'tn_type3'}selected="selected"{/if}>{'tn_type3'|@translate}</option> 144 73 145 <option value="tn_type4" {if $VALUE5 == 'tn_type4'}selected="selected"{/if}>{'tn_type4'|@translate}</option> 146 74 147 <option value="tn_type5" {if $VALUE5 == 'tn_type5'}selected="selected"{/if}>{'tn_type5'|@translate}</option> 148 75 149 <option value="tn_type6" {if $VALUE5 == 'tn_type6'}selected="selected"{/if}>{'tn_type6'|@translate}</option> 150 76 151 <option value="tn_type7" {if $VALUE5 == 'tn_type7'}selected="selected"{/if}>{'tn_type7'|@translate}</option> 152 77 153 <option value="tn_type8" {if $VALUE5 == 'tn_type8'}selected="selected"{/if}>{'tn_type8'|@translate}</option> 154 78 155 <option value="tn_type9" {if $VALUE5 == 'tn_type9'}selected="selected"{/if}>{'Dimensions'|@translate} - {'Filesize'|@translate}</option> 79 </select> 156 157 </select> 158 80 159 <select name="value6" style="widht:30px"> 160 81 161 <option value="none" {if $VALUE6 == 'tn_none'}selected="selected"{/if}>{'tn_none'|@translate}</option> 162 82 163 <option value="tn_type1" {if $VALUE6 == 'tn_type1'}selected="selected"{/if}>{'tn_type1'|@translate}</option> 164 83 165 <option value="tn_type2" {if $VALUE6 == 'tn_type2'}selected="selected"{/if}>{'tn_type2'|@translate}</option> 166 84 167 <option value="tn_type3" {if $VALUE6 == 'tn_type3'}selected="selected"{/if}>{'tn_type3'|@translate}</option> 168 85 169 <option value="tn_type4" {if $VALUE6 == 'tn_type4'}selected="selected"{/if}>{'tn_type4'|@translate}</option> 170 86 171 <option value="tn_type5" {if $VALUE6 == 'tn_type5'}selected="selected"{/if}>{'tn_type5'|@translate}</option> 172 87 173 <option value="tn_type6" {if $VALUE6 == 'tn_type6'}selected="selected"{/if}>{'tn_type6'|@translate}</option> 174 88 175 <option value="tn_type7" {if $VALUE6 == 'tn_type7'}selected="selected"{/if}>{'tn_type7'|@translate}</option> 176 89 177 <option value="tn_type8" {if $VALUE6 == 'tn_type8'}selected="selected"{/if}>{'tn_type8'|@translate}</option> 178 90 179 <option value="tn_type9" {if $VALUE6 == 'tn_type9'}selected="selected"{/if}>{'Dimensions'|@translate} - {'Filesize'|@translate}</option> 91 </select> 92 </td> 93 <tr><td> </td></tr> 180 181 </select> 182 183 </td> 184 185 <tr><td> </td></tr> 186 94 187 <tr class="name_link"> 188 95 189 <td align="right" nowrap="nowrap">{'tn_separator'|@translate} : </td> 190 96 191 <td><input type="radio" name="separator" {if $SEPARATOR}checked="checked"{/if} value="1"> {'tn_yes'|@translate} 192 97 193 <input type="radio" name="separator" {if !$SEPARATOR}checked="checked"{/if} value="0"> {'tn_no'|@translate} 98 </td> 194 195 </td> 196 99 197 </tr> 198 100 199 101 <tr><td> </td></tr> 200 201 <tr><td> </td></tr> 202 102 203 </table> 204 103 205 </fieldset> 104 206 105 207 208 209 210 106 211 <fieldset> 212 107 213 <legend>{'tn_display_cat'|@translate}</legend> 214 108 215 <table> 216 109 217 <tr> 218 110 219 <td align="right" nowrap="nowrap">{'tn_display_name_cat'|@translate} : </td> 220 111 221 <td><input type="radio" name="display_author_cat" value="1" {if $DISPLAY_AUTHOR_CAT}checked="checked"{/if}> {'tn_yes'|@translate} 222 112 223 <input type="radio" name="display_author_cat" value="0" {if !$DISPLAY_AUTHOR_CAT}checked="checked"{/if}> {'tn_no'|@translate} 113 </td> 224 225 </td> 226 114 227 </tr> 228 115 229 116 <tr><td> </td></tr> 230 231 <tr><td> </td></tr> 232 117 233 </table> 234 118 235 </fieldset> 119 236 237 238 120 239 <p><input type="submit" name="submit" value="{'Submit'|@translate}"> 240 121 241 <input type="submit" name="restore" value="{'tn_default_parameters'|@translate}" onclick="return confirm('{'Are you sure?'|@translate|@escape:'javascript'}');"></p> 242 122 243 </form> 123 244 245 246 124 247 <script type="text/javascript"> 248 125 249 if (document.getElementsByName("display_name")[1].checked == true) 250 126 251 jQuery('.name_link').hide(); 252 127 253 if (document.getElementsByName("display_arrows")[1].checked == true) 254 128 255 jQuery('.all_cat').hide(); 256 129 257 </script> -
extensions/ThumbnailTooltip/admin/config_default.inc.php
r28210 r30100 1 1 <?php 2 2 3 $config_default = array( 4 3 5 'display_name' => true, 6 4 7 'value1' => 'tn_type1', 8 5 9 'value2' => 'tn_type8', 10 6 11 'value3' => 'tn_type4', 12 7 13 'value4' => 'none', 14 8 15 'value5' => 'none', 16 9 17 'value6' => 'none', 18 10 19 'separator' => '1', 20 11 21 'display_author_cat' => '1' 22 12 23 ); 24 13 25 ?> -
extensions/ThumbnailTooltip/admin/functions.inc.php
r27644 r30100 1 1 <?php 2 2 3 add_event_handler('get_admin_plugin_menu_links', 'thumbnail_tooltip_admin_menu'); 3 4 5 6 4 7 function thumbnail_tooltip_admin_menu($menu) 8 5 9 { 10 6 11 array_push($menu, array( 12 7 13 'NAME' => 'Thumbnail Tooltip', 14 8 15 'URL' => get_admin_plugin_menu_link(dirname(__FILE__).'/admin.php'))); 16 9 17 return $menu; 18 10 19 } 20 11 21 ?> -
extensions/ThumbnailTooltip/admin/index.php
r28210 r30100 1 1 <?php 2 // +-----------------------------------------------------------------------+ 3 // | Piwigo - a PHP based photo gallery | 4 // +-----------------------------------------------------------------------+ 5 // | Copyright(C) 2008-2014 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. | 2 22 3 // +-----------------------------------------------------------------------+ 23 4 5 // | Piwigo - a PHP based photo gallery | 6 7 // +-----------------------------------------------------------------------+ 8 9 // | Copyright(C) 2008-2014 Piwigo Team http://piwigo.org | 10 11 // | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net | 12 13 // | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick | 14 15 // +-----------------------------------------------------------------------+ 16 17 // | This program is free software; you can redistribute it and/or modify | 18 19 // | it under the terms of the GNU General Public License as published by | 20 21 // | the Free Software Foundation | 22 23 // | | 24 25 // | This program is distributed in the hope that it will be useful, but | 26 27 // | WITHOUT ANY WARRANTY; without even the implied warranty of | 28 29 // | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | 30 31 // | General Public License for more details. | 32 33 // | | 34 35 // | You should have received a copy of the GNU General Public License | 36 37 // | along with this program; if not, write to the Free Software | 38 39 // | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, | 40 41 // | USA. | 42 43 // +-----------------------------------------------------------------------+ 44 45 46 24 47 // Recursive call 48 25 49 $url = '../'; 50 26 51 header( 'Request-URI: '.$url ); 52 27 53 header( 'Content-Location: '.$url ); 54 28 55 header( 'Location: '.$url ); 56 29 57 exit(); 58 30 59 ?>
Note: See TracChangeset
for help on using the changeset viewer.