Changeset 1008 for trunk/picture.php


Ignore:
Timestamp:
Jan 20, 2006, 3:34:37 PM (18 years ago)
Author:
plg
Message:

Search engine redesign, first part :

  • new table #search to store search rules associated to a search id.
  • search rules are not passed through GET anymore, the search array build in search.php is serialized in #search table, so no need to rebuild it in function include/functions_category.inc.php::category_initialize
  • search array build code is improved (efficiency and layout) in search.php
  • SQL related to search is build in a dedicated function include/functions::get_sql_search_clause
  • direct search author:<...>, date_avalaible:<...>, date_creation:<...>, keywords:<...> from picture.php are not available anymore. They will come back later, with improvement (new design). Same for date_*:<> in calendar calendar category.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/picture.php

    r1004 r1008  
    676676{
    677677  $infos['INFO_AUTHOR'] =
    678     '<a href="'.
    679       PHPWG_ROOT_PATH.'category.php?cat=search'.
    680       '&amp;search=author:'.$picture['current']['author']
    681       .'">'.$picture['current']['author'].'</a>';
     678    // FIXME because of search engine partial rewrite, giving the author
     679    // name threw GET is not supported anymore. This feature should come
     680    // back later, with a better design
     681//     '<a href="'.
     682//       PHPWG_ROOT_PATH.'category.php?cat=search'.
     683//       '&amp;search=author:'.$picture['current']['author']
     684//       .'">'.$picture['current']['author'].'</a>';
     685    $picture['current']['author'];
    682686}
    683687else
     
    690694{
    691695  $infos['INFO_CREATION_DATE'] =
    692     '<a href="'.
    693       PHPWG_ROOT_PATH.'category.php?cat=search'.
    694       '&amp;search=date_creation:'.$picture['current']['date_creation']
    695       .'">'.format_date($picture['current']['date_creation']).'</a>';
     696    // FIXME because of search engine partial rewrite, giving the author
     697    // name threw GET is not supported anymore. This feature should come
     698    // back later, with a better design (calendar view).
     699//     '<a href="'.
     700//       PHPWG_ROOT_PATH.'category.php?cat=search'.
     701//       '&amp;search=date_creation:'.$picture['current']['date_creation']
     702//       .'">'.format_date($picture['current']['date_creation']).'</a>';
     703    format_date($picture['current']['date_creation']);
    696704}
    697705else
     
    702710// date of availability
    703711$infos['INFO_AVAILABILITY_DATE'] =
    704   '<a href="'.
    705     PHPWG_ROOT_PATH.'category.php?cat=search'.
    706     '&amp;search=date_available:'.
    707     substr($picture['current']['date_available'], 0, 10)
    708     .'">'.
    709   format_date($picture['current']['date_available'], 'mysql_datetime').
    710   '</a>';
     712// FIXME because of search engine partial rewrite, giving the author
     713// name threw GET is not supported anymore. This feature should come
     714// back later, with a better design (calendar view).
     715//
     716//   '<a href="'.
     717//     PHPWG_ROOT_PATH.'category.php?cat=search'.
     718//     '&amp;search=date_available:'.
     719//     substr($picture['current']['date_available'], 0, 10)
     720//     .'">'.
     721//   format_date($picture['current']['date_available'], 'mysql_datetime').
     722//   '</a>';
     723format_date($picture['current']['date_available'], 'mysql_datetime');
    711724
    712725// size in pixels
     
    752765{
    753766  $infos['INFO_KEYWORDS'] =
    754     preg_replace(
    755       '/([^,]+)/',
    756       '<a href="'.
    757         PHPWG_ROOT_PATH.'category.php?cat=search&amp;search=keywords:$1'
    758         .'">$1</a>',
    759       $picture['current']['keywords']
    760       );
     767    // FIXME because of search engine partial rewrite, giving the author
     768    // name threw GET is not supported anymore. This feature should come
     769    // back later, with a better design (tag classification).
     770//     preg_replace(
     771//       '/([^,]+)/',
     772//       '<a href="'.
     773//         PHPWG_ROOT_PATH.'category.php?cat=search&amp;search=keywords:$1'
     774//         .'">$1</a>',
     775//       $picture['current']['keywords']
     776//       );
     777    $picture['current']['keywords'];
    761778}
    762779else
Note: See TracChangeset for help on using the changeset viewer.