Changeset 1648 for trunk/index.php


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/index.php

    r1627 r1648  
    105105{
    106106  $template_title.= ' ['.$page['cat_nb_images'].']';
     107}
     108
     109if (isset($_GET['filter_mode']))
     110{
     111  $page['filter_mode'] = ($_GET['filter_mode'] == 'start');
     112  pwg_set_session_var('filter_mode', $page['filter_mode']);
     113}
     114else
     115{
     116  $page['filter_mode'] = pwg_get_session_var('filter_mode', false);
     117}
     118
     119if ($page['filter_mode'])
     120{
     121  $template->assign_block_vars(
     122    'stop_filter_mode',
     123    array(
     124      'URL' => add_url_params(duplicate_index_url(array(), array('start')), array('filter_mode' => 'stop'))
     125      )
     126    );
     127}
     128else
     129{
     130  $template->assign_block_vars(
     131    'start_filter_mode',
     132    array(
     133      'URL' => add_url_params(duplicate_index_url(array(), array('start')), array('filter_mode' => 'start'))
     134      )
     135    );
    107136}
    108137
Note: See TracChangeset for help on using the changeset viewer.