Ignore:
Timestamp:
Dec 21, 2006, 10:38:20 PM (17 years ago)
Author:
rub
Message:

Feature Issue ID 0000601: Filter all public pages with only recent elements

It's a finalized version.
Obsolete code of draft are removed.

You can filter categories and images with recent date period on your screen selection.
In the future, filter could be easy done on other type data (plugin?)

You can flat categories and sub-categories with a recent date period of your choice.

Next, perhaps, a panel to choice recent date for the 2 features.

On draft, there have problem with MySql 5, be careful!

Css problem not resolved:

  • Menu "Categories" is bad centered
  • Icon on dark too on the top
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/functions_search.inc.php

    r1619 r1677  
    336336function get_quick_search_results($q)
    337337{
    338   global $user, $page;
     338  global $user, $page, $filter;
    339339  $search_results = array();
    340340
     
    385385    INNER JOIN
    386386  '.CATEGORIES_TABLE.' c on c.id=ic.category_id
    387 WHERE category_id NOT IN ('.$user['forbidden_categories'].')
     387'.get_sql_condition_FandF
     388  (
     389    array
     390      (
     391        'forbidden_categories' => 'category_id',
     392        'visible_categories' => 'category_id',
     393        'visible_images' => 'ic.image_id'
     394      ),
     395    'WHERE'
     396  ).'
    388397GROUP BY i.id';
    389398
     
    428437    INNER JOIN '.IMAGE_CATEGORY_TABLE.' AS ic ON id = ic.image_id
    429438  WHERE id IN ('.implode(',', array_keys($by_tag_weights) ).')
    430     AND category_id NOT IN ('.$user['forbidden_categories'].')';
    431 
     439'.get_sql_condition_FandF
     440  (
     441    array
     442      (
     443        'forbidden_categories' => 'category_id',
     444        'visible_categories' => 'category_id',
     445        'visible_images' => 'ic.image_id'
     446      ),
     447    'AND'
     448  );
    432449    $allowed_image_ids = array_from_query( $query, 'id');
    433450    $by_tag_weights = array_intersect_key($by_tag_weights, array_flip($allowed_image_ids));
Note: See TracChangeset for help on using the changeset viewer.