Changeset 1119


Ignore:
Timestamp:
Apr 3, 2006, 12:26:19 AM (18 years ago)
Author:
plg
Message:

improvement: tags replace keywords. Better data model, less
limitations. Each image can be associated to as many tag as needed. Tags can
contain non ASCII characters. Oriented navigation with tags by association.

Location:
trunk
Files:
7 added
37 edited

Legend:

Unmodified
Added
Removed
  • trunk/admin.php

    r1091 r1119  
    9393    'U_RATING'=> $link_start.'rating',
    9494    'U_CADDIE'=> $link_start.'element_set&cat=caddie',
     95    'U_TAGS'=> $link_start.'tags',
    9596    'U_THUMBNAILS'=> $link_start.'thumbnail',
    9697    'U_USERS'=> $link_start.'user_list',
  • trunk/admin/element_set_global.php

    r1092 r1119  
    4545
    4646// +-----------------------------------------------------------------------+
    47 // |                               functions                               |
    48 // +-----------------------------------------------------------------------+
    49 
    50 /**
    51  * returns the list of uniq keywords among given elements
    52  *
    53  * @param array element_ids
    54  */
    55 function get_elements_keywords($element_ids)
    56 {
    57   if (0 == count($element_ids))
    58   {
    59     return array();
    60   }
    61 
    62   $keywords = array();
    63 
    64   $query = '
    65 SELECT keywords
    66   FROM '.IMAGES_TABLE.'
    67   WHERE id IN ('.implode(',', $element_ids).')
    68 ;';
    69   $result = pwg_query($query);
    70   while ($row = mysql_fetch_array($result))
    71   {
    72     if (isset($row['keywords']) and !empty($row['keywords']))
    73     {
    74       $keywords = array_merge($keywords, explode(',', $row['keywords']));
    75     }
    76   }
    77   return array_unique($keywords);
    78 }
    79 
    80 // +-----------------------------------------------------------------------+
    8147// |                       global mode form submission                     |
    8248// +-----------------------------------------------------------------------+
     
    11278  }
    11379
     80  if (isset($_POST['add_tags']) and count($collection) > 0)
     81  {
     82    add_tags($_POST['add_tags'], $collection);
     83  }
     84
     85  if (isset($_POST['del_tags']) and count($collection) > 0)
     86  {
     87    $query = '
     88DELETE
     89  FROM '.IMAGE_TAG_TABLE.'
     90  WHERE image_id IN ('.implode(',', $collection).')
     91    AND tag_id IN ('.implode(',', $_POST['del_tags']).')
     92;';
     93    pwg_query($query);
     94  }
     95 
    11496  if ($_POST['associate'] != 0 and count($collection) > 0)
    11597  {
     
    193175  $dbfields = array('primary' => array('id'), 'update' => array());
    194176
    195   if (!empty($_POST['add_keywords']) or $_POST['remove_keyword'] != '0')
    196   {
    197     array_push($dbfields['update'], 'keywords');
    198   }
    199 
    200177  $formfields = array('author', 'name', 'date_creation');
    201178  foreach ($formfields as $formfield)
     
    211188  {
    212189    $query = '
    213 SELECT id, keywords
     190SELECT id
    214191  FROM '.IMAGES_TABLE.'
    215192  WHERE id IN ('.implode(',', $collection).')
     
    221198      $data = array();
    222199      $data['id'] = $row['id'];
    223 
    224       if (!empty($_POST['add_keywords']))
    225       {
    226         $data['keywords'] =
    227           implode(
    228             ',',
    229             array_unique(
    230               array_merge(
    231                 get_keywords(empty($row['keywords']) ? '' : $row['keywords']),
    232                 get_keywords($_POST['add_keywords'])
    233                 )
    234               )
    235             );
    236       }
    237 
    238       if ($_POST['remove_keyword'] != '0')
    239       {
    240         if (!isset($data['keywords']))
    241         {
    242           $data['keywords'] = empty($row['keywords']) ? '' : $row['keywords'];
    243         }
    244 
    245         $data['keywords'] =
    246           implode(
    247             ',',
    248             array_unique(
    249               array_diff(
    250                 get_keywords($data['keywords']),
    251                 array($_POST['remove_keyword'])
    252                 )
    253               )
    254             );
    255 
    256         if ($data['keywords'] == '')
    257         {
    258           unset($data['keywords']);
    259         }
    260       }
    261200
    262201      if ('set' == $_POST['author_action'])
     
    385324}
    386325
    387 $blockname = 'remove_keyword_option';
    388 
    389 $template->assign_block_vars(
    390   $blockname,
    391   array('VALUE'=> 0,
    392         'OPTION' => '------------'
    393     ));
    394 
    395 $keywords = get_elements_keywords($page['cat_elements_id']);
    396 
    397 foreach ($keywords as $keyword)
    398 {
    399   $template->assign_block_vars(
    400   $blockname,
    401   array('VALUE'=> $keyword,
    402         'OPTION' => $keyword
    403     ));
    404 }
     326// add tags
     327$template->assign_vars(
     328  array(
     329    'ADD_TAG_SELECTION' => get_html_tag_selection(get_all_tags(), 'add_tags'),
     330    )
     331  );
     332
     333// remove tags
     334$query = '
     335SELECT tag_id, name, url_name, count(*) counter
     336  FROM '.IMAGE_TAG_TABLE.'
     337    INNER JOIN '.TAGS_TABLE.' ON tag_id = id
     338  WHERE image_id IN ('.implode(',', $page['cat_elements_id']).')
     339  GROUP BY tag_id
     340  ORDER BY name ASC
     341;';
     342$result = pwg_query($query);
     343
     344$tags = array();
     345while($row = mysql_fetch_array($result))
     346{
     347  array_push($tags, $row);
     348}
     349
     350$template->assign_vars(
     351  array(
     352    'DEL_TAG_SELECTION' => get_html_tag_selection($tags, 'del_tags'),
     353    )
     354  );
    405355
    406356// creation date
  • trunk/admin/element_set_unit.php

    r1084 r1119  
    104104      $data{'date_creation'} = $row['date_creation'];
    105105    }
    106 
    107     $keywords = get_keywords($_POST['keywords-'.$row['id']]);
    108     if (count($keywords) > 0)
    109     {
    110       $data{'keywords'} = implode(',', $keywords);
    111     }
    112     else
    113     {
    114       $data{'keywords'} = '';
    115     }
    116 
     106   
    117107    array_push($datas, $data);
     108
     109    // tags management
     110    if (isset($_POST[ 'tags-'.$row['id'] ]))
     111    {
     112      set_tags($_POST[ 'tags-'.$row['id'] ], $row['id']);
     113    }
    118114  }
    119115 
     
    122118    array(
    123119      'primary' => array('id'),
    124       'update' => array('name','author','comment','date_creation','keywords')
     120      'update' => array('name','author','comment','date_creation')
    125121      ),
    126122    $datas
     
    193189  $template->assign_vars(array('NAV_BAR' => $nav_bar));
    194190
     191  // tags
     192  $all_tags = get_all_tags();
    195193 
    196194  $element_ids = array();
    197195
    198196  $query = '
    199 SELECT id,path,tn_ext,name,date_creation,comment,keywords,author,file
     197SELECT id,path,tn_ext,name,date_creation,comment,author,file
    200198  FROM '.IMAGES_TABLE.'
    201199  WHERE id IN ('.implode(',', $page['cat_elements_id']).')
     
    211209   
    212210    $src = get_thumbnail_src($row['path'], @$row['tn_ext']);
     211
     212    $query = '
     213SELECT tag_id
     214  FROM '.IMAGE_TAG_TABLE.'
     215  WHERE image_id = '.$row['id'].'
     216;';
     217    $selected_tags = array_from_query($query, 'tag_id');
    213218   
    214219    // creation date
     
    238243        'DESCRIPTION' => @$row['comment'],
    239244        'DATE_CREATION_YEAR' => $year,
    240         'KEYWORDS' => @$row['keywords']
     245       
     246        'TAG_SELECTION' => get_html_tag_selection(
     247          $all_tags,
     248          'tags-'.$row['id'],
     249          $selected_tags
     250          ),
    241251        )
    242252      );
  • trunk/admin/include/functions.php

    r1116 r1119  
    270270  pwg_query($query);
    271271
     272  // destruction of the links between images and tags
     273  $query = '
     274DELETE FROM '.IMAGE_TAG_TABLE.'
     275  WHERE image_id IN (
     276'.wordwrap(implode(', ', $ids), 80, "\n").')
     277;';
     278  pwg_query($query);
     279
    272280  // destruction of the favorites associated with the picture
    273281  $query = '
     
    575583    return '';
    576584  }
    577 }
    578 
    579 /**
    580  * returns an array with relevant keywords found in the given string.
    581  *
    582  * Keywords must be separated by comma or space characters.
    583  *
    584  * @param string keywords_string
    585  * @return array
    586  */
    587 function get_keywords($keywords_string)
    588 {
    589   return
    590     array_unique(
    591       preg_split(
    592         '/[\s,]+/',
    593         $keywords_string
    594         )
    595       );
    596585}
    597586
     
    20952084
    20962085/**
     2086 * Set tags to an image. Warning: given tags are all tags associated to the
     2087 * image, not additionnal tags.
     2088 *
     2089 * @param array tag ids
     2090 * @param int image id
     2091 * @return void
     2092 */
     2093function set_tags($tags, $image_id)
     2094{
     2095  $query = '
     2096DELETE
     2097  FROM '.IMAGE_TAG_TABLE.'
     2098  WHERE image_id = '.$image_id.'
     2099;';
     2100  pwg_query($query);
     2101
     2102  if (count($tags) > 0)
     2103  {
     2104    $inserts = array();
     2105    foreach ($tags as $tag_id)
     2106    {
     2107      array_push(
     2108        $inserts,
     2109        array(
     2110          'tag_id' => $tag_id,
     2111          'image_id' => $image_id
     2112          )
     2113        );
     2114    }
     2115    mass_inserts(
     2116      IMAGE_TAG_TABLE,
     2117      array_keys($inserts[0]),
     2118      $inserts
     2119      );
     2120  }
     2121}
     2122
     2123/**
     2124 * Add new tags to a set of images.
     2125 *
     2126 * @param array tag ids
     2127 * @param array image ids
     2128 * @return void
     2129 */
     2130function add_tags($tags, $images)
     2131{
     2132  if (count($tags) == 0 or count($tags) == 0)
     2133  {
     2134    return;
     2135  }
     2136 
     2137  // we can't insert twice the same {image_id,tag_id} so we must first
     2138  // delete lines we'll insert later
     2139  $query = '
     2140DELETE
     2141  FROM '.IMAGE_TAG_TABLE.'
     2142  WHERE image_id IN ('.implode(',', $images).')
     2143    AND tag_id IN ('.implode(',', $tags).')
     2144;';
     2145  pwg_query($query);
     2146
     2147  $inserts = array();
     2148  foreach ($images as $image_id)
     2149  {
     2150    foreach ($tags as $tag_id)
     2151    {
     2152      array_push(
     2153        $inserts,
     2154        array(
     2155          'image_id' => $image_id,
     2156          'tag_id' => $tag_id,
     2157          )
     2158        );
     2159    }
     2160  }
     2161  mass_inserts(
     2162    IMAGE_TAG_TABLE,
     2163    array_keys($inserts[0]),
     2164    $inserts
     2165    );
     2166}
     2167
     2168function tag_id_from_tag_name($tag_name)
     2169{
     2170  global $page;
     2171
     2172  if (isset($page['tag_id_from_tag_name_cache'][$tag_name]))
     2173  {
     2174    return $page['tag_id_from_tag_name_cache'][$tag_name];
     2175  }
     2176 
     2177  if (function_exists('mysql_real_escape_string'))
     2178  {
     2179    $tag_name = mysql_real_escape_string($tag_name);
     2180  }
     2181  else
     2182  {
     2183    $tag_name = mysql_escape_string($tag_name);
     2184  }
     2185
     2186  // does the tag already exist?
     2187  $query = '
     2188SELECT id
     2189  FROM '.TAGS_TABLE.'
     2190  WHERE name = \''.$tag_name.'\'
     2191;';
     2192  $existing_tags = array_from_query($query, 'id');
     2193
     2194  if (count($existing_tags) == 0)
     2195  {
     2196    mass_inserts(
     2197      TAGS_TABLE,
     2198      array('name', 'url_name'),
     2199      array(
     2200        array(
     2201          'name' => $tag_name,
     2202          'url_name' => str2url($tag_name),
     2203          )
     2204        )
     2205      );
     2206
     2207    $page['tag_id_from_tag_name_cache'][$tag_name] = mysql_insert_id();
     2208  }
     2209  else
     2210  {
     2211    $page['tag_id_from_tag_name_cache'][$tag_name] = $existing_tags[0];
     2212  }
     2213
     2214  return $page['tag_id_from_tag_name_cache'][$tag_name];
     2215}
     2216
     2217function set_tags_of($tags_of)
     2218{
     2219  if (count($tags_of) > 0)
     2220  {
     2221    $query = '
     2222DELETE
     2223  FROM '.IMAGE_TAG_TABLE.'
     2224  WHERE image_id IN ('.implode(',', array_keys($tags_of)).')
     2225;';
     2226    pwg_query($query);
     2227
     2228    $inserts = array();
     2229   
     2230    foreach ($tags_of as $image_id => $tag_ids)
     2231    {
     2232      foreach ($tag_ids as $tag_id)
     2233      {
     2234        array_push(
     2235          $inserts,
     2236          array(
     2237            'image_id' => $image_id,
     2238            'tag_id' => $tag_id,
     2239            )
     2240          );
     2241      }
     2242    }
     2243
     2244    mass_inserts(
     2245      IMAGE_TAG_TABLE,
     2246      array_keys($inserts[0]),
     2247      $inserts
     2248      );
     2249  }
     2250}
     2251
     2252/**
    20972253 * Do maintenance on all PWG tables
    20982254 *
     
    21442300
    21452301}
    2146 
    2147 
    21482302?>
  • trunk/admin/include/functions_metadata.php

    r1064 r1119  
    5151  if (isset($iptc['keywords']))
    5252  {
    53     // keywords separator is the comma, nothing else. Allowed characters in
    54     // keywords : [A-Za-z0-9], "-" and "_". All other characters will be
    55     // considered as separators
    56     $iptc['keywords'] = preg_replace('/[^\w-]+/', ',', $iptc['keywords']);
     53    // keywords separator is the comma
    5754    $iptc['keywords'] = preg_replace('/^,+|,+$/', '', $iptc['keywords']);
    5855  }
     
    9188
    9289  $datas = array();
     90  $tags_of = array();
    9391
    9492  foreach ($files as $id => $file)
     
    124122        foreach (array_keys($iptc) as $key)
    125123        {
    126           $data[$key] = addslashes($iptc[$key]);
     124          if ($key == 'keywords' or $key == 'tags')
     125          {
     126            if (!isset($tags_of[$id]))
     127            {
     128              $tags_of[$id] = array();
     129            }
     130           
     131            foreach (explode(',', $iptc[$key]) as $tag_name)
     132            {
     133              array_push(
     134                $tags_of[$id],
     135                tag_id_from_tag_name($tag_name)
     136                );
     137            }
     138          }
     139          else
     140          {
     141            $data[$key] = addslashes($iptc[$key]);
     142          }
    127143        }
    128144      }
     
    158174        array_merge(
    159175          $update_fields,
    160           array_keys($conf['use_iptc_mapping'])
     176          array_diff(
     177            array_keys($conf['use_iptc_mapping']),
     178            array('tags', 'keywords')
     179            )
    161180          );
    162181    }
     
    167186        'update'  => array_unique($update_fields)
    168187        );
     188    echo '<pre>'; print_r($datas); echo '</pre>';
    169189    mass_updates(IMAGES_TABLE, $fields, $datas);
    170190  }
     191
     192  set_tags_of(tags_of);
    171193}
    172194
  • trunk/admin/picture_modify.php

    r1092 r1119  
    101101  }
    102102
    103   $keywords = get_keywords($_POST['keywords']);
    104   if (count($keywords) > 0)
    105   {
    106     $data{'keywords'} = implode(',', $keywords);
    107   }
    108   else
    109   {
    110     $data{'keywords'} = '';
    111   }
    112 
    113103  mass_updates(
    114104    IMAGES_TABLE,
     
    120110    );
    121111
     112  set_tags(
     113    isset($_POST['tags']) ? $_POST['tags'] : array(),
     114    $_GET['image_id']
     115    );
     116
    122117  array_push($page['infos'], l10n('Picture informations updated'));
    123118}
     
    216211$image_file = $row['file'];
    217212
     213// tags
     214$query = '
     215SELECT tag_id
     216  FROM '.IMAGE_TAG_TABLE.'
     217  WHERE image_id = '.$_GET['image_id'].'
     218;';
     219$selected_tags = array_from_query($query, 'tag_id');
     220
    218221// Navigation path
    219222
     
    258261    'CREATION_DATE' => $date,
    259262
    260     'KEYWORDS' =>
    261       isset($_POST['keywords']) ?
    262         stripslashes($_POST['keywords']) : @$row['keywords'],
     263    'TAG_SELECTION' => get_html_tag_selection(
     264      get_all_tags(),
     265      'tags',
     266      $selected_tags
     267      ),
    263268
    264269    'DESCRIPTION' =>
  • trunk/admin/site_update.php

    r1107 r1119  
    716716  $start = get_moment();
    717717  $datas = array();
     718  $tags_of = array();
    718719  foreach ( $files as $id=>$file )
    719720  {
     
    724725      $data['id']=$id;
    725726      array_push($datas, $data);
     727
     728      foreach (array('keywords', 'tags') as $key)
     729      {
     730        if (isset($data[$key]))
     731        {
     732          if (!isset($tags_of[$id]))
     733          {
     734            $tags_of[$id] = array();
     735          }
     736       
     737          foreach (explode(',', $data[$key]) as $tag_name)
     738          {
     739            array_push(
     740              $tags_of[$id],
     741              tag_id_from_tag_name($tag_name)
     742              );
     743          }
     744        }
     745      }
    726746    }
    727747    else
     
    730750    }
    731751  }
    732   $update_fields = $site_reader->get_update_attributes();
    733   $update_fields = array_merge($update_fields, array('date_metadata_update'));
    734   $fields =
    735       array(
    736         'primary' => array('id'),
    737         'update'  => array_unique($update_fields)
    738         );
    739   //print_r($datas);
    740   if (!$simulate and count($datas)>0 )
    741   {
    742     mass_updates(IMAGES_TABLE, $fields, $datas);
     752
     753  if (!$simulate)
     754  {
     755    if (count($datas) > 0)
     756    {
     757      mass_updates(
     758        IMAGES_TABLE,
     759        // fields
     760        array(
     761          'primary' => array('id'),
     762          'update'  => array_unique(
     763            array_merge(
     764              array_diff(
     765                $site_reader->get_update_attributes(),
     766                // keywords and tags fields are managed separately
     767                array('keywords', 'tags')
     768                ),
     769              array('date_metadata_update'))
     770            )
     771          ),
     772        $datas
     773        );
     774    }
     775    set_tags_of($tags_of);
    743776  }
    744777
  • trunk/include/category_default.inc.php

    r1098 r1119  
    8080    $thumbnail_title .= ' : '.$row['filesize'].' KB';
    8181  }
    82 
     82 
    8383  // link on picture.php page
    8484  $url = duplicate_picture_url(
  • trunk/include/common.inc.php

    r1117 r1119  
    149149  {
    150150    ob_start();// buffer output so that cookies work
     151
    151152    echo
    152153      '<p>'
  • trunk/include/config_default.inc.php

    r1116 r1119  
    440440
    441441// +-----------------------------------------------------------------------+
     442// |                                 tags                                  |
     443// +-----------------------------------------------------------------------+
     444
     445// full_tag_cloud_items_number: number of tags to show in the full tag
     446// cloud. Only the most represented tags will be shown
     447$conf['full_tag_cloud_items_number'] = 200;
     448
     449// tags_levels: number of levels to use for display. Each level is bind to a
     450// CSS class tagLevelX.
     451$conf['tags_levels'] = 10;
     452
     453// +-----------------------------------------------------------------------+
    442454// | Notification by mail                                                  |
    443455// +-----------------------------------------------------------------------+
     
    456468// Max mails sended on one pass
    457469$conf['nbm_max_mails_send'] = 35;
    458 
    459470?>
  • trunk/include/constants.php

    r1072 r1119  
    7171define('USER_MAIL_NOTIFICATION_TABLE', $prefixeTable.'user_mail_notification');
    7272define('CATEGORIES_LINK_TABLE', $prefixeTable.'categories_link');
     73define('TAGS_TABLE', $prefixeTable.'tags');
     74define('IMAGE_TAG_TABLE', $prefixeTable.'image_tag');
    7375?>
  • trunk/include/functions.inc.php

    r1113 r1119  
    3232include_once( PHPWG_ROOT_PATH .'include/functions_group.inc.php' );
    3333include_once( PHPWG_ROOT_PATH .'include/functions_html.inc.php' );
     34include_once( PHPWG_ROOT_PATH .'include/functions_tag.inc.php' );
    3435include_once( PHPWG_ROOT_PATH .'include/functions_url.inc.php' );
    3536
     
    268269  return $picture_size;
    269270}
     271
     272/**
     273 * simplify a string to insert it into an URL
     274 *
     275 * based on str2url function from Dotclear
     276 *
     277 * @param string
     278 * @return string
     279 */
     280function str2url($str)
     281{
     282  $str = strtr(
     283    $str,
     284    'ÀÁÂÃÄÅàáâãäåÇçÒÓÔÕÖØòóôõöøÈÉÊËèéêëÌÍÎÏìíîïÙÚÛÜùúûü¾ÝÿýÑñ',
     285    'AAAAAAaaaaaaCcOOOOOOooooooEEEEeeeeIIIIiiiiUUUUuuuuYYyyNn'
     286    );
     287
     288  $str = str_replace('Æ', 'AE', $str);
     289  $str = str_replace('æ', 'ae', $str);
     290  $str = str_replace('¼', 'OE', $str);
     291  $str = str_replace('½', 'oe', $str);
     292
     293  $str = preg_replace('/[^a-z0-9_\s\'\:\/\[\]-]/','',strtolower($str));
     294  $str = preg_replace('/[\s\'\:\/\[\]-]+/',' ',trim($str));
     295  $res = str_replace(' ','_',$str);
     296 
     297  return $res;
     298}
     299
    270300//-------------------------------------------- PhpWebGallery specific functions
    271301
     
    830860  return $available_upgrade_ids;
    831861}
    832 
    833862?>
  • trunk/include/functions_html.inc.php

    r1113 r1119  
    66// +-----------------------------------------------------------------------+
    77// | branch        : BSF (Best So Far)
    8 // | file          : $Id$
    98// | last update   : $Date$
    109// | last modifier : $Author$
     
    496495
    497496/**
     497 * Returns an HTML list of tags. It can be a multi select field or a list of
     498 * checkboxes.
     499 *
     500 * @param string HTML field name
     501 * @param array selected tag ids
     502 * @return array
     503 */
     504function get_html_tag_selection(
     505  $tags,
     506  $fieldname,
     507  $selecteds = array(),
     508  $forbidden_categories = null
     509  )
     510{
     511  global $conf;
     512 
     513  $output = '<ul class="tagSelection">';
     514  foreach ($tags as $tag)
     515  {
     516    $output.=
     517      '<li>'
     518      .'<label>'
     519      .'<input type="checkbox" name="'.$fieldname.'[]"'
     520      .' value="'.$tag['tag_id'].'"'
     521      ;
     522
     523    if (in_array($tag['tag_id'], $selecteds))
     524    {
     525      $output.= ' checked="checked"';
     526    }
     527   
     528    $output.=
     529      ' />'
     530      .' '.$tag['name']
     531      .'</label>'
     532      .'</li>'
     533      ."\n"
     534      ;
     535  }
     536  $output.= '</ul>';
     537
     538  return $output;
     539}
     540
     541function name_compare($a, $b)
     542{
     543  return strcmp($a['name'], $b['name']);
     544}
     545
     546/**
    498547 * exits the current script (either exit or redirect)
    499548 */
  • trunk/include/functions_search.inc.php

    r1113 r1119  
    8585  $clauses = array();
    8686
    87   foreach (array('file','name','comment','keywords','author') as $textfield)
     87  foreach (array('file','name','comment','author') as $textfield)
    8888  {
    8989    if (isset($search['fields'][$textfield]))
     
    110110  if (isset($search['fields']['allwords']))
    111111  {
    112     $fields = array('file', 'name', 'comment', 'keywords', 'author');
     112    $fields = array('file', 'name', 'comment', 'author');
    113113    // in the OR mode, request bust be :
    114114    // ((field1 LIKE '%word1%' OR field2 LIKE '%word1%')
     
    209209  $search_clause = $where_separator;
    210210
    211   if (isset($forbidden))
    212   {
    213     $search_clause.= "\n    AND ".$forbidden;
    214   }
    215 
    216211  return $search_clause;
    217212}
    218213
     214/**
     215 * returns the list of items corresponding to the search id
     216 *
     217 * @param int search id
     218 * @return array
     219 */
     220function get_search_items($search_id)
     221{
     222  $items = array();
     223 
     224  $search_clause = get_sql_search_clause($search_id);
     225 
     226  if (!empty($search_clause))
     227  {
     228    $query = '
     229SELECT DISTINCT(id)
     230  FROM '.IMAGES_TABLE.'
     231    INNER JOIN '.IMAGE_CATEGORY_TABLE.' AS ic ON id = ic.image_id
     232  WHERE '.$search_clause.'
     233;';
     234    $items = array_from_query($query, 'id');
     235  }
     236
     237  $search = get_search_array($search_id);
     238
     239  if (isset($search['fields']['tags']))
     240  {
     241    $tag_items = get_image_ids_for_tags(
     242      $search['fields']['tags']['words'],
     243      $search['fields']['tags']['mode']
     244      );
     245
     246    switch ($search['mode'])
     247    {
     248      case 'AND':
     249      {
     250        if (empty($search_clause))
     251        {
     252          $items = $tag_items;
     253        }
     254        else
     255        {
     256          $items = array_intersect($items, $tag_items);
     257        }
     258        break;
     259      }
     260      case 'OR':
     261      {
     262        $items = array_unique(
     263          array_merge(
     264            $items,
     265            $tag_items
     266            )
     267          );
     268        break;
     269      }
     270    }
     271  }
     272 
     273  return $items;
     274}
    219275?>
  • trunk/include/functions_url.inc.php

    r1109 r1119  
    259259  $section_string = '';
    260260
     261  $section_of = array(
     262    'category' => 'categories',
     263    'tags'     => 'tags',
     264    'list'     => 'list',
     265    'search'   => 'search',
     266    );
     267
     268  foreach ($section_of as $param => $section)
     269  {
     270    if (isset($params[$param]))
     271    {
     272      $params['section'] = $section;
     273    }
     274  }
     275
    261276  if (!isset($params['section']))
    262277  {
    263     if (isset($params['category']))
    264     {
    265       $params['section'] = 'categories';
    266     }
    267     else if (isset($params['tags']))
    268     {
    269       $params['section'] = 'tags';
    270     }
    271     else if (isset($params['list']))
    272     {
    273       $params['section'] = 'list';
    274     }
    275     else if (isset($params['search']))
    276     {
    277       $params['section'] = 'search';
    278     }
    279   }
    280 
    281   if (!isset($params['section']))
    282   {
    283278    $params['section'] = 'categories';
    284279  }
     
    290285      if (!isset($params['category']))
    291286      {
    292         //$section_string.= '/categories';
     287        $section_string.= '/categories';
    293288      }
    294289      else
     
    310305      foreach ($params['tags'] as $tag)
    311306      {
    312         $section_string.= '/'.$tag;
     307        $section_string.= '/'.$tag['id'];
     308       
     309        if (isset($tag['url_name']))
     310        {
     311          $section_string.= '-'.$tag['url_name'];
     312        }
    313313      }
    314314
  • trunk/include/functions_user.inc.php

    r1117 r1119  
    634634  return ($user['adviser'] == 'true');
    635635}
    636 
    637636?>
  • trunk/include/section_init.inc.php

    r1113 r1119  
    146146
    147147  $next_token++;
    148 
    149   for ($i = $next_token; ; $i++)
    150   {
    151     if (!isset($tokens[$i]))
    152     {
    153       break;
    154     }
    155 
    156     preg_match('/^(\d+)/', $tokens[$i], $matches);
     148  $i = $next_token;
     149
     150  while (isset($tokens[$i]))
     151  {
     152    preg_match('/^(\d+)(?:-(.*))?/', $tokens[$i], $matches);
    157153    if (!isset($matches[1]))
    158154    {
     
    166162      }
    167163    }
    168     array_push($page['tags'], $matches[1]);
     164   
     165    array_push(
     166      $page['tags'],
     167      array(
     168        'id'       => $matches[1],
     169        'url_name' => isset($matches[2]) ? $matches[2] : '',
     170        )
     171      );
     172
     173    $i++;
    169174  }
    170175
     
    226231}
    227232
    228 for ($i = $next_token; ; $i++)
    229 {
    230   if (!isset($tokens[$i]))
    231   {
    232     break;
    233   }
    234 
     233$i = $next_token;
     234
     235while (isset($tokens[$i]))
     236{
    235237  if (preg_match('/^start-(\d+)/', $tokens[$i], $matches))
    236238  {
     
    241243  {
    242244    $chronology_tokens = explode('-', $tokens[$i] );
     245
    243246    $page['chronology_field'] = $chronology_tokens[0];
     247
    244248    array_shift($chronology_tokens);
    245249    $page['chronology_style'] = $chronology_tokens[0];
     250
    246251    array_shift($chronology_tokens);
    247252    if ( count($chronology_tokens)>0 )
     
    256261    }
    257262  }
     263
     264  $i++;
    258265}
    259266
     
    339346  }
    340347// +-----------------------------------------------------------------------+
     348// |                            tags section                               |
     349// +-----------------------------------------------------------------------+
     350  if ($page['section'] == 'tags')
     351  {
     352    $page['tag_ids'] = array();
     353    foreach ($page['tags'] as $tag)
     354    {
     355      array_push($page['tag_ids'], $tag['id']);
     356    }
     357
     358    $items = get_image_ids_for_tags($page['tag_ids']);
     359
     360    // permissions depends on category, so to only keep images that are
     361    // reachable to the connected user, we need to check category
     362    // associations
     363    if (!empty($user['forbidden_categories']))
     364    {
     365      $query = '
     366SELECT image_id
     367  FROM '.IMAGE_CATEGORY_TABLE.'
     368  WHERE image_id IN ('.implode(',', $items).')
     369    AND '.$forbidden.'
     370;';
     371      $items = array_unique(
     372        array_from_query($query, 'image_id')
     373        );
     374    }
     375
     376    // tag names
     377    $query = '
     378SELECT name, url_name, id
     379  FROM '.TAGS_TABLE.'
     380  WHERE id IN ('.implode(',', $page['tag_ids']).')
     381;';
     382    $result = pwg_query($query);
     383    $tag_infos = array();
     384   
     385    while ($row = mysql_fetch_array($result))
     386    {
     387      $tag_infos[ $row['id'] ]['name'] = $row['name'];
     388      $tag_infos[ $row['id'] ]['url_name'] = $row['url_name'];
     389    }
     390
     391    $title = count($page['tags']) > 1 ? l10n('Tags') : l10n('Tag');
     392    $title.= ' ';
     393
     394    $tag_num = 1;
     395    foreach ($page['tag_ids'] as $tag_id)
     396    {
     397      $title.=
     398        ($tag_num++ > 1 ? ' + ' : '')
     399        .'<a href="'
     400        .make_index_url(
     401          array(
     402            'tags' => array(
     403              array(
     404                'id' => $tag_id,
     405                'url_name' => $tag_infos[$tag_id]['url_name'],
     406                ),
     407              )
     408            )
     409          )
     410        .'">'
     411        .$tag_infos[$tag_id]['name']
     412        .'</a>';
     413    }
     414
     415    $page = array_merge(
     416      $page,
     417      array(
     418        'title' => $title,
     419        'items' => array_values($items),
     420        'thumbnails_include' => 'include/category_default.inc.php',
     421        )
     422      );
     423  }
     424// +-----------------------------------------------------------------------+
    341425// |                           search section                              |
    342426// +-----------------------------------------------------------------------+
     
    344428  {
    345429    include_once( PHPWG_ROOT_PATH .'include/functions_search.inc.php' );
     430
    346431    $query = '
    347432SELECT DISTINCT(id)
    348433  FROM '.IMAGES_TABLE.'
    349434    INNER JOIN '.IMAGE_CATEGORY_TABLE.' AS ic ON id = ic.image_id
    350   WHERE '.get_sql_search_clause($page['search']).'
     435  WHERE id IN ('.implode(',', get_search_items($page['search'])).')
    351436    AND '.$forbidden.'
    352437  '.$conf['order_by'].'
    353 ;';
     438;'; 
    354439
    355440    $page = array_merge(
  • trunk/index.php

    r1117 r1119  
    222222  }
    223223}
     224//------------------------------------------------------------------------ tags
     225if ('tags' == $page['section'])
     226{
     227  $template->assign_block_vars('tags', array());
     228 
     229  // display tags associated to currently tagged items, less current tags
     230  $query = '
     231SELECT tag_id, name, url_name, count(*) counter
     232  FROM '.IMAGE_TAG_TABLE.'
     233    INNER JOIN '.TAGS_TABLE.' ON tag_id = id
     234  WHERE image_id IN ('.implode(',', $items).')
     235    AND tag_id NOT IN ('.implode(',', $page['tag_ids']).')
     236  GROUP BY tag_id
     237  ORDER BY name ASC
     238;';
     239  $result = pwg_query($query);
     240
     241  $tags = array();
     242 
     243  while($row = mysql_fetch_array($result))
     244  {
     245    array_push($tags, $row);
     246  }
     247
     248  $tags = add_level_to_tags($tags);
     249
     250  foreach ($tags as $tag)
     251  {
     252    $template->assign_block_vars(
     253      'tags.tag',
     254      array(
     255        'URL_ADD' => make_index_URL(
     256          array(
     257            'tags' => array_merge(
     258              $page['tags'],
     259              array(
     260                array(
     261                  'id' => $tag['tag_id'],
     262                  'url_name' => $tag['url_name'],
     263                  ),
     264                )
     265              )
     266            )
     267          ),
     268
     269        'URL' => make_index_URL(
     270          array(
     271            'tags' => array(
     272              array(
     273                'id' => $tag['tag_id'],
     274                'url_name' => $tag['url_name'],
     275                ),
     276              )
     277            )
     278          ),
     279       
     280        'NAME' => $tag['name'],
     281       
     282        'TITLE' => l10n('See pictures linked to this tag only'),
     283
     284        'TITLE_ADD' => sprintf(
     285          l10n('%d pictures are also linked to current tags'),
     286          $tag['counter']
     287          ),
     288       
     289        'CLASS' => 'tagLevel'.$tag['level']
     290        )
     291      );
     292  }
     293}
    224294//---------------------------------------------------------- special categories
    225295// favorites categories
     
    333403}
    334404
     405// tags link
     406$template->assign_block_vars(
     407  'summary',
     408  array(
     409    'TITLE' => l10n('See available tags'),
     410    'NAME' => l10n('Tags'),
     411    'U_SUMMARY'=> get_root_url().'tags.php',
     412    )
     413  );
     414
    335415// search link
    336416$template->assign_block_vars(
  • trunk/install/phpwebgallery_structure.sql

    r1116 r1119  
    1 -- MySQL dump 9.11
    21-- MySQL dump 9.11
    32--
     
    147146
    148147--
     148-- Table structure for table `phpwebgallery_image_tag`
     149--
     150
     151DROP TABLE IF EXISTS `phpwebgallery_image_tag`;
     152CREATE TABLE `phpwebgallery_image_tag` (
     153  `image_id` mediumint(8) unsigned NOT NULL default '0',
     154  `tag_id` smallint(5) unsigned NOT NULL default '0',
     155  PRIMARY KEY  (`image_id`,`tag_id`)
     156) TYPE=MyISAM;
     157
     158--
    149159-- Table structure for table `phpwebgallery_images`
    150160--
     
    164174  `width` smallint(9) unsigned default NULL,
    165175  `height` smallint(9) unsigned default NULL,
    166   `keywords` varchar(255) default NULL,
    167   `storage_category_id` smallint(5) unsigned default NULL,
    168176  `representative_ext` varchar(4) default NULL,
    169177  `date_metadata_update` date default NULL,
     
    173181  PRIMARY KEY  (`id`),
    174182  KEY `images_i2` (`date_available`),
    175   KEY `images_i1` (`storage_category_id`),
    176183  KEY `images_i3` (`average_rate`),
    177184  KEY `images_i4` (`hit`),
     
    230237
    231238--
     239-- Table structure for table `phpwebgallery_tags`
     240--
     241
     242DROP TABLE IF EXISTS `phpwebgallery_tags`;
     243CREATE TABLE `phpwebgallery_tags` (
     244  `id` smallint(5) unsigned NOT NULL auto_increment,
     245  `name` varchar(255) binary NOT NULL default '',
     246  `url_name` varchar(255) binary NOT NULL default '',
     247  PRIMARY KEY  (`id`)
     248) TYPE=MyISAM;
     249
     250--
    232251-- Table structure for table `phpwebgallery_upgrade`
    233252--
     
    261280  `need_update` enum('true','false') NOT NULL default 'true',
    262281  `forbidden_categories` text,
    263   `nb_total_images` mediumint(8) unsigned,
     282  `nb_total_images` mediumint(8) unsigned default NULL,
    264283  PRIMARY KEY  (`user_id`)
    265284) TYPE=MyISAM;
     
    297316  `nb_image_line` tinyint(1) unsigned NOT NULL default '5',
    298317  `nb_line_page` tinyint(3) unsigned NOT NULL default '3',
    299   `status` enum('webmaster', 'admin', 'normal', 'generic', 'guest') NOT NULL default 'guest',
     318  `status` enum('webmaster','admin','normal','generic','guest') NOT NULL default 'guest',
    300319  `adviser` enum('true','false') NOT NULL default 'false',
    301320  `language` varchar(50) NOT NULL default 'english',
  • trunk/language/en_UK.iso-8859-1/admin.lang.php

    r1116 r1119  
    4141$lang['A new version of PhpWebGallery is available.'] = 'A new version of PhpWebGallery is available.';
    4242$lang['Actions'] = 'Actions';
     43$lang['Add a tag'] = 'Add a tag';
    4344$lang['Add a user'] = 'Add a user';
    4445$lang['Add group'] = 'Add group';
     
    5960$lang['Controversy'] = 'Controversy';
    6061$lang['Creation date'] = 'Creation date';
     62$lang['Current name'] = 'Current name';
    6163$lang['Database'] = 'Database';
    6264$lang['Delete Representant'] = 'Delete Representant';
     65$lang['Delete selected tags'] = 'Delete selected tags';
    6366$lang['Delete selected users'] = 'Delete selected users';
    6467$lang['Deletions'] = 'Deletions';
     
    7073$lang['Does not represent'] = 'Does not represent';
    7174$lang['Edit all picture informations'] = 'Edit all picture informations';
     75$lang['Edit selected tags'] = 'Edit selected tags';
     76$lang['Edit tags'] = 'Edit tags';
    7277$lang['Elements'] = 'Elements';
    7378$lang['Empty caddie'] = 'Empty caddie';
     
    9297$lang['Manage permissions for group "%s"'] = 'Manage permissions for group "%s"';
    9398$lang['Manage permissions for user "%s"'] = 'Manage permissions for user "%s"';
     99$lang['Manage tags'] = 'Manage tags';
    94100$lang['Maximum height of the pictures'] = 'Maximum height of the pictures';
    95101$lang['Maximum width of the pictures'] = 'Maximum width of the pictures';
     
    99105$lang['Move'] = 'Move';
    100106$lang['Name'] = 'Name';
     107$lang['New name'] = 'New name';
    101108$lang['New parent category'] = 'New parent category';
     109$lang['New tag'] = 'New tag';
    102110$lang['No'] = 'No';
    103111$lang['Number of comments per page'] = 'Number of comments per page';
     
    112120$lang['Order by'] = 'Order by';
    113121$lang['Other private categories'] = 'Other private categories';
     122$lang['Page banner'] = 'Page banner';
    114123$lang['Parent category'] = 'Parent category';
    115124$lang['Path'] = 'Path';
     
    119128$lang['PhpWebGallery Administration'] = 'PhpWebGallery Administration';
    120129$lang['PhpWebGallery version'] = 'PhpWebGallery version';
    121 $lang['Page banner'] = 'Page banner';
    122130$lang['Picture informations updated'] = 'Picture informations updated';
    123131$lang['Position'] = 'Position';
     
    147155$lang['Submit'] = 'Submit';
    148156$lang['Sum of rates'] = 'Sum of rates';
     157$lang['Tag selection'] = 'Tag selection';
    149158$lang['Take selected elements out of caddie'] = 'Take selected elements out of caddie';
    150159$lang['Unable to check for upgrade since allow_url_fopen is disabled.'] = 'Unable to check for upgrade since allow_url_fopen is disabled.';
     
    163172$lang['You need to confirm deletion'] = 'You need to confirm deletion';
    164173$lang['actions'] = 'Actions';
    165 $lang['properties'] = 'Properties';
    166 $lang['is_high_enabled'] = 'High definition';
    167 $lang['is_high_disabled'] = '';
    168 $lang['enabled_high'] = 'High definition enabled';
     174$lang['add keywords'] = 'add keywords';
     175$lang['add tags'] = 'add tags';
    169176$lang['adviser'] = 'Adviser';
    170 $lang['add keywords'] = 'add keywords';
    171177$lang['associate to category'] = 'associate to category';
    172178$lang['associate to group'] = 'associate to group';
     
    209215$lang['elements per page'] = 'elements per page';
    210216$lang['elements'] = 'elements';
     217$lang['enabled_high'] = 'High definition enabled';
    211218$lang['file'] = 'file';
    212219$lang['filesize'] = 'filesize';
     
    225232$lang['history'] = 'History';
    226233$lang['instructions'] = 'Instructions';
     234$lang['is_high_disabled'] = '';
     235$lang['is_high_enabled'] = 'High definition';
    227236$lang['jump to category'] = 'jump to category';
    228237$lang['jump to image'] = 'jump to image';
     
    240249$lang['name'] = 'name';
    241250$lang['nbm_break_list_user'] = 'List of users to send mail is limited to %d. Others users are not listed.';
    242 $lang['nbm_nbm_break_send_mail'] = 'Sent mail is limited to %d send by pass. Others mails are skipped.';
    243 $lang['nbm_msg_no_mail_to_send'] = '%d mails were not sent.';
    244 $lang['nbm_msg_n_mails_sent'] = '%d mails were sent.';
     251$lang['nbm_col_check_user_send_mail'] = 'To send ?';
     252$lang['nbm_col_last_send'] = 'Last send';
     253$lang['nbm_col_mail'] = 'email';
     254$lang['nbm_col_user'] = 'User';
     255$lang['nbm_complementary_mail_content'] = 'Complementary mail content';
     256$lang['nbm_content_byebye'] = 'See you soon';
     257$lang['nbm_content_goto'] = 'Go to %s %s.';
     258$lang['nbm_content_hello'] = 'Hello %s';
     259$lang['nbm_content_new_elements'] = 'New elements were added on %s';
     260$lang['nbm_content_new_elements_between'] = 'New elements were added between %s and %s';
     261$lang['nbm_content_subscribe_by_admin'] = 'You are subcribed by webmaster for the notification by mail';
     262$lang['nbm_content_subscribe_by_himself'] = 'You are subcribed for the notification by mail';
     263$lang['nbm_content_subscribe_link'] = 'To subscribe, click on %s .';
     264$lang['nbm_content_subscribe_unsubscribe_contact'] = 'On problems or questions, send a message to %s.';
     265$lang['nbm_content_unsubscribe_by_admin'] = 'You are unsubcribed by webmaster for the notification by mail';
     266$lang['nbm_content_unsubscribe_by_himself'] = 'You are unsubcribed for the notification by mail';
     267$lang['nbm_content_unsubscribe_link'] = 'To unsubscribe, click on %s .';
     268$lang['nbm_info_send_mail_as'] = 'With blank value, gallery title will be used';
     269$lang['nbm_item_notification'] = 'Notification';
    245270$lang['nbm_msg_error_sending_email_to'] = 'Error when sending email to %s [%s].';
    246271$lang['nbm_msg_mail_sent_to'] = 'Mail sent to %s [%s].';
     272$lang['nbm_msg_n_mails_sent'] = '%d mails were sent.';
     273$lang['nbm_msg_no_mail_to_send'] = '%d mails were not sent.';
     274$lang['nbm_nbm_break_send_mail'] = 'Sent mail is limited to %d send by pass. Others mails are skipped.';
     275$lang['nbm_no_mail_to_send'] = 'No mail to send.';
     276$lang['nbm_no_user_available_to_send_L1'] = 'No user are available in order to send mail.';
     277$lang['nbm_no_user_available_to_send_L2'] = 'A user is available, if the are news elements to notify';
     278$lang['nbm_no_user_to send_notifications_by_mail'] = 'No user to send notifications by mail.';
    247279$lang['nbm_object_news'] = 'New elements added';
    248280$lang['nbm_object_subcribe'] = 'Subcribe of notification by mail';
    249281$lang['nbm_object_unsubcribe'] = 'Unsubcribe of notification by mail';
    250 $lang['nbm_content_hello'] = 'Hello %s';
    251 $lang['nbm_content_new_elements_between'] = 'New elements were added between %s and %s';
    252 $lang['nbm_content_new_elements'] = 'New elements were added on %s';
    253 $lang['nbm_content_goto'] = 'Go to %s %s.';
    254 $lang['nbm_content_subscribe_by_admin'] = 'You are subcribed by webmaster for the notification by mail';
    255 $lang['nbm_content_unsubscribe_by_admin'] = 'You are unsubcribed by webmaster for the notification by mail';
    256 $lang['nbm_content_subscribe_by_himself'] = 'You are subcribed for the notification by mail';
    257 $lang['nbm_content_unsubscribe_by_himself'] = 'You are unsubcribed for the notification by mail';
    258 $lang['nbm_content_byebye'] = 'See you soon';
    259 $lang['nbm_content_unsubscribe_link'] = 'To unsubscribe, click on %s .';
    260 $lang['nbm_content_subscribe_link'] = 'To subscribe, click on %s .';
    261 $lang['nbm_content_subscribe_unsubscribe_contact'] = 'On problems or questions, send a message to %s.';
    262 $lang['nbm_no_mail_to_send'] = 'No mail to send.';
    263 $lang['nbm_no_user_to send_notifications_by_mail'] = 'No user to send notifications by mail.';
     282$lang['nbm_param_mode'] = 'Parameter';
     283$lang['nbm_send_check_all'] = 'Check All';
     284$lang['nbm_send_complementary_mail_content'] = 'Complementary mail content';
     285$lang['nbm_send_detailed_content'] = 'Send detailed content';
     286$lang['nbm_send_mail_as'] = 'Send mail as';
    264287$lang['nbm_send_mail_to_users'] = 'Send mail to users';
     288$lang['nbm_send_mode'] = 'Send';
     289$lang['nbm_send_options'] = 'Options';
     290$lang['nbm_send_submit'] = 'Send';
     291$lang['nbm_send_uncheck_all'] = 'Uncheck All';
     292$lang['nbm_subscribe_col'] = 'Subscribed';
     293$lang['nbm_subscribe_mode'] = 'Subscribe';
     294$lang['nbm_title_param'] = 'Parameters';
     295$lang['nbm_title_send'] = 'Select sendings';
     296$lang['nbm_title_subscribe'] = 'Subscribe/unscribe users';
     297$lang['nbm_unsubscribe_col'] = 'Unsubcribed';
     298$lang['nbm_updated_param_count'] = '%d parameters are updated.';
     299$lang['nbm_user_change_enabled_error_on_updated_data_count'] = '%d user(s) are not updated.';
     300$lang['nbm_user_change_enabled_false'] = 'User %s [%s] removed of subscribe list.';
     301$lang['nbm_user_change_enabled_true'] = 'User %s [%s] added to subscribe list.';
     302$lang['nbm_user_change_enabled_updated_data_count'] = '%d user(s) are updated.';
     303$lang['nbm_user_not_change_enabled_false'] = 'User %s [%s] not removed of subscribe list.';
     304$lang['nbm_user_not_change_enabled_true'] = 'User %s [%s] not added to subscribe list.';
    265305$lang['nbm_user_x_added'] = 'User %s [%s] added.';
    266 $lang['nbm_item_notification'] = 'Notification';
    267 $lang['nbm_param_mode'] = 'Parameter';
    268 $lang['nbm_subscribe_mode'] = 'Subscribe';
    269 $lang['nbm_send_mode'] = 'Send';
    270 $lang['nbm_title_param'] = 'Parameters';
    271 $lang['nbm_updated_param_count'] = '%d parameters are updated.';
    272 $lang['nbm_send_mail_as'] = 'Send mail as';
    273 $lang['nbm_info_send_mail_as'] = 'With blank value, gallery title will be used';
    274 $lang['nbm_send_detailed_content'] = 'Send detailed content';
    275 $lang['nbm_complementary_mail_content'] = 'Complementary mail content';
    276 $lang['nbm_title_subscribe'] = 'Subscribe/unscribe users';
    277306$lang['nbm_warning_subscribe_unsubcribe'] = 'Warning, subscribe or unscribe send mails to users';
    278 $lang['nbm_subscribe_col'] = 'Subscribed';
    279 $lang['nbm_unsubscribe_col'] = 'Unsubcribed';
    280 $lang['nbm_no_user_available_to_send_L1'] = 'No user are available in order to send mail.';
    281 $lang['nbm_no_user_available_to_send_L2'] = 'A user is available, if the are news elements to notify';
    282 $lang['nbm_title_send'] = 'Select sendings';
    283 $lang['nbm_col_user'] = 'User';
    284 $lang['nbm_col_mail'] = 'email';
    285 $lang['nbm_col_last_send'] = 'Last send';
    286 $lang['nbm_col_check_user_send_mail'] = 'To send ?';
    287 $lang['nbm_send_options'] = 'Options';
    288 $lang['nbm_send_complementary_mail_content'] = 'Complementary mail content';
    289 $lang['nbm_send_submit'] = 'Send';
    290 $lang['nbm_send_check_all'] = 'Check All';
    291 $lang['nbm_send_uncheck_all'] = 'Uncheck All';
    292 $lang['nbm_user_change_enabled_true'] = 'User %s [%s] added to subscribe list.';
    293 $lang['nbm_user_change_enabled_false'] = 'User %s [%s] removed of subscribe list.';
    294 $lang['nbm_user_not_change_enabled_true'] = 'User %s [%s] not added to subscribe list.';
    295 $lang['nbm_user_not_change_enabled_false'] = 'User %s [%s] not removed of subscribe list.';
    296 $lang['nbm_user_change_enabled_updated_data_count'] = '%d user(s) are updated.';
    297 $lang['nbm_user_change_enabled_error_on_updated_data_count'] = '%d user(s) are not updated.';
    298307$lang['no_write_access'] = 'no write access';
    299308$lang['order_by'] = 'order by';
     
    304313$lang['pictures'] = 'pictures';
    305314$lang['private'] = 'private';
     315$lang['properties'] = 'Properties';
    306316$lang['public'] = 'public';
    307317$lang['purge history'] = 'purge history';
    308318$lang['purge never used notification feeds'] = 'purge never used notification feeds';
    309 $lang['repair and optimize database'] = 'repair and optimize database';
    310319$lang['purge sessions'] = 'purge sessions';
    311320$lang['randomly represented'] = 'randomly represented';
     
    323332$lang['remote_site_uncorrect_url'] = 'Remote site url must start by http or https and must only contain characters among "/", "a-zA-Z0-9", "-" or "_"';
    324333$lang['remove keyword'] = 'remove keyword';
     334$lang['remove tags'] = 'remove tags';
     335$lang['repair and optimize database'] = 'repair and optimize database';
    325336$lang['selection'] = 'selection';
    326337$lang['set to'] = 'set to';
     
    443454$lang['user_id URL parameter is missing'] = 'user_id URL parameter is missing';
    444455$lang['user_status'] = 'User status';
    445 $lang['user_status_webmaster'] = 'Webmaster';
    446456$lang['user_status_admin'] = 'Administrator';
    447 $lang['user_status_normal'] = 'User';
    448457$lang['user_status_generic'] = 'Generic';
    449458$lang['user_status_guest'] = 'Guest';
     459$lang['user_status_normal'] = 'User';
     460$lang['user_status_webmaster'] = 'Webmaster';
    450461$lang['username'] = 'username';
    451462$lang['users'] = 'Users';
  • trunk/language/en_UK.iso-8859-1/common.lang.php

    r1116 r1119  
    4040$lang['%d new elements'] = '%d new elements';
    4141$lang['%d new users'] = '%d new users';
     42$lang['%d pictures are also linked to current tags'] = '%d pictures are also linked to current tags';
    4243$lang['%d waiting elements'] = '%d waiting elements';
    4344$lang['About'] = 'About';
     45$lang['All tags must match'] = 'All tags must match';
     46$lang['All tags'] = 'All tags';
     47$lang['Any tag'] = 'Any tag';
    4448$lang['At least one listed rule must be satisfied.'] = 'At least one listed rule must be satisfied.';
     49$lang['At least one tag must match'] = 'At least one tag must match';
    4550$lang['Author'] = 'Author';
    4651$lang['Average rate'] = 'Average rate';
     
    6368$lang['Enter your personnal informations'] = 'Enter your personnal informations';
    6469$lang['Error sending email'] = 'Error sending email';
     70$lang['File name'] = 'File name';
    6571$lang['File'] = 'File';
    66 $lang['File name'] = 'File name';
    6772$lang['Filesize'] = 'Filesize';
    6873$lang['Filter and display'] = 'Filter and display';
     
    9297$lang['Profile'] = 'Profile';
    9398$lang['Quick connect'] = 'Quick connect';
     99$lang['RSS feed'] = 'RSS feed';
    94100$lang['Rate'] = 'Rate';
    95 $lang['RSS feed'] = 'RSS feed';
    96101$lang['Register'] = 'Register';
    97102$lang['Registration'] = 'Registration';
     103$lang['Related tags'] = 'Related tags';
    98104$lang['Reset'] = 'Reset';
    99105$lang['Retrieve password'] = 'Retrieve password';
    100106$lang['Search rules'] = 'Search rules';
     107$lang['Search tags'] = 'Search tags';
    101108$lang['Search'] = 'Search';
     109$lang['See available tags'] = 'See available tags';
     110$lang['See pictures linked to this tag only'] = 'See pictures linked to this tag only';
    102111$lang['Send new password'] = 'Send new password';
    103112$lang['Since'] = 'Since';
    104113$lang['Sort by'] = 'Sort by';
    105114$lang['Sort order'] = 'Sort order';
     115$lang['Tag'] = 'Tag';
     116$lang['Tags'] = 'Tags';
    106117$lang['The RSS notification feed provides notification on news from this website : new pictures, updated categories, new comments. Use a RSS feed reader.'] = 'The RSS notification feed provides notification on news from this website : new pictures, updated categories, new comments. Use a RSS feed reader.';
    107118$lang['Unknown feed identifier'] = 'Unknown feed identifier';
    108 $lang['nbm_unknown_identifier'] = 'Unknown identifier';
    109119$lang['User comments'] = 'User comments';
    110120$lang['Username'] = 'Username';
     
    118128$lang['add_favorites_hint'] = 'Add this picture to your favorites';
    119129$lang['admin'] = 'Administration';
     130$lang['adviser_mode_enabled'] = 'Adviser mode enabled';
    120131$lang['all'] = 'all';
    121132$lang['all_categories'] = 'all categories';
     
    136147$lang['calendar_picture_hint'] = 'displays pictures added on ';
    137148$lang['calendar_view'] = 'View';
     149$lang['chronology_monthly_calendar'] = 'Monthly calendar';
    138150$lang['chronology_monthly_list'] = 'Monthly list';
    139 $lang['chronology_monthly_calendar'] = 'Monthly calendar';
    140151$lang['chronology_weekly_list'] = 'Weekly list';
    141152$lang['click_to_redirect'] = 'Click here if your browser does not automatically forward you';
     
    212223$lang['maxwidth'] = 'Maximum width of the pictures';
    213224$lang['maxwidth_error'] = 'Maximum width must be a number superior to 50';
     225$lang['mode_created_hint'] = 'displays a calendar by creation date';
    214226$lang['mode_normal_hint'] = 'return to normal view mode';
    215 $lang['mode_created_hint'] = 'displays a calendar by creation date';
    216227$lang['mode_posted_hint'] = 'displays a calendar by date posted';
    217228$lang['month'][10] = 'October';
     
    229240$lang['most_visited_cat'] = 'Most visited';
    230241$lang['most_visited_cat_hint'] = 'displays most visited pictures';
     242$lang['nb_image_line_error'] = 'The number of images per row must be a not null scalar';
    231243$lang['nb_image_per_row'] = 'Number of images per row';
    232 $lang['nb_image_line_error'] = 'The number of images per row must be a not null scalar';
     244$lang['nb_line_page_error'] = 'The number of rows per page must be a not null scalar';
    233245$lang['nb_row_per_page'] = 'Number of rows per page';
    234 $lang['nb_line_page_error'] = 'The number of rows per page must be a not null scalar';
     246$lang['nbm_unknown_identifier'] = 'Unknown identifier';
    235247$lang['never_rated'] = 'You\'ve never rated this item';
    236248$lang['new_password'] = 'New password';
     
    333345$lang['w_month'] = 'Month';
    334346$lang['yes'] = 'Yes';
    335 $lang['adviser_mode_enabled'] = 'Adviser mode enabled';
    336347?>
  • trunk/language/fr_FR.iso-8859-1/admin.lang.php

    r1116 r1119  
    2626// +-----------------------------------------------------------------------+
    2727
     28
    2829$lang['%d categories including %d physical and %d virtual'] = '%d catégories dont %d physiques et %d virtuelles';
    2930$lang['%d categories moved'] = '%d catégories déplacées';
     
    4142$lang['A new version of PhpWebGallery is available.'] = 'Une nouvelle version de PhpWebGallery est disponible.';
    4243$lang['Actions'] = 'Actions';
     44$lang['Add a tag'] = 'Ajouter un tag';
    4345$lang['Add a user'] = 'Ajouter un utilisateur';
    4446$lang['Add group'] = 'Ajouter un groupe';
     
    5961$lang['Controversy'] = 'Controverse';
    6062$lang['Creation date'] = 'Date de création';
     63$lang['Current name'] = 'Nom courant';
    6164$lang['Database'] = 'Base de données';
    6265$lang['Delete Representant'] = 'Supprimer le représentant';
     66$lang['Delete selected tags'] = 'Supprimer les tags sélectionnés';
    6367$lang['Delete selected users'] = 'Supprimer les utilisateurs sélectionnés';
    6468$lang['Deletions'] = 'Suppressions';
     
    7074$lang['Does not represent'] = 'Ne représente pas';
    7175$lang['Edit all picture informations'] = 'Modifier toutes les informations liées à cette image';
     76$lang['Edit selected tags'] = 'Editer les tags sélectionnés';
     77$lang['Edit tags'] = 'Editer les tags';
    7278$lang['Elements'] = 'Éléments';
    7379$lang['Empty caddie'] = 'Vider le panier';
     
    9298$lang['Manage permissions for group "%s"'] = 'Gérer les permissions pour le groupe "%s"';
    9399$lang['Manage permissions for user "%s"'] = 'Gérer les permissions pour l\'utilisateur "%s"';
     100$lang['Manage tags'] = 'Gérer les tags';
    94101$lang['Maximum height of the pictures'] = 'Hauteur maximum des images';
    95102$lang['Maximum width of the pictures'] = 'Largeur maximum des images';
     
    99106$lang['Move'] = 'Déplacer';
    100107$lang['Name'] = 'Nom';
     108$lang['New name'] = 'Nouveau nom';
    101109$lang['New parent category'] = 'Nouvelle catégorie parente';
     110$lang['New tag'] = 'Nouveau tag';
    102111$lang['No'] = 'Non';
    103112$lang['Number of comments per page'] = 'Nombre de commentaires utilisateur par page';
     
    147156$lang['Submit'] = 'Valider';
    148157$lang['Sum of rates'] = 'Somme des notes';
     158$lang['Tag selection'] = 'Sélection de tags';
    149159$lang['Take selected elements out of caddie'] = 'Sortir les éléments sélectionnés du panier';
    150160$lang['Unable to check for upgrade since allow_url_fopen is disabled.'] = 'Impossible de connaître la dernière version cat la fonction allow_url_fopen est désactivée.';
     
    163173$lang['You need to confirm deletion'] = 'Vous devez confirmer la suppression';
    164174$lang['actions'] = 'Actions';
    165 $lang['properties'] = 'Propriétés';
    166 $lang['is_high_enabled'] = 'Haute définition';
    167 $lang['is_high_disabled'] = '';
    168 $lang['enabled_high'] = 'Haute définition actif';
     175$lang['add keywords'] = 'ajouter des mots-clef';
     176$lang['add tags'] = 'ajouter les tags';
    169177$lang['adviser'] = 'Conseiller';
    170 $lang['add keywords'] = 'ajouter des mots-clef';
    171178$lang['associate to category'] = 'associer à la catégorie';
    172179$lang['associate to group'] = 'associer au groupe';
     
    209216$lang['elements per page'] = 'éléments par page';
    210217$lang['elements'] = 'éléments';
     218$lang['enabled_high'] = 'Haute définition actif';
    211219$lang['file'] = 'fichier';
    212220$lang['filesize'] = 'poids';
     
    225233$lang['history'] = 'Historique';
    226234$lang['instructions'] = 'Instructions';
     235$lang['is_high_disabled'] = '';
     236$lang['is_high_enabled'] = 'Haute définition';
    227237$lang['jump to category'] = 'se rendre dans la catégorie';
    228238$lang['jump to image'] = 'se rendre à l\'image';
     
    240250$lang['name'] = 'nom';
    241251$lang['nbm_break_list_user'] = 'La liste des utilisateurs pour l\'envoi est limitéé à %d. Les autres utilisateurs ne sont pas listés.';
    242 $lang['nbm_nbm_break_send_mail'] = 'Les mails envoyés sont limités à %d envois d\'une seule passe. Les autres envois de mail ont été ignorés.';
    243 $lang['nbm_msg_no_mail_to_send'] = '%s mails n\'ont pas été envoyés.';
    244 $lang['nbm_msg_n_mails_sent'] = '%s mails ont été envoyés.';
     252$lang['nbm_col_check_user_send_mail'] = 'A envoyer ?';
     253$lang['nbm_col_last_send'] = 'Dernier envoi';
     254$lang['nbm_col_mail'] = 'email';
     255$lang['nbm_col_user'] = 'Utilisateur';
     256$lang['nbm_complementary_mail_content'] = 'Contenu complémentaire au mail';
     257$lang['nbm_content_byebye'] = 'A bientôt';
     258$lang['nbm_content_goto'] = 'Rendez-vous sur %s %s.';
     259$lang['nbm_content_hello'] = 'Bonjour %s';
     260$lang['nbm_content_new_elements'] = 'Des nouveaux éléments ont été ajoutés le %s';
     261$lang['nbm_content_new_elements_between'] = 'Des nouveaux éléments ont été ajoutés entre le %s et le %s';
     262$lang['nbm_content_subscribe_by_admin'] = 'Vous venez d\'être inscrit par le webmestre du site pour revevoir la notification par mail.';
     263$lang['nbm_content_subscribe_by_himself'] = 'Vous venez de vous inscrire pour revevoir la notification par mail.';
     264$lang['nbm_content_subscribe_link'] = 'Pour vous inscrire, cliquez sur %s .';
     265$lang['nbm_content_subscribe_unsubscribe_contact'] = 'En cas de problèmes ou de questions, envoyer un mail à %s.';
     266$lang['nbm_content_unsubscribe_by_admin'] = 'Vous venez d\'être désinscrit par le webmestre du site pour revevoir la notification par mail.';
     267$lang['nbm_content_unsubscribe_by_himself'] = 'Vous venez de vous désinscrire pour revevoir la notification par mail.';
     268$lang['nbm_content_unsubscribe_link'] = 'Pour vous désinscrire, cliquez sur %s .';
     269$lang['nbm_info_send_mail_as'] = 'Sans valeur, le titre de la galerie sera utilisé';
     270$lang['nbm_item_notification'] = 'Notification';
    245271$lang['nbm_msg_error_sending_email_to'] = 'Erreur lors de l\'envoi du mail à %s [%s].';
    246272$lang['nbm_msg_mail_sent_to'] = 'Mail envoyé à %s [%s].';
     273$lang['nbm_msg_n_mails_sent'] = '%s mails ont été envoyés.';
     274$lang['nbm_msg_no_mail_to_send'] = '%s mails n\'ont pas été envoyés.';
     275$lang['nbm_nbm_break_send_mail'] = 'Les mails envoyés sont limités à %d envois d\'une seule passe. Les autres envois de mail ont été ignorés.';
     276$lang['nbm_no_mail_to_send'] = 'Pas de mail à envoyer.';
     277$lang['nbm_no_user_available_to_send_L1'] = 'Il n\'y a pas d\'utilisateur à notifier par mail.';
     278$lang['nbm_no_user_available_to_send_L2'] = 'Un utilisateur est à notifier si de nouveaux éléments sont disponibles pour cet utilisateur.';
     279$lang['nbm_no_user_to send_notifications_by_mail'] = 'Pas d\'utilisateur pour envoyer des notifications par mails.';
    247280$lang['nbm_object_news'] = 'Nouveaux éléments ajoutés';
    248281$lang['nbm_object_subcribe'] = 'Inscription à la notification par mail';
    249282$lang['nbm_object_unsubcribe'] = 'Désinscription à la notification par mail';
    250 $lang['nbm_content_hello'] = 'Bonjour %s';
    251 $lang['nbm_content_new_elements_between'] = 'Des nouveaux éléments ont été ajoutés entre le %s et le %s';
    252 $lang['nbm_content_new_elements'] = 'Des nouveaux éléments ont été ajoutés le %s';
    253 $lang['nbm_content_goto'] = 'Rendez-vous sur %s %s.';
    254 $lang['nbm_content_subscribe_by_admin'] = 'Vous venez d\'être inscrit par le webmestre du site pour revevoir la notification par mail.';
    255 $lang['nbm_content_unsubscribe_by_admin'] = 'Vous venez d\'être désinscrit par le webmestre du site pour revevoir la notification par mail.';
    256 $lang['nbm_content_subscribe_by_himself'] = 'Vous venez de vous inscrire pour revevoir la notification par mail.';
    257 $lang['nbm_content_unsubscribe_by_himself'] = 'Vous venez de vous désinscrire pour revevoir la notification par mail.';
    258 $lang['nbm_content_byebye'] = 'A bientôt';
    259 $lang['nbm_content_unsubscribe_link'] = 'Pour vous désinscrire, cliquez sur %s .';
    260 $lang['nbm_content_subscribe_link'] = 'Pour vous inscrire, cliquez sur %s .';
    261 $lang['nbm_content_subscribe_unsubscribe_contact'] = 'En cas de problèmes ou de questions, envoyer un mail à %s.';
    262 $lang['nbm_no_mail_to_send'] = 'Pas de mail à envoyer.';
    263 $lang['nbm_no_user_to send_notifications_by_mail'] = 'Pas d\'utilisateur pour envoyer des notifications par mails.';
     283$lang['nbm_param_mode'] = 'Paramètrage';
     284$lang['nbm_send_check_all'] = 'Tout cocher';
     285$lang['nbm_send_complementary_mail_content'] = 'Contenu complémentaire du mail';
     286$lang['nbm_send_detailed_content'] = 'Envoi d\'un contenu détaillé';
     287$lang['nbm_send_mail_as'] = 'Envoyer le mail en tant que';
    264288$lang['nbm_send_mail_to_users'] = 'Envoi de mail aux utilisateurs';
     289$lang['nbm_send_mode'] = 'Envoi';
     290$lang['nbm_send_options'] = 'Options';
     291$lang['nbm_send_submit'] = 'Envoyer';
     292$lang['nbm_send_uncheck_all'] = 'Tout décocher';
     293$lang['nbm_subscribe_col'] = 'Inscrits';
     294$lang['nbm_subscribe_mode'] = 'Inscription';
     295$lang['nbm_title_param'] = 'Paramètres';
     296$lang['nbm_title_send'] = 'Sélection des envois';
     297$lang['nbm_title_subscribe'] = 'Inscrire/desinscrire les utilisateurs';
     298$lang['nbm_unsubscribe_col'] = 'Non Inscrits';
     299$lang['nbm_updated_param_count'] = '%d paramètres ont été mis à jour.';
     300$lang['nbm_user_change_enabled_error_on_updated_data_count'] = '%d utilisateurs n\'ont pas été mis à jour.';
     301$lang['nbm_user_change_enabled_false'] = 'L\'utilisateur %s [%s] a été supprimé de la liste des inscrits.';
     302$lang['nbm_user_change_enabled_true'] = 'L\'utilisateur %s [%s] a été ajouté à la liste des inscrits.';
     303$lang['nbm_user_change_enabled_updated_data_count'] = '%d utilisateurs ont été mis à jour.';
     304$lang['nbm_user_not_change_enabled_false'] = 'L\'utilisateur %s [%s] n\'a pas été supprimé de la liste des inscrits.';
     305$lang['nbm_user_not_change_enabled_true'] = 'L\'utilisateur %s [%s] n\'a pas été ajouté à la liste des inscrits.';
    265306$lang['nbm_user_x_added'] = 'Utilisateur %s [%s] ajouté.';
    266 $lang['nbm_item_notification'] = 'Notification';
    267 $lang['nbm_param_mode'] = 'Paramètrage';
    268 $lang['nbm_subscribe_mode'] = 'Inscription';
    269 $lang['nbm_send_mode'] = 'Envoi';
    270 $lang['nbm_title_param'] = 'Paramètres';
    271 $lang['nbm_updated_param_count'] = '%d paramètres ont été mis à jour.';
    272 $lang['nbm_send_mail_as'] = 'Envoyer le mail en tant que';
    273 $lang['nbm_info_send_mail_as'] = 'Sans valeur, le titre de la galerie sera utilisé';
    274 $lang['nbm_send_detailed_content'] = 'Envoi d\'un contenu détaillé';
    275 $lang['nbm_complementary_mail_content'] = 'Contenu complémentaire au mail';
    276 $lang['nbm_title_subscribe'] = 'Inscrire/desinscrire les utilisateurs';
    277307$lang['nbm_warning_subscribe_unsubcribe'] = 'Attention, l\'inscription ou la desincription entraine l\'envoi de mails aux utilisateurs concernés';
    278 $lang['nbm_subscribe_col'] = 'Inscrits';
    279 $lang['nbm_unsubscribe_col'] = 'Non Inscrits';
    280 $lang['nbm_no_user_available_to_send_L1'] = 'Il n\'y a pas d\'utilisateur à notifier par mail.';
    281 $lang['nbm_no_user_available_to_send_L2'] = 'Un utilisateur est à notifier si de nouveaux éléments sont disponibles pour cet utilisateur.';
    282 $lang['nbm_title_send'] = 'Sélection des envois';
    283 $lang['nbm_col_user'] = 'Utilisateur';
    284 $lang['nbm_col_mail'] = 'email';
    285 $lang['nbm_col_last_send'] = 'Dernier envoi';
    286 $lang['nbm_col_check_user_send_mail'] = 'A envoyer ?';
    287 $lang['nbm_send_options'] = 'Options';
    288 $lang['nbm_send_complementary_mail_content'] = 'Contenu complémentaire du mail';
    289 $lang['nbm_send_submit'] = 'Envoyer';
    290 $lang['nbm_send_check_all'] = 'Tout cocher';
    291 $lang['nbm_send_uncheck_all'] = 'Tout décocher';
    292 $lang['nbm_user_change_enabled_true'] = 'L\'utilisateur %s [%s] a été ajouté à la liste des inscrits.';
    293 $lang['nbm_user_change_enabled_false'] = 'L\'utilisateur %s [%s] a été supprimé de la liste des inscrits.';
    294 $lang['nbm_user_not_change_enabled_true'] = 'L\'utilisateur %s [%s] n\'a pas été ajouté à la liste des inscrits.';
    295 $lang['nbm_user_not_change_enabled_false'] = 'L\'utilisateur %s [%s] n\'a pas été supprimé de la liste des inscrits.';
    296 $lang['nbm_user_change_enabled_updated_data_count'] = '%d utilisateurs ont été mis à jour.';
    297 $lang['nbm_user_change_enabled_error_on_updated_data_count'] = '%d utilisateurs n\'ont pas été mis à jour.';
    298308$lang['no_write_access'] = 'pas d\'accès en écriture';
    299309$lang['order_by'] = 'trier selon';
     
    304314$lang['pictures'] = 'images';
    305315$lang['private'] = 'privée';
     316$lang['properties'] = 'Propriétés';
    306317$lang['public'] = 'publique';
    307318$lang['purge history'] = 'purger l\'historique';
    308319$lang['purge never used notification feeds'] = 'purger les flux de notification jamais utilisés';
    309 $lang['repair and optimize database'] = 'réparer et optimiser la base de données';
    310320$lang['purge sessions'] = 'purger les sessions';
    311321$lang['randomly represented'] = 'représentant au hasard';
     
    323333$lang['remote_site_uncorrect_url'] = 'L\'URL d\'un site distant doit commencer par "http" ou "https" et ne doit contenir des caractères que parmi "/", "a-zA-Z0-9", "-" ou "_"';
    324334$lang['remove keyword'] = 'supprimer mot-clef';
     335$lang['remove tags'] = 'supprimer les tags';
     336$lang['repair and optimize database'] = 'réparer et optimiser la base de données';
    325337$lang['selection'] = 'sélection';
    326338$lang['set to'] = 'changer en';
     
    443455$lang['user_id URL parameter is missing'] = 'le paramètre d\'URL "user_id" manque';
    444456$lang['user_status'] = 'Statut de l\'utilisateur';
    445 $lang['user_status_webmaster'] = 'Webmestre';
    446457$lang['user_status_admin'] = 'Administrateur';
    447 $lang['user_status_normal'] = 'Visiteur';
    448458$lang['user_status_generic'] = 'Générique';
    449459$lang['user_status_guest'] = 'Invité';
     460$lang['user_status_normal'] = 'Visiteur';
     461$lang['user_status_webmaster'] = 'Webmestre';
    450462$lang['username'] = 'nom utilisateur';
    451463$lang['users'] = 'Utilisateurs';
  • trunk/language/fr_FR.iso-8859-1/common.lang.php

    r1116 r1119  
    4040$lang['%d new elements'] = '%d nouveaux éléments';
    4141$lang['%d new users'] = '%d nouveaux utilisateurs';
     42$lang['%d pictures are also linked to current tags'] = '%d images sont également liées aux tags courants';
    4243$lang['About'] = 'À propos';
     44$lang['All tags must match'] = 'Tous les tags doivent correspondre';
     45$lang['All tags'] = 'Tous les tags';
     46$lang['Any tag'] = 'N\'importe quel tag';
    4347$lang['At least one listed rule must be satisfied.'] = 'Au moins un des critères doit être satisfait.';
     48$lang['At least one tag must match'] = 'Au moins un tag doit correspondre';
    4449$lang['Author'] = 'Auteur';
    4550$lang['Average rate'] = 'Note moyenne';
     
    6267$lang['Enter your personnal informations'] = 'Entrer vos informations personnelles';
    6368$lang['Error sending email'] = 'Erreur à l\'envoi du mail';
     69$lang['File name'] = 'Nom du fichier';
    6470$lang['File'] = 'Fichier';
    65 $lang['File name'] = 'Nom du fichier';
    6671$lang['Filesize'] = 'Poids';
    6772$lang['Filter and display'] = 'Filtrer et afficher';
     
    9196$lang['Profile'] = 'Profil';
    9297$lang['Quick connect'] = 'Connexion rapide';
     98$lang['RSS feed'] = 'flux RSS';
    9399$lang['Rate'] = 'Note';
    94 $lang['RSS feed'] = 'flux RSS';
    95100$lang['Register'] = 'S\'enregistrer';
    96101$lang['Registration'] = 'Enregistrement';
     102$lang['Related tags'] = 'Tags liés';
    97103$lang['Reset'] = 'Annuler';
    98104$lang['Retrieve password'] = 'Récupérer un mot de passe';
    99105$lang['Search rules'] = 'Critères de recherche';
     106$lang['Search tags'] = 'Rechercher les tags';
    100107$lang['Search'] = 'Rechercher';
     108$lang['See available tags'] = 'Voir les tags disponibles';
     109$lang['See pictures linked to this tag only'] = 'Voir les images liées uniquement à ce tag';
    101110$lang['Send new password'] = 'Envoyer le nouveau mot de passe';
    102111$lang['Since'] = 'Depuis';
    103112$lang['Sort by'] = 'Trier selon';
    104113$lang['Sort order'] = 'Ordre de tri';
     114$lang['Tag'] = 'Tag';
     115$lang['Tags'] = 'Tags';
    105116$lang['The RSS notification feed provides notification on news from this website : new pictures, updated categories, new comments. Use a RSS feed reader.'] = 'Le flux RSS notifie les événements de la galerie : nouvelles images, catégories mises à jour, nouveaux commentaires utilisateur. À utiliser avec un lecteur de flux RSS.';
    106117$lang['Unknown feed identifier'] = 'Identifiant de flux inconnu';
    107 $lang['nbm_unknown_identifier'] = 'Identifiants inconnus';
    108118$lang['User comments'] = 'Commentaires utilisateur';
    109119$lang['Username'] = 'Nom d\'utilisateur';
     
    117127$lang['add_favorites_hint'] = 'Ajouter cette image à vos favoris';
    118128$lang['admin'] = 'Administration';
     129$lang['adviser_mode_enabled'] = 'Mode conseiller actif';
    119130$lang['all'] = 'tout';
    120131$lang['all_categories'] = 'toutes les catégories';
     
    135146$lang['calendar_picture_hint'] = 'afficher les images du ';
    136147$lang['calendar_view'] = 'Vue';
     148$lang['chronology_monthly_calendar'] = 'Calendrier mensuel';
    137149$lang['chronology_monthly_list'] = 'Liste mensuelle';
    138 $lang['chronology_monthly_calendar'] = 'Calendrier mensuel';
    139150$lang['chronology_weekly_list'] = 'Liste hebdomadaire';
    140151$lang['click_to_redirect'] = 'Cliquez ici si votre navigateur ne vous redirige pas.';
     
    211222$lang['maxwidth'] = 'Largeur maximum des images';
    212223$lang['maxwidth_error'] = 'La largeur des images doit être supérieure à 50';
     224$lang['mode_created_hint'] = 'afficher un calendrier par date de création';
    213225$lang['mode_normal_hint'] = 'retourne à la vue normale';
    214 $lang['mode_created_hint'] = 'afficher un calendrier par date de création';
    215226$lang['mode_posted_hint'] = 'afficher un calendrier par date d\'ajout';
    216227$lang['month'][10] = 'Octobre';
     
    228239$lang['most_visited_cat'] = 'Plus vues';
    229240$lang['most_visited_cat_hint'] = 'afficher les images les plus vues';
     241$lang['nb_image_line_error'] = 'Le nombre d\'images par ligne doit être un entier non nul';
    230242$lang['nb_image_per_row'] = 'Nombre de miniatures par ligne';
    231 $lang['nb_image_line_error'] = 'Le nombre d\'images par ligne doit être un entier non nul';
     243$lang['nb_line_page_error'] = 'Le nombre de lignes par page doit être un entier non nul';
    232244$lang['nb_row_per_page'] = 'Nombre de lignes par page';
    233 $lang['nb_line_page_error'] = 'Le nombre de lignes par page doit être un entier non nul';
     245$lang['nbm_unknown_identifier'] = 'Identifiants inconnus';
    234246$lang['never_rated'] = 'Vous n\'avez jamais voté pour cette image';
    235247$lang['new_password'] = 'Nouveau mot de passe';
     
    333345$lang['w_month'] = 'Mois';
    334346$lang['yes'] = 'Oui';
    335 $lang['adviser_mode_enabled'] = 'Mode conseiller actif';
    336347?>
  • trunk/picture.php

    r1107 r1119  
    699699$infos['INFO_FILE'] = $picture['current']['file'];
    700700
    701 // keywords
    702 if (!empty($picture['current']['keywords']))
    703 {
    704   $infos['INFO_KEYWORDS'] =
    705     // FIXME because of search engine partial rewrite, giving the author
    706     // name threw GET is not supported anymore. This feature should come
    707     // back later, with a better design (tag classification).
    708 //     preg_replace(
    709 //       '/([^,]+)/',
    710 //       '<a href="'.
    711 //         PHPWG_ROOT_PATH.'category.php?cat=search&amp;search=keywords:$1'
    712 //         .'">$1</a>',
    713 //       $picture['current']['keywords']
    714 //       );
    715     $picture['current']['keywords'];
     701// tags
     702$query = '
     703SELECT id, name, url_name
     704  FROM '.IMAGE_TAG_TABLE.'
     705    INNER JOIN '.TAGS_TABLE.' ON tag_id = id
     706  WHERE image_id = '.$page['image_id'].'
     707;';
     708$result = pwg_query($query);
     709
     710if (mysql_num_rows($result) > 0)
     711{
     712  $tags = array();
     713 
     714  while ($row = mysql_fetch_array($result))
     715  {
     716    array_push(
     717      $tags,
     718      '<a href="'
     719      .make_index_URL(
     720        array(
     721          'tags' => array(
     722            array(
     723              'id' => $row['id'],
     724              'url_name' => $row['url_name'],
     725              ),
     726            )
     727          )
     728        )
     729      .'">'.$row['name'].'</a>'
     730      );
     731  }
     732
     733  $infos['INFO_TAGS'] = implode(', ', $tags);
    716734}
    717735else
    718736{
    719   $infos['INFO_KEYWORDS'] = l10n('N/A');
     737  $infos['INFO_TAGS'] = l10n('N/A');
    720738}
    721739
  • trunk/search.php

    r1082 r1119  
    6666  }
    6767
     68  if (isset($_POST['tags']))
     69  {
     70    $search['fields']['tags'] = array(
     71      'words' => $_POST['tags'],
     72      'mode'  => $_POST['tag_mode'],
     73      );
     74  }
     75 
    6876  if ($_POST['search_author'])
    6977  {
     
    201209  'U_HELP' => PHPWG_ROOT_PATH.'/popuphelp.php?page=search',
    202210  'U_HOME' => make_index_url(),
     211
     212  'TAG_SELECTION' => get_html_tag_selection(
     213    get_available_tags(
     214      isset($user['forbidden_categories'])
     215      ? explode(',', $user['forbidden_categories'])
     216      : null
     217      ),
     218    'tags',
     219    isset($_POST['tags']) ? $_POST['tags'] : array()
     220    ),
    203221  )
    204222);
  • trunk/search_rules.php

    r1113 r1119  
    8484}
    8585
     86if (isset($search['fields']['tags']))
     87{
     88  $template->assign_block_vars(
     89    'tags',
     90    array(
     91      'LIST_INTRO' => ($search['fields']['tags']['mode'] == 'AND')
     92        ? l10n('All tags must match')
     93        : l10n('At least one tag must match')
     94      )
     95    );
     96
     97  $query = '
     98SELECT name
     99  FROM '.TAGS_TABLE.'
     100  WHERE id IN ('.implode(',', $search['fields']['tags']['words']).')
     101;';
     102  $result = pwg_query($query);
     103  while ($row = mysql_fetch_array($result))
     104  {
     105    $template->assign_block_vars(
     106      'tags.tag',
     107      array(
     108        'NAME' => $row['name'],
     109        )
     110      );
     111  }
     112}
     113
    86114if (isset($search['fields']['author']))
    87115{
  • trunk/template/yoga/admin.tpl

    r1091 r1119  
    5555        <li><a href="{U_RATING}">{lang:Rating}</a></li>
    5656        <li><a href="{U_CADDIE}">{lang:Caddie}</a></li>
     57        <li><a href="{U_TAGS}">{lang:Tags}</a></li>
    5758      </ul>
    5859    </dd>
  • trunk/template/yoga/admin/element_set_global.tpl

    r1085 r1119  
    8484
    8585    <tr>
    86       <td>{lang:add keywords}</td>
    87       <td><input type="text" name="add_keywords" value="" /></td>
     86      <td>{lang:add tags}</td>
     87      <td>{ADD_TAG_SELECTION}</td>
    8888    </tr>
    8989
    9090    <tr>
    91       <td>{lang:remove keyword}</td>
    92       <td>
    93         <select name="remove_keyword">
    94           <!-- BEGIN remove_keyword_option -->
    95           <option value="{remove_keyword_option.VALUE}">{remove_keyword_option.OPTION}</option>
    96           <!-- END remove_keyword_option -->
    97         </select>
    98       </td>
     91      <td>{lang:remove tags}</td>
     92      <td>{DEL_TAG_SELECTION}</td>
    9993    </tr>
    100 
     94   
    10195    <tr>
    10296      <td>{lang:author}</td>
  • trunk/template/yoga/admin/element_set_unit.tpl

    r1085 r1119  
    7070
    7171    <tr>
    72       <td><strong>{lang:Keywords}</strong></td>
    73       <td><input type="text" name="keywords-{element.ID}" value="{element.KEYWORDS}" size="50" /></td>
     72      <td><strong>{lang:Tags}</strong></td>
     73      <td>{element.TAG_SELECTION}</td>
    7474    </tr>
    7575
  • trunk/template/yoga/admin/picture_modify.tpl

    r1085 r1119  
    100100
    101101      <tr>
    102         <td><strong>{lang:Keywords}</strong></td>
    103         <td><input type="text" name="keywords" value="{KEYWORDS}" size="50" /></td>
     102        <td><strong>{lang:Tags}</strong></td>
     103        <td>{TAG_SELECTION}</td>
    104104      </tr>
    105105
     106     
    106107      <tr>
    107108        <td><strong>{lang:Description}</strong></td>
  • trunk/template/yoga/content.css

    r1118 r1119  
    1414BODY#thePasswordPage #content,
    1515BODY#theNotificationPage #content,
     16BODY#theTagsPage #content,
    1617BODY#theNBMPage #content
    1718{
  • trunk/template/yoga/default-layout.css

    r1096 r1119  
    262262}
    263263
     264UL.tagSelection {
     265  width: 500px;
     266  padding: 0;
     267}
     268
     269UL.tagSelection LI {
     270  display: inline;
     271  white-space: nowrap;
     272}
  • trunk/template/yoga/index.tpl

    r1109 r1119  
    2020  </dd>
    2121</dl>
     22
     23<!-- BEGIN tags -->
     24<dl>
     25  <dt>{lang:Related tags}</dt>
     26  <dd>
     27    <ul id="menuTagCloud">
     28      <!-- BEGIN tag -->
     29      <li>
     30        <a href="{tags.tag.URL_ADD}" title="{tags.tag.TITLE_ADD}"><img src="{pwg_root}{themeconf:icon_dir}/add_tag.png" alt="+"></a>
     31        <a href="{tags.tag.URL}" class="{tags.tag.CLASS}" title="{tags.tag.TITLE}">{tags.tag.NAME}</a>
     32      </li>
     33      <!-- END tag -->
     34    </ul>
     35  </dd>
     36</dl>
     37<!-- END tags -->
     38
    2239<dl>
    2340  <dt>{lang:special_categories}</dt>
  • trunk/template/yoga/menubar.css

    r1096 r1119  
    9696}
    9797
     98#menubar #menuTagCloud {
     99  text-align: center;
     100  margin: 5px 0;
     101}
     102
     103#menubar #menuTagCloud LI
     104{
     105  display: inline;
     106}
  • trunk/template/yoga/picture.tpl

    r1092 r1119  
    108108  </tr>
    109109  <tr>
    110     <td class="label">{lang:Keywords}</td>
    111     <td class="value">{INFO_KEYWORDS}</td>
     110    <td class="label">{lang:Tags}</td>
     111    <td class="value">{INFO_TAGS}</td>
    112112  </tr>
    113113  <tr>
  • trunk/template/yoga/search.tpl

    r1059 r1119  
    3636        </td>
    3737  </tr>
     38 
     39  <tr>
     40    <td colspan="2"><b>{lang:Search tags} :</b></td>
     41    <td colspan="2" valign="middle">
     42      {TAG_SELECTION}
     43      <br /><label><input type="radio" name="tag_mode" value="AND" checked="checked" /> {lang:All tags}</label>
     44      <br /><label><input type="radio" name="tag_mode" value="OR" /> {lang:Any tag}</label>
     45    </td>
     46  </tr>
     47 
    3848  <tr>
    3949    <td colspan="2"><b>{L_SEARCH_DATE} :</b>
  • trunk/template/yoga/search_rules.tpl

    r1015 r1119  
    1010  <!-- END words -->
    1111
     12  <!-- BEGIN tags -->
     13  <li>
     14    <p>{tags.LIST_INTRO}</p>
     15
     16    <ul>
     17      <!-- BEGIN tag -->
     18      <li>{tags.tag.NAME}</li>
     19      <!-- END tag -->
     20    </ul>
     21  </li>
     22  <!-- END tags -->
     23 
    1224  <!-- BEGIN author -->
    1325  <li>{author.CONTENT}</li>
Note: See TracChangeset for help on using the changeset viewer.