Changeset 30100


Ignore:
Timestamp:
Oct 16, 2014, 9:39:11 AM (10 years ago)
Author:
sarybe
Message:

[Thumbnail_Tooltip] Bug fix for html and double quotes in comment

Location:
extensions/ThumbnailTooltip
Files:
27 edited

Legend:

Unmodified
Added
Removed
  • extensions/ThumbnailTooltip/admin/admin.php

    r28187 r30100  
    11<?php
     2
    23if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!');
     4
     5
    36
    47global $template, $conf;
    58
     9
     10
    611load_language('plugin.lang', thumbnail_tooltip_PATH);
     12
    713include(dirname(__FILE__).'/config_default.inc.php');
     14
    815$params = array_merge($config_default, unserialize($conf['thumbnail_tooltip']));
    916
     17
     18
    1019if (isset($_POST['submit'])) {
     20
    1121  $params  = array(
     22
    1223    'display_name'      => $_POST['display_name'] ? true : false,
     24
    1325    'value1'            => $_POST['value1'],
     26
    1427    'value2'            => $_POST['value2'],
     28
    1529    'value3'            => $_POST['value3'],
     30
    1631    'value4'            => $_POST['value4'],
     32
    1733    'value5'            => $_POST['value5'],
     34
    1835    'value6'            => $_POST['value6'],
     36
    1937    'separator'         => $_POST['separator'],
     38
    2039    'display_author_cat' => $_POST['display_author_cat']
     40
    2141  );
    2242
     43
     44
    2345  $query = '
     46
    2447  UPDATE ' . CONFIG_TABLE . '
     48
    2549  SET value="' . addslashes(serialize($params)) . '"
     50
    2651  WHERE param="thumbnail_tooltip"
     52
    2753  LIMIT 1';
     54
    2855  pwg_query($query);
     56
    2957  array_push($page['infos'], l10n('tn_configuration_saved'));
     58
    3059}
    3160
    3261
     62
     63
     64
    3365if (isset($_POST['restore'])) {
     66
    3467  $params  = $config_default;
    3568
     69
     70
    3671  $query = '
     72
    3773  UPDATE ' . CONFIG_TABLE . '
     74
    3875  SET value="' . addslashes(serialize($params)) . '"
     76
    3977  WHERE param="thumbnail_tooltip"
     78
    4079  LIMIT 1';
     80
    4181  pwg_query($query);
     82
    4283  array_push($page['infos'], l10n('tn_default_parameters_saved'));
     84
    4385}
    4486
    4587
     88
     89
     90
    4691$template->assign(array(
     92
    4793  'DISPLAY_NAME'         => $params['display_name'],
     94
    4895  'VALUE1'               => $params['value1'],
     96
    4997  'VALUE2'               => $params['value2'],
     98
    5099  'VALUE3'               => $params['value3'],
     100
    51101  'VALUE4'               => $params['value4'],
     102
    52103  'VALUE5'               => $params['value5'],
     104
    53105  'VALUE6'               => $params['value6'],
     106
    54107  'SEPARATOR'            => $params['separator'],
     108
    55109  'DISPLAY_AUTHOR_CAT'   => $params['display_author_cat']
     110
    56111));
    57112
    58113
     114
     115
     116
    59117$template->set_filenames(array('plugin_admin_content' => dirname(__FILE__) . '/admin.tpl'));
     118
    60119$template->assign_var_from_handle('ADMIN_CONTENT', 'plugin_admin_content');
     120
    61121?>
  • extensions/ThumbnailTooltip/admin/admin.tpl

    r28262 r30100  
    11<div class="titrePage">
     2
    23<h2>Thumbnail Tooltip</h2>
     4
    35</div>
    46
     7
     8
    59<form action="" method="post">
    610
     11
     12
    713<fieldset>
     14
    815<legend>{'tn_display_img'|@translate}</legend>
     16
    917<table>
     18
    1019  <tr>
     20
    1121    <td align="right" nowrap="nowrap">{'tn_display_name_img'|@translate} : &nbsp;&nbsp;</td>
     22
    1223    <td><input type="radio" name="display_name" value="1" {if $DISPLAY_NAME}checked="checked"{/if} onClick="javascript: jQuery('.name_link').show();"> {'tn_yes'|@translate} &nbsp;
     24
    1325        <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
    1529  </tr>
     30
    1631 
    17   <tr><td>&nbsp;</td></tr>
     32
     33  <tr><td>&nbsp;</td></tr>
     34
     35
    1836
    1937  <tr class="name_link">
     38
    2039    <td align="right" nowrap="nowrap">{'tn_name_link'|@translate} : &nbsp;&nbsp;</td>
     40
    2141    <td><select name="value1" style="widht:30px">
     42
    2243          <option value="tn_type1" {if $VALUE1 == 'tn_type1'}selected="selected"{/if}>{'tn_type1'|@translate}</option>
     44
    2345          <option value="tn_type2" {if $VALUE1 == 'tn_type2'}selected="selected"{/if}>{'tn_type2'|@translate}</option>
     46
    2447          <option value="tn_type3" {if $VALUE1 == 'tn_type3'}selected="selected"{/if}>{'tn_type3'|@translate}</option>
     48
    2549          <option value="tn_type4" {if $VALUE1 == 'tn_type4'}selected="selected"{/if}>{'tn_type4'|@translate}</option>
     50
    2651          <option value="tn_type5" {if $VALUE1 == 'tn_type5'}selected="selected"{/if}>{'tn_type5'|@translate}</option>
     52
    2753          <option value="tn_type6" {if $VALUE1 == 'tn_type6'}selected="selected"{/if}>{'tn_type6'|@translate}</option>
     54
    2855          <option value="tn_type7" {if $VALUE1 == 'tn_type7'}selected="selected"{/if}>{'tn_type7'|@translate}</option>
     56
    2957          <option value="tn_type8" {if $VALUE1 == 'tn_type8'}selected="selected"{/if}>{'tn_type8'|@translate}</option>
     58
    3059          <option value="tn_type9" {if $VALUE1 == 'tn_type9'}selected="selected"{/if}>{'Dimensions'|@translate} - {'Filesize'|@translate}</option>
    31         </select>
     60
     61        </select>
     62
    3263                <select name="value2" style="widht:30px">
     64
    3365          <option value="none" {if $VALUE2 == 'tn_none'}selected="selected"{/if}>{'tn_none'|@translate}</option>
     66
    3467          <option value="tn_type1" {if $VALUE2 == 'tn_type1'}selected="selected"{/if}>{'tn_type1'|@translate}</option>
     68
    3569          <option value="tn_type2" {if $VALUE2 == 'tn_type2'}selected="selected"{/if}>{'tn_type2'|@translate}</option>
     70
    3671          <option value="tn_type3" {if $VALUE2 == 'tn_type3'}selected="selected"{/if}>{'tn_type3'|@translate}</option>
     72
    3773          <option value="tn_type4" {if $VALUE2 == 'tn_type4'}selected="selected"{/if}>{'tn_type4'|@translate}</option>
     74
    3875          <option value="tn_type5" {if $VALUE2 == 'tn_type5'}selected="selected"{/if}>{'tn_type5'|@translate}</option>
     76
    3977          <option value="tn_type6" {if $VALUE2 == 'tn_type6'}selected="selected"{/if}>{'tn_type6'|@translate}</option>
     78
    4079          <option value="tn_type7" {if $VALUE2 == 'tn_type7'}selected="selected"{/if}>{'tn_type7'|@translate}</option>
     80
    4181          <option value="tn_type8" {if $VALUE2 == 'tn_type8'}selected="selected"{/if}>{'tn_type8'|@translate}</option>
     82
    4283          <option value="tn_type9" {if $VALUE2 == 'tn_type9'}selected="selected"{/if}>{'Dimensions'|@translate} - {'Filesize'|@translate}</option>
    43         </select>
     84
     85        </select>
     86
    4487                <select name="value3" style="widht:30px">
     88
    4589          <option value="none" {if $VALUE3 == 'tn_none'}selected="selected"{/if}>{'tn_none'|@translate}</option>
     90
    4691          <option value="tn_type1" {if $VALUE3 == 'tn_type1'}selected="selected"{/if}>{'tn_type1'|@translate}</option>
     92
    4793          <option value="tn_type2" {if $VALUE3 == 'tn_type2'}selected="selected"{/if}>{'tn_type2'|@translate}</option>
     94
    4895          <option value="tn_type3" {if $VALUE3 == 'tn_type3'}selected="selected"{/if}>{'tn_type3'|@translate}</option>
     96
    4997          <option value="tn_type4" {if $VALUE3 == 'tn_type4'}selected="selected"{/if}>{'tn_type4'|@translate}</option>
     98
    5099          <option value="tn_type5" {if $VALUE3 == 'tn_type5'}selected="selected"{/if}>{'tn_type5'|@translate}</option>
     100
    51101          <option value="tn_type6" {if $VALUE3 == 'tn_type6'}selected="selected"{/if}>{'tn_type6'|@translate}</option>
     102
    52103          <option value="tn_type7" {if $VALUE3 == 'tn_type7'}selected="selected"{/if}>{'tn_type7'|@translate}</option>
     104
    53105          <option value="tn_type8" {if $VALUE3 == 'tn_type8'}selected="selected"{/if}>{'tn_type8'|@translate}</option>
     106
    54107          <option value="tn_type9" {if $VALUE3 == 'tn_type9'}selected="selected"{/if}>{'Dimensions'|@translate} - {'Filesize'|@translate}</option>
    55         </select>
     108
     109        </select>
     110
    56111                <select name="value4" style="widht:30px">
     112
    57113          <option value="none" {if $VALUE4 == 'tn_none'}selected="selected"{/if}>{'tn_none'|@translate}</option>
     114
    58115          <option value="tn_type1" {if $VALUE4 == 'tn_type1'}selected="selected"{/if}>{'tn_type1'|@translate}</option>
     116
    59117          <option value="tn_type2" {if $VALUE4 == 'tn_type2'}selected="selected"{/if}>{'tn_type2'|@translate}</option>
     118
    60119          <option value="tn_type3" {if $VALUE4 == 'tn_type3'}selected="selected"{/if}>{'tn_type3'|@translate}</option>
     120
    61121          <option value="tn_type4" {if $VALUE4 == 'tn_type4'}selected="selected"{/if}>{'tn_type4'|@translate}</option>
     122
    62123          <option value="tn_type5" {if $VALUE4 == 'tn_type5'}selected="selected"{/if}>{'tn_type5'|@translate}</option>
     124
    63125          <option value="tn_type6" {if $VALUE4 == 'tn_type6'}selected="selected"{/if}>{'tn_type6'|@translate}</option>
     126
    64127          <option value="tn_type7" {if $VALUE4 == 'tn_type7'}selected="selected"{/if}>{'tn_type7'|@translate}</option>
     128
    65129          <option value="tn_type8" {if $VALUE4 == 'tn_type8'}selected="selected"{/if}>{'tn_type8'|@translate}</option>
     130
    66131          <option value="tn_type9" {if $VALUE4 == 'tn_type9'}selected="selected"{/if}>{'Dimensions'|@translate} - {'Filesize'|@translate}</option>
    67         </select>
     132
     133        </select>
     134
    68135                <select name="value5" style="widht:30px">
     136
    69137          <option value="none" {if $VALUE5 == 'tn_none'}selected="selected"{/if}>{'tn_none'|@translate}</option>
     138
    70139          <option value="tn_type1" {if $VALUE5 == 'tn_type1'}selected="selected"{/if}>{'tn_type1'|@translate}</option>
     140
    71141          <option value="tn_type2" {if $VALUE5 == 'tn_type2'}selected="selected"{/if}>{'tn_type2'|@translate}</option>
     142
    72143          <option value="tn_type3" {if $VALUE5 == 'tn_type3'}selected="selected"{/if}>{'tn_type3'|@translate}</option>
     144
    73145          <option value="tn_type4" {if $VALUE5 == 'tn_type4'}selected="selected"{/if}>{'tn_type4'|@translate}</option>
     146
    74147          <option value="tn_type5" {if $VALUE5 == 'tn_type5'}selected="selected"{/if}>{'tn_type5'|@translate}</option>
     148
    75149          <option value="tn_type6" {if $VALUE5 == 'tn_type6'}selected="selected"{/if}>{'tn_type6'|@translate}</option>
     150
    76151          <option value="tn_type7" {if $VALUE5 == 'tn_type7'}selected="selected"{/if}>{'tn_type7'|@translate}</option>
     152
    77153          <option value="tn_type8" {if $VALUE5 == 'tn_type8'}selected="selected"{/if}>{'tn_type8'|@translate}</option>
     154
    78155          <option value="tn_type9" {if $VALUE5 == 'tn_type9'}selected="selected"{/if}>{'Dimensions'|@translate} - {'Filesize'|@translate}</option>
    79         </select>
     156
     157        </select>
     158
    80159                <select name="value6" style="widht:30px">
     160
    81161          <option value="none" {if $VALUE6 == 'tn_none'}selected="selected"{/if}>{'tn_none'|@translate}</option>
     162
    82163          <option value="tn_type1" {if $VALUE6 == 'tn_type1'}selected="selected"{/if}>{'tn_type1'|@translate}</option>
     164
    83165          <option value="tn_type2" {if $VALUE6 == 'tn_type2'}selected="selected"{/if}>{'tn_type2'|@translate}</option>
     166
    84167          <option value="tn_type3" {if $VALUE6 == 'tn_type3'}selected="selected"{/if}>{'tn_type3'|@translate}</option>
     168
    85169          <option value="tn_type4" {if $VALUE6 == 'tn_type4'}selected="selected"{/if}>{'tn_type4'|@translate}</option>
     170
    86171          <option value="tn_type5" {if $VALUE6 == 'tn_type5'}selected="selected"{/if}>{'tn_type5'|@translate}</option>
     172
    87173          <option value="tn_type6" {if $VALUE6 == 'tn_type6'}selected="selected"{/if}>{'tn_type6'|@translate}</option>
     174
    88175          <option value="tn_type7" {if $VALUE6 == 'tn_type7'}selected="selected"{/if}>{'tn_type7'|@translate}</option>
     176
    89177          <option value="tn_type8" {if $VALUE6 == 'tn_type8'}selected="selected"{/if}>{'tn_type8'|@translate}</option>
     178
    90179          <option value="tn_type9" {if $VALUE6 == 'tn_type9'}selected="selected"{/if}>{'Dimensions'|@translate} - {'Filesize'|@translate}</option>
    91         </select>
    92     </td>
    93   <tr><td>&nbsp;</td></tr>
     180
     181        </select>
     182
     183    </td>
     184
     185  <tr><td>&nbsp;</td></tr>
     186
    94187  <tr class="name_link">
     188
    95189     <td align="right" nowrap="nowrap">{'tn_separator'|@translate} : &nbsp;&nbsp;</td>
     190
    96191    <td><input type="radio" name="separator" {if $SEPARATOR}checked="checked"{/if} value="1"> {'tn_yes'|@translate} &nbsp;
     192
    97193        <input type="radio" name="separator" {if !$SEPARATOR}checked="checked"{/if} value="0"> {'tn_no'|@translate}
    98     </td>
     194
     195    </td>
     196
    99197  </tr>
     198
    100199 
    101   <tr><td>&nbsp;</td></tr>
     200
     201  <tr><td>&nbsp;</td></tr>
     202
    102203</table>
     204
    103205</fieldset>
    104206
    105207
     208
     209
     210
    106211<fieldset>
     212
    107213<legend>{'tn_display_cat'|@translate}</legend>
     214
    108215<table>
     216
    109217  <tr>
     218
    110219    <td align="right" nowrap="nowrap">{'tn_display_name_cat'|@translate} : &nbsp;&nbsp;</td>
     220
    111221    <td><input type="radio" name="display_author_cat" value="1" {if $DISPLAY_AUTHOR_CAT}checked="checked"{/if}> {'tn_yes'|@translate} &nbsp;
     222
    112223        <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
    114227  </tr>
     228
    115229   
    116   <tr><td>&nbsp;</td></tr>
     230
     231  <tr><td>&nbsp;</td></tr>
     232
    117233</table>
     234
    118235</fieldset>
    119236
     237
     238
    120239<p><input type="submit" name="submit" value="{'Submit'|@translate}">
     240
    121241<input type="submit" name="restore" value="{'tn_default_parameters'|@translate}" onclick="return confirm('{'Are you sure?'|@translate|@escape:'javascript'}');"></p>
     242
    122243</form>
    123244
     245
     246
    124247<script type="text/javascript">
     248
    125249if (document.getElementsByName("display_name")[1].checked == true)
     250
    126251  jQuery('.name_link').hide();
     252
    127253if (document.getElementsByName("display_arrows")[1].checked == true)
     254
    128255  jQuery('.all_cat').hide();
     256
    129257</script>
  • extensions/ThumbnailTooltip/admin/config_default.inc.php

    r28210 r30100  
    11<?php
     2
    23$config_default = array(
     4
    35  'display_name'        => true,
     6
    47  'value1'              => 'tn_type1',
     8
    59  'value2'              => 'tn_type8',
     10
    611  'value3'              => 'tn_type4',
     12
    713  'value4'              => 'none',
     14
    815  'value5'              => 'none',
     16
    917  'value6'              => 'none',
     18
    1019  'separator'           => '1',
     20
    1121  'display_author_cat'  => '1'
     22
    1223);
     24
    1325?>
  • extensions/ThumbnailTooltip/admin/functions.inc.php

    r27644 r30100  
    11<?php
     2
    23add_event_handler('get_admin_plugin_menu_links', 'thumbnail_tooltip_admin_menu');
    34
     5
     6
    47function thumbnail_tooltip_admin_menu($menu)
     8
    59{
     10
    611  array_push($menu, array(
     12
    713    'NAME' => 'Thumbnail Tooltip',
     14
    815    'URL' => get_admin_plugin_menu_link(dirname(__FILE__).'/admin.php')));
     16
    917  return $menu;
     18
    1019}
     20
    1121?>
  • extensions/ThumbnailTooltip/admin/index.php

    r28210 r30100  
    11<?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
    223// +-----------------------------------------------------------------------+
    234
     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
    2447// Recursive call
     48
    2549$url = '../';
     50
    2651header( 'Request-URI: '.$url );
     52
    2753header( 'Content-Location: '.$url );
     54
    2855header( 'Location: '.$url );
     56
    2957exit();
     58
    3059?>
  • extensions/ThumbnailTooltip/include/class.inc.php

    r28288 r30100  
    11<?php
    22
     3
     4
    35class Thumbnail_Tooltip_IMG {
     6
    47  var $plugin_name, $plugin_path, $plugin_url;
     8
    59  var $my_config;
    610
     11
     12
    713  function Thumbnail_Tooltip_IMG ($plugin_name, $plugin_path, $plugin_url) {
     14
    815    $this->plugin_name = $plugin_name;
     16
    917    $this->plugin_path = $plugin_path;
     18
    1019    $this->plugin_url = $plugin_url;
     20
    1121    $this->initialize_event_handler($plugin_name, $plugin_path, $plugin_url);
    12   }
     22
     23  }
     24
     25
    1326
    1427  function initialize_event_handler() {
     28
    1529    add_event_handler('loc_end_index_thumbnails', array($this, 'thumbnail_tooltip_affich'), 50, 2);
     30
    1631    add_event_handler('loc_end_index_category_thumbnails', array($this, 'Author_Description_affich'), 50, 2);
    17   }
     32
     33  }
     34
     35
    1836
    1937  function thumbnail_tooltip_affich($tpl_var) {
     38
    2039    global $user;
     40
    2141     
     42
    2243        $query = 'SELECT param, value, comment FROM ' . CONFIG_TABLE . ' WHERE param="thumbnail_tooltip"';
     44
    2345        $row = pwg_db_fetch_assoc( pwg_query($query) );
    24  
     46
     47 
     48
    2549        $params = unserialize($row['value']);
     50
    2651        $values = array(
     52
    2753                  'DISPLAY_NAME'         => $params['display_name'],
     54
    2855                  'value1'               => $params['value1'],
     56
    2957                  'value2'               => $params['value2'],
     58
    3059                  'value3'               => $params['value3'],
     60
    3161                  'value4'               => $params['value4'],
     62
    3263                  'value5'               => $params['value5'],
     64
    3365                  'value6'               => $params['value6'],
     66
    3467                  'separator'            => $params['separator']
     68
    3569        );
     70
    3671       
     72
    3773        if ($params['display_name']==true) {
     74
    3875      foreach($tpl_var as $cle=>$valeur) {
     76
    3977        $query = "
     78
    4079                  SELECT name, hit, comment, author, rating_score, CONCAT(width, 'x', height) AS dimensions, filesize FROM ".IMAGES_TABLE."
     80
    4181                  WHERE id = ".(int)$tpl_var[$cle]['id']."
     82
    4283                ;";
     84
    4385            $row = pwg_db_fetch_assoc( pwg_query($query) );
    4486
     87
     88
    4589        $details = array();
     90
    4691        $details_param = array();
     92
    4793         
     94
    4895        $details['tn_type1'] = $row['name'];
    4996
     97
     98
    5099        if (!empty($row['hit'])) {
     100
    51101                  $details['tn_type2'] = $row['hit'].' '.strtolower(l10n('Visits'));
     102
    52103                  $details['tn_type3'] = '('.$row['hit'].' '.strtolower(l10n('Visits')).')';
     104
    53105              if (!empty($row['rating_score'])) { $type8 = ', '.strtolower(l10n('Rating score')).' '.$row['rating_score']; } else { $type8 = ''; }
     106
    54107                  $details['tn_type8'] = '('.$row['hit'].' '.strtolower(l10n('Visits')).$type8.')';
    55         }
     108
     109        }
     110
    56111        if (!empty($row['comment'])) {
    57                   $details['tn_type4'] = $row['comment'];
    58         }
     112
     113                  $details['tn_type4'] = addslashes(strip_tags($row['comment']));
     114
     115        }
     116
    59117        if (!empty($row['author'])) {
     118
    60119                  $details['tn_type5'] = $row['author'];
    61         }
     120
     121        }
     122
    62123        if (!empty($row['author'])) {
     124
    63125                  $details['tn_type6'] = (preg_match('#(,|\/)#i', $row['author'])) ? str_replace(array('(',')'), '', ucfirst(l10n('author(s) : %s', $row['author']))) : l10n('Author').' : '.$row['author'];
    64         }
     126
     127        }
     128
    65129        if (!empty($row['rating_score'])) {
     130
    66131                  $details['tn_type7'] = strtolower(l10n('Rating score')).' '.$row['rating_score'];
    67         }
     132
     133        }
     134
    68135        if (!empty($row['dimensions'])) {
     136
    69137                  $details['tn_type9'] = l10n('Dimensions').' : '.$row['dimensions'];
    70         }
     138
     139        }
     140
    71141                if (!empty($row['filesize'])) {
     142
    72143                  if (($params['separator']=='1') && (!empty($details['tn_type9']))) { $details['tn_type9'].= ' - '; } elseif (($params['separator']!='1') && (!empty($details['tn_type9']))) { $details['tn_type9'].= ' '; } else { $details['tn_type9'] = ' '; }
     144
    73145                  $details['tn_type9'].= l10n('Filesize').' : '.l10n('%d Kb', $row['filesize']);
     146
    74147                }
     148
    75149                 
     150
    76151        if ((!empty($details[$values['value1']])) && ($details[$values['value1']]!='none')) { $details_param[] = $details[$values['value1']]; }
     152
    77153        if ((!empty($details[$values['value2']])) && ($details[$values['value2']]!='none')) { $details_param[] = $details[$values['value2']]; }
     154
    78155        if ((!empty($details[$values['value3']])) && ($details[$values['value3']]!='none')) { $details_param[] = $details[$values['value3']]; }
     156
    79157        if ((!empty($details[$values['value4']])) && ($details[$values['value4']]!='none')) { $details_param[] = $details[$values['value4']]; }
     158
    80159        if ((!empty($details[$values['value5']])) && ($details[$values['value5']]!='none')) { $details_param[] = $details[$values['value5']]; }
     160
    81161        if ((!empty($details[$values['value6']])) && ($details[$values['value6']]!='none')) { $details_param[] = $details[$values['value6']]; }
     162
    82163         
     164
    83165        if ($params['separator']=='1') { $title = implode(' - ', $details_param); } else { $title = implode(' ', $details_param); }
     166
    84167         
     168
    85169        $tpl_var[$cle]['TN_TITLE'] = $title;
     170
    86171      }
     172
    87173    }
     174
    88175    return $tpl_var;
    89   }
    90  
    91  
     176
     177  }
     178
     179 
     180
     181 
     182
    92183  function Author_Description_affich($tpl_var) {
     184
    93185    global $user, $lang;
    94186
     187
     188
    95189        $query = 'SELECT param, value, comment FROM ' . CONFIG_TABLE . ' WHERE param="thumbnail_tooltip";';
     190
    96191        $row = pwg_db_fetch_assoc( pwg_query($query) );
    97  
     192
     193 
     194
    98195    $params = unserialize($row['value']);
     196
    99197        $values = array('DISPLAY_AUTHOR_CAT' => $params['display_author_cat']);
     198
    100199       
     200
    101201        if ($params['display_author_cat']==true) {
     202
    102203      foreach($tpl_var as $cle=>$valeur) {
     204
    103205        $query = "SELECT author FROM ".IMAGE_CATEGORY_TABLE." INNER JOIN ".IMAGES_TABLE." ON image_id = id WHERE category_id = ".(int)$tpl_var[$cle]['id']." AND author<>'' GROUP BY author";
     206
    104207            $result = pwg_query($query);
     208
    105209            $row = pwg_db_fetch_assoc($result);
     210
    106211               
     212
    107213                $auteur = '';
     214
    108215            if (!empty($row['author'])) {
     216
    109217                  do {
     218
    110219                    $auteur .= $row['author'].', ';
     220
    111221                  } while ($row = pwg_db_fetch_assoc($result));
     222
    112223                  $auteur = substr($auteur, 0, -2);
     224
    113225              if (preg_match('#(,|\/)#i', $auteur )) { $auteur = str_replace(array('(',')'), '', ucfirst(sprintf($lang['author(s) : %s'], $auteur))); } else { $auteur = $lang['Author'].' : '.$auteur ; }
     226
    114227              if (!empty($tpl_var[$cle]['DESCRIPTION'])) { $tpl_var[$cle]['DESCRIPTION'] = $tpl_var[$cle]['DESCRIPTION'].'<br/>'.$auteur; } else { $tpl_var[$cle]['DESCRIPTION'] = $auteur; }
     228
    115229            }
     230
    116231      }
     232
    117233    }
     234
    118235    return $tpl_var;
    119   }
     236
     237  }
     238
    120239}
     240
    121241?>
  • extensions/ThumbnailTooltip/include/index.php

    r27645 r30100  
    11<?php
    2 // +-----------------------------------------------------------------------+
    3 // | Piwigo - a PHP based photo gallery                                    |
    4 // +-----------------------------------------------------------------------+
    5 // | Copyright(C) 2008-2012 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
    223// +-----------------------------------------------------------------------+
    234
     5// | Piwigo - a PHP based photo gallery                                    |
     6
     7// +-----------------------------------------------------------------------+
     8
     9// | Copyright(C) 2008-2012 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
    2447// Recursive call
     48
    2549$url = '../';
     50
    2651header( 'Request-URI: '.$url );
     52
    2753header( 'Content-Location: '.$url );
     54
    2855header( 'Location: '.$url );
     56
    2957exit();
     58
    3059?>
  • extensions/ThumbnailTooltip/index.php

    r27647 r30100  
    11<?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
    223// +-----------------------------------------------------------------------+
    234
     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
    2447// Recursive call
     48
    2549$url = '../';
     50
    2651header( 'Request-URI: '.$url );
     52
    2753header( 'Content-Location: '.$url );
     54
    2855header( 'Location: '.$url );
     56
    2957exit();
     58
    3059?>
  • extensions/ThumbnailTooltip/initialize.inc.php

    r28210 r30100  
    11<?php
    22
     3
     4
    35if (!defined('PHPWG_ROOT_PATH')) {
     6
    47  die('Hacking attempt!');
     8
    59}
     10
     11
    612
    713add_event_handler('init', 'Thumbnail_Tooltip');
    814
     15
     16
    917function Thumbnail_Tooltip() {
     18
    1019  $plugin_name = 'Thumbnail Tooltip';
     20
    1121  $plugin_path = dirname(__FILE__).'/';
     22
    1223  $plugin_url = get_root_url();
     24
     25
    1326
    1427  include_once($plugin_path.'include/class.inc.php');
    1528
     29
     30
    1631  // Create object
     32
    1733  $Thumbnail_Tooltip = new Thumbnail_Tooltip_IMG($plugin_name, $plugin_path, $plugin_url);
     34
    1835  set_plugin_data($Thumbnail_Tooltip -> plugin_name, $Thumbnail_Tooltip);
     36
    1937}
     38
    2039?>
  • extensions/ThumbnailTooltip/language/bg_BG/plugin.lang.php

    r29186 r30100  
    11<?php
    22// +-----------------------------------------------------------------------+
     3
    34// | Piwigo - a PHP based photo gallery                                    |
     5
    46// +-----------------------------------------------------------------------+
     7
    58// | Copyright(C) 2008-2014 Piwigo Team                  http://piwigo.org |
     9
    610// | Copyright(C) 2003-2008 PhpWebGallery Team    http://phpwebgallery.net |
     11
    712// | Copyright(C) 2002-2003 Pierrick LE GALL   http://le-gall.net/pierrick |
     13
    814// +-----------------------------------------------------------------------+
     15
    916// | This program is free software; you can redistribute it and/or modify  |
     17
    1018// | it under the terms of the GNU General Public License as published by  |
     19
    1120// | the Free Software Foundation                                          |
     21
    1222// |                                                                       |
     23
    1324// | This program is distributed in the hope that it will be useful, but   |
     25
    1426// | WITHOUT ANY WARRANTY; without even the implied warranty of            |
     27
    1528// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU      |
     29
    1630// | General Public License for more details.                              |
     31
    1732// |                                                                       |
     33
    1834// | You should have received a copy of the GNU General Public License     |
     35
    1936// | along with this program; if not, write to the Free Software           |
     37
    2038// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
     39
    2140// | USA.                                                                  |
     41
    2242// +-----------------------------------------------------------------------+
    2343$lang['tn_name_link'] = 'Спомагателни бележки';
  • extensions/ThumbnailTooltip/language/de_DE/plugin.lang.php

    r28174 r30100  
    11<?php
    22// +-----------------------------------------------------------------------+
     3
    34// | Piwigo - a PHP based photo gallery                                    |
     5
    46// +-----------------------------------------------------------------------+
     7
    58// | Copyright(C) 2008-2014 Piwigo Team                  http://piwigo.org |
     9
    610// | Copyright(C) 2003-2008 PhpWebGallery Team    http://phpwebgallery.net |
     11
    712// | Copyright(C) 2002-2003 Pierrick LE GALL   http://le-gall.net/pierrick |
     13
    814// +-----------------------------------------------------------------------+
     15
    916// | This program is free software; you can redistribute it and/or modify  |
     17
    1018// | it under the terms of the GNU General Public License as published by  |
     19
    1120// | the Free Software Foundation                                          |
     21
    1222// |                                                                       |
     23
    1324// | This program is distributed in the hope that it will be useful, but   |
     25
    1426// | WITHOUT ANY WARRANTY; without even the implied warranty of            |
     27
    1528// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU      |
     29
    1630// | General Public License for more details.                              |
     31
    1732// |                                                                       |
     33
    1834// | You should have received a copy of the GNU General Public License     |
     35
    1936// | along with this program; if not, write to the Free Software           |
     37
    2038// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
     39
    2140// | USA.                                                                  |
     41
    2242// +-----------------------------------------------------------------------+
    2343$lang['tn_display_img'] = 'Fotos';
  • extensions/ThumbnailTooltip/language/el_GR/plugin.lang.php

    r28174 r30100  
    11<?php
    22// +-----------------------------------------------------------------------+
     3
    34// | Piwigo - a PHP based photo gallery                                    |
     5
    46// +-----------------------------------------------------------------------+
     7
    58// | Copyright(C) 2008-2014 Piwigo Team                  http://piwigo.org |
     9
    610// | Copyright(C) 2003-2008 PhpWebGallery Team    http://phpwebgallery.net |
     11
    712// | Copyright(C) 2002-2003 Pierrick LE GALL   http://le-gall.net/pierrick |
     13
    814// +-----------------------------------------------------------------------+
     15
    916// | This program is free software; you can redistribute it and/or modify  |
     17
    1018// | it under the terms of the GNU General Public License as published by  |
     19
    1120// | the Free Software Foundation                                          |
     21
    1222// |                                                                       |
     23
    1324// | This program is distributed in the hope that it will be useful, but   |
     25
    1426// | WITHOUT ANY WARRANTY; without even the implied warranty of            |
     27
    1528// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU      |
     29
    1630// | General Public License for more details.                              |
     31
    1732// |                                                                       |
     33
    1834// | You should have received a copy of the GNU General Public License     |
     35
    1936// | along with this program; if not, write to the Free Software           |
     37
    2038// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
     39
    2140// | USA.                                                                  |
     41
    2242// +-----------------------------------------------------------------------+
    2343$lang['tn_yes'] = 'Ναι';
  • extensions/ThumbnailTooltip/language/en_UK/index.php

    r27646 r30100  
    11<?php
    2 // +-----------------------------------------------------------------------+
    3 // | PhpWebGallery - a PHP based picture gallery                           |
    4 // | Copyright (C) 2002-2003 Pierrick LE GALL - pierrick@phpwebgallery.net |
    5 // | Copyright (C) 2003-2007 PhpWebGallery Team - http://phpwebgallery.net |
    6 // +-----------------------------------------------------------------------+
    7 // | file          : $Id: index.php 1912 2007-03-16 06:30:07Z rub $
    8 // | last update   : $Date: 2007-03-16 07:30:07 +0100 (ven, 16 mar 2007) $
    9 // | last modifier : $Author: rub $
    10 // | revision      : $Revision: 1912 $
    11 // +-----------------------------------------------------------------------+
    12 // | This program is free software; you can redistribute it and/or modify  |
    13 // | it under the terms of the GNU General Public License as published by  |
    14 // | the Free Software Foundation                                          |
    15 // |                                                                       |
    16 // | This program is distributed in the hope that it will be useful, but   |
    17 // | WITHOUT ANY WARRANTY; without even the implied warranty of            |
    18 // | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU      |
    19 // | General Public License for more details.                              |
    20 // |                                                                       |
    21 // | You should have received a copy of the GNU General Public License     |
    22 // | along with this program; if not, write to the Free Software           |
    23 // | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
    24 // | USA.                                                                  |
     2
    253// +-----------------------------------------------------------------------+
    264
     5// | PhpWebGallery - a PHP based picture gallery                           |
     6
     7// | Copyright (C) 2002-2003 Pierrick LE GALL - pierrick@phpwebgallery.net |
     8
     9// | Copyright (C) 2003-2007 PhpWebGallery Team - http://phpwebgallery.net |
     10
     11// +-----------------------------------------------------------------------+
     12
     13// | file          : $Id: index.php 1912 2007-03-16 06:30:07Z rub $
     14
     15// | last update   : $Date: 2007-03-16 07:30:07 +0100 (ven, 16 mar 2007) $
     16
     17// | last modifier : $Author: rub $
     18
     19// | revision      : $Revision: 1912 $
     20
     21// +-----------------------------------------------------------------------+
     22
     23// | This program is free software; you can redistribute it and/or modify  |
     24
     25// | it under the terms of the GNU General Public License as published by  |
     26
     27// | the Free Software Foundation                                          |
     28
     29// |                                                                       |
     30
     31// | This program is distributed in the hope that it will be useful, but   |
     32
     33// | WITHOUT ANY WARRANTY; without even the implied warranty of            |
     34
     35// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU      |
     36
     37// | General Public License for more details.                              |
     38
     39// |                                                                       |
     40
     41// | You should have received a copy of the GNU General Public License     |
     42
     43// | along with this program; if not, write to the Free Software           |
     44
     45// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
     46
     47// | USA.                                                                  |
     48
     49// +-----------------------------------------------------------------------+
     50
     51
     52
    2753// Recursive call
     54
    2855$url = '../';
     56
    2957header( 'Request-URI: '.$url );
     58
    3059header( 'Content-Location: '.$url );
     60
    3161header( 'Location: '.$url );
     62
    3263exit();
     64
    3365?>
     66
  • extensions/ThumbnailTooltip/language/eo_EO/plugin.lang.php

    r28225 r30100  
    11<?php
    22// +-----------------------------------------------------------------------+
     3
    34// | Piwigo - a PHP based photo gallery                                    |
     5
    46// +-----------------------------------------------------------------------+
     7
    58// | Copyright(C) 2008-2014 Piwigo Team                  http://piwigo.org |
     9
    610// | Copyright(C) 2003-2008 PhpWebGallery Team    http://phpwebgallery.net |
     11
    712// | Copyright(C) 2002-2003 Pierrick LE GALL   http://le-gall.net/pierrick |
     13
    814// +-----------------------------------------------------------------------+
     15
    916// | This program is free software; you can redistribute it and/or modify  |
     17
    1018// | it under the terms of the GNU General Public License as published by  |
     19
    1120// | the Free Software Foundation                                          |
     21
    1222// |                                                                       |
     23
    1324// | This program is distributed in the hope that it will be useful, but   |
     25
    1426// | WITHOUT ANY WARRANTY; without even the implied warranty of            |
     27
    1528// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU      |
     29
    1630// | General Public License for more details.                              |
     31
    1732// |                                                                       |
     33
    1834// | You should have received a copy of the GNU General Public License     |
     35
    1936// | along with this program; if not, write to the Free Software           |
     37
    2038// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
     39
    2140// | USA.                                                                  |
     41
    2242// +-----------------------------------------------------------------------+
    2343$lang['tn_configuration_saved'] = 'Agordo konservita';
  • extensions/ThumbnailTooltip/language/es_ES/plugin.lang.php

    r28174 r30100  
    11<?php
    22// +-----------------------------------------------------------------------+
     3
    34// | Piwigo - a PHP based photo gallery                                    |
     5
    46// +-----------------------------------------------------------------------+
     7
    58// | Copyright(C) 2008-2014 Piwigo Team                  http://piwigo.org |
     9
    610// | Copyright(C) 2003-2008 PhpWebGallery Team    http://phpwebgallery.net |
     11
    712// | Copyright(C) 2002-2003 Pierrick LE GALL   http://le-gall.net/pierrick |
     13
    814// +-----------------------------------------------------------------------+
     15
    916// | This program is free software; you can redistribute it and/or modify  |
     17
    1018// | it under the terms of the GNU General Public License as published by  |
     19
    1120// | the Free Software Foundation                                          |
     21
    1222// |                                                                       |
     23
    1324// | This program is distributed in the hope that it will be useful, but   |
     25
    1426// | WITHOUT ANY WARRANTY; without even the implied warranty of            |
     27
    1528// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU      |
     29
    1630// | General Public License for more details.                              |
     31
    1732// |                                                                       |
     33
    1834// | You should have received a copy of the GNU General Public License     |
     35
    1936// | along with this program; if not, write to the Free Software           |
     37
    2038// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
     39
    2140// | USA.                                                                  |
     41
    2242// +-----------------------------------------------------------------------+
    2343$lang['tn_display_img'] = 'Imagen';
  • extensions/ThumbnailTooltip/language/fr_FR/index.php

    r27646 r30100  
    11<?php
    2 // +-----------------------------------------------------------------------+
    3 // | PhpWebGallery - a PHP based picture gallery                           |
    4 // | Copyright (C) 2002-2003 Pierrick LE GALL - pierrick@phpwebgallery.net |
    5 // | Copyright (C) 2003-2007 PhpWebGallery Team - http://phpwebgallery.net |
    6 // +-----------------------------------------------------------------------+
    7 // | file          : $Id: index.php 1912 2007-03-16 06:30:07Z rub $
    8 // | last update   : $Date: 2007-03-16 07:30:07 +0100 (ven, 16 mar 2007) $
    9 // | last modifier : $Author: rub $
    10 // | revision      : $Revision: 1912 $
    11 // +-----------------------------------------------------------------------+
    12 // | This program is free software; you can redistribute it and/or modify  |
    13 // | it under the terms of the GNU General Public License as published by  |
    14 // | the Free Software Foundation                                          |
    15 // |                                                                       |
    16 // | This program is distributed in the hope that it will be useful, but   |
    17 // | WITHOUT ANY WARRANTY; without even the implied warranty of            |
    18 // | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU      |
    19 // | General Public License for more details.                              |
    20 // |                                                                       |
    21 // | You should have received a copy of the GNU General Public License     |
    22 // | along with this program; if not, write to the Free Software           |
    23 // | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
    24 // | USA.                                                                  |
     2
    253// +-----------------------------------------------------------------------+
    264
     5// | PhpWebGallery - a PHP based picture gallery                           |
     6
     7// | Copyright (C) 2002-2003 Pierrick LE GALL - pierrick@phpwebgallery.net |
     8
     9// | Copyright (C) 2003-2007 PhpWebGallery Team - http://phpwebgallery.net |
     10
     11// +-----------------------------------------------------------------------+
     12
     13// | file          : $Id: index.php 1912 2007-03-16 06:30:07Z rub $
     14
     15// | last update   : $Date: 2007-03-16 07:30:07 +0100 (ven, 16 mar 2007) $
     16
     17// | last modifier : $Author: rub $
     18
     19// | revision      : $Revision: 1912 $
     20
     21// +-----------------------------------------------------------------------+
     22
     23// | This program is free software; you can redistribute it and/or modify  |
     24
     25// | it under the terms of the GNU General Public License as published by  |
     26
     27// | the Free Software Foundation                                          |
     28
     29// |                                                                       |
     30
     31// | This program is distributed in the hope that it will be useful, but   |
     32
     33// | WITHOUT ANY WARRANTY; without even the implied warranty of            |
     34
     35// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU      |
     36
     37// | General Public License for more details.                              |
     38
     39// |                                                                       |
     40
     41// | You should have received a copy of the GNU General Public License     |
     42
     43// | along with this program; if not, write to the Free Software           |
     44
     45// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
     46
     47// | USA.                                                                  |
     48
     49// +-----------------------------------------------------------------------+
     50
     51
     52
    2753// Recursive call
     54
    2855$url = '../';
     56
    2957header( 'Request-URI: '.$url );
     58
    3059header( 'Content-Location: '.$url );
     60
    3161header( 'Location: '.$url );
     62
    3263exit();
     64
    3365?>
     66
  • extensions/ThumbnailTooltip/language/fr_FR/plugin.lang.php

    r28174 r30100  
    11<?php
     2
    23$lang['tn_display_img'] = 'Photos';
     4
    35$lang['tn_display_cat'] = 'Albums';
     6
    47$lang['tn_display_name_img'] = 'Afficher le titre de la photo';
     8
    59$lang['tn_display_name_cat'] = 'Afficher l\'auteur dans les albums';
     10
    611$lang['tn_name_link'] = 'Texte de l\'infobulle';
    712
     13
     14
    815$lang['tn_separator'] = 'Separateur (-)';
     16
    917$lang['tn_none'] = 'Aucun';
     18
    1019$lang['tn_yes'] = 'Oui';
     20
    1121$lang['tn_no'] = 'Non';
    1222
     23
     24
    1325$lang['tn_type1'] = 'Titre';
     26
    1427$lang['tn_type2'] = 'Nombre de visites';
     28
    1529$lang['tn_type3'] = '(Nombre de visites)';
     30
    1631$lang['tn_type4'] = 'Description';
     32
    1733$lang['tn_type5'] = 'Auteur';
     34
    1835$lang['tn_type6'] = 'Auteur : Auteur';
     36
    1937$lang['tn_type7'] = 'Note moyenne';
     38
    2039$lang['tn_type8'] = '(Nombre de visites, Note moyenne)';
    2140
     41
     42
    2243$lang['tn_configuration_saved'] = 'Configuration sauvegardée';
     44
    2345$lang['tn_default_parameters'] = 'Paramètres par défaut';
     46
    2447$lang['tn_default_parameters_saved'] = 'Paramètres par défaut sauvegardés';
     48
    2549?>
  • extensions/ThumbnailTooltip/language/hi_IN/index.php

    r27756 r30100  
    11<?php
    2 // +-----------------------------------------------------------------------+
    3 // | PhpWebGallery - a PHP based picture gallery                           |
    4 // | Copyright (C) 2002-2003 Pierrick LE GALL - pierrick@phpwebgallery.net |
    5 // | Copyright (C) 2003-2007 PhpWebGallery Team - http://phpwebgallery.net |
    6 // +-----------------------------------------------------------------------+
    7 // | file          : $Id: index.php 1912 2007-03-16 06:30:07Z rub $
    8 // | last update   : $Date: 2007-03-16 07:30:07 +0100 (ven, 16 mar 2007) $
    9 // | last modifier : $Author: rub $
    10 // | revision      : $Revision: 1912 $
    11 // +-----------------------------------------------------------------------+
    12 // | This program is free software; you can redistribute it and/or modify  |
    13 // | it under the terms of the GNU General Public License as published by  |
    14 // | the Free Software Foundation                                          |
    15 // |                                                                       |
    16 // | This program is distributed in the hope that it will be useful, but   |
    17 // | WITHOUT ANY WARRANTY; without even the implied warranty of            |
    18 // | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU      |
    19 // | General Public License for more details.                              |
    20 // |                                                                       |
    21 // | You should have received a copy of the GNU General Public License     |
    22 // | along with this program; if not, write to the Free Software           |
    23 // | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
    24 // | USA.                                                                  |
     2
    253// +-----------------------------------------------------------------------+
    264
     5// | PhpWebGallery - a PHP based picture gallery                           |
     6
     7// | Copyright (C) 2002-2003 Pierrick LE GALL - pierrick@phpwebgallery.net |
     8
     9// | Copyright (C) 2003-2007 PhpWebGallery Team - http://phpwebgallery.net |
     10
     11// +-----------------------------------------------------------------------+
     12
     13// | file          : $Id: index.php 1912 2007-03-16 06:30:07Z rub $
     14
     15// | last update   : $Date: 2007-03-16 07:30:07 +0100 (ven, 16 mar 2007) $
     16
     17// | last modifier : $Author: rub $
     18
     19// | revision      : $Revision: 1912 $
     20
     21// +-----------------------------------------------------------------------+
     22
     23// | This program is free software; you can redistribute it and/or modify  |
     24
     25// | it under the terms of the GNU General Public License as published by  |
     26
     27// | the Free Software Foundation                                          |
     28
     29// |                                                                       |
     30
     31// | This program is distributed in the hope that it will be useful, but   |
     32
     33// | WITHOUT ANY WARRANTY; without even the implied warranty of            |
     34
     35// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU      |
     36
     37// | General Public License for more details.                              |
     38
     39// |                                                                       |
     40
     41// | You should have received a copy of the GNU General Public License     |
     42
     43// | along with this program; if not, write to the Free Software           |
     44
     45// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
     46
     47// | USA.                                                                  |
     48
     49// +-----------------------------------------------------------------------+
     50
     51
     52
    2753// Recursive call
     54
    2855$url = '../';
     56
    2957header( 'Request-URI: '.$url );
     58
    3059header( 'Content-Location: '.$url );
     60
    3161header( 'Location: '.$url );
     62
    3263exit();
     64
    3365?>
     66
  • extensions/ThumbnailTooltip/language/index.php

    r27646 r30100  
    11<?php
    2 // +-----------------------------------------------------------------------+
    3 // | PhpWebGallery - a PHP based picture gallery                           |
    4 // | Copyright (C) 2002-2003 Pierrick LE GALL - pierrick@phpwebgallery.net |
    5 // | Copyright (C) 2003-2007 PhpWebGallery Team - http://phpwebgallery.net |
    6 // +-----------------------------------------------------------------------+
    7 // | file          : $Id: index.php 1912 2007-03-16 06:30:07Z rub $
    8 // | last update   : $Date: 2007-03-16 07:30:07 +0100 (ven, 16 mar 2007) $
    9 // | last modifier : $Author: rub $
    10 // | revision      : $Revision: 1912 $
    11 // +-----------------------------------------------------------------------+
    12 // | This program is free software; you can redistribute it and/or modify  |
    13 // | it under the terms of the GNU General Public License as published by  |
    14 // | the Free Software Foundation                                          |
    15 // |                                                                       |
    16 // | This program is distributed in the hope that it will be useful, but   |
    17 // | WITHOUT ANY WARRANTY; without even the implied warranty of            |
    18 // | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU      |
    19 // | General Public License for more details.                              |
    20 // |                                                                       |
    21 // | You should have received a copy of the GNU General Public License     |
    22 // | along with this program; if not, write to the Free Software           |
    23 // | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
    24 // | USA.                                                                  |
     2
    253// +-----------------------------------------------------------------------+
    264
     5// | PhpWebGallery - a PHP based picture gallery                           |
     6
     7// | Copyright (C) 2002-2003 Pierrick LE GALL - pierrick@phpwebgallery.net |
     8
     9// | Copyright (C) 2003-2007 PhpWebGallery Team - http://phpwebgallery.net |
     10
     11// +-----------------------------------------------------------------------+
     12
     13// | file          : $Id: index.php 1912 2007-03-16 06:30:07Z rub $
     14
     15// | last update   : $Date: 2007-03-16 07:30:07 +0100 (ven, 16 mar 2007) $
     16
     17// | last modifier : $Author: rub $
     18
     19// | revision      : $Revision: 1912 $
     20
     21// +-----------------------------------------------------------------------+
     22
     23// | This program is free software; you can redistribute it and/or modify  |
     24
     25// | it under the terms of the GNU General Public License as published by  |
     26
     27// | the Free Software Foundation                                          |
     28
     29// |                                                                       |
     30
     31// | This program is distributed in the hope that it will be useful, but   |
     32
     33// | WITHOUT ANY WARRANTY; without even the implied warranty of            |
     34
     35// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU      |
     36
     37// | General Public License for more details.                              |
     38
     39// |                                                                       |
     40
     41// | You should have received a copy of the GNU General Public License     |
     42
     43// | along with this program; if not, write to the Free Software           |
     44
     45// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
     46
     47// | USA.                                                                  |
     48
     49// +-----------------------------------------------------------------------+
     50
     51
     52
    2753// Recursive call
     54
    2855$url = '../';
     56
    2957header( 'Request-URI: '.$url );
     58
    3059header( 'Content-Location: '.$url );
     60
    3161header( 'Location: '.$url );
     62
    3263exit();
     64
    3365?>
     66
  • extensions/ThumbnailTooltip/language/lv_LV/plugin.lang.php

    r28174 r30100  
    11<?php
     2
    23// +-----------------------------------------------------------------------+
     4
    35// | Piwigo - a PHP based photo gallery                                    |
     6
    47// +-----------------------------------------------------------------------+
     8
    59// | Copyright(C) 2008-2014 Piwigo Team                  http://piwigo.org |
     10
    611// | Copyright(C) 2003-2008 PhpWebGallery Team    http://phpwebgallery.net |
     12
    713// | Copyright(C) 2002-2003 Pierrick LE GALL   http://le-gall.net/pierrick |
     14
    815// +-----------------------------------------------------------------------+
     16
    917// | This program is free software; you can redistribute it and/or modify  |
     18
    1019// | it under the terms of the GNU General Public License as published by  |
     20
    1121// | the Free Software Foundation                                          |
     22
    1223// |                                                                       |
     24
    1325// | This program is distributed in the hope that it will be useful, but   |
     26
    1427// | WITHOUT ANY WARRANTY; without even the implied warranty of            |
     28
    1529// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU      |
     30
    1631// | General Public License for more details.                              |
     32
    1733// |                                                                       |
     34
    1835// | You should have received a copy of the GNU General Public License     |
     36
    1937// | along with this program; if not, write to the Free Software           |
     38
    2039// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
     40
    2141// | USA.                                                                  |
     42
    2243// +-----------------------------------------------------------------------+
     44
    2345$lang['tn_display_img'] = 'Attēli';
     46
    2447$lang['tn_display_cat'] = 'Fotoalbumus';
     48
    2549$lang['tn_display_name_img'] = 'Parādīt nosaukumu attēlu';
     50
    2651$lang['tn_display_name_cat'] = 'Parādīt nosaukumus autors albumā';
     52
    2753$lang['tn_name_link'] = 'Tooltip teksta';
    2854
     55
     56
    2957$lang['tn_type1'] = 'Nosaukums';
     58
    3059$lang['tn_type2'] = 'Apmeklejumi';
     60
    3161$lang['tn_type3'] = '(Apmeklejumi)';
     62
    3263$lang['tn_type4'] = 'Description';
     64
    3365$lang['tn_type5'] = 'Autors';
     66
    3467$lang['tn_type6'] = 'Autors : Autors';
     68
    3569$lang['tn_type7'] = 'Rezultejošais vertejums';
     70
    3671$lang['tn_type8'] = '(Apmeklejumi, Rezultejošais vertejums)';
     72
    3773$lang['tn_separator'] = 'Atdalitajs (-)';
     74
    3875$lang['tn_none'] = 'Neviens';
     76
    3977$lang['tn_no'] = 'Ne';
     78
    4079$lang['tn_default_parameters_saved'] = 'Noklusejuma konfiguracija saglabata';
     80
    4181$lang['tn_default_parameters'] = 'Noklusejuma konfiguracija';
     82
    4283$lang['tn_configuration_saved'] = 'Konfiguracija saglabata';
    4384
     85
     86
    4487$lang['tn_yes'] = 'Ja';
     88
    4589?>
  • extensions/ThumbnailTooltip/language/pt_BR/plugin.lang.php

    r28174 r30100  
    11<?php
    22// +-----------------------------------------------------------------------+
     3
    34// | Piwigo - a PHP based photo gallery                                    |
     5
    46// +-----------------------------------------------------------------------+
     7
    58// | Copyright(C) 2008-2014 Piwigo Team                  http://piwigo.org |
     9
    610// | Copyright(C) 2003-2008 PhpWebGallery Team    http://phpwebgallery.net |
     11
    712// | Copyright(C) 2002-2003 Pierrick LE GALL   http://le-gall.net/pierrick |
     13
    814// +-----------------------------------------------------------------------+
     15
    916// | This program is free software; you can redistribute it and/or modify  |
     17
    1018// | it under the terms of the GNU General Public License as published by  |
     19
    1120// | the Free Software Foundation                                          |
     21
    1222// |                                                                       |
     23
    1324// | This program is distributed in the hope that it will be useful, but   |
     25
    1426// | WITHOUT ANY WARRANTY; without even the implied warranty of            |
     27
    1528// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU      |
     29
    1630// | General Public License for more details.                              |
     31
    1732// |                                                                       |
     33
    1834// | You should have received a copy of the GNU General Public License     |
     35
    1936// | along with this program; if not, write to the Free Software           |
     37
    2038// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
     39
    2140// | USA.                                                                  |
     41
    2242// +-----------------------------------------------------------------------+
    2343$lang['tn_display_img'] = 'Fotos';
  • extensions/ThumbnailTooltip/language/pt_PT/plugin.lang.php

    r28174 r30100  
    11<?php
    22// +-----------------------------------------------------------------------+
     3
    34// | Piwigo - a PHP based photo gallery                                    |
     5
    46// +-----------------------------------------------------------------------+
     7
    58// | Copyright(C) 2008-2014 Piwigo Team                  http://piwigo.org |
     9
    610// | Copyright(C) 2003-2008 PhpWebGallery Team    http://phpwebgallery.net |
     11
    712// | Copyright(C) 2002-2003 Pierrick LE GALL   http://le-gall.net/pierrick |
     13
    814// +-----------------------------------------------------------------------+
     15
    916// | This program is free software; you can redistribute it and/or modify  |
     17
    1018// | it under the terms of the GNU General Public License as published by  |
     19
    1120// | the Free Software Foundation                                          |
     21
    1222// |                                                                       |
     23
    1324// | This program is distributed in the hope that it will be useful, but   |
     25
    1426// | WITHOUT ANY WARRANTY; without even the implied warranty of            |
     27
    1528// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU      |
     29
    1630// | General Public License for more details.                              |
     31
    1732// |                                                                       |
     33
    1834// | You should have received a copy of the GNU General Public License     |
     35
    1936// | along with this program; if not, write to the Free Software           |
     37
    2038// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
     39
    2140// | USA.                                                                  |
     41
    2242// +-----------------------------------------------------------------------+
    2343$lang['tn_display_img'] = 'Fotos';
  • extensions/ThumbnailTooltip/language/sk_SK/plugin.lang.php

    r28174 r30100  
    11<?php
    22// +-----------------------------------------------------------------------+
     3
    34// | Piwigo - a PHP based photo gallery                                    |
     5
    46// +-----------------------------------------------------------------------+
     7
    58// | Copyright(C) 2008-2014 Piwigo Team                  http://piwigo.org |
     9
    610// | Copyright(C) 2003-2008 PhpWebGallery Team    http://phpwebgallery.net |
     11
    712// | Copyright(C) 2002-2003 Pierrick LE GALL   http://le-gall.net/pierrick |
     13
    814// +-----------------------------------------------------------------------+
     15
    916// | This program is free software; you can redistribute it and/or modify  |
     17
    1018// | it under the terms of the GNU General Public License as published by  |
     19
    1120// | the Free Software Foundation                                          |
     21
    1222// |                                                                       |
     23
    1324// | This program is distributed in the hope that it will be useful, but   |
     25
    1426// | WITHOUT ANY WARRANTY; without even the implied warranty of            |
     27
    1528// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU      |
     29
    1630// | General Public License for more details.                              |
     31
    1732// |                                                                       |
     33
    1834// | You should have received a copy of the GNU General Public License     |
     35
    1936// | along with this program; if not, write to the Free Software           |
     37
    2038// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
     39
    2140// | USA.                                                                  |
     41
    2242// +-----------------------------------------------------------------------+
    2343$lang['tn_display_img'] = 'Fotky';
  • extensions/ThumbnailTooltip/language/sv_SE/plugin.lang.php

    r28751 r30100  
    11<?php
    22// +-----------------------------------------------------------------------+
     3
    34// | Piwigo - a PHP based photo gallery                                    |
     5
    46// +-----------------------------------------------------------------------+
     7
    58// | Copyright(C) 2008-2014 Piwigo Team                  http://piwigo.org |
     9
    610// | Copyright(C) 2003-2008 PhpWebGallery Team    http://phpwebgallery.net |
     11
    712// | Copyright(C) 2002-2003 Pierrick LE GALL   http://le-gall.net/pierrick |
     13
    814// +-----------------------------------------------------------------------+
     15
    916// | This program is free software; you can redistribute it and/or modify  |
     17
    1018// | it under the terms of the GNU General Public License as published by  |
     19
    1120// | the Free Software Foundation                                          |
     21
    1222// |                                                                       |
     23
    1324// | This program is distributed in the hope that it will be useful, but   |
     25
    1426// | WITHOUT ANY WARRANTY; without even the implied warranty of            |
     27
    1528// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU      |
     29
    1630// | General Public License for more details.                              |
     31
    1732// |                                                                       |
     33
    1834// | You should have received a copy of the GNU General Public License     |
     35
    1936// | along with this program; if not, write to the Free Software           |
     37
    2038// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
     39
    2140// | USA.                                                                  |
     41
    2242// +-----------------------------------------------------------------------+
    2343$lang['tn_configuration_saved'] = 'Inställningarna sparade';
  • extensions/ThumbnailTooltip/language/tr_TR/plugin.lang.php

    r28174 r30100  
    11<?php
    22// +-----------------------------------------------------------------------+
     3
    34// | Piwigo - a PHP based photo gallery                                    |
     5
    46// +-----------------------------------------------------------------------+
     7
    58// | Copyright(C) 2008-2014 Piwigo Team                  http://piwigo.org |
     9
    610// | Copyright(C) 2003-2008 PhpWebGallery Team    http://phpwebgallery.net |
     11
    712// | Copyright(C) 2002-2003 Pierrick LE GALL   http://le-gall.net/pierrick |
     13
    814// +-----------------------------------------------------------------------+
     15
    916// | This program is free software; you can redistribute it and/or modify  |
     17
    1018// | it under the terms of the GNU General Public License as published by  |
     19
    1120// | the Free Software Foundation                                          |
     21
    1222// |                                                                       |
     23
    1324// | This program is distributed in the hope that it will be useful, but   |
     25
    1426// | WITHOUT ANY WARRANTY; without even the implied warranty of            |
     27
    1528// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU      |
     29
    1630// | General Public License for more details.                              |
     31
    1732// |                                                                       |
     33
    1834// | You should have received a copy of the GNU General Public License     |
     35
    1936// | along with this program; if not, write to the Free Software           |
     37
    2038// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
     39
    2140// | USA.                                                                  |
     41
    2242// +-----------------------------------------------------------------------+
    2343$lang['tn_display_img'] = 'Görüntüler';
  • extensions/ThumbnailTooltip/main.inc.php

    r28288 r30100  
    11<?php
     2
    23/*
     4
    35Plugin Name: Thumbnail Tooltip
    4 Version: 1.4.5
     6
     7Version: 1.4.8
    58Description: Permet de changer l'infobulle sur les images dans les albums.
     9
    610Plugin URI: http://piwigo.org/ext/extension_view.php?eid=738
     11
    712Author: Sarybe
     13
    814Author URI: http://www.lesrempartsdetours.com
     15
    916*/
     17
     18
    1019
    1120// Inspiré des plugins CatAddFav by jfc (http://fr.piwigo.org/ext/extension_view.php?eid=489) et Lightbox by P@t (http://piwigo.org/ext/extension_view.php?eid=280)
    1221
     22
     23
    1324if (!defined('PHPWG_ROOT_PATH')) {
     25
    1426  die('Hacking attempt!');
     27
    1528}
     29
     30
    1631
    1732define('thumbnail_tooltip_PATH' , PHPWG_PLUGINS_PATH.basename(dirname(__FILE__)).'/');
    1833
     34
     35
    1936if (script_basename()  == 'admin') {
     37
    2038  include(dirname(__FILE__).'/admin/functions.inc.php');
     39
    2140}
     41
    2242else {
     43
    2344  include_once(dirname(__FILE__).'/initialize.inc.php');
     45
    2446}
     47
    2548?>
  • extensions/ThumbnailTooltip/maintain.inc.php

    r27650 r30100  
    11<?php
     2
     3
    24
    35if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!');
    46
     7
     8
    59function plugin_install()
     10
    611{
     12
    713  include(dirname(__FILE__).'/admin/config_default.inc.php');
    814
     15
     16
    917  $query = '
     18
    1019INSERT INTO ' . CONFIG_TABLE . ' (param,value,comment)
     20
    1121VALUES ("thumbnail_tooltip" , "'.addslashes(serialize($config_default)).'" , "Thumbnail Tooltip plugin parameters");';
     22
    1223  pwg_query($query);
    1324
     25
     26
    1427  $query = 'SHOW FULL COLUMNS FROM ' . HISTORY_TABLE . ';';
     28
    1529  $result = array_from_query($query, 'Field');
     30
    1631  if (!in_array('thumbnail_tooltip', $result))
     32
    1733  {
     34
    1835    pwg_query('ALTER TABLE '.HISTORY_TABLE.' ADD `thumbnail_tooltip` ENUM(\'true\', \'false\') NULL DEFAULT NULL');
     36
    1937  }
     38
    2039}
    2140
     41
     42
    2243function plugin_uninstall()
     44
    2345{
     46
    2447  $query = 'DELETE FROM ' . CONFIG_TABLE . ' WHERE param="thumbnail_tooltip" LIMIT 1;';
     48
    2549  pwg_query($query);
    2650
     51
     52
    2753  $query = 'SHOW FULL COLUMNS FROM ' . HISTORY_TABLE . ';';
     54
    2855  $result = array_from_query($query, 'Field');
     56
    2957  if (in_array('thumbnail_tooltip', $result))
     58
    3059  {
     60
    3161    $q = ' ALTER TABLE '.HISTORY_TABLE.' DROP `thumbnail_tooltip`';
     62
    3263    pwg_query( $q );
     64
    3365  }
     66
    3467}
    3568
     69
     70
    3671?>
Note: See TracChangeset for help on using the changeset viewer.