aboutsummaryrefslogtreecommitdiffstats
path: root/index.php
diff options
context:
space:
mode:
authorrub <rub@piwigo.org>2006-12-10 22:48:32 +0000
committerrub <rub@piwigo.org>2006-12-10 22:48:32 +0000
commit222afe2caa357d6d31efdef87e2444d3e042880d (patch)
tree12386628081ccc334971eb7a8cf3456386e110d1 /index.php
parent906d9bd7951a77356b9caa04073a7d1c02d44bef (diff)
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 git-svn-id: http://piwigo.org/svn/trunk@1648 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to 'index.php')
-rw-r--r--index.php29
1 files changed, 29 insertions, 0 deletions
diff --git a/index.php b/index.php
index 050fdf40e..e6a184c5f 100644
--- a/index.php
+++ b/index.php
@@ -106,6 +106,35 @@ if (isset($page['cat_nb_images']) and $page['cat_nb_images'] > 0)
$template_title.= ' ['.$page['cat_nb_images'].']';
}
+if (isset($_GET['filter_mode']))
+{
+ $page['filter_mode'] = ($_GET['filter_mode'] == 'start');
+ pwg_set_session_var('filter_mode', $page['filter_mode']);
+}
+else
+{
+ $page['filter_mode'] = pwg_get_session_var('filter_mode', false);
+}
+
+if ($page['filter_mode'])
+{
+ $template->assign_block_vars(
+ 'stop_filter_mode',
+ array(
+ 'URL' => add_url_params(duplicate_index_url(array(), array('start')), array('filter_mode' => 'stop'))
+ )
+ );
+}
+else
+{
+ $template->assign_block_vars(
+ 'start_filter_mode',
+ array(
+ 'URL' => add_url_params(duplicate_index_url(array(), array('start')), array('filter_mode' => 'start'))
+ )
+ );
+}
+
if (!isset($page['chronology_field']))
{
$chronology_params =