Ignore:
Timestamp:
Dec 10, 2006, 11:48:32 PM (17 years ago)
Author:
rub
Message:

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

It's a draft of the feature witch allows to show only recent elements.
Development are not finished.
Queries and special pages (best rates, tags, etc.) are not modified.
Only main php files about images and categories are ok.

Before to continue, I prefer to determinate a solution between modify cache implementation or hide counters.

Go to http://forum.phpwebgallery.net/viewtopic.php?pid=50015#p50015

File:
1 edited

Legend:

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

    r1596 r1648  
    4747SELECT *
    4848  FROM '.IMAGES_TABLE.'
    49   WHERE id IN ('.implode(',', $selection).')
    50 ;';
     49  WHERE id IN ('.implode(',', $selection).')';
     50  if ($page['filter_mode'])
     51  {
     52    $query.= '
     53    AND date_available  > SUBDATE(
     54      CURRENT_DATE,INTERVAL '.$user['recent_period'].' DAY)';
     55  }
     56  $query.= ';';
    5157  $result = pwg_query($query);
    5258  while ($row = mysql_fetch_assoc($result))
Note: See TracChangeset for help on using the changeset viewer.